Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script poring_event -1,{
- OnInit:
- .duration = 30;
- setarray .normal_poring,1002,100;
- setarray .special_poring,1002,100;
- setarray .map$,
- "xmas",
- "payon",
- "geffen";
- .map_size = getarraysize( .map$ );
- .npc_name$ = strnpcinfo(0);
- end;
- OnClock0000:
- OnClock0400:
- OnClock0800:
- OnClock1200:
- OnClock1600:
- OnClock2000:
- OnStart:
- if( !.status ){
- .status = 1;
- .index = rand( .map_size );
- for( .@i = 3; .@i > 0; .@i-- ){
- announce "Poring Event start in "+.@i+" minutes. ... please gather at "+.map$[.index]+" ...",0;
- sleep 60000;
- }
- killmonster .map$[.index],"All";
- setmapflag .map$[.index],mf_noskill;
- setmapflag .map$[.index],mf_nomobloot;
- setmapflag .map$[.index],mf_nomvploot;
- .@user = getmapusers( .map$[.index] );
- if( .@user >= 20 ){
- .@total_poring += (( .@user / 20 ) * 100 );
- .@total_poring2 += (( .@user / 20 ) * 100 );
- }
- .@total_poring += .special_poring[1];
- .@total_poring2 += .normal_poring[1];
- .random_amount = 2; // 2 poring drop OBB
- .special_amount = .@total_poring; // special poring amount
- monster .map$[.index],0,0,"--ja--",.normal_poring[0],.@total_poring2,.npc_name$+"::OnNormalKill";
- monster .map$[.index],0,0,"--ja--",.special_poring[0],.random_amount,.npc_name$+"::OnRandomKill";
- monster .map$[.index],0,0,"--ja--",.special_poring[0],.special_amount,.npc_name$+"::OnSpecialKill";
- announce "Poring Event started at "+.map$[.index]+" , eliminate all "+.@total_poring+" Special Poring to gain price.",0;
- sleep ( .duration * 30000 );
- if( .special_poring ){
- mapannounce .map$[.index],"Time's up, all poring has been cleared. Please try again next time.",0;
- }
- killmonster .map$[.index],"All";
- removemapflag .map$[.index],mf_noskill;
- removemapflag .map$[.index],mf_nomobloot;
- removemapflag .map$[.index],mf_nomvploot;
- .status = 0;
- sleep 5000;
- mapwarp .map$[.index],"prontera",155,181;
- }
- end;
- OnNormalKill:
- dispbottom "Wew...I'm not the Special Poring.";
- end;
- OnRandomKill:
- .random_amount--;
- getitem 603,1;
- dispbottom "Gained a "+getitemname( 603 )+" by killing a Random Special Poring. Left "+.random_amount+" Random Special Poring";
- mapannounce .map$[.index],"Special Poring Left : "+.special_amount+" | Random Special Poring : "+.random_amount,0;
- end;
- OnSpecialKill:
- set #PoringPoint,#PoringPoint+1;
- dispbottom "You got 1 Poring Point . Total Poring Points:"+#PoringPoint;
- .special_amount--;
- if( .special_amount ){
- getitem 675,1;
- dispbottom "Gained a "+getitemname( 675 )+" by killing a Special Poring.";
- mapannounce .map$[.index],"Special Poring Left : "+.special_amount+" | Random Special Poring : "+.random_amount,0;
- }else{
- getitem 671,1;
- dispbottom "Gained a "+getitemname( 671 )+" by killing the LAST Special Poring.";
- awake .npc_name$;
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment