viewing paste npc mob spawn 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
 
-       script  Sample  -1,{
OnInit:
// event hour
set .minute,120;
// map list
setarray .map$,"prontera","izlude","geffen";
 
set .map_size,getarraysize( .map$ );
set .npc_name$,strnpcinfo(0);
 
OnClock0000:
OnClock1200:
if( !.status ){
        set .status,1;
        announce "Happy Hours - "+.minute+" minutes ",bc_all;
        for( set .@i,0; .@i < .map_size; set .@i,.@i + 1 )
                monster .map$[.@i],0,0,"--ja--",1002,10,.npc_name$+"::OnMobDied";
               
        sleep ( .minute * 60000 );
        set .status,0;
        announce "Happy Hours - END",bc_all;
        for( set .@i,0; .@i < .map_size; set .@i,.@i + 1 )
                killmonster .map$[.@i],.npc_name$+"::OnMobDied";
}
 
OnMobDied:
        if( .status ){
                if( rand(100) )< 10 ){
                        getitem 512,100;
                }
        }
        end;
}
Viewed 581 times, submitted by Emistry.