Hello sir, I have problem with Last Man Standing Script. 5 player enter event but the lost player receive the reward and the win player don't get the reward and remain inside last man standing map.Sometime this problem not happen.Hope can help me solve this problem.Thank You.
prontera,196,163,3 script Last Man Standing 100,{
if ( !.start ) {
mes "Event Last Man Standing.";
mes "Time: 4.30 PM";
mes "Time: 8.15 PM";
close;
}
if ( .start == 2 ) {
mes "event is running";
close;
}
if ( .register_count >= .register_limit ) {
mes "this event has reach the maximum player participations";
close;
}
percentheal 100,100;
announce ""+ strcharinfo(0) +" Has Entered Last Man Standing Event !",bc_all | bc_blue; //announce and end
warp "pvp_n_3-5", 0,0;
.register_aid[ .register_count ] = getcharid(3);
.register_count+++;
end;
OnWhisperGlobal:
if ( getgmlevel() < 60 ) end;
OnClock1630: // put all your start timer here 4.30PM
OnClock2215: // put all your start timer here 8.15PM
//OnMinute00:
if ( .start == 2 )
callsub L_resetmap;
else if ( .start == 1 )
end;
announce "Last Man Standing event registration start in 4 minute", bc_all | bc_blue;
.start = 1;
sleep 60000; // registration timer here
announce "Last Man Standing NPC Event start near poring catcher in 3 minute", bc_all | bc_blue;
sleep 60000; // registration timer here
announce "Last Man Standing NPC Event start near poring catcher in 2 minute", bc_all | bc_blue;
sleep 60000; // registration timer here
announce "Last Man Standing NPC Event start near poring catcher in 1 minute", bc_all | bc_blue;
sleep 30000; // registration timer here
announce "Last Man Standing NPC Event start near poring catcher in 30 seconds", bc_all | bc_blue;
sleep 30000; // registration timer here
announce "last Man Standing event registration close", bc_all | bc_blue;
.start = 2;
mapannounce "pvp_n_3-5", "Get ready the battle will start in 30 seconds, show NO MERCY", 0;
sleep 30000;
mapannounce "pvp_n_3-5", "THIS IS SPARTA !!!!!", 0;
if ( .register_count < .register_min ) {
announce "not enough participants for LMS event", 0;
mapwarp "pvp_n_3-5", .map$, .x, .y;
callsub L_resetmap;
end;
}
pvpon "pvp_n_3-5";
end;
OnPCDieEvent:
OnPCLogoutEvent:
if ( .start != 2 || strcharinfo(3) != "pvp_n_3-5" ) end;
while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++;
deletearray .register_aid[.@i], 1;
.register_count--;
warp "SavePoint", 0,0;
if ( .register_count > 1 ) end;
killmonsterall "pvp_n_3-5";
announce "congratulations ~ the winner of Last Man Standing event is "+ rid2name( .register_aid ), bc_all | bc_blue;
getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize
warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) );
callsub L_reset;
end;
L_resetmap:
mapwarp "pvp_n_3-5", .map$, .x, .y;
L_reset:
.start = 0;
deletearray .register_aid;
.register_count = 0;
pvpoff "pvp_n_3-5";
return;
OnTimer1000:
delwaitingroom;
waitingroom getmapusers("pvp_n_3-5")+" player has enter..",0;
initnpctimer;
end;
OnInit:
getmapxy .map$, .x, .y, 1;
.register_min = 2; // minimum amount of players to start this event, or else it auto-abort
.register_limit = 100; // maximum amount of players able to participate in this event
.reward_item_id = 7539;
.reward_item_amount = 1;
initnpctimer;
end;
}
pvp_n_3-5 mapflag nosave SavePoint
pvp_n_3-5 mapflag nowarp
pvp_n_3-5 mapflag nowarpto
pvp_n_3-5 mapflag noteleport
pvp_n_3-5 mapflag nomemo
pvp_n_3-5 mapflag nopenalty
//pvp_n_3-5 mapflag nobranch
pvp_n_3-5 mapflag noicewall
pvp_n_3-5 mapflag pvp_noparty
pvp_n_3-5 mapflag pvp_noguild
Question
khoi
Hello sir, I have problem with Last Man Standing Script. 5 player enter event but the lost player receive the reward and the win player don't get the reward and remain inside last man standing map.Sometime this problem not happen.Hope can help me solve this problem.Thank You.
prontera,196,163,3 script Last Man Standing 100,{ if ( !.start ) { mes "Event Last Man Standing."; mes "Time: 4.30 PM"; mes "Time: 8.15 PM"; close; } if ( .start == 2 ) { mes "event is running"; close; } if ( .register_count >= .register_limit ) { mes "this event has reach the maximum player participations"; close; } percentheal 100,100; announce ""+ strcharinfo(0) +" Has Entered Last Man Standing Event !",bc_all | bc_blue; //announce and end warp "pvp_n_3-5", 0,0; .register_aid[ .register_count ] = getcharid(3); .register_count+++; end; OnWhisperGlobal: if ( getgmlevel() < 60 ) end; OnClock1630: // put all your start timer here 4.30PM OnClock2215: // put all your start timer here 8.15PM //OnMinute00: if ( .start == 2 ) callsub L_resetmap; else if ( .start == 1 ) end; announce "Last Man Standing event registration start in 4 minute", bc_all | bc_blue; .start = 1; sleep 60000; // registration timer here announce "Last Man Standing NPC Event start near poring catcher in 3 minute", bc_all | bc_blue; sleep 60000; // registration timer here announce "Last Man Standing NPC Event start near poring catcher in 2 minute", bc_all | bc_blue; sleep 60000; // registration timer here announce "Last Man Standing NPC Event start near poring catcher in 1 minute", bc_all | bc_blue; sleep 30000; // registration timer here announce "Last Man Standing NPC Event start near poring catcher in 30 seconds", bc_all | bc_blue; sleep 30000; // registration timer here announce "last Man Standing event registration close", bc_all | bc_blue; .start = 2; mapannounce "pvp_n_3-5", "Get ready the battle will start in 30 seconds, show NO MERCY", 0; sleep 30000; mapannounce "pvp_n_3-5", "THIS IS SPARTA !!!!!", 0; if ( .register_count < .register_min ) { announce "not enough participants for LMS event", 0; mapwarp "pvp_n_3-5", .map$, .x, .y; callsub L_resetmap; end; } pvpon "pvp_n_3-5"; end; OnPCDieEvent: OnPCLogoutEvent: if ( .start != 2 || strcharinfo(3) != "pvp_n_3-5" ) end; while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++; deletearray .register_aid[.@i], 1; .register_count--; warp "SavePoint", 0,0; if ( .register_count > 1 ) end; killmonsterall "pvp_n_3-5"; announce "congratulations ~ the winner of Last Man Standing event is "+ rid2name( .register_aid ), bc_all | bc_blue; getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) ); callsub L_reset; end; L_resetmap: mapwarp "pvp_n_3-5", .map$, .x, .y; L_reset: .start = 0; deletearray .register_aid; .register_count = 0; pvpoff "pvp_n_3-5"; return; OnTimer1000: delwaitingroom; waitingroom getmapusers("pvp_n_3-5")+" player has enter..",0; initnpctimer; end; OnInit: getmapxy .map$, .x, .y, 1; .register_min = 2; // minimum amount of players to start this event, or else it auto-abort .register_limit = 100; // maximum amount of players able to participate in this event .reward_item_id = 7539; .reward_item_amount = 1; initnpctimer; end; } pvp_n_3-5 mapflag nosave SavePoint pvp_n_3-5 mapflag nowarp pvp_n_3-5 mapflag nowarpto pvp_n_3-5 mapflag noteleport pvp_n_3-5 mapflag nomemo pvp_n_3-5 mapflag nopenalty //pvp_n_3-5 mapflag nobranch pvp_n_3-5 mapflag noicewall pvp_n_3-5 mapflag pvp_noparty pvp_n_3-5 mapflag pvp_noguild
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.