Jump to content
  • 0

Battle Ground 5vs5


donkeyg

Question


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

how do i make the players are able to join battleground that with 5vs5? default is 10vs10

Link to comment
Share on other sites

16 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

follow this

waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnGuillaumeJoin",1;
for
waitingroom "Battle Station 5 Players",5,"Tierra_BG1::OnGuillaumeJoin",1;
waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnCroixJoin",1;
for
waitingroom "Battle Station 5 Players",5,"Tierra_BG1::OnCroixJoin",1;
if( .@Guillaume < 10 || .@Croix < 10 ){
for
if( .@Guillaume < 5|| .@Croix < 5 ){
announces 10 for 5
set $@GuillT, 10;
set $@CroiT, 10;
for
set $@GuillT, 5;
set $@CroiT, 5;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

follow this

waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnGuillaumeJoin",1;
for
waitingroom "Battle Station 5 Players",5,"Tierra_BG1::OnGuillaumeJoin",1;
waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnCroixJoin",1;
for
waitingroom "Battle Station 5 Players",5,"Tierra_BG1::OnCroixJoin",1;
if( .@Guillaume < 10 || .@Croix < 10 ){
for
if( .@Guillaume < 5|| .@Croix < 5 ){
announces 10 for 5
set $@GuillT, 10;
set $@CroiT, 10;
for
set $@GuillT, 5;
set $@CroiT, 5;

change at whcih file=.=

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

post your script here

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

post your script here

har=.=? there's alot of battle ground script, which file do u wan me to upload=.="

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

the one that you want to use

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

then at least post a screenshot like this topic

http://rathena.org/board/topic/72643-guys-need-help/

and point out which particular npc it is

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

the one that you want to use

i tried search

http://rathena.org/board/topic/72541-battlegrounds-minimum-players/

no solution..........

then at least post a screenshot like this topic

http://rathena.org/b...guys-need-help/

and point out which particular npc it is

that's the point..=.=" cause i dont know where's the script located... so i need u guys to tell me where should i edit..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

the number in your bg script of command line will look like this

waitingroom "Battle ....",10,"....",1;

change 10 to 5

and if there is other limit by using 10

also change to 5

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

i have the same problem.. here's a photo.

dafuq.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

i have the same problem.. here's a photo.

why not just open those one by one and look for map name,x,y,waitingroom

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

i have the same problem.. here's a photo.

why not just open those one by one and look for map name,x,y,waitingroom

this is what i found:

bat_room,142,227,4 script Registration::Fl2R_Guillaume 418,{

end;

OnInit:

waitingroom "Battle Station 10 Players",10,"Flavius_BG2::OnGuillaumeJoin",1;

end;

OnEnterBG:

set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",390,10,"Flavius_BG2::OnGuillaumeQuit","");

end;

}

bat_room,142,204,0 script Registration::Fl2R_Croix 414,{

end;

OnInit:

waitingroom "Battle Station 10 Players",10,"Flavius_BG2::OnCroixJoin",1;

end;

OnEnterBG:

set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",10,290,"Flavius_BG2::OnCroixQuit","");

end;

}

is this the part where i edit it?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

...

is this the part where i edit it?

you just need to edit it and you will know is it or not.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

follow this

announces 10 for 5
set $@GuillT, 10;
set $@CroiT, 10;
for
set $@GuillT, 5;
set $@CroiT, 5;

dude i cant find this part.. are you sure this is correct?

and is this on the same .txt as to where i edited the 1st part?

cause i tried using ctrl+f and i cant find it.

Edited by stydianx
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

follow this

announces 10 for 5
set $@GuillT, 10;
set $@CroiT, 10;
for
set $@GuillT, 5;
set $@CroiT, 5;

dude i cant find this part.. are you sure this is correct?

and is this on the same .txt as to where i edited the 1st part?

cause i tried using ctrl+f and i cant find it.

here's a 5v5 Kvm BG, Kvm gameplay is a 5v5 last team standing

//===== rAthena Script =======================================
// BattleGround System - KvM 80-99
//===== By: ==================================================
//= ???, L0ne_W0lf
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= rAthena 1.0
//===== Description: =========================================
//= [AEGIS Conversion]
//= Kreiger Von Midgard Battleground for levels 80 to 99
//= - Winning Team: 5 points
//= - Losing Team: 1 point
//===== Additional Comments: =================================
//= 1.0 First Version.
//= 1.1 Updated using official Aegis files. [L0ne_W0lf]
//= 1.2 Upated some announces and dialogs from iRO.
//=	 Changed how the scoreboard works slightly.
//=	 Removed the areapercentheals, and minor things.
//============================================================
// Waiting Room NPCs
//============================================================
bat_room,169,226,5 script KVM Waiting Room#a::KvM01R_Guillaume 418,{
end;
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnGuillaumeJoin",1;
end;

OnEnterBG:
set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
}
bat_room,169,220,0 warp #kvm801 2,2,bat_room,154,150
bat_room,169,205,3 script KVM Waiting Room#b::KvM01R_Croix 414,{
end;
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnCroixJoin",1;
end;
OnEnterBG:
set $@KvM01BG_id2, waitingroom2bg("bat_c01",147,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie");
end;
}
bat_room,169,211,0 warp #kvm802 2,2,bat_room,154,150
// Starting Line
//============================================================
- script KVM01::CellEffect -1,{
end;
OnKvM01One:
misceffect EF_CHANGECOLD;
end;
OnKvM01Two:
misceffect EF_CHANGEPOISON;
end;
}
bat_c01,54,124,3 duplicate(CellEffect) #RedcellA1-1 139
bat_c01,55,124,3 duplicate(CellEffect) #RedcellA2-1 139
bat_c01,56,124,3 duplicate(CellEffect) #RedcellA3-1 139
bat_c01,57,124,3 duplicate(CellEffect) #RedcellA4-1 139
bat_c01,57,125,3 duplicate(CellEffect) #RedcellA5-1 139
bat_c01,57,126,3 duplicate(CellEffect) #RedcellA6-1 139
bat_c01,57,127,3 duplicate(CellEffect) #RedcellA7-1 139
bat_c01,145,59,3 duplicate(CellEffect) #RedcellB1-1 139
bat_c01,144,59,3 duplicate(CellEffect) #RedcellB2-1 139
bat_c01,143,59,3 duplicate(CellEffect) #RedcellB3-1 139
bat_c01,142,59,3 duplicate(CellEffect) #RedcellB4-1 139
bat_c01,142,56,3 duplicate(CellEffect) #RedcellB5-1 139
bat_c01,142,57,3 duplicate(CellEffect) #RedcellB6-1 139
bat_c01,142,58,3 duplicate(CellEffect) #RedcellB7-1 139
bat_c01,54,128,3 script #A_camp_start01 139,4,4,{
end;
OnInit:
disablenpc "#A_camp_start01";
end;
OnEnable:
enablenpc "#A_camp_start01";
end;
OnDisable:
disablenpc "#A_camp_start01";
end;
OnTouch:
set Bat_Team,1;
setquest 6025;
end;
}
bat_c01,146,56,3 script #B_camp_start01 139,4,4,{
end;
OnInit:
disablenpc "#B_camp_start01";
end;
OnEnable:
enablenpc "#B_camp_start01";
end;
OnDisable:
disablenpc "#B_camp_start01";
end;
OnTouch:
set Bat_Team,2;
setquest 6025;
end;
}
// Battleground Engine
//============================================================
- script KvM01_BG -1,{
end;
OnInit:
setwall "bat_c01",54,122,6,7,0,"batc01wall_a";
setwall "bat_c01",55,122,5,7,0,"batc01wall_b";
setwall "bat_c01",140,56,6,7,0,"batc01wall_c";
setwall "bat_c01",140,57,5,7,0,"batc01wall_d";
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
end;
OnGuillaumeJoin:
OnCroixJoin:
donpcevent "KvM01_BG::OnReadyCheck";
end;
OnGuillaumeQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM01BG == 2 )
{
 set .Guillaume_Count, .Guillaume_Count - 1;
 bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
 if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin";
 else {
  mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
  mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 }
}
end;
OnCroixQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM01BG == 2 )
{
 set .Croix_Count, .Croix_Count - 1;
 bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
 if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin";
 else {
  mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
  mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 }
}
end;
OnReadyCheck:
if( $@KvM01BG )
 end;
