viewing paste 300 Monster Challenge | 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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
//===== rAthena Script =======================================
//= 300 Monster Challenege
//===== By: ==================================================
//= Arcenciel
//===== Version and Changes ==================================
//= 1.0   - Initial Release
//===== Description: =========================================
//= Script creates an instance in which a party is to fight
//= 300 monsters and 1 MvP, both of which are randomly chosen
//= from a predefined list. Script is highly configurable.
//===== Additional Comments: =================================
//= Requires custom map files and client side edits. Both of
//= which were provided in the release topic of this script.
//============================================================
 
alexa_in,77,296,5       script  Challenge#1-1   605,{
 
//===== Configurations =======================================
//= Name of the NPC that appears in NPC dialogues.
set .@npcname$,"George";
//= Users higher or equal this level will not be able to take on the challenge.
set .@maxlvl,150;
//= Number of people allowed in a party to take on the challenge.
set .@maxpartymembercount,1;
//= How much time in seconds is given to the party to complete the challenge. Default: 10 Minutes
set .@durationalive,600;
//= Sets whether other party members would get the quest as well. 0 = disabled | 1 = enabled
set .@giveothersquest,1;
//= Sets whether the script will check other party members for requirements. 0 = disabled | 1 = enabled
set .@docheck,1;
//= Checks if the other party members have the quest time limit. 0 = disabled | 1 = enabled
set .@questothers,1;
//= Checks if the other party members are higher or equal to the max level allowed. 0 = disabled | 1 = enabled
set .@lvlothers,1;
//= How many treasure chest should each party member recieve.
set .@rewardcount,1;
//= Tier One - Monster ID and Name
setarray .@chamonid[0],1015,1023,1122;
setarray .@chamonname$[0],"Zombie","Orc","Goblin";
//= Tier Two - Monster ID and Name
setarray .@chamonid2[0],1197,1273,1258;
setarray .@chamonname2$[0],"Zombie Prisoner","Orc Lady","Goblin Archer ";
//= Tier Three - Monster ID and Name
setarray .@chamonid3[0],1865,1213,1308;
setarray .@chamonname3$[0],"Ragged Zombie","High Orc","Panzer Goblin";
//= Last Tier [MVP] - Monster ID and Name
setarray .@chamonid4[0],1871,1190,1785;
setarray .@chamonname4$[0],"Fallen Bishop Hibram","Orc Lord","Atroce";
//= Treasure - Mob ID
setarray .@chamonid5[0],1337,1329,1946,1938;
//===== End of Configurations ================================
 
