Implemented the Battleground Queue System (#3995)

* Fixes #1310.
* Added a battle config which allows toggling of the Battleground Queue client feature and also toggles between the modes of scripts.
* Added script commands bg_reserve, bg_unbook, and bg_desert.
* Removed old custom Battleground scripts.
Thanks to @Lemongrass3110, @Locien, @secretdataz, @InusualZ, @Normynator, @Atemo, @iubantot, @admkakaroto, and @noobzter003!
This commit is contained in:
Aleos
2020-02-12 08:26:59 -05:00
committed by GitHub
parent c292794154
commit 2931c00bd4
44 changed files with 2687 additions and 4804 deletions

View File

@@ -1,18 +1,12 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Flavius
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.7
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Flavius Battleground.
//= - Winning Team: 9 badges (11 if VIP)
//= - Losing Team: 3 badges (5 if VIP)
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf]
//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//= 1.3 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
@@ -20,6 +14,7 @@
//= 1.5 Added GM management function. [Euphy]
//= 1.6 Added VIP features and created a reward function. [Euphy]
//= 1.7 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
//= 1.8 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -51,6 +46,8 @@ bat_room,2,151,3 script #bat_b01_timer 844,{
end;
OnInit:
if (getbattleflag("feature.bgqueue"))
end;
OnEnable:
initnpctimer;
end;
@@ -61,14 +58,21 @@ OnStop:
OnTimer1000:
stopnpctimer;
initnpctimer;
if (!getbattleflag("feature.bgqueue"))
initnpctimer;
set .@chk_bat_a01,getmapusers("bat_b01");
if (.@chk_bat_a01 < 1) {
set $@FlaviusBG1, 0;
if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; }
if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; }
donpcevent "start#bat_b01::OnReadyCheck";
if (getbattleflag("feature.bgqueue")) {
bg_unbook "bat_b01";
end;
} else
donpcevent "start#bat_b01::OnReadyCheck";
}
if (getbattleflag("feature.bgqueue"))
initnpctimer;
end;
}
@@ -83,22 +87,26 @@ OnInit:
OnReadyCheck:
if( $@FlaviusBG1 )
end;
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator");
set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_b01_timer::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator");
set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_b01_timer::OnStop";
end;
}
if( .@Guillaume < 10 || .@Croix < 10 )
end;
}
if( .@Guillaume < 10 || .@Croix < 10 )
end;
set $@FlaviusBG1, 1;
set $@FlaviusBG1_Victory, 0;
set $@Croix_ScoreBG1, 0;
set $@Guill_ScoreBG1, 0;
bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
donpcevent "Lieutenant Ator::OnEnterBG";
donpcevent "Lieutenant Thelokus::OnEnterBG";
if (!getbattleflag("feature.bgqueue")) {
donpcevent "Lieutenant Ator::OnEnterBG";
donpcevent "Lieutenant Thelokus::OnEnterBG";
}
donpcevent "OBJ#bat_b01_a::OnKill";
donpcevent "OBJ#bat_b01_a::OnEnable";
donpcevent "OBJ#bat_b01_b::OnKill";
@@ -142,7 +150,10 @@ OnReset:
OnGuillaumeQuit:
OnCroixQuit:
bg_leave;
if (getbattleflag("feature.bgqueue"))
bg_desert;
else
bg_leave;
end;
OnTimer10000:
@@ -405,7 +416,8 @@ bat_b01,10,294,3 script Guillaume Vintenar#b01_a 934,{
callfunc "F_BG_Badge",0,"Guillaume","Flavius";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -421,7 +433,8 @@ bat_b01,389,14,3 script Croix Vintenar#b01_b 934,{
callfunc "F_BG_Badge",0,"Croix","Flavius";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -579,3 +592,19 @@ bat_b01,1,10,3 script Release all#b01 81,{
}
}
}
// BG Queue makes these scripts useless
- script BGQueueInit#flavius01 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "Lieutenant Ator";
unloadnpc "Lieutenant Thelokus";
unloadnpc "back_bgroomb01a";
unloadnpc "back_bgroomb01b";
unloadnpc "A_CODE#bat_b01";
unloadnpc "B_CODE#bat_b01";
}
end;
}

View File

@@ -1,18 +1,12 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Flavius Second
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.8
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Flavius Battleground.
//= - Winning Team: 9 badges (11 if VIP)
//= - Losing Team: 3 badges (5 if VIP)
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395)
//= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf]
//= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
@@ -21,6 +15,7 @@
//= 1.6 Added GM management function. [Euphy]
//= 1.7 Added VIP features and created a reward function. [Euphy]
//= 1.8 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
//= 1.9 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -52,6 +47,8 @@ bat_room,2,151,3 script #bat_b02_timer 844,{
end;
OnInit:
if (getbattleflag("feature.bgqueue"))
end;
OnEnable:
initnpctimer;
end;
@@ -62,14 +59,21 @@ OnStop:
OnTimer1000:
stopnpctimer;
initnpctimer;
if (!getbattleflag("feature.bgqueue"))
initnpctimer;
set .@chk_bat_a01,getmapusers("bat_b02");
if (.@chk_bat_a01 < 1) {
set $@FlaviusBG2, 0;
if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; set $@FlaviusBG2_id1, 0; }
if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; set $@FlaviusBG2_id2, 0; }
donpcevent "start#bat_b02::OnReadyCheck";
if (getbattleflag("feature.bgqueue")) {
bg_unbook "bat_b01";
end;
} else
donpcevent "start#bat_b01::OnReadyCheck";
}
if (getbattleflag("feature.bgqueue"))
initnpctimer;
end;
}
@@ -84,22 +88,26 @@ OnInit:
OnReadyCheck:
if( $@FlaviusBG2 )
end;
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Huvas");
set .@Croix, getwaitingroomstate(0,"Lieutenant Yukon");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_b02_timer::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Huvas");
set .@Croix, getwaitingroomstate(0,"Lieutenant Yukon");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_b02_timer::OnStop";
end;
}
if( .@Guillaume < 10 || .@Croix < 10 )
end;
}
if( .@Guillaume < 10 || .@Croix < 10 )
end;
set $@FlaviusBG2, 1;
set $@FlaviusBG2_Victory, 0;
set $@Croix_ScoreBG2, 0;
set $@Guill_ScoreBG2, 0;
bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
donpcevent "Lieutenant Huvas::OnEnterBG";
donpcevent "Lieutenant Yukon::OnEnterBG";
if (!getbattleflag("feature.bgqueue")) {
donpcevent "Lieutenant Huvas::OnEnterBG";
donpcevent "Lieutenant Yukon::OnEnterBG";
}
donpcevent "OBJ#bat_b02_a::OnKill";
donpcevent "OBJ#bat_b02_a::OnEnable";
donpcevent "OBJ#bat_b02_b::OnKill";
@@ -143,7 +151,10 @@ OnReset:
OnGuillaumeQuit:
OnCroixQuit:
bg_leave;
if (getbattleflag("feature.bgqueue"))
bg_desert;
else
bg_leave;
end;
OnTimer10000:
@@ -406,7 +417,8 @@ bat_b02,10,294,3 script Guillaume Vintenar#b02_a 934,{
callfunc "F_BG_Badge",0,"Guillaume","Flavius";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -422,7 +434,8 @@ bat_b02,389,14,3 script Croix Vintenar#b02_b 934,{
callfunc "F_BG_Badge",0,"Croix","Flavius";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -580,3 +593,19 @@ bat_b02,1,10,3 script Release all#b02 81,{
}
}
}
// BG Queue makes these scripts useless
- script BGQueueInit#flavius02 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "Lieutenant Huvas";
unloadnpc "Lieutenant Yukon";
unloadnpc "back_bgroomb02a";
unloadnpc "back_bgroomb02b";
unloadnpc "A_CODE#bat_b02";
unloadnpc "B_CODE#bat_b02";
}
end;
}

View File

@@ -1,21 +1,18 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Flavius Entrance NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Flavius Battleground Entrance NPCs
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Flavius Officer - Guillaume
//============================================================
bat_room,133,178,5 script Flavius Officer#01a 418,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -83,6 +80,8 @@ bat_room,133,178,5 script Flavius Officer#01a 418,{
}
bat_room,133,121,1 script Flavius Officer#01b 414,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -163,35 +162,22 @@ bat_room,135,178,5 script Guillaume Knight#3 417,{
mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
next;
mes "[Guillaume Knight]";
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
else {
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
}
next;
mes "[Guillaume Knight]";
mes "Are you ready for battle? Then apply with the recruiter next to me!";
if (getbattleflag("feature.bgqueue"))
mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
else
mes "Are you ready for battle? Then apply with the recruiter next to me!";
close;
}
bat_room,151,178,5 script Guillaume Knight#4 417,{
mes "[Guillaume Knight]";
mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
next;
mes "[Guillaume Knight]";
mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
next;
mes "[Guillaume Knight]";
mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
next;
mes "[Guillaume Knight]";
mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
next;
mes "[Guillaume Knight]";
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
next;
mes "[Guillaume Knight]";
mes "Are you ready for battle? Then apply with the recruiter next to me!";
close;
}
bat_room,151,178,5 duplicate(Guillaume Knight#3) Guillaume Knight#4 417
bat_room,135,121,1 script Croix Knight#3 413,{
mes "[Croix Knight]";
@@ -207,39 +193,28 @@ bat_room,135,121,1 script Croix Knight#3 413,{
mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
next;
mes "[Croix Knight]";
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
else {
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
}
next;
mes "[Croix Knight]";
mes "Are you ready for battle? Then apply with the recruiter next to me!";
if (getbattleflag("feature.bgqueue"))
mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
else
mes "Are you ready for battle? Then apply with the recruiter next to me!";
close;
}
bat_room,151,121,1 script Croix Knight#4 413,{
mes "[Croix Knight]";
mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
next;
mes "[Croix Knight]";
mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
next;
mes "[Croix Knight]";
mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
next;
mes "[Croix Knight]";
mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
next;
mes "[Croix Knight]";
mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
next;
mes "[Croix Knight]";
mes "Are you ready for battle? Then apply with the recruiter next to me!";
close;
}
bat_room,151,121,1 duplicate(Croix Knight#3) Croix Knight#4 413
// Flavius Officer - Croix
//============================================================
bat_room,148,178,5 script Flavius Officer#02a 418,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -307,6 +282,8 @@ bat_room,148,178,5 script Flavius Officer#02a 418,{
}
bat_room,148,121,1 script Flavius Officer#02b 414,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";

View File

@@ -11,7 +11,8 @@
//= 1.2 Upated some announces and dialogs from iRO.
//= Changed how the scoreboard works slightly.
//= Removed the areapercentheals, and minor things.
//============================================================s
//= 1.3 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
//============================================================
@@ -81,7 +82,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,1;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -98,7 +100,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,2;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -117,7 +120,10 @@ OnInit:
end;
OnGuillaumeQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM01BG == 2 )
{
@@ -132,7 +138,10 @@ OnGuillaumeDie:
end;
OnCroixQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM01BG == 2 )
{
@@ -204,14 +213,16 @@ 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;
if (!getbattleflag("feature.bgqueue")) {
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;
@@ -316,6 +327,8 @@ OnTimer60000:
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; }
if (getbattleflag("feature.bgqueue"))
bg_unbook "bat_c01";
disablenpc "KVM Officer#KVM01A";
disablenpc "KVM Officer#KVM01B";
mapwarp "bat_c01","bat_room",154,150;
@@ -361,8 +374,23 @@ bat_c01,51,130,5 script KVM Officer#KVM01A 419,{
}
bg_leave;
set Bat_Team,0;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
}
end;
}
bat_c01,148,53,1 duplicate(KVM Officer#KVM01A) KVM Officer#KVM01B 415
// BG Queue makes these scripts useless
- script BGQueueInit#kvm01 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "KvM01R_Guillaume";
unloadnpc "KvM01R_Croix";
unloadnpc "#kvm801";
unloadnpc "#kvm802";
}
end;
}

View File

@@ -13,6 +13,7 @@
//= Removed the areapercentheals, and minor things.
//= 1.3 Fixed wrong names for disablenpc/enablenpc. [Ai4rei]
//= Fixed points in text and actual points differing.
//= 1.4 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -81,7 +82,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,1;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -98,7 +100,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,2;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -117,7 +120,10 @@ OnInit:
end;
OnGuillaumeQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM02BG == 2 )
{
@@ -132,7 +138,10 @@ OnGuillaumeDie:
end;
OnCroixQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM02BG == 2 )
{
@@ -204,14 +213,16 @@ OnTimer61000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM02BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM02BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
set $@KvM02BG_Victory, 3;
set $@KvM02BG, 3;
mapannounce "bat_c02","There are not enough players to start the battle",1,0x808080;
stopnpctimer;
donpcevent "KvM02_BG::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
if (.Guillaume_Count < 5 || .Croix_Count < 5) {
set $@KvM02BG_Victory, 3;
set $@KvM02BG, 3;
mapannounce "bat_c02","There are not enough players to start the battle",1,0x808080;
stopnpctimer;
donpcevent "KvM02_BG::OnStop";
end;
}
}
set $@KvM02BG, 2; // Playing
bg_warp $@KvM02BG_id1,"bat_c02",62,119;
@@ -316,6 +327,8 @@ OnTimer60000:
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; }
if (getbattleflag("feature.bgqueue"))
bg_unbook "bat_c02";
disablenpc "KVM Officer#KVM02A";
disablenpc "KVM Officer#KVM02B";
mapwarp "bat_c02","bat_room",154,150;
@@ -360,8 +373,23 @@ bat_c02,51,130,5 script KVM Officer#KVM02A 419,{
}
bg_leave;
set Bat_Team,0;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
}
}
bat_c02,148,53,1 duplicate(KVM Officer#KVM02A) KVM Officer#KVM02B 415
// BG Queue makes these scripts useless
- script BGQueueInit#kvm02 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "KvM02R_Guillaume";
unloadnpc "KvM02R_Croix";
unloadnpc "#kvm601";
unloadnpc "#kvm602";
}
end;
}

View File