set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume");
set .@Croix, getwaitingroomstate(0,"KvM01R_Croix");
if( .@Guillaume < 5 || .@Croix < 5 )
 end;
set $@KvM01BG, 1; // Starting
donpcevent "KvM01R_Croix::OnEnterBG";
donpcevent "KvM01R_Guillaume::OnEnterBG";
donpcevent "KvM01_BG::OnStart";
end;
OnStart:
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
set $@KvM01BG_Victory, 0;
// Warp Teams
bg_warp $@KvM01BG_id1,"bat_c01",53,128;
bg_warp $@KvM01BG_id2,"bat_c01",146,55;
initnpctimer;
end;
OnTimer1000:
mapannounce "bat_c01", "In 1 minute, KVM will start.",bc_map,"0x00ff00";
end;
OnTimer3000:
mapannounce "bat_c01", "The maximum time for a KVM battle is 5 minutes.",bc_map,"0x00ff00";
end;
OnTimer6000:
mapannounce "bat_c01", "Please prepare for the KVM battle.",bc_map,"0x00ff00";
mapannounce "bat_c01", "You can buff your people.",bc_map,"0x00ff00";
donpcevent "#A_camp_start01::OnEnable";
donpcevent "#B_camp_start01::OnEnable";
end;
OnTimer13000:
donpcevent "#A_camp_start01::OnDisable";
donpcevent "#B_camp_start01::OnDisable";
end;
OnTimer30000:
mapannounce "bat_c01", "30 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
end;
OnTimer45000:
mapannounce "bat_c01", "15 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01One";
end;
OnTimer50000:
mapannounce "bat_c01", "10 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01Two";
end;
OnTimer55000:
mapannounce "bat_c01", "5 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01One";
end;
OnTimer59000:
mapannounce "bat_c01", "KVM is now commencing.",bc_map,"0x00ff00";
donpcevent "::OnKvM01Two";
end;
OnTimer61000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM01BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM01BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
 set $@KvM01BG_Victory, 3;
 set $@KvM01BG, 3;
 mapannounce "bat_c01","There are not enough players to start the battle",1,0x696969;
 stopnpctimer;
 donpcevent "KvM01_BG::OnStop";
 end;
}
set $@KvM01BG, 2; // Playing
bg_warp $@KvM01BG_id1,"bat_c01",61,120;
bg_warp $@KvM01BG_id2,"bat_c01",138,63;
end;
OnTimer300000:
mapannounce "bat_c01", "1 minute remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer330000:
mapannounce "bat_c01", "30 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer345000:
mapannounce "bat_c01", "15 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer350000:
mapannounce "bat_c01", "10 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer355000:
mapannounce "bat_c01", "5 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer360000:
mapannounce "bat_c01", "The KVM battle is over.",bc_map,"0x00ff00";
if( .Croix_Count > .Guillaume_Count )
 donpcevent "KvM01_BG::OnCroixWin";
