celeron0134 Posted March 14, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Share Posted March 14, 2020 (edited) //===== rAthena Script ======================================= //= Battleground: PVP //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A simple battleground script: //= Kill players from the other team. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //= 1.1 Use up to date battleground script commands [AnnieRuru] //============================================================ - script bg_pvp#control -1,{ OnInit: .minplayer2start = 1; // minimum players to start (ex. if 3vs3, set to 3) .eventlasting = 20*60; // event duration before auto-reset (20 minutes * seconds) setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... 501, 10; end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; // create Battleground and teams .red = waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); .blue = waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; .red_score = .blue_score = .minplayer2start; bg_updatescore "guild_vs3", .red_score, .blue_score; // match duration sleep .eventlasting * 1000; // end match, destroy Battleground, reset NPCs if ( .red_score > .blue_score ) { mapannounce "guild_vs3", "- Red Team is victorious! -", bc_map; callsub L_Reward, .red; } else if ( .blue_score > .red_score ) { mapannounce "guild_vs3", "- Blue Team is victorious! -", bc_map; callsub L_Reward, .blue; } else mapannounce "guild_vs3", "- The match has ended in a draw! -", bc_map; bg_warp .red, "turbo_room",69,98; bg_warp .blue, "turbo_room",69,95; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; end; L_Reward: bg_get_data getarg(0), 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem .rewarditem[0], .rewarditem[1], $@arenamembers[.@i]; return; // "OnDeath" event OnRedDead: callsub LR_Dead, .red_score; OnBlueDead: callsub LB_Dead, .blue_score; LR_Dead: set getarg(0), getarg(0) -1; bg_updatescore "guild_vs3", .red_score, .blue_score; bg_warp .red, "guild_vs3", 13,50; if ( !getarg(0) ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; LB_Dead: set getarg(0), getarg(0) -1; bg_updatescore "guild_vs3", .red_score, .blue_score; bg_warp .blue, "guild_vs3", 86,50; if ( !getarg(0) ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; // "OnQuit" event OnRedQuit: callsub L_Quit, .red_score; OnBlueQuit: callsub L_Quit, .blue_score; L_Quit: set getarg(0), getarg(0) -1; bg_updatescore "guild_vs3", .red_score, .blue_score; percentheal 100, 100; if ( !getarg(0) ) awake strnpcinfo(0); end; } turbo_room,63,98,5 script Red Team#bg_pvp 733,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_pvp#control" ), strnpcinfo(0); OnStart: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); end; } turbo_room,63,95,5 script Blue Team#bg_pvp 734,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_pvp#control" ), strnpcinfo(0); OnStart: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); end; } guild_vs3 mapflag gvg off 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 guild_vs3 mapflag hidemobhpbar hi good day .. kindly help me with this bg script made by @AnnieRuru 1. kill points needed to win - (100points 2 win)- 1 point = 1 kill) 2. id like the player that dies respawn to the map.. (red team - guild_vs3 13 59)(Blue team guild_vs3 86 50) 3. if no team reached 100points on eventlasting.. the highest point wins 4. on event end. warp blue team (turbo_room 68,95) red team (turbo_room 68 98) 5. FakeGuild for Red Team and Blue Team so players can knows who the enemy is.. (with colors of red for red team and blue for blue team) sorry i know it is too much to ask.. but please for those who have a kind heart please help me.. i really need BG scripts thanks Edited March 14, 2020 by celeron0134 Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted March 15, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share Posted March 15, 2020 bump please Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted March 17, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share Posted March 17, 2020 - script bg_pvp_round#control -1,{ OnInit: .minplayer2start = 1; // minimum player to start .winningscore = 2; // how many rounds to win .eventlasting = 20*60; // event last 20 minutes or the system abort itself setarray .rewarditem, 501, 5, // reward to the winning team 501, 1; // reward to the losing team end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) { announce "[ Battle Ground DeathMatch System ] Blue Team : "+ getwaitingroomstate( 0, .bluenpcname$ ) + "/" + .minplayer2start + ". Red Team : "+ getwaitingroomstate( 0, .rednpcname$ ) + "/" + .minplayer2start,bc_all,0x00CED1; end; } announce "[ Battle Ground DeathMatch System ] Battleground has started", bc_all, 0x00CED1; .red = waitingroom2bg( "bat_b01", 61,150, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); copyarray .team1aid, $@arenamembers, $@arenamembersnum; .team1count = .minplayer2start; .blue = waitingroom2bg( "bat_b01", 327,150, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); copyarray .team2aid, $@arenamembers, $@arenamembersnum; .team2count = .minplayer2start; .life[1] = .life[2] = .minplayer2start; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; callsub L_setwall; bg_updatescore "bat_b01", 0, 0; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; sleep 4000 * !.skip; mapannounce "bat_b01", "Kill all opponent team to gain 1 point, score "+ .winningscore +" points to win !", 0; sleep 2000 * !.skip; while (1) { for ( .@i = 5; .@i > 0; .@i-- ) { mapannounce "bat_b01", "["+ .@i +"]", 0; sleep 1000 * !.skip; } if ( .score[1] == .winningscore -1 && .score[2] == .winningscore -1 ) mapannounce "bat_b01", "Final Round start!", 0; else mapannounce "bat_b01", "Round "+ .round++ +" start!", 0; callsub L_delwall; .life[1] = .team1count; .life[2] = .team2count; sleep .eventlasting * 1000 * !.skip; bg_updatescore "bat_b01", .score[1], .score[2]; if ( .score[1] == .winningscore || .score[2] == .winningscore || !.winside ) break; sleep 5000 * !.skip; callsub L_make_player_move; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; callsub L_setwall; sleep 1000 * !.skip; .winside = 0; } if ( .winside ) { mapannounce "bat_b01", " "+ ( ( .winside == 1 )? "Red" : "Blue" ) +" side wins !", 0; callsub L_reward, .winside, 0; callsub L_reward, ( .winside == 1 )? 2:1, 2; } else mapannounce "bat_b01", "Time Out. Aborting the match.", 0; sleep 5000; callsub L_make_player_move; bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; callsub L_delwall; deletearray .team1aid; deletearray .team2aid; .round = .winside = .skip = .score[1] = .score[2] = .team1count = .team2count = .life[1] = .life[2] = 0; enablenpc .rednpcname$; enablenpc .bluenpcname$; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; end; L_reward: .@size = getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( .@i = 0; .@i < .@size; .@i++ ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; L_setwall: setwall "bat_b01", 58,153, 6, 6, 0, "bg_pvp_round_red_1"; setwall "bat_b01", 64,153, 6, 4, 0, "bg_pvp_round_red_2"; setwall "bat_b01", 64,147, 6, 2, 0, "bg_pvp_round_red_3"; setwall "bat_b01", 58,147, 6, 0, 0, "bg_pvp_round_red_4"; setwall "bat_b01", 324,153, 6, 6, 0, "bg_pvp_round_blue_1"; setwall "bat_b01", 330,153, 6, 4, 0, "bg_pvp_round_blue_2"; setwall "bat_b01", 330,147, 6, 2, 0, "bg_pvp_round_blue_3"; setwall "bat_b01", 324,147, 6, 0, 0, "bg_pvp_round_blue_4"; return; L_delwall: delwall "bg_pvp_round_red_1"; delwall "bg_pvp_round_red_2"; delwall "bg_pvp_round_red_3"; delwall "bg_pvp_round_red_4"; delwall "bg_pvp_round_blue_1"; delwall "bg_pvp_round_blue_2"; delwall "bg_pvp_round_blue_3"; delwall "bg_pvp_round_blue_4"; return; L_make_player_move: for ( .@j = 1; .@j <= 2; .@j++ ) { for ( .@i = 0; .@i < getd(".team"+ .@j +"count"); .@i++ ) { attachrid getd(".team"+ .@j +"aid["+ .@i +"]" ); setoption 0x40, 0; pcblockmove getcharid(3), 0; } } return; OnRedQuit: callsub L_quit, 1, "Red", 2, "Blue"; OnBlueQuit: callsub L_quit, 2, "Blue", 1, "Red"; L_quit: percentheal 100, 100; setoption 0x40, 0; pcblockmove getcharid(3), 0; while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; .life[ getarg(0) ]--; if ( !getd(".team"+ getarg(0) +"count") ) { mapannounce "bat_b01", "All "+ getarg(1) +" team members has Quit !", 0, 0xff3333; // purposely use different color .score[ getarg(2) ] = .winningscore; .winside = getarg(2); .skip = 1; awake strnpcinfo(0); } else if ( !.life[ getarg(0) ] ) { .winside = getarg(2); mapannounce "bat_b01", " "+ getarg(3) +" team has defeated the opponent team, "+ getarg(3) +" team score a point !", 0; .score[ getarg(2) ]++; awake strnpcinfo(0); } end; OnRedDead: callsub L_dead, 1, 2, "Blue"; OnBlueDead: callsub L_dead, 2, 1, "Red"; L_dead: .life[ getarg(0) ]--; if ( !.life[ getarg(0) ] ) { .winside = getarg(1); mapannounce "bat_b01", " "+ getarg(2) +" team has defeated the opponent team, "+ getarg(2) +" team score a point !", 0; .score[ getarg(1) ]++; awake strnpcinfo(0); } sleep2 1250; percentheal 100,100; setoption 0x40, 1; pcblockmove getcharid(3), 1; end; } prontera,155,177,5 script Red side#bg_pvp_r 100,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_pvp_round#control" ), strnpcinfo(0); OnStart: waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } prontera,158,177,5 script Blue side#bg_pvp_r 100,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_pvp_round#control" ), strnpcinfo(0); OnStart: waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } bat_b01 mapflag battleground 2 bat_b01 mapflag nosave SavePoint bat_b01 mapflag nowarp bat_b01 mapflag nowarpto bat_b01 mapflag noteleport bat_b01 mapflag nomemo bat_b01 mapflag nopenalty bat_b01 mapflag nobranch bat_b01 mapflag noicewall Hello Good day rathena.. How can i change this BG script to .winningpoints = 100; where 1 point = 1 enemy kill and to respawn?? bump please Quote Link to comment Share on other sites More sharing options...
Question
celeron0134
hi good day .. kindly help me with this bg script made by @AnnieRuru
1. kill points needed to win - (100points 2 win)- 1 point = 1 kill)
2. id like the player that dies respawn to the map.. (red team - guild_vs3 13 59)(Blue team guild_vs3 86 50)
3. if no team reached 100points on eventlasting.. the highest point wins
4. on event end. warp blue team (turbo_room 68,95) red team (turbo_room 68 98)
5. FakeGuild for Red Team and Blue Team so players can knows who the enemy is.. (with colors of red for red team and blue for blue team)
sorry i know it is too much to ask.. but please for those who have a kind heart please help me..
i really need BG scripts
thanks
Edited by celeron0134Link to comment
Share on other sites
2 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.