Hello Hercules master scripters, Help me with this script, I found out that if players died in same time, meaning no one survived. but the script keeps summoning monster.. How or where can I add this :
if ( getmapusers( "quiz_01" ) < 1 ) {announce "Event RUN and SURVIVE DRAW.. NO one survive LOL!!",0,0x00FF00;
or any other idea? please do help me.. thank you! Here's the script..
izlude,125,139,5 script Run Or Die 4_M_NOFEARGUY,{ 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$, 42,285; .register_aid[.register_count] = getcharid(3); .register_count++; end;OnCommand:// put all your start timer hereOnClock1047:OnClock1055: if (.start) end; announce "Run or Die event registration start", bc_all; enablenpc("Run Or Die"); .start = 1; for (.@c = 3; .@c > 0; .@c--) { announce "Run or Die event registration is open in "+.@c+" minute", bc_all; sleep 60000; } announce "Run or Die event registration close", bc_all; disablenpc("Run Or Die"); .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 (.register_count > 1) { monster .map$, 30,285, "Come On Baby!!!", 1904, 5 + rand(5), "", 0; monster .map$, 52,285, "Come On Baby!!!", 1904, 5 + rand(5), "", 1; monster .map$, 42,285, "Come On Baby!!!", 1904, 5 + rand(5), "", 2; sleep 5000; } killmonsterall .map$; end;OnPCDieEvent:OnPCLogoutEvent: if ( !.start || strcharinfo(3) != .map$ ) end; while (.@i < .register_count && .register_aid[.@i] != getcharid(3)) .@i++; if ( .@i == .register_count ) end; deletearray .register_aid[.@i], 1; .register_count--; warp "SavePoint", 0,0; if ( !.start || .register_count > 1 ) end; 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: disablenpc("Run Or Die");// waitingroom "Run or Die",0; .map$ = "quiz_01"; .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 = 615; // reward item id .reward_item_amount = 1; // reward item amount to the sole winner bindatcmd "runordie", strnpcinfo(0)+"::OnCommand", 99,99; end;}
Hello Hercules master scripters,
Help me with this script, I found out that if players died in same time, meaning no one survived. but the script keeps summoning monster..
How or where can I add this :
or any other idea? please do help me.. thank you!
Here's the script..
Share this post
Link to post
Share on other sites