viewing paste Unknown #23606 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
-       script  whispmap        -1,{
OnWhisperGlobal:
        mes "[^FF0000Town Picture System^000000]";
        mes "Hello, if you set your map display and you wish to change it, I can reset it for you.";
        mes "0 Means to show the pictures on the towns.";
        mes "1 Means to not show the pictures on the towns.";
        mes "Please select the option you wish to choose.";
        next;
        switch(select("Set option to 0:Set option to 1")) {
case 1:
        mes "[^FF0000Town Picture System^000000]";
        mes "I will now set your option to 0, pictures will display.";
        showmapdis = 0;
        close;
case 2:
        mes "[^FF0000Town Picture System^000000]";
        mes "I will now set your option to 1, pictures will not display.";
        showmapdis = 1;
        close;
}
}
-       script  mappic  -1,{
OnPCLoadMapEvent:
if(showmapdis == 0) {
        //Gets the players map
        getmapxy(.@map$,.@x,.@y,0);
        //Set array for all the maps that you want to have the cutin images
        setarray .@cutinmaps$[0], "prontera", "alberta", "izlude", "aldebaran", "amatsu", "ayothaya", "comodo", "einbroch", "geffen", "hugel", "jawaii", "lighthalzen", "louyang", "xmas", "manuk", "morocc", "moscovia", "niflheim", "payon", "rachel", "splendide", "umbala", "veins", "yuno";
        //The number of cutin images for each city in array '.@cutinmaps$' respectively
        //Example: 5 images for prontera, 6 images for brasilis, etc
setarray .@images[1], 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5 ,5;
        //Goes through all the maps in the array '.@cutinmaps$'
for( .@i = 0; .@i < getarraysize(.@cutinmaps$); .@i += 1) {
//for( .@i = 0; .@i < getarraysize(.@cutinmaps$); .@i + 1) {
        //Checks if player is on the map from array '.@cutinmaps$'
        if(.@map$ == .@cutinmaps$[.@i]) {
        //if Player is on a map defined in that array, it'll go through the array of number of images '.@images'
        for( .@a = 1; .@a < (.@images[.@i+1]+1); .@a += 1){
        //shows the image "map_<mapename>-<number>"
        cutin "map_title-"+.@map$+"-"+.@a, 4;
        //slows down the display of cutins by a bit
        sleep2 400;
        }
        //remove cutins
        cutin "", 255;
 
}
        //if at the end of the array of '.@cutinmaps$', it goes to the end;
        //else, it goes to another map and checks if the player is on that map
}
        //ends script
        end;
        //end of NPC script
} else { end;
}
}
//mapflags to load the NPC event
prontera        mapflag loadevent
alberta mapflag loadevent
izlude  mapflag loadevent
aldebaran       mapflag loadevent
amatsu  mapflag loadevent
ayothaya        mapflag loadevent
comodo  mapflag loadevent
einbroch        mapflag loadevent
geffen  mapflag loadevent
hugel   mapflag loadevent
jawaii  mapflag loadevent
lighthalzen     mapflag loadevent
louyang mapflag loadevent
xmas    mapflag loadevent
manuk   mapflag loadevent
morocc  mapflag loadevent
moscovia        mapflag loadevent
niflheim        mapflag loadevent
payon   mapflag loadevent
rachel  mapflag loadevent
splendide       mapflag loadevent
umbala  mapflag loadevent      
veins   mapflag loadevent
yuno    mapflag loadevent
 
Viewed 334 times, submitted by unknown.