brunoshp Posted February 8, 2013 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Share Posted February 8, 2013 (edited) in this script : prontera,156,185,5 script kjdhfkdjsf 100,{ mes "wanna sign up"; if ( select( "yes", "no" ) == 2 ) close; else if ( .signup_count == 128 ) { mes "Sorry the whole queue is full"; close; } while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) set .@i, .@i +1; if ( .@i < .signup_count ) { mes "you have already sign up in this event"; close; } set .signup_aid[ .signup_count ], getcharid(3); set .signup_count, .signup_count +1; mes "You are now signed to the BG event"; // set .@i, 0; // DEBUG // while ( .signup_aid[.@i] ) { // set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] ); // set .@i, .@i +1; // } // mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$; close2; L_start: if ( .signup_count < .min2start ) end; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) { if ( attachrid( .signup_aid[.@i] ) ) { if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } else { deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } if ( .start || .signup_count < .min2start ) end; announce "event started", 0; set .start, 1; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i]; deletearray .signup_aid, .min2start; set .signup_count, .signup_count - .min2start; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .start == 1 ) { 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_kickall .red; bg_kickall .blue; set .start, 0; deletearray .score; goto L_start; L_reward: getbgusers getarg(0); for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) 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; set .score[ getarg(0) ], .score[ getarg(0) ] +1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start /2 ) awake strnpcinfo(0); end; OnInit: set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins set .min2start, 2; // minimum player to start set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout" ); set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout" ); end; } 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 I need to make only end round when red or blue team have 3 points. and add OnPCLogoutEvent. Edited February 8, 2013 by AnnieRuru use [codebox] if the script > 10 lines, and move to script request Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 8, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 8, 2013 prontera,156,185,5 script kjdhfkdjsf 100,{ mes "wanna sign up"; if ( select( "yes", "no" ) == 2 ) close; else if ( .signup_count == 128 ) { mes "Sorry the whole queue is full"; close; } while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) set .@i, .@i +1; if ( .@i < .signup_count ) { mes "you have already sign up in this event"; close; } set .signup_aid[ .signup_count ], getcharid(3); set .signup_count, .signup_count +1; mes "You are now signed to the BG event"; // set .@i, 0; // DEBUG // while ( .signup_aid[.@i] ) { // set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] ); // set .@i, .@i +1; // } // mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$; close2; L_start: if ( .signup_count < .min2start ) end; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) { if ( attachrid( .signup_aid[.@i] ) ) { if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } else { deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } if ( .start || .signup_count < .min2start ) end; announce "event started", 0; set .start, 1; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i]; deletearray .signup_aid, .min2start; set .signup_count, .signup_count - .min2start; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; cleararray .score[1], .startingscore, 2; bg_updatescore "guild_vs3", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .start == 1 ) { 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_kickall .red; bg_kickall .blue; set .start, 0; deletearray .score; goto L_start; L_reward: getbgusers getarg(0); for ( set .@i, 0; .@i < $@arenamembersnum; set .@i, .@i +1 ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( !.score[ getarg(0) ] ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0 ) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; OnInit: set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins set .min2start, 2; // minimum player to start set .startingscore, 3; // score at start set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" ); set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" ); end; } 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 1 Quote Link to comment Share on other sites More sharing options...
brunoshp Posted February 8, 2013 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Author Share Posted February 8, 2013 (edited) the OnPCLogoutEvent is out arena! is waiting in queue. When player dead , the player return arena not prontera! thz for all! Edited February 8, 2013 by brunoshp Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 9, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 9, 2013 (edited) OnPCLogoutEvent is out arena! is waiting in queue.my script should have check them with *attachrid command ( if attachrid ... else {here} )if they are log out, the next time player register, the attachrid condition will unqueue them When player dead , the player return arena not prontera!yes ... in fact this how how my bg_pvp script looks like if you search bg_pvp around this forumthe team need to kill the opponent team the amount of points to win, and if they respawn to the amount of starting value, that team lost Edited February 10, 2013 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
brunoshp Posted February 9, 2013 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Author Share Posted February 9, 2013 (edited) or it is possible to make point without killing? Solved Edited February 10, 2013 by brunoshp 1 Quote Link to comment Share on other sites More sharing options...
Yoona Posted September 14, 2013 Group: Members Topic Count: 153 Topics Per Day: 0.03 Content Count: 567 Reputation: 18 Joined: 04/15/13 Last Seen: April 21, 2016 Share Posted September 14, 2013 prontera,156,185,5 script kjdhfkdjsf 100,{ mes "wanna sign up"; if ( select( "yes", "no" ) == 2 ) close; else if ( .signup_count == 128 ) { mes "Sorry the whole queue is full"; close; } while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) set .@i, .@i +1; if ( .@i < .signup_count ) { mes "you have already sign up in this event"; close; } set .signup_aid[ .signup_count ], getcharid(3); set .signup_count, .signup_count +1; mes "You are now signed to the BG event"; // set .@i, 0; // DEBUG // while ( .signup_aid[.@i] ) { // set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] ); // set .@i, .@i +1; // } // mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$; close2; L_start: if ( .signup_count < .min2start ) end; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) { if ( attachrid( .signup_aid[.@i] ) ) { if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } else { deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } if ( .start || .signup_count < .min2start ) end; announce "event started", 0; set .start, 1; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i]; deletearray .signup_aid, .min2start; set .signup_count, .signup_count - .min2start; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; cleararray .score[1], .startingscore, 2; bg_updatescore "guild_vs3", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .start == 1 ) { 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_kickall .red; bg_kickall .blue; set .start, 0; deletearray .score; goto L_start; L_reward: getbgusers getarg(0); for ( set .@i, 0; .@i < $@arenamembersnum; set .@i, .@i +1 ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( !.score[ getarg(0) ] ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0 ) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; OnInit: set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins set .min2start, 2; // minimum player to start set .startingscore, 3; // score at start set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" ); set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" ); end; } 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 Annie? i tried your script and error at line 87. Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 16, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted September 16, 2013 You must apply the patch from http://rathena.org/board/topic/72571-battleground-system-without-waitingroom/?hl=setbgid Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted August 28, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted August 28, 2014 [paste=qzoynvnjiwh] just kinda wants to update this script using newer techniques Quote Link to comment Share on other sites More sharing options...
brunoshp Posted October 25, 2014 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Author Share Posted October 25, 2014 When player dead he go to prontera. IT HAS to go the Place Which pair appeared on the map . Quote Link to comment Share on other sites More sharing options...
Radian Posted October 25, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted October 25, 2014 When player dead he go to prontera. IT HAS to go the Place Which pair appeared on the map . can you show the script you are using? Quote Link to comment Share on other sites More sharing options...
brunoshp Posted October 26, 2014 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Author Share Posted October 26, 2014 (edited) i fixed Thz. Edited October 26, 2014 by brunoshp Quote Link to comment Share on other sites More sharing options...
Question
brunoshp
in this script :
I need to make only end round when red or blue team have 3 points.
and add OnPCLogoutEvent.
Edited by AnnieRuruuse [codebox] if the script > 10 lines, and move to script request
Link to comment
Share on other sites
10 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.