viewing paste Unknown #14744 | 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
prontera,150,188,4      script  Devil Square Guardian   414,{
function Ondevil2;
function Ondevil3;
function Ondevil4;
 
 
        mes "[Devil Square Guardian]";
        mes "Welcome to the entrance door to ^FF0000Devil Square^000000!";
        mes "If you fail or die, the door will be closed and you will have to wait until it starts to open again.";
        next;
        if ( select ( "Enter", "Mechanics / How to Play", "Cancel " ) == 3 ) {
                mes "[Devil Square Guardian]";
                mes "See ya";
                close;
        }
        else if ( @menu == 2 ) { // Info
                mes "[Devil Square Guardian]";
                mes "^FF0000READ and MAKE SURE you understand my rules before you enter!^000000";
                mes " ";
                mes "1. There are 3 levels of monsters you'll encounter. One level per round.";
                mes "2. Each level and round, the enemies to be summoned will be stronger. You need to kill them to proceed to the next round.";
                mes "3. Players who will succeed to stay after 3 rounds will get the opportunity to open ^B5AA0E10x Treasure Boxes^000000 with items, equips, and rare cards inside! The survivor/s will also get another prize when leaving the event map!";
                mes "4. Registration fee costs 20,000z.";
                mes "5. Minimum base level is 90.";
                mes "6. The maximum number of participants is up to 30.";
                close;
        }
        else if ( .start != 1 ) { // time
                mes "[Devil Square Guardian]";
                mes "I'm sorry but the Devil Square is currently closed. It'll be open again at:";
                mes "";
                mes "^2B00FF12:00 in the midnight^000000"; // display your time here
                mes "^2B00FF10:00 in the morning^000000";
                mes "^2B00FF03:00 in the afternoon^000000";
                mes "^2B00FF08:00 in the evening^000000";
                close;
        }
        else if ( baselevel < 90 || zeny < 20000 ) { // requirement
                mes "[Devil Square Guardian]";
                mes "Minimum base level to enter is 90";
                mes "The registration fee is 20,000z.";
                close;
        }
        else if ( .register_num >= .register_limit ) { // room FULL
                mes "[Devil Square Guardian]";
                mes "I'm sorry but the Devil Square is currently FULL.";
                mes "Maximum participants to enter is "+ .register_limit +" players";
                close;
        }
        zeny = zeny - 20000;
        announce strcharinfo(0)+" has entered the Devil Square", bc_npc;
        percentheal 100,100;
        warp "ordeal_1-1",183,182;
        .register_aid[ .register_num ] = getcharid(3);
        .register_num++;
        end;
 
OnInit:
        .register_limit = 50; // maximum amount of players can play in this event
        .ann_survive = 60000; // the rate at which announce the players that still survive in devil square, in mili-seconds
        bindatcmd "devilsquare", strnpcinfo(0)+"::Onatcmd", 99,100;
        end;
 
Onatcmd:
        if ( compare( .@atcmd_parameters$, "on" ) || compare( .@atcmd_parameters$, "start" ) ) {
                if ( .start )
                        dispbottom "Devil Square Event has already started.";
                else
                        goto L_Start;
        }
        else if ( compare( .@atcmd_parameters$, "off" ) || compare( .@atcmd_parameters$, "end" ) ) {
                if ( !.start )
                        dispbottom "Devil Square Event hasn't started yet.";
                else
                        goto L_End;
        }
        else if ( !.start ) {
                dispbottom "Devil Square Event is currently not running.";
                dispbottom "Use "+ .@atcmd_command$ +" on | start to start the event.";
                dispbottom "Use "+ .@atcmd_command$ +" off | end to end this event";
        }
        else if ( .start == 1 )
                dispbottom "Devil Square Event is currently accepting participants.";
        else
                dispbottom "Devil Square Event is currently running. Currently on Round "+ .round +" with "+ .mob +" mobs left.";
        end;
 
L_Start:
OnClock2000:
        if ( .start ) end;
        .start = 1;
        disablenpc "Exit#DS";
        disablenpc "ord11-12";
        mapannounce "ordeal_1-1","Devil Square is now closed", bc_map;
        getmapxy .@map$, .@x, .@y, 1;
        mapwarp "ordeal_1-1", .@map$, .@x, .@y;
        killmonsterall "ordeal_1-1";
        announce "Devil Square is OPENED NOW! 3 minutes until it starts!", bc_all;
        sleep 60000;
        announce "Devil Square will begin in 2 minutes..", bc_all;
        sleep 60000;
        announce "Devil Square will begin in 1 minutes..", bc_all;
        sleep 60000;
        announce "Devil Square starts now!", bc_all;
        if ( !.register_num )
                goto L_End;
        .start = 2;
        donpcevent strnpcinfo(0)+"::OnSurvive";
        .round = 1;
        .mob = 75;
        areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::Ondevildead";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] ORC ARCHER",1189,15,strnpcinfo(0)+"::Ondevildead";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] SANDMAN",1165,10,strnpcinfo(0)+"::Ondevildead";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] ARCHER SKELETON",1016,15,strnpcinfo(0)+"::Ondevildead";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] MINOROUS",1149,15,strnpcinfo(0)+"::Ondevildead";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] REQUIEM",1164,10,strnpcinfo(0)+"::Ondevildead";
        end;
 
