viewing paste Unknown #17645 | 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
-   script  Invasion    -1,{
OnWhisperGlobal:
if(getgmlevel()<99) end;
OnClock0900:
OnClock2300:
if (.event) end;
set .t, rand(0,getarraysize(.map$));
set .cnt, 1;
set .killed, .quan;
set .event,1;
announce "A huge wave of undead monsters is about to be invading "+.map$[.t],0;
sleep2 30000;
announce "A total of three wave invasion will  occur after a few minutes. After clearing all the mobs, Dracula will finally reveal itself",0;
sleep2 10000;
announce "These undead monsters will be dropping Event Coins at low chance, while Dracula drops Event Coins at 100% Chance!",0;
sleep2 10000;
announce "Undead Monsters will invade in 30 seconds!!",0;
sleep2 10000;
announce "Undead Monsters will invade in 20 seconds!!",0;
sleep2 10000;
announce "Undead Monsters will invade in 10 seconds!!",0;
sleep2 10000;
announce "The Undead Monsters has invaded "+.map$[.t],0;
sleep2 10000;
announce "Wave "+(.cnt)+" starts!",0;
monster .map$[.t],0,0,"Invasion Monster",.mob[rand(getarraysize(.mob))],.quan,strnpcinfo(0)+"::OnInvasionKilled";
initnpctimer:
end;
OnTimer3600000:
killmonster .map$[.t],strnpcinfo(0)+"::OnBossKilled";
killmonster .map$[.t],strnpcinfo(0)+"::OnInvasionKilled";
announce " Monster Invasion has ended",0;
set .event,0;
stopnpctimer;
end;
OnInvasionKilled:
set .killed, .killed - 1;
switch( .killed ) {
case 0:
break;
default:
mapannounce .map$[.t],"Monster left on map: "+.killed,0;
end;
}
set .cnt, .cnt + 1;
set .killed, .quan;
if( .cnt > .wave ) {
announce "The Invasion Boss shows himself!",0;
monster .map$[.t],0,0,"Invasion Boss",.boss[rand(getarraysize(.boss))],1,strnpcinfo(0)+"::OnBossKilled";
end;
}
announce "Wave "+(.cnt)+" starts!",0;
monster .map$[.t],0,0,"Invasion Monster",.mob[rand(getarraysize(.mob))],.quan,strnpcinfo(0)+"::OnInvasionKilled";
end;
OnBossKilled:
announce strcharinfo(0)+" has ended the invasion in "+.map$[.t],0;
getitem 20010,5;
set .event,0;
stopnpctimer;
end;
OnInit:
set .wave, 3; // Number of waves BEFORE the boss
set .quan, 60; // Number of mobs spawned for each non-MVP wave
setarray .boss[0],3006; // Add all MVP IDs that you want to summon at random
setarray .mob[0],3002,3003,3004,3005; // Add all the mob IDs that you want to summon at random
setarray .map$[0],"guild_vs1","guild_vs2","guild_vs3"; // Add all the map warps you want your invasion to take place at random
}
Viewed 592 times, submitted by Guest.