Jump to content
  • 0
Sign in to follow this  
Takumirai

Run or Die by AnnieRuru

Question

 

prontera,146,231,5 script Run Or Die 100,{
if ( !.start ) {
mes "Check Schedule NPC, Event is Offline.";
close;
}
if ( .start == 2 ) {
mes "Event in Progress..";
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:
// put all your start timer here
OnClock0500:
OnClock1100:
OnClock1700:
OnClock2300:
if ( .start ) end;
announce "Run or Die event registration start", bc_all;
.start = 1;
sleep 10000; // 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 is "+ 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:
     waitingroom "Run or Die",0;
.map$ = "poring_w01";
.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 = 30802; // reward item id
.reward_item_amount = 1; // reward item amount to the sole winner
bindatcmd "runordie", strnpcinfo(0)+"::OnCommand", 99,99;
end;
}
poring_w01 mapflag nosave SavePoint
poring_w01 mapflag nowarp
poring_w01 mapflag nowarpto
poring_w01 mapflag noteleport
poring_w01 mapflag nomemo
poring_w01 mapflag nopenalty
poring_w01 mapflag noicewall
poring_w01 mapflag nobranch
poring_w01 mapflag noskill

 

- The problem is when the NPC Announce 

announce "Run or Die event registration start", bc_all;

- It will Announce 

announce "Run or Die event registration close", bc_all;

 

- Even if not yet 2 sec. or 3sec it close the registration, i want it 3 minutes registration before closing

 

announce "Run or Die event registration is open in 3 minute", bc_all;

announce "Run or Die event registration is open in 2 minute", bc_all;

announce "Run or Die event registration is open in 1 minute", bc_all;

then 

announce "Run or Die event registration close", bc_all;

 

 

- Thanks in advance.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.