Ondevildead:
        .mob--;
        dispbottom .mob;
        if ( .mob == 25 || .mob == 5 )
                mapannounce "ordeal_1-1","Devil Square: "+ .mob +" mobs to enter the 2nd round!", bc_map;
        else if ( !.mob ) {
                announce "Devil Square will now enter the 2nd round!", bc_all;
                sleep 10000;
                Ondevil2;
        }
        end;
 
Ondevil2:
        .round = 2;
        .mob = 70;
        areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::Ondevildead2";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::Ondevildead2";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::Ondevildead2";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] INJUSTICE",1257,10,strnpcinfo(0)+"::Ondevildead2";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] MIMIC",1191,15,strnpcinfo(0)+"::Ondevildead2";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1192,10,strnpcinfo(0)+"::Ondevildead2";
        end;
 
Ondevildead2:
        .mob--;
        dispbottom .mob;
        if ( .mob == 25 || .mob == 5 )
                mapannounce "ordeal_1-1","Devil Square: "+ .mob +" mobs left to enter the 3rd round!", bc_map;
        else if ( !.mob ) {
                announce "Devil Square will now enter the 3rd round!", bc_all;
                sleep 10000;
                Ondevil3;
        }
        end;
 
Ondevil3:
        .round = 3;
        .mob = 38;
        areamonster "ordeal_1-1",183,182,246,244,"[DS] ANOLIAN",1206,10,strnpcinfo(0)+"::Ondevildead3";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] WANDERER",1208,10,strnpcinfo(0)+"::Ondevildead3";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] DEVIRUCHI",1109,5,strnpcinfo(0)+"::Ondevildead3";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] JOKER",1131,10,strnpcinfo(0)+"::Ondevildead3";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] MOONLIGHT",1150,1,strnpcinfo(0)+"::Ondevildead3";
        areamonster "ordeal_1-1",183,182,246,244,"[DS] DARK ILLUSION",1302,2,strnpcinfo(0)+"::Ondevildead3";
        end;
 
Ondevildead3:
        .mob--;
        dispbottom .mob;
        if ( .mob == 25 || .mob == 5 )
                mapannounce "ordeal_1-1","Devil Square: "+ .mob +" mobs left to VICTORY", bc_map;
        else if ( !.mob ) {
                announce "Devil Square: Congratulations survivor/s! 10x Treasure Boxes will all be yours now!", bc_all;
                setmapflag "ordeal_1-1", mf_noskill;
                sleep 10000;
                Ondevil4;
        }
        end;
 
Ondevil4:
       
        .round = 4;
        .mob = 10;
        monster "ordeal_1-1",231,250,"Treasure Box",1324,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",234,247,"Treasure Box",1328,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",237,244,"Treasure Box",1332,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",240,241,"Treasure Box",1336,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",243,238,"Treasure Box",1340,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",246,235,"Treasure Box",1344,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",249,232,"Treasure Box",1348,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",252,229,"Treasure Box",1352,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",249,241,"Treasure Box",1356,1,strnpcinfo(0)+"::Onboxdead";
        monster "ordeal_1-1",240,249,"Treasure Box",1360,1,strnpcinfo(0)+"::Onboxdead";
        end;
 
Onboxdead:
        .mob--;
        dispbottom .mob;
        announce "Devil Square: "+ strcharinfo(0) +" has opened the treasure box at Devil Square", bc_all;
        if ( !.mob )
                removemapflag "ordeal_1-1", mf_noskill;
                goto L_End;
        end;
 
L_End:
        killmonsterall "ordeal_1-1";
        enablenpc "Exit#DS";
        deletearray .register_aid;
        atcommand "@skillon";
        .start = .round = .mob = .register_num = 0;
        end;
 
OnPCDieEvent:
OnPCLogoutEvent:
        if ( .start && strcharinfo(3) == "ordeal_1-1" ) {
                while ( .register_aid[.@i] != getcharid(3) && .@i < .register_num ) .@i++;
                deletearray .register_aid[.@i], 1;
                .register_num--;
                if ( !.register_num ) {
                        announce "All players failed to survive at Devil Square! Try again next time!", bc_all;
                        killmonsterall "ordeal_1-1";
                        goto L_End;
                }
        }
        end;
 
OnSurvive:
        while ( .start == 2 ) {
                mapannounce "ordeal_1-1", .register_num +" survivors at Devil Square!", bc_map;
                sleep .ann_survive;
        }
        end;
}
 
ordeal_1-1,246,245,5    script  Exit#DS 413,{
        mes "[Devil Square Guardian]";
        mes "Congratulations for winning! Here's another bonus! See ya again!";
        getitem 6153,500;
        next;
        warp "SavePoint", 0,0 ;
        close;
 
}
 
ordeal_1-1      mapflag nowarp
ordeal_1-1      mapflag monster_noteleport
ordeal_1-1      mapflag nowarpto
ordeal_1-1      mapflag noteleport
ordeal_1-1      mapflag nosave  SavePoint
ordeal_1-1      mapflag nomemo
ordeal_1-1      mapflag nobranch
ordeal_1-1      mapflag nopenalty
ordeal_1-1      mapflag noicewall
Viewed 263 times, submitted by unknown.