else if( .Croix_Count < .Guillaume_Count )
 donpcevent "KvM01_BG::OnGuillaumeWin";
else
{ // Draw Game
 set $@KvM01BG, 3;
 set $@KvM01BG_Victory, 3;
 mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
 mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 mapannounce "bat_c01", "This battle has ended in a draw.",bc_map,"0x00ff00";
 donpcevent "KvM01_BG::OnStop";
}
end;
OnGuillaumeWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 1;
mapannounce "bat_c01", "Guillaume wins!",bc_map,"0x00ff00";
mapannounce "bat_c01", "Congratulations to Guillaume members.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Everyone will be moved to the start point.",bc_map,"0x00ff00";
donpcevent "KvM01_BG::OnStop";
end;
OnCroixWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 2;
mapannounce "bat_c01", "Croix wins!",bc_map,"0x00ff00";
mapannounce "bat_c01", "Congratulations to Croix members.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Everyone will be moved to the start point.",bc_map,"0x00ff00";
donpcevent "KvM01_BG::OnStop";
end;
OnStop:
stopnpctimer;
enablenpc "KVM Officer#KVM01A";
enablenpc "KVM Officer#KVM01B";
// Warp Teams
bg_warp $@KvM01BG_id1,"bat_c01",53,128;
bg_warp $@KvM01BG_id2,"bat_c01",146,55;
donpcevent "KvM01_BG_Out::OnBegin";
end;
OnReset:
set .Croix_Count, 0;
set .Guillaume_Count, 0;
set $@KvM01BG_Victory, 0;
if( $@KvM01BG_id1 ) { bg_destroy $@KvM01BG_id1; set $@KvM01BG_id1, 0; }
if( $@KvM01BG_id2 ) { bg_destroy $@KvM01BG_id2; set $@KvM01BG_id2, 0; }
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
mapwarp "bat_c01","bat_room",154,150;
maprespawnguildid "bat_c01",0,3; // Just in case someone else
bg_updatescore "bat_c01",5,5;
set $@KvM01BG, 0;
donpcevent "KvM01_BG::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script KvM01_BG_Out -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer1000:
mapannounce "bat_c01", "Please apply with the Officer to acquire KVM points.",bc_map,"0x00ff00";
end;
OnTimer3000:
mapannounce "bat_c01", "The Officer will grant you the points for 30 seconds.",bc_map,"0x00ff00";
mapannounce "bat_c01", "In 30 seconds, the Officer will be sent away.",bc_map,"0x00ff00";
end;
OnTimer5000:
mapannounce "bat_c01", "Unless you talk to the Officer, you cannot gain the points.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Please be careful.",bc_map,"0x00ff00";
end;
OnTimer:55000:
mapannounce "bat_c01", "You will be sent back.",bc_map,"0x00ff00";
end;
OnTimer60000:
stopnpctimer;
donpcevent "KvM01_BG::OnReset";
end;
}
// Battleground rewards
//============================================================
bat_c01,51,130,5 script KVM Officer#KVM01A 419,{
if( $@KvM01BG_Victory )
{
 if( $@KvM01BG_Victory == Bat_Team )
 { // Victory
  set kvm_point,kvm_point + 5;
  mes "[KVM Officer]";
  mes "Good Game.";
  mes "May the glory of KVM be with you.";
  mes "You aquire the winning points: 5";
  close2;
 }
 else
 { //
  set kvm_point,kvm_point + 1;
  mes "[KVM Officer]";
  mes "I am so sorry.";
  mes "I wish you better luck next time.";
  mes "You aquire the losing points: 1";
  close2;
 }
 bg_leave;
 set Bat_Team,0;
 warp "bat_room",154,150;
 end;
}
end;
}
bat_c01,148,53,1 script KVM Officer#KVM01B 415,{
if( $@KvM01BG_Victory )
{
 if( $@KvM01BG_Victory == Bat_Team )
 { // Victory
  set kvm_point,kvm_point + 5;
  mes "[KVM Officer]";
  mes "Good Game.";
  mes "May the glory of KVM be with you.";
  mes "You aquire the winning points: 5";
  close2;
 }
 else
 { //
  set kvm_point,kvm_point + 1;
  mes "[KVM Officer]";
  mes "I am so sorry.";
  mes "I wish you better luck next time.";
  mes "You aquire the losing points: 1";
  close2;
 }
 bg_leave;
 set Bat_Team,0;
 warp "bat_room",154,150;
 end;
}
end;
}

