viewing paste poring event | 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
 
-   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;
}
 
 
Viewed 1224 times, submitted by Emistry.