@@ -12,6 +12,7 @@
//= Changed how the scoreboard works slightly.
//= Removed the areapercentheals, and minor things.
//= 1.3 Fixed wrong names for disablenpc/enablenpc. [Ai4rei]
//= 1.4 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -81,7 +82,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,1;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -98,7 +100,8 @@ OnDisable:
end;
OnTouch:
set Bat_Team,2;
setquest 6025;
if (!getbattleflag("feature.bgqueue"))
setquest 6025;
end;
}
@@ -117,7 +120,10 @@ OnInit:
end;
OnGuillaumeQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM03BG == 2 ) {
set .Guillaume_Count, .Guillaume_Count - 1;
@@ -132,7 +138,10 @@ OnGuillaumeDie:
end;
OnCroixQuit:
//set BG_Delay_Tick, gettimetick(2) + 1200;
if (getbattleflag("feature.bgqueue"))
bg_desert;
// else
// set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM03BG == 2 ) {
set .Croix_Count, .Croix_Count - 1;
@@ -204,14 +213,16 @@ OnTimer61000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM03BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM03BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
set $@KvM03BG_Victory, 3;
set $@KvM03BG, 3;
mapannounce "bat_c03","There are not enough players to start the battle",1,0xC0C0C0;
stopnpctimer;
donpcevent "KvM03_BG::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
if (.Guillaume_Count < 5 || .Croix_Count < 5) {
set $@KvM03BG_Victory, 3;
set $@KvM03BG, 3;
mapannounce "bat_c03","There are not enough players to start the battle",1,0xC0C0C0;
stopnpctimer;
donpcevent "KvM03_BG::OnStop";
end;
}
}
set $@KvM03BG, 2; // Playing
bg_warp $@KvM03BG_id1,"bat_c03",62,119;
@@ -316,6 +327,8 @@ OnTimer60000:
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; }
if (getbattleflag("feature.bgqueue"))
bg_unbook "bat_c03";
disablenpc "KVM Officer#KVM03A";
disablenpc "KVM Officer#KVM03B";
mapwarp "bat_c03","bat_room",154,150;
@@ -361,8 +374,23 @@ bat_c03,51,130,5 script KVM Officer#KVM03A 419,{
}
bg_leave;
set Bat_Team,0;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
}
end;
}
bat_c03,148,53,1 duplicate(KVM Officer#KVM03A) KVM Officer#KVM03B 415
// BG Queue makes these scripts useless
- script BGQueueInit#kvm03 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "KvM03R_Guillaume";
unloadnpc "KvM03R_Croix";
unloadnpc "#kvm701";
unloadnpc "#kvm702";
}
end;
}

View File