sorry for the very long code but if I hadn't post this script it would take us years answering his question

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

@thanna

can u upload to pastebin.com ?? i would very appreciate with it ^^

follow this

announces 10 for 5
set $@GuillT, 10;
set $@CroiT, 10;
for
set $@GuillT, 5;
set $@CroiT, 5;

dude i cant find this part.. are you sure this is correct?

and is this on the same .txt as to where i edited the 1st part?

cause i tried using ctrl+f and i cant find it.

here's a 5v5 Kvm BG, Kvm gameplay is a 5v5 last team standing

//===== rAthena Script =======================================
// BattleGround System - KvM 80-99
//===== By: ==================================================
//= ???, L0ne_W0lf
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= rAthena 1.0
//===== Description: =========================================
//= [AEGIS Conversion]
//= Kreiger Von Midgard Battleground for levels 80 to 99
//= - Winning Team: 5 points
//= - Losing Team: 1 point
//===== Additional Comments: =================================
//= 1.0 First Version.
//= 1.1 Updated using official Aegis files. [L0ne_W0lf]
//= 1.2 Upated some announces and dialogs from iRO.
//=	 Changed how the scoreboard works slightly.
//=	 Removed the areapercentheals, and minor things.
//============================================================
// Waiting Room NPCs
//============================================================
bat_room,169,226,5 script KVM Waiting Room#a::KvM01R_Guillaume 418,{
end;
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnGuillaumeJoin",1;
end;

OnEnterBG:
set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
}
bat_room,169,220,0 warp #kvm801 2,2,bat_room,154,150
bat_room,169,205,3 script KVM Waiting Room#b::KvM01R_Croix 414,{
end;
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnCroixJoin",1;
end;
OnEnterBG:
set $@KvM01BG_id2, waitingroom2bg("bat_c01",147,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie");
end;
}
bat_room,169,211,0 warp #kvm802 2,2,bat_room,154,150
// Starting Line
//============================================================
- script KVM01::CellEffect -1,{
end;
OnKvM01One:
misceffect EF_CHANGECOLD;
end;
OnKvM01Two:
misceffect EF_CHANGEPOISON;
end;
}
bat_c01,54,124,3 duplicate(CellEffect) #RedcellA1-1 139
bat_c01,55,124,3 duplicate(CellEffect) #RedcellA2-1 139
bat_c01,56,124,3 duplicate(CellEffect) #RedcellA3-1 139
bat_c01,57,124,3 duplicate(CellEffect) #RedcellA4-1 139
bat_c01,57,125,3 duplicate(CellEffect) #RedcellA5-1 139
bat_c01,57,126,3 duplicate(CellEffect) #RedcellA6-1 139
bat_c01,57,127,3 duplicate(CellEffect) #RedcellA7-1 139
bat_c01,145,59,3 duplicate(CellEffect) #RedcellB1-1 139
bat_c01,144,59,3 duplicate(CellEffect) #RedcellB2-1 139
bat_c01,143,59,3 duplicate(CellEffect) #RedcellB3-1 139
bat_c01,142,59,3 duplicate(CellEffect) #RedcellB4-1 139
bat_c01,142,56,3 duplicate(CellEffect) #RedcellB5-1 139
bat_c01,142,57,3 duplicate(CellEffect) #RedcellB6-1 139
bat_c01,142,58,3 duplicate(CellEffect) #RedcellB7-1 139
bat_c01,54,128,3 script #A_camp_start01 139,4,4,{
end;
OnInit:
disablenpc "#A_camp_start01";
end;
OnEnable:
enablenpc "#A_camp_start01";
end;
OnDisable:
disablenpc "#A_camp_start01";
end;
OnTouch:
set Bat_Team,1;
setquest 6025;
end;
}
bat_c01,146,56,3 script #B_camp_start01 139,4,4,{
end;
OnInit:
disablenpc "#B_camp_start01";
end;
OnEnable:
enablenpc "#B_camp_start01";
end;
OnDisable:
disablenpc "#B_camp_start01";
end;
OnTouch:
set Bat_Team,2;
setquest 6025;
end;
}
// Battleground Engine
//============================================================
- script KvM01_BG -1,{
end;
OnInit:
setwall "bat_c01",54,122,6,7,0,"batc01wall_a";
setwall "bat_c01",55,122,5,7,0,"batc01wall_b";
setwall "bat_c01",140,56,6,7,0,"batc01wall_c";
setwall "bat_c01",140,57,5,7,0,"batc01wall_d";
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
end;
OnGuillaumeJoin:
OnCroixJoin:
donpcevent "KvM01_BG::OnReadyCheck";
end;
OnGuillaumeQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM01BG == 2 )
{
 set .Guillaume_Count, .Guillaume_Count - 1;
 bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
 if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin";
 else {
  mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
  mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 }
}
end;
OnCroixQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM01BG == 2 )
{
 set .Croix_Count, .Croix_Count - 1;
 bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
 if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin";
 else {
  mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
  mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 }
}
end;
OnReadyCheck:
if( $@KvM01BG )
 end;
