This is an automated event "Run or Die" event, I think there is something wrong with the script, whenever the last winner won, the prize goes to the 2nd players, whats wrong with the script, can anyone check it our for me please, hope there is pro scripter who can help me fix the script. Thank you.
prontera,150,138,5 script Run Or Die 461,{
if ( !.start ) {
mes "no event atm";
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;
warp .map$, 0,0;
.register_aid[ .register_count ] = getcharid(3);
.register_count+++;
end;
OnCommand:
OnClock1230: // put all your start timer here
OnClock1430:
OnClock1630:
OnClock1830:
if ( .start ) end;
announce "Run or Die event registration start", bc_all;
.start = 1;
sleep 50000; // registration timer here
announce "Run or Die event registration close", bc_all;
.start = 2;
sleep 3000;
mapannounce .map$, "Survive as long as you can !", bc_map;
if ( .register_count < .register_min ) {
announce "Not enough participants for Run or Die event", 0;
getmapxy .@map$, .@x, .@y, 1;
mapwarp .map$, .@map$, .@x, .@y;
goto L_reset;
}
while ( .start == 2 ) {
monster .map$, 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 0;
monster .map$, 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 1;
monster .map$, 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 2;
sleep 5000;
}
end;
OnPCDieEvent:
OnPCLogoutEvent:
if ( !.start || strcharinfo(3) != .map$ ) end;
while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++;
if ( .@i == .register_count ) end;
deletearray .register_aid[.@i], 1;
.register_count--;
warp "SavePoint", 0,0;
if ( .register_count > 1 ) end;
killmonsterall .map$;
announce "Congratulations ~ the winner of Run Or Die event got 3 TCG Card. - "+ rid2name( .register_aid ), bc_all;
getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize
warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) );
L_reset:
deletearray .register_aid;
.start = .register_count = 0;
end;
OnInit:
.map$ = "guild_vs5";
.register_min = 1; // 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 = 7227; // reward item id
.reward_item_amount = 3; // reward item amount to the sole winner
bindatcmd "runordie", strnpcinfo(0)+"::OnCommand", 99,99;
end;
}
guild_vs5 mapflag nosave SavePoint
guild_vs5 mapflag nowarp
guild_vs5 mapflag nowarpto
guild_vs5 mapflag noteleport
guild_vs5 mapflag nomemo
guild_vs5 mapflag nopenalty
guild_vs5 mapflag noicewall
//guild_vs5 mapflag nobranch
Question
fallen0519
This is an automated event "Run or Die" event, I think there is something wrong with the script, whenever the last winner won, the prize goes to the 2nd players, whats wrong with the script, can anyone check it our for me please, hope there is pro scripter who can help me fix the script. Thank you.
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.