/* Zombie Massacre Instance V1.0 Created by: Aeromesi Thanks to all Hercules members who helped me understand creating instances. http://herc.ws/board/user/4149-aeromesi/ TODO: Have to find a way to fix the cool down, that's why it's commented out. CLIENT SIDE INSTALL INSTRUCTIONS INSTALL THESE LINES INTO `resnametable.txt` then use WeeMapCache, select your map_cache.dat, LOAD RNT(resnametable.txt) SAVE MAPCACHE//Prontera Zombie Massacre Instance (Aeromesi)[email protected]#prontera.gnd#[email protected]#prontera.gat#[email protected]#prontera.rsw#유저인터페이스\map\[email protected]#유저인터페이스\map\prontera.bmp#Also, make sure to add the BGM music into your mp3nametable so the instance plays the Zombie themed BGM.*///*************************************************************************************************************************************//*************************************************************************************************************************************// WARNING: LEAVE '1st_MOBAML6 ALONE OR YOU'LL BREAK THE SCRIPT, THE LAST WAVE IS INTENDED FOR 1 ENEMY WHICH IS "ZOMBIE" DOPPELGANGER// Monster Amount config: Simply edit all of the MOBAML'S in order manipulate how many monsters you want in each wave. //*************************************************************************************************************************************//*************************************************************************************************************************************function script __Time2Str {set .@time_left, getarg(0)-gettimetick(2);set .@Days, .@time_left /86400;set .@time_left, .@time_left -(.@Days *86400);set .@Hours, .@time_left /3600;set .@time_left, .@time_left -(.@Hours *3600);set .@Minutes, .@time_left /60;set .@time_left, .@time_left -(.@Minutes *60);set .@Time$, "";if( .@Days > 1)set .@Time$, .@Time$ + .@Days +" days, ";elseif( .@Days > 0)set .@Time$, .@Time$ + .@Days +" day, ";if( .@Hours > 1)set .@Time$, .@Time$ + .@Hours +" hours, ";elseif( .@Hours > 0)set .@Time$, .@Time$ + .@Hours +" hour, ";if( .@Minutes > 1)set .@Time$, .@Time$ + .@Minutes +" minutes, ";elseif( .@Minutes > 0)set .@Time$, .@Time$ + .@Minutes +" minute, ";if( .@time_left > 1 || .@time_left ==0)set .@Time$, .@Time$ + .@time_left +" seconds";elseif( .@time_left ==1)set .@Time$, .@Time$ + .@time_left +" second";return .@Time$;}z@prt,151,192,0 script Holy Fountain#Ins 89,{//z@prt,155,204,0 script Holy Fountain 139,{if('ZombieTurned ==1){dispbottom"You proceed to drink the Holy Water";sleep22000;atcommand"@damageignore";instance_announce-1,"You revived back to normal, you may continue attacking the Zombies!",bc_map;// atcommand "@cashmount"; showscript "I can feel myself turning back to normal...";atcommand"@effect 500";sleep2100;atcommand"@effect 500";sleep2100;atcommand"@effect 500";sleep2100;atcommand"@undisguise";sleep2100;sc_startSC_INVINCIBLE, 1, 0; 'ZombieTurned--;end;}elseend;}/*z@prt,1,2,1 script OnTurnZombie#Ins -1,{OnPCDieEvent: if( strcharinfo(0) has_instance("z@prt") ) { // OnPCDieEvent triggered if the instance z@prt aka Zombie Massacre is active//enablenpc instance_npcname("Holy Fountain#Ins");donpcevent instance_npcname("SpwnMonster#Ins")+"::OnTurnZombie";} elseend;}*/prontera,155,158,4 script Prontera Night Patrol 653,{/* if( ZIns_CD < gettimetick(2) ) { mes "I'm sorry, you can't create yet another instance for 4 hours." + callfunc("__Time2Str",ZIns_CD); close;}*/if(has_instance("z@prt")!=""){mes"The nights not over yet!";next;warphas_instance("z@prt"),92,189;}cutin"3rd_rg_schmitt02", 2; .@md_namenpc$ ="[ ^551A8B Zombie Massacre ^000000 ]"; .@md_name$ ="Zombie Massacre";mes .@md_namenpc$;mes"Hello there "+strcharinfo(0)+".";mes"I received late talk from Prontera's King himself about an Invasion happening in Prontera";mes"";mes"A zombie invasion.";mes"";mes"It could be tonight, tomorrow night, any night.";next;mes .@md_namenpc$;mes"We need young capable people like yourself to help us in our efforts at night to patrol Prontera.";next;mes .@md_namenpc$;mes"Want to spend the night patrolling Prontera? Who knows, maybe Zombie's will show up.";mes"";mes"~^FF0000 WARNING: SOLO INSTANCE^000000~";mes"~~^FF0000EXTREME-DIFFUCULTY^000000~~";mes"~~^FF0000FLESH EATING ZOMBIES!^000000~~";next;mes .@md_namenpc$;switch(select("Sure thing!: Not interested.")){case1:mes"Alright, well night time is about to be on it's way, you better head out to your post.";cutin"", 255;sleep2(2000);mes"...";sleep2(2000); .@instance =instance_create( .@md_name$, getcharid(3), IOT_CHAR);if( .@instance < 0){dispbottom"Instance Failed.";end;}dispbottom"^0000ff"+ .@md_name$ +"^000000- Attempting to create Zombie Massacre.";if(instance_attachmap("z@prt",.@instance)==""){instance_destroy( .@instance );dispbottom"Failed to instance prontera/Instance Name: z@prt";end;}dispbottom"^0000ff"+ .@md_name$ +"^000000- Attempt successful on Zombie Massacre attach!";instance_set_timeout(7200, 300, .@instance ); // 3 Hours to completeinstance_init( .@instance );instance_attach .@instance; 'cid =getcharid(0); 'aid =getcharid(3);warp instance_mapname("z@prt",.@instance),148,197;end;case2:mes"Well if you don't decide, maybe Zombie's will come to eat your brains tonight while you sleep...";close;}}z@prt,1,1,1 script SpwnMonster#Ins -1,{OnInstanceInit:disablenpcinstance_npcname("Holy Fountain#Ins");disablenpcinstance_npcname("Night Patrol Unit#1");disablenpcinstance_npcname("Night Patrol Unit#2");disablenpcinstance_npcname("Night Patrol Unit#3");disablenpcinstance_npcname("Night Patrol Unit#4");disablenpcinstance_npcname("Prontera King");enablenpcinstance_npcname("Holy Fountain#Ins");//Monster amount configuration: Simply edit all of the MOBAML'S in order manipulate how many monsters you want in each wave. //Wave 1 Mob Amounts '1st_MobAML1 =1; '2nd_MobAML1 =50; '3rd_MobAML1 =500; '4th_MobAML1 =20; 'MOBAML1TOT = '1st_MobAML1+'2nd_MobAML1+'3rd_MobAML1+'4th_MobAML1;//Wave 2 Mob Amounts '1st_MobAML2 =500; 'MOBAML2TOT = '1st_MobAML2;//Wave 3 Mob Amounts '1st_MobAML3 =200; '2nd_MobAML3 =50; '3rd_MobAML3 =2; 'MOBAML3TOT = '1st_MobAML3+'2nd_MobAML3+'3rd_MobAML3;//Wave 4 Mob Amounts '1st_MobAML4 =50; 'MOBAML4TOT = '1st_MobAML4;//Wave 5 Mob Amounts '1st_MobAML5 =1; 'MOBAML5TOT = '1st_MobAML5;//Wave 6 (Final Mob/Boss) '1st_MobAML6 =1; 'MOBAML6TOT = '1st_MobAML6; 'Ins_MobCount = 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT+'MOBAML4TOT+'MOBAML5TOT; 'Ins_Count =0; 'Ins_Start =0; 'Z_Begin =0;if(!'Ins_Start ){donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent1"; 'Ins_Start++;end;}OnEvent1:instance_announce-1," - You hear the silent night wind, along with crickets playing their violins in the silent city of Prontera. -",bc_map;sleep25000;instance_announce-1,"- The fire that lights your way from the light polls crackle as they burst the tree wood knots. -",bc_map;sleep25000;enablenpcinstance_npcname("Night Patrol Unit#1");sleep2000;instance_announce-1,"- Suddenly as the night was silent, you hear footsteps, not one, two, but hundreds... -",bc_map;specialeffect563;sleep25000;instance_announce-1,"- You start to hear scratching, moans, death screams, everything that sends shivers down your spine. -",bc_map;sleep210000;instance_announce-1,"- You see something far in the direction you're looking in, and ask yourself:",bc_map;sleep23000;enablenpcinstance_npcname("Night Patrol Unit#2");sleep25000;enablenpcinstance_npcname("Night Patrol Unit#3");sleep25000;enablenpcinstance_npcname("Night Patrol Unit#4");areamonster instance_mapname("z@prt"),156,181,156,185,"Eremes",1635,'1st_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath"; // 1sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"Orc Zombie",1153,'2nd_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"Ragged Zombie",1865,'3rd_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"Zombie Prisoner",1197,'4th_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";end;OnEvent2:areamonster instance_mapname("z@prt"),44,33,273,355,"Ragged Zombie",1865,'1st_MobAML2,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;end;OnEvent3:areamonster instance_mapname("z@prt"),44,33,273,355,"Ghostring",1576,'1st_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"Ragged Zombie",1865,'2nd_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"High Wizard Katrinn",1645,'3rd_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;end;OnEvent4:instance_announce-1,"[Zombie Massacre Instance] Our walls of Prontera haven't given up yet!!!",bc_map;sleep2000;areamonster instance_mapname("z@prt"),44,33,273,355,"Zombie Incarnation",1925,'1st_MobAML4,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";sleep2000;end;OnEvent5:instance_announce-1,"[Zombie Massacre Instance] We're nearing Victory! Protect Prontera!",bc_map;areamonster instance_mapname("z@prt"),44,33,273,355,"Zombie Flame Skull",1869,'1st_MobAML5,instance_npcname("SpwnMonster#Ins")+"::OnThisSemiWave";end;OnEvent6:sleep5000;instance_announce-1,"[Zombie Massacre Instance] Watch out! The strongest Undead Ghostly Zombie is destroying central Prontera! Go there at once!",bc_map;sleep2000;monster instance_mapname("z@prt"),156,180,"Zombie Doppelganger",1731,'1st_MobAML6,instance_npcname("SpwnMonster#Ins")+"::OnThisLastWave";sleep2000;end;OnThisMobDeath: 'Ins_Count++;instance_announce-1,"[Zombie Massacre Instance] You have killed a total of "+('Ins_Count)+" Zombies! Only "+('Ins_MobCount-'Ins_Count)+" to go!",bc_map;donpceventinstance_npcname("Count#Ins")+"::OnCountKill";end;OnThisSemiWave:'Ins_Count++;sleep2000;donpceventinstance_npcname("Count#Ins")+"::OnCountKill";end;OnThisLastWave:instance_announce-1,"[Zombie Massacre Instance] You successfully brought the Zombies at bay. Another sunrise is upon us.",bc_map;sleep22000;if(attachrid('aid))if(getcharid(0)== 'cid ){sleep2(450);specialeffect214;specialeffect2587; showscript "Hope you enjoyed the Zombie Instance!";sleep2500;warp instance_mapname("z@prt"),153,190;}enablenpcinstance_npcname("Prontera King");disablenpcinstance_npcname("Night Patrol Unit#1");disablenpcinstance_npcname("Night Patrol Unit#2");disablenpcinstance_npcname("Night Patrol Unit#3");disablenpcinstance_npcname("Night Patrol Unit#4");end;OnPCDieEvent:if(has_instance("z@prt")){// OnPCDieEvent triggered if the instance z@prt aka Zombie Massacre is active//enablenpc instance_npcname("Holy Fountain#Ins");donpceventinstance_npcname("SpwnMonster#Ins")+"::OnTurnZombie";end;}OnTurnZombie:sleep2100;// IF INSTANCE IS ACTIVATED AND YOUR ZOMBIE STATUS IS 0 if('Ins_Start ==1&& 'ZombieTurned ==0){if(attachrid('aid))if(getcharid(0)== 'cid ){// 'ZombieTurned gets added so next time you die from label OnPCDieEvent it just ends, OR YOU could make it game-over if you DIE AS ZOMBIE (Optional)'ZombieTurned++; sleep22000;atcommand"@raise";atcommand"@disguise 1865";atcommand"@damageignore";sc_startSC_INVINCIBLE, 100000, 0;instance_announce-1,"Oh no! it seem's you've been turned into a Zombie! Proceed to the center of Prontera and drink water from the Holy Fountain to gain your abilities back and return to normal.",bc_map;}elseend;}elseend;}z@prt,1,2,1 script Count#Ins -1,{OnCountKill:if('Ins_Count == 'MOBAML1TOT){instance_announce-1,"[Zombie Massacre Instance] That's not all of them, they're starting to get through the walls of Prontera, go all around the outskirts of Prontera before they move their way in!",bc_map;donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent2";end;}if('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT){instance_announce-1,"Good thing they didn't get back into the city, but now Zombies are coming out of homes! We're losing too many...",bc_map;donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent3";end;}if('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT){donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent4";end;}if('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT+'MOBAML4TOT){donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent5";end;}if('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT+'MOBAML4TOT+'MOBAML5TOT){instance_announce-1,"[Zombie Massacre Instance] Here comes forth the Zombie Boss! Good luck!",bc_map;donpceventinstance_npcname("SpwnMonster#Ins")+"::OnEvent6";end;}}z@prt,143,197,4 script Night Patrol Unit#1676,{OnInit:sleep2000;;npctalk"What is that guys?";sleep30000;npctalk"I hope it's not Zombies...";end;}z@prt,164,209,2 script Night Patrol Unit#2674,{OnInit:sleep2000;npctalk"Prepare your weapons, soldiers.";sleep30000;npctalk"Don't let them bite you!";end;}z@prt,150,211,2 script Night Patrol Unit#3679,{OnInit:sleep2000;npctalk"Prontera I am here to assist you to my greatest avail.";sleep30000;npctalk"We can do this men, protect Prontera!";end;}z@prt,163,196,6 script Night Patrol Unit#4682,{OnInit:sleep2000;npctalk"What if we die?";sleep30000;npctalk"I won't even know who I am anymore... I'll be zombified!";end;}//Reward npcz@prt,148,195,4 script Prontera King 108,{mes"[^0000FF Prontera King ^000000]";mes"Well "+strcharinfo(0)+", you bravely fought back every single one of those hideous Zombies for the sake of Prontera!";mes"If we ever need you again in-case the Zombies regroup, we know who to go to now!";mes"From thy King himself, grants you these presents as a token of the Kingdom of Pronteras Gratitude.";getitem501, 10; ZIns_CD =gettimetick(2)+14400; // 4 hours cooldownclose2;instance_destroy();warp"prontera",150,150;end;}z@prt,148,197,0 script ZBegin 139,0,0,{OnTouch:if( 'Z_Begin ==0){ 'Z_Begin =1;sleep213500;specialeffect563;sleep213500;specialeffect563;showscript "What's that?";sleep210000;showscript "Oh no, it's the Zombies!";specialeffect563;sleep210000;atcommand"@sound voice_girl2.wav";sleep21000;atcommand"@sound voice_man.wav";sleep1500;atcommand"@sound voice_girl.wav";sleep1500;atcommand"@sound voice_man3.wav";}elseend;}//Mapflagsz@prt mapflag nowarpz@prt mapflag nowarptoz@prt mapflag noteleportz@prt mapflag nosave SavePointz@prt mapflag nomemoz@prt mapflag nobranchz@prt mapflag noicewallz@prt mapflag monster_noteleportz@prt mapflag partylockz@prt mapflag noicewallz@prt mapflag src4instancez@prt mapflag src4instancez@prt mapflag nightenabled