Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,146,165,6 script Lucky Drop Event 732,{
- mes "Event Information ";
- mes "Status : ^"+( ( .status )?"0055FFON":"FF0000OFF" )+"^000000";
- if( .status ){
- mes "Monster Left : ^FF0000"+.poring_count+" / ^777777"+$poring_max+"^000000";
- if( .status == 1 )
- if( select( "ENTER EVENT","Close" ) == 1 )
- warp .map$,100,100;
- }
- if( getgmlevel() >= .gm_level ){
- do{
- next;
- switch( select( "Monster Per Round [ ^777777"+$poring_max+"^000000 ]",
- "Monster who drop reward [ ^777777"+$poring_count+"^000000 ]",
- "Reward - ^777777"+$poring_reward_amount+" x "+getitemname( $poring_reward_id )+"^000000",
- ( .status )?"":"START EVENT",
- ( !.status )?"":"END EVENT" )){
- Case 1:
- mes "How many Monster per Round ?";
- mes "^7777771 ~ 200^000000";
- input $poring_max,1,200;
- mes "Updated to : "+$poring_max+" per round.";
- break;
- Case 2:
- mes "How many Monster drop ^777777"+$poring_reward_amount+" x "+getitemname( $poring_reward_id )+"^000000 per round ?";
- mes "^7777771 ~ "+$poring_max+"^000000";
- input $poring_count,1,$poring_max;
- mes "Updated to : "+$poring_count+" per round.";
- break;
- Case 3:
- mes "Enter Item ID";
- do{
- input .@item,0,32767;
- if( !.@item ) break;
- }while( getitemname( .@item ) == "null" );
- if( .@item ){
- mes "Enter amount";
- input .@amount,0,30000;
- if( .@amount ){
- mes "Reward : ^777777"+.@amount+" x "+getitemname( .@item )+"^000000";
- if( select( "Confirm","Close" ) ){
- mes "Updated reward.";
- set $poring_reward_id,.@item;
- set $poring_reward_amount,.@amount;
- }
- }
- }
- break;
- Case 4:
- if( .status == 2 ){
- mes "Event already running...";
- }else{
- mes "Event will start now.";
- donpcevent strnpcinfo(0)+"::OnEventStart";
- }
- break;
- Case 5:
- if( .status != 2 ){
- mes "Event isnt running yet...";
- }else{
- mes "Event will end now.";
- donpcevent strnpcinfo(0)+"::OnEventEnd";
- }
- default: break;
- }
- }while( select( "Continue","Close" ) == 1 );
- }
- close;
- OnInit:
- set .gm_level,90;
- set .map$,"poring_w01";
- set .max_duration,60;
- // poring family list
- setarray .poring_list,1002,1031,1113,1242,1613,1894;
- set .poring_list_size,getarraysize( .poring_list );
- setarray .poring_rules$,
- "This is Poring Game.",
- "Find the Correct Poring and kill it.",
- "Who killed correct poring can get reward.",
- "Thank and good luck.";
- set .poring_rules_size,getarraysize( .poring_rules$ );
- setarray .mapflag,
- mf_noteleport,
- mf_nosave,
- mf_nobranch,
- mf_noskill,
- mf_nowarp,
- mf_noicewall,
- mf_nomobloot,
- mf_nomvploot,
- mf_noreturn,
- mf_nowarpto;
- set .mapflag_size,getarraysize( .mapflag );
- for( set .@i,0; .@i < .mapflag_size; set .@i,.@i + 1 )
- setmapflag .map$,.mapflag[.@i];
- end;
- // OnMinute00: // start every hour.
- OnEventStart:
- if( !$poring_max || !$poring_count ) end;
- set .status,1;
- killmonster .map$,"All";
- for( set .@i,3; .@i > 0; set .@i,.@i - 1 ){
- announce "Poring Event start within "+.@i+" minutes.",0;
- sleep 6000;
- }
- for( set .@i,0; .@i < .poring_rules_size; set .@i,.@i + 1 ){
- mapannounce .map$,"Poring Event : "+.poring_rules$[.@i],0;
- sleep 3000;
- }
- mapannounce .map$,"Poring Event STARTED",0;
- set .status,2;
- set .poring_count,$poring_count;
- for( set .@i,0; .@i < $poring_max; set .@i,.@i + 1 )
- monster .map$,0,0,"PORING",.poring_list[ rand(.poring_list_size) ],1,strnpcinfo(0)+ ( ( .@i > $poring_count )?"::OnWrongKill":"::OnCorrectKill" );
- sleep ( .max_duration * 60000 );
- mapannounce .map$,"Poring Event END",0;
- killmonster .map$,"All";
- sleep 3000;
- mapwarp .map$,"prontera",155,181;
- set .status,0;
- end;
- OnEventEnd:
- awake strnpcinfo(0);
- end;
- OnWrongKill:
- monster .map$,0,0,"PORING",.poring_list[ rand(.poring_list_size) ],1,strnpcinfo(0)+"::OnWrongKill";
- end;
- OnCorrectKill:
- if( $poring_reward_amount )
- getitem $poring_reward_id,$poring_reward_amount;
- set .poring_count,.poring_count - 1;
- if( .poring_count < 1 ){
- awake strnpcinfo(0);
- }else{
- mapannounce .map$,strcharinfo(0)+" found 1....left "+.poring_count+" Poring.",0;
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment