- script PoringEvent -1,{
// every 2 hours
OnMinute30:
if( gettime(3) % 2 == 0 && !.status ){
.status = 1;
for( .@i = 0; .@i < .map_size; .@i++ ){
killmonster .map$[.@i],.npc_name$+"::OnPoringDead";
monster .map$[.@i],0,0,"Poring",1002,.poring_amount,.npc_name$+"::OnPoringDead";
}
announce "Five special Porings have spawned in each Town ( "+implode( .map$"," )+" )!",0;
sleep ( .duration * 60000 );
for( .@i = 0; .@i < .map_size; .@i++ )
killmonster .map$[.@i],.npc_name$+"::OnPoringDead";
.status = 0;
}
end;
// kill poring get reward
OnPoringDead:
announce strcharinfo(0)+" has killed the Poring! Left "+mobcount( strcharinfo(3),.npc_name$+"::OnPoringDead" )+" Poring in this town",0;
getitem 6153,30;
end;
OnInit:
// how many poring each map
.poring_amount = 5;
// event last how long ?
.duration = 30;
// map list
setarray .map$,
"prontera",
"morocc",
"payon";
.map_size = getarraysize( .map$ );
.npc_name$ = strnpcinfo(0);
end;
}