- script TreasureBoxSummonerCoin -1,{
OnClock1500:
OnClock1600:
OnClock2400:
set .boxkills, 0;
set .@ran, rand(1,9);
setarray .@jmpmap$[1],
"hugel",
"yuno",
"comodo",
"aldebaran",
"izlude",
"payon",
"geffen",
"morocc",
"prontera";
.map_name$ = .@jmpmap$[.@ran];
announce "A rare Treasure Box will be spawned in "+ .map_name$ +".",bc_all|bc_npc;
monster .map_name$,0,0,"Treasure Box Coin",1845,5,"TreasureBoxSummonerCoin::OnCoinBoxKilled";
initnpctimer;
end;
OnTimer1800000: //30min
announce "All treasure in "+ .map_name$ +" are destroyed",bc_all|bc_npc;
killmonster .map_name$,"TreasureBoxSummonerCoin::OnCoinBoxKilled";// TreasureBoxSummonerCoin unknown NPC
stopnpctimer;
end;
OnCoinBoxKilled:
set .boxkills, .boxkills +1;
if (.boxkills > 4) {
announce "All rare Treasure Boxes have been destroyed!", bc_all;
stopnpctimer;
}
else announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
getitem 7539,1; // Change your prize here 7539 Poring Coin
end;
}
here you go, if all boxes are killed, timer stops and an annoucement will be made. Everything works fine on my server. Enjoy and don't forget Capuche helped a lot here