mes "[ ^0033CC"+.@npcname$+"^000000 ]";
if ((checkquest(70000,PLAYTIME) == -1) || (checkquest(70000,PLAYTIME)== 2)) {
 
        set .@talkname,getcharid(3,strcharinfo(0));
        set .@party_id,getcharid(1);
        set .@ins_mas,getpartyleader(.@party_id,2);
        getpartymember(.@party_id,0);
        set .@partymembercount,$@partymembercount;
        copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
        getpartymember(.@party_id,1);
        copyarray .@partymembercid[0],$@partymembercid[0] ,.@partymembercount;
        getpartymember(.@party_id,2);
        copyarray .@partymemberaid[0],$@partymemberaid[0] ,.@partymembercount;
 
        mes "Have you heard of the legendary party who has defeated 300 monsters?";
        next;
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        mes "BAHAHA! You're talking to one of the members right now! Do you think you can accomplish the same thing we did?!";
        next;
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        mes "Listen kid..I have an arena set up where you can attempt to complete this task. How bout we make a bet!?";
        next;
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        mes "I'll let you take on the challenge and you'll get a chance to win a treasure chest full of stuff in the end!";
        next;
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        mes "So how bout it...";
        mes "Do you want to take it on?!";
        if (select("Yeah, Bring it!:No, Maybe next time") == 2) {
                next;
                mes "[ ^0033CC"+.@npcname$+"^000000 ]";
                mes "Ha! I knew you couldn't do it!";
                close;
        }
        next;
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        if ( BaseLevel >= .@maxlvl ) {
                mes "Is that a scar? You seem to have been through a lot already. Only users lower than Level ^ff0000"+.@maxlvl+"^000000 can take on the challenge.";
                close;
        }
        if ( (.@party_id == 0) || (.@partymembercount < .@maxpartymembercount) ) {
                mes "You can't do this alone! I would have been killed without my comrades. You have to be in a ^ff0000"+.@maxpartymembercount+" - member party^000000 in order to do the challenge.";
                close;
        }
        if ( (.@partymembercount > .@maxpartymembercount) ) {
                mes "Your party is too big. Cut down on some members. I only need ^ff0000"+.@maxpartymembercount+"^000000 people.";
                close;
        }
        if ( getcharid(0) != .@ins_mas ) {
                mes "Party members need to listen to the party leader or everything falls apart. ^ff0000Only party leaders can set up challenge^000000. Tell your leader to come talk to me.";
                close;
        }
        for( set .@i, 0; .@i < .@partymembercount; set .@i, .@i +1 ) {
                if ( isloggedin(.@partymemberaid[.@i],.@partymembercid[.@i]) == 0 ) {
                        attachrid(.@talkname);
                        mes "One of your party members is offline. Either kick them out or you won't be able to proceed.";
                        if ( .@instance  > 0 ) instance_destroy (.@instance);
                        close;
                }
                attachrid(getcharid(3,.@partymembername$[.@i]));
                if ( checkquest(70000,PLAYTIME) == 2) {
                        dispbottom "You can now enter the 300 Monster Challenge Room";
                        erasequest 70000;
                }
                detachrid;
        }
        attachrid(.@talkname);
        if ((.@docheck == 1)) {
                mes "Let me just check your party for requirements...";
                sleep2 500;
                for( set .@i, 0; .@i < .@partymembercount; set .@i, .@i +1 ) {
                        if ( isloggedin(.@partymemberaid[.@i],.@partymembercid[.@i]) == 0 ) {
                                attachrid(.@talkname);
                                mes "One of your party members is offline. Either kick them out or you won't be able to proceed.";
                                if ( .@instance  > 0 ) instance_destroy (.@instance);
                                close;
                        }
                        attachrid(getcharid(3,.@partymembername$[.@i]));
                        if ((.@lvlothers == 1) && (BaseLevel >= .@maxlvl) ) {
                                attachrid(.@talkname);
                                mes .@partymembername$[.@i]+": Level is too high";
                                set .@docheck, 2;
                                detachrid;
                                attachrid(getcharid(3,.@partymembername$[.@i]));
                        }
                        if ( (.@questothers == 1) && ((checkquest(70000) == 0) || (checkquest(70000) == 1)) ) {
                                attachrid(.@talkname);
                                mes .@partymembername$[.@i]+": Is still wounded and not ready to fight.";
                                set .@docheck, 2;  
                                detachrid;
                                attachrid(getcharid(3,.@partymembername$[.@i]));
                        }
                        detachrid;
                }
                attachrid(.@talkname);
                if ((.@docheck == 2)) {
                        mes "You might want to fix the problems above. Come back when they're fixed and I'll let you through.";
                        close;
                } else {
                        sleep2 2000;
                        mes "Everything seems to be in order.";
                        next;
                }
        }
       
        mes "[ ^0033CC"+.@npcname$+"^000000 ]";
        mes "Don't die kid!";
        mes "You and your party will be warped immediately.";
        set .@instance,instance_create("300 Monsters",.@party_id);
       
        if ( .@instance < 0 ) {
                next;
                mes "[ ^0033CC"+.@npcname$+"^000000 ]";
                mes "Something seemed to have went awry...";
                mes "You can't attempt this challenge at this moment.";
                mes "Come back later.";
                close;
        }
       
        instance_attachmap ("1@gvs5",.@instance);
        instance_attach(.@instance);
        instance_set_timeout .@durationalive,60,.@instance;
        instance_init(.@instance);
 
        set .@chanum,rand(getarraysize(.@chamonid));
        set 'chamonid,.@chamonid[.@chanum];
        set 'chamonname$,.@chamonname$[.@chanum];
        set 'chamonid2,.@chamonid2[.@chanum];
        set 'chamonname2$,.@chamonname2$[.@chanum];
        set 'chamonid3,.@chamonid3[.@chanum];
        set 'chamonname3$,.@chamonname3$[.@chanum];
        set 'chamonid4,.@chamonid4[.@chanum];
        set 'chamonname4$,.@chamonname4$[.@chanum];
        copyarray 'chamonid5[0],.@chamonid5[0],getarraysize(.@chamonid5);
        set 'npcname$,.@npcname$;
        set 'instid,.@instance;
        set 'maxpartymembercount,.@maxpartymembercount;
        set 'party_id,.@party_id;
        set 'rewardcount,.@rewardcount;
 
        donpcevent instance_npcname("#Initial Wave", instance_id())+"::OnInstanceInit";
        donpcevent instance_npcname("Challenge#1-3", instance_id())+"::OnInstanceInit";
        donpcevent instance_npcname("#MvP Summoner", instance_id())+"::OnInstanceInit";
        donpcevent instance_npcname("#Instance Destroy", instance_id())+"::OnInstanceInit";
 
        if ((.@giveothersquest == 1)) {
                for( set .@i, 0; .@i < .@partymembercount; set .@i, .@i +1 ) {
                        if ( isloggedin(.@partymemberaid[.@i],.@partymembercid[.@i]) == 0 ) {
                                attachrid(.@talkname);
                                mes "One of your party members is offline. Either kick them out or you won't be able to proceed.";
                                if ( .@instance  > 0 ) instance_destroy (.@instance);
                                close;
                        }
                        attachrid(getcharid(3,.@partymembername$[.@i]));
                        if (checkquest(70000)== -1) setquest 70000;
                        detachrid;
                }
        attachrid(.@talkname);
        }
       
        if ((checkquest(70000)== -1)) { setquest 70000; }
        sleep2 1000;
        warpparty "1@gvs5",49,40,.@party_id;
        end;
 
} else if ( (checkquest(70000,PLAYTIME) == 0) || (checkquest(70000,PLAYTIME) == 1) ) {
        mes "Is that wound still bleeding?! Come back later when you're fully healed and well rested.";
        close;
}}
 
