viewing paste Unknown #17644 | 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
-   script  Invasion    -1,{
OnClock1151:
OnClock1155:
set .t, rand(getarraysize(.@map$));
set .cnt, 1;
set .killed, .quan;
announce "Monsters are invading town "+.map$[.t],0;
announce "Wave #"+(.cnt)+" starts!",0;
monster .map$[.t],0,0,"Invasion Monster",.mob[rand(getarraysize(.mob))],.quan,strnpcinfo(0)+"::OnInvasionKilled";
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;
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 688 times, submitted by Guest.