Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pay_arche,83,71,4 script Poring Summoner Event 871,{
- function summon_monster;
- if ( .status ) {
- mes "The Poring Event has begun!";
- mes "Location: " + .map$;
- .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
- .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
- mes "Special Monsters: " + .@mob_special;
- mes "Normal Monsters: " + .@mob_normal;
- mes " ";
- if ( select( "Warp me there.","Cancel" ) == 1 ) {
- warp .map$,0,0;
- close;
- }
- }
- if ( getgmlevel() >= .gm_level && .gm_level ) {
- do {
- mes "^FF0000You accessing GM Menu!^000000";
- switch ( select(
- ( .status )?"Stop Event":"Start Event",
- ( .status )?"":"Reward ^777777["+getitemname( .item_id )+" x "+.item_amount+"]^000000",
- ( .status )?"":"Duration ^777777["+.minute+" minutes]^000000",
- "Cancel"
- )) {
- case 1:
- setarray .@label$,"OnEventStart","OnEventEnd";
- mes "Applying changes ... ";
- close2;
- donpcevent .npc_name$+"::"+.@label$[.status];
- end;
- case 2:
- mes "Enter Item ID:";
- do {
- input .@item_id,0,32767;
- if ( !.@item_id ) break;
- } while ( getitemname( .@item_id ) == "null" );
- mes "Enter amount: ( "+getitemname( .@item_id )+" )";
- input .@amount,0,30000;
- if ( .@amount ) {
- mes " ";
- mes "New Reward: "+.@amount+" x "+getitemname( .@item_id );
- if ( select( "Confirm","Cancel" ) == 1 ) {
- .item_id = .@item_id;
- .item_amount = .@amount;
- }
- }
- break;
- case 3:
- mes "Enter duration (minute):";
- input .minute,0,120;
- break;
- default: break;
- }
- next;
- } while ( @menu != 4 );
- }
- else {
- mes "No event right now.";
- }
- close;
- OnInit:
- // gm level
- .gm_level = 99;
- // default setting
- .item_id = 512;
- .item_amount = 1;
- .minute = 45;
- .npc_name$ = strnpcinfo(0);
- end;
- // OnMinute00:
- OnEventStart:
- if ( !.status ) {
- if ( summon_monster() ) {
- .status = 1;
- .current_time = ( .minute * 60 );
- // sleep 5000;
- announce "The Poring Event has begun!",bc_all;
- announce "Location: " + .map$,bc_all;
- .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
- .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
- announce "Special Monsters: " + .@mob_normal,bc_all;
- announce "Normal Monsters: " + .@mob_special,bc_all;
- initnpctimer;
- }
- }
- end;
- OnTimer1000:
- .current_time--;
- .@hour = ( .current_time / 3600 );
- .@minute = ( .current_time % 3600 / 60 );
- .@second = ( .current_time % 3600 % 60 );
- mapannounce .map$,"Time left: "+.current_time+" - "+sprintf( "%02d:%02d:%02d",.@hour,.@minute,.@second ),bc_map;
- if ( .current_time >= 1 ) {
- initnpctimer;
- }
- else {
- donpcevent .npc_name$+"::OnEventEnd";
- }
- end;
- OnSpecial:
- getitem .item_id,.item_amount;
- OnNormal:
- .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
- .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
- mapannounce .map$,"Special - "+.@mob_special+" , Normal - "+.@mob_normal+" !!",bc_map;
- if ( .@mob_special ) end;
- OnEventEnd:
- .status = 0;
- killmonster .map$,"All";
- sleep 5000;
- mapannounce .map$,"Event End.",bc_all;
- stopnpctimer;
- end;
- function summon_monster {
- .@weekday = gettime(4);
- switch( .@weekday ) {
- case 0: // Sunday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 1: // Monday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 2: // Tuesday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 3: // Wednesday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 4: // Thursday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 5: // Friday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- case 6: // Saturday
- .map$ = "que_dance";
- setarray .@mob_list,
- 1002,10, // special mob x 10
- 1002,100; // normal mob x 100
- break;
- }
- .@mob_list_size = getarraysize( .@mob_list ) - 1;
- if ( .@mob_list_size < 1 ) return 0;
- monster .map$,0,0,"--ja--",.@mob_list[0],.@mob_list[1],.npc_name$+"::OnSpecial";
- .@i = 2;
- while ( .@i < .@mob_list_size ) {
- monster .map$,0,0,"--ja--",.@mob_list[.@i],.@mob_list[.@i+1],.npc_name$+"::OnNormal";
- .@i += 2;
- }
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement