From 1f147f207d0f323cd6dcfe6f8fc36ea99fdd5fa7 Mon Sep 17 00:00:00 2001 From: Capuche Date: Mon, 26 Jan 2015 15:50:10 +0100 Subject: [PATCH] Quick fix in kvm battleground Signed-off-by: Capuche --- npc/battleground/kvm/kvm01.txt | 145 ++++++++--------------------- npc/battleground/kvm/kvm02.txt | 154 +++++++++--------------------- npc/battleground/kvm/kvm03.txt | 165 ++++++++++----------------------- 3 files changed, 137 insertions(+), 327 deletions(-) diff --git a/npc/battleground/kvm/kvm01.txt b/npc/battleground/kvm/kvm01.txt index 0e4e417a9a..d3e93ba3e6 100644 --- a/npc/battleground/kvm/kvm01.txt +++ b/npc/battleground/kvm/kvm01.txt @@ -1,40 +1,30 @@ -//===== rAthena Script ======================================= +//===== rAthena Script ======================================= //= BattleGround System - KvM 80-99 -//===== By: ================================================== -//= ???, L0ne_W0lf -//===== Current Version: ===================================== -//= 1.2 -//===== Compatible With: ===================================== -//= rAthena Project -//===== Description: ========================================= +//===== Description: ========================================= //= [Official Conversion] //= Kreiger Von Midgard Battleground for levels 80 to 99 //= - Winning Team: 5 points //= - Losing Team: 1 point -//===== Additional Comments: ================================= -//= 1.0 First Version. +//===== Changelogs: ========================================== +//= 1.0 First Version. [L0ne_W0lf] //= 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. -//============================================================ +//============================================================s // 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; @@ -46,19 +36,17 @@ OnEnterBG: set $@KvM01BG_id2, waitingroom2bg("bat_c01",147,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie"); end; } - +bat_room,169,220,0 warp #kvm801 2,2,bat_room,154,150 bat_room,169,211,0 warp #kvm802 2,2,bat_room,154,150 // Starting Line //============================================================ - script KVM01::CellEffect -1,{ end; - -OnKvM01One: +OnKvM01One: specialeffect EF_CHANGECOLD; end; - -OnKvM01Two: +OnKvM01Two: specialeffect EF_CHANGEPOISON; end; } @@ -81,19 +69,15 @@ 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; @@ -102,19 +86,15 @@ OnTouch: 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; @@ -135,11 +115,6 @@ OnInit: disablenpc "KVM Officer#KVM01B"; end; -OnGuillaumeJoin: -OnCroixJoin: - donpcevent "KvM01_BG::OnReadyCheck"; - end; - OnGuillaumeQuit: //set BG_Delay_Tick, gettimetick(2) + 1200; OnGuillaumeDie: @@ -170,21 +145,6 @@ OnCroixDie: } 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"; @@ -321,21 +281,6 @@ OnStop: 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,{ @@ -359,72 +304,64 @@ OnTimer5000: mapannounce "bat_c01", "Please be careful.",bc_map,"0x00ff00"; end; -OnTimer:55000: +OnTimer55000: mapannounce "bat_c01", "You will be sent back.",bc_map,"0x00ff00"; end; OnTimer60000: stopnpctimer; - donpcevent "KvM01_BG::OnReset"; + set getvariableofnpc(.Croix_Count,"KvM01_BG"), 0; + set getvariableofnpc(.Guillaume_Count,"KvM01_BG"), 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; + +OnGuillaumeJoin: +OnCroixJoin: + 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; } // 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]"; + if( $@KvM01BG_Victory ) { + mes "[KVM Officer]"; + if( $@KvM01BG_Victory == Bat_Team ) { 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]"; + else { mes "I am so sorry."; mes "I wish you better luck next time."; mes "You aquire the losing points: 1"; close2; + set kvm_point,kvm_point + 1; } bg_leave; set Bat_Team,0; warp "bat_room",154,150; - end; } end; } +bat_c01,148,53,1 duplicate(KVM Officer#KVM01A) KVM Officer#KVM01B 415 diff --git a/npc/battleground/kvm/kvm02.txt b/npc/battleground/kvm/kvm02.txt index cdf7e3b8fb..7703c7d105 100644 --- a/npc/battleground/kvm/kvm02.txt +++ b/npc/battleground/kvm/kvm02.txt @@ -1,18 +1,12 @@ -//===== rAthena Script ======================================= +//===== rAthena Script ======================================= //= BattleGround System - KvM 1-59 -//===== By: ================================================== -//= ???, L0ne_W0lf -//===== Current Version: ===================================== -//= 1.3 -//===== Compatible With: ===================================== -//= rAthena Project -//===== Description: ========================================= +//===== Description: ========================================= //= [Official Conversion] //= Kreiger Von Midgard Battleground for levels 1 to 59 //= - Winning Team: 1 point -//= - Losing Team: 0 points -//===== Additional Comments: ================================= -//= 1.0 First Version. +//= - Losing Team: 0 point +//===== Changelogs: ========================================== +//= 1.0 First Version. [L0ne_W0lf] //= 1.1 Updated using official Aegis files. [L0ne_W0lf] //= 1.2 Upated some announces and dialogs from iRO. //= Changed how the scoreboard works slightly. @@ -25,42 +19,34 @@ //============================================================ bat_room,197,226,5 script KVM Waiting Room#a2::KvM02R_Guillaume 418,{ end; - OnInit: waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnGuillaumeJoin",1; end; - OnEnterBG: set $@KvM02BG_id1, waitingroom2bg("bat_c02",52,129,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie"); end; } -bat_room,197,220,0 warp #kvm601 2,2,bat_room,154,150 - bat_room,197,205,3 script KVM Waiting Room#b2::KvM02R_Croix 414,{ end; - OnInit: waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnCroixJoin",1; end; - OnEnterBG: set $@KvM02BG_id2, waitingroom2bg("bat_c02",147,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie"); end; } - +bat_room,197,220,0 warp #kvm601 2,2,bat_room,154,150 bat_room,197,211,0 warp #kvm602 2,2,bat_room,154,150 // Starting Line //============================================================ - script KVM02::CellEffect2 -1,{ end; - -OnKvM02One: +OnKvM02One: specialeffect EF_CHANGECOLD; end; - -OnKvM02Two: +OnKvM02Two: specialeffect EF_CHANGEPOISON; end; } @@ -83,19 +69,15 @@ bat_c02,142,58,3 duplicate(CellEffect2) #RedcellB7-2 139 bat_c02,54,128,3 script #A_camp_start02 139,4,4,{ end; - OnInit: disablenpc "#A_camp_start02"; end; - OnEnable: enablenpc "#A_camp_start02"; end; - OnDisable: disablenpc "#A_camp_start03"; end; - OnTouch: set Bat_Team,1; setquest 6025; @@ -104,19 +86,15 @@ OnTouch: bat_c02,146,56,3 script #B_camp_start02 139,4,4,{ end; - OnInit: disablenpc "#B_camp_start02"; end; - OnEnable: enablenpc "#B_camp_start02"; end; - OnDisable: disablenpc "#B_camp_start02"; end; - OnTouch: set Bat_Team,2; setquest 6025; @@ -137,11 +115,6 @@ OnInit: disablenpc "KVM Officer#KVM02B"; end; -OnGuillaumeJoin: -OnCroixJoin: - donpcevent "KvM02_BG::OnReadyCheck"; - end; - OnGuillaumeQuit: //set BG_Delay_Tick, gettimetick(2) + 1200; OnGuillaumeDie: @@ -172,21 +145,6 @@ OnCroixDie: } end; -OnReadyCheck: - if( $@KvM02BG ) - end; - set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM02R_Croix"); - - if( .@Guillaume < 5 || .@Croix < 5 ) - end; - - set $@KvM02BG, 1; // Starting - donpcevent "KvM02R_Croix::OnEnterBG"; - donpcevent "KvM02R_Guillaume::OnEnterBG"; - donpcevent "KvM02_BG::OnStart"; - end; - OnStart: disablenpc "KVM Officer#KVM02A"; disablenpc "KVM Officer#KVM02B"; @@ -223,22 +181,22 @@ OnTimer30000: OnTimer45000: mapannounce "bat_c02", "15 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01One"; + donpcevent "::OnKvM02One"; end; OnTimer50000: mapannounce "bat_c02", "10 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01Two"; + donpcevent "::OnKvM02Two"; end; OnTimer55000: mapannounce "bat_c02", "5 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01One"; + donpcevent "::OnKvM02One"; end; OnTimer59000: mapannounce "bat_c02", "KVM is now commencing.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01Two"; + donpcevent "::OnKvM02Two"; end; OnTimer61000: @@ -323,21 +281,6 @@ OnStop: bg_warp $@KvM02BG_id2,"bat_c02",146,55; donpcevent "KvM02_BG_Out::OnBegin"; end; - -OnReset: - set .Croix_Count, 0; - set .Guillaume_Count, 0; - set $@KvM02BG_Victory, 0; - if( $@KvM02BG_id1 ) { bg_destroy $@KvM02BG_id1; set $@KvM02BG_id1, 0; } - if( $@KvM02BG_id2 ) { bg_destroy $@KvM02BG_id2; set $@KvM02BG_id2, 0; } - disablenpc "KVM Officer#KVM02A"; - disablenpc "KVM Officer#KVM02B"; - mapwarp "bat_c02","bat_room",154,150; - maprespawnguildid "bat_c02",0,3; // Just in case someone else - bg_updatescore "bat_c02",5,5; - set $@KvM02BG, 0; - donpcevent "KvM02_BG::OnReadyCheck"; // Maybe a game is ready to start - end; } - script KvM02_BG_Out -1,{ @@ -361,33 +304,54 @@ OnTimer5000: mapannounce "bat_c02", "Please be careful.",bc_map,"0x00ff00"; end; -OnTimer:55000: +OnTimer55000: mapannounce "bat_c02", "You will be sent back.",bc_map,"0x00ff00"; end; OnTimer60000: stopnpctimer; - donpcevent "KvM02_BG::OnReset"; + set getvariableofnpc(.Croix_Count,"KvM02_BG"), 0; + set getvariableofnpc(.Guillaume_Count,"KvM02_BG"), 0; + set $@KvM02BG_Victory, 0; + if( $@KvM02BG_id1 ) { bg_destroy $@KvM02BG_id1; set $@KvM02BG_id1, 0; } + if( $@KvM02BG_id2 ) { bg_destroy $@KvM02BG_id2; set $@KvM02BG_id2, 0; } + disablenpc "KVM Officer#KVM02A"; + disablenpc "KVM Officer#KVM02B"; + mapwarp "bat_c02","bat_room",154,150; + maprespawnguildid "bat_c02",0,3; // Just in case someone else + bg_updatescore "bat_c02",5,5; + set $@KvM02BG, 0; + +OnGuillaumeJoin: +OnCroixJoin: + if( $@KvM02BG ) + end; + set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume"); + set .@Croix, getwaitingroomstate(0,"KvM02R_Croix"); + + if( .@Guillaume < 5 || .@Croix < 5 ) + end; + + set $@KvM02BG, 1; // Starting + donpcevent "KvM02R_Croix::OnEnterBG"; + donpcevent "KvM02R_Guillaume::OnEnterBG"; + donpcevent "KvM02_BG::OnStart"; end; } // Battleground rewards //============================================================ bat_c02,51,130,5 script KVM Officer#KVM02A 419,{ - if( $@KvM01BG_Victory ) - { - if( $@KvM02BG_Victory == Bat_Team ) - { // Victory - set kvm_point,kvm_point + 1; - mes "[KVM Officer]"; + if( $@KvM02BG_Victory ) { + mes "[KVM Officer]"; + if( $@KvM02BG_Victory == Bat_Team ) { mes "Good Game."; mes "May the glory of KVM be with you."; mes "You aquire the winning points: 1"; close2; + set kvm_point,kvm_point + 1; } - else - { // - mes "[KVM Officer]"; + else { mes "I am so sorry."; mes "I wish you better luck next time."; mes "You aquire the losing points: 0"; @@ -398,33 +362,5 @@ bat_c02,51,130,5 script KVM Officer#KVM02A 419,{ warp "bat_room",154,150; end; } - end; -} - -bat_c02,148,53,1 script KVM Officer#KVM02B 415,{ - if( $@KvM01BG_Victory ) - { - if( $@KvM02BG_Victory == Bat_Team ) - { // Victory - set kvm_point,kvm_point + 1; - mes "[KVM Officer]"; - mes "Good Game."; - mes "May the glory of KVM be with you."; - mes "You aquire the winning points: 1"; - close2; - } - else - { // - mes "[KVM Officer]"; - mes "I am so sorry."; - mes "I wish you better luck next time."; - mes "You aquire the losing points: 0"; - close2; - } - bg_leave; - set Bat_Team,0; - warp "bat_room",154,150; - end; - } - end; } +bat_c02,148,53,1 duplicate(KVM Officer#KVM02A) KVM Officer#KVM02B 415 diff --git a/npc/battleground/kvm/kvm03.txt b/npc/battleground/kvm/kvm03.txt index 509457e4b7..b562117c06 100644 --- a/npc/battleground/kvm/kvm03.txt +++ b/npc/battleground/kvm/kvm03.txt @@ -1,18 +1,12 @@ -//===== rAthena Script ======================================= +//===== rAthena Script ======================================= //= BattleGround System - KvM 60-80 -//===== By: ================================================== -//= ???, L0ne_W0lf -//===== Current Version: ===================================== -//= 1.3 -//===== Compatible With: ===================================== -//= rAthena Project -//===== Description: ========================================= +//===== Description: ========================================= //= [Official Conversion] //= Kreiger Von Midgard Battleground for levels 60 to 80 //= - Winning Team: 2 points //= - Losing Team: 1 point -//===== Additional Comments: ================================= -//= 1.0 First Version. +//===== Changelogs: ========================================== +//= 1.0 First Version. [L0ne_W0lf] //= 1.1 Updated using official Aegis files. [L0ne_W0lf] //= 1.2 Upated some announces and dialogs from iRO. //= Changed how the scoreboard works slightly. @@ -24,30 +18,24 @@ //============================================================ bat_room,225,226,5 script KVM Waiting Room#a3::KvM03R_Guillaume 418,{ end; - OnInit: waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnGuillaumeJoin",1; end; - OnEnterBG: set $@KvM03BG_id1, waitingroom2bg("bat_c03",52,129,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie"); end; } -bat_room,225,220,0 warp #kvm701 2,2,bat_room,154,150 - bat_room,225,205,3 script KVM Waiting Room#b3::KvM03R_Croix 414,{ end; - OnInit: waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnCroixJoin",1; end; - OnEnterBG: set $@KvM03BG_id2, waitingroom2bg("bat_c03",147,55,"KvM03_BG::OnCroixQuit","KvM03_BG::OnCroixDie"); end; } - +bat_room,225,220,0 warp #kvm701 2,2,bat_room,154,150 bat_room,225,211,0 warp #kvm702 2,2,bat_room,154,150 // Starting Line @@ -55,11 +43,11 @@ bat_room,225,211,0 warp #kvm702 2,2,bat_room,154,150 - script KVM03::CellEffect3 -1,{ end; -OnKvM03One: +OnKvM03One: specialeffect EF_CHANGECOLD; end; -OnKvM03Two: +OnKvM03Two: specialeffect EF_CHANGEPOISON; end; } @@ -82,19 +70,15 @@ bat_c03,142,58,3 duplicate(CellEffect3) #RedcellB7-3 139 bat_c03,54,128,3 script #A_camp_start03 139,4,4,{ end; - OnInit: disablenpc "#A_camp_start03"; end; - OnEnable: enablenpc "#A_camp_start03"; end; - OnDisable: disablenpc "#A_camp_start03"; end; - OnTouch: set Bat_Team,1; setquest 6025; @@ -103,19 +87,15 @@ OnTouch: bat_c03,146,56,3 script #B_camp_start03 139,4,4,{ end; - OnInit: disablenpc "#B_camp_start03"; end; - OnEnable: enablenpc "#B_camp_start03"; end; - OnDisable: disablenpc "#B_camp_start03"; end; - OnTouch: set Bat_Team,2; setquest 6025; @@ -136,19 +116,14 @@ OnInit: disablenpc "KVM Officer#KVM03B"; end; -OnGuillaumeJoin: -OnCroixJoin: - donpcevent "KvM03_BG::OnReadyCheck"; - end; - OnGuillaumeQuit: //set BG_Delay_Tick, gettimetick(2) + 1200; OnGuillaumeDie: - if( $@KvM03BG == 2 ) - { + if( $@KvM03BG == 2 ) { set .Guillaume_Count, .Guillaume_Count - 1; bg_updatescore "bat_c03",.Guillaume_Count,.Croix_Count; - if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) + donpcevent "KvM03_BG::OnCroixWin"; else { mapannounce "bat_c03", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00"; mapannounce "bat_c03", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00"; @@ -159,11 +134,11 @@ OnGuillaumeDie: OnCroixQuit: //set BG_Delay_Tick, gettimetick(2) + 1200; OnCroixDie: - if( $@KvM03BG == 2 ) - { + if( $@KvM03BG == 2 ) { set .Croix_Count, .Croix_Count - 1; bg_updatescore "bat_c03",.Guillaume_Count,.Croix_Count; - if( .Croix_Count < 1 ) donpcevent "KvM03_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) + donpcevent "KvM03_BG::OnGuillaumeWin"; else { mapannounce "bat_c03", "The number of Guillaumes is "+.Guillaume_Count+".",bc_map,"0x00ff00"; mapannounce "bat_c03", "The number of Croixes is "+.Croix_Count+".",bc_map,"0x00ff00"; @@ -171,25 +146,10 @@ OnCroixDie: } end; -OnReadyCheck: - if( $@KvM03BG ) - end; - set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM03R_Croix"); - - if( .@Guillaume < 5 || .@Croix < 5 ) - end; - - set $@KvM03BG, 1; // Starting - donpcevent "KvM03R_Croix::OnEnterBG"; - donpcevent "KvM03R_Guillaume::OnEnterBG"; - donpcevent "KvM03_BG::OnStart"; - end; - OnStart: disablenpc "KVM Officer#KVM03A"; disablenpc "KVM Officer#KVM03B"; - set $@KvM01BG_Victory, 0; + set $@KvM03BG_Victory, 0; // Warp Teams bg_warp $@KvM03BG_id1,"bat_c03",53,128; bg_warp $@KvM03BG_id2,"bat_c03",146,55; @@ -222,22 +182,22 @@ OnTimer30000: OnTimer45000: mapannounce "bat_c03", "15 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01One"; + donpcevent "::OnKvM03One"; end; OnTimer50000: mapannounce "bat_c03", "10 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01Two"; + donpcevent "::OnKvM03Two"; end; OnTimer55000: mapannounce "bat_c03", "5 seconds remaining to start KVM battle.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01One"; + donpcevent "::OnKvM03One"; end; OnTimer59000: mapannounce "bat_c03", "KVM is now commencing.",bc_map,"0x00ff00"; - donpcevent "::OnKvM01Two"; + donpcevent "::OnKvM03Two"; end; OnTimer61000: @@ -322,21 +282,6 @@ OnStop: bg_warp $@KvM03BG_id2,"bat_c03",146,55; donpcevent "KvM03_BG_Out::OnBegin"; end; - -OnReset: - set .Croix_Count, 0; - set .Guillaume_Count, 0; - set $@KvM03BG_Victory, 0; - if( $@KvM03BG_id1 ) { bg_destroy $@KvM03BG_id1; set $@KvM03BG_id1, 0; } - if( $@KvM03BG_id2 ) { bg_destroy $@KvM03BG_id2; set $@KvM03BG_id2, 0; } - disablenpc "KVM Officer#KVM03A"; - disablenpc "KVM Officer#KVM03B"; - mapwarp "bat_c03","bat_room",154,150; - maprespawnguildid "bat_c03",0,3; // Just in case someone else - bg_updatescore "bat_c03",5,5; - set $@KvM03BG, 0; - donpcevent "KvM03_BG::OnReadyCheck"; // Maybe a game is ready to start - end; } - script KvM03_BG_Out -1,{ @@ -360,72 +305,64 @@ OnTimer5000: mapannounce "bat_c03", "Please be careful.",bc_map,"0x00ff00"; end; -OnTimer:55000: +OnTimer55000: mapannounce "bat_c03", "You will be sent back.",bc_map,"0x00ff00"; end; OnTimer60000: stopnpctimer; - donpcevent "KvM03_BG::OnReset"; + set getvariableofnpc(.Croix_Count,"KvM03_BG"), 0; + set getvariableofnpc(.Guillaume_Count,"KvM03_BG"), 0; + set $@KvM03BG_Victory, 0; + if( $@KvM03BG_id1 ) { bg_destroy $@KvM03BG_id1; set $@KvM03BG_id1, 0; } + if( $@KvM03BG_id2 ) { bg_destroy $@KvM03BG_id2; set $@KvM03BG_id2, 0; } + disablenpc "KVM Officer#KVM03A"; + disablenpc "KVM Officer#KVM03B"; + mapwarp "bat_c03","bat_room",154,150; + maprespawnguildid "bat_c03",0,3; // Just in case someone else + bg_updatescore "bat_c03",5,5; + set $@KvM03BG, 0; + +OnGuillaumeJoin: +OnCroixJoin: + if( $@KvM03BG ) + end; + set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume"); + set .@Croix, getwaitingroomstate(0,"KvM03R_Croix"); + + if( .@Guillaume < 5 || .@Croix < 5 ) + end; + + set $@KvM03BG, 1; // Starting + donpcevent "KvM03R_Croix::OnEnterBG"; + donpcevent "KvM03R_Guillaume::OnEnterBG"; + donpcevent "KvM03_BG::OnStart"; end; } // Battleground rewards //============================================================ bat_c03,51,130,5 script KVM Officer#KVM03A 419,{ - if( $@KvM01BG_Victory ) - { - if( $@KvM03BG_Victory == Bat_Team ) - { // Victory - set kvm_point,kvm_point + 2; - mes "[KVM Officer]"; + if( $@KvM03BG_Victory ) { + mes "[KVM Officer]"; + if( $@KvM03BG_Victory == Bat_Team ) { mes "Good Game."; mes "May the glory of KVM be with you."; mes "You aquire the winning points: 2"; 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_c03,148,53,1 script KVM Officer#KVM03B 415,{ - if( $@KvM01BG_Victory ) - { - if( $@KvM03BG_Victory == Bat_Team ) - { // Victory set kvm_point,kvm_point + 2; - mes "[KVM Officer]"; - mes "Good Game."; - mes "May the glory of KVM be with you."; - mes "You aquire the winning points: 2"; - close2; } - else - { // - set kvm_point,kvm_point + 1; - mes "[KVM Officer]"; + else { mes "I am so sorry."; mes "I wish you better luck next time."; mes "You aquire the losing points: 1"; close2; + set kvm_point,kvm_point + 1; } bg_leave; set Bat_Team,0; warp "bat_room",154,150; - end; } end; } +bat_c03,148,53,1 duplicate(KVM Officer#KVM03A) KVM Officer#KVM03B 415