set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume");
set .@Croix, getwaitingroomstate(0,"KvM01R_Croix");
if( .@Guillaume < 5 || .@Croix < 5 )
 end;
set $@KvM01BG, 1; // Starting
donpcevent "KvM01R_Croix::OnEnterBG";
donpcevent "KvM01R_Guillaume::OnEnterBG";
donpcevent "KvM01_BG::OnStart";
end;
OnStart:
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
set $@KvM01BG_Victory, 0;
// Warp Teams
bg_warp $@KvM01BG_id1,"bat_c01",53,128;
bg_warp $@KvM01BG_id2,"bat_c01",146,55;
initnpctimer;
end;
OnTimer1000:
mapannounce "bat_c01", "In 1 minute, KVM will start.",bc_map,"0x00ff00";
end;
OnTimer3000:
mapannounce "bat_c01", "The maximum time for a KVM battle is 5 minutes.",bc_map,"0x00ff00";
end;
OnTimer6000:
mapannounce "bat_c01", "Please prepare for the KVM battle.",bc_map,"0x00ff00";
mapannounce "bat_c01", "You can buff your people.",bc_map,"0x00ff00";
donpcevent "#A_camp_start01::OnEnable";
donpcevent "#B_camp_start01::OnEnable";
end;
OnTimer13000:
donpcevent "#A_camp_start01::OnDisable";
donpcevent "#B_camp_start01::OnDisable";
end;
OnTimer30000:
mapannounce "bat_c01", "30 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
end;
OnTimer45000:
mapannounce "bat_c01", "15 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01One";
end;
OnTimer50000:
mapannounce "bat_c01", "10 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01Two";
end;
OnTimer55000:
mapannounce "bat_c01", "5 seconds remaining to start KVM battle.",bc_map,"0x00ff00";
donpcevent "::OnKvM01One";
end;
OnTimer59000:
mapannounce "bat_c01", "KVM is now commencing.",bc_map,"0x00ff00";
donpcevent "::OnKvM01Two";
end;
OnTimer61000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM01BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM01BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
 set $@KvM01BG_Victory, 3;
 set $@KvM01BG, 3;
 mapannounce "bat_c01","There are not enough players to start the battle",1,0x696969;
 stopnpctimer;
 donpcevent "KvM01_BG::OnStop";
 end;
}
set $@KvM01BG, 2; // Playing
bg_warp $@KvM01BG_id1,"bat_c01",61,120;
bg_warp $@KvM01BG_id2,"bat_c01",138,63;
end;
OnTimer300000:
mapannounce "bat_c01", "1 minute remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer330000:
mapannounce "bat_c01", "30 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer345000:
mapannounce "bat_c01", "15 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer350000:
mapannounce "bat_c01", "10 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer355000:
mapannounce "bat_c01", "5 seconds remaining to finish the KVM battle.",bc_map,"0x00ff00";
end;
OnTimer360000:
mapannounce "bat_c01", "The KVM battle is over.",bc_map,"0x00ff00";
if( .Croix_Count > .Guillaume_Count )
 donpcevent "KvM01_BG::OnCroixWin";
else if( .Croix_Count < .Guillaume_Count )
 donpcevent "KvM01_BG::OnGuillaumeWin";