@@ -1,25 +1,22 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - KvM Entrance NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Kreiger Von Midgard Battleground Entrance NPCs
//= Original NPCs scrapped from bg_common.
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Corrected some typos, and shifted messages around.
//= Corrected iRO style quest log entries, however it's
//= advisable that you not use them, as they conflict.
//= 1.2 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// KvM Officer - Guillaume
//============================================================
bat_room,164,178,5 script KVM Mercenary Officer#1 418,{
if (getbattleflag("feature.bgqueue"))
end;
/*
set .@kvm,checkquest(6026,PLAYTIME);
if ((.@kvm == 0) || (.@kvm == 1)) {
@@ -67,8 +64,12 @@ bat_room,167,178,5 script Guillaume Knight#kvm 417,{
switch(select("Apply for KVM.:What is KVM?:How do I participate in KVM?:I want to know my Kreiger Points.")) {
case 1:
mes "[Guillaume Knight]";
mes "Applications are not available yet.";
mes "To apply, you need to go to a KVM Mercenary Officer.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready for battle, click the ^0000FFbattle button from the interface^000000 to apply for KVM battle!";
else {
mes "Applications are not available yet.";
mes "To apply, you need to go to a KVM Mercenary Officer.";
}
close;
case 2:
mes "[Guillaume Knight]";
@@ -93,21 +94,33 @@ bat_room,167,178,5 script Guillaume Knight#kvm 417,{
close;
case 3:
mes "[Guillaume Knight]";
mes "Basically, KVM is a 5 on 5 battle.";
mes "First, you apply with a KVM receptionist, in a group or individually.";
if (getbattleflag("feature.bgqueue")) {
mes "Basically, KVM is a 3 on 3 battle.";
mes "Apply by clicking on the ^0000FFbattle button from the interface^000000, as a group or individually.";
} else {
mes "Basically, KVM is a 5 on 5 battle.";
mes "First, you apply with a KVM receptionist, in a group or individually.";
}
next;
mes "[Guillaume Knight]";
mes "Group applications are for when you intend to enter the KVM with your party members,";
if (getbattleflag("feature.bgqueue"))
mes "Group applications are for when you intend to enter the KVM with your party or guild members,";
else
mes "Group applications are for when you intend to enter the KVM with your party members,";
mes "and a personal application is for when you intend to enter the KVM individually.";
next;
mes "[Guillaume Knight]";
mes "Please apply with a KVM officer, and he will contact you later when you are in Prontera.";
next;
mes "[Guillaume Knight]";
mes "Then you enter and follow the instructions in the battlefield.";
next;
mes "[Guillaume Knight]";
mes "However, please be advised that unless you are in the KVM office, he cannot contact you.";
if (getbattleflag("feature.bgqueue"))
mes "Please be noted, once you cancel you ^0000FFcannot apply again for 1 minute^000000.";
else {
mes "Please apply with a KVM officer, and he will contact you later when you are in Prontera.";
next;
mes "[Guillaume Knight]";
mes "Then you enter and follow the instructions in the battlefield.";
next;
mes "[Guillaume Knight]";
mes "However, please be advised that unless you are in the KVM office, he cannot contact you.";
}
close;
case 4:
mes "[Guillaume Knight]";
@@ -120,6 +133,8 @@ bat_room,167,178,5 script Guillaume Knight#kvm 417,{
// KvM Officer - Croix
//============================================================
bat_room,164,121,1 script KVM Mercenary Officer#2 414,{
if (getbattleflag("feature.bgqueue"))
end;
/*
set .@kvm,checkquest(6025,PLAYTIME);
if ((.@kvm == 0) || (.@kvm == 1)) {
@@ -167,8 +182,12 @@ bat_room,167,121,1 script Croix Knight#kvm 413,{
switch(select("Apply for KVM.:What is KVM?:How do I participate in KVM?:I want to know my Kreiger Points.")) {
case 1:
mes "[Croix Knight]";
mes "Applications are not available yet.";
mes "To apply, you need to go to a KVM Mercenary Officer.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready for battle, click the ^0000FFbattle button from the interface^000000 to apply for KVM battle!";
else {
mes "Applications are not available yet.";
mes "To apply, you need to go to a KVM Mercenary Officer.";
}
close;
case 2:
mes "[Croix Knight]";
@@ -193,21 +212,33 @@ bat_room,167,121,1 script Croix Knight#kvm 413,{
close;
case 3:
mes "[Croix Knight]";
mes "Basically, KVM is a 5 on 5 battle.";
mes "First, you apply with a KVM receptionist, in a group or individually.";
if (getbattleflag("feature.bgqueue")) {
mes "Basically, KVM is a 3 on 3 battle.";
mes "Apply by clicking on the ^0000FFbattle button from the interface^000000, as a group or individually.";
} else {
mes "Basically, KVM is a 5 on 5 battle.";
mes "First, you apply with a KVM receptionist, in a group or individually.";
}
next;
mes "[Croix Knight]";
mes "Group applications are for when you intend to enter the KVM with your party members,";
if (getbattleflag("feature.bgqueue"))
mes "Group applications are for when you intend to enter the KVM with your party or guild members,";
else
mes "Group applications are for when you intend to enter the KVM with your party members,";
mes "and a personal application is for when you intend to enter the KVM individually.";
next;
mes "[Croix Knight]";
mes "Please apply with a KVM officer, and he will contact you later when you are in Prontera.";
next;
mes "[Croix Knight]";
mes "Then you enter and follow the instructions in the battlefield.";
next;
mes "[Croix Knight]";
mes "However, please be advised that unless you are in the KVM office, he cannot contact you.";
if (getbattleflag("feature.bgqueue"))
mes "Please be noted, once you cancel you ^0000FFcannot apply again for 1 minute^000000.";
else {
mes "Please apply with a KVM officer, and he will contact you later when you are in Prontera.";
next;
mes "[Croix Knight]";
mes "Then you enter and follow the instructions in the battlefield.";
next;
mes "[Croix Knight]";
mes "However, please be advised that unless you are in the KVM office, he cannot contact you.";
}
close;
case 4:
mes "[Croix Knight]";

View File

@@ -1,12 +1,6 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - KvM Item Dealer
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Kreiger Von Midgard Battleground Point redemption NPC
//= * NOTE *
@@ -14,8 +8,8 @@
//= keep track of points. This NPC when talked to will
//= convert already-given tokens and convert them to points.
//= under the player variable kvm_point.
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//============================================================
bat_room,151,144,3 script KVM Logistic Officer#a 734,{

View File

@@ -1,24 +1,19 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Tierra Gorge
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Tierra Gorge Battleground.
//= - Winning Team: 3 badges (5 if VIP)
//= - Losing Team: 1 badge (3 if VIP)
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Corrected setwalls for barricades. [L0ne_W0lf]
//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//= 1.3 Removed MaxLvl check in waitingrooms.
//= 1.4 Label standardization. [Euphy]
//= 1.5 Added GM management function. [Euphy]
//= 1.6 Added VIP features and created a reward function. [Euphy]
//= 1.7 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -51,6 +46,8 @@ bat_room,1,151,3 script #bat_a01_timer 844,{
end;
OnInit:
if (getbattleflag("feature.bgqueue"))
end;
OnEnable:
initnpctimer;
end;
@@ -61,14 +58,21 @@ OnStop:
OnTimer1000:
stopnpctimer;
initnpctimer;
if (!getbattleflag("feature.bgqueue"))
initnpctimer;
set .@chk_bat_a01,getmapusers("bat_a01");
if (.@chk_bat_a01 < 1) {
set $@TierraBG1,0; set $@TierraBG1_Victory, 0;
if( $@TierraBG1_id1 ) { bg_destroy $@TierraBG1_id1; set $@TierraBG1_id1, 0; }
if( $@TierraBG1_id2 ) { bg_destroy $@TierraBG1_id2; set $@TierraBG1_id2, 0; }
donpcevent "start#bat_a01::OnReadyCheck";
if (getbattleflag("feature.bgqueue")) {
bg_unbook "bat_a01";
end;
} else
donpcevent "start#bat_a01::OnReadyCheck";
}
if (getbattleflag("feature.bgqueue"))
initnpctimer;
end;
}
@@ -124,23 +128,30 @@ OnEnable:
OnGuillaumeQuit:
OnCroixQuit:
bg_leave;
if (getbattleflag("feature.bgqueue"))
bg_desert;
else
bg_leave;
end;
OnReadyCheck:
if( $@TierraBG1 )
end;
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Kalos");
set .@Croix, getwaitingroomstate(0,"Lieutenant Eyor");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_a01_timer::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Kalos");
set .@Croix, getwaitingroomstate(0,"Lieutenant Eyor");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_a01_timer::OnStop";
end;
}
else if( .@Guillaume < 10 || .@Croix < 10 )
end;
}
else if( .@Guillaume < 10 || .@Croix < 10 )
end;
set $@TierraBG1,1;
donpcevent "Lieutenant Kalos::OnEnterBG";
donpcevent "Lieutenant Eyor::OnEnterBG";
if (!getbattleflag("feature.bgqueue")) {
donpcevent "Lieutenant Kalos::OnEnterBG";
donpcevent "Lieutenant Eyor::OnEnterBG";
}
donpcevent "start#bat_a01::OnEnable";
bg_warp $@TierraBG1_id1,"bat_a01",352,342;
bg_warp $@TierraBG1_id2,"bat_a01",353,52;
@@ -690,7 +701,8 @@ bat_a01,53,377,3 script Guillaume Vintenar#a01_a 419,{
callfunc "F_BG_Badge",1,"Guillaume","Tierra";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -712,7 +724,8 @@ bat_a01,45,19,3 script Croix Vintenar#a01_b 415,{
callfunc "F_BG_Badge",1,"Croix","Tierra";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -797,3 +810,21 @@ bat_a01,1,1,3 script Release all#a01 81,{
}
}
}
// BG Queue makes these scripts useless
- script BGQueueInit#tierra01 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "Lieutenant Kalos";
unloadnpc "Lieutenant Eyor";
unloadnpc "#bat_a01_quest_a";
unloadnpc "#bat_a01_quest_b";
unloadnpc "back_bgrooma01a";
unloadnpc "back_bgrooma01b";
unloadnpc "A_CODE#bat_a01";
unloadnpc "B_CODE#bat_a01";
}
end;
}

View File

@@ -1,23 +1,18 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Tierra Gorge 2
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Second Tierra Gorge Battleground.
//= - Winning Team: 3 badges (5 if VIP)
//= - Losing Team: 1 badge (3 if VIP)
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//= 1.2 Removed MaxLvl check in waitingrooms.
//= 1.3 Label standardization. [Euphy]
//= 1.4 Added GM management function. [Euphy]
//= 1.5 Added VIP features and created a reward function. [Euphy]
//= 1.6 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// Waiting Room NPCs
@@ -50,6 +45,8 @@ bat_room,1,151,3 script #bat_a02_timer 844,{
end;
OnInit:
if (getbattleflag("feature.bgqueue"))
end;
OnEnable:
initnpctimer;
end;
@@ -60,14 +57,21 @@ OnStop:
OnTimer1000:
stopnpctimer;
initnpctimer;
if (!getbattleflag("feature.bgqueue"))
initnpctimer;
set .@chk_bat_a02,getmapusers("bat_a02");
if (.@chk_bat_a02 < 1) {
set $@TierraBG2,0; set $@TierraBG2_Victory, 0;
if( $@TierraBG2_id1 ) { bg_destroy $@TierraBG2_id1; set $@TierraBG2_id1, 0; }
if( $@TierraBG2_id2 ) { bg_destroy $@TierraBG2_id2; set $@TierraBG2_id2, 0; }
donpcevent "start#bat_a02::OnReadyCheck";
if (getbattleflag("feature.bgqueue")) {
bg_unbook "bat_a02";
end;
} else
donpcevent "start#bat_a02::OnReadyCheck";
}
if (getbattleflag("feature.bgqueue"))
initnpctimer;
end;
}
@@ -123,23 +127,30 @@ OnEnable:
OnGuillaumeQuit:
OnCroixQuit:
bg_leave;
if (getbattleflag("feature.bgqueue"))
bg_desert;
else
bg_leave;
end;
OnReadyCheck:
if( $@TierraBG2 )
end;
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Rundel");
set .@Croix, getwaitingroomstate(0,"Lieutenant Guerrit");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_a02_timer::OnStop";
end;
if (!getbattleflag("feature.bgqueue")) {
set .@Guillaume, getwaitingroomstate(0,"Lieutenant Rundel");
set .@Croix, getwaitingroomstate(0,"Lieutenant Guerrit");
if( !.@Guillaume && !.@Croix ) {
donpcevent "#bat_a02_timer::OnStop";
end;
}
else if( .@Guillaume < 10 || .@Croix < 10 )
end;
}
else if( .@Guillaume < 10 || .@Croix < 10 )
end;
set $@TierraBG2,1;
donpcevent "Lieutenant Rundel::OnEnterBG";
donpcevent "Lieutenant Guerrit::OnEnterBG";
if (!getbattleflag("feature.bgqueue")) {
donpcevent "Lieutenant Rundel::OnEnterBG";
donpcevent "Lieutenant Guerrit::OnEnterBG";
}
donpcevent "start#bat_a02::OnEnable";
bg_warp $@TierraBG2_id1,"bat_a02",352,342;
bg_warp $@TierraBG2_id2,"bat_a02",353,52;
@@ -689,7 +700,8 @@ bat_a02,53,377,3 script Guillaume Vintenar#a02_a 419,{
callfunc "F_BG_Badge",1,"Guillaume","Tierra";
}
bg_leave;
warp "bat_room",154,150;
if (!getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -711,7 +723,8 @@ bat_a02,45,19,3 script Croix Vintenar#a02_b 415,{
callfunc "F_BG_Badge",1,"Croix","Tierra";
}
bg_leave;
warp "bat_room",154,150;
if (getbattleflag("feature.bgqueue"))
warp "bat_room",154,150;
end;
OnInit:
@@ -796,3 +809,21 @@ bat_a02,1,1,3 script Release all#a02 81,{
}
}
}
// BG Queue makes these scripts useless
- script BGQueueInit#tierra02 -1,{
end;
OnInit:
if (getbattleflag("feature.bgqueue")) {
unloadnpc "Lieutenant Rundel";
unloadnpc "Lieutenant Guerrit";
unloadnpc "#bat_a02_quest_a";
unloadnpc "#bat_a02_quest_b";
unloadnpc "back_bgrooma02a";
unloadnpc "back_bgrooma02b";
unloadnpc "A_CODE#bat_a02";
unloadnpc "B_CODE#bat_a02";
}
end;
}

View File

@@ -1,22 +1,19 @@
//===== rAthena Script =======================================
//===== rAthena Script =======================================
//= BattleGround System - Tierra Gorge Entrance NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//===== Description: =========================================
//= [Official Conversion]
//= Tierra Gorge Battleground Entrance NPCs
//===== Additional Comments: =================================
//= 1.0 First Version.
//===== Additional Comments: =================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Fixed silly copy paste errors. (bugreport:4401)
//= 1.2 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================
// First Tierra Gorge Officers - Guillaume
//============================================================
bat_room,124,178,5 script Tierra Gorge Officer#01a 418,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -84,6 +81,8 @@ bat_room,124,178,5 script Tierra Gorge Officer#01a 418,{
}
bat_room,140,178,5 script Tierra Gorge Officer#02a 418,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -166,37 +165,22 @@ bat_room,127,178,5 script Guillaume Knight#1 417,{
mes "Think and move as quickly as you can. The victory of your army relies on your contribution.";
next;
mes "[Guillaume Knight]";
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
else {
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
}
next;
mes "[Guillaume Knight]";
mes "Are you ready to battle? Then apply with the recruiter next to me!";
if (getbattleflag("feature.bgqueue"))
mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
else
mes "Are you ready to battle? Then apply with the recruiter next to me!";
close;
}
bat_room,143,178,5 script Guillaume Knight#2 417,{
mes "[Guillaume Knight]";
mes "Tierra Gorge consists of two steep sides placed vertically, and has ration depots for the Guillaume and Croix Armies at the 11 and 7 o'clock directions.";
next;
mes "[Guillaume Knight]";
mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
next;
mes "[Guillaume Knight]";
mes "The healer of the battlefield will resurrect soldiers once every 25 seconds so that they can rejoin the battle.";
mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
next;
mes "[Guillaume Knight]";
mes "Those two rations depots are connected to each other through short and narrow paths, but the gates are blocked with barricades.";
mes "Think and move as quickly as you can. The victory of your army relies on your contribution.";
next;
mes "[Guillaume Knight]";
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
next;
mes "[Guillaume Knight]";
mes "Are you ready to battle? Then apply with the recruiter next to me!";
close;
}
bat_room,143,178,5 duplicate(Guillaume Knight#1) Guillaume Knight#2 417
bat_room,127,121,1 script Croix Knight#1 413,{
mes "[Croix Knight]";
@@ -214,41 +198,28 @@ bat_room,127,121,1 script Croix Knight#1 413,{
mes "Think and move as quickly as you can. The victory of your army relies on your contribution.";
next;
mes "[Croix Knight]";
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
if (getbattleflag("feature.bgqueue"))
mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
else {
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
}
next;
mes "[Croix Knight]";
mes "Are you ready to battle? Then apply with the recruiter next to me!";
if (getbattleflag("feature.bgqueue"))
mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
else
mes "Are you ready to battle? Then apply with the recruiter next to me!";
close;
}
bat_room,143,121,1 script Croix Knight#2 413,{
mes "[Croix Knight]";
mes "Tierra Gorge consists of two steep sides placed vertically, and has ration depots for the Guillaume and Croix Armies at the 11 and 7 o'clock directions.";
next;
mes "[Croix Knight]";
mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
next;
mes "[Croix Knight]";
mes "The healer of the battlefield will resurrect soldiers once every 25 seconds so that they can rejoin the battle.";
mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
next;
mes "[Croix Knight]";
mes "Those two rations depots are connected to each other through short and narrow paths, but the gates are blocked with barricades.";
mes "Think and move as quickly as you can. The victory of your army relies on your contribution.";
next;
mes "[Croix Knight]";
mes "Please remember: when you join a battle, you will receive a token which indicates the set duration for which you cannot participate in the same type of battle.";
mes "You may check the duration by pressing the Alt+U keys.";
next;
mes "[Croix Knight]";
mes "Are you ready to battle? Then apply with the recruiter next to me!";
close;
}
bat_room,143,121,1 duplicate(Croix Knight#1) Croix Knight#2 413
// Second Tierra Gorge Officers - Croix
//============================================================
bat_room,125,121,1 script Tierra Gorge Officer#01b 414,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
@@ -316,6 +287,8 @@ bat_room,125,121,1 script Tierra Gorge Officer#01b 414,{
}
bat_room,140,121,1 script Tierra Gorge Officer#02b 414,{
if (getbattleflag("feature.bgqueue"))
end;
if (checkweight(1201,1) == 0) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";

File diff suppressed because it is too large Load Diff

View File

@@ -1,428 +0,0 @@
// ==============================================================================
// BattleGround System - Flavius 1
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,86,227,4 script Registration::Fl1R_Guillaume 418,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Flavius_BG1::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",390,10,"Flavius_BG1::OnGuillaumeQuit","");
end;
}
bat_room,85,204,0 script Registration::Fl1R_Croix 414,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Flavius_BG1::OnCroixJoin",1;
end;
OnEnterBG:
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",10,290,"Flavius_BG1::OnCroixQuit","");
end;
}
// Battleground Engine
// *********************************************************************
- script Flavius_BG1 -1,{
end;
OnInit:
disablenpc "Guillaume Vintenar#fl1";
disablenpc "Croix Vintenar#fl1";
disablenpc "Therapist in battle#fl11";
disablenpc "Therapist in battle#fl12";
end;
OnGuillaumeQuit:
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
end;
OnGuillaumeJoin:
OnCroixJoin:
if( $@FlaviusBG1 == 0 )
donpcevent "Flavius_BG1::OnReadyCheck";
end;
OnReadyCheck:
if( $@FlaviusBG1 )
end;
set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");
set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x006400;
end;
}
// BG Variables
set $@FlaviusBG1, 1;
set $@FlaviusBG1_Victory, 0;
set .Guillaume_Score, 0;
set .Guillaume_Loss, 0;
set .Croix_Score, 0;
set .Croix_Loss, 0;
set .Match, 0;
// Prepare NPC
donpcevent "#gfl1_respawn::OnBGStart";
donpcevent "#cfl1_respawn::OnBGStart";
enablenpc "Therapist in battle#fl11";
enablenpc "Therapist in battle#fl12";
disablenpc "Guillaume Vintenar#fl1";
disablenpc "Croix Vintenar#fl1";
// Build and Warp Teams
donpcevent "Fl1R_Guillaume::OnEnterBG";
donpcevent "Fl1R_Croix::OnEnterBG";
announce "Battleground -- Flavius [80-99] has started!",0,0x006400;
initnpctimer;
// Start Match!!
OnRoundStart:
sleep 2000;
if( $@FlaviusBG1 != 1 ) end;
areapercentheal "bat_b01",382,2,397,17,100,100;
areapercentheal "bat_b01",2,282,17,297,100,100;
bg_warp $@FlaviusBG1_id1,"bat_b01",311,224;
bg_warp $@FlaviusBG1_id2,"bat_b01",87,75;
sleep 2000;
if( $@FlaviusBG1 != 1 ) end;
set .Match, .Match + 1;
// Crystal Spawn
set .Guillaume_Crystal, bg_monster($@FlaviusBG1_id1,"bat_b01",328,150,"Crystal Guillaume",1914,"Flavius_BG1::OnGuillaumeBreak");
setcell "bat_b01",327,151,329,149,cell_basilica,1;
setcell "bat_b01",327,151,329,149,cell_walkable,1;
set .Croix_Crystal, bg_monster($@FlaviusBG1_id2,"bat_b01",62,150,"Crystal Croix",1915,"Flavius_BG1::OnCroixBreak");
setcell "bat_b01",62,149,60,151,cell_basilica,1;
setcell "bat_b01",62,149,60,151,cell_walkable,1;
// Guardian Spawns
bg_monster $@FlaviusBG1_id1,"bat_b01",328,160,"Guillaume Guardian",1949,"Flavius_BG1::OnGuiGuardian";
bg_monster $@FlaviusBG1_id1,"bat_b01",328,140,"Guillaume Guardian",1950,"Flavius_BG1::OnGuiGuardian";
set .Guillaume_Guardian, 2;
bg_monster $@FlaviusBG1_id2,"bat_b01",62,160,"Croix Guardian",1949,"Flavius_BG1::OnCroGuardian";
bg_monster $@FlaviusBG1_id2,"bat_b01",61,140,"Croix Guardian",1950,"Flavius_BG1::OnCroGuardian";
set .Croix_Guardian, 2;
// Announces
mapannounce "bat_b01","The Battle of Flavius [ " + .Match + " ] Round has begun!!",1,0x006400;
end;
OnRoundStop:
// Remove Monsters
killmonster "bat_b01","Flavius_BG1::OnGuiGuardian";
killmonster "bat_b01","Flavius_BG1::OnCroGuardian";
setcell "bat_b01",327,151,329,149,cell_walkable,0;
setcell "bat_b01",327,151,329,149,cell_basilica,0;
killmonster "bat_b01","Flavius_BG1::OnGuillaumeBreak";
setcell "bat_b01",62,149,60,151,cell_walkable,0;
setcell "bat_b01",62,149,60,151,cell_basilica,0;
killmonster "bat_b01","Flavius_BG1::OnCroixBreak";
end;
OnGuiGuardian:
if( set(.Guillaume_Guardian, .Guillaume_Guardian - 1) <= 0 )
{
setcell "bat_b01",327,151,329,149,cell_walkable,0;
setcell "bat_b01",327,151,329,149,cell_basilica,0;
mapannounce "bat_b01","The Guillaume Crystal is vulnerable to attack!",1,0x0000FF;
}
end;
OnCroGuardian:
if( set(.Croix_Guardian, .Croix_Guardian - 1) <= 0 )
{
setcell "bat_b01",62,149,60,151,cell_walkable,0;
setcell "bat_b01",62,149,60,151,cell_basilica,0;
mapannounce "bat_b01","The Croix Crystal is vulnerable to attack!",1,0xFF0000;
}
end;
OnGuillaumeBreak:
donpcevent "Flavius_BG1::OnRoundStop";
set .Guillaume_Loss, .Guillaume_Loss + 1;
if( set(.Croix_Score, .Croix_Score + 1) < 2 )
{
bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b01","The Guillaume Crystal has been destroyed!",1,0x0000FF;
donpcevent "Flavius_BG1::OnRoundStart";
}
else
{
bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b01","The Croix army has won the Battle of Flavius!",1,0xFF0000;
set $@FlaviusBG1_Victory, 2;
donpcevent "Flavius_BG1::OnMatchEnd";
}
end;
OnCroixBreak:
donpcevent "Flavius_BG1::OnRoundStop";
set .Croix_Loss, .Croix_Loss + 1;
if( set(.Guillaume_Score, .Guillaume_Score + 1) < 2 )
{
bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b01","The Croix Crystal has been destroyed!",1,0xFF0000;
donpcevent "Flavius_BG1::OnRoundStart";
}
else
{
bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius!",1,0x0000FF;
set $@FlaviusBG1_Victory, 1;
donpcevent "Flavius_BG1::OnMatchEnd";
}
end;
OnTimer2400000:
mapannounce "bat_b01","Battle of Flavius will ends in 5 minutes",1,0x006400;
end;
OnTimer2640000:
mapannounce "bat_b01","Battle of Flavius will ends in 1 minute",1,0x006400;
end;
OnTimer2700000:
if( .Croix_Score > .Guillaume_Score )
{
mapannounce "bat_b01","The Croix army has won the Battle of Flavius!",1,0xFF0000;
set $@FlaviusBG1_Victory, 2;
}
else if( .Croix_Score < .Guillaume_Score )
{
mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius!",1,0x0000FF;
set $@FlaviusBG1_Victory, 1;
}
else
{
mapannounce "bat_b01","The Battle of Flavius is over. The time is out, this is a Tie",1,0x006400;
set $@FlaviusBG1_Victory, 3;
}
OnMatchEnd:
set $@FlaviusBG1, 2;
stopnpctimer;
donpcevent "#gfl1_respawn::OnBGStop";
donpcevent "#cfl1_respawn::OnBGStop";
disablenpc "Therapist in battle#fl11";
disablenpc "Therapist in battle#fl12";
enablenpc "Guillaume Vintenar#fl1";
enablenpc "Croix Vintenar#fl1";
sleep 2000;
bg_warp $@FlaviusBG1_id1,"bat_b01",390,10;
bg_warp $@FlaviusBG1_id2,"bat_b01",10,290;
sleep 3000;
mapannounce "bat_b01","Battle of Flavius will close in 1 minute!",1,0x006400;
initnpctimer;
end;
OnTimer30000:
if( $@FlaviusBG1 == 2 )
mapannounce "bat_b01","Battle of Flavius will close in 30 seconds!",1,0x006400;
end;
OnTimer50000:
if( $@FlaviusBG1 == 2 )
mapannounce "bat_b01","Battle of Flavius will close in 10 seconds!",1,0x006400;
end;
OnTimer60000:
if( $@FlaviusBG1 != 2 )
end;
OnReset:
stopnpctimer;
donpcevent "Flavius_BG1::OnRoundStop";
set .Guillaume_Score, 0;
set .Guillaume_Crystal, 0;
set .Guillaume_Loss, 0;
set .Croix_Score, 0;
set .Croix_Crystal, 0;
set .Croix_Loss, 0;
set .Match, 0;
set $@FlaviusBG1_Victory, 0;
// NPC's
disablenpc "Guillaume Vintenar#fl1";
disablenpc "Croix Vintenar#fl1";
disablenpc "Therapist in battle#fl11";
disablenpc "Therapist in battle#fl12";
if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; }
if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; }
sleep 1000;
mapwarp "bat_b01","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_b01",0,3; // Just in case someone else
sleep 2000;
bg_updatescore "bat_b01",0,0;
set $@FlaviusBG1, 0;
donpcevent "Flavius_BG1::OnReadyCheck";
end;
}
// Battleground rewards
// *********************************************************************
bat_b01,390,13,5 script Guillaume Vintenar#fl1 419,{
if( $@FlaviusBG1_Victory )
{
if( $@FlaviusBG1_Victory == Bat_Team )
{ // Victory
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
set .@Reward, 9;
}
else
{ //
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
set .@Reward, 3;
}
setquest 2070;
getitem 7829, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_b01,10,293,5 script Croix Vintenar#fl1 415,{
if( $@FlaviusBG1_Victory )
{
if( $@FlaviusBG1_Victory == Bat_Team )
{ // Victory
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
set .@Reward, 9;
}
else
{ //
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
set .@Reward, 3;
}
setquest 2070;
getitem 7829, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
// Battleground Therapist
// *********************************************************************
bat_b01,390,13,5 script Therapist in battle#fl12 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_b01,10,293,5 script Therapist in battle#fl11 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground Respawn
// *********************************************************************
bat_b01,390,10,0 script #gfl1_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_b01",382,2,397,17,100,100;
areawarp "bat_b01",382,2,397,17,"bat_b01",311,224;
initnpctimer;
end;
}
bat_b01,10,290,0 script #cfl1_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_b01",2,282,17,297,100,100;
areawarp "bat_b01",2,282,17,297,"bat_b01",87,75;
initnpctimer;
end;
}
// Flags
// *********************************************************************
bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat1 973
bat_b01,319,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat2 973
bat_b01,304,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat3 973
bat_b01,319,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat4 973
bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat5 973
bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat6 973
bat_b01,335,142,1 duplicate(Guillaume camp#bat) Guillaume camp#bat7 973
bat_b01,335,157,1 duplicate(Guillaume camp#bat) Guillaume camp#bat8 973
bat_b01,390,16,1 duplicate(Guillaume camp#bat) Guillaume camp#bat9 973
bat_b01,292,163,1 duplicate(Guillaume camp#bat) Guillaume camp#bat19 973
bat_b01,292,136,1 duplicate(Guillaume camp#bat) Guillaume camp#bat20 973
bat_b01,241,185,1 duplicate(Guillaume camp#bat) Guillaume camp#bat21 973
bat_b01,247,179,1 duplicate(Guillaume camp#bat) Guillaume camp#bat22 973
bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat1 974
bat_b01,96,68,1 duplicate(Croix camp#bat) Croix camp#bat2 974
bat_b01,79,81,1 duplicate(Croix camp#bat) Croix camp#bat3 974
bat_b01,79,68,1 duplicate(Croix camp#bat) Croix camp#bat4 974
bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat5 974
bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat6 974
bat_b01,59,164,1 duplicate(Croix camp#bat) Croix camp#bat7 974
bat_b01,59,137,1 duplicate(Croix camp#bat) Croix camp#bat8 974
bat_b01,10,296,1 duplicate(Croix camp#bat) Croix camp#bat9 974
bat_b01,110,162,1 duplicate(Croix camp#bat) Croix camp#bat18 974
bat_b01,110,137,1 duplicate(Croix camp#bat) Croix camp#bat19 974
bat_b01,152,120,1 duplicate(Croix camp#bat) Croix camp#bat20 974
bat_b01,158,114,1 duplicate(Croix camp#bat) Croix camp#bat21 974

View File

@@ -1,428 +0,0 @@
// ==============================================================================
// BattleGround System - Flavius 2
// ==============================================================================
// Registration NPC's
// *********************************************************************
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;
}
// Battleground Engine
// *********************************************************************
- script Flavius_BG2 -1,{
end;
OnInit:
disablenpc "Guillaume Vintenar#fl2";
disablenpc "Croix Vintenar#fl2";
disablenpc "Therapist in battle#fl21";
disablenpc "Therapist in battle#fl22";
end;
OnGuillaumeQuit:
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
end;
OnGuillaumeJoin:
OnCroixJoin:
if( $@FlaviusBG2 == 0 )
donpcevent "Flavius_BG2::OnReadyCheck";
end;
OnReadyCheck:
if( $@FlaviusBG2 )
end;
set .@Guillaume, getwaitingroomstate(0,"Fl2R_Guillaume");
set .@Croix, getwaitingroomstate(0,"Fl2R_Croix");
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x808000;
end;
}
// BG Variables
set $@FlaviusBG2, 1;
set $@FlaviusBG2_Victory, 0;
set .Guillaume_Score, 0;
set .Guillaume_Loss, 0;
set .Croix_Score, 0;
set .Croix_Loss, 0;
set .Match, 0;
// Prepare NPC
donpcevent "#gfl2_respawn::OnBGStart";
donpcevent "#cfl2_respawn::OnBGStart";
enablenpc "Therapist in battle#fl21";
enablenpc "Therapist in battle#fl22";
disablenpc "Guillaume Vintenar#fl2";
disablenpc "Croix Vintenar#fl2";
// Build and Warp Teams
donpcevent "Fl2R_Guillaume::OnEnterBG";
donpcevent "Fl2R_Croix::OnEnterBG";
announce "Battleground -- Flavius [80-99] has started!",0,0x808000;
initnpctimer;
// Start Match!!
OnRoundStart:
sleep 2000;
if( $@FlaviusBG2 != 1 ) end;
areapercentheal "bat_b02",382,2,397,17,100,100;
areapercentheal "bat_b02",2,282,17,297,100,100;
bg_warp $@FlaviusBG2_id1,"bat_b02",311,224;
bg_warp $@FlaviusBG2_id2,"bat_b02",87,75;
sleep 2000;
if( $@FlaviusBG2 != 1 ) end;
set .Match, .Match + 1;
// Crystal Spawn
set .Guillaume_Crystal, bg_monster($@FlaviusBG2_id1,"bat_b02",328,150,"Crystal Guillaume",1914,"Flavius_BG2::OnGuillaumeBreak");
setcell "bat_b02",327,151,329,149,cell_basilica,1;
setcell "bat_b02",327,151,329,149,cell_walkable,1;
set .Croix_Crystal, bg_monster($@FlaviusBG2_id2,"bat_b02",62,150,"Crystal Croix",1915,"Flavius_BG2::OnCroixBreak");
setcell "bat_b02",62,149,60,151,cell_basilica,1;
setcell "bat_b02",62,149,60,151,cell_walkable,1;
// Guardian Spawns
bg_monster $@FlaviusBG2_id1,"bat_b02",328,160,"Guillaume Guardian",1949,"Flavius_BG2::OnGuiGuardian";
bg_monster $@FlaviusBG2_id1,"bat_b02",328,140,"Guillaume Guardian",1950,"Flavius_BG2::OnGuiGuardian";
set .Guillaume_Guardian, 2;
bg_monster $@FlaviusBG2_id2,"bat_b02",62,160,"Croix Guardian",1949,"Flavius_BG2::OnCroGuardian";
bg_monster $@FlaviusBG2_id2,"bat_b02",61,140,"Croix Guardian",1950,"Flavius_BG2::OnCroGuardian";
set .Croix_Guardian, 2;
// Announces
mapannounce "bat_b02","The Battle of Flavius [ " + .Match + " ] Round has begun!!",1,0x808000;
end;
OnRoundStop:
// Remove Monsters
killmonster "bat_b02","Flavius_BG2::OnGuiGuardian";
killmonster "bat_b02","Flavius_BG2::OnCroGuardian";
setcell "bat_b02",327,151,329,149,cell_walkable,0;
setcell "bat_b02",327,151,329,149,cell_basilica,0;
killmonster "bat_b02","Flavius_BG2::OnGuillaumeBreak";
setcell "bat_b02",62,149,60,151,cell_walkable,0;
setcell "bat_b02",62,149,60,151,cell_basilica,0;
killmonster "bat_b02","Flavius_BG2::OnCroixBreak";
end;
OnGuiGuardian:
if( set(.Guillaume_Guardian, .Guillaume_Guardian - 1) <= 0 )
{
setcell "bat_b02",327,151,329,149,cell_walkable,0;
setcell "bat_b02",327,151,329,149,cell_basilica,0;
mapannounce "bat_b02","The Guillaume Crystal is vulnerable to attack!",1,0x0000FF;
}
end;
OnCroGuardian:
if( set(.Croix_Guardian, .Croix_Guardian - 1) <= 0 )
{
setcell "bat_b02",62,149,60,151,cell_walkable,0;
setcell "bat_b02",62,149,60,151,cell_basilica,0;
mapannounce "bat_b02","The Croix Crystal is vulnerable to attack!",1,0xFF0000;
}
end;
OnGuillaumeBreak:
donpcevent "Flavius_BG2::OnRoundStop";
set .Guillaume_Loss, .Guillaume_Loss + 1;
if( set(.Croix_Score, .Croix_Score + 1) < 2 )
{
bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b02","The Guillaume Crystal has been destroyed!",1,0x0000FF;
donpcevent "Flavius_BG2::OnRoundStart";
}
else
{
bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b02","The Croix army has won the Battle of Flavius!",1,0xFF0000;
set $@FlaviusBG2_Victory, 2;
donpcevent "Flavius_BG2::OnMatchEnd";
}
end;
OnCroixBreak:
donpcevent "Flavius_BG2::OnRoundStop";
set .Croix_Loss, .Croix_Loss + 1;
if( set(.Guillaume_Score, .Guillaume_Score + 1) < 2 )
{
bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b02","The Croix Crystal has been destroyed!",1,0xFF0000;
donpcevent "Flavius_BG2::OnRoundStart";
}
else
{
bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score;
mapannounce "bat_b02","The Guillaume army has won the Battle of Flavius!",1,0x0000FF;
set $@FlaviusBG2_Victory, 1;
donpcevent "Flavius_BG2::OnMatchEnd";
}
end;
OnTimer2400000:
mapannounce "bat_b02","Battle of Flavius will ends in 5 minutes",1,0x808000;
end;
OnTimer2640000:
mapannounce "bat_b02","Battle of Flavius will ends in 1 minute",1,0x808000;
end;
OnTimer2700000:
if( .Croix_Score > .Guillaume_Score )
{
mapannounce "bat_b02","The Croix army has won the Battle of Flavius!",1,0xFF0000;
set $@FlaviusBG2_Victory, 2;
}
else if( .Croix_Score < .Guillaume_Score )
{
mapannounce "bat_b02","The Guillaume army has won the Battle of Flavius!",1,0x0000FF;
set $@FlaviusBG2_Victory, 1;
}
else
{
mapannounce "bat_b02","The Battle of Flavius is over. The time is out, this is a Tie",1,0x808000;
set $@FlaviusBG2_Victory, 3;
}
OnMatchEnd:
set $@FlaviusBG2, 2;
stopnpctimer;
donpcevent "#gfl2_respawn::OnBGStop";
donpcevent "#cfl2_respawn::OnBGStop";
disablenpc "Therapist in battle#fl21";
disablenpc "Therapist in battle#fl22";
enablenpc "Guillaume Vintenar#fl2";
enablenpc "Croix Vintenar#fl2";
sleep 2000;
bg_warp $@FlaviusBG2_id1,"bat_b02",390,10;
bg_warp $@FlaviusBG2_id2,"bat_b02",10,290;
sleep 3000;
mapannounce "bat_b02","Battle of Flavius will close in 1 minute!",1,0x808000;
initnpctimer;
end;
OnTimer30000:
if( $@FlaviusBG2 == 2 )
mapannounce "bat_b02","Battle of Flavius will close in 30 seconds!",1,0x808000;
end;
OnTimer50000:
if( $@FlaviusBG2 == 2 )
mapannounce "bat_b02","Battle of Flavius will close in 10 seconds!",1,0x808000;
end;
OnTimer60000:
if( $@FlaviusBG2 != 2 )
end;
OnReset:
stopnpctimer;
donpcevent "Flavius_BG2::OnRoundStop";
set .Guillaume_Score, 0;
set .Guillaume_Crystal, 0;
set .Guillaume_Loss, 0;
set .Croix_Score, 0;
set .Croix_Crystal, 0;
set .Croix_Loss, 0;
set .Match, 0;
set $@FlaviusBG2_Victory, 0;
// NPC's
disablenpc "Guillaume Vintenar#fl2";
disablenpc "Croix Vintenar#fl2";
disablenpc "Therapist in battle#fl21";
disablenpc "Therapist in battle#fl22";
if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; set $@FlaviusBG2_id1, 0; }
if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; set $@FlaviusBG2_id2, 0; }
sleep 1000;
mapwarp "bat_b02","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_b02",0,3; // Just in case someone else
sleep 2000;
bg_updatescore "bat_b02",0,0;
set $@FlaviusBG2, 0;
donpcevent "Flavius_BG2::OnReadyCheck";
end;
}
// Battleground rewards
// *********************************************************************
bat_b02,390,13,5 script Guillaume Vintenar#fl2 419,{
if( $@FlaviusBG2_Victory )
{
if( $@FlaviusBG2_Victory == Bat_Team )
{ // Victory
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
set .@Reward, 9;
}
else
{ //
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
set .@Reward, 3;
}
setquest 2070;
getitem 7829, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_b02,10,293,5 script Croix Vintenar#fl2 415,{
if( $@FlaviusBG2_Victory )
{
if( $@FlaviusBG2_Victory == Bat_Team )
{ // Victory
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
set .@Reward, 9;
}
else
{ //
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
set .@Reward, 3;
}
setquest 2070;
getitem 7829, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
// Battleground Therapist
// *********************************************************************
bat_b02,390,13,5 script Therapist in battle#fl22 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_b02,10,293,5 script Therapist in battle#fl21 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground Respawn
// *********************************************************************
bat_b02,390,10,0 script #gfl2_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_b02",382,2,397,17,100,100;
areawarp "bat_b02",382,2,397,17,"bat_b02",311,224;
initnpctimer;
end;
}
bat_b02,10,290,0 script #cfl2_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_b02",2,282,17,297,100,100;
areawarp "bat_b02",2,282,17,297,"bat_b02",87,75;
initnpctimer;
end;
}
// Flags
// *********************************************************************
bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat32 973
bat_b02,319,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat33 973
bat_b02,304,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat34 973
bat_b02,319,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat35 973
bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat36 973
bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat37 973
bat_b02,335,142,1 duplicate(Guillaume camp#bat) Guillaume camp#bat38 973
bat_b02,335,157,1 duplicate(Guillaume camp#bat) Guillaume camp#bat39 973
bat_b02,390,16,1 duplicate(Guillaume camp#bat) Guillaume camp#bat40 973
bat_b02,292,163,1 duplicate(Guillaume camp#bat) Guillaume camp#bat41 973
bat_b02,292,136,1 duplicate(Guillaume camp#bat) Guillaume camp#bat42 973
bat_b02,241,185,1 duplicate(Guillaume camp#bat) Guillaume camp#bat43 973
bat_b02,247,179,1 duplicate(Guillaume camp#bat) Guillaume camp#bat44 973
bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat30 974
bat_b02,96,68,1 duplicate(Croix camp#bat) Croix camp#bat31 974
bat_b02,79,81,1 duplicate(Croix camp#bat) Croix camp#bat32 974
bat_b02,79,68,1 duplicate(Croix camp#bat) Croix camp#bat33 974
bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat34 974
bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat35 974
bat_b02,59,164,1 duplicate(Croix camp#bat) Croix camp#bat36 974
bat_b02,59,137,1 duplicate(Croix camp#bat) Croix camp#bat37 974
bat_b02,10,296,1 duplicate(Croix camp#bat) Croix camp#bat38 974
bat_b02,110,162,1 duplicate(Croix camp#bat) Croix camp#bat39 974
bat_b02,110,137,1 duplicate(Croix camp#bat) Croix camp#bat40 974
bat_b02,152,120,1 duplicate(Croix camp#bat) Croix camp#bat41 974
bat_b02,158,114,1 duplicate(Croix camp#bat) Croix camp#bat42 974

View File

@@ -1,378 +0,0 @@
// ==============================================================================
// BattleGround System - KvM 80~99
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,253,227,4 script Registration::KvM01R_Guillaume 418,{ // KvM Guillaume
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
}
bat_room,253,204,0 script Registration::KvM01R_Croix 414,{ // KvM Croix
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnCroixJoin",1;
end;
OnEnterBG:
set $@KvM01BG_id2, waitingroom2bg("bat_c01",146,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie");
end;
}
// Light Effects
// *********************************************************************
bat_c01,54,123,0 script #bat_c01a 111,{
end;
OnKvM01LightA: specialeffect EF_BEGINSPELL2; end;
OnKvM01LightB: specialeffect EF_BEGINSPELL3; end;
OnKvM01LightC: specialeffect EF_BEGINSPELL4; end;
}
bat_c01,56,125,0 duplicate(#bat_c01a) #bat_c01b 111
bat_c01,58,127,0 duplicate(#bat_c01a) #bat_c01c 111
bat_c01,141,56,0 duplicate(#bat_c01a) #bat_c01d 111
bat_c01,143,58,0 duplicate(#bat_c01a) #bat_c01e 111
bat_c01,145,60,0 duplicate(#bat_c01a) #bat_c01f 111
// 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 "TherapistKvM01a";
disablenpc "TherapistKvM01b";
disablenpc "VintenarKvM01a";
disablenpc "VintenarKvM01b";
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;
set .Croix_Score, .Croix_Score + 1;
bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score;
if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin";
}
end;
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM01BG == 2 )
{
set .Croix_Count, .Croix_Count - 1;
set .Guillaume_Score, .Guillaume_Score + 1;
bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score;
if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin";
}
end;
OnReadyCheck:
if( $@KvM01BG )
end;
set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume");
set .@Croix, getwaitingroomstate(0,"KvM01R_Croix");
if( .@Guillaume < 5 || .@Croix < 5 )
{
if( .@Guillaume > 3 && .@Croix > 3 && !agitcheck() && !agitcheck2() && $@KvM_Flood < gettimetick(2) )
{
announce "Battleground -- Kreiger Von Midgard [80-99] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",0,0x696969;
set $@KvM_Flood, gettimetick(2) + 15;
}
else
mapannounce "bat_room","Battleground -- Kreiger Von Midgard [80-99] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",1,0x696969;
end;
}
set $@KvM01BG, 1; // Starting
donpcevent "KvM01R_Croix::OnEnterBG";
donpcevent "KvM01R_Guillaume::OnEnterBG";
donpcevent "KvM01_BG::OnStart";
end;
OnStart:
announce "Battleground -- Kreiger Von Midgard [80-99] has started!",0,0x696969;
enablenpc "TherapistKvM01a";
enablenpc "TherapistKvM01b";
disablenpc "VintenarKvM01a";
disablenpc "VintenarKvM01b";
set $@KvM01BG_Victory, 0;
sleep 2000;
// Warp Teams
bg_warp $@KvM01BG_id1,"bat_c01",53,128;
bg_warp $@KvM01BG_id2,"bat_c01",146,55;
// ScoreBoard
set .Guillaume_Score, 0;
set .Croix_Score, 0;
initnpctimer;
end;
OnTimer5000:
areapercentheal "bat_c01",50,123,58,131,100,100;
areapercentheal "bat_c01",141,52,149,60,100,100;
mapannounce "bat_c01","The Battle will start in 25 seconds!!",1,0x696969;
end;
OnTimer26000:
mapannounce "bat_c01","The Battle will start in 4 seconds!!",1,0x696969;
end;
OnTimer27000:
donpcevent "::OnKvM01LightA";
end;
OnTimer28000:
donpcevent "::OnKvM01LightB";
end;
OnTimer29000:
donpcevent "::OnKvM01LightC";
end;
OnTimer30000:
// 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;
sleep 2000;
donpcevent "KvM01_BG::OnStop";
end;
}
set $@KvM01BG, 2; // Playing
areapercentheal "bat_c01",50,123,58,131,100,100;
bg_warp $@KvM01BG_id1,"bat_c01",62,119;
areapercentheal "bat_c01",141,52,149,60,100,100;
bg_warp $@KvM01BG_id2,"bat_c01",137,64;
end;
OnTimer32000:
mapannounce "bat_c01","The Battle of Kreiger Von Midgard has begun!!",1,0x696969;
end;
OnTimer300000:
mapannounce "bat_c01","The Battle will ends in 30 seconds!!",1,0x696969;
end;
OnTimer330000:
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;
stopnpctimer;
sleep 2000;
mapannounce "bat_c01","The time is out! This is a Tie...",1,0x696969;
donpcevent "KvM01_BG::OnStop";
}
end;
OnGuillaumeWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 1;
stopnpctimer;
sleep 2000;
mapannounce "bat_c01","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
donpcevent "KvM01_BG::OnStop";
end;
OnCroixWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 2;
stopnpctimer;
sleep 2000;
mapannounce "bat_c01","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000;
donpcevent "KvM01_BG::OnStop";
end;
OnStop:
disablenpc "TherapistKvM01a";
disablenpc "TherapistKvM01b";
enablenpc "VintenarKvM01a";
enablenpc "VintenarKvM01b";
// 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:
stopnpctimer;
stopnpctimer "KvM01_BG_Out";
set .Croix_Count, 0;
set .Guillaume_Count, 0;
set .Croix_Score, 0;
set .Guillaume_Score, 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 "TherapistKvM01a";
disablenpc "TherapistKvM01b";
disablenpc "VintenarKvM01a";
disablenpc "VintenarKvM01b";
sleep 1000;
mapwarp "bat_c01","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_c01",0,3; // Just in case someone else
bg_updatescore "bat_c01",0,0;
sleep 2000;
set $@KvM01BG, 0;
donpcevent "KvM01_BG::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script KvM01_BG_Out -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer3000:
mapannounce "bat_c01","Battle of Kreiger Von Midgard will close in 1 minute!",1,0x696969;
end;
OnTimer30000:
mapannounce "bat_c01","Battle of Kreiger Von Midgard will close in 30 seconds!",1,0x696969;
end;
OnTimer50000:
mapannounce "bat_c01","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x696969;
end;
OnTimer60000:
donpcevent "KvM01_BG::OnReset";
end;
}
// Battleground Therapist
// *********************************************************************
bat_c01,51,130,5 script Therapist in battle::TherapistKvM01a 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_c01,148,53,1 script Therapist in battle::TherapistKvM01b 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground rewards
// *********************************************************************
bat_c01,51,130,5 script Guillaume Vintenar::VintenarKvM01a 419,{
if( $@KvM01BG_Victory )
{
if( $@KvM01BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM01BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 5;
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_c01,148,53,1 script Croix Vintenar::VintenarKvM01b 415,{
if( $@KvM01BG_Victory )
{
if( $@KvM01BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM01BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 5;
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}

View File

@@ -1,378 +0,0 @@
// ==============================================================================
// BattleGround System - KvM 60~79
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,225,227,4 script Registration::KvM02R_Guillaume 418,{ // KvM Guillaume
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie");
end;
}
bat_room,225,204,0 script Registration::KvM02R_Croix 414,{ // KvM Croix
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnCroixJoin",1;
end;
OnEnterBG:
set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie");
end;
}
// Light Effects
// *********************************************************************
bat_c02,54,123,0 script #bat_c02a 111,{
end;
OnKvM02LightA: specialeffect EF_BEGINSPELL2; end;
OnKvM02LightB: specialeffect EF_BEGINSPELL3; end;
OnKvM02LightC: specialeffect EF_BEGINSPELL4; end;
}
bat_c02,56,125,0 duplicate(#bat_c02a) #bat_c02b 111
bat_c02,58,127,0 duplicate(#bat_c02a) #bat_c02c 111
bat_c02,141,56,0 duplicate(#bat_c02a) #bat_c02d 111
bat_c02,143,58,0 duplicate(#bat_c02a) #bat_c02e 111
bat_c02,145,60,0 duplicate(#bat_c02a) #bat_c02f 111
// Battleground Engine
// *********************************************************************
- script KvM02_BG -1,{
end;
OnInit:
setwall "bat_c02",54,122,6,7,0,"batc02wall_a";
setwall "bat_c02",55,122,5,7,0,"batc02wall_b";
setwall "bat_c02",140,56,6,7,0,"batc02wall_c";
setwall "bat_c02",140,57,5,7,0,"batc02wall_d";
disablenpc "TherapistKvM02a";
disablenpc "TherapistKvM02b";
disablenpc "VintenarKvM02a";
disablenpc "VintenarKvM02b";
end;
OnGuillaumeJoin:
OnCroixJoin:
donpcevent "KvM02_BG::OnReadyCheck";
end;
OnGuillaumeQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM02BG == 2 )
{
set .Guillaume_Count, .Guillaume_Count - 1;
set .Croix_Score, .Croix_Score + 1;
bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score;
if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG::OnCroixWin";
}
end;
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM02BG == 2 )
{
set .Croix_Count, .Croix_Count - 1;
set .Guillaume_Score, .Guillaume_Score + 1;
bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score;
if( .Croix_Count < 1 ) donpcevent "KvM02_BG::OnGuillaumeWin";
}
end;
OnReadyCheck:
if( $@KvM02BG )
end;
set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume");
set .@Croix, getwaitingroomstate(0,"KvM02R_Croix");
if( .@Guillaume < 5 || .@Croix < 5 )
{
if( .@Guillaume > 3 && .@Croix > 3 && !agitcheck() && !agitcheck2() && $@KvM_Flood < gettimetick(2) )
{
announce "Battleground -- Kreiger Von Midgard [60-79] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",0,0x808080;
set $@KvM_Flood, gettimetick(2) + 15;
}
else
mapannounce "bat_room","Battleground -- Kreiger Von Midgard [60-79] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",1,0x808080;
end;
}
set $@KvM02BG, 1; // Starting
donpcevent "KvM02R_Croix::OnEnterBG";
donpcevent "KvM02R_Guillaume::OnEnterBG";
donpcevent "KvM02_BG::OnStart";
end;
OnStart:
announce "Battleground -- Kreiger Von Midgard [60-79] has started!",0,0x808080;
enablenpc "TherapistKvM02a";
enablenpc "TherapistKvM02b";
disablenpc "VintenarKvM02a";
disablenpc "VintenarKvM02b";
set $@KvM02BG_Victory, 0;
sleep 2000;
// Warp Teams
bg_warp $@KvM02BG_id1,"bat_c02",53,128;
bg_warp $@KvM02BG_id2,"bat_c02",146,55;
// ScoreBoard
set .Guillaume_Score, 0;
set .Croix_Score, 0;
initnpctimer;
end;
OnTimer5000:
areapercentheal "bat_c02",50,123,58,131,100,100;
areapercentheal "bat_c02",141,52,149,60,100,100;
mapannounce "bat_c02","The Battle will start in 25 seconds!!",1,0x808080;
end;
OnTimer26000:
mapannounce "bat_c02","The Battle will start in 4 seconds!!",1,0x808080;
end;
OnTimer27000:
donpcevent "::OnKvM02LightA";
end;
OnTimer28000:
donpcevent "::OnKvM02LightB";
end;
OnTimer29000:
donpcevent "::OnKvM02LightC";
end;
OnTimer30000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM02BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM02BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
set $@KvM02BG_Victory, 3;
set $@KvM02BG, 3;
mapannounce "bat_c02","There are not enough players to start the battle",1,0x808080;
stopnpctimer;
sleep 2000;
donpcevent "KvM02_BG::OnStop";
end;
}
set $@KvM02BG, 2; // Playing
areapercentheal "bat_c02",50,123,58,131,100,100;
bg_warp $@KvM02BG_id1,"bat_c02",62,119;
areapercentheal "bat_c02",141,52,149,60,100,100;
bg_warp $@KvM02BG_id2,"bat_c02",137,64;
end;
OnTimer32000:
mapannounce "bat_c02","The Battle of Kreiger Von Midgard has begun!!",1,0x808080;
end;
OnTimer300000:
mapannounce "bat_c02","The Battle will ends in 30 seconds!!",1,0x808080;
end;
OnTimer330000:
if( .Croix_Count > .Guillaume_Count )
donpcevent "KvM02_BG::OnCroixWin";
else if( .Croix_Count < .Guillaume_Count )
donpcevent "KvM02_BG::OnGuillaumeWin";
else
{ // Draw Game
set $@KvM02BG, 3;
set $@KvM02BG_Victory, 3;
stopnpctimer;
sleep 2000;
mapannounce "bat_c02","The time is out! This is a Tie...",1,0x808080;
donpcevent "KvM02_BG::OnStop";
}
end;
OnGuillaumeWin:
set $@KvM02BG, 3;
set $@KvM02BG_Victory, 1;
stopnpctimer;
sleep 2000;
mapannounce "bat_c02","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
donpcevent "KvM02_BG::OnStop";
end;
OnCroixWin:
set $@KvM02BG, 3;
set $@KvM02BG_Victory, 2;
stopnpctimer;
sleep 2000;
mapannounce "bat_c02","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000;
donpcevent "KvM02_BG::OnStop";
end;
OnStop:
disablenpc "TherapistKvM02a";
disablenpc "TherapistKvM02b";
enablenpc "VintenarKvM02a";
enablenpc "VintenarKvM02b";
// Warp Teams
bg_warp $@KvM02BG_id1,"bat_c02",53,128;
bg_warp $@KvM02BG_id2,"bat_c02",146,55;
donpcevent "KvM02_BG_Out::OnBegin";
end;
OnReset:
stopnpctimer;
stopnpctimer "KvM02_BG_Out";
set .Croix_Count, 0;
set .Guillaume_Count, 0;
set .Croix_Score, 0;
set .Guillaume_Score, 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 "TherapistKvM02a";
disablenpc "TherapistKvM02b";
disablenpc "VintenarKvM02a";
disablenpc "VintenarKvM02b";
sleep 1000;
mapwarp "bat_c02","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_c02",0,3; // Just in case someone else
bg_updatescore "bat_c02",0,0;
sleep 2000;
set $@KvM02BG, 0;
donpcevent "KvM02_BG::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script KvM02_BG_Out -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer3000:
mapannounce "bat_c02","Battle of Kreiger Von Midgard will close in 1 minute!",1,0x808080;
end;
OnTimer30000:
mapannounce "bat_c02","Battle of Kreiger Von Midgard will close in 30 seconds!",1,0x808080;
end;
OnTimer50000:
mapannounce "bat_c02","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x808080;
end;
OnTimer60000:
donpcevent "KvM02_BG::OnReset";
end;
}
// Battleground Therapist
// *********************************************************************
bat_c02,51,130,5 script Therapist in battle::TherapistKvM02a 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_c02,148,53,1 script Therapist in battle::TherapistKvM02b 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground rewards
// *********************************************************************
bat_c02,51,130,5 script Guillaume Vintenar::VintenarKvM02a 419,{
if( $@KvM02BG_Victory )
{
if( $@KvM02BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM02BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_c02,148,53,1 script Croix Vintenar::VintenarKvM02b 415,{
if( $@KvM02BG_Victory )
{
if( $@KvM02BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM02BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}

View File

@@ -1,378 +0,0 @@
// ==============================================================================
// BattleGround System - KvM 1~59
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,197,227,4 script Registration::KvM03R_Guillaume 418,{ // KvM Guillaume
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie");
end;
}
bat_room,197,204,0 script Registration::KvM03R_Croix 414,{ // KvM Croix
end;
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnCroixJoin",1;
end;
OnEnterBG:
set $@KvM03BG_id2, waitingroom2bg("bat_c03",146,55,"KvM03_BG::OnCroixQuit","KvM03_BG::OnCroixDie");
end;
}
// Light Effects
// *********************************************************************
bat_c03,54,123,0 script #bat_c03a 111,{
end;
OnKvM03LightA: specialeffect EF_BEGINSPELL2; end;
OnKvM03LightB: specialeffect EF_BEGINSPELL3; end;
OnKvM03LightC: specialeffect EF_BEGINSPELL4; end;
}
bat_c03,56,125,0 duplicate(#bat_c03a) #bat_c03b 111
bat_c03,58,127,0 duplicate(#bat_c03a) #bat_c03c 111
bat_c03,141,56,0 duplicate(#bat_c03a) #bat_c03d 111
bat_c03,143,58,0 duplicate(#bat_c03a) #bat_c03e 111
bat_c03,145,60,0 duplicate(#bat_c03a) #bat_c03f 111
// Battleground Engine
// *********************************************************************
- script KvM03_BG -1,{
end;
OnInit:
setwall "bat_c03",54,122,6,7,0,"batc03wall_a";
setwall "bat_c03",55,122,5,7,0,"batc03wall_b";
setwall "bat_c03",140,56,6,7,0,"batc03wall_c";
setwall "bat_c03",140,57,5,7,0,"batc03wall_d";
disablenpc "TherapistKvM03a";
disablenpc "TherapistKvM03b";
disablenpc "VintenarKvM03a";
disablenpc "VintenarKvM03b";
end;
OnGuillaumeJoin:
OnCroixJoin:
donpcevent "KvM03_BG::OnReadyCheck";
end;
OnGuillaumeQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
OnGuillaumeDie:
if( $@KvM03BG == 2 )
{
set .Guillaume_Count, .Guillaume_Count - 1;
set .Croix_Score, .Croix_Score + 1;
bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score;
if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG::OnCroixWin";
}
end;
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
OnCroixDie:
if( $@KvM03BG == 2 )
{
set .Croix_Count, .Croix_Count - 1;
set .Guillaume_Score, .Guillaume_Score + 1;
bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score;
if( .Croix_Count < 1 ) donpcevent "KvM03_BG::OnGuillaumeWin";
}
end;
OnReadyCheck:
if( $@KvM03BG )
end;
set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume");
set .@Croix, getwaitingroomstate(0,"KvM03R_Croix");
if( .@Guillaume < 5 || .@Croix < 5 )
{
if( .@Guillaume > 3 && .@Croix > 3 && !agitcheck() && !agitcheck2() && $@KvM_Flood < gettimetick(2) )
{
announce "Battleground -- Kreiger Von Midgard [1-59] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",0,0xC0C0C0;
set $@KvM_Flood, gettimetick(2) + 15;
}
else
mapannounce "bat_room","Battleground -- Kreiger Von Midgard [1-59] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",1,0xC0C0C0;
end;
}
set $@KvM03BG, 1; // Starting
donpcevent "KvM03R_Croix::OnEnterBG";
donpcevent "KvM03R_Guillaume::OnEnterBG";
donpcevent "KvM03_BG::OnStart";
end;
OnStart:
announce "Battleground -- Kreiger Von Midgard [1-59] has started!",0,0xC0C0C0;
enablenpc "TherapistKvM03a";
enablenpc "TherapistKvM03b";
disablenpc "VintenarKvM03a";
disablenpc "VintenarKvM03b";
set $@KvM03BG_Victory, 0;
sleep 2000;
// Warp Teams
bg_warp $@KvM03BG_id1,"bat_c03",53,128;
bg_warp $@KvM03BG_id2,"bat_c03",146,55;
// ScoreBoard
set .Guillaume_Score, 0;
set .Croix_Score, 0;
initnpctimer;
end;
OnTimer5000:
areapercentheal "bat_c03",50,123,58,131,100,100;
areapercentheal "bat_c03",141,52,149,60,100,100;
mapannounce "bat_c03","The Battle will start in 25 seconds!!",1,0xC0C0C0;
end;
OnTimer26000:
mapannounce "bat_c03","The Battle will start in 4 seconds!!",1,0xC0C0C0;
end;
OnTimer27000:
donpcevent "::OnKvM03LightA";
end;
OnTimer28000:
donpcevent "::OnKvM03LightB";
end;
OnTimer29000:
donpcevent "::OnKvM03LightC";
end;
OnTimer30000:
// Team Members
set .Guillaume_Count, bg_get_data($@KvM03BG_id1, 0);
set .Croix_Count, bg_get_data($@KvM03BG_id2, 0);
if( .Guillaume_Count < 5 || .Croix_Count < 5 )
{
set $@KvM03BG_Victory, 3;
set $@KvM03BG, 3;
mapannounce "bat_c03","There are not enough players to start the battle",1,0xC0C0C0;
stopnpctimer;
sleep 2000;
donpcevent "KvM03_BG::OnStop";
end;
}
set $@KvM03BG, 2; // Playing
areapercentheal "bat_c03",50,123,58,131,100,100;
bg_warp $@KvM03BG_id1,"bat_c03",62,119;
areapercentheal "bat_c03",141,52,149,60,100,100;
bg_warp $@KvM03BG_id2,"bat_c03",137,64;
end;
OnTimer32000:
mapannounce "bat_c03","The Battle of Kreiger Von Midgard has begun!!",1,0xC0C0C0;
end;
OnTimer300000:
mapannounce "bat_c03","The Battle will ends in 30 seconds!!",1,0xC0C0C0;
end;
OnTimer330000:
if( .Croix_Count > .Guillaume_Count )
donpcevent "KvM03_BG::OnCroixWin";
else if( .Croix_Count < .Guillaume_Count )
donpcevent "KvM03_BG::OnGuillaumeWin";
else
{ // Draw Game
set $@KvM03BG, 3;
set $@KvM03BG_Victory, 3;
stopnpctimer;
sleep 2000;
mapannounce "bat_c03","The time is out! This is a Tie...",1,0xC0C0C0;
donpcevent "KvM03_BG::OnStop";
}
end;
OnGuillaumeWin:
set $@KvM03BG, 3;
set $@KvM03BG_Victory, 1;
stopnpctimer;
sleep 2000;
mapannounce "bat_c03","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
donpcevent "KvM03_BG::OnStop";
end;
OnCroixWin:
set $@KvM03BG, 3;
set $@KvM03BG_Victory, 2;
stopnpctimer;
sleep 2000;
mapannounce "bat_c03","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000;
donpcevent "KvM03_BG::OnStop";
end;
OnStop:
disablenpc "TherapistKvM03a";
disablenpc "TherapistKvM03b";
enablenpc "VintenarKvM03a";
enablenpc "VintenarKvM03b";
// Warp Teams
bg_warp $@KvM03BG_id1,"bat_c03",53,128;
bg_warp $@KvM03BG_id2,"bat_c03",146,55;
donpcevent "KvM03_BG_Out::OnBegin";
end;
OnReset:
stopnpctimer;
stopnpctimer "KvM03_BG_Out";
set .Croix_Count, 0;
set .Guillaume_Count, 0;
set .Croix_Score, 0;
set .Guillaume_Score, 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 "TherapistKvM03a";
disablenpc "TherapistKvM03b";
disablenpc "VintenarKvM03a";
disablenpc "VintenarKvM03b";
sleep 1000;
mapwarp "bat_c03","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_c03",0,3; // Just in case someone else
bg_updatescore "bat_c03",0,0;
sleep 2000;
set $@KvM03BG, 0;
donpcevent "KvM03_BG::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script KvM03_BG_Out -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer3000:
mapannounce "bat_c03","Battle of Kreiger Von Midgard will close in 1 minute!",1,0xC0C0C0;
end;
OnTimer30000:
mapannounce "bat_c03","Battle of Kreiger Von Midgard will close in 30 seconds!",1,0xC0C0C0;
end;
OnTimer50000:
mapannounce "bat_c03","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0xC0C0C0;
end;
OnTimer60000:
donpcevent "KvM03_BG::OnReset";
end;
}
// Battleground Therapist
// *********************************************************************
bat_c03,51,130,5 script Therapist in battle::TherapistKvM03a 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_c03,148,53,1 script Therapist in battle::TherapistKvM03b 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground rewards
// *********************************************************************
bat_c03,51,130,5 script Guillaume Vintenar::VintenarKvM03a 419,{
if( $@KvM03BG_Victory )
{
if( $@KvM03BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM03BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 1;
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 0;
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_c03,148,53,1 script Croix Vintenar::VintenarKvM03b 415,{
if( $@KvM03BG_Victory )
{
if( $@KvM03BG_Victory == 3 )
{
setquest 6025;
bg_leave;
warp "bat_room",155,150;
end;
}
else if( $@KvM03BG_Victory == Bat_Team )
{ // Victory
set .@Reward, 1;
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 0;
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "Please don't forget this battle. We can win the next.";
close2;
}
setquest 6025;
getitem 6376, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}

View File

@@ -1,476 +0,0 @@
// ==============================================================================
// BattleGround System - Tierra Valley 1
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,58,227,4 script Registration::TV1R_Guillaume 418,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@TierraBG1_id1, waitingroom2bg("bat_a01",50,374,"Tierra_BG1::OnGuillaumeQuit","");
end;
}
bat_room,58,204,0 script Registration::TV1R_Croix 414,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnCroixJoin",1;
end;
OnEnterBG:
set $@TierraBG1_id2, waitingroom2bg("bat_a01",42,16,"Tierra_BG1::OnCroixQuit","");
end;
}
// Battleground Engine
// *********************************************************************
- script Tierra_BG1 -1,{
end;
OnInit:
disablenpc "Croix Vintenar#tv1";
disablenpc "Guillaume Vintenar#tv1";
disablenpc "Therapist in battle#tv11";
disablenpc "Therapist in battle#tv12";
end;
OnGuillaumeQuit:
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
end;
OnGuillaumeJoin:
OnCroixJoin:
if( $@TierraBG1 == 0 )
donpcevent "Tierra_BG1::OnReadyCheck";
end;
OnReadyCheck:
if( $@TierraBG1 )
end;
set .@Guillaume, getwaitingroomstate(0,"TV1R_Guillaume");
set .@Croix, getwaitingroomstate(0,"TV1R_Croix");
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Tierra Valley [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0xFFA500;
end;
}
set $@TierraBG1, 1;
donpcevent "TV1R_Croix::OnEnterBG";
donpcevent "TV1R_Guillaume::OnEnterBG";
donpcevent "Guillaume_TV1B::OnBuild";
donpcevent "Croix_TV1B::OnBuild";
bg_monster $@TierraBG1_id1,"bat_a01",176,345,"Food Depot",1909,"Tierra_BG1::OnGuillaumeBreak";
bg_monster $@TierraBG1_id2,"bat_a01",167,50,"Food Storage",1910,"Tierra_BG1::OnCroixBreak";
bg_monster 0,"bat_a01",273,204,"Neutrality Flag",1911,"Tierra_BG1::OnNeutralBreak";
set .Neutral_Base, 0;
set $@TierraBG1_Victory, 0;
set .Guardian_1, 0;
set .Guardian_2, 0;
set .Guardian_3, 0;
enablenpc "Therapist in battle#tv11";
enablenpc "Therapist in battle#tv12";
disablenpc "Croix Vintenar#tv1";
disablenpc "Guillaume Vintenar#tv1";
// Respawner
donpcevent "#gtv1_respawn::OnBGStart";
donpcevent "#ctv1_respawn::OnBGStart";
donpcevent "#ntv1_respawn::OnBGStart";
// Warp Teams
announce "Battleground -- Tierra Valley [80-99] has started!",0,0xFFA500;
bg_warp $@TierraBG1_id1,"bat_a01",353,344;
bg_warp $@TierraBG1_id2,"bat_a01",353,52;
// Final Messages
sleep 6000;
mapannounce "bat_a01","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF;
sleep 2000;
mapannounce "bat_a01","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000;
initnpctimer;
end;
OnNeutralBreak:
if( getcharid(4) == $@TierraBG1_id1 )
{
mapannounce "bat_a01","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG1_id2,42,16;
areawarp "bat_a01",52,208,61,217,"bat_a01",42,16;
}
else if( getcharid(4) == $@TierraBG1_id2 )
{
mapannounce "bat_a01","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG1_id1,50,374;
areawarp "bat_a01",52,208,61,217,"bat_a01",50,374;
}
else end;
set .Neutral_Base, getcharid(4);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
set .Guardian_1, bg_monster(.Neutral_Base,"bat_a01",280,233,"Guardian",1949,"Tierra_BG1::OnGuardian1");
else
bg_monster_set_team .Guardian_1, .Neutral_Base;
if( .Guardian_2 == 0 )
set .Guardian_2, bg_monster(.Neutral_Base,"bat_a01",287,203,"Guardian",1950,"Tierra_BG1::OnGuardian2");
else
bg_monster_set_team .Guardian_2, .Neutral_Base;
if( .Guardian_3 == 0 )
set .Guardian_3, bg_monster(.Neutral_Base,"bat_a01",268,204,"Guardian",1949,"Tierra_BG1::OnGuardian3");
else
bg_monster_set_team .Guardian_3, .Neutral_Base;
sleep 10000;
if( $@TierraBG1 != 1 ) end;
if( .Neutral_Base == $@TierraBG1_id1 )
bg_monster .Neutral_Base,"bat_a01",273,204,"Guillaume Flag",1912,"Tierra_BG1::OnNeutralBreak";
else if( .Neutral_Base == $@TierraBG1_id2 )
bg_monster .Neutral_Base,"bat_a01",273,204,"Croix Flag",1913,"Tierra_BG1::OnNeutralBreak";
end;
OnGuardian1: set .Guardian_1, 0; end;
OnGuardian2: set .Guardian_2, 0; end;
OnGuardian3: set .Guardian_3, 0; end;
OnGuillaumeBreak:
set $@TierraBG1_Victory, 2;
mapannounce "bat_a01","Croix Vintenar Swandery: We destroyed Guillaume's food storehouse. We won that! Wow!",1,0xFF0000;
donpcevent "Tierra_BG1::OnStop";
end;
OnCroixBreak:
set $@TierraBG1_Victory, 1;
mapannounce "bat_a01","Guillaume Vintenar Axl Rose: We destroyed Croix's food storehouse. We won that! Wow!",1,0x0000FF;
donpcevent "Tierra_BG1::OnStop";
end;
OnTimer2400000:
mapannounce "bat_a01","Battle of Tierra Gorge will ends in 5 minutes",1,0xFFA500;
end;
OnTimer2640000:
mapannounce "bat_a01","Battle of Tierra Gorge will ends in 1 minute",1,0xFFA500;
end;
OnTimer2700000:
set $@TierraBG1_Victory, 3; // Draw Game
mapannounce "bat_a01","Battle of Tierra Gorge is over. The time is out, this is a Tie",1,0xFFA500;
donpcevent "Tierra_BG1::OnStop";
end;
OnStop:
set $@TierraBG1, 2;
disablenpc "Therapist in battle#tv11";
disablenpc "Therapist in battle#tv12";
donpcevent "#gtv1_respawn::OnBGStop";
donpcevent "#ctv1_respawn::OnBGStop";
donpcevent "#ntv1_respawn::OnBGStop";
enablenpc "Croix Vintenar#tv1";
enablenpc "Guillaume Vintenar#tv1";
killmonster "bat_a01","Tierra_BG1::OnGuillaumeBreak";
killmonster "bat_a01","Tierra_BG1::OnCroixBreak";
killmonster "bat_a01","Tierra_BG1::OnNeutralBreak";
killmonster "bat_a01","Tierra_BG1::OnGuardian1";
killmonster "bat_a01","Tierra_BG1::OnGuardian2";
killmonster "bat_a01","Tierra_BG1::OnGuardian3";
stopnpctimer;
sleep 3000;
bg_warp $@TierraBG1_id1,"bat_a01",50,374;
bg_warp $@TierraBG1_id2,"bat_a01",42,16;
sleep 3000;
mapannounce "bat_a01","Battle of Tierra Gorge will close in 1 minute!",1,0xFFA500;
initnpctimer;
end;
OnTimer30000:
if( $@TierraBG1 == 2 )
mapannounce "bat_a01","Battle of Tierra Valley will close in 30 seconds!",1,0xFFA500;
end;
OnTimer50000:
if( $@TierraBG1 == 2 )
mapannounce "bat_a01","Battle of Tierra Valley will close in 10 seconds!",1,0xFFA500;
end;
OnTimer60000:
if( $@TierraBG1 != 2 )
end;
OnReset:
stopnpctimer;
set .Neutral_Base, 0;
disablenpc "Croix Vintenar#tv1";
disablenpc "Guillaume Vintenar#tv1";
disablenpc "Therapist in battle#tv11";
disablenpc "Therapist in battle#tv12";
donpcevent "#gtv1_respawn::OnBGStop";
donpcevent "#ctv1_respawn::OnBGStop";
donpcevent "#ntv1_respawn::OnBGStop";
killmonster "bat_a01","Tierra_BG1::OnGuillaumeBreak";
killmonster "bat_a01","Tierra_BG1::OnCroixBreak";
killmonster "bat_a01","Tierra_BG1::OnNeutralBreak";
killmonster "bat_a01","Tierra_BG1::OnGuardian1";
killmonster "bat_a01","Tierra_BG1::OnGuardian2";
killmonster "bat_a01","Tierra_BG1::OnGuardian3";
donpcevent "Guillaume_TV1B::OnDestroy";
donpcevent "Croix_TV1B::OnDestroy";
set $@TierraBG1_Victory, 0;
if( $@TierraBG1_id1 ) { bg_destroy $@TierraBG1_id1; set $@TierraBG1_id1, 0; }
if( $@TierraBG1_id2 ) { bg_destroy $@TierraBG1_id2; set $@TierraBG1_id2, 0; }
sleep 1000;
mapwarp "bat_a01","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_a01",0,3; // Just in case someone else
sleep 2000;
set $@TierraBG1, 0;
donpcevent "Tierra_BG1::OnReadyCheck"; // Maybe a game is ready to start
end;
}
// Other Flags
// *********************************************************************
bat_a01,148,85,1 duplicate(Croix camp#bat) Croix camp#bat10 974
bat_a01,155,85,1 duplicate(Croix camp#bat) Croix camp#bat11 974
bat_a01,357,75,1 duplicate(Croix camp#bat) Croix camp#bat12 974
bat_a01,348,74,1 duplicate(Croix camp#bat) Croix camp#bat13 974
bat_a01,199,49,1 duplicate(Croix camp#bat) Croix camp#bat14 974
bat_a01,168,16,1 duplicate(Croix camp#bat) Croix camp#bat15 974
bat_a01,138,12,1 duplicate(Croix camp#bat) Croix camp#bat16 974
bat_a01,108,35,1 duplicate(Croix camp#bat) Croix camp#bat17 974
bat_a01,164,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat10 973
bat_a01,157,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat11 973
bat_a01,359,327,1 duplicate(Guillaume camp#bat) Guillaume camp#bat12 973
bat_a01,350,326,1 duplicate(Guillaume camp#bat) Guillaume camp#bat13 973
bat_a01,209,344,1 duplicate(Guillaume camp#bat) Guillaume camp#bat14 973
bat_a01,173,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat15 973
bat_a01,150,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat16 973
bat_a01,118,357,1 duplicate(Guillaume camp#bat) Guillaume camp#bat17 973
bat_a01,119,336,1 duplicate(Guillaume camp#bat) Guillaume camp#bat18 973
// Barricades
// *********************************************************************
- script Guillaume_TV1B -1,{
end;
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a01",170+.@i,130,"Barricade",1906,"Guillaume_TV1B::OnWall";
setwall "bat_a01",170,130,16,6,1,"bat_a01_g1";
set .MyMobCount,16;
end;
OnDestroy:
killmonster "bat_a01","Guillaume_TV1B::OnWall";
if (checkwall("bat_a01_g1") == true)
delwall "bat_a01_g1";
set .MyMobCount,0;
end;
OnWall:
if( set(.MyMobCount,.MyMobCount - 1) < 1 )
{
delwall "bat_a01_g1";
mapannounce "bat_a01","South Gate : The Gate has been Destroy!!",1,0xFFA500;
}
end;
}
- script Croix_TV1B -1,{
end;
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a01",186+.@i,266,"Barricade",1906,"Croix_TV1B::OnWall";
setwall "bat_a01",186,266,16,6,1,"bat_a01_c1";
set .MyMobCount,16;
end;
OnDestroy:
killmonster "bat_a01","Croix_TV1B::OnWall";
delwall "bat_a01_c1";
set .MyMobCount,0;
end;
OnWall:
if( set(.MyMobCount,.MyMobCount - 1) < 1 )
{
delwall "bat_a01_c1";
mapannounce "bat_a01","North Gate : A Gate has been Destroy!!",1,0xFFA500;
}
end;
}
// Battleground rewards
// *********************************************************************
bat_a01,45,19,3 script Croix Vintenar#tv1 415,{
if( $@TierraBG1_Victory )
{
if( $@TierraBG1_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
}
setquest 2069;
getitem 7828, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_a01,53,377,3 script Guillaume Vintenar#tv1 419,{
if( $@TierraBG1_Victory )
{
if( $@TierraBG1_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
setquest 2069;
getitem 7828, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
// Battleground Therapist
// *********************************************************************
bat_a01,60,216,3 script Ghost#tv13 950,{
mes "[Ghost in valley]";
mes "Boo...Boo...";
specialeffect2 EF_HEAL;
close;
}
bat_a01,53,377,3 script Therapist in battle#tv12 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_a01,45,18,3 script Therapist in battle#tv11 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground Respawn
// *********************************************************************
bat_a01,57,213,0 script #ntv1_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer19000:
misceffect EF_SANCTUARY;
end;
OnTimer20000:
areapercentheal "bat_a01",52,208,61,217,100,100;
areawarp "bat_a01",52,208,61,217,"bat_a01",301,208;
initnpctimer;
end;
}
bat_a01,50,374,0 script #gtv1_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_a01",46,370,54,378,100,100;
areawarp "bat_a01",46,370,54,378,"bat_a01",354,340;
initnpctimer;
end;
}
bat_a01,42,16,0 script #ctv1_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_a01",38,12,47,21,100,100;
areawarp "bat_a01",38,12,47,21,"bat_a01",354,57;
initnpctimer;
end;
}

View File

@@ -1,476 +0,0 @@
// ==============================================================================
// BattleGround System - Tierra Valley 2
// ==============================================================================
// Registration NPC's
// *********************************************************************
bat_room,114,227,4 script Registration::TV2R_Guillaume 418,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Tierra_BG2::OnGuillaumeJoin",1;
end;
OnEnterBG:
set $@TierraBG2_id1, waitingroom2bg("bat_a02",50,374,"Tierra_BG2::OnGuillaumeQuit","");
end;
}
bat_room,114,204,0 script Registration::TV2R_Croix 414,{
end;
OnInit:
waitingroom "Battle Station 10 Players",10,"Tierra_BG2::OnCroixJoin",1;
end;
OnEnterBG:
set $@TierraBG2_id2, waitingroom2bg("bat_a02",42,16,"Tierra_BG2::OnCroixQuit","");
end;
}
// Battleground Engine
// *********************************************************************
- script Tierra_BG2 -1,{
end;
OnInit:
disablenpc "Croix Vintenar#tv2";
disablenpc "Guillaume Vintenar#tv2";
disablenpc "Therapist in battle#tv21";
disablenpc "Therapist in battle#tv22";
end;
OnGuillaumeQuit:
OnCroixQuit:
set BG_Delay_Tick, gettimetick(2) + 1200;
end;
OnGuillaumeJoin:
OnCroixJoin:
if( $@TierraBG2 == 0 )
donpcevent "Tierra_BG2::OnReadyCheck";
end;
OnReadyCheck:
if( $@TierraBG2 )
end;
set .@Guillaume, getwaitingroomstate(0,"TV2R_Guillaume");
set .@Croix, getwaitingroomstate(0,"TV2R_Croix");
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Tierra Valley [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0xF4A460;
end;
}
set $@TierraBG2, 1;
donpcevent "TV2R_Croix::OnEnterBG";
donpcevent "TV2R_Guillaume::OnEnterBG";
donpcevent "Guillaume_TV2B::OnBuild";
donpcevent "Croix_TV2B::OnBuild";
bg_monster $@TierraBG2_id1,"bat_a02",176,345,"Food Depot",1909,"Tierra_BG2::OnGuillaumeBreak";
bg_monster $@TierraBG2_id2,"bat_a02",167,50,"Food Storage",1910,"Tierra_BG2::OnCroixBreak";
bg_monster 0,"bat_a02",273,204,"Neutrality Flag",1911,"Tierra_BG2::OnNeutralBreak";
set .Neutral_Base, 0;
set $@TierraBG2_Victory, 0;
set .Guardian_1, 0;
set .Guardian_2, 0;
set .Guardian_3, 0;
enablenpc "Therapist in battle#tv21";
enablenpc "Therapist in battle#tv22";
disablenpc "Croix Vintenar#tv2";
disablenpc "Guillaume Vintenar#tv2";
// Respawner
donpcevent "#gtv2_respawn::OnBGStart";
donpcevent "#ctv2_respawn::OnBGStart";
donpcevent "#ntv2_respawn::OnBGStart";
// Warp Teams
announce "Battleground -- Tierra Valley [80-99] has started!",0,0xF4A460;
bg_warp $@TierraBG2_id1,"bat_a02",353,344;
bg_warp $@TierraBG2_id2,"bat_a02",353,52;
// Final Messages
sleep 6000;
mapannounce "bat_a02","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF;
sleep 2000;
mapannounce "bat_a02","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000;
initnpctimer;
end;
OnNeutralBreak:
if( getcharid(4) == $@TierraBG2_id1 )
{
mapannounce "bat_a02","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG2_id2,42,16;
areawarp "bat_a02",52,208,61,217,"bat_a02",42,16;
}
else if( getcharid(4) == $@TierraBG2_id2 )
{
mapannounce "bat_a02","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG2_id1,50,374;
areawarp "bat_a02",52,208,61,217,"bat_a02",50,374;
}
else end;
set .Neutral_Base, getcharid(4);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
set .Guardian_1, bg_monster(.Neutral_Base,"bat_a02",280,233,"Guardian",1949,"Tierra_BG2::OnGuardian1");
else
bg_monster_set_team .Guardian_1, .Neutral_Base;
if( .Guardian_2 == 0 )
set .Guardian_2, bg_monster(.Neutral_Base,"bat_a02",287,203,"Guardian",1950,"Tierra_BG2::OnGuardian2");
else
bg_monster_set_team .Guardian_2, .Neutral_Base;
if( .Guardian_3 == 0 )
set .Guardian_3, bg_monster(.Neutral_Base,"bat_a02",268,204,"Guardian",1949,"Tierra_BG2::OnGuardian3");
else
bg_monster_set_team .Guardian_3, .Neutral_Base;
sleep 10000;
if( $@TierraBG2 != 1 ) end;
if( .Neutral_Base == $@TierraBG2_id1 )
bg_monster .Neutral_Base,"bat_a02",273,204,"Guillaume Flag",1912,"Tierra_BG2::OnNeutralBreak";
else if( .Neutral_Base == $@TierraBG2_id2 )
bg_monster .Neutral_Base,"bat_a02",273,204,"Croix Flag",1913,"Tierra_BG2::OnNeutralBreak";
end;
OnGuardian1: set .Guardian_1, 0; end;
OnGuardian2: set .Guardian_2, 0; end;
OnGuardian3: set .Guardian_3, 0; end;
OnGuillaumeBreak:
set $@TierraBG2_Victory, 2;
mapannounce "bat_a02","Croix Vintenar Swandery: We destroyed Guillaume's food storehouse. We won that! Wow!",1,0xFF0000;
donpcevent "Tierra_BG2::OnStop";
end;
OnCroixBreak:
set $@TierraBG2_Victory, 1;
mapannounce "bat_a02","Guillaume Vintenar Axl Rose: We destroyed Croix's food storehouse. We won that! Wow!",1,0x0000FF;
donpcevent "Tierra_BG2::OnStop";
end;
OnTimer2400000:
mapannounce "bat_a02","Battle of Tierra Gorge will ends in 5 minutes",1,0xF4A460;
end;
OnTimer2640000:
mapannounce "bat_a02","Battle of Tierra Gorge will ends in 1 minute",1,0xF4A460;
end;
OnTimer2700000:
set $@TierraBG2_Victory, 3; // Draw Game
mapannounce "bat_a02","Battle of Tierra Gorge is over. The time is out, this is a Tie",1,0xF4A460;
donpcevent "Tierra_BG2::OnStop";
end;
OnStop:
set $@TierraBG2, 2;
disablenpc "Therapist in battle#tv21";
disablenpc "Therapist in battle#tv22";
donpcevent "#gtv2_respawn::OnBGStop";
donpcevent "#ctv2_respawn::OnBGStop";
donpcevent "#ntv2_respawn::OnBGStop";
enablenpc "Croix Vintenar#tv2";
enablenpc "Guillaume Vintenar#tv2";
killmonster "bat_a02","Tierra_BG2::OnGuillaumeBreak";
killmonster "bat_a02","Tierra_BG2::OnCroixBreak";
killmonster "bat_a02","Tierra_BG2::OnNeutralBreak";
killmonster "bat_a02","Tierra_BG2::OnGuardian1";
killmonster "bat_a02","Tierra_BG2::OnGuardian2";
killmonster "bat_a02","Tierra_BG2::OnGuardian3";
stopnpctimer;
sleep 3000;
bg_warp $@TierraBG2_id1,"bat_a02",50,374;
bg_warp $@TierraBG2_id2,"bat_a02",42,16;
sleep 3000;
mapannounce "bat_a02","Battle of Tierra Gorge will close in 1 minute!",1,0xF4A460;
initnpctimer;
end;
OnTimer30000:
if( $@TierraBG2 == 2 )
mapannounce "bat_a02","Battle of Tierra Valley will close in 30 seconds!",1,0xF4A460;
end;
OnTimer50000:
if( $@TierraBG2 == 2 )
mapannounce "bat_a02","Battle of Tierra Valley will close in 10 seconds!",1,0xF4A460;
end;
OnTimer60000:
if( $@TierraBG2 != 2 )
end;
OnReset:
stopnpctimer;
set .Neutral_Base, 0;
disablenpc "Croix Vintenar#tv2";
disablenpc "Guillaume Vintenar#tv2";
disablenpc "Therapist in battle#tv21";
disablenpc "Therapist in battle#tv22";
donpcevent "#gtv2_respawn::OnBGStop";
donpcevent "#gtv2_respawn::OnBGStop";
donpcevent "#ctv2_respawn::OnBGStop";
killmonster "bat_a02","Tierra_BG2::OnGuillaumeBreak";
killmonster "bat_a02","Tierra_BG2::OnCroixBreak";
killmonster "bat_a02","Tierra_BG2::OnNeutralBreak";
killmonster "bat_a02","Tierra_BG2::OnGuardian1";
killmonster "bat_a02","Tierra_BG2::OnGuardian2";
killmonster "bat_a02","Tierra_BG2::OnGuardian3";
donpcevent "Guillaume_TV2B::OnDestroy";
donpcevent "Croix_TV2B::OnDestroy";
set $@TierraBG2_Victory, 0;
if( $@TierraBG2_id1 ) { bg_destroy $@TierraBG2_id1; set $@TierraBG2_id1, 0; }
if( $@TierraBG2_id2 ) { bg_destroy $@TierraBG2_id2; set $@TierraBG2_id2, 0; }
sleep 1000;
mapwarp "bat_a02","bat_room",155,150;
sleep 2000;
maprespawnguildid "bat_a02",0,3; // Just in case someone else
sleep 2000;
set $@TierraBG2, 0;
donpcevent "Tierra_BG2::OnReadyCheck"; // Maybe a game is ready to start
end;
}
// Other Flags
// *********************************************************************
bat_a02,148,85,1 duplicate(Croix camp#bat) Croix camp#bat22 974
bat_a02,155,85,1 duplicate(Croix camp#bat) Croix camp#bat23 974
bat_a02,357,75,1 duplicate(Croix camp#bat) Croix camp#bat24 974
bat_a02,348,74,1 duplicate(Croix camp#bat) Croix camp#bat25 974
bat_a02,199,49,1 duplicate(Croix camp#bat) Croix camp#bat26 974
bat_a02,168,16,1 duplicate(Croix camp#bat) Croix camp#bat27 974
bat_a02,138,12,1 duplicate(Croix camp#bat) Croix camp#bat28 974
bat_a02,108,35,1 duplicate(Croix camp#bat) Croix camp#bat29 974
bat_a02,164,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat23 973
bat_a02,157,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat24 973
bat_a02,359,327,1 duplicate(Guillaume camp#bat) Guillaume camp#bat25 973
bat_a02,350,326,1 duplicate(Guillaume camp#bat) Guillaume camp#bat26 973
bat_a02,209,344,1 duplicate(Guillaume camp#bat) Guillaume camp#bat27 973
bat_a02,173,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat28 973
bat_a02,150,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat29 973
bat_a02,118,357,1 duplicate(Guillaume camp#bat) Guillaume camp#bat30 973
bat_a02,119,336,1 duplicate(Guillaume camp#bat) Guillaume camp#bat31 973
// Barricades
// *********************************************************************
- script Guillaume_TV2B -1,{
end;
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a02",170+.@i,130,"Barricade",1906,"Guillaume_TV2B::OnWall";
setwall "bat_a02",170,130,16,6,1,"bat_a02_g1";
set .MyMobCount,16;
end;
OnDestroy:
killmonster "bat_a02","Guillaume_TV2B::OnWall";
if (checkwall("bat_a02_g1") == true)
delwall "bat_a02_g1";
set .MyMobCount,0;
end;
OnWall:
if( set(.MyMobCount,.MyMobCount - 1) < 1 )
{
delwall "bat_a02_g1";
mapannounce "bat_a02","South Gate : The Gate has been Destroy!!",1,0xF4A460;
}
end;
}
- script Croix_TV2B -1,{
end;
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a02",186+.@i,266,"Barricade",1906,"Croix_TV2B::OnWall";
setwall "bat_a02",186,266,16,6,1,"bat_a02_c1";
set .MyMobCount,16;
end;
OnDestroy:
killmonster "bat_a02","Croix_TV2B::OnWall";
delwall "bat_a02_c1";
set .MyMobCount,0;
end;
OnWall:
if( set(.MyMobCount,.MyMobCount - 1) < 1 )
{
delwall "bat_a02_c1";
mapannounce "bat_a02","North Gate : A Gate has been Destroy!!",1,0xF4A460;
}
end;
}
// Battleground rewards
// *********************************************************************
bat_a02,45,19,3 script Croix Vintenar#tv2 415,{
if( $@TierraBG2_Victory )
{
if( $@TierraBG2_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Croax!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "Oh, " + strcharinfo(0) + ". Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";
close2;
}
setquest 2069;
getitem 7828, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
bat_a02,53,377,3 script Guillaume Vintenar#tv2 419,{
if( $@TierraBG2_Victory )
{
if( $@TierraBG2_Victory == Bat_Team )
{ // Victory
set .@Reward, 3;
mes "[Swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[Swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
setquest 2069;
getitem 7828, .@Reward;
bg_leave;
warp "bat_room",155,150;
end;
}
end;
}
// Battleground Therapist
// *********************************************************************
bat_a02,60,216,3 script Ghost#tv23 950,{
mes "[Ghost in valley]";
mes "Boo...Boo...";
specialeffect2 EF_HEAL;
close;
}
bat_a02,53,377,3 script Therapist in battle#tv22 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
bat_a02,45,18,3 script Therapist in battle#tv21 95,{
mes "[Therapist in battle]";
mes "Just close your eyes, and take a deep breathe.";
mes "You can be free from pain.";
specialeffect2 EF_HEAL;
close;
}
// Battleground Respawn
// *********************************************************************
bat_a02,57,213,0 script #ntv2_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer19000:
misceffect EF_SANCTUARY;
end;
OnTimer20000:
areapercentheal "bat_a02",52,208,61,217,100,100;
areawarp "bat_a02",52,208,61,217,"bat_a02",301,208;
initnpctimer;
end;
}
bat_a02,50,374,0 script #gtv2_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_a02",46,370,54,378,100,100;
areawarp "bat_a02",46,370,54,378,"bat_a02",354,340;
initnpctimer;
end;
}
bat_a02,42,16,0 script #ctv2_respawn 139,{
end;
OnBGStart:
initnpctimer;
end;
OnBGStop:
stopnpctimer;
end;
OnTimer24000:
misceffect EF_SANCTUARY;
end;
OnTimer25000:
areapercentheal "bat_a02",38,12,47,21,100,100;
areawarp "bat_a02",38,12,47,21,"bat_a02",354,57;
initnpctimer;
end;
}