Mabuhay Posted February 7, 2013 Posted February 7, 2013 About this topic from AnnieRuru's, how can i make it fixed players to play. I mean, like it wont need a GM to set players to start/host the event. Perhaps like 5v5 and i like to do the shuffling of players when they join Quote
AnnieRuru Posted February 8, 2013 Posted February 8, 2013 prontera,153,184,5 script bg_pvp_register 100,{ end; OnStart: if ( getwaitingroomstate(0) < .min2start *2 ) end; getmapxy .@map$, .@x, .@y, 1; warpwaitingpc .@map$, .@x, .@y; announce "event started", 0; .red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout" ); .blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout" ); callfunc "rand__", .min2start *2, $@rand; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) setbgid ( .@i %2 )? .red : .blue, $@warpwaitingpc[ $@rand[.@i] ]; delwaitingroom strnpcinfo(0); bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", " Red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", " Blue side wins !", 0; callsub L_reward, .blue; } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; .score[1] = .score[2] = 0; L_waitingroom: waitingroom "BG PVP", .min2start *2 +1, strnpcinfo(0)+"::OnStart", .min2start *2; end; L_reward: getbgusers getarg(0); for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; Onredout: callsub L_out, 2; Onblueout: callsub L_out, 1; L_out: announce strcharinfo(0) +" is out from the match !", 1; bg_leave; warp "SavePoint", 0,0; .score[ getarg(0) ]++; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start ) awake strnpcinfo(0); end; OnInit: .min2start = 1; // how many players in a team needed to start a battleground. IF set this to 3, means 6 players needed to start (3 players * 2 teams) .eventlasting = 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins goto L_waitingroom; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall source modification and shuffling algorithm already provided in that topic Quote
Question
Mabuhay
About this topic from AnnieRuru's, how can i make it fixed players to play. I mean, like it wont need a GM to set players to start/host the event. Perhaps like 5v5 and i like to do the shuffling of players when they join
1 answer 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.