viewing paste Unknown #21815 | 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 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
/*
    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, ";
    else if( .@Days > 0 )
        set .@Time$, .@Time$ + .@Days + " day, ";
 
    if( .@Hours > 1 )
        set .@Time$, .@Time$ + .@Hours + " hours, ";
    else if( .@Hours > 0 )
        set .@Time$, .@Time$ + .@Hours + " hour, ";
 
    if( .@Minutes > 1 )
        set .@Time$, .@Time$ + .@Minutes + " minutes, ";
    else if( .@Minutes > 0 )
        set .@Time$, .@Time$ + .@Minutes + " minute, ";
 
    if( .@time_left > 1 || .@time_left == 0 )
        set .@Time$, .@Time$ + .@time_left + " seconds";
    else if( .@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";
    sleep2 2000;
    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";
    sleep2 100;
    atcommand "@effect 500";
    sleep2 100;
    atcommand "@effect 500";
    sleep2 100;
    atcommand "@undisguise";
    sleep2 100;
    sc_start SC_INVINCIBLE, 1, 0;
    'ZombieTurned--;
end;
} else
end;
}
/*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";
} else
end;
}
*/
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;
        warp has_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.")) {
    case 1:
    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 complete
    instance_init( .@instance );
    instance_attach .@instance;
        'cid = getcharid(0);
        'aid = getcharid(3);
    warp instance_mapname("z@prt",.@instance),148,197;
    end;
 
    case 2:
    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:
disablenpc instance_npcname("Holy Fountain#Ins");
disablenpc instance_npcname("Night Patrol Unit#1");
disablenpc instance_npcname("Night Patrol Unit#2");
disablenpc instance_npcname("Night Patrol Unit#3");
disablenpc instance_npcname("Night Patrol Unit#4");
disablenpc instance_npcname("Prontera King");
enablenpc instance_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 )
{
    donpcevent instance_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;
sleep2 5000;
instance_announce -1,"- The fire that lights your way from the light polls crackle as they burst the tree wood knots. -",bc_map;
sleep2 5000;
enablenpc instance_npcname("Night Patrol Unit#1");
sleep 2000;
instance_announce -1,"- Suddenly as the night was silent, you hear footsteps, not one, two, but hundreds... -",bc_map;
specialeffect 563;
sleep2 5000;
instance_announce -1,"- You start to hear scratching, moans, death screams, everything that sends shivers down your spine. -",bc_map;
sleep2 10000;
instance_announce -1,"- You see something far in the direction you're looking in, and ask yourself:",bc_map;
sleep2 3000;
enablenpc instance_npcname("Night Patrol Unit#2");
sleep2 5000;
enablenpc instance_npcname("Night Patrol Unit#3");
sleep2 5000;
enablenpc instance_npcname("Night Patrol Unit#4");
areamonster instance_mapname("z@prt"),156,181,156,185,"Eremes",1635,'1st_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath"; // 1
sleep 2000;
areamonster instance_mapname("z@prt"),44,33,273,355,"Orc Zombie",1153,'2nd_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
areamonster instance_mapname("z@prt"),44,33,273,355,"Ragged Zombie",1865,'3rd_MobAML1,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
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";
sleep 2000;
end;
 
OnEvent3:
areamonster instance_mapname("z@prt"),44,33,273,355,"Ghostring",1576,'1st_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
areamonster instance_mapname("z@prt"),44,33,273,355,"Ragged Zombie",1865,'2nd_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
areamonster instance_mapname("z@prt"),44,33,273,355,"High Wizard Katrinn",1645,'3rd_MobAML3,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
end;
 
OnEvent4:
instance_announce -1,"[Zombie Massacre Instance] Our walls of Prontera haven't given up yet!!!",bc_map;
sleep 2000;
areamonster instance_mapname("z@prt"),44,33,273,355,"Zombie Incarnation",1925,'1st_MobAML4,instance_npcname("SpwnMonster#Ins")+"::OnThisMobDeath";
sleep 2000;
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:
sleep 5000;
instance_announce -1,"[Zombie Massacre Instance] Watch out! The strongest Undead Ghostly Zombie is destroying central Prontera! Go there at once!",bc_map;
sleep 2000;
monster instance_mapname("z@prt"),156,180,"Zombie Doppelganger",1731,'1st_MobAML6,instance_npcname("SpwnMonster#Ins")+"::OnThisLastWave";
sleep 2000;
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;
    donpcevent instance_npcname("Count#Ins")+"::OnCountKill";
end;
 
OnThisSemiWave:
'Ins_Count++;
sleep 2000;
donpcevent instance_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;
sleep2 2000;
if( attachrid('aid) )
    if( getcharid(0) == 'cid ) 
{
    sleep2 (450);
    specialeffect2 14;
    specialeffect2 587;
    showscript "Hope you enjoyed the Zombie Instance!";
    sleep2 500;
    warp instance_mapname("z@prt"),153,190;
}
enablenpc instance_npcname("Prontera King");
disablenpc instance_npcname("Night Patrol Unit#1");
disablenpc instance_npcname("Night Patrol Unit#2");
disablenpc instance_npcname("Night Patrol Unit#3");
disablenpc instance_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");
donpcevent instance_npcname("SpwnMonster#Ins")+"::OnTurnZombie";
end;
}
 
OnTurnZombie:
sleep2 100;
// 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++; 
    sleep2 2000;
    atcommand "@raise";
    atcommand "@disguise 1865";
    atcommand "@damageignore";
    sc_start SC_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;
} else
end;
} else
end;
}
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;
    donpcevent instance_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;
    donpcevent instance_npcname("SpwnMonster#Ins")+"::OnEvent3";
    end;
    }
    
if ('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT)
{
    donpcevent instance_npcname("SpwnMonster#Ins")+"::OnEvent4";
    end;
    }
 
if ('Ins_Count == 'MOBAML1TOT+'MOBAML2TOT+'MOBAML3TOT+'MOBAML4TOT)
{
    donpcevent instance_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;
    donpcevent instance_npcname("SpwnMonster#Ins")+"::OnEvent6";
    end;
    }
    }
z@prt,143,197,4 script  Night Patrol Unit#1 676,{
OnInit:
 
        sleep 2000;;
        npctalk "What is that guys?";
        sleep 30000;
        npctalk "I hope it's not Zombies...";
    end;
}
z@prt,164,209,2 script  Night Patrol Unit#2 674,{
OnInit:
        sleep 2000;
        npctalk "Prepare your weapons, soldiers.";
        sleep 30000;
        npctalk "Don't let them bite you!";
    end;
}
z@prt,150,211,2 script  Night Patrol Unit#3 679,{
OnInit:
 
        sleep 2000;
        npctalk "Prontera I am here to assist you to my greatest avail.";
        sleep 30000;
        npctalk "We can do this men, protect Prontera!";
 
    end;
}
z@prt,163,196,6 script  Night Patrol Unit#4 682,{
OnInit:
 
        sleep 2000;
        npctalk "What if we die?";
        sleep 30000;
        npctalk "I won't even know who I am anymore... I'll be zombified!";
    end;
}
//Reward npc
z@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.";
    getitem 501, 10;
    ZIns_CD = gettimetick(2) + 14400; // 4 hours cooldown
    close2;
    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;
sleep2 13500;
specialeffect 563;
sleep2 13500;
specialeffect 563;
showscript "What's that?";
sleep2 10000;
showscript "Oh no, it's the Zombies!";
specialeffect 563;
sleep2 10000;
atcommand "@sound voice_girl2.wav";
sleep2 1000;
atcommand "@sound voice_man.wav";
sleep 1500;
atcommand "@sound voice_girl.wav";
sleep 1500;
atcommand "@sound voice_man3.wav";
} else
end;
}
//Mapflags
z@prt   mapflag nowarp
z@prt   mapflag nowarpto
z@prt   mapflag noteleport
z@prt   mapflag nosave  SavePoint
z@prt   mapflag nomemo
z@prt   mapflag nobranch
z@prt   mapflag noicewall
z@prt   mapflag monster_noteleport
z@prt   mapflag partylock
z@prt   mapflag noicewall
 
z@prt   mapflag src4instance
z@prt   mapflag src4instance
z@prt   mapflag nightenabled
Viewed 786 times, submitted by Guest.