else
{ // Draw Game
 set $@KvM01BG, 3;
 set $@KvM01BG_Victory, 3;
 mapannounce "bat_c01", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00";
 mapannounce "bat_c01", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00";
 mapannounce "bat_c01", "This battle has ended in a draw.",bc_map,"0x00ff00";
 donpcevent "KvM01_BG::OnStop";
}
end;
OnGuillaumeWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 1;
mapannounce "bat_c01", "Guillaume wins!",bc_map,"0x00ff00";
mapannounce "bat_c01", "Congratulations to Guillaume members.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Everyone will be moved to the start point.",bc_map,"0x00ff00";
donpcevent "KvM01_BG::OnStop";
end;
OnCroixWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 2;
mapannounce "bat_c01", "Croix wins!",bc_map,"0x00ff00";
mapannounce "bat_c01", "Congratulations to Croix members.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Everyone will be moved to the start point.",bc_map,"0x00ff00";
donpcevent "KvM01_BG::OnStop";
end;
OnStop:
stopnpctimer;
enablenpc "KVM Officer#KVM01A";
enablenpc "KVM Officer#KVM01B";
// Warp Teams
bg_warp $@KvM01BG_id1,"bat_c01",53,128;
bg_warp $@KvM01BG_id2,"bat_c01",146,55;
donpcevent "KvM01_BG_Out::OnBegin";
end;
OnReset:
set .Croix_Count, 0;
set .Guillaume_Count, 0;
set $@KvM01BG_Victory, 0;
if( $@KvM01BG_id1 ) { bg_destroy $@KvM01BG_id1; set $@KvM01BG_id1, 0; }
if( $@KvM01BG_id2 ) { bg_destroy $@KvM01BG_id2; set $@KvM01BG_id2, 0; }
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
mapwarp "bat_c01","bat_room",154,150;
maprespawnguildid "bat_c01",0,3; // Just in case someone else
bg_updatescore "bat_c01",5,5;
set $@KvM01BG, 0;
donpcevent "KvM01_BG::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script KvM01_BG_Out -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer1000:
mapannounce "bat_c01", "Please apply with the Officer to acquire KVM points.",bc_map,"0x00ff00";
end;
OnTimer3000:
mapannounce "bat_c01", "The Officer will grant you the points for 30 seconds.",bc_map,"0x00ff00";
mapannounce "bat_c01", "In 30 seconds, the Officer will be sent away.",bc_map,"0x00ff00";
end;
OnTimer5000:
mapannounce "bat_c01", "Unless you talk to the Officer, you cannot gain the points.",bc_map,"0x00ff00";
mapannounce "bat_c01", "Please be careful.",bc_map,"0x00ff00";
end;
OnTimer:55000:
mapannounce "bat_c01", "You will be sent back.",bc_map,"0x00ff00";
end;
OnTimer60000:
stopnpctimer;
donpcevent "KvM01_BG::OnReset";
end;
}
// Battleground rewards
//============================================================
bat_c01,51,130,5 script KVM Officer#KVM01A 419,{
if( $@KvM01BG_Victory )
{
 if( $@KvM01BG_Victory == Bat_Team )
 { // Victory
  set kvm_point,kvm_point + 5;
  mes "[KVM Officer]";
  mes "Good Game.";
  mes "May the glory of KVM be with you.";
  mes "You aquire the winning points: 5";
  close2;
 }
 else
 { //
  set kvm_point,kvm_point + 1;
  mes "[KVM Officer]";
  mes "I am so sorry.";
  mes "I wish you better luck next time.";
  mes "You aquire the losing points: 1";
  close2;
 }
 bg_leave;
 set Bat_Team,0;
 warp "bat_room",154,150;
 end;
}
end;
}
bat_c01,148,53,1 script KVM Officer#KVM01B 415,{
if( $@KvM01BG_Victory )
{
 if( $@KvM01BG_Victory == Bat_Team )
 { // Victory
  set kvm_point,kvm_point + 5;
  mes "[KVM Officer]";
  mes "Good Game.";
  mes "May the glory of KVM be with you.";
  mes "You aquire the winning points: 5";
  close2;
 }
 else
 { //
  set kvm_point,kvm_point + 1;
  mes "[KVM Officer]";
  mes "I am so sorry.";
  mes "I wish you better luck next time.";
  mes "You aquire the losing points: 1";
  close2;
 }
 bg_leave;
 set Bat_Team,0;
 warp "bat_room",154,150;
 end;
}
end;
}

sorry for the very long code but if I hadn't post this script it would take us years answering his question

can u upload to pastebin.com ?? i would very appreciate with it ^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

bumpppp

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...