1@gvs5,51,41,4  script  Challenge#1-2   459,{
 
getpartymember('party_id);
mes "[ ^0033CC"+ 'npcname$+"^000000 ]";;
        if ( ($@partymembercount != 'maxpartymembercount) ){
                mes "Are you trying to scam me?!";
                mes "You can't sneak an extra person in for extra help!";
                close2;
                for( set 'i, 0; 'i < $@partymembercount; set 'i, 'i +1 ) {
                        atcommand "@request "+$@partymembername$['i]+" tried to use a loophole in an NPC.";
                        atcommand "@jail "+$@partymembername$['i];
                        logmes  $@partymembername$['i]+", tried to use a loophole in an NPC.";
                }
                instance_destroy ('instid);
                end;
        }      
        mes "Are you ready? Do note your time is still running.";
        if (select("Yeah, Let's go!:No, Hold on.") == 2) {
                next;
                mes "[ ^0033CC"+ 'npcname$+"^000000 ]";;
                mes "Clock is ticking for you but I got all day.";
                close;
        }
        next;
        mes "[ ^0033CC"+ 'npcname$+"^000000 ]";;
        mes "Don't die kid!";
        close2;
        donpcevent instance_npcname("Challenge#1-3", instance_id())+"::OnEnable";
        end;
}
 
1@gvs5,51,41,4  script  Challenge#1-3   459,{
        end;
       
OnInstanceInit:
        disablenpc instance_npcname("Challenge#1-3", instance_id());
        end;
 
OnEnable:
        disablenpc instance_npcname("Challenge#1-2", instance_id());
        enablenpc instance_npcname("Challenge#1-3", instance_id());
        initnpctimer;
        end;
       
OnTimer1000:
        instance_announce 0,'npcname$+": Couldn't you all get here any faster?!",bc_map;
        end;
 
OnTimer9000:
        instance_announce 0,'npcname$+": Here is what's going to happen..so listen up..",bc_map;
        end;
       
OnTimer17000:
        instance_announce 0,'npcname$+": Once I get outta here, the monsters are going to be released",bc_map;
        end;
 
OnTimer25000:
        instance_announce 0,'npcname$+": Your job is to kill ALL the monsters till none are standing.",bc_map;
        end;
 
OnTimer33000:
        instance_announce 0,'npcname$+": However, more monsters will come the more you kill. Stick together! Got that?",bc_map;
        end;
       
OnTimer41000:
        instance_announce 0,'npcname$+": Cause once your party is wiped. It's over. You'll have to wait to try again...",bc_map;
        end;
       
OnTimer49000:
        instance_announce 0,'npcname$+": Now ya'll better get your weapons out and spells ready....anytime now..",bc_map;
        end;
 
OnTimer57000:
        instance_announce 0,'npcname$+": And Oh...DON'T LOSE A LIMB!",bc_map;
        end;
       
OnTimer65000:
        instance_announce 0,'npcname$+": Here they come! I'll see ya'll afterwards if ya'll make it alive!",bc_map;
        end;
 
OnTimer68000:  
        donpcevent instance_npcname("#Initial Wave", instance_id())+"::OnEnable";
        disablenpc instance_npcname("Challenge#1-3", instance_id());
        specialeffect 304;
        stopnpctimer;
        end;
}
 
1@gvs5,18,52,0  script  #Initial Wave   -1,{
 
OnInstanceInit:
        disablenpc instance_npcname("#Initial Wave", instance_id());
        end;
 
OnEnable:
        enablenpc instance_npcname("#Initial Wave", instance_id());
        set 'monscount, 300;
        instance_announce 0,'monscount+" "+'chamonname$+" left",bc_map;
        monster "1@gvs5",0,0,'chamonname$,'chamonid,30,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
        end;
 
OnMyMobDead:
        set 'monscount, 'monscount - 1;
        if ( 'monscount == 0 ) {
                donpcevent instance_npcname("#MvP Summoner", instance_id())+"::OnEnable";
                end;
        }
        instance_announce 0,'monscount+" monster[s] left",bc_map;
        if ( ('monscount == 280) && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname$,'chamonid,30,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
        }
        if ( ( ('monscount == 260) ||('monscount == 240) )  && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname$,'chamonid,20,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
                monster "1@gvs5",0,0,'chamonname2$,'chamonid2,10,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";     
        }
        if ( ( ('monscount == 220) ||('monscount == 200) )  && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname$,'chamonid,15,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
                monster "1@gvs5",0,0,'chamonname2$,'chamonid2,15,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";     
        }
        if ( ( ('monscount == 180) ||('monscount == 160) )  && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname$,'chamonid,10,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
                monster "1@gvs5",0,0,'chamonname2$,'chamonid2,20,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";     
        }
        if ( ('monscount == 140)  && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname2$,'chamonid2,20,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
                monster "1@gvs5",0,0,'chamonname3$,'chamonid3,10,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";             
        }
        if ( ('monscount == 120 )  && ('monscount != 0) ) {
                monster "1@gvs5",0,0,'chamonname2$,'chamonid2,15,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";
                monster "1@gvs5",0,0,'chamonname3$,'chamonid3,15,instance_npcname("#Initial Wave", instance_id())+"::OnMyMobDead";             
        }
        end;
       
}
 
1@gvs5,18,52,0  script  #MvP Summoner   -1,{
 
OnInstanceInit:
        disablenpc instance_npcname("#MvP Summoner", instance_id());
        end;
       
OnEnable:
        enablenpc instance_npcname("#MvP Summoner", instance_id());
        instance_announce 0,'npcname$+": The final monster will be released in 10 seconds. Get ready!",bc_map;
        initnpctimer;
        end;
       
OnTimer10000:
        instance_announce 0,'npcname$+": The final monster has been released. Kill it and you're done!",bc_map;
        monster "1@gvs5",0,0,'chamonname4$,'chamonid4,1,instance_npcname("#MvP Summoner", instance_id())+"::OnMyMVPDead";
        stopnpctimer;
        end;
       
OnMyMVPDead:
        instance_announce 0,'npcname$+": Congratulations! The treasure chest is yours!",bc_map;
        getpartymember('party_id);
        set 'trecount,$@partymembercount * 'rewardcount;
        for( set 'i, 0; 'i < ($@partymembercount * 'rewardcount); set 'i, 'i +1 ) {
                set 'randnum,rand(getarraysize('chamonid5));
                monster "1@gvs5",44 + 'i,40,"Treasure Chest",'chamonid5['randnum],1,instance_npcname("#MvP Summoner", instance_id())+"::OnChestBreak";
        }
        getmapxy( .@Map$,.@X,.@Y,0 );
        makeitem 30007,100,.@Map$,.@X,.@Y;
        end;
       
OnChestBreak:
        set 'trecount,'trecount - 1;
        instance_announce 0,"A chest has been opened by "+strcharinfo(0),bc_map;
        if (('trecount == 0)) {
                enablenpc instance_npcname("#Instance Destroy", instance_id());
                donpcevent instance_npcname("#Instance Destroy", instance_id())+"::OnEnable";
        }
        end;
}
 
1@gvs5,18,52,0  script  #Instance Destroy       -1,{
 
OnInstanceInit:
        disablenpc instance_npcname("#Instance Destroy", instance_id());
        end;
       
OnEnable:
        enablenpc instance_npcname("#Instance Destroy", instance_id());
        instance_announce 0,"Instance will be destroyed in 10 seconds...",bc_map;
        initnpctimer;
        end;
       
OnTimer10000:
        instance_destroy ('instid);
        stopnpctimer;
        end;
}
 
1@gvs5  mapflag nomemo
1@gvs5  mapflag noreturn
1@gvs5  mapflag nosave  SavePoint
1@gvs5  mapflag noteleport
1@gvs5  mapflag nowarp
1@gvs5  mapflag nowarpto
1@gvs5  mapflag partylock
Viewed 564 times, submitted by unknown.