summaryrefslogtreecommitdiff
path: root/npc/guild
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-04 23:25:09 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-04 23:25:09 +0000
commit195dffc20af1fb32c7e4119988911b72955aeabc (patch)
treeb60d2a5e72d64dc5fc21eb9ce0962631e774a4c9 /npc/guild
downloadhercules-195dffc20af1fb32c7e4119988911b72955aeabc.tar.gz
hercules-195dffc20af1fb32c7e4119988911b72955aeabc.tar.bz2
hercules-195dffc20af1fb32c7e4119988911b72955aeabc.tar.xz
hercules-195dffc20af1fb32c7e4119988911b72955aeabc.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@2 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/guild')
-rw-r--r--npc/guild/aldeg/aldeg_dunsw.txt51
-rw-r--r--npc/guild/aldeg/aldeg_ev_agit.txt130
-rw-r--r--npc/guild/aldeg/aldeg_flags.txt199
-rw-r--r--npc/guild/aldeg/aldeg_guardians.txt111
-rw-r--r--npc/guild/aldeg/aldeg_kafras.txt61
-rw-r--r--npc/guild/aldeg/aldeg_managers.txt110
-rw-r--r--npc/guild/aldeg/aldeg_treas.txt141
-rw-r--r--npc/guild/ev_agit_event.txt41
-rw-r--r--npc/guild/gefg/gefg_dunsw.txt49
-rw-r--r--npc/guild/gefg/gefg_ev_agit.txt130
-rw-r--r--npc/guild/gefg/gefg_flags.txt154
-rw-r--r--npc/guild/gefg/gefg_guardians.txt108
-rw-r--r--npc/guild/gefg/gefg_kafras.txt71
-rw-r--r--npc/guild/gefg/gefg_managers.txt104
-rw-r--r--npc/guild/gefg/gefg_treas.txt148
-rw-r--r--npc/guild/gldfunc_dunsw.txt42
-rw-r--r--npc/guild/gldfunc_ev_agit.txt149
-rw-r--r--npc/guild/gldfunc_flag.txt58
-rw-r--r--npc/guild/gldfunc_kafra.txt37
-rw-r--r--npc/guild/gldfunc_manager.txt429
-rw-r--r--npc/guild/gldfunc_treasure.txt78
-rw-r--r--npc/guild/nguild/nguild_dunsw.txt39
-rw-r--r--npc/guild/nguild/nguild_ev_agit.txt107
-rw-r--r--npc/guild/nguild/nguild_flags.txt113
-rw-r--r--npc/guild/nguild/nguild_guardians.txt91
-rw-r--r--npc/guild/nguild/nguild_kafras.txt53
-rw-r--r--npc/guild/nguild/nguild_managers.txt86
-rw-r--r--npc/guild/nguild/nguild_treas.txt117
-rw-r--r--npc/guild/old/aldeg_cas01.txt675
-rw-r--r--npc/guild/old/aldeg_cas02.txt676
-rw-r--r--npc/guild/old/aldeg_cas03.txt679
-rw-r--r--npc/guild/old/aldeg_cas04.txt679
-rw-r--r--npc/guild/old/aldeg_cas05.txt677
-rw-r--r--npc/guild/old/aldeg_flag.txt351
-rw-r--r--npc/guild/old/ev_agit_aldeg.txt476
-rw-r--r--npc/guild/old/ev_agit_event.txt34
-rw-r--r--npc/guild/old/ev_agit_gefg.txt464
-rw-r--r--npc/guild/old/ev_agit_payg.txt466
-rw-r--r--npc/guild/old/ev_agit_prtg.txt476
-rw-r--r--npc/guild/old/gefg_cas01.txt667
-rw-r--r--npc/guild/old/gefg_cas02.txt667
-rw-r--r--npc/guild/old/gefg_cas03.txt668
-rw-r--r--npc/guild/old/gefg_cas04.txt668
-rw-r--r--npc/guild/old/gefg_cas05.txt666
-rw-r--r--npc/guild/old/gefg_flag.txt359
-rw-r--r--npc/guild/old/gswitch.txt444
-rw-r--r--npc/guild/old/guardian/aldeg_cas01_guardian.txt67
-rw-r--r--npc/guild/old/guardian/aldeg_cas02_guardian.txt67
-rw-r--r--npc/guild/old/guardian/aldeg_cas03_guardian.txt67
-rw-r--r--npc/guild/old/guardian/aldeg_cas04_guardian.txt67
-rw-r--r--npc/guild/old/guardian/aldeg_cas05_guardian.txt67
-rw-r--r--npc/guild/old/guardian/gefg_cas01_guardian.txt67
-rw-r--r--npc/guild/old/guardian/gefg_cas02_guardian.txt67
-rw-r--r--npc/guild/old/guardian/gefg_cas03_guardian.txt67
-rw-r--r--npc/guild/old/guardian/gefg_cas04_guardian.txt67
-rw-r--r--npc/guild/old/guardian/gefg_cas05_guardian.txt67
-rw-r--r--npc/guild/old/guardian/payg_cas01_guardian.txt67
-rw-r--r--npc/guild/old/guardian/payg_cas02_guardian.txt67
-rw-r--r--npc/guild/old/guardian/payg_cas03_guardian.txt67
-rw-r--r--npc/guild/old/guardian/payg_cas04_guardian.txt67
-rw-r--r--npc/guild/old/guardian/payg_cas05_guardian.txt67
-rw-r--r--npc/guild/old/guardian/prtg_cas01_guardian.txt67
-rw-r--r--npc/guild/old/guardian/prtg_cas02_guardian.txt62
-rw-r--r--npc/guild/old/guardian/prtg_cas03_guardian.txt62
-rw-r--r--npc/guild/old/guardian/prtg_cas04_guardian.txt62
-rw-r--r--npc/guild/old/guardian/prtg_cas05_guardian.txt62
-rw-r--r--npc/guild/old/payg_cas01.txt667
-rw-r--r--npc/guild/old/payg_cas02.txt666
-rw-r--r--npc/guild/old/payg_cas03.txt666
-rw-r--r--npc/guild/old/payg_cas04.txt666
-rw-r--r--npc/guild/old/payg_cas05.txt666
-rw-r--r--npc/guild/old/payg_flag.txt360
-rw-r--r--npc/guild/old/prtg_cas01.txt670
-rw-r--r--npc/guild/old/prtg_cas02.txt667
-rw-r--r--npc/guild/old/prtg_cas03.txt667
-rw-r--r--npc/guild/old/prtg_cas04.txt666
-rw-r--r--npc/guild/old/prtg_cas05.txt664
-rw-r--r--npc/guild/old/prtg_flag.txt364
-rw-r--r--npc/guild/old/treasure/aldeg_cas01_treasure.txt72
-rw-r--r--npc/guild/old/treasure/aldeg_cas02_treasure.txt67
-rw-r--r--npc/guild/old/treasure/aldeg_cas03_treasure.txt67
-rw-r--r--npc/guild/old/treasure/aldeg_cas04_treasure.txt67
-rw-r--r--npc/guild/old/treasure/aldeg_cas05_treasure.txt67
-rw-r--r--npc/guild/old/treasure/gefg_cas01_treasure.txt67
-rw-r--r--npc/guild/old/treasure/gefg_cas02_treasure.txt67
-rw-r--r--npc/guild/old/treasure/gefg_cas03_treasure.txt67
-rw-r--r--npc/guild/old/treasure/gefg_cas04_treasure.txt68
-rw-r--r--npc/guild/old/treasure/gefg_cas05_treasure.txt68
-rw-r--r--npc/guild/old/treasure/payg_cas01_treasure.txt67
-rw-r--r--npc/guild/old/treasure/payg_cas02_treasure.txt67
-rw-r--r--npc/guild/old/treasure/payg_cas03_treasure.txt67
-rw-r--r--npc/guild/old/treasure/payg_cas04_treasure.txt67
-rw-r--r--npc/guild/old/treasure/payg_cas05_treasure.txt67
-rw-r--r--npc/guild/old/treasure/prtg_cas01_treasure.txt72
-rw-r--r--npc/guild/old/treasure/prtg_cas02_treasure.txt67
-rw-r--r--npc/guild/old/treasure/prtg_cas03_treasure.txt67
-rw-r--r--npc/guild/old/treasure/prtg_cas04_treasure.txt67
-rw-r--r--npc/guild/old/treasure/prtg_cas05_treasure.txt67
-rw-r--r--npc/guild/payg/payg_dunsw.txt49
-rw-r--r--npc/guild/payg/payg_ev_agit.txt130
-rw-r--r--npc/guild/payg/payg_flags.txt148
-rw-r--r--npc/guild/payg/payg_guardians.txt108
-rw-r--r--npc/guild/payg/payg_kafras.txt65
-rw-r--r--npc/guild/payg/payg_managers.txt104
-rw-r--r--npc/guild/payg/payg_treas.txt140
-rw-r--r--npc/guild/prtg/prtg_dunsw.txt49
-rw-r--r--npc/guild/prtg/prtg_ev_agit.txt130
-rw-r--r--npc/guild/prtg/prtg_flags.txt175
-rw-r--r--npc/guild/prtg/prtg_guardians.txt108
-rw-r--r--npc/guild/prtg/prtg_kafras.txt66
-rw-r--r--npc/guild/prtg/prtg_managers.txt104
-rw-r--r--npc/guild/prtg/prtg_treas.txt144
112 files changed, 24380 insertions, 0 deletions
diff --git a/npc/guild/aldeg/aldeg_dunsw.txt b/npc/guild/aldeg/aldeg_dunsw.txt
new file mode 100644
index 000000000..dc1acfb25
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_dunsw.txt
@@ -0,0 +1,51 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+
+// Castle 1 ===============================================
+aldeg_cas01.gat,212,181,0 script Switch#DunA01 111,{
+ callfunc "F_GldDunSw","aldeg_cas01","02",32,122;
+ close;
+}
+
+
+// Castle 2 ===============================================
+aldeg_cas02.gat,194,136,0 script Switch#DunA02 111,{
+ callfunc "F_GldDunSw","aldeg_cas02","02",79,32;
+ close;
+}
+
+
+// Castle 3 ===============================================
+aldeg_cas03.gat,200,177,0 script Switch#DunA03 111,{
+ callfunc "F_GldDunSw","aldeg_cas03","02",165,38;
+ close;
+}
+
+
+// Castle 4 ===============================================
+aldeg_cas04.gat,38,76,0 script Switch#DunA04 111,{
+ callfunc "F_GldDunSw","aldeg_cas04","02",160,148;
+ close;
+}
+
+
+// Castle 5 ===============================================
+
+aldeg_cas05.gat,22,205,0 script Switch#DunA05 111,{
+ callfunc "F_GldDunSw","aldeg_cas05","02",103,169;
+ close;
+}
diff --git a/npc/guild/aldeg/aldeg_ev_agit.txt b/npc/guild/aldeg/aldeg_ev_agit.txt
new file mode 100644
index 000000000..bdbc85e81
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_ev_agit.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Al De Baran Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Geffen Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================================
+aldeg_cas01.gat,216,24,0 script Agit_A01 -1,{
+OnInterIfInit:
+ GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
+ end;
+OnRecvCastleA01:
+ RequestGuildInfo GetCastleData("aldeg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas01","A01",216,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas01","A01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),6;
+ Monster "aldeg_cas01.gat",216,24,"EMPERIUM",1288,1,"Agit_A01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas01","A01";
+ end;
+}
+
+// Castle 2 ================================================================
+aldeg_cas02.gat,214,24,0 script Agit_A02 -1,{
+OnInterIfInit:
+ GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
+ end;
+OnRecvCastleA02:
+ RequestGuildInfo GetCastleData("aldeg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas02","A02",214,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas02","A02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),6;
+ Monster "aldeg_cas02.gat",214,24,"EMPERIUM",1288,1,"Agit_A02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas02","A02";
+ end;
+}
+
+// Castle 3 ================================================================
+aldeg_cas03.gat,206,32,0 script Agit_A03 -1,{
+OnInterIfInit:
+ GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
+ end;
+OnRecvCastleA03:
+ RequestGuildInfo GetCastleData("aldeg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas03","A03",206,32;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas03","A03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),6;
+ Monster "aldeg_cas03.gat",206,32,"EMPERIUM",1288,1,"Agit_A03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas03","A03";
+ end;
+}
+
+// Castle 4 ================================================================
+aldeg_cas04.gat,36,218,0 script Agit_A04 -1,{
+OnInterIfInit:
+ GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
+ end;
+OnRecvCastleA04:
+ RequestGuildInfo GetCastleData("aldeg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas04","A04",36,218;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas04","A04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),6;
+ Monster "aldeg_cas04.gat",36,218,"EMPERIUM",1288,1,"Agit_A04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas04","A04";
+ end;
+}
+
+// Castle 5 ================================================================
+aldeg_cas05.gat,28,102,0 script Agit_A05 -1,{
+OnInterIfInit:
+ GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
+ end;
+OnRecvCastleA05:
+ RequestGuildInfo GetCastleData("aldeg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas05","A05",28,102;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas05","A05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),6;
+ Monster "aldeg_cas05.gat",28,102,"EMPERIUM",1288,1,"Agit_A05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas05","A05";
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_flags.txt b/npc/guild/aldeg/aldeg_flags.txt
new file mode 100644
index 000000000..ec4969e88
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_flags.txt
@@ -0,0 +1,199 @@
+//===== eAthena Script =======================================
+//= War of Emperium Al De Baran Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+aldebaran.gat,152,97,4 script Noisyubantian#a1-1::Noisyubantian 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas01",218,170;
+ close;
+
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ end;
+}
+
+// In Guild =============================================
+alde_gld.gat,61,87,6 duplicate(Noisyubantian) Noisyubantian#a1-2 722
+alde_gld.gat,61,79,6 duplicate(Noisyubantian) Noisyubantian#a1-3 722
+alde_gld.gat,45,87,8 duplicate(Noisyubantian) Noisyubantian#a1-4 722
+alde_gld.gat,51,87,8 duplicate(Noisyubantian) Noisyubantian#a1-5 722
+// In Castle ============================================
+aldeg_cas01.gat,30,248,4 duplicate(Noisyubantian) Noisyubantian#a1-6 722
+aldeg_cas01.gat,30,246,4 duplicate(Noisyubantian) Noisyubantian#a1-7 722
+aldeg_cas01.gat,37,248,4 duplicate(Noisyubantian) Noisyubantian#a1-8 722
+aldeg_cas01.gat,37,246,4 duplicate(Noisyubantian) Noisyubantian#a1-9 722
+aldeg_cas01.gat,95,80,2 duplicate(Noisyubantian) Noisyubantian#a1-10 722
+aldeg_cas01.gat,95,59,2 duplicate(Noisyubantian) Noisyubantian#a1-11 722
+aldeg_cas01.gat,62,75,2 duplicate(Noisyubantian) Noisyubantian#a1-12 722
+aldeg_cas01.gat,70,75,2 duplicate(Noisyubantian) Noisyubantian#a1-13 722
+aldeg_cas01.gat,74,75,2 duplicate(Noisyubantian) Noisyubantian#a1-14 722
+aldeg_cas01.gat,62,64,2 duplicate(Noisyubantian) Noisyubantian#a1-15 722
+aldeg_cas01.gat,66,64,2 duplicate(Noisyubantian) Noisyubantian#a1-16 722
+aldeg_cas01.gat,70,64,2 duplicate(Noisyubantian) Noisyubantian#a1-17 722
+aldeg_cas01.gat,74,64,2 duplicate(Noisyubantian) Noisyubantian#a1-18 722
+aldeg_cas01.gat,203,150,4 duplicate(Noisyubantian) Noisyubantian#a1-19 722
+aldeg_cas01.gat,210,150,4 duplicate(Noisyubantian) Noisyubantian#a1-20 722
+
+
+
+
+//================================================================================//
+// Castle 2
+//================================================================================//
+aldebaran.gat,149,97,4 script Hohensyubangawoo#a2-1::Hohensyubangawoo 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas02",85,72;
+ close;
+
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ end;
+}
+
+// In Guild =================================================
+alde_gld.gat,93,250,5 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-2 722
+alde_gld.gat,98,250,5 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-3 722
+// In Castle =============================================
+aldeg_cas02.gat,82,71,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-4 722
+aldeg_cas02.gat,67,30,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-5 722
+aldeg_cas02.gat,183,140,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-6 722
+aldeg_cas02.gat,212,152,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-7 722
+aldeg_cas02.gat,108,39,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-8 722
+aldeg_cas02.gat,57,213,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-9 722
+aldeg_cas02.gat,91,181,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-10 722
+aldeg_cas02.gat,103,53,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-11 722
+aldeg_cas02.gat,73,53,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-12 722
+aldeg_cas02.gat,63,41,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-13 722
+aldeg_cas02.gat,229,6,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-14 722
+aldeg_cas02.gat,230,40,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-15 722
+aldeg_cas02.gat,197,40,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-16 722
+aldeg_cas02.gat,32,213,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-17 722
+aldeg_cas02.gat,88,180,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-18 722
+aldeg_cas02.gat,121,29,2 duplicate(Hohensyubangawoo) Hohensyubangawoo#a2-19 722
+
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+aldebaran.gat,134,97,4 script Nyirenverk#a3-1::Nyirenverk 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas03",118,76;
+ close;
+
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ end;
+}
+// In Guild ===============================================
+alde_gld.gat,139,83,1 duplicate(Nyirenverk) Nyirenverk#a3-2 722
+alde_gld.gat,145,83,1 duplicate(Nyirenverk) Nyirenverk#a3-3 722
+// In Castle =============================================
+aldeg_cas03.gat,176,175,2 duplicate(Nyirenverk) Nyirenverk#a3-4 722
+aldeg_cas03.gat,85,103,2 duplicate(Nyirenverk) Nyirenverk#a3-5 722
+aldeg_cas03.gat,77,115,2 duplicate(Nyirenverk) Nyirenverk#a3-6 722
+aldeg_cas03.gat,77,215,2 duplicate(Nyirenverk) Nyirenverk#a3-7 722
+aldeg_cas03.gat,112,107,2 duplicate(Nyirenverk) Nyirenverk#a3-8 722
+aldeg_cas03.gat,112,117,2 duplicate(Nyirenverk) Nyirenverk#a3-9 722
+aldeg_cas03.gat,69,71,2 duplicate(Nyirenverk) Nyirenverk#a3-10 722
+aldeg_cas03.gat,91,69,2 duplicate(Nyirenverk) Nyirenverk#a3-11 722
+aldeg_cas03.gat,108,60,2 duplicate(Nyirenverk) Nyirenverk#a3-12 722
+aldeg_cas03.gat,121,73,2 duplicate(Nyirenverk) Nyirenverk#a3-13 722
+aldeg_cas03.gat,121,73,2 duplicate(Nyirenverk) Nyirenverk#a3-14 722
+aldeg_cas03.gat,75,102,2 duplicate(Nyirenverk) Nyirenverk#a3-15 722
+aldeg_cas03.gat,199,169,2 duplicate(Nyirenverk) Nyirenverk#a3-16 722
+aldeg_cas03.gat,181,179,2 duplicate(Nyirenverk) Nyirenverk#a3-17 722
+aldeg_cas03.gat,192,44,2 duplicate(Nyirenverk) Nyirenverk#a3-18 722
+aldeg_cas03.gat,88,108,2 duplicate(Nyirenverk) Nyirenverk#a3-19 722
+aldeg_cas03.gat,208,145,2 duplicate(Nyirenverk) Nyirenverk#a3-20 722
+aldeg_cas03.gat,207,75,2 duplicate(Nyirenverk) Nyirenverk#a3-21 722
+aldeg_cas03.gat,96,62,2 duplicate(Nyirenverk) Nyirenverk#a3-22 722
+
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+aldebaran.gat,131,97,4 script Byirtsburi#a4-1::Byirtsburi 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas04",45,88;
+ close;
+
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+alde_gld.gat,239,247,1 duplicate(Byirtsburi) Byirtsburi#a4-2 722
+alde_gld.gat,234,247,1 duplicate(Byirtsburi) Byirtsburi#a4-3 722
+alde_gld.gat,241,239,7 duplicate(Byirtsburi) Byirtsburi#a4-4 722
+alde_gld.gat,241,234,7 duplicate(Byirtsburi) Byirtsburi#a4-5 722
+// In Castle =============================================
+aldeg_cas04.gat,167,61,2 duplicate(Byirtsburi) Byirtsburi#a4-6 722
+aldeg_cas04.gat,164,90,2 duplicate(Byirtsburi) Byirtsburi#a4-7 722
+aldeg_cas04.gat,143,209,2 duplicate(Byirtsburi) Byirtsburi#a4-8 722
+aldeg_cas04.gat,129,193,2 duplicate(Byirtsburi) Byirtsburi#a4-9 722
+aldeg_cas04.gat,112,206,2 duplicate(Byirtsburi) Byirtsburi#a4-10 722
+aldeg_cas04.gat,113,212,2 duplicate(Byirtsburi) Byirtsburi#a4-11 722
+aldeg_cas04.gat,77,117,2 duplicate(Byirtsburi) Byirtsburi#a4-12 722
+aldeg_cas04.gat,186,42,2 duplicate(Byirtsburi) Byirtsburi#a4-13 722
+aldeg_cas04.gat,30,69,2 duplicate(Byirtsburi) Byirtsburi#a4-14 722
+aldeg_cas04.gat,55,97,2 duplicate(Byirtsburi) Byirtsburi#a4-15 722
+aldeg_cas04.gat,45,98,2 duplicate(Byirtsburi) Byirtsburi#a4-16 722
+aldeg_cas04.gat,33,116,2 duplicate(Byirtsburi) Byirtsburi#a4-17 722
+aldeg_cas04.gat,130,180,2 duplicate(Byirtsburi) Byirtsburi#a4-18 722
+aldeg_cas04.gat,129,193,2 duplicate(Byirtsburi) Byirtsburi#a4-19 722
+aldeg_cas04.gat,142,209,2 duplicate(Byirtsburi) Byirtsburi#a4-20 722
+aldeg_cas04.gat,33,107,2 duplicate(Byirtsburi) Byirtsburi#a4-21 722
+aldeg_cas04.gat,133,220,2 duplicate(Byirtsburi) Byirtsburi#a4-22 722
+aldeg_cas04.gat,169,22,2 duplicate(Byirtsburi) Byirtsburi#a4-23 722
+aldeg_cas04.gat,169,15,2 duplicate(Byirtsburi) Byirtsburi#a4-24 722
+
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+aldebaran.gat,128,97,4 script Rotenburk#a5-1::Rotenburk 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas05",31,190;
+ close;
+
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ end;
+}
+// In Guild ===============================================
+alde_gld.gat,266,92,7 duplicate(Rotenburk) Rotenburk#a5-2 722
+alde_gld.gat,266,88,7 duplicate(Rotenburk) Rotenburk#a5-3 722
+// In Castle =============================================
+aldeg_cas05.gat,170,85,2 duplicate(Rotenburk) Rotenburk#a5-4 722
+aldeg_cas05.gat,142,212,2 duplicate(Rotenburk) Rotenburk#a5-5 722
+aldeg_cas05.gat,149,196,2 duplicate(Rotenburk) Rotenburk#a5-6 722
+aldeg_cas05.gat,41,180,2 duplicate(Rotenburk) Rotenburk#a5-7 722
+aldeg_cas05.gat,38,201,2 duplicate(Rotenburk) Rotenburk#a5-8 722
+aldeg_cas05.gat,65,182,2 duplicate(Rotenburk) Rotenburk#a5-9 722
+aldeg_cas05.gat,65,205,2 duplicate(Rotenburk) Rotenburk#a5-10 722
+aldeg_cas05.gat,10,218,2 duplicate(Rotenburk) Rotenburk#a5-11 722
+aldeg_cas05.gat,164,201,2 duplicate(Rotenburk) Rotenburk#a5-12 722
+aldeg_cas05.gat,216,96,2 duplicate(Rotenburk) Rotenburk#a5-13 722
+aldeg_cas05.gat,217,80,2 duplicate(Rotenburk) Rotenburk#a5-14 722
+aldeg_cas05.gat,14,117,2 duplicate(Rotenburk) Rotenburk#a5-15 722
+aldeg_cas05.gat,10,225,2 duplicate(Rotenburk) Rotenburk#a5-16 722
+aldeg_cas05.gat,187,59,2 duplicate(Rotenburk) Rotenburk#a5-17 722
+aldeg_cas05.gat,154,51,2 duplicate(Rotenburk) Rotenburk#a5-18 722
+aldeg_cas05.gat,22,211,2 duplicate(Rotenburk) Rotenburk#a5-19 722
+aldeg_cas05.gat,150,202,2 duplicate(Rotenburk) Rotenburk#a5-20 722
diff --git a/npc/guild/aldeg/aldeg_guardians.txt b/npc/guild/aldeg/aldeg_guardians.txt
new file mode 100644
index 000000000..3cd10972d
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_guardians.txt
@@ -0,0 +1,111 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all aldeg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+aldeg_cas01.gat,216,24,0 script Guardian_A01 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas01.gat",10) == 1) guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas01.gat",11) == 1) guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas01.gat",12) == 1) guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas01.gat",13) == 1) guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas01.gat",14) == 1) guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas01.gat",15) == 1) guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas01.gat",16) == 1) guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas01.gat",17) == 1) guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+
+//NoSpawn:
+// break;
+}
+//------------------------------------------------------------------------------
+aldeg_cas02.gat,214,24,0 script Guardian_A02 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas02.gat",10) == 1) guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas02.gat",11) == 1) guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas02.gat",12) == 1) guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas02.gat",13) == 1) guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas02.gat",14) == 1) guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas02.gat",15) == 1) guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas02.gat",16) == 1) guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas02.gat",17) == 1) guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas03.gat,206,32,0 script Guardian_A03 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas03.gat",10) == 1) guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas03.gat",11) == 1) guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas03.gat",12) == 1) guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas03.gat",13) == 1) guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas03.gat",14) == 1) guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas03.gat",15) == 1) guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas03.gat",16) == 1) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas03.gat",17) == 1) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas04.gat,36,218,0 script Guardian_A04 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas04.gat",10) == 1) guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas04.gat",11) == 1) guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas04.gat",12) == 1) guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas04.gat",13) == 1) guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas04.gat",14) == 1) guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas04.gat",15) == 1) guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas04.gat",16) == 1) guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas04.gat",17) == 1) guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas05.gat,28,102,0 script Guardian_A05 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas05.gat",10) == 1) guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas05.gat",11) == 1) guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas05.gat",12) == 1) guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas05.gat",13) == 1) guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas05.gat",14) == 1) guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas05.gat",15) == 1) guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas05.gat",16) == 1) guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas05.gat",17) == 1) guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_kafras.txt b/npc/guild/aldeg/aldeg_kafras.txt
new file mode 100644
index 000000000..c2005f95a
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_kafras.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of Al De Baran Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+aldeg_cas01.gat,218,170,0 script Kafra Service#A01 117,{
+ callfunc "F_GKafra", "aldeg_cas01", "Al De Baran";
+ end;
+OnRecvCastleA01:
+ if (GetCastleData("aldeg_cas01.gat",9) < 1) disablenpc "Kafra Service#A01";
+ end;
+}
+
+// Castle 2 ===============================================
+aldeg_cas02.gat,84,74,0 script Kafra Service#A02 117,{
+ callfunc "F_GKafra", "aldeg_cas02", "Al De Baran";
+ end;
+OnRecvCastleA02:
+ if (GetCastleData("aldeg_cas02.gat",9) < 1) disablenpc "Kafra Service#A02";
+ end;
+}
+
+// Castle 3 ===============================================
+aldeg_cas03.gat,118,76,0 script Kafra Service#A03 117,{
+ callfunc "F_GKafra", "aldeg_cas03", "Al De Baran";
+ end;
+OnRecvCastleA03:
+ if (GetCastleData("aldeg_cas03.gat",9) < 1) disablenpc "Kafra Service#A03";
+ end;
+}
+
+// Castle 4 ===============================================
+aldeg_cas04.gat,45,88,0 script Kafra Service#A04 117,{
+ callfunc "F_GKafra", "aldeg_cas04", "Al De Baran";
+ end;
+OnRecvCastleA04:
+ if (GetCastleData("aldeg_cas04.gat",9) < 1) disablenpc "Kafra Service#A04";
+ end;
+}
+
+// Castle 5 ===============================================
+aldeg_cas05.gat,31,190,0 script Kafra Service#A05 117,{
+ callfunc "F_GKafra", "aldeg_cas05", "Al De Baran";
+ end;
+OnRecvCastleA05:
+ if (GetCastleData("aldeg_cas05.gat",9) < 1) disablenpc "Kafra Service#A05";
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_managers.txt b/npc/guild/aldeg/aldeg_managers.txt
new file mode 100644
index 000000000..e0f2e65dd
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_managers.txt
@@ -0,0 +1,110 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+aldeg_cas01.gat,218,175,0 script Arl Fredo 55,{
+
+ if(callfunc("F_GldManager","Arl Fredo","aldeg_cas01",119,223,"A01") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ mes "[Arl Fredo]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+aldeg_cas02.gat,78,74,0 script Chen Lee 55,{
+
+ if(callfunc("F_GldManager","Chen Lee","aldeg_cas02",135,231,"A02") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+aldeg_cas03.gat,110,118,0 script Chen Lee 55,{
+
+ if(callfunc("F_GldManager","Chen Lee","aldeg_cas03",225,269,"A03") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+aldeg_cas04.gat,53,89,0 script Brimhemsen 55,{
+//aldeg_cas04.gat,67,116,0 script Brimhemsen 55,{
+
+ if(callfunc("F_GldManager","Brimhemsen","aldeg_cas04",85,12,"A04") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+aldeg_cas05.gat,52,179,0 script Brimhemsen 55,{
+
+ if(callfunc("F_GldManager","Brimhemsen","aldeg_cas05",66,11,"A05") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/aldeg/aldeg_treas.txt b/npc/guild/aldeg/aldeg_treas.txt
new file mode 100644
index 000000000..a6f9ffb61
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_treas.txt
@@ -0,0 +1,141 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn -----------------------
+aldeg_cas01.gat,1,1,1 script Treasure_A01 -1,{
+
+OnRecvCastleA01:
+ if($boxNumA01 == 0) end;
+ set $@bxA01, $boxNumA01;
+ callfunc "F_GldTreas","aldeg_cas01","A01",$boxNumA01,$@bxA01,$@boxIdA01,1324,114,218,123,227,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","aldeg_cas01","A01",$boxNumA01,$@bxA01,$@boxIdA01,1324,114,218,123,227,0;
+ end;
+OnDied:
+ mapannounce "aldeg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumA01, $boxNumA01 -1;
+ if($boxNumA01 == 0) mapannounce "aldeg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch --------------------
+aldeg_cas01.gat,123,223,0 script Switch#TresA01 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas01",218,176;
+ end;
+}
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ----------------------------
+aldeg_cas02.gat,1,1,1 script Treasure_A02 -1,{
+
+OnRecvCastleA02:
+ if($boxNumA02 == 0) end;
+ set $@bxA02, $boxNumA02;
+ callfunc "F_GldTreas","aldeg_cas02","A02",$boxNumA02,$@bxA02,$@boxIdA02,1326,130,226,138,235,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","aldeg_cas02","A02",$boxNumA02,$@bxA02,$@boxIdA02,1326,130,226,138,235,0;
+ end;
+OnDied:
+ mapannounce "aldeg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumA02, $boxNumA02 -1;
+ if($boxNumA02 == 0) mapannounce "aldeg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------
+aldeg_cas02.gat,139,235,0 script Switch#TresA02 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas02",78,75;
+}
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ---------------------------
+aldeg_cas03.gat,1,1,1 script Treasure_A03 -1,{
+
+OnRecvCastleA03:
+ if($boxNumA03 == 0) end;
+ set $@bxA03, $boxNumA03;
+ callfunc "F_GldTreas","aldeg_cas03","A03",$boxNumA03,$@bxA03,$@boxIdA03,1328,220,264,229,273,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","aldeg_cas03","A03",$boxNumA03,$@bxA03,$@boxIdA03,1328,220,264,229,273,0;
+ end;
+OnDied:
+ mapannounce "aldeg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumA03, $boxNumA03 -1;
+ if($boxNumA03 == 0) mapannounce "aldeg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch -----------------------
+aldeg_cas03.gat,229,267,0 script Switch#TresA03 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas03",110,119;
+}
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn -------------------------------
+aldeg_cas04.gat,1,1,1 script Treasure_A04 -1,{
+
+OnRecvCastleA04:
+ if($boxNumA04 == 0) end;
+ set $@bxA04, $boxNumA04;
+ callfunc "F_GldTreas","aldeg_cas04","A04",$boxNumA04,$@bxA04,$@boxIdA04,1330,80,8,89,17,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","aldeg_cas04","A04",$boxNumA04,$@bxA04,$@boxIdA04,1330,80,8,89,17,0;
+ end;
+OnDied:
+ mapannounce "aldeg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumA04, $boxNumA04 -1;
+ if($boxNumA04 == 0) mapannounce "aldeg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+
+}
+// Treasure Room Switch -------------------------
+aldeg_cas04.gat,83,17,0 script Switch#TresA04 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas04",67,117;
+}
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ------------------------------------
+aldeg_cas05.gat,1,1,1 script Treasure_A05 -1,{
+
+OnRecvCastleA05:
+ if($boxNumA05 == 0) end;
+ set $@bxA05, $boxNumA05;
+ callfunc "F_GldTreas","aldeg_cas05","A05",$boxNumA05,$@bxA05,$@boxIdA05,1332,58,8,65,15,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","aldeg_cas05","A05",$boxNumA05,$@bxA05,$@boxIdA05,1332,58,8,65,15,0;
+ end;
+OnDied:
+ mapannounce "aldeg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumA05, $boxNumA05 -1;
+ if($boxNumA05 == 0) mapannounce "aldeg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------
+aldeg_cas05.gat,64,8,0 script Switch#TresA05 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas05",51,179;
+}
diff --git a/npc/guild/ev_agit_event.txt b/npc/guild/ev_agit_event.txt
new file mode 100644
index 000000000..49946d92d
--- /dev/null
+++ b/npc/guild/ev_agit_event.txt
@@ -0,0 +1,41 @@
+//===== eAthena Script =======================================
+//= War of Emperium - WoE Auto-Start
+//===== By: ==================================================
+//= kalen (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Auto Start for War of Emperium
+//=============================================
+//= gettime(3): Gets hour (24 hour time)
+//= gettime(4): Use it if you only want to have WoE start on
+//= certain days.
+//= 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, etc.
+//===== Additional Comments: =================================
+//= v1.1a changed OnInit to OnAgitInit.[kobra_k88]
+//= v1.2 added gettime checks. removed $AgitStarted var.[kobra_k88]
+//============================================================
+
+// Auto Start Agit NPC
+- script Agit_Event -1,{
+ end;
+
+OnAgitInit:
+ if(gettime(3) >= 21 || gettime(3) < 11) goto L_Stop;
+
+OnClock1100:
+// if(gettime(4)!=1 || gettime(4)!=3 || gettime(4)!=6) end;
+ Announce "The War Of Emperium has begun!",8;
+ AgitStart;
+ Break;
+
+OnClock2100:
+L_Stop:
+// if(gettime(4)!=1 || gettime(4)!=3 || gettime(4)!=6) end;
+ Announce "The War Of Emperium is over!",8;
+ AgitEnd;
+ Break;
+}
diff --git a/npc/guild/gefg/gefg_dunsw.txt b/npc/guild/gefg/gefg_dunsw.txt
new file mode 100644
index 000000000..f7f794fd2
--- /dev/null
+++ b/npc/guild/gefg/gefg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+gefg_cas01.gat,78,84,0 script Switch#DunG01 111,{
+ callfunc "F_GldDunSw","gefg_cas01","04",39,258;
+ close;
+}
+
+
+// Castle 2 ================================================
+gefg_cas02.gat,167,40,0 script Switch#DunG02 111,{
+ callfunc "F_GldDunSw","gefg_cas02","04",125,270;
+ close;
+}
+
+
+// Castle 3 ================================================
+gefg_cas03.gat,221,43,0 script Switch#DunG03 111,{
+ callfunc "F_GldDunSw","gefg_cas03","04",268,251;
+ close;
+}
+
+
+// Castle 4 ================================================
+gefg_cas04.gat,58,75,0 script Switch#DunG04 111,{
+ callfunc "F_GldDunSw","gefg_cas04","04",268,108;
+ close;
+}
+
+
+// Castle 5 ================================================
+gefg_cas05.gat,66,29,0 script Switch#DunG05 111,{
+ callfunc "F_GldDunSw","gefg_cas05","04",230,35;
+ close;
+}
diff --git a/npc/guild/gefg/gefg_ev_agit.txt b/npc/guild/gefg/gefg_ev_agit.txt
new file mode 100644
index 000000000..48417b2af
--- /dev/null
+++ b/npc/guild/gefg/gefg_ev_agit.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Geffen Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Geffen Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================================
+gefg_cas01.gat,198,182,0 script Agit_G01 -1,{
+OnInterIfInit:
+ GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
+ end;
+OnRecvCastleG01:
+ RequestGuildInfo GetCastleData("gefg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas01","G01",198,182;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas01","G01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),6;
+ Monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_G01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas01","G01";
+ end;
+}
+
+// Castle 2 ================================================================
+gefg_cas02.gat,176,178,0 script Agit_G02 -1,{
+OnInterIfInit:
+ GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
+ end;
+OnRecvCastleG02:
+ RequestGuildInfo GetCastleData("gefg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas02","G02",176,178;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas02","G02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),6;
+ Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_G02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas02","G02";
+ end;
+}
+
+// Castle 3 ================================================================
+gefg_cas03.gat,245,167,0 script Agit_G03 -1,{
+OnInterIfInit:
+ GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
+ end;
+OnRecvCastleG03:
+ RequestGuildInfo GetCastleData("gefg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas03","G03",245,167;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas03","G03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),6;
+ Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_G03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas03","G03";
+ end;
+}
+
+// Castle 4 ================================================================
+gefg_cas04.gat,174,178,0 script Agit_G04 -1,{
+OnInterIfInit:
+ GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
+ end;
+OnRecvCastleG04:
+ RequestGuildInfo GetCastleData("gefg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas04","G04",174,178;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas04","G04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),6;
+ Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_G04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas04","G04";
+ end;
+}
+
+// Castle 5 ================================================================
+gefg_cas05.gat,194,184,0 script Agit_G05 -1,{
+OnInterIfInit:
+ GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
+ end;
+OnRecvCastleG05:
+ RequestGuildInfo GetCastleData("gefg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas05","G05",194,184;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas05","G05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),6;
+ Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_G05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas05","G05";
+ end;
+}
diff --git a/npc/guild/gefg/gefg_flags.txt b/npc/guild/gefg/gefg_flags.txt
new file mode 100644
index 000000000..d31db1f69
--- /dev/null
+++ b/npc/guild/gefg/gefg_flags.txt
@@ -0,0 +1,154 @@
+//===== eAthena Script =======================================
+//= War of Emperium Geffen Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+geffen.gat,109,123,2 script Reprion#g1-1::Reprion 722,
+{
+ callfunc "F_Flags","Geffen","gefg_cas01",83,47;
+ close;
+
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,148,51,5 duplicate(Reprion) Reprion#g1-2 722
+gef_fild13.gat,155,54,5 duplicate(Reprion) Reprion#g1-3 722
+gef_fild13.gat,212,79,6 duplicate(Reprion) Reprion#g1-4 722
+gef_fild13.gat,211,71,6 duplicate(Reprion) Reprion#g1-5 722
+// In Castle =============================================
+gefg_cas01.gat,28,157,4 duplicate(Reprion) Reprion#g1-6 722
+gefg_cas01.gat,32,157,4 duplicate(Reprion) Reprion#g1-7 722
+gefg_cas01.gat,22,156,5 duplicate(Reprion) Reprion#g1-8 722
+gefg_cas01.gat,68,185,3 duplicate(Reprion) Reprion#g1-9 722
+gefg_cas01.gat,17,171,5 duplicate(Reprion) Reprion#g1-10 722
+gefg_cas01.gat,59,16,4 duplicate(Reprion) Reprion#g1-11 722
+gefg_cas01.gat,64,16,4 duplicate(Reprion) Reprion#g1-12 722
+
+
+
+//===================================================================================//
+// Castle 2
+//===================================================================================//
+geffen.gat,112,129,1 script Yolbriger#g2-1::Yolbriger 722,
+{
+ callfunc "F_Flags","Geffen","gefg_cas02",23,66;
+ close;
+
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ end;
+}
+// In Guild ==============================================
+gef_fild13.gat,303,243,4 duplicate(Yolbriger) Yolbriger#g2-2 722
+gef_fild13.gat,312,243,4 duplicate(Yolbriger) Yolbriger#g2-3 722
+gef_fild13.gat,290,243,4 duplicate(Yolbriger) Yolbriger#g2-4 722
+gef_fild13.gat,324,243,4 duplicate(Yolbriger) Yolbriger#g2-5 722
+// In Castle ============================================
+gefg_cas02.gat,65,130,5 duplicate(Yolbriger) Yolbriger#g2-6 722
+gefg_cas02.gat,30,123,5 duplicate(Yolbriger) Yolbriger#g2-7 722
+gefg_cas02.gat,65,139,6 duplicate(Yolbriger) Yolbriger#g2-8 722
+gefg_cas02.gat,37,177,6 duplicate(Yolbriger) Yolbriger#g2-9 722
+gefg_cas02.gat,37,168,6 duplicate(Yolbriger) Yolbriger#g2-10 722
+gefg_cas02.gat,68,47,2 duplicate(Yolbriger) Yolbriger#g2-11 722
+gefg_cas02.gat,68,36,2 duplicate(Yolbriger) Yolbriger#g2-12 722
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+geffen.gat,120,132,8 script Isinlife#g3-1::Isinlife 722,
+{
+ callfunc "F_Flags","Geffen","gefg_cas03",116,89;
+ close;
+
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,78,182,4 duplicate(Isinlife) Isinlife#g3-2 722
+gef_fild13.gat,87,182,4 duplicate(Isinlife) Isinlife#g3-3 722
+gef_fild13.gat,73,295,7 duplicate(Isinlife) Isinlife#g3-4 722
+gef_fild13.gat,113,274,7 duplicate(Isinlife) Isinlife#g3-5 722
+gef_fild13.gat,144,235,6 duplicate(Isinlife) Isinlife#g3-6 722
+gef_fild13.gat,144,244,4 duplicate(Isinlife) Isinlife#g3-7 722
+// In Castle =============================================
+gefg_cas03.gat,122,220,6 duplicate(Isinlife) Isinlife#g3-8 722
+gefg_cas03.gat,122,229,6 duplicate(Isinlife) Isinlife#g3-9 722
+gefg_cas03.gat,91,257,7 duplicate(Isinlife) Isinlife#g3-10 722
+gefg_cas03.gat,52,276,7 duplicate(Isinlife) Isinlife#g3-11 722
+gefg_cas03.gat,56,164,4 duplicate(Isinlife) Isinlife#g3-12 722
+gefg_cas03.gat,65,164,4 duplicate(Isinlife) Isinlife#g3-13 722
+gefg_cas03.gat,37,214,1 duplicate(Isinlife) Isinlife#g3-14 722
+gefg_cas03.gat,34,208,1 duplicate(Isinlife) Isinlife#g3-15 722
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+geffen.gat,127,130,7 script Berigel#g4-1::Berigel 722,
+{
+ callfunc "F_Flags","Geffen","gefg_cas04",59,70;
+ close;
+
+OnRecvCastleG04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,190,283,3 duplicate(Berigel) Berigel#g4-2 722
+gef_fild13.gat,199,274,3 duplicate(Berigel) Berigel#g4-3 722
+// In Castle =============================================
+gefg_cas04.gat,24,157,4 duplicate(Berigel) Berigel#g4-4 722
+gefg_cas04.gat,35,158,4 duplicate(Berigel) Berigel#g4-5 722
+gefg_cas04.gat,44,184,4 duplicate(Berigel) Berigel#g4-6 722
+gefg_cas04.gat,51,184,4 duplicate(Berigel) Berigel#g4-7 722
+gefg_cas04.gat,39,212,7 duplicate(Berigel) Berigel#g4-8 722
+gefg_cas04.gat,29,212,1 duplicate(Berigel) Berigel#g4-9 722
+gefg_cas04.gat,24,73,1 duplicate(Berigel) Berigel#g4-10 722
+gefg_cas04.gat,35,73,4 duplicate(Berigel) Berigel#g4-11 722
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+geffen.gat,131,123,6 script Melsedetsu#g5-1::Melsedetsu 722,
+{
+ callfunc "F_Flags","Geffen","gefg_cas05",61,52;
+ close;
+
+OnRecvCastleG05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,302,87,7 duplicate(Melsedetsu) Melsedetsu#g5-2 722
+gef_fild13.gat,313,83,0 duplicate(Melsedetsu) Melsedetsu#g5-3 722
+gef_fild13.gat,252,51,2 duplicate(Melsedetsu) Melsedetsu#g5-4 722
+gef_fild13.gat,26,147,2 duplicate(Melsedetsu) Melsedetsu#g5-5 722
+// In Castle =============================================
+gefg_cas05.gat,77,185,7 duplicate(Melsedetsu) Melsedetsu#g5-6 722
+gefg_cas05.gat,92,181,0 duplicate(Melsedetsu) Melsedetsu#g5-7 722
+gefg_cas05.gat,83,158,1 duplicate(Melsedetsu) Melsedetsu#g5-8 722
+gefg_cas05.gat,62,144,7 duplicate(Melsedetsu) Melsedetsu#g5-9 722
+gefg_cas05.gat,62,66,4 duplicate(Melsedetsu) Melsedetsu#g5-10 722
+gefg_cas05.gat,69,66,4 duplicate(Melsedetsu) Melsedetsu#g5-11 722
diff --git a/npc/guild/gefg/gefg_guardians.txt b/npc/guild/gefg/gefg_guardians.txt
new file mode 100644
index 000000000..13947fd12
--- /dev/null
+++ b/npc/guild/gefg/gefg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all gefg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+gefg_cas01.gat,198,182,0 script Guardian_G01 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas01.gat",10) == 1) guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas01.gat",11) == 1) guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas01.gat",12) == 1) guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas01.gat",13) == 1) guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas01.gat",14) == 1) guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas01.gat",15) == 1) guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas01.gat",16) == 1) guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas01.gat",17) == 1) guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas02.gat,176,178,0 script Guardian_G02 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas02.gat",10) == 1) guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas02.gat",11) == 1) guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas02.gat",12) == 1) guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas02.gat",13) == 1) guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_G02::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas02.gat",14) == 1) guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_G02::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas02.gat",15) == 1) guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas02.gat",16) == 1) guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas02.gat",17) == 1) guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas03.gat,245,167,0 script Guardian_G03 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas03.gat",10) == 1) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas03.gat",11) == 1) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas03.gat",12) == 1) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas03.gat",13) == 1) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas03.gat",14) == 1) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas03.gat",15) == 1) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas03.gat",16) == 1) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas03.gat",17) == 1) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas04.gat,174,178,0 script Guardian_G04 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas04.gat",10) == 1) guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas04.gat",11) == 1) guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas04.gat",12) == 1) guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas04.gat",13) == 1) guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas04.gat",14) == 1) guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas04.gat",15) == 1) guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas04.gat",16) == 1) guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas04.gat",17) == 1) guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas05.gat,194,184,0 script Guardian_G05 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas05.gat",10) == 1) guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas05.gat",11) == 1) guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas05.gat",12) == 1) guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas05.gat",13) == 1) guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas05.gat",14) == 1) guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas05.gat",15) == 1) guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas05.gat",16) == 1) guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas05.gat",17) == 1) guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/gefg/gefg_kafras.txt b/npc/guild/gefg/gefg_kafras.txt
new file mode 100644
index 000000000..77fccddfa
--- /dev/null
+++ b/npc/guild/gefg/gefg_kafras.txt
@@ -0,0 +1,71 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of Geffen Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+//gefg_cas01.gat,96,173,0 script Kafra Service#G01 117,{
+gefg_cas01.gat,35,37,0 script Kafra Service#G01 117,
+{
+ callfunc "F_GKafra", "gefg_cas01", "Geffen";
+ end;
+OnRecvCastleG01:
+ if (GetCastleData("gefg_cas01.gat",9) < 1) disablenpc "Kafra Service#G01";
+ end;
+}
+
+
+// Castle 2 ===============================================
+gefg_cas02.gat,23,66,3 script Kafra Service#G02 117,
+{
+ callfunc "F_GKafra", "gefg_cas02", "Geffen";
+ end;
+OnRecvCastleG02:
+ if (GetCastleData("gefg_cas02.gat",9) < 1) disablenpc "Kafra Service#G02";
+ end;
+}
+
+
+// Castle 3 ===============================================
+gefg_cas03.gat,116,89,5 script Kafra Service#G03 117,
+{
+ callfunc "F_GKafra", "gefg_cas03", "Geffen";
+ end;
+OnRecvCastleG03:
+ if (GetCastleData("gefg_cas03.gat",9) < 1) disablenpc "Kafra Service#G03";
+ end;
+}
+
+
+// Castle 4 ===============================================
+gefg_cas04.gat,59,70,3 script Kafra Service#G04 117,
+{
+ callfunc "F_GKafra", "gefg_cas04", "Geffen";
+ end;
+OnRecvCastleG04:
+ if (GetCastleData("gefg_cas04.gat",9) < 1) disablenpc "Kafra Service#G04";
+ end;
+}
+
+
+// Castle 5 ===============================================
+gefg_cas05.gat,61,52,5 script Kafra Service#G05 117,
+{
+ callfunc "F_GKafra", "gefg_cas05", "Geffen";
+ end;
+OnRecvCastleG05:
+ if (GetCastleData("gefg_cas05.gat",9) < 1) disablenpc "Kafra Service#G05";
+ end;
+}
diff --git a/npc/guild/gefg/gefg_managers.txt b/npc/guild/gefg/gefg_managers.txt
new file mode 100644
index 000000000..07e62e5bc
--- /dev/null
+++ b/npc/guild/gefg/gefg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+gefg_cas01.gat,40,48,5 script Gnaucher 55,{
+ if(callfunc("F_GldManager","Gnaucher","gefg_cas01",155,112,"G01") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ mes "[ Gnaucher ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+gefg_cas02.gat,12,66,5 script Esmark 55,{
+ if(callfunc("F_GldManager","Esmark","gefg_cas02",141,115,"G02") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ mes "[ Esmark ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+gefg_cas03.gat,106,23,5 script Jyang 55,{
+ if(callfunc("F_GldManager","Jyang","gefg_cas03",270,290,"G03") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",7;
+ mes "[ Jyang ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+gefg_cas04.gat,73,46,5 script Kelbany 55,{
+ if(callfunc("F_GldManager","Kelbany","gefg_cas04",116,118,"G04") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",7;
+ mes "[ Kelbany ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+gefg_cas05.gat,70,52,5 script Beeor 55,{
+ if(callfunc("F_GldManager","Beeor","gefg_cas05",144,110,"G05") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",7;
+ mes "[ Beeor ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/gefg/gefg_treas.txt b/npc/guild/gefg/gefg_treas.txt
new file mode 100644
index 000000000..331756b79
--- /dev/null
+++ b/npc/guild/gefg/gefg_treas.txt
@@ -0,0 +1,148 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<============================ Castle 1 ==================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas01.gat,1,1,1 script Treasure_G01 -1,{
+
+OnRecvCastleG01:
+ if($boxNumG01 == 0) end;
+ set $@bxG01, $boxNumG01;
+ callfunc "F_GldTreas","gefg_cas01","G01",$boxNumG01,$@bxG01,$@boxIdG01,1334,150,108,158,114,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","gefg_cas01","G01",$boxNumG01,$@bxG01,$@boxIdG01,1334,150,108,158,114,0;
+ end;
+OnDied:
+ mapannounce "gefg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumG01, $boxNumG01 -1;
+ if($boxNumG01 == 0) mapannounce "gefg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas01.gat,152,117,0 script Switch#TresG01 111,{
+ callfunc "F_GldTreasSw","gefg_cas01",40,49;
+ end;
+}
+
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas02.gat,1,1,1 script Treasure_G02 -1,{
+
+OnRecvCastleG02:
+ if($boxNumG02 == 0) end;
+ set $@bxG02, $boxNumG02;
+ callfunc "F_GldTreas","gefg_cas02","G02",$boxNumG02,$@bxG02,$@boxIdG02,1336,136,112,145,118,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","gefg_cas02","G02",$boxNumG02,$@bxG02,$@boxIdG02,1336,136,112,145,118,0;
+ end;
+OnDied:
+ mapannounce "gefg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumG02, $boxNumG02 -1;
+ if($boxNumG02 == 0) mapannounce "gefg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas02.gat,145,115,0 script Switch#TresG02 111,{
+ callfunc "F_GldTreasSw", "gefg_cas02",12,67;
+}
+
+
+//<================================= Castle 3 ===============================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas03.gat,1,1,1 script Treasure_G03 -1,{
+
+OnRecvCastleG03:
+ if($boxNumG03 == 0) end;
+ set $@bxG03, $boxNumG03;
+ callfunc "F_GldTreas","gefg_cas03","G03",$boxNumG03,$@bxG03,$@boxIdG03,1338,266,286,275,293,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","gefg_cas03","G03",$boxNumG03,$@bxG03,$@boxIdG03,1338,266,286,275,293,0;
+ end;
+OnDied:
+ mapannounce "gefg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumG03, $boxNumG03 -1;
+ if($boxNumG03 == 0) mapannounce "gefg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas03.gat,275,289,0 script Switch#TresG03 111,{
+ callfunc "F_GldTreasSw", "gefg_cas03",106,24;
+ end;
+}
+
+
+//<=============================== Castle 4 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas04.gat,1,1,1 script Treasure_G04 -1,{
+
+OnRecvCastleG04:
+ if($boxNumG04 == 0) end;
+ set $@bxG04, $boxNumG04;
+ callfunc "F_GldTreas","gefg_cas04","G04",$boxNumG04,$@bxG04,$@boxIdG04,1340,112,114,119,123,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","gefg_cas04","G04",$boxNumG04,$@bxG04,$@boxIdG04,1340,112,114,119,123,0;
+ end;
+OnDied:
+ mapannounce "gefg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumG04, $boxNumG04 -1;
+ if($boxNumG04 == 0) mapannounce "gefg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas04.gat,117,123,0 script Switch#TresG04 111,{
+ callfunc "F_GldTreasSw", "gefg_cas04",73,47;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas05.gat,1,1,1 script Treasure_G05 -1,{
+
+OnRecvCastleG05:
+ if($boxNumG05 == 0) end;
+ set $@bxG05, $boxNumG05;
+ callfunc "F_GldTreas","gefg_cas05","G05",$boxNumG05,$@bxG05,$@boxIdG05,1342,140,106,147,113,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","gefg_cas05","G05",$boxNumG05,$@bxG05,$@boxIdG05,1342,140,106,147,113,0;
+ end;
+OnDied:
+ mapannounce "gefg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumG05, $boxNumG05 -1;
+ if($boxNumG05 == 0) mapannounce "gefg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas05.gat,149,107,0 script Switch#TresG05 111,{
+ callfunc "F_GldTreasSw", "gefg_cas05",70,53;
+ close;
+}
diff --git a/npc/guild/gldfunc_dunsw.txt b/npc/guild/gldfunc_dunsw.txt
new file mode 100644
index 000000000..ebcda54fa
--- /dev/null
+++ b/npc/guild/gldfunc_dunsw.txt
@@ -0,0 +1,42 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Dungeon Switch Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to guild dungeon.
+//==========================================
+//= Break down of arguments used in the function:
+//= arg(0): name of guild castle.
+//= arg(1): guild dungeon level.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//===== Additional Comments: =================================
+//= v1.2: All guild Dungeon Switch npcs use this function.[kobra_k88]
+//============================================================
+
+//==================================================
+function script F_GldDunSw {
+
+ mes "[ Mysterious Voice ]";
+ mes " ' Only brave warriors may lead the guild base.. '";
+ next;
+ mes "(There is little switch over here....... Would you like to pull the switch?)";
+ next;
+ menu "Yes",-,"No",M_No;
+
+ set @GID, GetCastleData(getarg(0)+".gat",1);
+ if (getcharid(2) != @GID) goto L_NotGLead;
+ warp "gld_dun"+getarg(1)+".gat",getarg(2),getarg(3);
+ end;
+
+ L_NotGLead:
+ mes "[ Mysterious Voice ]";
+ mes " ' ..... it seems that you are not brave enough...... ' ";
+ M_No:
+ return;
+}
diff --git a/npc/guild/gldfunc_ev_agit.txt b/npc/guild/gldfunc_ev_agit.txt
new file mode 100644
index 000000000..460f95ffa
--- /dev/null
+++ b/npc/guild/gldfunc_ev_agit.txt
@@ -0,0 +1,149 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Event AgitStart/AgitBreak Functions
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= F_AgitStart is in charge of spawning Emperium and mobs in castles
+//= when WoE is started.
+//= F_AgitBreak resets guild castle data when a castle has been taken over.
+//= It then sets the data for the new guild master if there is one.
+//=======================================
+//= Break down of arguments used in F_AgitStart:
+//= arg(0): name of specific guild castle.
+//= arg(1): name of specific agit castle script.
+//= arg(2): x1 for Emperium and monster spawn
+//= arg(3): y1 for Emperium and monster spawn
+//= Break down of arguments used in F_AgitBreak:
+//= arg(0): name of specific guild castle.
+//= arg(1): name of specific OnRevCastle label.
+//===== Additional Comments: =================================
+//= v1.2: All OnAgitStart and OnAgitBreak calls will use these functions.[kobra_k88]
+//= v1.2a: Added OnAgitEnd function.[kobra_k88]
+//============================================================
+
+
+
+// Function for OnAgitStart =========================================
+function script F_AgitStart {
+
+ MapRespawnGuildID getarg(0)+".gat",GetCastleData(getarg(0)+".gat",1),2;
+ Monster getarg(0)+".gat",getarg(2),getarg(3),"EMPERIUM",1288,1,"Agit_"+getarg(1)+"::OnAgitBreak";
+ GvgOn getarg(0)+".gat";
+ if (GetCastleData(getarg(0)+".gat",1) != 0) return;
+ if(getarg(0) == "aldeg_cas01" || getarg(0) == "aldeg_cas02" || getarg(0) == "aldeg_cas03" || getarg(0) == "aldeg_cas04" || getarg(0) == "aldeg_cas05" || getarg(0) == "nguild_alde") goto L_AldegCas;
+ if(getarg(0) == "gefg_cas01" || getarg(0) == "gefg_cas02" || getarg(0) == "gefg_cas03" || getarg(0) == "gefg_cas04" || getarg(0) == "gefg_cas05" || getarg(0) == "nguild_gef") goto L_GefgCas;
+ if(getarg(0) == "payg_cas01" || getarg(0) == "payg_cas02" || getarg(0) == "payg_cas03" || getarg(0) == "payg_cas04" || getarg(0) == "payg_cas05" || getarg(0) == "nguild_pay") goto L_PaygCas;
+ if(getarg(0) == "prtg_cas01" || getarg(0) == "prtg_cas02" || getarg(0) == "prtg_cas03" || getarg(0) == "prtg_cas04" || getarg(0) == "prtg_cas05" || getarg(0) == "nguild_prt") goto L_PrtgCas;
+
+L_AldegCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1117,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1132,4;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,2;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1205,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1216,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1193,17;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1269,9;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,7;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1208,3;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1268,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1272,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1272,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1270,4;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1268,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1219,1;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1276,5;
+ return;
+L_GefgCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1117,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1263,11;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1102,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1130,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1140,20;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1163,9;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1150,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1159,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1203,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1087,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1213,7;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1189,7;
+ return;
+L_PaygCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1277,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1208,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1262,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1102,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1150,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1115,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1129,11;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1282,4;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1253,5;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1150,1;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1115,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1208,6;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1276,5;
+ return;
+L_PrtgCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1163,15;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1132,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1268,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1251,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1252,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1259,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1283,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1200,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1268,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1251,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1252,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1219,2;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1276,5;
+ return;
+}
+
+
+// Function for OnAgitBreak ======================================
+function script F_AgitBreak {
+ //killmonsterall getarg(0)+".gat";
+ set @GID,getcharid(2);
+ if (@GID <= 0) return;
+ set @Economy,GetCastleData(getarg(0)+".gat",2);
+ SetCastleData getarg(0)+".gat",2, @Economy-5;
+ if (GetCastleData(getarg(0)+".gat",2) < 0) SetCastleData getarg(0)+".gat",2,0;
+ set @Defence,GetCastleData(getarg(0)+".gat",3);
+ SetCastleData getarg(0)+".gat",3, @Defence-5;
+ if (GetCastleData(getarg(0)+".gat",3) < 0) SetCastleData getarg(0)+".gat",3,0;
+ SetCastleData getarg(0)+".gat",1, @GID;
+ MapAnnounce getarg(0)+".gat","The emperium has been destroyed.",17;
+ Announce "Guild Base [" + GetCastleName(getarg(0)+".gat") + "] has been taken by the [" + GetGuildName(@GID) + "] guild.",0;
+ GetCastleData getarg(0)+".gat",0,"::OnRecvCastle"+getarg(1);
+
+ disablenpc "Kafra Service#"+getarg(1);
+ set @i, 3;
+
+ L_Loop:
+ set @i, @i + 1;
+ SetCastleData getarg(0)+".gat",@i,0;
+ if(@i < 25) goto L_Loop;
+ return;
+}
+
+
+// Function for OnAgitEnd ======================================
+function script F_AgitEnd {
+// if (GetCastleData(getarg(0)+".gat",1) == 0) return;
+ MapRespawnGuildID getarg(0)+".gat",GetCastleData(getarg(0)+".gat",1),4;
+ KillMonster getarg(0)+".gat","Agit_"+getarg(1)+"::OnAgitBreak";
+ GvgOff getarg(0)+".gat";
+ end;
+}
diff --git a/npc/guild/gldfunc_flag.txt b/npc/guild/gldfunc_flag.txt
new file mode 100644
index 000000000..d24076cda
--- /dev/null
+++ b/npc/guild/gldfunc_flag.txt
@@ -0,0 +1,58 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Flags Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Flags display messages stating whether or not a guild castle has been captured.
+//= Allows the guild members to return to a captured castle.
+//======================================
+//= Break down of arguments used in the function:
+//= arg(0): name of City.
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//===== Additional Comments: =================================
+//= v1.2: All Guild flags scripts use this function. [kobra_k88]
+//============================================================
+
+function script F_Flags {
+
+ set @GID, GetCastleData(getarg(1)+".gat",1);
+ if (@GID != 0) goto L_Startg;
+
+ mes "[ Edict of the Divine Rune Midgard Kingdom of " + getarg(0) + " ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of " + getarg(0) + ", this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians that are protecting the guild base and eliminate the Emperium.";
+ return;
+L_Startg:
+ if (getcharid(2) == @GID) goto L_Startg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of "+ getarg(0) +" ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the";
+ mes "Divine Rune Midgard Kingdom of ";
+ mes getarg(0) +", we approve that this";
+ mes "base is in the private possession";
+ mes "of the ^ff0000" + GetGuildName(@GID) + "^000000 guild.";
+ mes " ";
+ mes "2. The guild master of the";
+ mes "^ff0000"+ GetGuildName(@GID) + "^000000 guild, is ^0000FF" + GetGuildMaster(@GID) + "^000000.";
+ mes "If anyone objects to that, raise your sword to honor yourself.";
+ return;
+L_Startg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave one... would you return to your honorable be?";
+ next;
+ menu "Go back to your Guild Castle.",M_Enter,"Cancel.",-;
+ return;
+
+ M_Enter:
+ warp getarg(1)+".gat",getarg(2),getarg(3);
+ return;
+}
diff --git a/npc/guild/gldfunc_kafra.txt b/npc/guild/gldfunc_kafra.txt
new file mode 100644
index 000000000..f70c62af4
--- /dev/null
+++ b/npc/guild/gldfunc_kafra.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Kafra service for guild members
+//======================================
+//= Break down of arguments used in the function:
+//= arg(0): name of City.
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//===== Additional Comments: =================================
+//= v1.2: All Guild kafra scripts use this function. [kobra_k88]
+//============================================================
+
+function script F_GKafra {
+ cutin "kafra_01",2;
+ set @GID, GetCastleData(getarg(0)+".gat",1);
+ if (getcharid(2) == @GID) goto L_StartG;
+
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^5533FF" + GetGuildName(@GID) + "^000000 members. Please use different Kafra Service. Thank you.";
+ cutin "",255;
+ close;
+L_StartG:
+ set @wrpP[0], 0;
+ set @wrpD$[0], getarg(1);
+ setarray @wrpC$[0], @wrpD$[0], "Cancel", "", "", "","";
+ callfunc "F_Kafra",2;
+ end;
+}
diff --git a/npc/guild/gldfunc_manager.txt b/npc/guild/gldfunc_manager.txt
new file mode 100644
index 000000000..7b192a96d
--- /dev/null
+++ b/npc/guild/gldfunc_manager.txt
@@ -0,0 +1,429 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Manager Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2b
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= The Guild Manager allows the Guildmaster to invest in comerce
+//= and defense, hire guardians and kafras, go to the treasure room,
+//= and surrender the guild castle.
+//==============================================
+//= Break down of arguments used in the function:
+//= arg(0): name of Castle Manager
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp to treasure room
+//= arg(3): y1 coordinate for warp to treasure room
+//= arg(4): guild script suffix for kafra, gaurdian scripts etc.
+//===== Additional Comments: =================================
+//= v1.2: All Guild manager scripts use this function. Optimized
+//= Comerce and Defense investment. [kobra_k88]
+//= v1.2a Function now returns to script that called it.
+//= Added disablenpc line to surrender castle option to remove kafra
+//= upon surrender.[kobra_k88]
+//= v1.2b U can't surrender the base during WOE [Lupus]
+//============================================================
+
+
+
+//==============================================
+function script F_GldManager {
+
+ set @GID, GetCastleData(getarg(1)+".gat",1);
+ if (strcharinfo(0) == getguildmaster(@GID)) goto L_Start;
+ if (@GID == 0) goto L_NotOwn;
+ if (getcharid(2) == @GID) goto L_Mem;
+
+L_NotMem:
+ mes "[ "+getarg(0)+" ]";
+ mes "I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command! Hey! Your not even a part of the guild!!";
+ mes "Where are the guardians? Destroy these intruders!";
+ return 0;
+
+L_NotOwn:
+ mes "[ "+getarg(0)+" ]";
+ mes "I am waiting for my master. Brave adventurer, follow your destiny!";
+ return 0;
+
+L_Mem:
+ mes "[ "+getarg(0)+" ]";
+ mes "You're not ^5533FF" + getguildmaster(@GID) + "^000000! I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command only";
+ return 0;
+
+L_Start:
+ mes "[ "+getarg(0)+" ]";
+ mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
+ next;
+ menu "Guild Base Briefing",M_Base, "Commerce Investment",M_Comrc, "Defence Investment",M_Def, "Guardian Installation",M_Gaurd,
+ "Kafra Service Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Surrender Guild Base",M_Sur, "Cancel",M_End;
+
+ //========================
+ M_Base:
+ //=========
+ mes "[ "+getarg(0)+" ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : ^FF3322" + GetCastleData(getarg(1)+".gat",2) + "^000000 points.";
+ mes "^0000ff - You have invested " + GetCastleData(getarg(1)+".gat",4) + " times today.^000000";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Current Defence Investment is : ^FF3322" + GetCastleData(getarg(1)+".gat",3) + "^000000 points.";
+ mes "^0000ff- You have invested " + GetCastleData(getarg(1)+".gat",5) + " times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ return 0;
+
+ //========================
+ M_Comrc:
+ //=========
+ set @TriggerE,GetCastleData(getarg(1)+".gat",4);
+ set @Economy,GetCastleData(getarg(1)+".gat",2);
+ if(@Economy < 8) set @eco_invest,10000;
+ if(@Economy >= 8) set @eco_invest,20000;
+ if(@Economy >= 16) set @eco_invest,40000;
+ if(@Economy >= 25) set @eco_invest,80000;
+ if(@Economy >= 34) set @eco_invest,160000;
+ if(@Economy >= 44) set @eco_invest,320000;
+ if(@Economy >= 54) set @eco_invest,640000;
+ if(@Economy >= 65) set @eco_invest,1280000;
+ if(@Economy >= 76) set @eco_invest,2560000;
+ if(@Economy >= 88) set @eco_invest,5120000;
+
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerE == 2) goto L_MaxTimesC;
+ if(@Economy >= 100) goto L_MaxInvesC;
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods.";
+ mes "So an investment will be required if you're considering future growth.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerE == 0) mes "You can invest up to two times a day, but the second time costs more";
+ if(@TriggerE == 0) mes "The needed investment amount is ^5533FF" + @eco_invest + "^000000 zeny.";
+ if(@TriggerE == 1) set @eco_invest,@eco_invest*4;
+ if(@TriggerE == 1) mes "You've already invested once today, but you can invest again at ^5533FF" + @eco_invest + "^000000 Zeny.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you like to invest?";
+ next;
+ menu "Invest Commerce.",-,"Cancel.",M_End;
+
+ if(Zeny < @eco_invest) goto sL_NoZenyC;
+ set Zeny,Zeny-@eco_invest;
+ SetCastleData getarg(1)+".gat",4,@TriggerE+1;
+ SetCastleData getarg(1)+".gat",2,@Economy+1;
+ mes "[ "+getarg(0)+" ]";
+ mes "You have invested successfully.";
+ return 0;
+
+ sL_NoZenyC:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ return 0;
+ L_MaxTimesC:
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ return 0;
+ L_MaxInvestC:
+ mes "[ "+getarg(0)+" ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ return 0;
+
+ //=========================
+ M_Def:
+ //========
+ set @TriggerD,GetCastleData(getarg(1)+".gat",5);
+ set @Defence,GetCastleData(getarg(1)+".gat",3);
+ if(@Defence < 8) set @def_invest,20000;
+ if(@Defence >= 8) set @def_invest,40000;
+ if(@Defence >= 16) set @def_invest,80000;
+ if(@Defence >= 25) set @def_invest,160000;
+ if(@Defence >= 34) set @def_invest,320000;
+ if(@Defence >= 44) set @def_invest,640000;
+ if(@Defence >= 54) set @def_invest,1280000;
+ if(@Defence >= 65) set @def_invest,2560000;
+ if(@Defence >= 76) set @def_invest,5120000;
+ if(@Defence >= 88) set @def_invest,10240000;
+
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerD == 2) goto L_MaxTimesD;
+ if(@Defence >= 100) goto L_MaxInvestD;
+ mes "If you improve investment of defence, the durability of our Guardians and the Emperium will increase.";
+ mes "So if you consider our future battles, an investment will be required.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerD == 0) mes "You can invest up to two times a day, but the second time costs more";
+ if(@TriggerD == 0) mes "The needed investment amount is ^5533FF" + @def_invest + "^000000 zeny.";
+ if(@TriggerD == 1) set @def_invest,@def_invest*4;
+ if(@TriggerD == 1) mes "You've already invested once today, but you can invest again at ^5533FF" + @def_invest + "^000000 Zeny.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you like to invest?";
+ next;
+ menu "Invest Defence.",-, "Cancel",M_End;
+
+ if(Zeny < @def_invest) goto sL_NoZenyD;
+ set Zeny,Zeny-@def_invest;
+ SetCastleData getarg(1)+".gat",5,@TriggerD+1;
+ SetCastleData getarg(1)+".gat",3,@Defence+1;
+ mes "[ "+getarg(0)+" ]";
+ mes "You have invested successfully.";
+ return 0;
+
+ sL_NoZenyD:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, you do not have enough money to invest in Defence. Defence investment has been cancelled.";
+ return 0;
+ L_MaxTimesD:
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ return 0;
+ L_MaxInvestD:
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ return 0;
+
+ //=========================
+ M_Gaurd:
+ //=========
+ if (getgdskilllv(@GID,10002) == 0) goto L_NoSkGuard;
+ set @Defence,GetCastleData(getarg(1)+".gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you like to install a guardian? Guardians will protect the guild base from enemies.";
+ mes "Please choose a guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 + "/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 + "/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData(getarg(1)+".gat",10) == 1) goto L_GotGuard;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData(getarg(1)+".gat",11) == 1) goto L_GotGuard;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData(getarg(1)+".gat",12) == 1) goto L_GotGuard;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData(getarg(1)+".gat",13) == 1) goto L_GotGuard;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData(getarg(1)+".gat",14) == 1) goto L_GotGuard;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData(getarg(1)+".gat",15) == 1) goto L_GotGuard;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData(getarg(1)+".gat",16) == 1) goto L_GotGuard;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData(getarg(1)+".gat",17) == 1) goto L_GotGuard;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ L4_9:
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you really like to install a guardian? You need ^5533FF10,000 zeny^000000 to install one....";
+ next;
+ menu "Install",-, "Cancel",M_End;
+
+ if (Zeny < 10000) goto sL_NoZenyG;
+ set Zeny,Zeny-10000;
+ SetCastleData getarg(1)+".gat",@GDnum,1;
+ SetCastleData getarg(1)+".gat",@GDnum2,@GuardianHP;
+ return 1;
+
+ sL_NoZenyG:
+ mes "[ "+getarg(0)+" ]";
+ mes "I'm sorry Master, but you do not have enough zeny for a Guardian.";
+ return 0;
+ L_NoSkGuard:
+ mes "[ "+getarg(0)+" ]";
+ mes "I'm sorry Master but you cannot install any guardians right now. Your guild must learn the Guild skill ^5533FFGuardian Research^000000 first.";
+ mes "Guardian Installation has been cancelled.";
+ return 0;
+ L_GotGuard:
+ mes "[ "+getarg(0)+" ]";
+ mes "Excuse me Master, but that guardian has already been installed.....";
+ emotion 4;
+ return 0;
+
+ //===========================
+ M_Kaf:
+ //======
+ mes "[ "+getarg(0)+" ]";
+ if (GetCastleData(getarg(1)+".gat",9) == 1) goto L_Dismiss;
+ if (getgdskilllv(@GID,10001) == 0) goto L_NoSkKaf;
+
+ L_Hire:
+ mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
+ next;
+ menu "Employ Kafra.",-,"Cancel",sM_KafEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ if (Zeny < 10000) goto sL_NoZenyK;
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#"+getarg(4);
+ SetCastleData getarg(1)+".gat",9,1;
+ mes "You have created a contract with the Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ return 0;
+
+ sL_NoZenyK:
+ mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
+ return 0;
+ sM_KafEnd:
+ mes "[ "+getarg(0)+" ]";
+ mes "As you wish Master. But I suggest we get a Kafra as soon as possible!";
+ return 0;
+
+ L_Dismiss:
+ mes "Would you like to dismiss the current Kafra?";
+ next;
+ menu "Dismissal",-,"Cancel",sM_KafEnd2;
+
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I done anything wrong? If I did, will you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",ssM_KafEnd2;
+
+ mes "[ Kafra Service ]";
+ mes "It's unfortunate that I won't be able to serve your guild anymore....";
+ next;
+ disablenpc "Kafra Service#"+getarg(4);
+ SetCastleData getarg(1)+".gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
+ return 0;
+ ssM_KafEnd2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ return 0;
+ sM_KafEnd2:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ return 0;
+
+ L_NoSkKaf:
+ mes "Master, you don't have a contract with the Kafra Service Company.";
+ mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000.";
+ return 0;
+
+ //=========================
+ M_Treas:
+ //========
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
+ next;
+ menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "Please follow me through the secret passage way.";
+ mes "You must pull down on the secret switch in order to get out.";
+ next;
+ warp getarg(1)+".gat",getarg(2),getarg(3);
+ return 0;
+ sM_TresEnd:
+ mes "[ "+getarg(0)+" ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ return 0;
+
+ //==========================
+ M_Sur:
+ //=======
+ mes "[ "+getarg(0)+" ]";
+ emotion 19;
+ if(agitcheck(0) == 0) goto L_No_WOE;
+ mes "Master.... don't you know that we can't give up this guild base during the War Of Emperium?!!";
+ close;
+ return 0;
+ L_No_WOE:
+ mes "Master.... Do you really want to give up this guild base?? It is not worth it master!!! Please reconsider, master!!";
+
+ next;
+ menu "Surrender Guild Base",-, "Cancel",sM_SurEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, please reconsider...!!";
+ emotion 16;
+ next;
+ menu "Surrender Guild Base",-, "Cancel",sM_SurEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ disablenpc "Kafra Service#"+getarg(4);
+ set @i, 0;
+ L_Loop:
+ set @i, @i + 1;
+ SetCastleData getarg(1)+".gat",@i,0;
+ if(@i < 25) goto L_Loop;
+
+ Announce "[" + GetGuildName(@GID) + "] has surrendered the Guild Castle [" + GetCastleName(getarg(1)+".gat") + "]",0;
+ MapRespawnGuildID getarg(1)+".gat",GetCastleData(getarg(1)+".gat",1),7;
+ return 0;
+ sM_SurEnd:
+ mes "[ "+getarg(0)+" ]";
+ mes "I knew it master!! Please, don't scare me like that again.";
+ emotion 33;
+ return 0;
+
+ //==========================
+ M_End:
+ //=======
+ mes "[ "+getarg(0)+" ]";
+ mes "As you wish, master.";
+ return 0;
+}
diff --git a/npc/guild/gldfunc_treasure.txt b/npc/guild/gldfunc_treasure.txt
new file mode 100644
index 000000000..2e6b85b07
--- /dev/null
+++ b/npc/guild/gldfunc_treasure.txt
@@ -0,0 +1,78 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Treasure Room Functions
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//= 1.1 by Akaru and ho|yAnge|X
+//===== Current Version: =====================================
+//= 1.2b
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= F_GldTreas spawns treasure chests used by the guild master.
+//= F_GldTreasSw allows the player to get out of the treasure room.
+//==============================================
+//= Break down of arguments used in the F_GldTreas:
+//= arg(0): name of guild castle
+//= arg(1): name of script that called the function
+//= arg(2): $variable for number of boxes to spawn for specific castle
+//= arg(2): $variable to be used as a counter
+//= arg(4): $variable for box/monster id number.
+//= arg(5): box/monster id#
+//= arg(6): x1 coordinate for areamonster call
+//= arg(7): y1 coordinate for areamonster call
+//= arg(8): x2 coordinate for areamonster call
+//= arg(9): y1 coordinate for areamonster call
+//= arg(10):
+//= Break down of arguments used in the F_GldTreasSw:
+//= arg(0): name of guild castle.
+//= arg(1): x1 coordinate for warp back to guild castle
+//= arg(2): y1 coordinate for warp back to guild castle
+//===== Additional Comments: =================================
+//= v1.2 Treasure room Spawn, and Treasure room Switch scripts now use these functions.[kobra_k88]
+//= v1.2a Function now returns to script that called it. Removed TreasureSpawn2.
+//= Changed back to using specific global variables for number of boxes and the box id. [kobra_k88]
+//= v1.2b Added a check to allow un broken treasure chests to respawn after map server restart.[kobra_k88]
+//============================================================
+
+
+//================================================
+// Treasure Spawning Script
+//================================================
+
+function script F_GldTreas {
+
+ if(getarg(10) == 1) goto TreasureSpawn;
+ SetCastleData getarg(0)+".gat",4,0;
+ SetCastleData getarg(0)+".gat",5,0;
+ KillMonster getarg(0)+".gat","Treasure_"+getarg(1)+"::OnDied";
+ if (GetCastleData(getarg(0)+".gat",2) > 100) return;
+ if (GetCastleData(getarg(0)+".gat",1) == 0) return;
+ set getarg(2),GetCastleData(getarg(0)+".gat",2)/5+4;
+ if (getarg(2) <= 0) return;
+ set getarg(3), getarg(2); //sets the counter variable = to the box number amount
+
+TreasureSpawn:
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) > 0) goto TreasureSpawn;
+ return;
+}
+
+//==============================================================
+// Treasure Room Switch
+//===============================================================
+function script F_GldTreasSw {
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",M_1,"No",-;
+ close;
+
+ M_1:
+ warp getarg(0)+".gat",getarg(1),getarg(2);
+ return;
+}
diff --git a/npc/guild/nguild/nguild_dunsw.txt b/npc/guild/nguild/nguild_dunsw.txt
new file mode 100644
index 000000000..8e8b779fc
--- /dev/null
+++ b/npc/guild/nguild/nguild_dunsw.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for NGuild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+nguild_alde.gat,212,181,0 script Switch#DunN01 111,{
+ callfunc "F_GldDunSw","nguild_alde","02",32,122;
+ close;
+}
+
+// Castle 2 ===============================================
+nguild_gef.gat,78,84,0 script Switch#DunN02 111,{
+ callfunc "F_GldDunSw","nguild_gef","04",39,258;
+ close;
+}
+
+// Castle 3 ===============================================
+nguild_pay.gat,101,25,0 script Switch#DunN03 111,{
+ callfunc "F_GldDunSw","nguild_pay","01",186,165;
+ close;
+}
+
+// Castle 4 ===============================================
+nguild_prt.gat,94,200,0 script Switch#DunN04 111,{
+ callfunc "F_GldDunSw","nguild_prt","03",28,251;
+ close;
+}
diff --git a/npc/guild/nguild/nguild_ev_agit.txt b/npc/guild/nguild/nguild_ev_agit.txt
new file mode 100644
index 000000000..75d2c1990
--- /dev/null
+++ b/npc/guild/nguild/nguild_ev_agit.txt
@@ -0,0 +1,107 @@
+//===== eAthena Script =======================================
+//= War of Emperium - NGuild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers for NGuild Wars
+//===== Additional Comments: =================================
+// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================================
+nguild_alde.gat,0,0,0 script Agit_N01 -1,{
+OnInterIfInit:
+ GetCastleData "nguild_alde.gat",0,"::OnRecvCastleN01";
+ end;
+OnRecvCastleN01:
+ RequestGuildInfo GetCastleData("nguild_alde.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_alde","N01",216,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_alde","N01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_alde.gat",GetCastleData("nguild_alde.gat",1),6;
+ Monster "nguild_alde.gat",216,24,"EMPERIUM",1288,1,"Agit_N01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_alde","N01";
+ end;
+}
+
+// Castle 2 ================================================================
+nguild_gef.gat,0,0,0 script Agit_N02 -1,{
+OnInterIfInit:
+ GetCastleData "nguild_gef.gat",0,"::OnRecvCastleN02";
+ end;
+OnRecvCastleN02:
+ RequestGuildInfo GetCastleData("nguild_gef.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_gef","N02",198,182;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_gef","N02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_gef.gat",GetCastleData("nguild_gef.gat",1),6;
+ Monster "nguild_gef.gat",198,182,"EMPERIUM",1288,1,"Agit_N02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_gef","N02";
+ end;
+}
+
+// Castle 3 ================================================================
+nguild_pay.gat,0,0,0 script Agit_N03 -1,{
+OnInterIfInit:
+ GetCastleData "nguild_pay.gat",0,"::OnRecvCastleN03";
+ end;
+OnRecvCastleN03:
+ RequestGuildInfo GetCastleData("nguild_pay.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_pay","N03",139,139;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_pay","N03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_pay.gat",GetCastleData("nguild_pay.gat",1),6;
+ Monster "nguild_pay.gat",139,139,"EMPERIUM",1288,1,"Agit_N03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_pay","N03";
+ end;
+}
+
+// Castle 4 ================================================================
+nguild_prt.gat,0,0,0 script Agit_N04 -1,{
+OnInterIfInit:
+ GetCastleData "nguild_prt.gat",0,"::OnRecvCastleN04";
+ end;
+OnRecvCastleN04:
+ RequestGuildInfo GetCastleData("nguild_prt.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_prt","N04",197,197;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_prt","N04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_prt.gat",GetCastleData("nguild_prt.gat",1),6;
+ Monster "nguild_prt.gat",197,197,"EMPERIUM",1288,1,"Agit_N04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_prt","N04";
+ end;
+}
diff --git a/npc/guild/nguild/nguild_flags.txt b/npc/guild/nguild/nguild_flags.txt
new file mode 100644
index 000000000..7536bb2ac
--- /dev/null
+++ b/npc/guild/nguild/nguild_flags.txt
@@ -0,0 +1,113 @@
+//===== eAthena Script =======================================
+//= War of Emperium N Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+//============================================================================//
+// Castle 1
+//============================================================================//
+n_castle.gat,110,96,1 script NGuild Aldebaran#a1-1::NGuildAlde 722,{
+ callfunc "F_Flags","Al De Baran","nguild_alde",218,170;
+ close;
+
+OnRecvCastleN01:
+ FlagEmblem GetCastleData("nguild_alde.gat",1);
+ end;
+}
+// In Castle ============================================
+nguild_alde.gat,30,248,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-6 722
+nguild_alde.gat,30,246,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-7 722
+nguild_alde.gat,37,248,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-8 722
+nguild_alde.gat,37,246,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-9 722
+nguild_alde.gat,95,80,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-10 722
+nguild_alde.gat,95,59,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-11 722
+nguild_alde.gat,62,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-12 722
+nguild_alde.gat,70,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-13 722
+nguild_alde.gat,74,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-14 722
+nguild_alde.gat,62,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-15 722
+nguild_alde.gat,66,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-16 722
+nguild_alde.gat,70,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-17 722
+nguild_alde.gat,74,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-18 722
+nguild_alde.gat,203,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-19 722
+nguild_alde.gat,210,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-20 722
+
+
+
+
+//============================================================================//
+// Castle 2
+//============================================================================//
+n_castle.gat,110,109,3 script NGuild Geffen#g1-1::NGuildGef 722,{
+ callfunc "F_Flags","Geffen","nguild_gef",83,47;
+ close;
+
+OnRecvCastleN02:
+ FlagEmblem GetCastleData("nguild_gef.gat",1);
+ end;
+}
+// In Castle =============================================
+nguild_gef.gat,28,157,4 duplicate(NGuildGef) NGuild Geffen#g1-6 722
+nguild_gef.gat,32,157,4 duplicate(NGuildGef) NGuild Geffen#g1-7 722
+nguild_gef.gat,22,156,5 duplicate(NGuildGef) NGuild Geffen#g1-8 722
+nguild_gef.gat,68,185,3 duplicate(NGuildGef) NGuild Geffen#g1-9 722
+nguild_gef.gat,17,171,5 duplicate(NGuildGef) NGuild Geffen#g1-10 722
+nguild_gef.gat,59,16,4 duplicate(NGuildGef) NGuild Geffen#g1-11 722
+nguild_gef.gat,64,16,4 duplicate(NGuildGef) NGuild Geffen#g1-12 722
+
+
+
+//============================================================================//
+// Castle 3
+//============================================================================//
+n_castle.gat,94,109,5 script NGuild Payon#f1-1::NGuildPay 722,{
+ callfunc "F_Flags","Payon","nguild_pay",87,29;
+ close;
+
+OnRecvCastleN03:
+ FlagEmblem GetCastleData("nguild_pay.gat",1);
+ end;
+}
+// In Castle ===============================================
+nguild_pay.gat,238,67,4 duplicate(NGuildPay) NGuild Payon#f1-6 722
+nguild_pay.gat,233,67,4 duplicate(NGuildPay) NGuild Payon#f1-7 722
+nguild_pay.gat,221,123,4 duplicate(NGuildPay) NGuild Payon#f1-8 722
+nguild_pay.gat,221,116,4 duplicate(NGuildPay) NGuild Payon#f1-9 722
+nguild_pay.gat,206,108,4 duplicate(NGuildPay) NGuild Payon#f1-10 722
+nguild_pay.gat,212,108,4 duplicate(NGuildPay) NGuild Payon#f1-11 722
+
+
+
+
+//=============================================================================//
+// Castle 4
+//=============================================================================//
+n_castle.gat,94,96,7 script NGuild Prontera#p1-1::NGuildPrt 722,{
+ callfunc "F_Flags","Prontera","nguild_prt",97,174;
+ close;
+
+OnRecvCastleN04:
+ FlagEmblem GetCastleData("nguild_prt.gat",1);
+ end;
+}
+// In Castle =============================================
+nguild_prt.gat,58,56,4 duplicate(NGuildPrt) NGuild Prontera#p1-7 722
+nguild_prt.gat,64,56,4 duplicate(NGuildPrt) NGuild Prontera#p1-8 722
+nguild_prt.gat,76,32,4 duplicate(NGuildPrt) NGuild Prontera#p1-9 722
+nguild_prt.gat,84,32,4 duplicate(NGuildPrt) NGuild Prontera#p1-10 722
+nguild_prt.gat,94,39,4 duplicate(NGuildPrt) NGuild Prontera#p1-11 722
+nguild_prt.gat,94,24,4 duplicate(NGuildPrt) NGuild Prontera#p1-12 722
+nguild_prt.gat,73,14,4 duplicate(NGuildPrt) NGuild Prontera#p1-13 722
+nguild_prt.gat,73,6,4 duplicate(NGuildPrt) NGuild Prontera#p1-14 722
+nguild_prt.gat,55,46,4 duplicate(NGuildPrt) NGuild Prontera#p1-15 722
+nguild_prt.gat,45,46,4 duplicate(NGuildPrt) NGuild Prontera#p1-16 722
diff --git a/npc/guild/nguild/nguild_guardians.txt b/npc/guild/nguild/nguild_guardians.txt
new file mode 100644
index 000000000..bed162100
--- /dev/null
+++ b/npc/guild/nguild/nguild_guardians.txt
@@ -0,0 +1,91 @@
+//===== eAthena Script =======================================
+//= War of Emperium - nguild guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+//------------------------------------------------------------------------------
+nguild_alde.gat,216,24,0 script Guardian_N01 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_alde.gat",10) == 1) guardian "nguild_alde.gat",18,219,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",0;
+ if (GetCastleData("nguild_alde.gat",11) == 1) guardian "nguild_alde.gat",117,42,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",1;
+ if (GetCastleData("nguild_alde.gat",12) == 1) guardian "nguild_alde.gat",207,153,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",2;
+ if (GetCastleData("nguild_alde.gat",13) == 1) guardian "nguild_alde.gat",68,70,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",3;
+ if (GetCastleData("nguild_alde.gat",14) == 1) guardian "nguild_alde.gat",187,140,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",4;
+ if (GetCastleData("nguild_alde.gat",15) == 1) guardian "nguild_alde.gat",62,204,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",5;
+ if (GetCastleData("nguild_alde.gat",16) == 1) guardian "nguild_alde.gat",113,100,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",6;
+ if (GetCastleData("nguild_alde.gat",17) == 1) guardian "nguild_alde.gat",211,174,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_alde.gat","A Guardian Has Fallen",17;
+ end;
+}
+
+//------------------------------------------------------------------------------
+nguild_gef.gat,198,182,0 script Guardian_N02 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_gef.gat",10) == 1) guardian "nguild_gef.gat",30,178,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",0;
+ if (GetCastleData("nguild_gef.gat",11) == 1) guardian "nguild_gef.gat",64,180,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",1;
+ if (GetCastleData("nguild_gef.gat",12) == 1) guardian "nguild_gef.gat",61,25,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",2;
+ if (GetCastleData("nguild_gef.gat",13) == 1) guardian "nguild_gef.gat",61,44,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",3;
+ if (GetCastleData("nguild_gef.gat",14) == 1) guardian "nguild_gef.gat",189,43,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",4;
+ if (GetCastleData("nguild_gef.gat",15) == 1) guardian "nguild_gef.gat",51,192,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",5;
+ if (GetCastleData("nguild_gef.gat",16) == 1) guardian "nguild_gef.gat",49,67,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",6;
+ if (GetCastleData("nguild_gef.gat",17) == 1) guardian "nguild_gef.gat",181,14,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_gef.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+nguild_pay.gat,139,139,0 script Guardian_N03 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_pay.gat",10) == 1) guardian "nguild_pay.gat",210,120,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",0;
+ if (GetCastleData("nguild_pay.gat",11) == 1) guardian "nguild_pay.gat",69,26,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",1;
+ if (GetCastleData("nguild_pay.gat",12) == 1) guardian "nguild_pay.gat",23,141,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",2;
+ if (GetCastleData("nguild_pay.gat",13) == 1) guardian "nguild_pay.gat",224,87,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",3;
+ if (GetCastleData("nguild_pay.gat",14) == 1) guardian "nguild_pay.gat",81,45,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",4;
+ if (GetCastleData("nguild_pay.gat",15) == 1) guardian "nguild_pay.gat",214,53,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",5;
+ if (GetCastleData("nguild_pay.gat",16) == 1) guardian "nguild_pay.gat",69,26,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",6;
+ if (GetCastleData("nguild_pay.gat",17) == 1) guardian "nguild_pay.gat",23,141,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_pay.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+nguild_prt.gat,197,197,0 script Guardian_N04 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_prt.gat",10) == 1) guardian "nguild_prt.gat",196,92,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",0;
+ if (GetCastleData("nguild_prt.gat",11) == 1) guardian "nguild_prt.gat",113,200,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",1;
+ if (GetCastleData("nguild_prt.gat",12) == 1) guardian "nguild_prt.gat",111,186,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",2;
+ if (GetCastleData("nguild_prt.gat",13) == 1) guardian "nguild_prt.gat",76,202,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",3;
+ if (GetCastleData("nguild_prt.gat",14) == 1) guardian "nguild_prt.gat",90,26,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",4;
+ if (GetCastleData("nguild_prt.gat",15) == 1) guardian "nguild_prt.gat",58,59,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",5;
+ if (GetCastleData("nguild_prt.gat",16) == 1) guardian "nguild_prt.gat",112,200,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",6;
+ if (GetCastleData("nguild_prt.gat",17) == 1) guardian "nguild_prt.gat",101,194,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_prt.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/nguild/nguild_kafras.txt b/npc/guild/nguild/nguild_kafras.txt
new file mode 100644
index 000000000..b5d6b2d3a
--- /dev/null
+++ b/npc/guild/nguild/nguild_kafras.txt
@@ -0,0 +1,53 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for N Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of NGuild Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+nguild_alde.gat,218,170,0 script Kafra Service#N01 117,{
+ callfunc "F_GKafra", "nguild_alde", "Al De Baran";
+ end;
+OnRecvCastleN01:
+ if (GetCastleData("nguild_alde.gat",9) < 1) disablenpc "Kafra Service#N01";
+ end;
+}
+
+// Castle 2 ===============================================
+//nguild_gef,96,173,0 script Kafra Service#N02 117,{
+nguild_gef.gat,35,37,0 script Kafra Service#N02 117,{
+ callfunc "F_GKafra", "nguild_gef", "Geffen";
+ end;
+OnRecvCastleN02:
+ if (GetCastleData("nguild_gef.gat",9) < 1) disablenpc "Kafra Service#N02";
+ end;
+}
+
+// Castle 3 ===============================================
+nguild_pay.gat,128,58,3 script Kafra Service#N03 117,{
+ callfunc "F_GKafra", "nguild_pay", "Payon";
+ end;
+OnRecvCastleN03:
+ if (GetCastleData("nguild_pay.gat",9) < 1) disablenpc "Kafra Service#N03";
+ end;
+}
+
+// Castle 4 ===============================================
+nguild_prt.gat,96,173,0 script Kafra Service#N04 117,{
+ callfunc "F_GKafra", "nguild_prt", "Prontera";
+ end;
+OnRecvCastleN04:
+ if (GetCastleData("nguild_prt.gat",9) < 1) disablenpc "Kafra Service#N04";
+ end;
+}
diff --git a/npc/guild/nguild/nguild_managers.txt b/npc/guild/nguild/nguild_managers.txt
new file mode 100644
index 000000000..81377c95d
--- /dev/null
+++ b/npc/guild/nguild/nguild_managers.txt
@@ -0,0 +1,86 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for N Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+nguild_alde.gat,218,175,0 script Frolo 55,{
+ if(callfunc("F_GldManager","Frolo","nguild_alde",119,223,"N01") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_alde.gat",18,219,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_alde.gat",117,42,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_alde.gat",207,153,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_alde.gat",68,70,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_alde.gat",187,140,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_alde.gat",62,204,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_alde.gat",113,100,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_alde.gat",211,174,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",7;
+ mes "[Arl Fredo]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+nguild_gef.gat,40,48,5 script Leiber 55,{
+ if(callfunc("F_GldManager","Leiber","nguild_gef",155,112,"N02") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_gef.gat",30,178,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_gef.gat",64,180,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_gef.gat",61,25,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_gef.gat",61,44,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_gef.gat",189,43,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_gef.gat",51,192,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_gef.gat",49,67,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_gef.gat",181,14,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",7;
+ mes "[ Gnaucher ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+nguild_pay.gat,120,58,4 script Dundar 55,{
+ if(callfunc("F_GldManager","Dundar","nguild_pay",290,7,"N03") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_pay.gat",210,120,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_pay.gat",69,26,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_pay.gat",23,141,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_pay.gat",224,87,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_pay.gat",81,45,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_pay.gat",214,53,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_pay.gat",69,26,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_pay.gat",23,141,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",7;
+ mes "[ Grunday ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+nguild_prt.gat,112,181,0 script Thefton 55,{
+ if(callfunc("F_GldManager","Thefton","nguild_prt",15,209,"N04") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_prt.gat",196,92,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_prt.gat",113,200,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_prt.gat",111,186,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_prt.gat",76,202,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_prt.gat",90,26,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_prt.gat",58,59,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_prt.gat",112,200,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_prt.gat",101,194,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",7;
+ mes "[ Abrai ]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/nguild/nguild_treas.txt b/npc/guild/nguild/nguild_treas.txt
new file mode 100644
index 000000000..f71f8368f
--- /dev/null
+++ b/npc/guild/nguild/nguild_treas.txt
@@ -0,0 +1,117 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn -----------------------
+nguild_alde.gat,1,1,1 script Treasure_N01 -1,{
+
+OnRecvCastleN01:
+ if($boxNumN01 == 0) end;
+ set $@bxN01, $boxNumN01;
+ callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324,114,218,123,227,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324,114,218,123,227,0;
+ end;
+OnDied:
+ mapannounce "nguild_alde.gat","Treasure Chest Broken Open",17;
+ set $boxNumN01, $boxNumN01 -1;
+ if($boxNumN01 == 0) mapannounce "nguild_alde.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch --------------------
+nguild_alde.gat,123,223,0 script Switch#TresN01 111,{
+ callfunc "F_GldTreasSw", "nguild_alde",218,176;
+ end;
+}
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ----------------------------
+nguild_gef.gat,1,1,1 script Treasure_N02 -1,{
+
+OnRecvCastleN02:
+ if($boxNumN02 == 0) end;
+ set $@bxN02, $boxNumN02;
+ callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334,150,108,158,114,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334,150,108,158,114,0;
+ end;
+OnDied:
+ mapannounce "nguild_gef.gat","Treasure Chest Broken Open",17;
+ set $boxNumN02, $boxNumN02 -1;
+ if($boxNumN02 == 0) mapannounce "nguild_gef.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+nguild_gef.gat,152,117,0 script Switch#TresN02 111,{
+ callfunc "F_GldTreasSw","nguild_gef",40,49;
+ end;
+}
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ---------------------------
+nguild_pay.gat,1,1,0 script Treasure_N03 -1,{
+OnRecvCastleN03:
+ if($boxNumN03 == 0) end;
+ set $@bxN03, $boxNumN03;
+ callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344,286,4,295,13,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344,286,4,295,13,0;
+ end;
+OnDied:
+ mapannounce "nguild_pay.gat","Treasure Chest Broken Open",17;
+ set $boxNumN03, $boxNumN03 -1;
+ if($boxNumN03 == 0) mapannounce "nguild_pay.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------------------------
+nguild_pay.gat,295,8,0 script Switch#TresN03 111,{
+ callfunc "F_GldTreasSw", "nguild_pay",120,59;
+ end;
+}
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn -------------------------------
+nguild_prt.gat,1,1,0 script Treasure_N04 -1,{
+OnRecvCastleN04:
+ if($boxNumN04 == 0) end;
+ set $@bxN04, $boxNumN04;
+ callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354,6,204,15,213,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354,6,204,15,213,0;
+ end;
+OnDied:
+ mapannounce "nguild_prt.gat","Treasure Chest Broken Open",17;
+ set $boxNumN04, $boxNumN04 -1;
+ if($boxNumN04 == 0) mapannounce "nguild_prt.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+nguild_prt.gat,15,209,0 script Switch#TresN04 111,{
+ callfunc "F_GldTreasSw", "nguild_prt",109,179;
+ end;
+}
diff --git a/npc/guild/old/aldeg_cas01.txt b/npc/guild/old/aldeg_cas01.txt
new file mode 100644
index 000000000..d61a2d5c7
--- /dev/null
+++ b/npc/guild/old/aldeg_cas01.txt
@@ -0,0 +1,675 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas01 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in aldeg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+aldeg_cas01.gat,30,248,4 script Noisyubantian#a1-6::NoisyubantianNW 722,{
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (@GIDa1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ break;
+}
+
+aldeg_cas01.gat,30,246,4 duplicate(NoisyubantianNW) Noisyubantian#a1-7 722
+aldeg_cas01.gat,37,248,4 duplicate(NoisyubantianNW) Noisyubantian#a1-8 722
+aldeg_cas01.gat,37,246,4 duplicate(NoisyubantianNW) Noisyubantian#a1-9 722
+aldeg_cas01.gat,95,80,2 duplicate(NoisyubantianNW) Noisyubantian#a1-10 722
+aldeg_cas01.gat,95,59,2 duplicate(NoisyubantianNW) Noisyubantian#a1-11 722
+aldeg_cas01.gat,62,75,2 duplicate(NoisyubantianNW) Noisyubantian#a1-12 722
+aldeg_cas01.gat,70,75,2 duplicate(NoisyubantianNW) Noisyubantian#a1-13 722
+aldeg_cas01.gat,74,75,2 duplicate(NoisyubantianNW) Noisyubantian#a1-14 722
+aldeg_cas01.gat,62,64,2 duplicate(NoisyubantianNW) Noisyubantian#a1-15 722
+aldeg_cas01.gat,66,64,2 duplicate(NoisyubantianNW) Noisyubantian#a1-16 722
+aldeg_cas01.gat,70,64,2 duplicate(NoisyubantianNW) Noisyubantian#a1-17 722
+aldeg_cas01.gat,74,64,2 duplicate(NoisyubantianNW) Noisyubantian#a1-18 722
+aldeg_cas01.gat,203,150,4 duplicate(NoisyubantianNW) Noisyubantian#a1-19 722
+aldeg_cas01.gat,210,150,4 duplicate(NoisyubantianNW) Noisyubantian#a1-20 722
+
+//================================================
+// Kafra Service
+//================================================
+aldeg_cas01.gat,218,170,0 script Kafra Service#alde1 117,{
+ cutin "kafra_01",2;
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (getcharid(2) == @GIDa1) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDa1) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDa1) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Al de Baran -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "aldebaran.gat",132,103;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("aldeg_cas01.gat",9) == 1) break;
+ disablenpc "Kafra Service#alde1";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+aldeg_cas01.gat,123,223,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (getcharid(2) != @GIDa1) goto L1n;
+ warp "gld_dun02.gat",32,122;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+aldeg_cas01.gat,218,175,0 script Arl Fredo 55,{
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (@GIDa1 == 0) goto LStart;
+ if (getcharid(2) != @GIDa1) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDa1)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Arl Fredo ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDa1) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDa1) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Arl Fredo ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Arl Fredo ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDa1) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Arl Fredo ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDa1) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Arl Fredo ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("aldeg_cas01.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("aldeg_cas01.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("aldeg_cas01.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("aldeg_cas01.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("aldeg_cas01.gat",4);
+ set @Economy,GetCastleData("aldeg_cas01.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Arl Fredo ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Arl Fredo ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Arl Fredo ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas01.gat",2,@Economy+1;
+ mes "[ Arl Fredo ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Arl Fredo ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Arl Fredo ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas01.gat",2,@Economy+1;
+ mes "[ Arl Fredo ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Arl Fredo ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Arl Fredo ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("aldeg_cas01.gat",5);
+ set @Defence,GetCastleData("aldeg_cas01.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Arl Fredo ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Arl Fredo ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Arl Fredo ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas01.gat",3,@Defence+1;
+ mes "[ Arl Fredo ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Arl Fredo ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Arl Fredo ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas01.gat",3,@Defence+1;
+ mes "[ Arl Fredo ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Arl Fredo ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Arl Fredo ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("aldeg_cas01.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Arl Fredo ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("aldeg_cas01.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("aldeg_cas01.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("aldeg_cas01.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("aldeg_cas01.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("aldeg_cas01.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("aldeg_cas01.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("aldeg_cas01.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("aldeg_cas01.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Arl Fredo ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Arl Fredo ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "aldeg_cas01.gat",@GDnum,1;
+ SetCastleData "aldeg_cas01.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ mes "[ Arl Fredo ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Arl Fredo ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Arl Fredo ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Arl Fredo ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("aldeg_cas01.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Arl Fredo ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Arl Fredo ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Arl Fredo ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#alde1";
+ SetCastleData "aldeg_cas01.gat",9,1;
+ mes "[ Arl Fredo ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Arl Fredo ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to alde again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Arl Fredo ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Arl Fredo ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#alde1";
+ SetCastleData "aldeg_cas01.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Arl Fredo ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Arl Fredo ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Arl Fredo ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Arl Fredo ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "aldeg_cas01",119,223;
+ L6_1:
+ mes "[ Arl Fredo ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Arl Fredo ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Arl Fredo ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Arl Fredo ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "aldeg_cas01.gat",1,0;
+ SetCastleData "aldeg_cas01.gat",2,0;
+ SetCastleData "aldeg_cas01.gat",3,0;
+ SetCastleData "aldeg_cas01.gat",4,0;
+ SetCastleData "aldeg_cas01.gat",5,0;
+ SetCastleData "aldeg_cas01.gat",6,0;
+ SetCastleData "aldeg_cas01.gat",7,0;
+ SetCastleData "aldeg_cas01.gat",8,0;
+ SetCastleData "aldeg_cas01.gat",9,0;
+ SetCastleData "aldeg_cas01.gat",10,0;
+ SetCastleData "aldeg_cas01.gat",11,0;
+ SetCastleData "aldeg_cas01.gat",12,0;
+ SetCastleData "aldeg_cas01.gat",13,0;
+ SetCastleData "aldeg_cas01.gat",14,0;
+ SetCastleData "aldeg_cas01.gat",15,0;
+ SetCastleData "aldeg_cas01.gat",16,0;
+ SetCastleData "aldeg_cas01.gat",17,0;
+ SetCastleData "aldeg_cas01.gat",18,0;
+ SetCastleData "aldeg_cas01.gat",19,0;
+ SetCastleData "aldeg_cas01.gat",20,0;
+ SetCastleData "aldeg_cas01.gat",21,0;
+ SetCastleData "aldeg_cas01.gat",22,0;
+ SetCastleData "aldeg_cas01.gat",23,0;
+ SetCastleData "aldeg_cas01.gat",24,0;
+ SetCastleData "aldeg_cas01.gat",25,0;
+ Announce "[" + GetGuildName(@GIDa1) + "] has surrendered Agit [" + GetCastleName("aldeg_cas01.gat") + "]",0;
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Arl Fredo ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/aldeg_cas02.txt b/npc/guild/old/aldeg_cas02.txt
new file mode 100644
index 000000000..cfe9c8071
--- /dev/null
+++ b/npc/guild/old/aldeg_cas02.txt
@@ -0,0 +1,676 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas02 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in aldeg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+aldeg_cas02.gat,82,71,2 script Hohensyubangawoo#a2-4::HohensyubangawooNW 722,{
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (@GIDa2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ break;
+}
+
+aldeg_cas02.gat,67,30,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-5 722
+aldeg_cas02.gat,183,140,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-6 722
+aldeg_cas02.gat,212,152,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-7 722
+aldeg_cas02.gat,108,39,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-8 722
+aldeg_cas02.gat,57,213,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-9 722
+aldeg_cas02.gat,91,181,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-10 722
+aldeg_cas02.gat,103,53,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-11 722
+aldeg_cas02.gat,73,53,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-12 722
+aldeg_cas02.gat,63,41,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-13 722
+aldeg_cas02.gat,229,6,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-14 722
+aldeg_cas02.gat,230,40,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-15 722
+aldeg_cas02.gat,197,40,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-16 722
+aldeg_cas02.gat,32,213,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-17 722
+aldeg_cas02.gat,88,180,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-18 722
+aldeg_cas02.gat,121,29,2 duplicate(HohensyubangawooNW) Hohensyubangawoo#a2-19 722
+
+//================================================
+// Kafra Service
+//================================================
+aldeg_cas02.gat,84,74,0 script Kafra Service#alde2 117,{
+ cutin "kafra_01",2;
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (getcharid(2) == @GIDa2) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDa2) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDa2) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Al de Baran -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "aldebaran.gat",132,103;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("aldeg_cas02.gat",9) == 1) break;
+ disablenpc "Kafra Service#alde2";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+aldeg_cas02.gat,194,136,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (getcharid(2) != @GIDa2) goto L1n;
+ warp "gld_dun02.gat",79,30;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+aldeg_cas02.gat,78,74,0 script Chen Lee 55,{
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (@GIDa2 == 0) goto LStart;
+ if (getcharid(2) != @GIDa2) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDa2)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Chen Lee ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDa2) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDa2) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Chen Lee ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Chen Lee ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDa2) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Chen Lee ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDa2) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Chen Lee ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("aldeg_cas02.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("aldeg_cas02.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("aldeg_cas02.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("aldeg_cas02.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("aldeg_cas02.gat",4);
+ set @Economy,GetCastleData("aldeg_cas02.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas02.gat",2,@Economy+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas02.gat",2,@Economy+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Chen Lee ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("aldeg_cas02.gat",5);
+ set @Defence,GetCastleData("aldeg_cas02.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas02.gat",3,@Defence+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas02.gat",3,@Defence+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Chen Lee ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("aldeg_cas02.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Chen Lee ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("aldeg_cas02.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("aldeg_cas02.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("aldeg_cas02.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("aldeg_cas02.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("aldeg_cas02.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("aldeg_cas02.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("aldeg_cas02.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("aldeg_cas02.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Chen Lee ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "aldeg_cas02.gat",@GDnum,1;
+ SetCastleData "aldeg_cas02.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Chen Lee ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Chen Lee ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("aldeg_cas02.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Chen Lee ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Chen Lee ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#alde2";
+ SetCastleData "aldeg_cas02.gat",9,1;
+ mes "[ Chen Lee ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Chen Lee ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to alde again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Chen Lee ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Chen Lee ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#alde2";
+ SetCastleData "aldeg_cas02.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Chen Lee ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Chen Lee ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Chen Lee ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Chen Lee ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "aldeg_cas02",135,231;
+ L6_1:
+ mes "[ Chen Lee ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Chen Lee ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Chen Lee ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Chen Lee ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "aldeg_cas02.gat",1,0;
+ SetCastleData "aldeg_cas02.gat",2,0;
+ SetCastleData "aldeg_cas02.gat",3,0;
+ SetCastleData "aldeg_cas02.gat",4,0;
+ SetCastleData "aldeg_cas02.gat",5,0;
+ SetCastleData "aldeg_cas02.gat",6,0;
+ SetCastleData "aldeg_cas02.gat",7,0;
+ SetCastleData "aldeg_cas02.gat",8,0;
+ SetCastleData "aldeg_cas02.gat",9,0;
+ SetCastleData "aldeg_cas02.gat",10,0;
+ SetCastleData "aldeg_cas02.gat",11,0;
+ SetCastleData "aldeg_cas02.gat",12,0;
+ SetCastleData "aldeg_cas02.gat",13,0;
+ SetCastleData "aldeg_cas02.gat",14,0;
+ SetCastleData "aldeg_cas02.gat",15,0;
+ SetCastleData "aldeg_cas02.gat",16,0;
+ SetCastleData "aldeg_cas02.gat",17,0;
+ SetCastleData "aldeg_cas02.gat",18,0;
+ SetCastleData "aldeg_cas02.gat",19,0;
+ SetCastleData "aldeg_cas02.gat",20,0;
+ SetCastleData "aldeg_cas02.gat",21,0;
+ SetCastleData "aldeg_cas02.gat",22,0;
+ SetCastleData "aldeg_cas02.gat",23,0;
+ SetCastleData "aldeg_cas02.gat",24,0;
+ SetCastleData "aldeg_cas02.gat",25,0;
+ Announce "[" + GetGuildName(@GIDa2) + "] has surrendered Agit [" + GetCastleName("aldeg_cas02.gat") + "]",0;
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Chen Lee ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/aldeg_cas03.txt b/npc/guild/old/aldeg_cas03.txt
new file mode 100644
index 000000000..92e61414d
--- /dev/null
+++ b/npc/guild/old/aldeg_cas03.txt
@@ -0,0 +1,679 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas03 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in aldeg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+aldeg_cas03.gat,176,175,2 script Nyirenverk#a3-4::NyirenverkNW 722,{
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (@GIDa3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ break;
+}
+
+aldeg_cas03.gat,85,103,2 duplicate(NyirenverkNW) Nyirenverk#a3-5 722
+aldeg_cas03.gat,77,115,2 duplicate(NyirenverkNW) Nyirenverk#a3-6 722
+aldeg_cas03.gat,77,215,2 duplicate(NyirenverkNW) Nyirenverk#a3-7 722
+aldeg_cas03.gat,112,107,2 duplicate(NyirenverkNW) Nyirenverk#a3-8 722
+aldeg_cas03.gat,112,117,2 duplicate(NyirenverkNW) Nyirenverk#a3-9 722
+aldeg_cas03.gat,69,71,2 duplicate(NyirenverkNW) Nyirenverk#a3-10 722
+aldeg_cas03.gat,91,69,2 duplicate(NyirenverkNW) Nyirenverk#a3-11 722
+aldeg_cas03.gat,108,60,2 duplicate(NyirenverkNW) Nyirenverk#a3-12 722
+aldeg_cas03.gat,121,73,2 duplicate(NyirenverkNW) Nyirenverk#a3-13 722
+aldeg_cas03.gat,121,73,2 duplicate(NyirenverkNW) Nyirenverk#a3-14 722
+aldeg_cas03.gat,75,102,2 duplicate(NyirenverkNW) Nyirenverk#a3-15 722
+aldeg_cas03.gat,199,169,2 duplicate(NyirenverkNW) Nyirenverk#a3-16 722
+aldeg_cas03.gat,181,179,2 duplicate(NyirenverkNW) Nyirenverk#a3-17 722
+aldeg_cas03.gat,192,44,2 duplicate(NyirenverkNW) Nyirenverk#a3-18 722
+aldeg_cas03.gat,88,108,2 duplicate(NyirenverkNW) Nyirenverk#a3-19 722
+aldeg_cas03.gat,208,145,2 duplicate(NyirenverkNW) Nyirenverk#a3-20 722
+aldeg_cas03.gat,207,75,2 duplicate(NyirenverkNW) Nyirenverk#a3-21 722
+aldeg_cas03.gat,96,62,2 duplicate(NyirenverkNW) Nyirenverk#a3-22 722
+
+//================================================
+// Kafra Service
+//================================================
+aldeg_cas03.gat,118,76,0 script Kafra Service#alde3 117,{
+ cutin "kafra_01",2;
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (getcharid(2) == @GIDa3) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDa3) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDa3) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Al de Baran -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "aldebaran.gat",132,103;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("aldeg_cas03.gat",9) == 1) break;
+ disablenpc "Kafra Service#alde3";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+aldeg_cas03.gat,200,177,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (getcharid(2) != @GIDa3) goto L1n;
+ warp "gld_dun02.gat",165,38;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+aldeg_cas03.gat,110,118,0 script Chen Lee 55,{
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (@GIDa3 == 0) goto LStart;
+ if (getcharid(2) != @GIDa3) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDa3)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Chen Lee ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDa3) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDa3) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Chen Lee ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Chen Lee ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDa3) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Chen Lee ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDa3) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Chen Lee ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("aldeg_cas03.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("aldeg_cas03.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("aldeg_cas03.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("aldeg_cas03.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("aldeg_cas03.gat",4);
+ set @Economy,GetCastleData("aldeg_cas03.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas03.gat",2,@Economy+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Chen Lee ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas03.gat",2,@Economy+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Chen Lee ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("aldeg_cas03.gat",5);
+ set @Defence,GetCastleData("aldeg_cas03.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas03.gat",3,@Defence+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Chen Lee ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas03.gat",3,@Defence+1;
+ mes "[ Chen Lee ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Chen Lee ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("aldeg_cas03.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Chen Lee ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("aldeg_cas03.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("aldeg_cas03.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("aldeg_cas03.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("aldeg_cas03.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("aldeg_cas03.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("aldeg_cas03.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("aldeg_cas03.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("aldeg_cas03.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Chen Lee ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Chen Lee ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "aldeg_cas03.gat",@GDnum,1;
+ SetCastleData "aldeg_cas03.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Chen Lee ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Chen Lee ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("aldeg_cas03.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Chen Lee ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Chen Lee ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Chen Lee ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#alde3";
+ SetCastleData "aldeg_cas03.gat",9,1;
+ mes "[ Chen Lee ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Chen Lee ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to alde again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Chen Lee ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Chen Lee ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#alde3";
+ SetCastleData "aldeg_cas03.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Chen Lee ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Chen Lee ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Chen Lee ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Chen Lee ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "aldeg_cas03",225,269;
+ L6_1:
+ mes "[ Chen Lee ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Chen Lee ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Chen Lee ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Chen Lee ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "aldeg_cas03.gat",1,0;
+ SetCastleData "aldeg_cas03.gat",2,0;
+ SetCastleData "aldeg_cas03.gat",3,0;
+ SetCastleData "aldeg_cas03.gat",4,0;
+ SetCastleData "aldeg_cas03.gat",5,0;
+ SetCastleData "aldeg_cas03.gat",6,0;
+ SetCastleData "aldeg_cas03.gat",7,0;
+ SetCastleData "aldeg_cas03.gat",8,0;
+ SetCastleData "aldeg_cas03.gat",9,0;
+ SetCastleData "aldeg_cas03.gat",10,0;
+ SetCastleData "aldeg_cas03.gat",11,0;
+ SetCastleData "aldeg_cas03.gat",12,0;
+ SetCastleData "aldeg_cas03.gat",13,0;
+ SetCastleData "aldeg_cas03.gat",14,0;
+ SetCastleData "aldeg_cas03.gat",15,0;
+ SetCastleData "aldeg_cas03.gat",16,0;
+ SetCastleData "aldeg_cas03.gat",17,0;
+ SetCastleData "aldeg_cas03.gat",18,0;
+ SetCastleData "aldeg_cas03.gat",19,0;
+ SetCastleData "aldeg_cas03.gat",20,0;
+ SetCastleData "aldeg_cas03.gat",21,0;
+ SetCastleData "aldeg_cas03.gat",22,0;
+ SetCastleData "aldeg_cas03.gat",23,0;
+ SetCastleData "aldeg_cas03.gat",24,0;
+ SetCastleData "aldeg_cas03.gat",25,0;
+ Announce "[" + GetGuildName(@GIDa3) + "] has surrendered Agit [" + GetCastleName("aldeg_cas03.gat") + "]",0;
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Chen Lee ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/aldeg_cas04.txt b/npc/guild/old/aldeg_cas04.txt
new file mode 100644
index 000000000..f93ebac09
--- /dev/null
+++ b/npc/guild/old/aldeg_cas04.txt
@@ -0,0 +1,679 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas04 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in aldeg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+aldeg_cas04.gat,167,61,2 script Byirtsburi#a4-4::ByirtsburiNW 722,{
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (@GIDa4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ break;
+}
+
+aldeg_cas04.gat,164,90,2 duplicate(ByirtsburiNW) Byirtsburi#a4-5 722
+aldeg_cas04.gat,143,209,2 duplicate(ByirtsburiNW) Byirtsburi#a4-6 722
+aldeg_cas04.gat,129,193,2 duplicate(ByirtsburiNW) Byirtsburi#a4-7 722
+aldeg_cas04.gat,112,206,2 duplicate(ByirtsburiNW) Byirtsburi#a4-8 722
+aldeg_cas04.gat,113,212,2 duplicate(ByirtsburiNW) Byirtsburi#a4-9 722
+aldeg_cas04.gat,77,117,2 duplicate(ByirtsburiNW) Byirtsburi#a4-10 722
+aldeg_cas04.gat,186,42,2 duplicate(ByirtsburiNW) Byirtsburi#a4-11 722
+aldeg_cas04.gat,30,69,2 duplicate(ByirtsburiNW) Byirtsburi#a4-12 722
+aldeg_cas04.gat,55,97,2 duplicate(ByirtsburiNW) Byirtsburi#a4-13 722
+aldeg_cas04.gat,45,98,2 duplicate(ByirtsburiNW) Byirtsburi#a4-14 722
+aldeg_cas04.gat,33,116,2 duplicate(ByirtsburiNW) Byirtsburi#a4-15 722
+aldeg_cas04.gat,130,180,2 duplicate(ByirtsburiNW) Byirtsburi#a4-16 722
+aldeg_cas04.gat,129,193,2 duplicate(ByirtsburiNW) Byirtsburi#a4-17 722
+aldeg_cas04.gat,142,209,2 duplicate(ByirtsburiNW) Byirtsburi#a4-18 722
+aldeg_cas04.gat,33,107,2 duplicate(ByirtsburiNW) Byirtsburi#a4-19 722
+aldeg_cas04.gat,133,220,2 duplicate(ByirtsburiNW) Byirtsburi#a4-20 722
+aldeg_cas04.gat,169,22,2 duplicate(ByirtsburiNW) Byirtsburi#a4-21 722
+aldeg_cas04.gat,169,15,2 duplicate(ByirtsburiNW) Byirtsburi#a4-22 722
+
+//================================================
+// Kafra Service
+//================================================
+aldeg_cas04.gat,45,88,0 script Kafra Service#alde4 117,{
+ cutin "kafra_01",2;
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (getcharid(2) == @GIDa4) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDa4) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDa4) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Al de Baran -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "aldebaran.gat",132,103;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("aldeg_cas04.gat",9) == 1) break;
+ disablenpc "Kafra Service#alde4";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+aldeg_cas04.gat,76,64,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (getcharid(2) != @GIDa4) goto L1n;
+ warp "gld_dun02.gat",160,148;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+aldeg_cas04.gat,218,175,0 script Brimhemsen 55,{
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (@GIDa4 == 0) goto LStart;
+ if (getcharid(2) != @GIDa4) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDa4)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Brimhemsen ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDa4) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDa4) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Brimhemsen ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Brimhemsen ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDa4) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Brimhemsen ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDa4) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Brimhemsen ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("aldeg_cas04.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("aldeg_cas04.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("aldeg_cas04.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("aldeg_cas04.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("aldeg_cas04.gat",4);
+ set @Economy,GetCastleData("aldeg_cas04.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas04.gat",2,@Economy+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas04.gat",2,@Economy+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Brimhemsen ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("aldeg_cas04.gat",5);
+ set @Defence,GetCastleData("aldeg_cas04.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas04.gat",3,@Defence+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas04.gat",3,@Defence+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Brimhemsen ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("aldeg_cas04.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Brimhemsen ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("aldeg_cas04.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("aldeg_cas04.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("aldeg_cas04.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("aldeg_cas04.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("aldeg_cas04.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("aldeg_cas04.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("aldeg_cas04.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("aldeg_cas04.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Brimhemsen ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "aldeg_cas04.gat",@GDnum,1;
+ SetCastleData "aldeg_cas04.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Brimhemsen ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("aldeg_cas04.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Brimhemsen ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Brimhemsen ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#alde4";
+ SetCastleData "aldeg_cas04.gat",9,1;
+ mes "[ Brimhemsen ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Brimhemsen ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to alde again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Brimhemsen ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Brimhemsen ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#alde4";
+ SetCastleData "aldeg_cas04.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Brimhemsen ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Brimhemsen ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Brimhemsen ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Brimhemsen ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "aldeg_cas04",85,12;
+ L6_1:
+ mes "[ Brimhemsen ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Brimhemsen ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Brimhemsen ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Brimhemsen ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "aldeg_cas04.gat",1,0;
+ SetCastleData "aldeg_cas04.gat",2,0;
+ SetCastleData "aldeg_cas04.gat",3,0;
+ SetCastleData "aldeg_cas04.gat",4,0;
+ SetCastleData "aldeg_cas04.gat",5,0;
+ SetCastleData "aldeg_cas04.gat",6,0;
+ SetCastleData "aldeg_cas04.gat",7,0;
+ SetCastleData "aldeg_cas04.gat",8,0;
+ SetCastleData "aldeg_cas04.gat",9,0;
+ SetCastleData "aldeg_cas04.gat",10,0;
+ SetCastleData "aldeg_cas04.gat",11,0;
+ SetCastleData "aldeg_cas04.gat",12,0;
+ SetCastleData "aldeg_cas04.gat",13,0;
+ SetCastleData "aldeg_cas04.gat",14,0;
+ SetCastleData "aldeg_cas04.gat",15,0;
+ SetCastleData "aldeg_cas04.gat",16,0;
+ SetCastleData "aldeg_cas04.gat",17,0;
+ SetCastleData "aldeg_cas04.gat",18,0;
+ SetCastleData "aldeg_cas04.gat",19,0;
+ SetCastleData "aldeg_cas04.gat",20,0;
+ SetCastleData "aldeg_cas04.gat",21,0;
+ SetCastleData "aldeg_cas04.gat",22,0;
+ SetCastleData "aldeg_cas04.gat",23,0;
+ SetCastleData "aldeg_cas04.gat",24,0;
+ SetCastleData "aldeg_cas04.gat",25,0;
+ Announce "[" + GetGuildName(@GIDa4) + "] has surrendered Agit [" + GetCastleName("aldeg_cas04.gat") + "]",0;
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Brimhemsen ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/aldeg_cas05.txt b/npc/guild/old/aldeg_cas05.txt
new file mode 100644
index 000000000..a1a64863c
--- /dev/null
+++ b/npc/guild/old/aldeg_cas05.txt
@@ -0,0 +1,677 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas05 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in aldeg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+aldeg_cas05.gat,170,85,2 script Rotenburk#a5-4::RotenburkNW 722,{
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (@GIDa5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ break;
+}
+
+aldeg_cas05.gat,142,212,2 duplicate(RotenburkNW) Rotenburk#a5-5 722
+aldeg_cas05.gat,149,196,2 duplicate(RotenburkNW) Rotenburk#a5-6 722
+aldeg_cas05.gat,41,180,2 duplicate(RotenburkNW) Rotenburk#a5-7 722
+aldeg_cas05.gat,38,201,2 duplicate(RotenburkNW) Rotenburk#a5-8 722
+aldeg_cas05.gat,65,182,2 duplicate(RotenburkNW) Rotenburk#a5-9 722
+aldeg_cas05.gat,65,205,2 duplicate(RotenburkNW) Rotenburk#a5-10 722
+aldeg_cas05.gat,10,218,2 duplicate(RotenburkNW) Rotenburk#a5-11 722
+aldeg_cas05.gat,164,201,2 duplicate(RotenburkNW) Rotenburk#a5-12 722
+aldeg_cas05.gat,216,96,2 duplicate(RotenburkNW) Rotenburk#a5-13 722
+aldeg_cas05.gat,217,80,2 duplicate(RotenburkNW) Rotenburk#a5-14 722
+aldeg_cas05.gat,14,117,2 duplicate(RotenburkNW) Rotenburk#a5-15 722
+aldeg_cas05.gat,10,225,2 duplicate(RotenburkNW) Rotenburk#a5-16 722
+aldeg_cas05.gat,187,59,2 duplicate(RotenburkNW) Rotenburk#a5-17 722
+aldeg_cas05.gat,154,51,2 duplicate(RotenburkNW) Rotenburk#a5-18 722
+aldeg_cas05.gat,22,211,2 duplicate(RotenburkNW) Rotenburk#a5-19 722
+aldeg_cas05.gat,150,202,2 duplicate(RotenburkNW) Rotenburk#a5-20 722
+
+//================================================
+// Kafra Service
+//================================================
+aldeg_cas05.gat,31,190,0 script Kafra Service#alde5 117,{
+ cutin "kafra_01",2;
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (getcharid(2) == @GIDa5) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDa5) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDa5) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Al de Baran -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "aldebaran.gat",132,103;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("aldeg_cas05.gat",9) == 1) break;
+ disablenpc "Kafra Service#alde5";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+aldeg_cas05.gat,22,205,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (getcharid(2) != @GIDa5) goto L1n;
+ warp "gld_dun02.gat",103,169;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+aldeg_cas05.gat,51,179,0 script Brimhemsen 55,{
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (@GIDa5 == 0) goto LStart;
+ if (getcharid(2) != @GIDa5) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDa5)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Brimhemsen ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDa5) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDa5) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Brimhemsen ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Brimhemsen ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDa5) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Brimhemsen ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDa5) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Brimhemsen ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("aldeg_cas05.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("aldeg_cas05.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("aldeg_cas05.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("aldeg_cas05.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("aldeg_cas05.gat",4);
+ set @Economy,GetCastleData("aldeg_cas05.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas05.gat",2,@Economy+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Brimhemsen ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "aldeg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "aldeg_cas05.gat",2,@Economy+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Brimhemsen ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("aldeg_cas05.gat",5);
+ set @Defence,GetCastleData("aldeg_cas05.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas05.gat",3,@Defence+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Brimhemsen ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "aldeg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "aldeg_cas05.gat",3,@Defence+1;
+ mes "[ Brimhemsen ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Brimhemsen ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("aldeg_cas05.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Brimhemsen ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("aldeg_cas05.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("aldeg_cas05.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("aldeg_cas05.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("aldeg_cas05.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("aldeg_cas05.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("aldeg_cas05.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("aldeg_cas05.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("aldeg_cas05.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Brimhemsen ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Brimhemsen ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "aldeg_cas05.gat",@GDnum,1;
+ SetCastleData "aldeg_cas05.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Brimhemsen ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Brimhemsen ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("aldeg_cas05.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Brimhemsen ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Brimhemsen ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Brimhemsen ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#alde5";
+ SetCastleData "aldeg_cas05.gat",9,1;
+ mes "[ Brimhemsen ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Brimhemsen ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to alde again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Brimhemsen ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Brimhemsen ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#alde5";
+ SetCastleData "aldeg_cas05.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Brimhemsen ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Brimhemsen ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Brimhemsen ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Brimhemsen ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "aldeg_cas05",15,209;
+ L6_1:
+ mes "[ Brimhemsen ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Brimhemsen ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Brimhemsen ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Brimhemsen ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "aldeg_cas05.gat",1,0;
+ SetCastleData "aldeg_cas05.gat",2,0;
+ SetCastleData "aldeg_cas05.gat",3,0;
+ SetCastleData "aldeg_cas05.gat",4,0;
+ SetCastleData "aldeg_cas05.gat",5,0;
+ SetCastleData "aldeg_cas05.gat",6,0;
+ SetCastleData "aldeg_cas05.gat",7,0;
+ SetCastleData "aldeg_cas05.gat",8,0;
+ SetCastleData "aldeg_cas05.gat",9,0;
+ SetCastleData "aldeg_cas05.gat",10,0;
+ SetCastleData "aldeg_cas05.gat",11,0;
+ SetCastleData "aldeg_cas05.gat",12,0;
+ SetCastleData "aldeg_cas05.gat",13,0;
+ SetCastleData "aldeg_cas05.gat",14,0;
+ SetCastleData "aldeg_cas05.gat",15,0;
+ SetCastleData "aldeg_cas05.gat",16,0;
+ SetCastleData "aldeg_cas05.gat",17,0;
+ SetCastleData "aldeg_cas05.gat",18,0;
+ SetCastleData "aldeg_cas05.gat",19,0;
+ SetCastleData "aldeg_cas05.gat",20,0;
+ SetCastleData "aldeg_cas05.gat",21,0;
+ SetCastleData "aldeg_cas05.gat",22,0;
+ SetCastleData "aldeg_cas05.gat",23,0;
+ SetCastleData "aldeg_cas05.gat",24,0;
+ SetCastleData "aldeg_cas05.gat",25,0;
+ Announce "[" + GetGuildName(@GIDa5) + "] has surrendered Agit [" + GetCastleName("aldeg_cas05.gat") + "]",0;
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Brimhemsen ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/aldeg_flag.txt b/npc/guild/old/aldeg_flag.txt
new file mode 100644
index 000000000..feec15fd3
--- /dev/null
+++ b/npc/guild/old/aldeg_flag.txt
@@ -0,0 +1,351 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Al de Baran Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in aldebaran and alde_gld
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//============================================================
+
+//Al de Baran Castle 01 - Noisyubantian
+
+aldebaran.gat,155,190,4 script Noisyubantian#a1-1 722,{
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (@GIDa1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ break;
+}
+
+alde_gld.gat,61,87,6 script Noisyubantian#a1-2::NoisyubantianW 722,{
+ set @GIDa1,GetCastleData("aldeg_cas01.gat",1);
+ if (@GIDa1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDa1) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "aldeg_cas01.gat",218,170;
+ break;
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ break;
+}
+
+alde_gld.gat,61,79,6 duplicate(NoisyubantianW) Noisyubantian#a1-3 722
+alde_gld.gat,45,87,8 duplicate(NoisyubantianW) Noisyubantian#a1-4 722
+alde_gld.gat,51,87,8 duplicate(NoisyubantianW) Noisyubantian#a1-5 722
+
+//Al de Baran Castle 02 - Hohensyubangawoo
+
+aldebaran.gat,146,194,3 script Hohensyubangawoo#a2-1 722,{
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (@GIDa2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ break;
+}
+
+alde_gld.gat,93,250,5 script Hohensyubangawoo#a2-2::HohensyubangawooW 722,{
+ set @GIDa2,GetCastleData("aldeg_cas02.gat",1);
+ if (@GIDa2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDa2) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "aldeg_cas02.gat",84,74;
+ break;
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ break;
+}
+
+alde_gld.gat,98,250,5 duplicate(HohensyubangawooW) Hohensyubangawoo#a2-3 722
+
+//Al de Baran Castle 03 - Nyirenverk
+
+aldebaran.gat,143,203,2 script Nyirenverk#a3-1 722,{
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (@GIDa3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ break;
+}
+
+alde_gld.gat,139,83,1 script Nyirenverk#a3-2::NyirenverkW 722,{
+ set @GIDa3,GetCastleData("aldeg_cas03.gat",1);
+ if (@GIDa3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDa3) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "aldeg_cas03.gat",118,76;
+ break;
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ break;
+}
+
+alde_gld.gat,145,83,1 duplicate(NyirenverkW) Nyirenverk#a3-3 722
+
+//Al de Baran Castle 04 - Byirtsburi
+
+aldebaran.gat,167,203,6 script Byirtsburi#a4-1 722,{
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (@GIDa4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ break;
+}
+
+
+alde_gld.gat,239,247,1 script Byirtsburi#a4-2::ByirtsburiW 722,{
+ set @GIDa4,GetCastleData("aldeg_cas04.gat",1);
+ if (@GIDa4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDa4) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "aldeg_cas04.gat",45,88;
+ break;
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ break;
+}
+
+alde_gld.gat,234,247,1 duplicate(ByirtsburiW) Byirtsburi#a4-3 722
+
+//Al de Baran Castle 05 - Rotenburk
+
+aldebaran.gat,165,194,5 script Rotenburk#a5-1 722,{
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (@GIDa5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ break;
+}
+
+alde_gld.gat,266,92,7 script Rotenburk#a5-2::RotenburkW 722,{
+ set @GIDa5,GetCastleData("aldeg_cas05.gat",1);
+ if (@GIDa5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDa5) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Al de Baran ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Al de Baran,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDa5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDa5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDa5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "aldeg_cas05.gat",31,190;
+ break;
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ break;
+}
+
+alde_gld.gat,266,88,7 duplicate(RotenburkW) Rotenburk#a5-3 722 \ No newline at end of file
diff --git a/npc/guild/old/ev_agit_aldeg.txt b/npc/guild/old/ev_agit_aldeg.txt
new file mode 100644
index 000000000..617836cc6
--- /dev/null
+++ b/npc/guild/old/ev_agit_aldeg.txt
@@ -0,0 +1,476 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Al de Baran Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Al de Baran Guild Wars
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//= 1.2 by Akaru (Castle spawn/conquering fix)
+//============================================================
+
+
+aldeg_cas01.gat,216,24,0 script Agit_A01 -1,{
+OnAgitInit:
+ GetCastleData "aldeg_cas01.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
+ Break;
+OnRecvCastleA01:
+ RequestGuildInfo GetCastleData("aldeg_cas01.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("aldeg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),2;
+ Monster "aldeg_cas01.gat",216,24,"EMPERIUM",1288,1,"Agit_A01::OnAgitBreak";
+ GvgOn "aldeg_cas01.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa1,getcharid(2);
+ if (@GIDa1 <= 0) Break;
+ set @Economy,GetCastleData("aldeg_cas01.gat",2);
+ SetCastleData "aldeg_cas01.gat",2,@Economy-5;
+ if (GetCastleData("aldeg_cas01.gat",2) < 0) SetCastleData "aldeg_cas01.gat",2,0;
+ set @Defence,GetCastleData("aldeg_cas01.gat",3);
+ SetCastleData "aldeg_cas01.gat",3,@Defence-5;
+ if (GetCastleData("aldeg_cas01.gat",3) < 0) SetCastleData "aldeg_cas01.gat",3,0;
+ SetCastleData "aldeg_cas01.gat",1,@GIDa1;
+ Announce "Guild Base [" + GetCastleName("aldeg_cas01.gat") + "] has been taken by the [" + GetGuildName(@GIDa1) + "] guild.",0;
+ MapAnnounce "aldeg_cas01.gat","The emperium has been destroyed.",17;
+ GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
+ SetCastleData "aldeg_cas01.gat",2,0;
+ SetCastleData "aldeg_cas01.gat",3,0;
+ SetCastleData "aldeg_cas01.gat",4,0;
+ SetCastleData "aldeg_cas01.gat",5,0;
+ SetCastleData "aldeg_cas01.gat",6,0;
+ SetCastleData "aldeg_cas01.gat",7,0;
+ SetCastleData "aldeg_cas01.gat",8,0;
+ SetCastleData "aldeg_cas01.gat",9,0;
+ SetCastleData "aldeg_cas01.gat",10,0;
+ SetCastleData "aldeg_cas01.gat",11,0;
+ SetCastleData "aldeg_cas01.gat",12,0;
+ SetCastleData "aldeg_cas01.gat",13,0;
+ SetCastleData "aldeg_cas01.gat",14,0;
+ SetCastleData "aldeg_cas01.gat",15,0;
+ SetCastleData "aldeg_cas01.gat",16,0;
+ SetCastleData "aldeg_cas01.gat",17,0;
+ SetCastleData "aldeg_cas01.gat",18,0;
+ SetCastleData "aldeg_cas01.gat",19,0;
+ SetCastleData "aldeg_cas01.gat",20,0;
+ SetCastleData "aldeg_cas01.gat",21,0;
+ SetCastleData "aldeg_cas01.gat",22,0;
+ SetCastleData "aldeg_cas01.gat",23,0;
+ SetCastleData "aldeg_cas01.gat",24,0;
+ SetCastleData "aldeg_cas01.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),6;
+ Monster "aldeg_cas01.gat",216,24,"EMPERIUM",1288,1,"Agit_A01::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("aldeg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),4;
+ KillMonster "aldeg_cas01.gat","Agit_A01::OnAgitBreak";
+ GvgOff "aldeg_cas01.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_A01_Timer";
+}
+
+aldeg_cas01.gat,1,1,1 script Agit_A01_Timer -1,{
+OnTimer500:
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1132,4;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1219,2;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1205,1;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1216,10;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1193,17;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1269,9;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1276,7;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1208,3;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1268,1;
+ areamonster "aldeg_cas01.gat",0,0,300,300,"--ja--",1272,1;
+ monster "aldeg_cas01.gat",216,23,"--ja--",1272,1;
+ monster "aldeg_cas01.gat",216,23,"--ja--",1270,4;
+ monster "aldeg_cas01.gat",216,23,"--ja--",1268,1;
+ monster "aldeg_cas01.gat",216,23,"--ja--",1219,1;
+ monster "aldeg_cas01.gat",216,23,"--ja--",1276,5;
+ Monster "aldeg_cas01.gat",216,24,"EMPERIUM",1288,1,"Agit_A01::OnAgitBreak";
+ stopnpctimer "Agit_A01_Timer";
+ Break;
+ }
+//--------------------------------------------------------------------------------------------------------------------------
+aldeg_cas02.gat,214,24,0 script Agit_A02 -1,{
+OnAgitInit:
+ GetCastleData "aldeg_cas02.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
+ Break;
+OnRecvCastleA02:
+ RequestGuildInfo GetCastleData("aldeg_cas02.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("aldeg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),2;
+ Monster "aldeg_cas02.gat",214,24,"EMPERIUM",1288,1,"Agit_A02::OnAgitBreak";
+ GvgOn "aldeg_cas02.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa2,getcharid(2);
+ if (@GIDa2 <= 0) Break;
+ set @Economy,GetCastleData("aldeg_cas02.gat",2);
+ SetCastleData "aldeg_cas02.gat",2,@Economy-5;
+ if (GetCastleData("aldeg_cas02.gat",2) < 0) SetCastleData "aldeg_cas02.gat",2,0;
+ set @Defence,GetCastleData("aldeg_cas02.gat",3);
+ SetCastleData "aldeg_cas02.gat",3,@Defence-5;
+ if (GetCastleData("aldeg_cas02.gat",3) < 0) SetCastleData "aldeg_cas02.gat",3,0;
+ SetCastleData "aldeg_cas02.gat",1,@GIDa2;
+ Announce "Guild Base [" + GetCastleName("aldeg_cas02.gat") + "] has been taken by the [" + GetGuildName(@GIDa2) + "] guild.",0;
+ MapAnnounce "aldeg_cas02.gat","The emperium has been destroyed.",17;
+ GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
+ SetCastleData "aldeg_cas02.gat",2,0;
+ SetCastleData "aldeg_cas02.gat",3,0;
+ SetCastleData "aldeg_cas02.gat",4,0;
+ SetCastleData "aldeg_cas02.gat",5,0;
+ SetCastleData "aldeg_cas02.gat",6,0;
+ SetCastleData "aldeg_cas02.gat",7,0;
+ SetCastleData "aldeg_cas02.gat",8,0;
+ SetCastleData "aldeg_cas02.gat",9,0;
+ SetCastleData "aldeg_cas02.gat",10,0;
+ SetCastleData "aldeg_cas02.gat",11,0;
+ SetCastleData "aldeg_cas02.gat",12,0;
+ SetCastleData "aldeg_cas02.gat",13,0;
+ SetCastleData "aldeg_cas02.gat",14,0;
+ SetCastleData "aldeg_cas02.gat",15,0;
+ SetCastleData "aldeg_cas02.gat",16,0;
+ SetCastleData "aldeg_cas02.gat",17,0;
+ SetCastleData "aldeg_cas02.gat",18,0;
+ SetCastleData "aldeg_cas02.gat",19,0;
+ SetCastleData "aldeg_cas02.gat",20,0;
+ SetCastleData "aldeg_cas02.gat",21,0;
+ SetCastleData "aldeg_cas02.gat",22,0;
+ SetCastleData "aldeg_cas02.gat",23,0;
+ SetCastleData "aldeg_cas02.gat",24,0;
+ SetCastleData "aldeg_cas02.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),6;
+ Monster "aldeg_cas02.gat",214,24,"EMPERIUM",1288,1,"Agit_A02::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("aldeg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),4;
+ KillMonster "aldeg_cas02.gat","Agit_A02::OnAgitBreak";
+ GvgOff "aldeg_cas02.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_A02_Timer";
+}
+
+aldeg_cas02.gat,1,1,1 script Agit_A02_Timer -1,{
+OnTimer500:
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1132,4;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1219,2;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1205,1;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1216,10;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1193,18;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1269,9;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1276,7;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1208,3;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1268,1;
+ areamonster "aldeg_cas02.gat",0,0,300,300,"--ja--",1272,1;
+ monster "aldeg_cas02.gat",213,23,"--ja--",1272,1;
+ monster "aldeg_cas02.gat",213,23,"--ja--",1270,4;
+ monster "aldeg_cas02.gat",213,23,"--ja--",1268,1;
+ monster "aldeg_cas02.gat",213,23,"--ja--",1219,1;
+ monster "aldeg_cas02.gat",213,23,"--ja--",1276,5;
+ Monster "aldeg_cas02.gat",214,24,"EMPERIUM",1288,1,"Agit_A02::OnAgitBreak";
+ stopnpctimer "Agit_A02_Timer";
+ Break;
+ }
+//--------------------------------------------------------------------------------------------------------------------------
+aldeg_cas03.gat,206,32,0 script Agit_A03 -1,{
+OnAgitInit:
+ GetCastleData "aldeg_cas03.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
+ Break;
+OnRecvCastleA03:
+ RequestGuildInfo GetCastleData("aldeg_cas03.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("aldeg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),2;
+ Monster "aldeg_cas03.gat",206,32,"EMPERIUM",1288,1,"Agit_A03::OnAgitBreak";
+ GvgOn "aldeg_cas03.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa3,getcharid(2);
+ if (@GIDa3 <= 0) Break;
+ set @Economy,GetCastleData("aldeg_cas03.gat",2);
+ SetCastleData "aldeg_cas03.gat",2,@Economy-5;
+ if (GetCastleData("aldeg_cas03.gat",2) < 0) SetCastleData "aldeg_cas03.gat",2,0;
+ set @Defence,GetCastleData("aldeg_cas03.gat",3);
+ SetCastleData "aldeg_cas03.gat",3,@Defence-5;
+ if (GetCastleData("aldeg_cas01.gat",3) < 0) SetCastleData "aldeg_cas03.gat",3,0;
+ SetCastleData "aldeg_cas03.gat",1,@GIDa3;
+ Announce "Guild Base [" + GetCastleName("aldeg_cas03.gat") + "] has been taken by the [" + GetGuildName(@GIDa3) + "] guild.",0;
+ MapAnnounce "aldeg_cas03.gat","The emperium has been destroyed.",17;
+ GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
+ SetCastleData "aldeg_cas03.gat",2,0;
+ SetCastleData "aldeg_cas03.gat",3,0;
+ SetCastleData "aldeg_cas03.gat",4,0;
+ SetCastleData "aldeg_cas03.gat",5,0;
+ SetCastleData "aldeg_cas03.gat",6,0;
+ SetCastleData "aldeg_cas03.gat",7,0;
+ SetCastleData "aldeg_cas03.gat",8,0;
+ SetCastleData "aldeg_cas03.gat",9,0;
+ SetCastleData "aldeg_cas03.gat",10,0;
+ SetCastleData "aldeg_cas03.gat",11,0;
+ SetCastleData "aldeg_cas03.gat",12,0;
+ SetCastleData "aldeg_cas03.gat",13,0;
+ SetCastleData "aldeg_cas03.gat",14,0;
+ SetCastleData "aldeg_cas03.gat",15,0;
+ SetCastleData "aldeg_cas03.gat",16,0;
+ SetCastleData "aldeg_cas03.gat",17,0;
+ SetCastleData "aldeg_cas03.gat",18,0;
+ SetCastleData "aldeg_cas03.gat",19,0;
+ SetCastleData "aldeg_cas03.gat",20,0;
+ SetCastleData "aldeg_cas03.gat",21,0;
+ SetCastleData "aldeg_cas03.gat",22,0;
+ SetCastleData "aldeg_cas03.gat",23,0;
+ SetCastleData "aldeg_cas03.gat",24,0;
+ SetCastleData "aldeg_cas03.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),6;
+ Monster "aldeg_cas03.gat",206,32,"EMPERIUM",1288,1,"Agit_A03::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("aldeg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),4;
+ KillMonster "aldeg_cas03.gat","Agit_A03::OnAgitBreak";
+ GvgOff "aldeg_cas03.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_A03_Timer";
+}
+
+aldeg_cas03.gat,1,1,1 script Agit_A03_Timer -1,{
+OnTimer500:
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1132,4;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1219,2;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1205,1;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1216,10;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1193,18;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1269,9;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1276,7;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1208,3;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1268,1;
+ areamonster "aldeg_cas03.gat",0,0,300,300,"--ja--",1272,1;
+ monster "aldeg_cas03.gat",205,31,"--ja--",1272,1;
+ monster "aldeg_cas03.gat",205,31,"--ja--",1270,4;
+ monster "aldeg_cas03.gat",205,31,"--ja--",1268,1;
+ monster "aldeg_cas03.gat",205,31,"--ja--",1219,1;
+ monster "aldeg_cas03.gat",205,31,"--ja--",1276,5;
+ Monster "aldeg_cas03.gat",206,32,"EMPERIUM",1288,1,"Agit_A03::OnAgitBreak";
+ stopnpctimer "Agit_A03_Timer";
+ Break;
+ }
+//--------------------------------------------------------------------------------------------------------------------------
+aldeg_cas04.gat,36,218,0 script Agit_A04 -1,{
+OnAgitInit:
+ GetCastleData "aldeg_cas04.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
+ Break;
+OnRecvCastleA04:
+ RequestGuildInfo GetCastleData("aldeg_cas04.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("aldeg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),2;
+ Monster "aldeg_cas04.gat",36,218,"EMPERIUM",1288,1,"Agit_A04::OnAgitBreak";
+ GvgOn "aldeg_cas04.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa4,getcharid(2);
+ if (@GIDa4 <= 0) Break;
+ set @Economy,GetCastleData("aldeg_cas04.gat",2);
+ SetCastleData "aldeg_cas04.gat",2,@Economy-5;
+ if (GetCastleData("aldeg_cas04.gat",2) < 0) SetCastleData "aldeg_cas04.gat",2,0;
+ set @Defence,GetCastleData("aldeg_cas04.gat",3);
+ SetCastleData "aldeg_cas04.gat",3,@Defence-5;
+ if (GetCastleData("aldeg_cas04.gat",3) < 0) SetCastleData "aldeg_cas04.gat",3,0;
+ SetCastleData "aldeg_cas04.gat",1,@GIDa4;
+ Announce "Guild Base [" + GetCastleName("aldeg_cas04.gat") + "] has been taken by the [" + GetGuildName(@GIDa4) + "] guild.",0;
+ MapAnnounce "aldeg_cas04.gat","The emperium has been destroyed.",17;
+ GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
+ SetCastleData "aldeg_cas04.gat",2,0;
+ SetCastleData "aldeg_cas04.gat",3,0;
+ SetCastleData "aldeg_cas04.gat",4,0;
+ SetCastleData "aldeg_cas04.gat",5,0;
+ SetCastleData "aldeg_cas04.gat",6,0;
+ SetCastleData "aldeg_cas04.gat",7,0;
+ SetCastleData "aldeg_cas04.gat",8,0;
+ SetCastleData "aldeg_cas04.gat",9,0;
+ SetCastleData "aldeg_cas04.gat",10,0;
+ SetCastleData "aldeg_cas04.gat",11,0;
+ SetCastleData "aldeg_cas04.gat",12,0;
+ SetCastleData "aldeg_cas04.gat",13,0;
+ SetCastleData "aldeg_cas04.gat",14,0;
+ SetCastleData "aldeg_cas04.gat",15,0;
+ SetCastleData "aldeg_cas04.gat",16,0;
+ SetCastleData "aldeg_cas04.gat",17,0;
+ SetCastleData "aldeg_cas04.gat",18,0;
+ SetCastleData "aldeg_cas04.gat",19,0;
+ SetCastleData "aldeg_cas04.gat",20,0;
+ SetCastleData "aldeg_cas04.gat",21,0;
+ SetCastleData "aldeg_cas04.gat",22,0;
+ SetCastleData "aldeg_cas04.gat",23,0;
+ SetCastleData "aldeg_cas04.gat",24,0;
+ SetCastleData "aldeg_cas04.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),6;
+ Monster "aldeg_cas04.gat",36,218,"EMPERIUM",1288,1,"Agit_A04::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("aldeg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),4;
+ KillMonster "aldeg_cas04.gat","Agit_A04::OnAgitBreak";
+ GvgOff "aldeg_cas04.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_A04_Timer";
+}
+
+aldeg_cas04.gat,1,1,1 script Agit_A04_Timer -1,{
+OnTimer500:
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1132,4;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1219,2;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1205,1;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1216,10;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1193,18;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1269,9;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1276,7;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1208,3;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1268,1;
+ areamonster "aldeg_cas04.gat",0,0,300,300,"--ja--",1272,1;
+ monster "aldeg_cas04.gat",36,217,"--ja--",1272,1;
+ monster "aldeg_cas04.gat",36,217,"--ja--",1270,4;
+ monster "aldeg_cas04.gat",36,217,"--ja--",1268,1;
+ monster "aldeg_cas04.gat",36,217,"--ja--",1219,1;
+ monster "aldeg_cas04.gat",36,217,"--ja--",1276,5;
+ Monster "aldeg_cas04.gat",36,218,"EMPERIUM",1288,1,"Agit_A04::OnAgitBreak";
+ stopnpctimer "Agit_A04_Timer";
+ Break;
+ }
+//--------------------------------------------------------------------------------------------------------------------------
+aldeg_cas05.gat,28,102,0 script Agit_A05 -1,{
+OnAgitInit:
+ GetCastleData "aldeg_cas05.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
+ Break;
+OnRecvCastleA05:
+ RequestGuildInfo GetCastleData("aldeg_cas05.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("aldeg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),2;
+ Monster "aldeg_cas05.gat",28,102,"EMPERIUM",1288,1,"Agit_A05::OnAgitBreak";
+ GvgOn "aldeg_cas05.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa5,getcharid(2);
+ if (@GIDa5 <= 0) Break;
+ set @Economy,GetCastleData("aldeg_cas05.gat",2);
+ SetCastleData "aldeg_cas05.gat",2,@Economy-5;
+ if (GetCastleData("aldeg_cas05.gat",2) < 0) SetCastleData "aldeg_cas05.gat",2,0;
+ set @Defence,GetCastleData("aldeg_cas05.gat",3);
+ SetCastleData "aldeg_cas05.gat",3,@Defence-5;
+ if (GetCastleData("aldeg_cas05.gat",3) < 0) SetCastleData "aldeg_cas05.gat",3,0;
+ SetCastleData "aldeg_cas05.gat",1,@GIDa5;
+ Announce "Guild Base [" + GetCastleName("aldeg_cas05.gat") + "] has been taken by [" + GetGuildName(@GIDa5) + "] guild.",0;
+ MapAnnounce "aldeg_cas05.gat","The emperium has been destroyed.",17;
+ GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
+ SetCastleData "aldeg_cas05.gat",2,0;
+ SetCastleData "aldeg_cas05.gat",3,0;
+ SetCastleData "aldeg_cas05.gat",4,0;
+ SetCastleData "aldeg_cas05.gat",5,0;
+ SetCastleData "aldeg_cas05.gat",6,0;
+ SetCastleData "aldeg_cas05.gat",7,0;
+ SetCastleData "aldeg_cas05.gat",8,0;
+ SetCastleData "aldeg_cas05.gat",9,0;
+ SetCastleData "aldeg_cas05.gat",10,0;
+ SetCastleData "aldeg_cas05.gat",11,0;
+ SetCastleData "aldeg_cas05.gat",12,0;
+ SetCastleData "aldeg_cas05.gat",13,0;
+ SetCastleData "aldeg_cas05.gat",14,0;
+ SetCastleData "aldeg_cas05.gat",15,0;
+ SetCastleData "aldeg_cas05.gat",16,0;
+ SetCastleData "aldeg_cas05.gat",17,0;
+ SetCastleData "aldeg_cas05.gat",18,0;
+ SetCastleData "aldeg_cas05.gat",19,0;
+ SetCastleData "aldeg_cas05.gat",20,0;
+ SetCastleData "aldeg_cas05.gat",21,0;
+ SetCastleData "aldeg_cas05.gat",22,0;
+ SetCastleData "aldeg_cas05.gat",23,0;
+ SetCastleData "aldeg_cas05.gat",24,0;
+ SetCastleData "aldeg_cas05.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),6;
+ Monster "aldeg_cas05.gat",28,102,"EMPERIUM",1288,1,"Agit_A05::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("aldeg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),4;
+ KillMonster "aldeg_cas05.gat","Agit_A05::OnAgitBreak";
+ GvgOff "aldeg_cas05.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_A05_Timer";
+}
+
+aldeg_cas05.gat,1,1,1 script Agit_A05_Timer -1,{
+OnTimer500:
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1132,4;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1219,2;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1205,1;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1216,10;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1193,18;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1269,9;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1276,7;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1208,3;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1268,1;
+ areamonster "aldeg_cas05.gat",0,0,300,300,"--ja--",1272,1;
+ monster "aldeg_cas05.gat",27,101,"--ja--",1272,1;
+ monster "aldeg_cas05.gat",27,101,"--ja--",1270,4;
+ monster "aldeg_cas05.gat",27,101,"--ja--",1268,1;
+ monster "aldeg_cas05.gat",27,101,"--ja--",1219,1;
+ monster "aldeg_cas05.gat",27,101,"--ja--",1276,5;
+ Monster "aldeg_cas05.gat",28,102,"EMPERIUM",1288,1,"Agit_A05::OnAgitBreak";
+ stopnpctimer "Agit_A05_Timer";
+ Break;
+ }
+//--------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/ev_agit_event.txt b/npc/guild/old/ev_agit_event.txt
new file mode 100644
index 000000000..c68bec74a
--- /dev/null
+++ b/npc/guild/old/ev_agit_event.txt
@@ -0,0 +1,34 @@
+//===== eAthena Script =======================================
+//= War of Emperium - WoE Auto-Start
+//===== By: ==================================================
+//= kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Auto Start for War of Emperium
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//============================================================
+
+// Auto Start Agit NPC
+prontera.gat,116,72,0 script Agit_Event -1,{
+OnInit:
+ if ($AgitStarted == 1) goto AgitReboot;
+ Break;
+OnClock1900:
+ Announce "The War Of Emperium has begun!",8;
+ AgitStart;
+ set $AgitStarted,1;
+ Break;
+OnClock2100:
+ Announce "The War Of Emperium is over!",8;
+ AgitEnd;
+ set $AgitStarted,0;
+ Break;
+AgitReboot:
+ AgitStart;
+ set $AgitStarted,1;
+ Break;
+}
diff --git a/npc/guild/old/ev_agit_gefg.txt b/npc/guild/old/ev_agit_gefg.txt
new file mode 100644
index 000000000..bcb6640ac
--- /dev/null
+++ b/npc/guild/old/ev_agit_gefg.txt
@@ -0,0 +1,464 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Geffen Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Geffen Guild Wars
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//= 1.2 by Akaru (Castle spawn/conquering fix)
+//============================================================
+
+
+gefg_cas01.gat,198,182,0 script Agit_B01 -1,{
+OnAgitInit:
+ GetCastleData "gefg_cas01.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
+ Break;
+OnRecvCastleG01:
+ RequestGuildInfo GetCastleData("gefg_cas01.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("gefg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),2;
+ Monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_B01::OnAgitBreak";
+ GvgOn "gefg_cas01.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa1,getcharid(2);
+ if (@GIDa1 <= 0) Break;
+ set @Economy,GetCastleData("gefg_cas01.gat",2);
+ SetCastleData "gefg_cas01.gat",2,@Economy-5;
+ if (GetCastleData("gefg_cas01.gat",2) < 0) SetCastleData "gefg_cas01.gat",2,0;
+ set @Defence,GetCastleData("gefg_cas01.gat",3);
+ SetCastleData "gefg_cas01.gat",3,@Defence-5;
+ if (GetCastleData("gefg_cas01.gat",3) < 0) SetCastleData "gefg_cas01.gat",3,0;
+ SetCastleData "gefg_cas01.gat",1,@GIDa1;
+ Announce "Guild Base [" + GetCastleName("gefg_cas01.gat") + "] has been taken by the [" + GetGuildName(@GIDa1) + "] guild.",0;
+ MapAnnounce "gefg_cas01.gat","The emperium has been destroyed.",17;
+ GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
+ SetCastleData "gefg_cas01.gat",2,0;
+ SetCastleData "gefg_cas01.gat",3,0;
+ SetCastleData "gefg_cas01.gat",4,0;
+ SetCastleData "gefg_cas01.gat",5,0;
+ SetCastleData "gefg_cas01.gat",6,0;
+ SetCastleData "gefg_cas01.gat",7,0;
+ SetCastleData "gefg_cas01.gat",8,0;
+ SetCastleData "gefg_cas01.gat",9,0;
+ SetCastleData "gefg_cas01.gat",10,0;
+ SetCastleData "gefg_cas01.gat",11,0;
+ SetCastleData "gefg_cas01.gat",12,0;
+ SetCastleData "gefg_cas01.gat",13,0;
+ SetCastleData "gefg_cas01.gat",14,0;
+ SetCastleData "gefg_cas01.gat",15,0;
+ SetCastleData "gefg_cas01.gat",16,0;
+ SetCastleData "gefg_cas01.gat",17,0;
+ SetCastleData "gefg_cas01.gat",18,0;
+ SetCastleData "gefg_cas01.gat",19,0;
+ SetCastleData "gefg_cas01.gat",20,0;
+ SetCastleData "gefg_cas01.gat",21,0;
+ SetCastleData "gefg_cas01.gat",22,0;
+ SetCastleData "gefg_cas01.gat",23,0;
+ SetCastleData "gefg_cas01.gat",24,0;
+ SetCastleData "gefg_cas01.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),6;
+ Monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_B01::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("gefg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),4;
+ KillMonster "gefg_cas01.gat","Agit_B01::OnAgitBreak";
+ GvgOff "gefg_cas01.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_B01_Timer";
+}
+
+gefg_cas01.gat,1,1,1 script Agit_B01_Timer -1,{
+OnTimer500:
+ if (GetCastleData("gefg_cas01.gat",1) != 0) break;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1263,11;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1102,10;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1130,10;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1140,20;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1163,9;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1219,1;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "gefg_cas01.gat",0,0,300,300,"--ja--",1159,1;
+ monster "gefg_cas01.gat",197,181,"--ja--",1203,1;
+ monster "gefg_cas01.gat",197,181,"--ja--",1087,1;
+ monster "gefg_cas01.gat",197,181,"--ja--",1213,10;
+ monster "gefg_cas01.gat",197,181,"--ja--",1189,10;
+ monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_B01::OnAgitBreak";
+ stopnpctimer "Agit_B01_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+gefg_cas02.gat,176,178,0 script Agit_B02 -1,{
+OnAgitInit:
+ GetCastleData "gefg_cas02.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
+ Break;
+OnRecvCastleG02:
+ RequestGuildInfo GetCastleData("gefg_cas02.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("gefg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),2;
+ Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_B02::OnAgitBreak";
+ GvgOn "gefg_cas02.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa2,getcharid(2);
+ if (@GIDa2 <= 0) Break;
+ set @Economy,GetCastleData("gefg_cas02.gat",2);
+ SetCastleData "gefg_cas02.gat",2,@Economy-5;
+ if (GetCastleData("gefg_cas02.gat",2) < 0) SetCastleData "gefg_cas02.gat",2,0;
+ set @Defence,GetCastleData("gefg_cas02.gat",3);
+ SetCastleData "gefg_cas02.gat",3,@Defence-5;
+ if (GetCastleData("gefg_cas02.gat",3) < 0) SetCastleData "gefg_cas02.gat",3,0;
+ SetCastleData "gefg_cas02.gat",1,@GIDa2;
+ Announce "Guild Base [" + GetCastleName("gefg_cas02.gat") + "] has been taken by the [" + GetGuildName(@GIDa2) + "] guild.",0;
+ MapAnnounce "gefg_cas02.gat","The emperium has been destroyed.",17;
+ GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
+ SetCastleData "gefg_cas02.gat",2,0;
+ SetCastleData "gefg_cas02.gat",3,0;
+ SetCastleData "gefg_cas02.gat",4,0;
+ SetCastleData "gefg_cas02.gat",5,0;
+ SetCastleData "gefg_cas02.gat",6,0;
+ SetCastleData "gefg_cas02.gat",7,0;
+ SetCastleData "gefg_cas02.gat",8,0;
+ SetCastleData "gefg_cas02.gat",9,0;
+ SetCastleData "gefg_cas02.gat",10,0;
+ SetCastleData "gefg_cas02.gat",11,0;
+ SetCastleData "gefg_cas02.gat",12,0;
+ SetCastleData "gefg_cas02.gat",13,0;
+ SetCastleData "gefg_cas02.gat",14,0;
+ SetCastleData "gefg_cas02.gat",15,0;
+ SetCastleData "gefg_cas02.gat",16,0;
+ SetCastleData "gefg_cas02.gat",17,0;
+ SetCastleData "gefg_cas02.gat",18,0;
+ SetCastleData "gefg_cas02.gat",19,0;
+ SetCastleData "gefg_cas02.gat",20,0;
+ SetCastleData "gefg_cas02.gat",21,0;
+ SetCastleData "gefg_cas02.gat",22,0;
+ SetCastleData "gefg_cas02.gat",23,0;
+ SetCastleData "gefg_cas02.gat",24,0;
+ SetCastleData "gefg_cas02.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),6;
+ Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_B02::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("gefg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),4;
+ KillMonster "gefg_cas02.gat","Agit_B02::OnAgitBreak";
+ GvgOff "gefg_cas02.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_B02_Timer";
+}
+
+gefg_cas02.gat,1,1,1 script Agit_B02_Timer -1,{
+OnTimer500:
+ if (GetCastleData("gefg_cas02.gat",1) != 0) break;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1263,11;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1102,10;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1130,10;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1140,20;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1163,9;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1219,1;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "gefg_cas02.gat",0,0,300,300,"--ja--",1159,1;
+ monster "gefg_cas02.gat",176,178,"--ja--",1203,1;
+ monster "gefg_cas02.gat",176,178,"--ja--",1087,1;
+ monster "gefg_cas02.gat",176,178,"--ja--",1213,7;
+ monster "gefg_cas02.gat",176,178,"--ja--",1189,7;
+ Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_B02::OnAgitBreak";
+ stopnpctimer "Agit_B02_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+gefg_cas03.gat,245,167,0 script Agit_B03 -1,{
+OnAgitInit:
+ GetCastleData "gefg_cas03.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
+ Break;
+OnRecvCastleG03:
+ RequestGuildInfo GetCastleData("gefg_cas03.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("gefg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),2;
+ Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_B03::OnAgitBreak";
+ GvgOn "gefg_cas03.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa3,getcharid(2);
+ if (@GIDa3 <= 0) Break;
+ set @Economy,GetCastleData("gefg_cas03.gat",2);
+ SetCastleData "gefg_cas03.gat",2,@Economy-5;
+ if (GetCastleData("gefg_cas03.gat",2) < 0) SetCastleData "gefg_cas03.gat",2,0;
+ set @Defence,GetCastleData("gefg_cas03.gat",3);
+ SetCastleData "gefg_cas03.gat",3,@Defence-5;
+ if (GetCastleData("gefg_cas01.gat",3) < 0) SetCastleData "gefg_cas03.gat",3,0;
+ SetCastleData "gefg_cas03.gat",1,@GIDa3;
+ Announce "Guild Base [" + GetCastleName("gefg_cas03.gat") + "] has been taken by the [" + GetGuildName(@GIDa3) + "] guild.",0;
+ MapAnnounce "gefg_cas03.gat","The emperium has been destroyed.",17;
+ GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
+ SetCastleData "gefg_cas03.gat",2,0;
+ SetCastleData "gefg_cas03.gat",3,0;
+ SetCastleData "gefg_cas03.gat",4,0;
+ SetCastleData "gefg_cas03.gat",5,0;
+ SetCastleData "gefg_cas03.gat",6,0;
+ SetCastleData "gefg_cas03.gat",7,0;
+ SetCastleData "gefg_cas03.gat",8,0;
+ SetCastleData "gefg_cas03.gat",9,0;
+ SetCastleData "gefg_cas03.gat",10,0;
+ SetCastleData "gefg_cas03.gat",11,0;
+ SetCastleData "gefg_cas03.gat",12,0;
+ SetCastleData "gefg_cas03.gat",13,0;
+ SetCastleData "gefg_cas03.gat",14,0;
+ SetCastleData "gefg_cas03.gat",15,0;
+ SetCastleData "gefg_cas03.gat",16,0;
+ SetCastleData "gefg_cas03.gat",17,0;
+ SetCastleData "gefg_cas03.gat",18,0;
+ SetCastleData "gefg_cas03.gat",19,0;
+ SetCastleData "gefg_cas03.gat",20,0;
+ SetCastleData "gefg_cas03.gat",21,0;
+ SetCastleData "gefg_cas03.gat",22,0;
+ SetCastleData "gefg_cas03.gat",23,0;
+ SetCastleData "gefg_cas03.gat",24,0;
+ SetCastleData "gefg_cas03.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),6;
+ Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_B03::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("gefg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),4;
+ KillMonster "gefg_cas03.gat","Agit_B03::OnAgitBreak";
+ GvgOff "gefg_cas03.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_B03_Timer";
+}
+
+gefg_cas03.gat,1,1,1 script Agit_B03_Timer -1,{
+OnTimer500:
+ if (GetCastleData("gefg_cas03.gat",1) != 0) break;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1263,11;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1102,10;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1130,10;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1140,20;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1163,9;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1219,1;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "gefg_cas03.gat",0,0,300,300,"--ja--",1159,1;
+ monster "gefg_cas03.gat",244,166,"--ja--",1203,1;
+ monster "gefg_cas03.gat",244,166,"--ja--",1087,1;
+ monster "gefg_cas03.gat",244,166,"--ja--",1213,7;
+ monster "gefg_cas03.gat",244,166,"--ja--",1189,7;
+ Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_B03::OnAgitBreak";
+ stopnpctimer "Agit_B03_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+gefg_cas04.gat,174,178,0 script Agit_B04 -1,{
+OnAgitInit:
+ GetCastleData "gefg_cas04.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
+ Break;
+OnRecvCastleG04:
+ RequestGuildInfo GetCastleData("gefg_cas04.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("gefg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),2;
+ Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_B04::OnAgitBreak";
+ GvgOn "gefg_cas04.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa4,getcharid(2);
+ if (@GIDa4 <= 0) Break;
+ set @Economy,GetCastleData("gefg_cas04.gat",2);
+ SetCastleData "gefg_cas04.gat",2,@Economy-5;
+ if (GetCastleData("gefg_cas04.gat",2) < 0) SetCastleData "gefg_cas04.gat",2,0;
+ set @Defence,GetCastleData("gefg_cas04.gat",3);
+ SetCastleData "gefg_cas04.gat",3,@Defence-5;
+ if (GetCastleData("gefg_cas04.gat",3) < 0) SetCastleData "gefg_cas04.gat",3,0;
+ SetCastleData "gefg_cas04.gat",1,@GIDa4;
+ Announce "Guild Base [" + GetCastleName("gefg_cas04.gat") + "] has been taken by the [" + GetGuildName(@GIDa4) + "] guild.",0;
+ MapAnnounce "gefg_cas04.gat","The emperium has been destroyed.",17;
+ GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
+ SetCastleData "gefg_cas04.gat",2,0;
+ SetCastleData "gefg_cas04.gat",3,0;
+ SetCastleData "gefg_cas04.gat",4,0;
+ SetCastleData "gefg_cas04.gat",5,0;
+ SetCastleData "gefg_cas04.gat",6,0;
+ SetCastleData "gefg_cas04.gat",7,0;
+ SetCastleData "gefg_cas04.gat",8,0;
+ SetCastleData "gefg_cas04.gat",9,0;
+ SetCastleData "gefg_cas04.gat",10,0;
+ SetCastleData "gefg_cas04.gat",11,0;
+ SetCastleData "gefg_cas04.gat",12,0;
+ SetCastleData "gefg_cas04.gat",13,0;
+ SetCastleData "gefg_cas04.gat",14,0;
+ SetCastleData "gefg_cas04.gat",15,0;
+ SetCastleData "gefg_cas04.gat",16,0;
+ SetCastleData "gefg_cas04.gat",17,0;
+ SetCastleData "gefg_cas04.gat",18,0;
+ SetCastleData "gefg_cas04.gat",19,0;
+ SetCastleData "gefg_cas04.gat",20,0;
+ SetCastleData "gefg_cas04.gat",21,0;
+ SetCastleData "gefg_cas04.gat",22,0;
+ SetCastleData "gefg_cas04.gat",23,0;
+ SetCastleData "gefg_cas04.gat",24,0;
+ SetCastleData "gefg_cas04.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),6;
+ Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_B04::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("gefg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),4;
+ KillMonster "gefg_cas04.gat","Agit_B04::OnAgitBreak";
+ GvgOff "gefg_cas04.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_B04_Timer";
+}
+
+gefg_cas04.gat,1,1,1 script Agit_B04_Timer -1,{
+OnTimer500:
+ if (GetCastleData("gefg_cas04.gat",1) != 0) break;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1263,11;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1102,10;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1130,10;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1140,20;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1163,9;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1219,1;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "gefg_cas04.gat",0,0,300,300,"--ja--",1159,1;
+ monster "gefg_cas04.gat",174,177,"--ja--",1203,1;
+ monster "gefg_cas04.gat",174,177,"--ja--",1087,1;
+ monster "gefg_cas04.gat",174,177,"--ja--",1213,7;
+ monster "gefg_cas04.gat",174,177,"--ja--",1189,7;
+ Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_B04::OnAgitBreak";
+ stopnpctimer "Agit_B04_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+gefg_cas05.gat,194,184,0 script Agit_B05 -1,{
+OnAgitInit:
+ GetCastleData "gefg_cas05.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
+ Break;
+OnRecvCastleG05:
+ RequestGuildInfo GetCastleData("gefg_cas05.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("gefg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),2;
+ Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_B05::OnAgitBreak";
+ GvgOn "gefg_cas05.gat";
+ Break;
+OnAgitBreak:
+ set @GIDa5,getcharid(2);
+ if (@GIDa5 <= 0) Break;
+ set @Economy,GetCastleData("gefg_cas05.gat",2);
+ SetCastleData "gefg_cas05.gat",2,@Economy-5;
+ if (GetCastleData("gefg_cas05.gat",2) < 0) SetCastleData "gefg_cas05.gat",2,0;
+ set @Defence,GetCastleData("gefg_cas05.gat",3);
+ SetCastleData "gefg_cas05.gat",3,@Defence-5;
+ if (GetCastleData("gefg_cas05.gat",3) < 0) SetCastleData "gefg_cas05.gat",3,0;
+ SetCastleData "gefg_cas05.gat",1,@GIDa5;
+ Announce "Guild Base [" + GetCastleName("gefg_cas05.gat") + "] has been taken by [" + GetGuildName(@GIDa5) + "] guild.",0;
+ MapAnnounce "gefg_cas05.gat","The emperium has been destroyed.",17;
+ GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
+ SetCastleData "gefg_cas05.gat",2,0;
+ SetCastleData "gefg_cas05.gat",3,0;
+ SetCastleData "gefg_cas05.gat",4,0;
+ SetCastleData "gefg_cas05.gat",5,0;
+ SetCastleData "gefg_cas05.gat",6,0;
+ SetCastleData "gefg_cas05.gat",7,0;
+ SetCastleData "gefg_cas05.gat",8,0;
+ SetCastleData "gefg_cas05.gat",9,0;
+ SetCastleData "gefg_cas05.gat",10,0;
+ SetCastleData "gefg_cas05.gat",11,0;
+ SetCastleData "gefg_cas05.gat",12,0;
+ SetCastleData "gefg_cas05.gat",13,0;
+ SetCastleData "gefg_cas05.gat",14,0;
+ SetCastleData "gefg_cas05.gat",15,0;
+ SetCastleData "gefg_cas05.gat",16,0;
+ SetCastleData "gefg_cas05.gat",17,0;
+ SetCastleData "gefg_cas05.gat",18,0;
+ SetCastleData "gefg_cas05.gat",19,0;
+ SetCastleData "gefg_cas05.gat",20,0;
+ SetCastleData "gefg_cas05.gat",21,0;
+ SetCastleData "gefg_cas05.gat",22,0;
+ SetCastleData "gefg_cas05.gat",23,0;
+ SetCastleData "gefg_cas05.gat",24,0;
+ SetCastleData "gefg_cas05.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),6;
+ Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_B05::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("gefg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),4;
+ KillMonster "gefg_cas05.gat","Agit_B05::OnAgitBreak";
+ GvgOff "gefg_cas05.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_B05_Timer";
+}
+
+gefg_cas05.gat,1,1,1 script Agit_B05_Timer -1,{
+OnTimer500:
+ if (GetCastleData("gefg_cas05.gat",1) != 0) break;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1117,10;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1263,11;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1102,10;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1130,10;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1140,20;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1163,9;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1219,1;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "gefg_cas05.gat",0,0,300,300,"--ja--",1159,1;
+ monster "gefg_cas05.gat",194,184,"--ja--",1203,1;
+ monster "gefg_cas05.gat",194,184,"--ja--",1087,1;
+ monster "gefg_cas05.gat",194,184,"--ja--",1213,7;
+ monster "gefg_cas05.gat",194,184,"--ja--",1189,7;
+ Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_B05::OnAgitBreak";
+}
+//--------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/ev_agit_payg.txt b/npc/guild/old/ev_agit_payg.txt
new file mode 100644
index 000000000..6857f10b1
--- /dev/null
+++ b/npc/guild/old/ev_agit_payg.txt
@@ -0,0 +1,466 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Payon Guild Wars
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//= 1.2 by Akaru (Castle spawn/conquering fix)
+//============================================================
+
+
+payg_cas01.gat,139,139,0 script Agit_C01 -1,{
+OnAgitInit:
+ GetCastleData "payg_cas01.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "payg_cas01.gat",0,"::OnRecvCastleF01";
+ Break;
+OnRecvCastleF01:
+ RequestGuildInfo GetCastleData("payg_cas01.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("payg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas01.gat",1),2;
+ Monster "payg_cas01.gat",139,139,"EMPERIUM",1288,1,"Agit_C01::OnAgitBreak";
+ GvgOn "payg_cas01.gat";
+ Break;
+OnAgitBreak:
+ set @GIDf1,getcharid(2);
+ if (@GIDf1 <= 0) Break;
+ set @Economy,GetCastleData("payg_cas01.gat",2);
+ SetCastleData "payg_cas01.gat",2,@Economy-5;
+ if (GetCastleData("payg_cas01.gat",2) < 0) SetCastleData "payg_cas01.gat",2,0;
+ set @Defence,GetCastleData("payg_cas01.gat",3);
+ SetCastleData "payg_cas01.gat",3,@Defence-5;
+ if (GetCastleData("payg_cas01.gat",3) < 0) SetCastleData "payg_cas01.gat",3,0;
+ SetCastleData "payg_cas01.gat",1,@GIDf1;
+ Announce "Guild Base [" + GetCastleName("payg_cas01.gat") + "] has been taken by the [" + GetGuildName(@GIDf1) + "] guild.",0;
+ MapAnnounce "payg_cas01.gat","The emperium has been destroyed.",17;
+ GetCastleData "payg_cas01.gat",0,"::OnRecvCastleF01";
+ SetCastleData "payg_cas01.gat",2,0;
+ SetCastleData "payg_cas01.gat",3,0;
+ SetCastleData "payg_cas01.gat",4,0;
+ SetCastleData "payg_cas01.gat",5,0;
+ SetCastleData "payg_cas01.gat",6,0;
+ SetCastleData "payg_cas01.gat",7,0;
+ SetCastleData "payg_cas01.gat",8,0;
+ SetCastleData "payg_cas01.gat",9,0;
+ SetCastleData "payg_cas01.gat",10,0;
+ SetCastleData "payg_cas01.gat",11,0;
+ SetCastleData "payg_cas01.gat",12,0;
+ SetCastleData "payg_cas01.gat",13,0;
+ SetCastleData "payg_cas01.gat",14,0;
+ SetCastleData "payg_cas01.gat",15,0;
+ SetCastleData "payg_cas01.gat",16,0;
+ SetCastleData "payg_cas01.gat",17,0;
+ SetCastleData "payg_cas01.gat",18,0;
+ SetCastleData "payg_cas01.gat",19,0;
+ SetCastleData "payg_cas01.gat",20,0;
+ SetCastleData "payg_cas01.gat",21,0;
+ SetCastleData "payg_cas01.gat",22,0;
+ SetCastleData "payg_cas01.gat",23,0;
+ SetCastleData "payg_cas01.gat",24,0;
+ SetCastleData "payg_cas01.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas01.gat",1),6;
+ Monster "payg_cas01.gat",139,139,"EMPERIUM",1288,1,"Agit_C01::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("payg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas02.gat",1),4;
+ KillMonster "payg_cas01.gat","Agit_C01::OnAgitBreak";
+ GvgOff "payg_cas01.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_C01_Timer";
+}
+
+payg_cas01.gat,1,1,1 script Agit_C01_Timer -1,{
+OnTimer500:
+ if (GetCastleData("payg_cas01.gat",1) != 0) break;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1277,10;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1208,10;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1262,5;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1102,5;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1115,1;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1129,11;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1282,4;
+ areamonster "payg_cas01.gat",0,0,300,300,"--ja--",1253,5;
+ monster "payg_cas01.gat",138,138,"--ja--",1150,1;
+ monster "payg_cas01.gat",138,138,"--ja--",1115,1;
+ monster "payg_cas01.gat",138,138,"--ja--",1208,6;
+ monster "payg_cas01.gat",138,138,"--ja--",1276,5;
+ monster "payg_cas01.gat",139,139,"EMPERIUM",1288,1,"Agit_C01::OnAgitBreak";
+ stopnpctimer "Agit_C01_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+payg_cas02.gat,39,25,0 script Agit_C02 -1,{
+OnAgitInit:
+ GetCastleData "payg_cas02.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "payg_cas02.gat",0,"::OnRecvCastleF02";
+ Break;
+OnRecvCastleF02:
+ RequestGuildInfo GetCastleData("payg_cas02.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("payg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),2;
+ Monster "payg_cas02.gat",39,25,"EMPERIUM",1288,1,"Agit_C02::OnAgitBreak";
+ GvgOn "payg_cas02.gat";
+ Break;
+OnAgitBreak:
+ set @GIDf2,getcharid(2);
+ if (@GIDf2 <= 0) Break;
+ set @Economy,GetCastleData("payg_cas02.gat",2);
+ SetCastleData "payg_cas02.gat",2,@Economy-5;
+ if (GetCastleData("payg_cas02.gat",2) < 0) SetCastleData "payg_cas02.gat",2,0;
+ set @Defence,GetCastleData("payg_cas02.gat",3);
+ SetCastleData "payg_cas02.gat",3,@Defence-5;
+ if (GetCastleData("payg_cas02.gat",3) < 0) SetCastleData "payg_cas02.gat",3,0;
+ SetCastleData "payg_cas02.gat",1,@GIDf2;
+ Announce "Guild Base [" + GetCastleName("payg_cas02.gat") + "] has been taken by the [" + GetGuildName(@GIDf2) + "] guild.",0;
+ MapAnnounce "payg_cas02.gat","The emperium has been destroyed.",17;
+ GetCastleData "payg_cas02.gat",0,"::OnRecvCastleF02";
+ SetCastleData "payg_cas02.gat",2,0;
+ SetCastleData "payg_cas02.gat",3,0;
+ SetCastleData "payg_cas02.gat",4,0;
+ SetCastleData "payg_cas02.gat",5,0;
+ SetCastleData "payg_cas02.gat",6,0;
+ SetCastleData "payg_cas02.gat",7,0;
+ SetCastleData "payg_cas02.gat",8,0;
+ SetCastleData "payg_cas02.gat",9,0;
+ SetCastleData "payg_cas02.gat",10,0;
+ SetCastleData "payg_cas02.gat",11,0;
+ SetCastleData "payg_cas02.gat",12,0;
+ SetCastleData "payg_cas02.gat",13,0;
+ SetCastleData "payg_cas02.gat",14,0;
+ SetCastleData "payg_cas02.gat",15,0;
+ SetCastleData "payg_cas02.gat",16,0;
+ SetCastleData "payg_cas02.gat",17,0;
+ SetCastleData "payg_cas02.gat",18,0;
+ SetCastleData "payg_cas02.gat",19,0;
+ SetCastleData "payg_cas02.gat",20,0;
+ SetCastleData "payg_cas02.gat",21,0;
+ SetCastleData "payg_cas02.gat",22,0;
+ SetCastleData "payg_cas02.gat",23,0;
+ SetCastleData "payg_cas02.gat",24,0;
+ SetCastleData "payg_cas02.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),6;
+ Monster "payg_cas02.gat",39,25,"EMPERIUM",1288,1,"Agit_C02::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("payg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),4;
+ KillMonster "payg_cas02.gat","Agit_C02::OnAgitBreak";
+ GvgOff "payg_cas02.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_C02_Timer";
+}
+
+payg_cas02.gat,1,1,1 script Agit_C02_Timer -1,{
+OnTimer500:
+ if (GetCastleData("payg_cas02.gat",1) != 0) break;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1277,10;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1208,10;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1262,5;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1102,5;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1115,1;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1129,11;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1282,4;
+ areamonster "payg_cas02.gat",0,0,300,300,"--ja--",1253,5;
+ monster "payg_cas02.gat",138,138,"--ja--",1150,1;
+ monster "payg_cas02.gat",138,138,"--ja--",1115,1;
+ monster "payg_cas02.gat",138,138,"--ja--",1208,6;
+ monster "payg_cas02.gat",138,138,"--ja--",1276,5;
+ monster "payg_cas02.gat",39,25,"EMPERIUM",1288,1,"Agit_C02::OnAgitBreak";
+ stopnpctimer "Agit_C02_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+payg_cas03.gat,269,265,0 script Agit_C03 -1,{
+OnAgitInit:
+ GetCastleData "payg_cas03.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "payg_cas03.gat",0,"::OnRecvCastleF03";
+ Break;
+OnRecvCastleF03:
+ RequestGuildInfo GetCastleData("payg_cas03.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("payg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),2;
+ Monster "payg_cas03.gat",269,265,"EMPERIUM",1288,1,"Agit_C03::OnAgitBreak";
+ GvgOn "payg_cas03.gat";
+ Break;
+OnAgitBreak:
+ set @GIDf3,getcharid(2);
+ if (@GIDf3 <= 0) Break;
+ set @Economy,GetCastleData("payg_cas03.gat",2);
+ SetCastleData "payg_cas03.gat",2,@Economy-5;
+ if (GetCastleData("payg_cas03.gat",2) < 0) SetCastleData "payg_cas03.gat",2,0;
+ set @Defence,GetCastleData("payg_cas03.gat",3);
+ SetCastleData "payg_cas03.gat",3,@Defence-5;
+ if (GetCastleData("payg_cas01.gat",3) < 0) SetCastleData "payg_cas03.gat",3,0;
+ SetCastleData "payg_cas03.gat",1,@GIDf3;
+ Announce "Guild Base [" + GetCastleName("payg_cas03.gat") + "] has been taken by the [" + GetGuildName(@GIDf3) + "] guild.",0;
+ MapAnnounce "payg_cas03.gat","The emperium has been destroyed.",17;
+ GetCastleData "payg_cas03.gat",0,"::OnRecvCastleF03";
+ SetCastleData "payg_cas03.gat",2,0;
+ SetCastleData "payg_cas03.gat",3,0;
+ SetCastleData "payg_cas03.gat",4,0;
+ SetCastleData "payg_cas03.gat",5,0;
+ SetCastleData "payg_cas03.gat",6,0;
+ SetCastleData "payg_cas03.gat",7,0;
+ SetCastleData "payg_cas03.gat",8,0;
+ SetCastleData "payg_cas03.gat",9,0;
+ SetCastleData "payg_cas03.gat",10,0;
+ SetCastleData "payg_cas03.gat",11,0;
+ SetCastleData "payg_cas03.gat",12,0;
+ SetCastleData "payg_cas03.gat",13,0;
+ SetCastleData "payg_cas03.gat",14,0;
+ SetCastleData "payg_cas03.gat",15,0;
+ SetCastleData "payg_cas03.gat",16,0;
+ SetCastleData "payg_cas03.gat",17,0;
+ SetCastleData "payg_cas03.gat",18,0;
+ SetCastleData "payg_cas03.gat",19,0;
+ SetCastleData "payg_cas03.gat",20,0;
+ SetCastleData "payg_cas03.gat",21,0;
+ SetCastleData "payg_cas03.gat",22,0;
+ SetCastleData "payg_cas03.gat",23,0;
+ SetCastleData "payg_cas03.gat",24,0;
+ SetCastleData "payg_cas03.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),6;
+ Monster "payg_cas03.gat",269,265,"EMPERIUM",1288,1,"Agit_C03::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("payg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),4;
+ KillMonster "payg_cas03.gat","Agit_C03::OnAgitBreak";
+ GvgOff "payg_cas03.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_C03_Timer";
+}
+
+payg_cas03.gat,1,1,1 script Agit_C03_Timer -1,{
+OnTimer500:
+ if (GetCastleData("payg_cas03.gat",1) != 0) break;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1277,10;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1208,10;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1262,5;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1102,5;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1115,1;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1129,11;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1282,4;
+ areamonster "payg_cas03.gat",0,0,300,300,"--ja--",1253,5;
+ monster "payg_cas03.gat",268,264,"--ja--",1150,1;
+ monster "payg_cas03.gat",268,264,"--ja--",1115,1;
+ monster "payg_cas03.gat",268,264,"--ja--",1208,6;
+ monster "payg_cas03.gat",268,264,"--ja--",1276,5;
+ monster "payg_cas03.gat",269,265,"EMPERIUM",1288,1,"Agit_C03::OnAgitBreak";
+ stopnpctimer "Agit_C03_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+payg_cas04.gat,271,29,0 script Agit_C04 -1,{
+OnAgitInit:
+ GetCastleData "payg_cas04.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "payg_cas04.gat",0,"::OnRecvCastleF04";
+ Break;
+OnRecvCastleF04:
+ RequestGuildInfo GetCastleData("payg_cas04.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("payg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),2;
+ Monster "payg_cas04.gat",271,29,"EMPERIUM",1288,1,"Agit_C04::OnAgitBreak";
+ GvgOn "payg_cas04.gat";
+ Break;
+OnAgitBreak:
+ set @GIDf4,getcharid(2);
+ if (@GIDf4 <= 0) Break;
+ set @Economy,GetCastleData("payg_cas04.gat",2);
+ SetCastleData "payg_cas04.gat",2,@Economy-5;
+ if (GetCastleData("payg_cas04.gat",2) < 0) SetCastleData "payg_cas04.gat",2,0;
+ set @Defence,GetCastleData("payg_cas04.gat",3);
+ SetCastleData "payg_cas04.gat",3,@Defence-5;
+ if (GetCastleData("payg_cas04.gat",3) < 0) SetCastleData "payg_cas04.gat",3,0;
+ SetCastleData "payg_cas04.gat",1,@GIDf4;
+ Announce "Guild Base [" + GetCastleName("payg_cas04.gat") + "] has been taken by the [" + GetGuildName(@GIDf4) + "] guild.",0;
+ MapAnnounce "payg_cas04.gat","The emperium has been destroyed.",17;
+ GetCastleData "payg_cas04.gat",0,"::OnRecvCastleF04";
+ SetCastleData "payg_cas04.gat",2,0;
+ SetCastleData "payg_cas04.gat",3,0;
+ SetCastleData "payg_cas04.gat",4,0;
+ SetCastleData "payg_cas04.gat",5,0;
+ SetCastleData "payg_cas04.gat",6,0;
+ SetCastleData "payg_cas04.gat",7,0;
+ SetCastleData "payg_cas04.gat",8,0;
+ SetCastleData "payg_cas04.gat",9,0;
+ SetCastleData "payg_cas04.gat",10,0;
+ SetCastleData "payg_cas04.gat",11,0;
+ SetCastleData "payg_cas04.gat",12,0;
+ SetCastleData "payg_cas04.gat",13,0;
+ SetCastleData "payg_cas04.gat",14,0;
+ SetCastleData "payg_cas04.gat",15,0;
+ SetCastleData "payg_cas04.gat",16,0;
+ SetCastleData "payg_cas04.gat",17,0;
+ SetCastleData "payg_cas04.gat",18,0;
+ SetCastleData "payg_cas04.gat",19,0;
+ SetCastleData "payg_cas04.gat",20,0;
+ SetCastleData "payg_cas04.gat",21,0;
+ SetCastleData "payg_cas04.gat",22,0;
+ SetCastleData "payg_cas04.gat",23,0;
+ SetCastleData "payg_cas04.gat",24,0;
+ SetCastleData "payg_cas04.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),6;
+ Monster "payg_cas04.gat",271,29,"EMPERIUM",1288,1,"Agit_C04::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("payg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),4;
+ KillMonster "payg_cas04.gat","Agit_C04::OnAgitBreak";
+ GvgOff "payg_cas04.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_C04_Timer";
+}
+
+payg_cas04.gat,1,1,1 script Agit_C04_Timer -1,{
+OnTimer500:
+ if (GetCastleData("payg_cas04.gat",1) != 0) break;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1277,10;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1208,10;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1262,5;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1102,5;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1115,1;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1129,11;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1282,4;
+ areamonster "payg_cas04.gat",0,0,300,300,"--ja--",1253,5;
+ monster "payg_cas04.gat",270,28,"--ja--",1150,1;
+ monster "payg_cas04.gat",270,28,"--ja--",1115,1;
+ monster "payg_cas04.gat",270,28,"--ja--",1208,6;
+ monster "payg_cas04.gat",270,28,"--ja--",1276,5;
+ monster "payg_cas04.gat",271,29,"EMPERIUM",1288,1,"Agit_C04::OnAgitBreak";
+ stopnpctimer "Agit_C04_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+payg_cas05.gat,30,30,0 script Agit_C05 -1,{
+OnAgitInit:
+ GetCastleData "payg_cas05.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "payg_cas05.gat",0,"::OnRecvCastleF05";
+ Break;
+OnRecvCastleF05:
+ RequestGuildInfo GetCastleData("payg_cas05.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("payg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),2;
+ Monster "payg_cas05.gat",30,30,"EMPERIUM",1288,1,"Agit_C05::OnAgitBreak";
+ GvgOn "payg_cas05.gat";
+ Break;
+OnAgitBreak:
+ set @GIDf5,getcharid(2);
+ if (@GIDf5 <= 0) Break;
+ set @Economy,GetCastleData("payg_cas05.gat",2);
+ SetCastleData "payg_cas05.gat",2,@Economy-5;
+ if (GetCastleData("payg_cas05.gat",2) < 0) SetCastleData "payg_cas05.gat",2,0;
+ set @Defence,GetCastleData("payg_cas05.gat",3);
+ SetCastleData "payg_cas05.gat",3,@Defence-5;
+ if (GetCastleData("payg_cas05.gat",3) < 0) SetCastleData "payg_cas05.gat",3,0;
+ SetCastleData "payg_cas05.gat",1,@GIDf5;
+ Announce "Guild Base [" + GetCastleName("payg_cas05.gat") + "] has been taken by [" + GetGuildName(@GIDf5) + "] guild.",0;
+ MapAnnounce "payg_cas05.gat","The emperium has been destroyed.",17;
+ GetCastleData "payg_cas05.gat",0,"::OnRecvCastleF05";
+ SetCastleData "payg_cas05.gat",2,0;
+ SetCastleData "payg_cas05.gat",3,0;
+ SetCastleData "payg_cas05.gat",4,0;
+ SetCastleData "payg_cas05.gat",5,0;
+ SetCastleData "payg_cas05.gat",6,0;
+ SetCastleData "payg_cas05.gat",7,0;
+ SetCastleData "payg_cas05.gat",8,0;
+ SetCastleData "payg_cas05.gat",9,0;
+ SetCastleData "payg_cas05.gat",10,0;
+ SetCastleData "payg_cas05.gat",11,0;
+ SetCastleData "payg_cas05.gat",12,0;
+ SetCastleData "payg_cas05.gat",13,0;
+ SetCastleData "payg_cas05.gat",14,0;
+ SetCastleData "payg_cas05.gat",15,0;
+ SetCastleData "payg_cas05.gat",16,0;
+ SetCastleData "payg_cas05.gat",17,0;
+ SetCastleData "payg_cas05.gat",18,0;
+ SetCastleData "payg_cas05.gat",19,0;
+ SetCastleData "payg_cas05.gat",20,0;
+ SetCastleData "payg_cas05.gat",21,0;
+ SetCastleData "payg_cas05.gat",22,0;
+ SetCastleData "payg_cas05.gat",23,0;
+ SetCastleData "payg_cas05.gat",24,0;
+ SetCastleData "payg_cas05.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),6;
+ Monster "payg_cas05.gat",30,30,"EMPERIUM",1288,1,"Agit_C05::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("payg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),4;
+ KillMonster "payg_cas05.gat","Agit_C05::OnAgitBreak";
+ GvgOff "payg_cas05.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_C05_Timer";
+}
+
+payg_cas05.gat,1,1,1 script Agit_C05_Timer -1,{
+OnTimer500:
+ if (GetCastleData("payg_cas05.gat",1) != 0) break;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1277,10;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1208,10;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1262,5;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1102,5;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1150,1;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1115,1;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1129,11;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1282,4;
+ areamonster "payg_cas05.gat",0,0,300,300,"--ja--",1253,5;
+ monster "payg_cas05.gat",30,30,"--ja--",1150,1;
+ monster "payg_cas05.gat",30,30,"--ja--",1115,1;
+ monster "payg_cas05.gat",30,30,"--ja--",1208,6;
+ monster "payg_cas05.gat",30,30,"--ja--",1276,5;
+ monster "payg_cas05.gat",30,30,"EMPERIUM",1288,1,"Agit_C05::OnAgitBreak";
+ stopnpctimer "Agit_C05_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/ev_agit_prtg.txt b/npc/guild/old/ev_agit_prtg.txt
new file mode 100644
index 000000000..85de425fd
--- /dev/null
+++ b/npc/guild/old/ev_agit_prtg.txt
@@ -0,0 +1,476 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Prontera Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Prontera Guild Wars
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//= 1.2 by Akaru (Castle spawn/conquering fix)
+//============================================================
+
+
+prtg_cas01.gat,197,197,0 script Agit_D01 -1,{
+OnAgitInit:
+ GetCastleData "prtg_cas01.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "prtg_cas01.gat",0,"::OnRecvCastleP01";
+ Break;
+OnRecvCastleP01:
+ RequestGuildInfo GetCastleData("prtg_cas01.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("prtg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),2;
+ Monster "prtg_cas01.gat",197,197,"EMPERIUM",1288,1,"Agit_D01::OnAgitBreak";
+ GvgOn "prtg_cas01.gat";
+ Break;
+OnAgitBreak:
+ set @GIDp1,getcharid(2);
+ if (@GIDp1 <= 0) Break;
+ set @Economy,GetCastleData("prtg_cas01.gat",2);
+ SetCastleData "prtg_cas01.gat",2,@Economy-5;
+ if (GetCastleData("prtg_cas01.gat",2) < 0) SetCastleData "prtg_cas01.gat",2,0;
+ set @Defence,GetCastleData("prtg_cas01.gat",3);
+ SetCastleData "prtg_cas01.gat",3,@Defence-5;
+ if (GetCastleData("prtg_cas01.gat",3) < 0) SetCastleData "prtg_cas01.gat",3,0;
+ SetCastleData "prtg_cas01.gat",1,@GIDp1;
+ Announce "Guild Base [" + GetCastleName("prtg_cas01.gat") + "] has been taken by the [" + GetGuildName(@GIDp1) + "] guild.",0;
+ MapAnnounce "prtg_cas01.gat","The emperium has been destroyed.",17;
+ GetCastleData "prtg_cas01.gat",0,"::OnRecvCastleP01";
+ SetCastleData "prtg_cas01.gat",2,0;
+ SetCastleData "prtg_cas01.gat",3,0;
+ SetCastleData "prtg_cas01.gat",4,0;
+ SetCastleData "prtg_cas01.gat",5,0;
+ SetCastleData "prtg_cas01.gat",6,0;
+ SetCastleData "prtg_cas01.gat",7,0;
+ SetCastleData "prtg_cas01.gat",8,0;
+ SetCastleData "prtg_cas01.gat",9,0;
+ SetCastleData "prtg_cas01.gat",10,0;
+ SetCastleData "prtg_cas01.gat",11,0;
+ SetCastleData "prtg_cas01.gat",12,0;
+ SetCastleData "prtg_cas01.gat",13,0;
+ SetCastleData "prtg_cas01.gat",14,0;
+ SetCastleData "prtg_cas01.gat",15,0;
+ SetCastleData "prtg_cas01.gat",16,0;
+ SetCastleData "prtg_cas01.gat",17,0;
+ SetCastleData "prtg_cas01.gat",18,0;
+ SetCastleData "prtg_cas01.gat",19,0;
+ SetCastleData "prtg_cas01.gat",20,0;
+ SetCastleData "prtg_cas01.gat",21,0;
+ SetCastleData "prtg_cas01.gat",22,0;
+ SetCastleData "prtg_cas01.gat",23,0;
+ SetCastleData "prtg_cas01.gat",24,0;
+ SetCastleData "prtg_cas01.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),6;
+ Monster "prtg_cas01.gat",197,197,"EMPERIUM",1288,1,"Agit_D01::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("prtg_cas01.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),4;
+ KillMonster "prtg_cas01.gat","Agit_D01::OnAgitBreak";
+ GvgOff "prtg_cas01.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_D01_Timer";
+}
+
+prtg_cas01.gat,1,1,1 script Agit_D01_Timer -1,{
+OnTimer500:
+ if (GetCastleData("prtg_cas01.gat",1) != 0) break;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1163,15;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1132,10;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1219,5;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1268,5;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1251,1;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1252,1;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1259,1;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1283,1;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "prtg_cas01.gat",0,0,300,300,"--ja--",1200,1;
+ monster "prtg_cas01.gat",197,197,"--ja--",1268,1;
+ monster "prtg_cas01.gat",197,197,"--ja--",1251,1;
+ monster "prtg_cas01.gat",197,197,"--ja--",1252,1;
+ monster "prtg_cas01.gat",197,197,"--ja--",1219,2;
+ monster "prtg_cas01.gat",197,197,"--ja--",1276,5;
+ Monster "prtg_cas01.gat",197,197,"EMPERIUM",1288,1,"Agit_D01::OnAgitBreak";
+ stopnpctimer "Agit_D01_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+prtg_cas02.gat,158,174,0 script Agit_D02 -1,{
+OnAgitInit:
+ GetCastleData "prtg_cas02.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "prtg_cas02.gat",0,"::OnRecvCastleP02";
+ Break;
+OnRecvCastleP02:
+ RequestGuildInfo GetCastleData("prtg_cas02.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("prtg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),2;
+ Monster "prtg_cas02.gat",158,174,"EMPERIUM",1288,1,"Agit_D02::OnAgitBreak";
+ GvgOn "prtg_cas02.gat";
+ Break;
+OnAgitBreak:
+ set @GIDp2,getcharid(2);
+ if (@GIDp2 <= 0) Break;
+ set @Economy,GetCastleData("prtg_cas02.gat",2);
+ SetCastleData "prtg_cas02.gat",2,@Economy-5;
+ if (GetCastleData("prtg_cas02.gat",2) < 0) SetCastleData "prtg_cas02.gat",2,0;
+ set @Defence,GetCastleData("prtg_cas02.gat",3);
+ SetCastleData "prtg_cas02.gat",3,@Defence-5;
+ if (GetCastleData("prtg_cas02.gat",3) < 0) SetCastleData "prtg_cas02.gat",3,0;
+ SetCastleData "prtg_cas02.gat",1,@GIDp2;
+ Announce "Guild Base [" + GetCastleName("prtg_cas02.gat") + "] has been taken by the [" + GetGuildName(@GIDp2) + "] guild.",0;
+ MapAnnounce "prtg_cas02.gat","The emperium has been destroyed.",17;
+ GetCastleData "prtg_cas02.gat",0,"::OnRecvCastleP02";
+ SetCastleData "prtg_cas02.gat",2,0;
+ SetCastleData "prtg_cas02.gat",3,0;
+ SetCastleData "prtg_cas02.gat",4,0;
+ SetCastleData "prtg_cas02.gat",5,0;
+ SetCastleData "prtg_cas02.gat",6,0;
+ SetCastleData "prtg_cas02.gat",7,0;
+ SetCastleData "prtg_cas02.gat",8,0;
+ SetCastleData "prtg_cas02.gat",9,0;
+ SetCastleData "prtg_cas02.gat",10,0;
+ SetCastleData "prtg_cas02.gat",11,0;
+ SetCastleData "prtg_cas02.gat",12,0;
+ SetCastleData "prtg_cas02.gat",13,0;
+ SetCastleData "prtg_cas02.gat",14,0;
+ SetCastleData "prtg_cas02.gat",15,0;
+ SetCastleData "prtg_cas02.gat",16,0;
+ SetCastleData "prtg_cas02.gat",17,0;
+ SetCastleData "prtg_cas02.gat",18,0;
+ SetCastleData "prtg_cas02.gat",19,0;
+ SetCastleData "prtg_cas02.gat",20,0;
+ SetCastleData "prtg_cas02.gat",21,0;
+ SetCastleData "prtg_cas02.gat",22,0;
+ SetCastleData "prtg_cas02.gat",23,0;
+ SetCastleData "prtg_cas02.gat",24,0;
+ SetCastleData "prtg_cas02.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),6;
+ Monster "prtg_cas02.gat",158,174,"EMPERIUM",1288,1,"Agit_D02::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("prtg_cas02.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),4;
+ KillMonster "prtg_cas02.gat","Agit_D02::OnAgitBreak";
+ GvgOff "prtg_cas02.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_D02_Timer";
+}
+
+prtg_cas02.gat,1,1,1 script Agit_D02_Timer -1,{
+OnTimer500:
+ if (GetCastleData("prtg_cas02.gat",1) != 0) break;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1163,15;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1132,10;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1219,5;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1268,5;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1251,1;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1252,1;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1259,1;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1283,1;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "prtg_cas02.gat",0,0,300,300,"--ja--",1200,1;
+ monster "prtg_cas02.gat",157,174,"--ja--",1268,1;
+ monster "prtg_cas02.gat",157,174,"--ja--",1251,1;
+ monster "prtg_cas02.gat",157,174,"--ja--",1252,1;
+ monster "prtg_cas02.gat",157,174,"--ja--",1219,2;
+ monster "prtg_cas02.gat",157,174,"--ja--",1276,5;
+ Monster "prtg_cas02.gat",158,174,"EMPERIUM",1288,1,"Agit_D02::OnAgitBreak";
+ stopnpctimer "Agit_D02_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+prtg_cas03.gat,17,221,0 script Agit_D03 -1,{
+OnAgitInit:
+ GetCastleData "prtg_cas03.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "prtg_cas03.gat",0,"::OnRecvCastleP03";
+ Break;
+OnRecvCastleP03:
+ RequestGuildInfo GetCastleData("prtg_cas03.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("prtg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),2;
+ Monster "prtg_cas03.gat",17,221,"EMPERIUM",1288,1,"Agit_D03::OnAgitBreak";
+ GvgOn "prtg_cas03.gat";
+ Break;
+OnAgitBreak:
+ set @GIDp3,getcharid(2);
+ if (@GIDp3 <= 0) Break;
+ set @Economy,GetCastleData("prtg_cas03.gat",2);
+ SetCastleData "prtg_cas03.gat",2,@Economy-5;
+ if (GetCastleData("prtg_cas03.gat",2) < 0) SetCastleData "prtg_cas03.gat",2,0;
+ set @Defence,GetCastleData("prtg_cas03.gat",3);
+ SetCastleData "prtg_cas03.gat",3,@Defence-5;
+ if (GetCastleData("prtg_cas01.gat",3) < 0) SetCastleData "prtg_cas03.gat",3,0;
+ SetCastleData "prtg_cas03.gat",1,@GIDp3;
+ Announce "Guild Base [" + GetCastleName("prtg_cas03.gat") + "] has been taken by the [" + GetGuildName(@GIDp3) + "] guild.",0;
+ MapAnnounce "prtg_cas03.gat","The emperium has been destroyed.",17;
+ GetCastleData "prtg_cas03.gat",0,"::OnRecvCastleP03";
+ SetCastleData "prtg_cas03.gat",2,0;
+ SetCastleData "prtg_cas03.gat",3,0;
+ SetCastleData "prtg_cas03.gat",4,0;
+ SetCastleData "prtg_cas03.gat",5,0;
+ SetCastleData "prtg_cas03.gat",6,0;
+ SetCastleData "prtg_cas03.gat",7,0;
+ SetCastleData "prtg_cas03.gat",8,0;
+ SetCastleData "prtg_cas03.gat",9,0;
+ SetCastleData "prtg_cas03.gat",10,0;
+ SetCastleData "prtg_cas03.gat",11,0;
+ SetCastleData "prtg_cas03.gat",12,0;
+ SetCastleData "prtg_cas03.gat",13,0;
+ SetCastleData "prtg_cas03.gat",14,0;
+ SetCastleData "prtg_cas03.gat",15,0;
+ SetCastleData "prtg_cas03.gat",16,0;
+ SetCastleData "prtg_cas03.gat",17,0;
+ SetCastleData "prtg_cas03.gat",18,0;
+ SetCastleData "prtg_cas03.gat",19,0;
+ SetCastleData "prtg_cas03.gat",20,0;
+ SetCastleData "prtg_cas03.gat",21,0;
+ SetCastleData "prtg_cas03.gat",22,0;
+ SetCastleData "prtg_cas03.gat",23,0;
+ SetCastleData "prtg_cas03.gat",24,0;
+ SetCastleData "prtg_cas03.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),6;
+ Monster "prtg_cas03.gat",17,221,"EMPERIUM",1288,1,"Agit_D03::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("prtg_cas03.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),4;
+ KillMonster "prtg_cas03.gat","Agit_D03::OnAgitBreak";
+ GvgOff "prtg_cas03.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_D03_Timer";
+}
+
+prtg_cas03.gat,1,1,1 script Agit_D03_Timer -1,{
+OnTimer500:
+ if (GetCastleData("prtg_cas03.gat",1) != 0) break;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1163,15;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1132,10;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1219,5;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1268,5;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1251,1;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1252,1;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1259,1;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1283,1;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "prtg_cas03.gat",0,0,300,300,"--ja--",1200,1;
+ monster "prtg_cas03.gat",16,220,"--ja--",1268,1;
+ monster "prtg_cas03.gat",16,220,"--ja--",1251,1;
+ monster "prtg_cas03.gat",16,220,"--ja--",1252,1;
+ monster "prtg_cas03.gat",16,220,"--ja--",1219,2;
+ monster "prtg_cas03.gat",16,220,"--ja--",1276,5;
+ Monster "prtg_cas03.gat",17,221,"EMPERIUM",1288,1,"Agit_D03::OnAgitBreak";
+ stopnpctimer "Agit_D03_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+prtg_cas04.gat,292,14,0 script Agit_D04 -1,{
+OnAgitInit:
+ GetCastleData "prtg_cas04.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "prtg_cas04.gat",0,"::OnRecvCastleP04";
+ Break;
+OnRecvCastleP04:
+ RequestGuildInfo GetCastleData("prtg_cas04.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("prtg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),2;
+ Monster "prtg_cas04.gat",292,14,"EMPERIUM",1288,1,"Agit_D04::OnAgitBreak";
+ GvgOn "prtg_cas04.gat";
+ Break;
+OnAgitBreak:
+ set @GIDp4,getcharid(2);
+ if (@GIDp4 <= 0) Break;
+ set @Economy,GetCastleData("prtg_cas04.gat",2);
+ SetCastleData "prtg_cas04.gat",2,@Economy-5;
+ if (GetCastleData("prtg_cas04.gat",2) < 0) SetCastleData "prtg_cas04.gat",2,0;
+ set @Defence,GetCastleData("prtg_cas04.gat",3);
+ SetCastleData "prtg_cas04.gat",3,@Defence-5;
+ if (GetCastleData("prtg_cas04.gat",3) < 0) SetCastleData "prtg_cas04.gat",3,0;
+ SetCastleData "prtg_cas04.gat",1,@GIDp4;
+ Announce "Guild Base [" + GetCastleName("prtg_cas04.gat") + "] has been taken by the [" + GetGuildName(@GIDp4) + "] guild.",0;
+ MapAnnounce "prtg_cas04.gat","The emperium has been destroyed.",17;
+ GetCastleData "prtg_cas04.gat",0,"::OnRecvCastleP04";
+ SetCastleData "prtg_cas04.gat",2,0;
+ SetCastleData "prtg_cas04.gat",3,0;
+ SetCastleData "prtg_cas04.gat",4,0;
+ SetCastleData "prtg_cas04.gat",5,0;
+ SetCastleData "prtg_cas04.gat",6,0;
+ SetCastleData "prtg_cas04.gat",7,0;
+ SetCastleData "prtg_cas04.gat",8,0;
+ SetCastleData "prtg_cas04.gat",9,0;
+ SetCastleData "prtg_cas04.gat",10,0;
+ SetCastleData "prtg_cas04.gat",11,0;
+ SetCastleData "prtg_cas04.gat",12,0;
+ SetCastleData "prtg_cas04.gat",13,0;
+ SetCastleData "prtg_cas04.gat",14,0;
+ SetCastleData "prtg_cas04.gat",15,0;
+ SetCastleData "prtg_cas04.gat",16,0;
+ SetCastleData "prtg_cas04.gat",17,0;
+ SetCastleData "prtg_cas04.gat",18,0;
+ SetCastleData "prtg_cas04.gat",19,0;
+ SetCastleData "prtg_cas04.gat",20,0;
+ SetCastleData "prtg_cas04.gat",21,0;
+ SetCastleData "prtg_cas04.gat",22,0;
+ SetCastleData "prtg_cas04.gat",23,0;
+ SetCastleData "prtg_cas04.gat",24,0;
+ SetCastleData "prtg_cas04.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),6;
+ Monster "prtg_cas04.gat",292,14,"EMPERIUM",1288,1,"Agit_D04::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("prtg_cas04.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),4;
+ KillMonster "prtg_cas04.gat","Agit_D04::OnAgitBreak";
+ GvgOff "prtg_cas04.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_D04_Timer";
+}
+
+prtg_cas04.gat,1,1,1 script Agit_D04_Timer -1,{
+OnTimer500:
+ if (GetCastleData("prtg_cas04.gat",1) != 0) break;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1163,15;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1132,10;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1219,5;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1268,5;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1251,1;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1252,1;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1259,1;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1283,1;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "prtg_cas04.gat",0,0,300,300,"--ja--",1200,1;
+ monster "prtg_cas04.gat",291,14,"--ja--",1268,1;
+ monster "prtg_cas04.gat",291,14,"--ja--",1251,1;
+ monster "prtg_cas04.gat",291,14,"--ja--",1252,1;
+ monster "prtg_cas04.gat",291,14,"--ja--",1219,2;
+ monster "prtg_cas04.gat",291,14,"--ja--",1276,5;
+ Monster "prtg_cas04.gat",292,14,"EMPERIUM",1288,1,"Agit_D04::OnAgitBreak";
+ stopnpctimer "Agit_D04_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
+prtg_cas05.gat,266,266,0 script Agit_D05 -1,{
+OnAgitInit:
+ GetCastleData "prtg_cas05.gat",0;
+ Break;
+OnInterIfInit:
+ GetCastleData "prtg_cas05.gat",0,"::OnRecvCastleP05";
+ Break;
+OnRecvCastleP05:
+ RequestGuildInfo GetCastleData("prtg_cas05.gat",1);
+ Break;
+OnAgitStart:
+ if (GetCastleData("prtg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),2;
+ Monster "prtg_cas05.gat",266,266,"EMPERIUM",1288,1,"Agit_D05::OnAgitBreak";
+ GvgOn "prtg_cas05.gat";
+ Break;
+OnAgitBreak:
+ set @GIDp5,getcharid(2);
+ if (@GIDp5 <= 0) Break;
+ set @Economy,GetCastleData("prtg_cas05.gat",2);
+ SetCastleData "prtg_cas05.gat",2,@Economy-5;
+ if (GetCastleData("prtg_cas05.gat",2) < 0) SetCastleData "prtg_cas05.gat",2,0;
+ set @Defence,GetCastleData("prtg_cas05.gat",3);
+ SetCastleData "prtg_cas05.gat",3,@Defence-5;
+ if (GetCastleData("prtg_cas05.gat",3) < 0) SetCastleData "prtg_cas05.gat",3,0;
+ SetCastleData "prtg_cas05.gat",1,@GIDp5;
+ Announce "Guild Base [" + GetCastleName("prtg_cas05.gat") + "] has been taken by [" + GetGuildName(@GIDp5) + "] guild.",0;
+ MapAnnounce "prtg_cas05.gat","The emperium has been destroyed.",17;
+ GetCastleData "prtg_cas05.gat",0,"::OnRecvCastleP05";
+ SetCastleData "prtg_cas05.gat",2,0;
+ SetCastleData "prtg_cas05.gat",3,0;
+ SetCastleData "prtg_cas05.gat",4,0;
+ SetCastleData "prtg_cas05.gat",5,0;
+ SetCastleData "prtg_cas05.gat",6,0;
+ SetCastleData "prtg_cas05.gat",7,0;
+ SetCastleData "prtg_cas05.gat",8,0;
+ SetCastleData "prtg_cas05.gat",9,0;
+ SetCastleData "prtg_cas05.gat",10,0;
+ SetCastleData "prtg_cas05.gat",11,0;
+ SetCastleData "prtg_cas05.gat",12,0;
+ SetCastleData "prtg_cas05.gat",13,0;
+ SetCastleData "prtg_cas05.gat",14,0;
+ SetCastleData "prtg_cas05.gat",15,0;
+ SetCastleData "prtg_cas05.gat",16,0;
+ SetCastleData "prtg_cas05.gat",17,0;
+ SetCastleData "prtg_cas05.gat",18,0;
+ SetCastleData "prtg_cas05.gat",19,0;
+ SetCastleData "prtg_cas05.gat",20,0;
+ SetCastleData "prtg_cas05.gat",21,0;
+ SetCastleData "prtg_cas05.gat",22,0;
+ SetCastleData "prtg_cas05.gat",23,0;
+ SetCastleData "prtg_cas05.gat",24,0;
+ SetCastleData "prtg_cas05.gat",25,0;
+ Break;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),6;
+ Monster "prtg_cas05.gat",266,266,"EMPERIUM",1288,1,"Agit_D05::OnAgitBreak";
+ Break;
+OnAgitEnd:
+ if (GetCastleData("prtg_cas05.gat",1) == 0) break;
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),4;
+ KillMonster "prtg_cas05.gat","Agit_D05::OnAgitBreak";
+ GvgOff "prtg_cas05.gat";
+ Break;
+OnInit:
+initnpctimer "Agit_D05_Timer";
+}
+
+prtg_cas05.gat,1,1,1 script Agit_D05_Timer -1,{
+OnTimer500:
+ if (GetCastleData("prtg_cas05.gat",1) != 0) break;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1163,15;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1132,10;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1219,5;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1268,5;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1251,1;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1252,1;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1276,5;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1259,1;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1283,1;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1275,1;
+ areamonster "prtg_cas05.gat",0,0,300,300,"--ja--",1200,1;
+ monster "prtg_cas05.gat",266,266,"--ja--",1268,1;
+ monster "prtg_cas05.gat",266,266,"--ja--",1251,1;
+ monster "prtg_cas05.gat",266,266,"--ja--",1252,1;
+ monster "prtg_cas05.gat",266,266,"--ja--",1219,2;
+ monster "prtg_cas05.gat",266,266,"--ja--",1276,5;
+ Monster "prtg_cas05.gat",266,266,"EMPERIUM",1288,1,"Agit_D05::OnAgitBreak";
+ stopnpctimer "Agit_D05_Timer";
+ Break;
+}
+//--------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/gefg_cas01.txt b/npc/guild/old/gefg_cas01.txt
new file mode 100644
index 000000000..ccfdc658e
--- /dev/null
+++ b/npc/guild/old/gefg_cas01.txt
@@ -0,0 +1,667 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas01 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in gefg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+gefg_cas01.gat,28,157,4 script Reprion#g1-6::ReprionNW 722,{
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (@GIDg1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ break;
+}
+
+gefg_cas01.gat,28,157,4 duplicate(ReprionNW) Reprion#g1-7 722
+gefg_cas01.gat,22,156,5 duplicate(ReprionNW) Reprion#g1-8 722
+gefg_cas01.gat,68,185,3 duplicate(ReprionNW) Reprion#g1-9 722
+gefg_cas01.gat,17,171,5 duplicate(ReprionNW) Reprion#g1-10 722
+gefg_cas01.gat,59,16,4 duplicate(ReprionNW) Reprion#g1-11 722
+gefg_cas01.gat,64,16,4 duplicate(ReprionNW) Reprion#g1-12 722
+
+//================================================
+// Kafra Service
+//================================================
+gefg_cas01.gat,96,173,0 script Kafra Service#gef1 117,{
+ cutin "kafra_01",2;
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (getcharid(2) == @GIDg1) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg1) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDg1) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "geffen.gat",120,39;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("gefg_cas01.gat",9) == 1) break;
+ disablenpc "Kafra Service#gef1";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+gefg_cas01.gat,78,84,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (getcharid(2) != @GIDg1) goto L1n;
+ warp "gld_dun04.gat",39,258;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+gefg_cas01.gat,40,48,5 script Gnaucher 55,{
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (@GIDg1 == 0) goto LStart;
+ if (getcharid(2) != @GIDg1) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDg1)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Gnaucher ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDg1) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg1) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Gnaucher ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Gnaucher ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDg1) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Gnaucher ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDg1) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Gnaucher ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("gefg_cas01.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("gefg_cas01.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("gefg_cas01.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("gefg_cas01.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("gefg_cas01.gat",4);
+ set @Economy,GetCastleData("gefg_cas01.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Gnaucher ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Gnaucher ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Gnaucher ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas01.gat",2,@Economy+1;
+ mes "[ Gnaucher ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Gnaucher ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Gnaucher ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas01.gat",2,@Economy+1;
+ mes "[ Gnaucher ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Gnaucher ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Gnaucher ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("gefg_cas01.gat",5);
+ set @Defence,GetCastleData("gefg_cas01.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Gnaucher ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Gnaucher ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Gnaucher ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas01.gat",3,@Defence+1;
+ mes "[ Gnaucher ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Gnaucher ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Gnaucher ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas01.gat",3,@Defence+1;
+ mes "[ Gnaucher ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Gnaucher ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Gnaucher ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("gefg_cas01.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Gnaucher ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("gefg_cas01.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("gefg_cas01.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("gefg_cas01.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("gefg_cas01.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("gefg_cas01.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("gefg_cas01.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("gefg_cas01.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("gefg_cas01.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Gnaucher ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Gnaucher ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "gefg_cas01.gat",@GDnum,1;
+ SetCastleData "gefg_cas01.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",7;
+ mes "[ Gnaucher ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Gnaucher ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Gnaucher ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Gnaucher ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("gefg_cas01.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Gnaucher ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Gnaucher ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Gnaucher ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#gef1";
+ SetCastleData "gefg_cas01.gat",9,1;
+ mes "[ Gnaucher ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Gnaucher ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Gnaucher ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Gnaucher ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#gef1";
+ SetCastleData "gefg_cas01.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Gnaucher ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Gnaucher ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Gnaucher ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Gnaucher ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "gefg_cas01",155,112;
+ L6_1:
+ mes "[ Gnaucher ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Gnaucher ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Gnaucher ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Gnaucher ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "gefg_cas01.gat",1,0;
+ SetCastleData "gefg_cas01.gat",2,0;
+ SetCastleData "gefg_cas01.gat",3,0;
+ SetCastleData "gefg_cas01.gat",4,0;
+ SetCastleData "gefg_cas01.gat",5,0;
+ SetCastleData "gefg_cas01.gat",6,0;
+ SetCastleData "gefg_cas01.gat",7,0;
+ SetCastleData "gefg_cas01.gat",8,0;
+ SetCastleData "gefg_cas01.gat",9,0;
+ SetCastleData "gefg_cas01.gat",10,0;
+ SetCastleData "gefg_cas01.gat",11,0;
+ SetCastleData "gefg_cas01.gat",12,0;
+ SetCastleData "gefg_cas01.gat",13,0;
+ SetCastleData "gefg_cas01.gat",14,0;
+ SetCastleData "gefg_cas01.gat",15,0;
+ SetCastleData "gefg_cas01.gat",16,0;
+ SetCastleData "gefg_cas01.gat",17,0;
+ SetCastleData "gefg_cas01.gat",18,0;
+ SetCastleData "gefg_cas01.gat",19,0;
+ SetCastleData "gefg_cas01.gat",20,0;
+ SetCastleData "gefg_cas01.gat",21,0;
+ SetCastleData "gefg_cas01.gat",22,0;
+ SetCastleData "gefg_cas01.gat",23,0;
+ SetCastleData "gefg_cas01.gat",24,0;
+ SetCastleData "gefg_cas01.gat",25,0;
+ Announce "[" + GetGuildName(@GIDg1) + "] has surrendered Agit [" + GetCastleName("gefg_cas01.gat") + "]",0;
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Gnaucher ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/gefg_cas02.txt b/npc/guild/old/gefg_cas02.txt
new file mode 100644
index 000000000..d03415a49
--- /dev/null
+++ b/npc/guild/old/gefg_cas02.txt
@@ -0,0 +1,667 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas02 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in gefg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+gefg_cas02.gat,65,130,5 script Yolbriger#g2-6::YolbrigerNW 722,{
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (@GIDg2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ break;
+}
+
+gefg_cas02.gat,30,123,5 duplicate(YolbrigerNW) Yolbriger#g2-7 722
+gefg_cas02.gat,65,139,6 duplicate(YolbrigerNW) Yolbriger#g2-8 722
+gefg_cas02.gat,37,177,6 duplicate(YolbrigerNW) Yolbriger#g2-9 722
+gefg_cas02.gat,37,168,6 duplicate(YolbrigerNW) Yolbriger#g2-10 722
+gefg_cas02.gat,68,47,2 duplicate(YolbrigerNW) Yolbriger#g2-11 722
+gefg_cas02.gat,68,36,2 duplicate(YolbrigerNW) Yolbriger#g2-12 722
+
+//================================================
+// Kafra Service
+//================================================
+gefg_cas02.gat,23,66,3 script Kafra Service#gef2 117,{
+ cutin "kafra_01",2;
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (getcharid(2) == @GIDg2) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg2) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDg2) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "geffen.gat",120,39;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("gefg_cas02.gat",9) == 1) break;
+ disablenpc "Kafra Service#gef2";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+gefg_cas02.gat,145,115,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (getcharid(2) != @GIDg2) goto L1n;
+ warp "gld_dun04.gat",125,270;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+gefg_cas02.gat,12,66,5 script Esmark 55,{
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (@GIDg2 == 0) goto LStart;
+ if (getcharid(2) != @GIDg2) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDg2)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Esmark ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDg2) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg2) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Esmark ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Esmark ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDg2) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Esmark ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDg2) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Esmark ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("gefg_cas02.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("gefg_cas02.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("gefg_cas02.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("gefg_cas02.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("gefg_cas02.gat",4);
+ set @Economy,GetCastleData("gefg_cas02.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Esmark ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Esmark ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Esmark ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas02.gat",2,@Economy+1;
+ mes "[ Esmark ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Esmark ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Esmark ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas02.gat",2,@Economy+1;
+ mes "[ Esmark ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Esmark ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Esmark ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("gefg_cas02.gat",5);
+ set @Defence,GetCastleData("gefg_cas02.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Esmark ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Esmark ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Esmark ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas02.gat",3,@Defence+1;
+ mes "[ Esmark ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Esmark ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Esmark ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas02.gat",3,@Defence+1;
+ mes "[ Esmark ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Esmark ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Esmark ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("gefg_cas02.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Esmark ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("gefg_cas02.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("gefg_cas02.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("gefg_cas02.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("gefg_cas02.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("gefg_cas02.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("gefg_cas02.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("gefg_cas02.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("gefg_cas02.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Esmark ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Esmark ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "gefg_cas02.gat",@GDnum,1;
+ SetCastleData "gefg_cas02.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",7;
+ mes "[ Esmark ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Esmark ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Esmark ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Esmark ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("gefg_cas02.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Esmark ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Esmark ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Esmark ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#gef2";
+ SetCastleData "gefg_cas02.gat",9,1;
+ mes "[ Esmark ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Esmark ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Esmark ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Esmark ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#gef2";
+ SetCastleData "gefg_cas02.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Esmark ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Esmark ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Esmark ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Esmark ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "gefg_cas02",141,115;
+ L6_1:
+ mes "[ Esmark ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Esmark ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Esmark ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Esmark ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "gefg_cas02.gat",1,0;
+ SetCastleData "gefg_cas02.gat",2,0;
+ SetCastleData "gefg_cas02.gat",3,0;
+ SetCastleData "gefg_cas02.gat",4,0;
+ SetCastleData "gefg_cas02.gat",5,0;
+ SetCastleData "gefg_cas02.gat",6,0;
+ SetCastleData "gefg_cas02.gat",7,0;
+ SetCastleData "gefg_cas02.gat",8,0;
+ SetCastleData "gefg_cas02.gat",9,0;
+ SetCastleData "gefg_cas02.gat",10,0;
+ SetCastleData "gefg_cas02.gat",11,0;
+ SetCastleData "gefg_cas02.gat",12,0;
+ SetCastleData "gefg_cas02.gat",13,0;
+ SetCastleData "gefg_cas02.gat",14,0;
+ SetCastleData "gefg_cas02.gat",15,0;
+ SetCastleData "gefg_cas02.gat",16,0;
+ SetCastleData "gefg_cas02.gat",17,0;
+ SetCastleData "gefg_cas02.gat",18,0;
+ SetCastleData "gefg_cas02.gat",19,0;
+ SetCastleData "gefg_cas02.gat",20,0;
+ SetCastleData "gefg_cas02.gat",21,0;
+ SetCastleData "gefg_cas02.gat",22,0;
+ SetCastleData "gefg_cas02.gat",23,0;
+ SetCastleData "gefg_cas02.gat",24,0;
+ SetCastleData "gefg_cas02.gat",25,0;
+ Announce "[" + GetGuildName(@GIDg2) + "] has surrendered Agit [" + GetCastleName("gefg_cas02.gat") + "]",0;
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Esmark ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/gefg_cas03.txt b/npc/guild/old/gefg_cas03.txt
new file mode 100644
index 000000000..4c8e46b47
--- /dev/null
+++ b/npc/guild/old/gefg_cas03.txt
@@ -0,0 +1,668 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas03 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in gefg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+gefg_cas03.gat,122,220,6 script Isinlife#g3-8::IsinlifeNW 722,{
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (@GIDg3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ break;
+}
+
+gefg_cas03.gat,122,229,6 duplicate(IsinlifeNW) Isinlife#g3-8 722
+gefg_cas03.gat,91,257,7 duplicate(IsinlifeNW) Isinlife#g3-9 722
+gefg_cas03.gat,52,276,7 duplicate(IsinlifeNW) Isinlife#g3-10 722
+gefg_cas03.gat,56,164,4 duplicate(IsinlifeNW) Isinlife#g3-11 722
+gefg_cas03.gat,65,164,4 duplicate(IsinlifeNW) Isinlife#g3-12 722
+gefg_cas03.gat,37,214,1 duplicate(IsinlifeNW) Isinlife#g3-13 722
+gefg_cas03.gat,34,208,1 duplicate(IsinlifeNW) Isinlife#g3-14 722
+
+//================================================
+// Kafra Service
+//================================================
+gefg_cas03.gat,116,89,5 script Kafra Service#gef3 117,{
+ cutin "kafra_01",2;
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (getcharid(2) == @GIDg3) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg3) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDg3) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "geffen.gat",120,39;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("gefg_cas03.gat",9) == 1) break;
+ disablenpc "Kafra Service#gef3";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+gefg_cas03.gat,221,43,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (getcharid(2) != @GIDg3) goto L1n;
+ warp "gld_dun04.gat",268,251;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+gefg_cas03.gat,106,23,5 script Jyang 55,{
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (@GIDg3 == 0) goto LStart;
+ if (getcharid(2) != @GIDg3) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDg3)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Jyang ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDg3) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg3) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Jyang ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Jyang ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDg3) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Jyang ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDg3) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Jyang ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("gefg_cas03.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("gefg_cas03.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("gefg_cas03.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("gefg_cas03.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("gefg_cas03.gat",4);
+ set @Economy,GetCastleData("gefg_cas03.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Jyang ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Jyang ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Jyang ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas03.gat",2,@Economy+1;
+ mes "[ Jyang ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Jyang ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Jyang ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas03.gat",2,@Economy+1;
+ mes "[ Jyang ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Jyang ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Jyang ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("gefg_cas03.gat",5);
+ set @Defence,GetCastleData("gefg_cas03.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Jyang ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Jyang ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Jyang ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas03.gat",3,@Defence+1;
+ mes "[ Jyang ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Jyang ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Jyang ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas03.gat",3,@Defence+1;
+ mes "[ Jyang ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Jyang ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Jyang ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("gefg_cas03.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Jyang ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("gefg_cas03.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("gefg_cas03.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("gefg_cas03.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("gefg_cas03.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("gefg_cas03.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("gefg_cas03.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("gefg_cas03.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("gefg_cas03.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Jyang ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Jyang ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "gefg_cas03.gat",@GDnum,1;
+ SetCastleData "gefg_cas03.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",7;
+ mes "[ Jyang ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Jyang ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Jyang ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Jyang ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("gefg_cas03.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Jyang ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Jyang ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Jyang ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#gef3";
+ SetCastleData "gefg_cas03.gat",9,1;
+ mes "[ Jyang ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Jyang ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Jyang ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Jyang ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#gef3";
+ SetCastleData "gefg_cas03.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Jyang ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Jyang ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Jyang ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Jyang ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "gefg_cas03",270,290;
+ L6_1:
+ mes "[ Jyang ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Jyang ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Jyang ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Jyang ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "gefg_cas03.gat",1,0;
+ SetCastleData "gefg_cas03.gat",2,0;
+ SetCastleData "gefg_cas03.gat",3,0;
+ SetCastleData "gefg_cas03.gat",4,0;
+ SetCastleData "gefg_cas03.gat",5,0;
+ SetCastleData "gefg_cas03.gat",6,0;
+ SetCastleData "gefg_cas03.gat",7,0;
+ SetCastleData "gefg_cas03.gat",8,0;
+ SetCastleData "gefg_cas03.gat",9,0;
+ SetCastleData "gefg_cas03.gat",10,0;
+ SetCastleData "gefg_cas03.gat",11,0;
+ SetCastleData "gefg_cas03.gat",12,0;
+ SetCastleData "gefg_cas03.gat",13,0;
+ SetCastleData "gefg_cas03.gat",14,0;
+ SetCastleData "gefg_cas03.gat",15,0;
+ SetCastleData "gefg_cas03.gat",16,0;
+ SetCastleData "gefg_cas03.gat",17,0;
+ SetCastleData "gefg_cas03.gat",18,0;
+ SetCastleData "gefg_cas03.gat",19,0;
+ SetCastleData "gefg_cas03.gat",20,0;
+ SetCastleData "gefg_cas03.gat",21,0;
+ SetCastleData "gefg_cas03.gat",22,0;
+ SetCastleData "gefg_cas03.gat",23,0;
+ SetCastleData "gefg_cas03.gat",24,0;
+ SetCastleData "gefg_cas03.gat",25,0;
+ Announce "[" + GetGuildName(@GIDg3) + "] has surrendered Agit [" + GetCastleName("gefg_cas03.gat") + "]",0;
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Jyang ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/gefg_cas04.txt b/npc/guild/old/gefg_cas04.txt
new file mode 100644
index 000000000..88b8649e3
--- /dev/null
+++ b/npc/guild/old/gefg_cas04.txt
@@ -0,0 +1,668 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas04 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in gefg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+gefg_cas04.gat,24,157,4 script Berigel#g4-4::BerigelNW 722,{
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (@GIDg4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ break;
+}
+
+gefg_cas04.gat,35,158,4 duplicate(BerigelNW) Berigel#g4-5 722
+gefg_cas04.gat,44,184,4 duplicate(BerigelNW) Berigel#g4-6 722
+gefg_cas04.gat,51,184,4 duplicate(BerigelNW) Berigel#g4-7 722
+gefg_cas04.gat,39,212,7 duplicate(BerigelNW) Berigel#g4-8 722
+gefg_cas04.gat,29,212,1 duplicate(BerigelNW) Berigel#g4-9 722
+gefg_cas04.gat,24,73,1 duplicate(BerigelNW) Berigel#g4-10 722
+gefg_cas04.gat,35,73,4 duplicate(BerigelNW) Berigel#g4-11 722
+
+//================================================
+// Kafra Service
+//================================================
+gefg_cas04.gat,59,70,3 script Kafra Service#gef4 117,{
+ cutin "kafra_01",2;
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (getcharid(2) == @GIDg4) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg4) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDg4) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "geffen.gat",120,39;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("gefg_cas04.gat",9) == 1) break;
+ disablenpc "Kafra Service#gef4";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+gefg_cas04.gat,58,75,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (getcharid(2) != @GIDg4) goto L1n;
+ warp "gld_dun04.gat",268,108;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+gefg_cas04.gat,73,46,5 script Kelbany 55,{
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (@GIDg4 == 0) goto LStart;
+ if (getcharid(2) != @GIDg4) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDg4)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Kelbany ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDg4) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg4) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Kelbany ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Kelbany ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDg4) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Kelbany ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDg4) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Kelbany ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("gefg_cas04.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("gefg_cas04.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("gefg_cas04.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("gefg_cas04.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("gefg_cas04.gat",4);
+ set @Economy,GetCastleData("gefg_cas04.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Kelbany ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Kelbany ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Kelbany ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas04.gat",2,@Economy+1;
+ mes "[ Kelbany ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Kelbany ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Kelbany ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas04.gat",2,@Economy+1;
+ mes "[ Kelbany ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Kelbany ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Kelbany ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("gefg_cas04.gat",5);
+ set @Defence,GetCastleData("gefg_cas04.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Kelbany ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Kelbany ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Kelbany ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas04.gat",3,@Defence+1;
+ mes "[ Kelbany ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Kelbany ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Kelbany ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas04.gat",3,@Defence+1;
+ mes "[ Kelbany ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Kelbany ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Kelbany ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("gefg_cas04.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Kelbany ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("gefg_cas04.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("gefg_cas04.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("gefg_cas04.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("gefg_cas04.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("gefg_cas04.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("gefg_cas04.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("gefg_cas04.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("gefg_cas04.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Kelbany ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Kelbany ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "gefg_cas04.gat",@GDnum,1;
+ SetCastleData "gefg_cas04.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_B04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_B04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",7;
+ mes "[ Kelbany ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Kelbany ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Kelbany ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Kelbany ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("gefg_cas04.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Kelbany ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Kelbany ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Kelbany ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#gef4";
+ SetCastleData "gefg_cas04.gat",9,1;
+ mes "[ Kelbany ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Kelbany ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Kelbany ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Kelbany ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#gef4";
+ SetCastleData "gefg_cas04.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Kelbany ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Kelbany ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Kelbany ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Kelbany ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "gefg_cas04",116,118;
+ L6_1:
+ mes "[ Kelbany ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Kelbany ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Kelbany ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Kelbany ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "gefg_cas04.gat",1,0;
+ SetCastleData "gefg_cas04.gat",2,0;
+ SetCastleData "gefg_cas04.gat",3,0;
+ SetCastleData "gefg_cas04.gat",4,0;
+ SetCastleData "gefg_cas04.gat",5,0;
+ SetCastleData "gefg_cas04.gat",6,0;
+ SetCastleData "gefg_cas04.gat",7,0;
+ SetCastleData "gefg_cas04.gat",8,0;
+ SetCastleData "gefg_cas04.gat",9,0;
+ SetCastleData "gefg_cas04.gat",10,0;
+ SetCastleData "gefg_cas04.gat",11,0;
+ SetCastleData "gefg_cas04.gat",12,0;
+ SetCastleData "gefg_cas04.gat",13,0;
+ SetCastleData "gefg_cas04.gat",14,0;
+ SetCastleData "gefg_cas04.gat",15,0;
+ SetCastleData "gefg_cas04.gat",16,0;
+ SetCastleData "gefg_cas04.gat",17,0;
+ SetCastleData "gefg_cas04.gat",18,0;
+ SetCastleData "gefg_cas04.gat",19,0;
+ SetCastleData "gefg_cas04.gat",20,0;
+ SetCastleData "gefg_cas04.gat",21,0;
+ SetCastleData "gefg_cas04.gat",22,0;
+ SetCastleData "gefg_cas04.gat",23,0;
+ SetCastleData "gefg_cas04.gat",24,0;
+ SetCastleData "gefg_cas04.gat",25,0;
+ Announce "[" + GetGuildName(@GIDg4) + "] has surrendered Agit [" + GetCastleName("gefg_cas04.gat") + "]",0;
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Kelbany ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/gefg_cas05.txt b/npc/guild/old/gefg_cas05.txt
new file mode 100644
index 000000000..02e30ee78
--- /dev/null
+++ b/npc/guild/old/gefg_cas05.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas05 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in gefg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+gefg_cas05.gat,77,185,7 script Melsedetsu#g5-6::MelsedetsuNW 722,{
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (@GIDg5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ break;
+}
+
+gefg_cas05.gat,92,181,0 duplicate(MelsedetsuNW) Melsedetsu#g5-7 722
+gefg_cas05.gat,83,158,1 duplicate(MelsedetsuNW) Melsedetsu#g5-8 722
+gefg_cas05.gat,62,144,7 duplicate(MelsedetsuNW) Melsedetsu#g5-9 722
+gefg_cas05.gat,62,66,4 duplicate(MelsedetsuNW) Melsedetsu#g5-10 722
+gefg_cas05.gat,69,66,4 duplicate(MelsedetsuNW) Melsedetsu#g5-11 722
+
+//================================================
+// Kafra Service
+//================================================
+gefg_cas05.gat,61,52,5 script Kafra Service#gef5 117,{
+ cutin "kafra_01",2;
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (getcharid(2) == @GIDg5) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg5) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDg5) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "geffen.gat",120,39;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("gefg_cas05.gat",9) == 1) break;
+ disablenpc "Kafra Service#gef5";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+gefg_cas05.gat,65,22,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (getcharid(2) != @GIDg5) goto L1n;
+ warp "gld_dun04.gat",230,35;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+gefg_cas05.gat,70,52,5 script Beeor 55,{
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (@GIDg5 == 0) goto LStart;
+ if (getcharid(2) != @GIDg5) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDg5)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Beeor ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDg5) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg5) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Beeor ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Beeor ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDg5) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Beeor ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDg5) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Beeor ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("gefg_cas05.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("gefg_cas05.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("gefg_cas05.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("gefg_cas05.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("gefg_cas05.gat",4);
+ set @Economy,GetCastleData("gefg_cas05.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Beeor ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Beeor ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Beeor ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas05.gat",2,@Economy+1;
+ mes "[ Beeor ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Beeor ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Beeor ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "gefg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "gefg_cas05.gat",2,@Economy+1;
+ mes "[ Beeor ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Beeor ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Beeor ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("gefg_cas05.gat",5);
+ set @Defence,GetCastleData("gefg_cas05.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Beeor ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Beeor ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Beeor ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas05.gat",3,@Defence+1;
+ mes "[ Beeor ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Beeor ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Beeor ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "gefg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "gefg_cas05.gat",3,@Defence+1;
+ mes "[ Beeor ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Beeor ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Beeor ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("gefg_cas05.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Beeor ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("gefg_cas05.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("gefg_cas05.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("gefg_cas05.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("gefg_cas05.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("gefg_cas05.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("gefg_cas05.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("gefg_cas05.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("gefg_cas05.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Beeor ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Beeor ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "gefg_cas05.gat",@GDnum,1;
+ SetCastleData "gefg_cas05.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_B05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_B05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",7;
+ mes "[ Beeor ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Beeor ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Beeor ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Beeor ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("gefg_cas05.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Beeor ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Beeor ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Beeor ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#gef5";
+ SetCastleData "gefg_cas05.gat",9,1;
+ mes "[ Beeor ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Beeor ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Beeor ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Beeor ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#gef5";
+ SetCastleData "gefg_cas05.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Beeor ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Beeor ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Beeor ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Beeor ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "gefg_cas05",144,110;
+ L6_1:
+ mes "[ Beeor ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Beeor ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Beeor ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Beeor ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "gefg_cas05.gat",1,0;
+ SetCastleData "gefg_cas05.gat",2,0;
+ SetCastleData "gefg_cas05.gat",3,0;
+ SetCastleData "gefg_cas05.gat",4,0;
+ SetCastleData "gefg_cas05.gat",5,0;
+ SetCastleData "gefg_cas05.gat",6,0;
+ SetCastleData "gefg_cas05.gat",7,0;
+ SetCastleData "gefg_cas05.gat",8,0;
+ SetCastleData "gefg_cas05.gat",9,0;
+ SetCastleData "gefg_cas05.gat",10,0;
+ SetCastleData "gefg_cas05.gat",11,0;
+ SetCastleData "gefg_cas05.gat",12,0;
+ SetCastleData "gefg_cas05.gat",13,0;
+ SetCastleData "gefg_cas05.gat",14,0;
+ SetCastleData "gefg_cas05.gat",15,0;
+ SetCastleData "gefg_cas05.gat",16,0;
+ SetCastleData "gefg_cas05.gat",17,0;
+ SetCastleData "gefg_cas05.gat",18,0;
+ SetCastleData "gefg_cas05.gat",19,0;
+ SetCastleData "gefg_cas05.gat",20,0;
+ SetCastleData "gefg_cas05.gat",21,0;
+ SetCastleData "gefg_cas05.gat",22,0;
+ SetCastleData "gefg_cas05.gat",23,0;
+ SetCastleData "gefg_cas05.gat",24,0;
+ SetCastleData "gefg_cas05.gat",25,0;
+ Announce "[" + GetGuildName(@GIDg5) + "] has surrendered Agit [" + GetCastleName("gefg_cas05.gat") + "]",0;
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Beeor ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/gefg_flag.txt b/npc/guild/old/gefg_flag.txt
new file mode 100644
index 000000000..5e0158cca
--- /dev/null
+++ b/npc/guild/old/gefg_flag.txt
@@ -0,0 +1,359 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Geffen Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in prontera and prt_gld
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//============================================================
+
+//Geffen Castle 01 - Reprion
+
+geffen.gat,109,123,2 script Reprion#g1-1 722,{
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (@GIDg1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ break;
+}
+
+gef_fild13.gat,148,51,5 script Reprion#g1-2::ReprionW 722,{
+ set @GIDg1,GetCastleData("gefg_cas01.gat",1);
+ if (@GIDg1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDg1) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "gefg_cas01.gat",83,47;
+ break;
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ break;
+}
+
+gef_fild13.gat,155,54,5 duplicate(ReprionW) Reprion#g1-3 722
+gef_fild13.gat,212,79,6 duplicate(ReprionW) Reprion#g1-4 722
+gef_fild13.gat,211,71,6 duplicate(ReprionW) Reprion#g1-5 722
+
+
+//Geffen Castle 02 - Yolbriger
+
+geffen.gat,112,129,1 script Yolbriger#g2-1 722,{
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (@GIDg2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ break;
+}
+
+gef_fild13.gat,303,243,4 script Yolbriger#g2-2::YolbrigerW 722,{
+ set @GIDg2,GetCastleData("gefg_cas02.gat",1);
+ if (@GIDg2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDg2) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "gefg_cas02.gat",23,66;
+ break;
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ break;
+}
+
+gef_fild13.gat,312,243,4 duplicate(YolbrigerW) Yolbriger#g2-3 722
+gef_fild13.gat,290,243,4 duplicate(YolbrigerW) Yolbriger#g2-4 722
+gef_fild13.gat,324,243,4 duplicate(YolbrigerW) Yolbriger#g2-5 722
+
+//Geffen Castle 03 - Isinlife
+
+geffen.gat,120,132,8 script Isinlife#g3-1 722,{
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (@GIDg3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ break;
+}
+
+gef_fild13.gat,78,182,4 script Isinlife#g3-2::IsinlifeW 722,{
+ set @GIDg3,GetCastleData("gefg_cas03.gat",1);
+ if (@GIDg3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDg3) goto LStartg3;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg3:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "gefg_cas03.gat",116,89;
+ break;
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ break;
+}
+
+gef_fild13.gat,87,182,4 duplicate(IsinlifeW) Isinlife#g3-3 722
+gef_fild13.gat,73,295,7 duplicate(IsinlifeW) Isinlife#g3-4 722
+gef_fild13.gat,113,274,7 duplicate(IsinlifeW) Isinlife#g3-5 722
+gef_fild13.gat,144,235,6 duplicate(IsinlifeW) Isinlife#g3-6 722
+gef_fild13.gat,144,244,4 duplicate(IsinlifeW) Isinlife#g3-7 722
+
+//Geffen Castle 04 - Berigel
+
+geffen.gat,127,130,7 script Berigel#g4-1 722,{
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (@GIDg4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleg04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ break;
+}
+
+gef_fild13.gat,190,283,3 script Berigel#g4-2::BerigelW 722,{
+ set @GIDg4,GetCastleData("gefg_cas04.gat",1);
+ if (@GIDg4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDg4) goto LStartg4;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg4:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "gefg_cas04.gat",59,70;
+ break;
+OnRecvCastleG04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ break;
+}
+
+gef_fild13.gat,199,274,3 duplicate(BerigelW) Berigel#g4-3 722
+
+//Geffen Castle 05 - Melsedetsu
+
+geffen.gat,131,123,6 script Melsedetsu#g5-1 722,{
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (@GIDg5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleg05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ break;
+}
+
+gef_fild13.gat,302,87,7 script Melsedetsu#g5-2::MelsedetsuW 722,{
+ set @GIDg5,GetCastleData("gefg_cas05.gat",1);
+ if (@GIDg5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDg5) goto LStartg5;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDg5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg5:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "gefg_cas05.gat",61,52;
+ break;
+OnRecvCastleG05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ break;
+}
+
+gef_fild13.gat,313,83,0 duplicate(MelsedetsuW) Melsedetsu#g5-3 722
+gef_fild13.gat,252,51,2 duplicate(MelsedetsuW) Melsedetsu#g5-4 722
+gef_fild13.gat,26,147,2 duplicate(MelsedetsuW) Melsedetsu#g5-5 722 \ No newline at end of file
diff --git a/npc/guild/old/gswitch.txt b/npc/guild/old/gswitch.txt
new file mode 100644
index 000000000..b0b19aeb1
--- /dev/null
+++ b/npc/guild/old/gswitch.txt
@@ -0,0 +1,444 @@
+//Payon City for Athena by Script&DB Team
+
+payg_cas01.gat,287,5,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "payg_cas01.gat",120,59;
+L2:
+ close;
+}
+
+payg_cas01.gat,101,25,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun01.gat",186,165;
+L2:
+close;
+}
+
+payg_cas02.gat,141,141,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "payg_cas02.gat",22,261;
+L2:
+ close;
+}
+
+payg_cas02.gat,278,247,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun01.gat.gat",54,165;
+L2:
+close;
+}
+
+
+payg_cas03.gat,155,165,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "payg_cas03.gat",50,261;
+L2:
+ close;
+}
+
+payg_cas03.gat,38,42,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun01.gat",54,39;
+L2:
+close;
+}
+
+
+payg_cas04.gat,143,45,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "payg_cas04.gat",38,285;
+L2:
+ close;
+}
+
+payg_cas04.gat,52,48,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun01.gat",186,39;
+L2:
+close;
+}
+
+
+payg_cas05.gat,153,129,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "payg_cas05.gat",277,250;
+L2:
+ close;
+}
+
+payg_cas05.gat,248,14,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun01.gat",223,202;
+L2:
+close;
+}
+
+prtg_cas01.gat,15,208,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "prtg_cas01.gat",110,181;
+L2:
+close;
+}
+
+prtg_cas01.gat,94,200,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun03.gat",28,251;
+L2:
+close;
+}
+
+prtg_cas02.gat,206,228,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "prtg_cas02.gat",94,62;
+L2:
+close;
+}
+
+prtg_cas02.gat,84,72,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun03.gat",164,268;
+L2:
+close;
+}
+
+prtg_cas03.gat,192,134,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "prtg_cas03.gat",51,101;
+L2:
+close;
+}
+
+prtg_cas03.gat,5,70,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun03.gat",164,179;
+L2:
+close;
+}
+
+prtg_cas04.gat,274,160,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "prtg_cas04.gat",259,265;
+L2:
+close;
+}
+
+prtg_cas04.gat,56,283,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun03.gat",268,203;
+L2:
+close;
+}
+
+prtg_cas05.gat,280,177,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "prtg_cas05.gat",36,38;
+L2:
+close;
+}
+
+prtg_cas05.gat,212,95,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun03.gat",199,28;
+L2:
+close;
+}
+
+aldeg_cas01.gat,123,223,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "aldeg_cas01.gat",218,176;
+L2:
+ close;
+}
+
+aldeg_cas01.gat,123,233,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun02.gat",32,122;
+L2:
+close;
+}
+
+aldeg_cas02.gat,139,234,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "aldeg_cas02.gat",78,75;
+L2:
+ close;
+}
+
+aldeg_cas02.gat,194,236,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun02.gat",79,30;
+L2:
+close;
+}
+
+aldeg_cas03.gat,219,259,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "aldeg_cas03.gat",110,119;
+L2:
+ close;
+}
+
+aldeg_cas03.gat,200,177,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun02.gat",165,38;
+L2:
+close;
+}
+
+aldeg_cas04.gat,79,15,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "aldeg_cas04.gat",67,117;
+L2:
+ close;
+}
+
+aldeg_cas04.gat,76,64,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun02.gat",160,148;
+L2:
+close;
+}
+
+aldeg_cas05.gat,68,13,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+ warp "aldeg_cas05.gat",51,179;
+L2:
+ close;
+}
+
+aldeg_cas05.gat,22,205,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun02.gat",103,169;
+L2:
+close;
+}
+
+gefg_cas01.gat,151,109,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gefg_cas01.gat",40,49;
+L2:
+close;
+}
+
+gefg_cas01.gat,78,84,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun04.gat",39,258;
+L2:
+close;
+}
+
+gefg_cas02.gat,137,113,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gefg_cas02.gat",12,67;
+L2:
+close;
+}
+
+gefg_cas02.gat,167,40,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun04.gat",125,270;
+L2:
+close;
+}
+
+gefg_cas03.gat,267,287,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gefg_cas03.gat",106,24;
+L2:
+close;
+}
+
+gefg_cas03.gat,221,43,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun04.gat",268,251;
+L2:
+close;
+}
+
+gefg_cas04.gat,113,115,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gefg_cas04.gat",73,47;
+L2:
+close;
+}
+
+gefg_cas04.gat,58,75,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun04.gat",268,108;
+L2:
+close;
+}
+
+gefg_cas05.gat,141,187,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gefg_cas05.gat",70,53;
+L2:
+close;
+}
+
+gefg_cas05.gat,62,22,0 script Switch 111,{
+mes " ";
+mes "There is a little switch here. Would you like to pull the switch down?";
+next;
+menu "Yes",L1,"No",L2;
+L1:
+warp "gld_dun04.gat",230,35;
+L2:
+close;
+} \ No newline at end of file
diff --git a/npc/guild/old/guardian/aldeg_cas01_guardian.txt b/npc/guild/old/guardian/aldeg_cas01_guardian.txt
new file mode 100644
index 000000000..9a636a2e1
--- /dev/null
+++ b/npc/guild/old/guardian/aldeg_cas01_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas01 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in aldeg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+aldeg_cas01.gat,216,24,0 script Guardian_A01 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas01.gat",10) <= 0) goto Guardian2;
+ guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("aldeg_cas01.gat",11) <= 0) goto Guardian3;
+ guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("aldeg_cas01.gat",12) <= 0) goto Guardian4;
+ guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("aldeg_cas01.gat",13) <= 0) goto Guardian5;
+ guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("aldeg_cas01.gat",14) <= 0) goto Guardian6;
+ guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("aldeg_cas01.gat",15) <= 0) goto Guardian7;
+ guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("aldeg_cas01.gat",16) <= 0) goto Guardian8;
+ guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("aldeg_cas01.gat",17) <= 0) goto NoSpawn;
+ guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "aldeg_cas01.gat","Guardian_A01::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas01.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/aldeg_cas02_guardian.txt b/npc/guild/old/guardian/aldeg_cas02_guardian.txt
new file mode 100644
index 000000000..64671a472
--- /dev/null
+++ b/npc/guild/old/guardian/aldeg_cas02_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas02 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in aldeg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+aldeg_cas02.gat,214,24,0 script Guardian_A02 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas02.gat",10) <= 0) goto Guardian2;
+ guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("aldeg_cas02.gat",11) <= 0) goto Guardian3;
+ guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("aldeg_cas02.gat",12) <= 0) goto Guardian4;
+ guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("aldeg_cas02.gat",13) <= 0) goto Guardian5;
+ guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("aldeg_cas02.gat",14) <= 0) goto Guardian6;
+ guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("aldeg_cas02.gat",15) <= 0) goto Guardian7;
+ guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("aldeg_cas02.gat",16) <= 0) goto Guardian8;
+ guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("aldeg_cas02.gat",17) <= 0) goto NoSpawn;
+ guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "aldeg_cas02.gat","Guardian_A02::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas02.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/aldeg_cas03_guardian.txt b/npc/guild/old/guardian/aldeg_cas03_guardian.txt
new file mode 100644
index 000000000..30fd74dd7
--- /dev/null
+++ b/npc/guild/old/guardian/aldeg_cas03_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas03 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in aldeg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+aldeg_cas03.gat,206,32,0 script Guardian_A03 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas03.gat",10) <= 0) goto Guardian2;
+ guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("aldeg_cas03.gat",11) <= 0) goto Guardian3;
+ guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("aldeg_cas03.gat",12) <= 0) goto Guardian4;
+ guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("aldeg_cas03.gat",13) <= 0) goto Guardian5;
+ guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("aldeg_cas03.gat",14) <= 0) goto Guardian6;
+ guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("aldeg_cas03.gat",15) <= 0) goto Guardian7;
+ guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("aldeg_cas03.gat",16) <= 0) goto Guardian8;
+ guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("aldeg_cas03.gat",17) <= 0) goto NoSpawn;
+ guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "aldeg_cas03.gat","Guardian_A03::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas03.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/aldeg_cas04_guardian.txt b/npc/guild/old/guardian/aldeg_cas04_guardian.txt
new file mode 100644
index 000000000..26b6ccd79
--- /dev/null
+++ b/npc/guild/old/guardian/aldeg_cas04_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas04 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in aldeg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+aldeg_cas04.gat,36,218,0 script Guardian_A04 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas04.gat",10) <= 0) goto Guardian2;
+ guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("aldeg_cas04.gat",11) <= 0) goto Guardian3;
+ guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("aldeg_cas04.gat",12) <= 0) goto Guardian4;
+ guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("aldeg_cas04.gat",13) <= 0) goto Guardian5;
+ guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("aldeg_cas04.gat",14) <= 0) goto Guardian6;
+ guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("aldeg_cas04.gat",15) <= 0) goto Guardian7;
+ guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("aldeg_cas04.gat",16) <= 0) goto Guardian8;
+ guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("aldeg_cas04.gat",17) <= 0) goto NoSpawn;
+ guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "aldeg_cas04.gat","Guardian_A04::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas04.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/aldeg_cas05_guardian.txt b/npc/guild/old/guardian/aldeg_cas05_guardian.txt
new file mode 100644
index 000000000..9e8a400ec
--- /dev/null
+++ b/npc/guild/old/guardian/aldeg_cas05_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas05 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in aldeg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+aldeg_cas05.gat,28,102,0 script Guardian_A05 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas05.gat",10) <= 0) goto Guardian2;
+ guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("aldeg_cas05.gat",11) <= 0) goto Guardian3;
+ guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("aldeg_cas05.gat",12) <= 0) goto Guardian4;
+ guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("aldeg_cas05.gat",13) <= 0) goto Guardian5;
+ guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("aldeg_cas05.gat",14) <= 0) goto Guardian6;
+ guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("aldeg_cas05.gat",15) <= 0) goto Guardian7;
+ guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("aldeg_cas05.gat",16) <= 0) goto Guardian8;
+ guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("aldeg_cas05.gat",17) <= 0) goto NoSpawn;
+ guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "aldeg_cas05.gat","Guardian_A05::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas05.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/gefg_cas01_guardian.txt b/npc/guild/old/guardian/gefg_cas01_guardian.txt
new file mode 100644
index 000000000..06996e4d5
--- /dev/null
+++ b/npc/guild/old/guardian/gefg_cas01_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas01 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in gefg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+gefg_cas01.gat,198,182,0 script Guardian_B01 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas01.gat",10) <= 0) goto Guardian2;
+ guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("gefg_cas01.gat",11) <= 0) goto Guardian3;
+ guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("gefg_cas01.gat",12) <= 0) goto Guardian4;
+ guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_B01::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("gefg_cas01.gat",13) <= 0) goto Guardian5;
+ guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("gefg_cas01.gat",14) <= 0) goto Guardian6;
+ guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_B01::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("gefg_cas01.gat",15) <= 0) goto Guardian7;
+ guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("gefg_cas01.gat",16) <= 0) goto Guardian8;
+ guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("gefg_cas01.gat",17) <= 0) goto NoSpawn;
+ guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_B01::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "gefg_cas01.gat","Guardian_B01::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas01.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/gefg_cas02_guardian.txt b/npc/guild/old/guardian/gefg_cas02_guardian.txt
new file mode 100644
index 000000000..4d50c0ce2
--- /dev/null
+++ b/npc/guild/old/guardian/gefg_cas02_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas02 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in gefg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+gefg_cas02.gat,176,178,0 script Guardian_B02 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas02.gat",10) <= 0) goto Guardian2;
+ guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_B02::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("gefg_cas02.gat",11) <= 0) goto Guardian3;
+ guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_B02::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("gefg_cas02.gat",12) <= 0) goto Guardian4;
+ guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_B02::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("gefg_cas02.gat",13) <= 0) goto Guardian5;
+ guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_B02::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("gefg_cas02.gat",14) <= 0) goto Guardian6;
+ guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_B02::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("gefg_cas02.gat",15) <= 0) goto Guardian7;
+ guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_B02::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("gefg_cas02.gat",16) <= 0) goto Guardian8;
+ guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_B02::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("gefg_cas02.gat",17) <= 0) goto NoSpawn;
+ guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_B02::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "gefg_cas02.gat","Guardian_B02::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas02.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/gefg_cas03_guardian.txt b/npc/guild/old/guardian/gefg_cas03_guardian.txt
new file mode 100644
index 000000000..882118a73
--- /dev/null
+++ b/npc/guild/old/guardian/gefg_cas03_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas03 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in gefg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+gefg_cas03.gat,245,167,0 script Guardian_B03 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas03.gat",10) <= 0) goto Guardian2;
+ guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("gefg_cas03.gat",11) <= 0) goto Guardian3;
+ guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("gefg_cas03.gat",12) <= 0) goto Guardian4;
+ guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("gefg_cas03.gat",13) <= 0) goto Guardian5;
+ guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("gefg_cas03.gat",14) <= 0) goto Guardian6;
+ guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("gefg_cas03.gat",15) <= 0) goto Guardian7;
+ guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("gefg_cas03.gat",16) <= 0) goto Guardian8;
+ guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("gefg_cas03.gat",17) <= 0) goto NoSpawn;
+ guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "gefg_cas03.gat","Guardian_B03::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas03.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/gefg_cas04_guardian.txt b/npc/guild/old/guardian/gefg_cas04_guardian.txt
new file mode 100644
index 000000000..fef453ee3
--- /dev/null
+++ b/npc/guild/old/guardian/gefg_cas04_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas04 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in gefg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+gefg_cas04.gat,174,178,0 script Guardian_B04 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas04.gat",10) <= 0) goto Guardian2;
+ guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("gefg_cas04.gat",11) <= 0) goto Guardian3;
+ guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("gefg_cas04.gat",12) <= 0) goto Guardian4;
+ guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_B04::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("gefg_cas04.gat",13) <= 0) goto Guardian5;
+ guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_B04::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("gefg_cas04.gat",14) <= 0) goto Guardian6;
+ guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_B04::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("gefg_cas04.gat",15) <= 0) goto Guardian7;
+ guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("gefg_cas04.gat",16) <= 0) goto Guardian8;
+ guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("gefg_cas04.gat",17) <= 0) goto NoSpawn;
+ guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_B04::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "gefg_cas04.gat","Guardian_B04::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas04.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/gefg_cas05_guardian.txt b/npc/guild/old/guardian/gefg_cas05_guardian.txt
new file mode 100644
index 000000000..c3254cab5
--- /dev/null
+++ b/npc/guild/old/guardian/gefg_cas05_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas05 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in gefg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+gefg_cas05.gat,194,184,0 script Guardian_B05 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas05.gat",10) <= 0) goto Guardian2;
+ guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("gefg_cas05.gat",11) <= 0) goto Guardian3;
+ guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("gefg_cas05.gat",12) <= 0) goto Guardian4;
+ guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_B05::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("gefg_cas05.gat",13) <= 0) goto Guardian5;
+ guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_B05::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("gefg_cas05.gat",14) <= 0) goto Guardian6;
+ guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_B05::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("gefg_cas05.gat",15) <= 0) goto Guardian7;
+ guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("gefg_cas05.gat",16) <= 0) goto Guardian8;
+ guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("gefg_cas05.gat",17) <= 0) goto NoSpawn;
+ guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_B05::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "gefg_cas05.gat","Guardian_B05::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas05.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/payg_cas01_guardian.txt b/npc/guild/old/guardian/payg_cas01_guardian.txt
new file mode 100644
index 000000000..8431608d9
--- /dev/null
+++ b/npc/guild/old/guardian/payg_cas01_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas01 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in payg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+payg_cas01.gat,139,139,0 script Guardian_C01 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas01.gat",10) <= 0) goto Guardian2;
+ guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("payg_cas01.gat",11) <= 0) goto Guardian3;
+ guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("payg_cas01.gat",12) <= 0) goto Guardian4;
+ guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("payg_cas01.gat",13) <= 0) goto Guardian5;
+ guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_C01::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("payg_cas01.gat",14) <= 0) goto Guardian6;
+ guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_C01::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("payg_cas01.gat",15) <= 0) goto Guardian7;
+ guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("payg_cas01.gat",16) <= 0) goto Guardian8;
+ guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("payg_cas01.gat",17) <= 0) goto NoSpawn;
+ guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "payg_cas01.gat","Guardian_C01::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas01.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/payg_cas02_guardian.txt b/npc/guild/old/guardian/payg_cas02_guardian.txt
new file mode 100644
index 000000000..ff2235c4f
--- /dev/null
+++ b/npc/guild/old/guardian/payg_cas02_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas02 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in payg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+payg_cas02.gat,39,25,0 script Guardian_C02 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas02.gat",10) <= 0) goto Guardian2;
+ guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("payg_cas02.gat",11) <= 0) goto Guardian3;
+ guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("payg_cas02.gat",12) <= 0) goto Guardian4;
+ guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("payg_cas02.gat",13) <= 0) goto Guardian5;
+ guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_C02::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("payg_cas02.gat",14) <= 0) goto Guardian6;
+ guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_C02::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("payg_cas02.gat",15) <= 0) goto Guardian7;
+ guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("payg_cas02.gat",16) <= 0) goto Guardian8;
+ guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("payg_cas02.gat",17) <= 0) goto NoSpawn;
+ guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "payg_cas02.gat","Guardian_C02::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas02.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/payg_cas03_guardian.txt b/npc/guild/old/guardian/payg_cas03_guardian.txt
new file mode 100644
index 000000000..05150bd9e
--- /dev/null
+++ b/npc/guild/old/guardian/payg_cas03_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas03 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in payg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+payg_cas03.gat,269,265,0 script Guardian_C03 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas03.gat",10) <= 0) goto Guardian2;
+ guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("payg_cas03.gat",11) <= 0) goto Guardian3;
+ guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("payg_cas03.gat",12) <= 0) goto Guardian4;
+ guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("payg_cas03.gat",13) <= 0) goto Guardian5;
+ guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_C03::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("payg_cas03.gat",14) <= 0) goto Guardian6;
+ guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_C03::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("payg_cas03.gat",15) <= 0) goto Guardian7;
+ guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("payg_cas03.gat",16) <= 0) goto Guardian8;
+ guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("payg_cas03.gat",17) <= 0) goto NoSpawn;
+ guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "payg_cas03.gat","Guardian_C03::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas03.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/payg_cas04_guardian.txt b/npc/guild/old/guardian/payg_cas04_guardian.txt
new file mode 100644
index 000000000..fa303988e
--- /dev/null
+++ b/npc/guild/old/guardian/payg_cas04_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas04 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in payg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+payg_cas04.gat,271,29,0 script Guardian_C04 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas04.gat",10) <= 0) goto Guardian2;
+ guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("payg_cas04.gat",11) <= 0) goto Guardian3;
+ guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("payg_cas04.gat",12) <= 0) goto Guardian4;
+ guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("payg_cas04.gat",13) <= 0) goto Guardian5;
+ guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_C04::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("payg_cas04.gat",14) <= 0) goto Guardian6;
+ guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_C04::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("payg_cas04.gat",15) <= 0) goto Guardian7;
+ guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("payg_cas04.gat",16) <= 0) goto Guardian8;
+ guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("payg_cas04.gat",17) <= 0) goto NoSpawn;
+ guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "payg_cas04.gat","Guardian_C04::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas04.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/payg_cas05_guardian.txt b/npc/guild/old/guardian/payg_cas05_guardian.txt
new file mode 100644
index 000000000..526de5d4f
--- /dev/null
+++ b/npc/guild/old/guardian/payg_cas05_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas05 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in payg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+payg_cas05.gat,30,30,0 script Guardian_C05 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas05.gat",10) <= 0) goto Guardian2;
+ guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("payg_cas05.gat",11) <= 0) goto Guardian3;
+ guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("payg_cas05.gat",12) <= 0) goto Guardian4;
+ guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("payg_cas05.gat",13) <= 0) goto Guardian5;
+ guardian "payg_cas05.gat",46,273,"Archer Guardian",1285,1,"Guardian_C05::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("payg_cas05.gat",14) <= 0) goto Guardian6;
+ guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_C05::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("payg_cas05.gat",15) <= 0) goto Guardian7;
+ guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("payg_cas05.gat",16) <= 0) goto Guardian8;
+ guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("payg_cas05.gat",17) <= 0) goto NoSpawn;
+ guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "payg_cas05.gat","Guardian_C05::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas05.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/prtg_cas01_guardian.txt b/npc/guild/old/guardian/prtg_cas01_guardian.txt
new file mode 100644
index 000000000..d8ffaf243
--- /dev/null
+++ b/npc/guild/old/guardian/prtg_cas01_guardian.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas01 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in prtg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+prtg_cas01.gat,197,197,0 script Guardian_D01 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas01.gat",10) <= 0) goto Guardian2;
+ guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("prtg_cas01.gat",11) <= 0) goto Guardian3;
+ guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("prtg_cas01.gat",12) <= 0) goto Guardian4;
+ guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("prtg_cas01.gat",13) <= 0) goto Guardian5;
+ guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_D01::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("prtg_cas01.gat",14) <= 0) goto Guardian6;
+ guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_D01::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("prtg_cas01.gat",15) <= 0) goto Guardian7;
+ guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("prtg_cas01.gat",16) <= 0) goto Guardian8;
+ guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("prtg_cas01.gat",17) <= 0) goto NoSpawn;
+ guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",7;
+ break;
+
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "prtg_cas01.gat","Guardian_D01::GuardianDied";
+ break;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas01.gat","A Guardian Has Fallen",17;
+ break;
+
+OnAgitEnd:
+ break;
+
+NoSpawn:
+ break;
+
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/prtg_cas02_guardian.txt b/npc/guild/old/guardian/prtg_cas02_guardian.txt
new file mode 100644
index 000000000..3858f1c64
--- /dev/null
+++ b/npc/guild/old/guardian/prtg_cas02_guardian.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas02 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in prtg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+prtg_cas02.gat,158,174,0 script Guardian_D02 -1,{
+OnAgitStart:
+ if (GetCastleData("prtg_cas02.gat",10) <= 0) goto Guardian2;
+ guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_D02::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("prtg_cas02.gat",11) <= 0) goto Guardian3;
+ guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_D02::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("prtg_cas02.gat",12) <= 0) goto Guardian4;
+ guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_D02::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("prtg_cas02.gat",13) <= 0) goto Guardian5;
+ guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_D02::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("prtg_cas02.gat",14) <= 0) goto Guardian6;
+ guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_D02::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("prtg_cas02.gat",15) <= 0) goto Guardian7;
+ guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("prtg_cas02.gat",16) <= 0) goto Guardian8;
+ guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("prtg_cas02.gat",17) <= 0) goto NoSpawn;
+ guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",7;
+ break;
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "prtg_cas02.gat","Guardian_D02::GuardianDied";
+ break;
+GuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas02.gat","A Guardian Has Fallen",17;
+ break;
+OnAgitEnd:
+ break;
+NoSpawn:
+ break;
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/prtg_cas03_guardian.txt b/npc/guild/old/guardian/prtg_cas03_guardian.txt
new file mode 100644
index 000000000..1f5becb9e
--- /dev/null
+++ b/npc/guild/old/guardian/prtg_cas03_guardian.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas03 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in prtg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+prtg_cas03.gat,17,221,0 script Guardian_D03 -1,{
+OnAgitStart:
+ if (GetCastleData("prtg_cas03.gat",10) <= 0) goto Guardian2;
+ guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("prtg_cas03.gat",11) <= 0) goto Guardian3;
+ guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("prtg_cas03.gat",12) <= 0) goto Guardian4;
+ guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("prtg_cas03.gat",13) <= 0) goto Guardian5;
+ guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_D03::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("prtg_cas03.gat",14) <= 0) goto Guardian6;
+ guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_D03::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("prtg_cas03.gat",15) <= 0) goto Guardian7;
+ guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("prtg_cas03.gat",16) <= 0) goto Guardian8;
+ guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("prtg_cas03.gat",17) <= 0) goto NoSpawn;
+ guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",7;
+ break;
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "prtg_cas03.gat","Guardian_D03::OnGuardianDied";
+ break;
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas03.gat","A Guardian Has Fallen",17;
+ break;
+OnAgitEnd:
+ break;
+NoSpawn:
+ break;
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/prtg_cas04_guardian.txt b/npc/guild/old/guardian/prtg_cas04_guardian.txt
new file mode 100644
index 000000000..7a5d86062
--- /dev/null
+++ b/npc/guild/old/guardian/prtg_cas04_guardian.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas04 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in prtg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+prtg_cas04.gat,292,14,0 script Guardian_D04 -1,{
+OnAgitStart:
+ if (GetCastleData("prtg_cas04.gat",10) <= 0) goto Guardian2;
+ guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("prtg_cas04.gat",11) <= 0) goto Guardian3;
+ guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("prtg_cas04.gat",12) <= 0) goto Guardian4;
+ guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("prtg_cas04.gat",13) <= 0) goto Guardian5;
+ guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("prtg_cas04.gat",14) <= 0) goto Guardian6;
+ guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("prtg_cas04.gat",15) <= 0) goto Guardian7;
+ guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("prtg_cas04.gat",16) <= 0) goto Guardian8;
+ guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("prtg_cas04.gat",17) <= 0) goto NoSpawn;
+ guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",7;
+ break;
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "prtg_cas04.gat","Guardian_D04::OnGuardianDied";
+ break;
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas04.gat","A Guardian Has Fallen",17;
+ break;
+OnAgitEnd:
+ break;
+NoSpawn:
+ break;
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/guardian/prtg_cas05_guardian.txt b/npc/guild/old/guardian/prtg_cas05_guardian.txt
new file mode 100644
index 000000000..392623a11
--- /dev/null
+++ b/npc/guild/old/guardian/prtg_cas05_guardian.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas05 guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guardians Spawn Script in prtg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//============================================================
+
+prtg_cas05.gat,266,266,0 script Guardian_D05 -1,{
+OnAgitStart:
+ if (GetCastleData("prtg_cas05.gat",10) <= 0) goto Guardian2;
+ guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_D05::OnGuardianDied",0;
+ goto Guardian2;
+Guardian2:
+ if (GetCastleData("prtg_cas05.gat",11) <= 0) goto Guardian3;
+ guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_D05::OnGuardianDied",1;
+ goto Guardian3;
+Guardian3:
+ if (GetCastleData("prtg_cas05.gat",12) <= 0) goto Guardian4;
+ guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_D05::OnGuardianDied",2;
+ goto Guardian4;
+Guardian4:
+ if (GetCastleData("prtg_cas05.gat",13) <= 0) goto Guardian5;
+ guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_D05::OnGuardianDied",3;
+ goto Guardian5;
+Guardian5:
+ if (GetCastleData("prtg_cas05.gat",14) <= 0) goto Guardian6;
+ guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_D05::OnGuardianDied",4;
+ goto Guardian6;
+Guardian6:
+ if (GetCastleData("prtg_cas05.gat",15) <= 0) goto Guardian7;
+ guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_D05::OnGuardianDied",5;
+ goto Guardian7;
+Guardian7:
+ if (GetCastleData("prtg_cas05.gat",16) <= 0) goto Guardian8;
+ guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_D05::OnGuardianDied",6;
+ goto Guardian8;
+Guardian8:
+ if (GetCastleData("prtg_cas05.gat",17) <= 0) goto NoSpawn;
+ guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_D05::OnGuardianDied",7;
+ break;
+OnAgitEliminate:
+ //Kill all guardians on castle takeover
+ //killmonster "prtg_cas05.gat","Guardian_D05::OnGuardianDied";
+ break;
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas05.gat","A Guardian Has Fallen",17;
+ break;
+OnAgitEnd:
+ break;
+NoSpawn:
+ break;
+}
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/npc/guild/old/payg_cas01.txt b/npc/guild/old/payg_cas01.txt
new file mode 100644
index 000000000..16992f39d
--- /dev/null
+++ b/npc/guild/old/payg_cas01.txt
@@ -0,0 +1,667 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas01 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in payg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+payg_cas01.gat,238,67,4 script Mingting#f1-6::MingtingNW 722,{
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (@GIDf1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ break;
+}
+
+
+payg_cas01.gat,233,67,4 duplicate(MingtingNW) Mingting#f1-7 722
+payg_cas01.gat,221,123,4 duplicate(MingtingNW) Mingting#f1-8 722
+payg_cas01.gat,221,116,4 duplicate(MingtingNW) Mingting#f1-9 722
+payg_cas01.gat,206,108,4 duplicate(MingtingNW) Mingting#f1-10 722
+payg_cas01.gat,212,108,4 duplicate(MingtingNW) Mingting#f1-11 722
+
+//================================================
+// Kafra Service
+//================================================
+payg_cas01.gat,128,58,3 script Kafra Service#pay1 117,{
+ cutin "kafra_01",2;
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (getcharid(2) == @GIDf1) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDf1) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDf1) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Payon -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "payon.gat",82,128;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("payg_cas01.gat",9) == 1) break;
+ disablenpc "Kafra Service#pay1";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+payg_cas01.gat,101,25,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (getcharid(2) != @GIDf1) goto L1n;
+ warp "gld_dun01.gat",186,165;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+payg_cas01.gat,120,58,4 script Grunday 55,{
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (@GIDf1 == 0) goto LStart;
+ if (getcharid(2) != @GIDf1) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDf1)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Grunday ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDf1) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDf1) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Grunday ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Grunday ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDf1) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Grunday ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDf1) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Grunday ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("payg_cas01.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("payg_cas01.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("payg_cas01.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("payg_cas01.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("payg_cas01.gat",4);
+ set @Economy,GetCastleData("payg_cas01.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Grunday ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Grunday ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Grunday ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas01.gat",2,@Economy+1;
+ mes "[ Grunday ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Grunday ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Grunday ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas01.gat",2,@Economy+1;
+ mes "[ Grunday ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Grunday ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Grunday ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("payg_cas01.gat",5);
+ set @Defence,GetCastleData("payg_cas01.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Grunday ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Grunday ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Grunday ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas01.gat",3,@Defence+1;
+ mes "[ Grunday ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Grunday ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Grunday ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas01.gat",3,@Defence+1;
+ mes "[ Grunday ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Grunday ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Grunday ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("payg_cas01.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Grunday ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("payg_cas01.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("payg_cas01.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("payg_cas01.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("payg_cas01.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("payg_cas01.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("payg_cas01.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("payg_cas01.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("payg_cas01.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Grunday ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Grunday ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "payg_cas01.gat",@GDnum,1;
+ SetCastleData "payg_cas01.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_C01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_C01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_C01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_C01::OnGuardianDied",7;
+ mes "[ Grunday ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Grunday ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Grunday ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Grunday ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("payg_cas01.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Grunday ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Grunday ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Grunday ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#pay1";
+ SetCastleData "payg_cas01.gat",9,1;
+ mes "[ Grunday ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Grunday ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Grunday ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Grunday ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#pay1";
+ SetCastleData "payg_cas01.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Grunday ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Grunday ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Grunday ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Grunday ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "payg_cas01",290,7;
+ L6_1:
+ mes "[ Grunday ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Grunday ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Grunday ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Grunday ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "payg_cas01.gat",1,0;
+ SetCastleData "payg_cas01.gat",2,0;
+ SetCastleData "payg_cas01.gat",3,0;
+ SetCastleData "payg_cas01.gat",4,0;
+ SetCastleData "payg_cas01.gat",5,0;
+ SetCastleData "payg_cas01.gat",6,0;
+ SetCastleData "payg_cas01.gat",7,0;
+ SetCastleData "payg_cas01.gat",8,0;
+ SetCastleData "payg_cas01.gat",9,0;
+ SetCastleData "payg_cas01.gat",10,0;
+ SetCastleData "payg_cas01.gat",11,0;
+ SetCastleData "payg_cas01.gat",12,0;
+ SetCastleData "payg_cas01.gat",13,0;
+ SetCastleData "payg_cas01.gat",14,0;
+ SetCastleData "payg_cas01.gat",15,0;
+ SetCastleData "payg_cas01.gat",16,0;
+ SetCastleData "payg_cas01.gat",17,0;
+ SetCastleData "payg_cas01.gat",18,0;
+ SetCastleData "payg_cas01.gat",19,0;
+ SetCastleData "payg_cas01.gat",20,0;
+ SetCastleData "payg_cas01.gat",21,0;
+ SetCastleData "payg_cas01.gat",22,0;
+ SetCastleData "payg_cas01.gat",23,0;
+ SetCastleData "payg_cas01.gat",24,0;
+ SetCastleData "payg_cas01.gat",25,0;
+ Announce "[" + GetGuildName(@GIDf1) + "] has surrendered Agit [" + GetCastleName("payg_cas01.gat") + "]",0;
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas01.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Grunday ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/payg_cas02.txt b/npc/guild/old/payg_cas02.txt
new file mode 100644
index 000000000..4dae578cd
--- /dev/null
+++ b/npc/guild/old/payg_cas02.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas02 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in payg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+payg_cas02.gat,254,40,6 script Tiantan#f2-6::TiantanNW 722,{
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (@GIDf2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ break;
+}
+
+payg_cas02.gat,254,48,6 duplicate(TiantanNW) Tiantan#f2-7 722
+payg_cas02.gat,202,49,0 duplicate(TiantanNW) Tiantan#f2-8 722
+payg_cas02.gat,209,49,0 duplicate(TiantanNW) Tiantan#f2-9 722
+payg_cas02.gat,59,282,4 duplicate(TiantanNW) Tiantan#f2-10 722
+payg_cas02.gat,70,282,4 duplicate(TiantanNW) Tiantan#f2-11 722
+
+//================================================
+// Kafra Service
+//================================================
+payg_cas02.gat,22,275,5 script Kafra Service#pay2 117,{
+ cutin "kafra_01",2;
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (getcharid(2) == @GIDf2) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDf2) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDf2) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Payon -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "payon.gat",82,128;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("payg_cas02.gat",9) == 1) break;
+ disablenpc "Kafra Service#pay2";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+payg_cas02.gat,278,247,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (getcharid(2) != @GIDf2) goto L1n;
+ warp "gld_dun01.gat",54,165;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+payg_cas02.gat,22,260,7 script Cherrios 55,{
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (@GIDf2 == 0) goto LStart;
+ if (getcharid(2) != @GIDf2) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDf2)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Cherrios ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDf2) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDf2) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Cherrios ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Cherrios ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDf2) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Cherrios ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDf2) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Cherrios ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("payg_cas02.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("payg_cas02.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("payg_cas02.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("payg_cas02.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("payg_cas02.gat",4);
+ set @Economy,GetCastleData("payg_cas02.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Cherrios ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Cherrios ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Cherrios ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas02.gat",2,@Economy+1;
+ mes "[ Cherrios ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Cherrios ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Cherrios ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas02.gat",2,@Economy+1;
+ mes "[ Cherrios ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Cherrios ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Cherrios ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("payg_cas02.gat",5);
+ set @Defence,GetCastleData("payg_cas02.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Cherrios ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Cherrios ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Cherrios ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas02.gat",3,@Defence+1;
+ mes "[ Cherrios ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Cherrios ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Cherrios ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas02.gat",3,@Defence+1;
+ mes "[ Cherrios ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Cherrios ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Cherrios ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("payg_cas02.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Cherrios ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("payg_cas02.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("payg_cas02.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("payg_cas02.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("payg_cas02.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("payg_cas02.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("payg_cas02.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("payg_cas02.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("payg_cas02.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Cherrios ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Cherrios ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "payg_cas02.gat",@GDnum,1;
+ SetCastleData "payg_cas02.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_C02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_C02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_C02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_C02::OnGuardianDied",7;
+ mes "[ Cherrios ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Cherrios ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Cherrios ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Cherrios ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("payg_cas02.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Cherrios ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Cherrios ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Cherrios ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#pay2";
+ SetCastleData "payg_cas02.gat",9,1;
+ mes "[ Cherrios ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Cherrios ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Cherrios ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Cherrios ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#pay2";
+ SetCastleData "payg_cas02.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Cherrios ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Cherrios ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Cherrios ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Cherrios ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "payg_cas02",145,143;
+ L6_1:
+ mes "[ Cherrios ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Cherrios ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Cherrios ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Cherrios ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "payg_cas02.gat",1,0;
+ SetCastleData "payg_cas02.gat",2,0;
+ SetCastleData "payg_cas02.gat",3,0;
+ SetCastleData "payg_cas02.gat",4,0;
+ SetCastleData "payg_cas02.gat",5,0;
+ SetCastleData "payg_cas02.gat",6,0;
+ SetCastleData "payg_cas02.gat",7,0;
+ SetCastleData "payg_cas02.gat",8,0;
+ SetCastleData "payg_cas02.gat",9,0;
+ SetCastleData "payg_cas02.gat",10,0;
+ SetCastleData "payg_cas02.gat",11,0;
+ SetCastleData "payg_cas02.gat",12,0;
+ SetCastleData "payg_cas02.gat",13,0;
+ SetCastleData "payg_cas02.gat",14,0;
+ SetCastleData "payg_cas02.gat",15,0;
+ SetCastleData "payg_cas02.gat",16,0;
+ SetCastleData "payg_cas02.gat",17,0;
+ SetCastleData "payg_cas02.gat",18,0;
+ SetCastleData "payg_cas02.gat",19,0;
+ SetCastleData "payg_cas02.gat",20,0;
+ SetCastleData "payg_cas02.gat",21,0;
+ SetCastleData "payg_cas02.gat",22,0;
+ SetCastleData "payg_cas02.gat",23,0;
+ SetCastleData "payg_cas02.gat",24,0;
+ SetCastleData "payg_cas02.gat",25,0;
+ Announce "[" + GetGuildName(@GIDf2) + "] has surrendered Agit [" + GetCastleName("payg_cas02.gat") + "]",0;
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Cherrios ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/payg_cas03.txt b/npc/guild/old/payg_cas03.txt
new file mode 100644
index 000000000..7d9aee3e9
--- /dev/null
+++ b/npc/guild/old/payg_cas03.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas03 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in payg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+payg_cas03.gat,236,54,2 script Fuying#f3-6::FuyingNW 722,{
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (@GIDf3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ break;
+}
+
+payg_cas03.gat,236,45,2 duplicate(FuyingNW) Fuying#f3-7 722
+payg_cas03.gat,259,66,4 duplicate(FuyingNW) Fuying#f3-8 722
+payg_cas03.gat,266,66,4 duplicate(FuyingNW) Fuying#f3-9 722
+payg_cas03.gat,34,31,4 duplicate(FuyingNW) Fuying#f3-10 722
+payg_cas03.gat,43,31,4 duplicate(FuyingNW) Fuying#f3-11 722
+
+//================================================
+// Kafra Service
+//================================================
+payg_cas03.gat,9,263,5 script Kafra Service#pay3 117,{
+ cutin "kafra_01",2;
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (getcharid(2) == @GIDf3) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDf3) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDf3) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Payon -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "payon.gat",82,128;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("payg_cas03.gat",9) == 1) break;
+ disablenpc "Kafra Service#pay3";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+payg_cas03.gat,38,42,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (getcharid(2) != @GIDf3) goto L1n;
+ warp "gld_dun01.gat",54,39;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+payg_cas03.gat,268,264,0 script Garriet 55,{
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (@GIDf3 == 0) goto LStart;
+ if (getcharid(2) != @GIDf3) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDf3)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Garriet ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDf3) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDf3) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Garriet ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Garriet ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDf3) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Garriet ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDf3) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Garriet ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("payg_cas03.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("payg_cas03.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("payg_cas03.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("payg_cas03.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("payg_cas03.gat",4);
+ set @Economy,GetCastleData("payg_cas03.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Garriet ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Garriet ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Garriet ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas03.gat",2,@Economy+1;
+ mes "[ Garriet ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Garriet ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Garriet ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas03.gat",2,@Economy+1;
+ mes "[ Garriet ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Garriet ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Garriet ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("payg_cas03.gat",5);
+ set @Defence,GetCastleData("payg_cas03.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Garriet ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Garriet ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Garriet ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas03.gat",3,@Defence+1;
+ mes "[ Garriet ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Garriet ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Garriet ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas03.gat",3,@Defence+1;
+ mes "[ Garriet ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Garriet ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Garriet ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("payg_cas03.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Garriet ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("payg_cas03.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("payg_cas03.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("payg_cas03.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("payg_cas03.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("payg_cas03.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("payg_cas03.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("payg_cas03.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("payg_cas03.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Garriet ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Garriet ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "payg_cas03.gat",@GDnum,1;
+ SetCastleData "payg_cas03.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_C03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_C03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_C03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_C03::OnGuardianDied",7;
+ mes "[ Garriet ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Garriet ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Garriet ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Garriet ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("payg_cas03.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Garriet ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Garriet ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Garriet ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#pay3";
+ SetCastleData "payg_cas03.gat",9,1;
+ mes "[ Garriet ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Garriet ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Garriet ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Garriet ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#pay3";
+ SetCastleData "payg_cas03.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Garriet ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Garriet ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Garriet ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Garriet ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "payg_cas03",158,168;
+ L6_1:
+ mes "[ Garriet ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Garriet ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Garriet ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Garriet ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "payg_cas03.gat",1,0;
+ SetCastleData "payg_cas03.gat",2,0;
+ SetCastleData "payg_cas03.gat",3,0;
+ SetCastleData "payg_cas03.gat",4,0;
+ SetCastleData "payg_cas03.gat",5,0;
+ SetCastleData "payg_cas03.gat",6,0;
+ SetCastleData "payg_cas03.gat",7,0;
+ SetCastleData "payg_cas03.gat",8,0;
+ SetCastleData "payg_cas03.gat",9,0;
+ SetCastleData "payg_cas03.gat",10,0;
+ SetCastleData "payg_cas03.gat",11,0;
+ SetCastleData "payg_cas03.gat",12,0;
+ SetCastleData "payg_cas03.gat",13,0;
+ SetCastleData "payg_cas03.gat",14,0;
+ SetCastleData "payg_cas03.gat",15,0;
+ SetCastleData "payg_cas03.gat",16,0;
+ SetCastleData "payg_cas03.gat",17,0;
+ SetCastleData "payg_cas03.gat",18,0;
+ SetCastleData "payg_cas03.gat",19,0;
+ SetCastleData "payg_cas03.gat",20,0;
+ SetCastleData "payg_cas03.gat",21,0;
+ SetCastleData "payg_cas03.gat",22,0;
+ SetCastleData "payg_cas03.gat",23,0;
+ SetCastleData "payg_cas03.gat",24,0;
+ SetCastleData "payg_cas03.gat",25,0;
+ Announce "[" + GetGuildName(@GIDf3) + "] has surrendered Agit [" + GetCastleName("payg_cas03.gat") + "]",0;
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Garriet ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/payg_cas04.txt b/npc/guild/old/payg_cas04.txt
new file mode 100644
index 000000000..634560c59
--- /dev/null
+++ b/npc/guild/old/payg_cas04.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas04 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in payg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+payg_cas04.gat,255,259,0 script Honglou#f4-6::HonglouNW 722,{
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (@GIDf4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ break;
+}
+
+payg_cas04.gat,248,259,0 duplicate(HonglouNW) Honglou#f4-7 722
+payg_cas04.gat,248,168,6 duplicate(HonglouNW) Honglou#f4-8 722
+payg_cas04.gat,248,160,6 duplicate(HonglouNW) Honglou#f4-9 722
+payg_cas04.gat,232,181,4 duplicate(HonglouNW) Honglou#f4-10 722
+payg_cas04.gat,239,181,4 duplicate(HonglouNW) Honglou#f4-11 722
+
+//================================================
+// Kafra Service
+//================================================
+payg_cas04.gat,40,235,1 script Kafra Service#pay4 117,{
+ cutin "kafra_01",2;
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (getcharid(2) == @GIDf4) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDf4) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDf4) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Payon -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "payon.gat",82,128;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("payg_cas04.gat",9) == 1) break;
+ disablenpc "Kafra Service#pay4";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+payg_cas04.gat,52,48,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (getcharid(2) != @GIDf4) goto L1n;
+ warp "gld_dun01.gat",186,39;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+payg_cas04.gat,38,284,3 script DJ 55,{
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (@GIDf4 == 0) goto LStart;
+ if (getcharid(2) != @GIDf4) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDf4)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ DJ ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDf4) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDf4) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ DJ ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ DJ ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDf4) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ DJ ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDf4) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ DJ ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("payg_cas04.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("payg_cas04.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("payg_cas04.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("payg_cas04.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("payg_cas04.gat",4);
+ set @Economy,GetCastleData("payg_cas04.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ DJ ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ DJ ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ DJ ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas04.gat",2,@Economy+1;
+ mes "[ DJ ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ DJ ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ DJ ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas04.gat",2,@Economy+1;
+ mes "[ DJ ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ DJ ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ DJ ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("payg_cas04.gat",5);
+ set @Defence,GetCastleData("payg_cas04.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ DJ ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ DJ ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ DJ ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas04.gat",3,@Defence+1;
+ mes "[ DJ ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ DJ ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ DJ ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas04.gat",3,@Defence+1;
+ mes "[ DJ ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ DJ ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ DJ ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("payg_cas04.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ DJ ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("payg_cas04.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("payg_cas04.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("payg_cas04.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("payg_cas04.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("payg_cas04.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("payg_cas04.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("payg_cas04.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("payg_cas04.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ DJ ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ DJ ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "payg_cas04.gat",@GDnum,1;
+ SetCastleData "payg_cas04.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_C04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_C04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_C04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_C04::OnGuardianDied",7;
+ mes "[ DJ ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ DJ ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ DJ ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ DJ ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("payg_cas04.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ DJ ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ DJ ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ DJ ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#pay4";
+ SetCastleData "payg_cas04.gat",9,1;
+ mes "[ DJ ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ DJ ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ DJ ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ DJ ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#pay4";
+ SetCastleData "payg_cas04.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ DJ ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ DJ ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ DJ ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ DJ ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "payg_cas04",146,48;
+ L6_1:
+ mes "[ DJ ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ DJ ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ DJ ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ DJ ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "payg_cas04.gat",1,0;
+ SetCastleData "payg_cas04.gat",2,0;
+ SetCastleData "payg_cas04.gat",3,0;
+ SetCastleData "payg_cas04.gat",4,0;
+ SetCastleData "payg_cas04.gat",5,0;
+ SetCastleData "payg_cas04.gat",6,0;
+ SetCastleData "payg_cas04.gat",7,0;
+ SetCastleData "payg_cas04.gat",8,0;
+ SetCastleData "payg_cas04.gat",9,0;
+ SetCastleData "payg_cas04.gat",10,0;
+ SetCastleData "payg_cas04.gat",11,0;
+ SetCastleData "payg_cas04.gat",12,0;
+ SetCastleData "payg_cas04.gat",13,0;
+ SetCastleData "payg_cas04.gat",14,0;
+ SetCastleData "payg_cas04.gat",15,0;
+ SetCastleData "payg_cas04.gat",16,0;
+ SetCastleData "payg_cas04.gat",17,0;
+ SetCastleData "payg_cas04.gat",18,0;
+ SetCastleData "payg_cas04.gat",19,0;
+ SetCastleData "payg_cas04.gat",20,0;
+ SetCastleData "payg_cas04.gat",21,0;
+ SetCastleData "payg_cas04.gat",22,0;
+ SetCastleData "payg_cas04.gat",23,0;
+ SetCastleData "payg_cas04.gat",24,0;
+ SetCastleData "payg_cas04.gat",25,0;
+ Announce "[" + GetGuildName(@GIDf4) + "] has surrendered Agit [" + GetCastleName("payg_cas04.gat") + "]",0;
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),7;
+ break;
+ L7_2:
+ mes "[ DJ ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/payg_cas05.txt b/npc/guild/old/payg_cas05.txt
new file mode 100644
index 000000000..90261b0e8
--- /dev/null
+++ b/npc/guild/old/payg_cas05.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas05 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in payg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+payg_cas05.gat,32,249,4 script Zhulinxian#f5-6::ZhulinxianNW 722,{
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (@GIDf5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ break;
+}
+
+payg_cas05.gat,24,249,4 duplicate(ZhulinxianNW) Zhulinxian#f5-7 722
+payg_cas05.gat,62,271,0 duplicate(ZhulinxianNW) Zhulinxian#f5-8 722
+payg_cas05.gat,57,271,0 duplicate(ZhulinxianNW) Zhulinxian#f5-9 722
+payg_cas05.gat,55,252,2 duplicate(ZhulinxianNW) Zhulinxian#f5-10 722
+payg_cas05.gat,55,260,2 duplicate(ZhulinxianNW) Zhulinxian#f5-11 722
+
+//================================================
+// Kafra Service
+//================================================
+payg_cas05.gat,276,227,1 script Kafra Service#pay5 117,{
+ cutin "kafra_01",2;
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (getcharid(2) == @GIDf5) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDf5) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDf5) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Payon -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "payon.gat",82,128;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("payg_cas05.gat",9) == 1) break;
+ disablenpc "Kafra Service#pay5";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+payg_cas05.gat,238,11,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (getcharid(2) != @GIDf5) goto L1n;
+ warp "gld_dun01.gat",223,202;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+payg_cas05.gat,277,249,3 script Najarf 55,{
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (@GIDf5 == 0) goto LStart;
+ if (getcharid(2) != @GIDf5) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDf5)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Najarf ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDf5) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDf5) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Najarf ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Najarf ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDf5) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Najarf ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDf5) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Najarf ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("payg_cas05.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("payg_cas05.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("payg_cas05.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("payg_cas05.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("payg_cas05.gat",4);
+ set @Economy,GetCastleData("payg_cas05.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Najarf ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Najarf ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Najarf ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas05.gat",2,@Economy+1;
+ mes "[ Najarf ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Najarf ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Najarf ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "payg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "payg_cas05.gat",2,@Economy+1;
+ mes "[ Najarf ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Najarf ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Najarf ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("payg_cas05.gat",5);
+ set @Defence,GetCastleData("payg_cas05.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Najarf ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Najarf ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Najarf ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas05.gat",3,@Defence+1;
+ mes "[ Najarf ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Najarf ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Najarf ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "payg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "payg_cas05.gat",3,@Defence+1;
+ mes "[ Najarf ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Najarf ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Najarf ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("payg_cas05.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Najarf ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("payg_cas05.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("payg_cas05.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("payg_cas05.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("payg_cas05.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("payg_cas05.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("payg_cas05.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("payg_cas05.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("payg_cas05.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Najarf ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Najarf ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "payg_cas05.gat",@GDnum,1;
+ SetCastleData "payg_cas05.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_C05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas05.gat",46,273,"Archer Guardian",1285,1,"Guardian_C05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_C05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_C05::OnGuardianDied",7;
+ mes "[ Najarf ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Najarf ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Najarf ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Najarf ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("payg_cas05.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Najarf ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Najarf ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Najarf ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#pay5";
+ SetCastleData "payg_cas05.gat",9,1;
+ mes "[ Najarf ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Najarf ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Najarf ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Najarf ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#pay5";
+ SetCastleData "payg_cas05.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Najarf ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Najarf ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Najarf ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Najarf ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "payg_cas05",156,131;
+ L6_1:
+ mes "[ Najarf ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Najarf ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Najarf ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Najarf ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "payg_cas05.gat",1,0;
+ SetCastleData "payg_cas05.gat",2,0;
+ SetCastleData "payg_cas05.gat",3,0;
+ SetCastleData "payg_cas05.gat",4,0;
+ SetCastleData "payg_cas05.gat",5,0;
+ SetCastleData "payg_cas05.gat",6,0;
+ SetCastleData "payg_cas05.gat",7,0;
+ SetCastleData "payg_cas05.gat",8,0;
+ SetCastleData "payg_cas05.gat",9,0;
+ SetCastleData "payg_cas05.gat",10,0;
+ SetCastleData "payg_cas05.gat",11,0;
+ SetCastleData "payg_cas05.gat",12,0;
+ SetCastleData "payg_cas05.gat",13,0;
+ SetCastleData "payg_cas05.gat",14,0;
+ SetCastleData "payg_cas05.gat",15,0;
+ SetCastleData "payg_cas05.gat",16,0;
+ SetCastleData "payg_cas05.gat",17,0;
+ SetCastleData "payg_cas05.gat",18,0;
+ SetCastleData "payg_cas05.gat",19,0;
+ SetCastleData "payg_cas05.gat",20,0;
+ SetCastleData "payg_cas05.gat",21,0;
+ SetCastleData "payg_cas05.gat",22,0;
+ SetCastleData "payg_cas05.gat",23,0;
+ SetCastleData "payg_cas05.gat",24,0;
+ SetCastleData "payg_cas05.gat",25,0;
+ Announce "[" + GetGuildName(@GIDf5) + "] has surrendered Agit [" + GetCastleName("payg_cas05.gat") + "]",0;
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Najarf ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/payg_flag.txt b/npc/guild/old/payg_flag.txt
new file mode 100644
index 000000000..e00a87c08
--- /dev/null
+++ b/npc/guild/old/payg_flag.txt
@@ -0,0 +1,360 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in Payon and pay_gld
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//= 1.2 Darkchild/MissActek Flags moved to a better spot till we know exact
+//= 1.3 To exact spot
+//= 1.4 Better spots
+//============================================================
+
+//Payon Castle 01 - Mingting
+payon.gat,165,177,3 script Mingting#f1-1 722,{
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (@GIDf1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ break;
+}
+
+pay_gld.gat,125,236,4 script Mingting#f1-2::MingtingW 722,{
+ set @GIDf1,GetCastleData("payg_cas01.gat",1);
+ if (@GIDf1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDf1) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "payg_cas01.gat",87,29;
+ break;
+OnRecvCastleF01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ break;
+}
+
+pay_gld.gat,110,233,4 duplicate(MingtingW) Mingting#f1-3 722
+pay_gld.gat,116,233,4 duplicate(MingtingW) Mingting#f1-4 722
+pay_gld.gat,91,239,2 duplicate(MingtingW) Mingting#f1-5 722
+
+//Payon Castle 02 - Tiantan
+
+payon.gat,165,173,3 script Tiantan#f2-1 722,{
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (@GIDf2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ break;
+}
+
+pay_gld.gat,292,112,6 script Tiantan#f2-2::TiantanW 722,{
+ set @GIDf2,GetCastleData("payg_cas02.gat",1);
+ if (@GIDf2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDf2) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "payg_cas02.gat",22,275;
+ break;
+OnRecvCastleF02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ break;
+}
+
+pay_gld.gat,292,120,6 duplicate(TiantanW) Tiantan#f2-3 722
+pay_gld.gat,291,135,6 duplicate(TiantanW) Tiantan#f2-4 722
+pay_gld.gat,271,163,0 duplicate(TiantanW) Tiantan#f2-5 722
+
+//Payon Castle 03 - Fuying
+
+payon.gat,165,169,3 script Fuying#f3-1 722,{
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (@GIDf3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ break;
+}
+
+pay_gld.gat,321,298,2 script Fuying#f3-2::FuyingW 722,{
+ set @GIDf3,GetCastleData("payg_cas03.gat",1);
+ if (@GIDf3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDf3) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "payg_cas03.gat",9,263;
+ break;
+OnRecvCastleF03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ break;
+}
+
+pay_gld.gat,321,289,2 duplicate(FuyingW) Fuying#f3-3 722
+pay_gld.gat,327,304,1 duplicate(FuyingW) Fuying#f3-4 722
+pay_gld.gat,333,254,4 duplicate(FuyingW) Fuying#f3-5 722
+
+//Payon Castle 04 - Honglou
+
+payon.gat,165,165,3 script Honglou#f4-1 722,{
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (@GIDf4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ break;
+}
+
+pay_gld.gat,143,160,0 script Honglou#f4-2::HonglouW 722,{
+ set @GIDf4,GetCastleData("payg_cas04.gat",1);
+ if (@GIDf4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDf4) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "payg_cas04.gat",40,235;
+ break;
+OnRecvCastleF04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ break;
+}
+
+pay_gld.gat,143,160,0 duplicate(HonglouW) Honglou#f4-3 722
+pay_gld.gat,133,151,2 duplicate(HonglouW) Honglou#f4-4 722
+pay_gld.gat,153,166,1 duplicate(HonglouW) Honglou#f4-5 722
+
+//Payon Castle 05 - Zhulinxian
+
+payon.gat,165,161,3 script Zhulinxian#f5-1 722,{
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (@GIDf5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleF05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ break;
+}
+
+pay_gld.gat,208,268,4 script Zhulinxian#f5-2::ZhulinxianW 722,{
+ set @GIDf5,GetCastleData("payg_cas05.gat",1);
+ if (@GIDf5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDf5) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Payon ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Payon,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDf5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDf5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDf5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "payg_cas05.gat",276,227;
+ break;
+OnRecvCastleF05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ break;
+}
+
+pay_gld.gat,199,268,4 duplicate(ZhulinxianW) Zhulinxian#f5-3 722
+pay_gld.gat,190,277,3 duplicate(ZhulinxianW) Zhulinxian#f5-4 722
+pay_gld.gat,187,294,2 duplicate(ZhulinxianW) Zhulinxian#f5-5 722 \ No newline at end of file
diff --git a/npc/guild/old/prtg_cas01.txt b/npc/guild/old/prtg_cas01.txt
new file mode 100644
index 000000000..e1698b435
--- /dev/null
+++ b/npc/guild/old/prtg_cas01.txt
@@ -0,0 +1,670 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas01 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in prtg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+prtg_cas01.gat,58,56,4 script Creamhilt#p1-7::CreamhiltNW 722,{
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (@GIDp1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ break;
+}
+
+prtg_cas01.gat,64,56,4 duplicate(CreamhiltNW) Creamhilt#p1-8 722
+prtg_cas01.gat,76,32,4 duplicate(CreamhiltNW) Creamhilt#p1-9 722
+prtg_cas01.gat,84,32,4 duplicate(CreamhiltNW) Creamhilt#p1-10 722
+prtg_cas01.gat,94,39,4 duplicate(CreamhiltNW) Creamhilt#p1-11 722
+prtg_cas01.gat,94,24,4 duplicate(CreamhiltNW) Creamhilt#p1-12 722
+prtg_cas01.gat,73,14,4 duplicate(CreamhiltNW) Creamhilt#p1-13 722
+prtg_cas01.gat,73,6,4 duplicate(CreamhiltNW) Creamhilt#p1-14 722
+prtg_cas01.gat,55,46,4 duplicate(CreamhiltNW) Creamhilt#p1-15 722
+prtg_cas01.gat,45,46,4 duplicate(CreamhiltNW) Creamhilt#p1-16 722
+
+//================================================
+// Kafra Service
+//================================================
+prtg_cas01.gat,96,173,0 script Kafra Service#prt1 117,{
+ cutin "kafra_01",2;
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (getcharid(2) == @GIDp1) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDp1) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDp1) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Prontera -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "prontera.gat",278,211;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("prtg_cas01.gat",9) == 1) break;
+ disablenpc "Kafra Service#prt1";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+prtg_cas01.gat,94,200,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (getcharid(2) != @GIDp1) goto L1n;
+ warp "gld_dun03.gat",28,251;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+prtg_cas01.gat,112,181,0 script Abrai 55,{
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (@GIDp1 == 0) goto LStart;
+ if (getcharid(2) != @GIDp1) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDp1)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Abrai ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDp1) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDp1) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Abrai ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! Follow your destiny!";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Abrai ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDp1) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Abrai ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDp1) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Abrai ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("prtg_cas01.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("prtg_cas01.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("prtg_cas01.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("prtg_cas01.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("prtg_cas01.gat",4);
+ set @Economy,GetCastleData("prtg_cas01.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Abrai ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Abrai ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Abrai ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas01.gat",2,@Economy+1;
+ mes "[ Abrai ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Abrai ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Abrai ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas01.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas01.gat",2,@Economy+1;
+ mes "[ Abrai ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Abrai ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Abrai ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("prtg_cas01.gat",5);
+ set @Defence,GetCastleData("prtg_cas01.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Abrai ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Abrai ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Abrai ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas01.gat",3,@Defence+1;
+ mes "[ Abrai ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Abrai ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Abrai ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas01.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas01.gat",3,@Defence+1;
+ mes "[ Abrai ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Abrai ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Abrai ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("prtg_cas01.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Abrai ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("prtg_cas01.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("prtg_cas01.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("prtg_cas01.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("prtg_cas01.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("prtg_cas01.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("prtg_cas01.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("prtg_cas01.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("prtg_cas01.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+
+ L4_9:
+ mes "[ Abrai ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Abrai ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "prtg_cas01.gat",@GDnum,1;
+ SetCastleData "prtg_cas01.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_D01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_D01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_D01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_D01::OnGuardianDied",7;
+ mes "[ Abrai ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Abrai ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Abrai ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Abrai ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("prtg_cas01.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Abrai ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Abrai ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Abrai ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#prt1";
+ SetCastleData "prtg_cas01.gat",9,1;
+ mes "[ Abrai ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Abrai ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Abrai ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Abrai ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#prt1";
+ SetCastleData "prtg_cas01.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Abrai ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Abrai ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Abrai ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Abrai ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "prtg_cas01",15,209;
+ L6_1:
+ mes "[ Abrai ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Abrai ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Abrai ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Abrai ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "prtg_cas01.gat",1,0;
+ SetCastleData "prtg_cas01.gat",2,0;
+ SetCastleData "prtg_cas01.gat",3,0;
+ SetCastleData "prtg_cas01.gat",4,0;
+ SetCastleData "prtg_cas01.gat",5,0;
+ SetCastleData "prtg_cas01.gat",6,0;
+ SetCastleData "prtg_cas01.gat",7,0;
+ SetCastleData "prtg_cas01.gat",8,0;
+ SetCastleData "prtg_cas01.gat",9,0;
+ SetCastleData "prtg_cas01.gat",10,0;
+ SetCastleData "prtg_cas01.gat",11,0;
+ SetCastleData "prtg_cas01.gat",12,0;
+ SetCastleData "prtg_cas01.gat",13,0;
+ SetCastleData "prtg_cas01.gat",14,0;
+ SetCastleData "prtg_cas01.gat",15,0;
+ SetCastleData "prtg_cas01.gat",16,0;
+ SetCastleData "prtg_cas01.gat",17,0;
+ SetCastleData "prtg_cas01.gat",18,0;
+ SetCastleData "prtg_cas01.gat",19,0;
+ SetCastleData "prtg_cas01.gat",20,0;
+ SetCastleData "prtg_cas01.gat",21,0;
+ SetCastleData "prtg_cas01.gat",22,0;
+ SetCastleData "prtg_cas01.gat",23,0;
+ SetCastleData "prtg_cas01.gat",24,0;
+ SetCastleData "prtg_cas01.gat",25,0;
+ Announce "[" + GetGuildName(@GIDp1) + "] has surrendered Agit [" + GetCastleName("prtg_cas01.gat") + "]",0;
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Abrai ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/prtg_cas02.txt b/npc/guild/old/prtg_cas02.txt
new file mode 100644
index 000000000..cb38318c6
--- /dev/null
+++ b/npc/guild/old/prtg_cas02.txt
@@ -0,0 +1,667 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas02 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in prtg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+prtg_cas02.gat,40,227,4 script Sbanhealt#p2-7::SbanhealtNW 722,{
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (@GIDp2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ break;
+}
+
+prtg_cas02.gat,46,227,4 duplicate(SbanhealtNW) Sbanhealt#p2-8 722
+prtg_cas02.gat,11,219,4 duplicate(SbanhealtNW) Sbanhealt#p2-9 722
+prtg_cas02.gat,11,214,4 duplicate(SbanhealtNW) Sbanhealt#p2-10 722
+prtg_cas02.gat,20,219,4 duplicate(SbanhealtNW) Sbanhealt#p2-11 722
+prtg_cas02.gat,20,214,4 duplicate(SbanhealtNW) Sbanhealt#p2-12 722
+prtg_cas02.gat,79,227,8 duplicate(SbanhealtNW) Sbanhealt#p2-13 722
+prtg_cas02.gat,70,227,8 duplicate(SbanhealtNW) Sbanhealt#p2-14 722
+prtg_cas02.gat,38,189,8 duplicate(SbanhealtNW) Sbanhealt#p2-15 722
+prtg_cas02.gat,34,189,8 duplicate(SbanhealtNW) Sbanhealt#p2-16 722
+prtg_cas02.gat,153,161,4 duplicate(SbanhealtNW) Sbanhealt#p2-17 722
+prtg_cas02.gat,162,161,4 duplicate(SbanhealtNW) Sbanhealt#p2-18 722
+
+//================================================
+// Kafra Service
+//================================================
+prtg_cas02.gat,71,36,4 script Kafra Service#prt2 117,{
+ cutin "kafra_01",2;
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (getcharid(2) == @GIDp2) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDp2) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome, ^ff0000" + GetGuildName(@GIDp2) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Prontera -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "prontera.gat",278,211;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("prtg_cas02.gat",9) == 1) break;
+ disablenpc "Kafra Service#prt2";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+prtg_cas02.gat,84,72,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (getcharid(2) != @GIDp2) goto L1n;
+ warp "gld_dun03.gat",164,268;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+//================================================
+// Guild Castle Manager
+//================================================
+
+prtg_cas02.gat,94,61,0 script Rhay 55,{
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (@GIDp2 == 0) goto LStart;
+ if (getcharid(2) != @GIDp2) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDp2)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Rhay ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDp2) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDp2) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Rhay ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! follow your destiny!...";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Rhay ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDp2) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Rhay ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDp2) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employement / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Rhay ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("prtg_cas02.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("prtg_cas02.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("prtg_cas02.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("prtg_cas02.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("prtg_cas02.gat",4);
+ set @Economy,GetCastleData("prtg_cas02.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Rhay ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Rhay ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Rhay ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas02.gat",2,@Economy+1;
+ mes "[ Rhay ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Rhay ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Rhay ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas02.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas02.gat",2,@Economy+1;
+ mes "[ Rhay ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Rhay ]";
+ mes " ";
+ mes "^ff0000This Castle's Commerce Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Rhay ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("prtg_cas02.gat",5);
+ set @Defence,GetCastleData("prtg_cas02.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Rhay ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Rhay ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Rhay ]";
+ mes "As you wish, master.";
+ close;
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas02.gat",3,@Deffence+1;
+ mes "[ Rhay ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Rhay ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Rhay ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas02.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas02.gat",3,@Defence+1;
+ mes "[ Rhay ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Rhay ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Rhay ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("prtg_cas02.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+ mes "[ Rhay ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("prtg_cas02.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("prtg_cas02.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("prtg_cas02.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("prtg_cas02.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("prtg_cas02.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("prtg_cas02.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("prtg_cas02.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("prtg_cas02.gat",17) == 1) goto L4Error2;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_9:
+ mes "[ Rhay ]";
+ mes "Would you really like to install guardian? You need 10000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Rhay ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "prtg_cas02.gat",@GDnum,1;
+SetCastleData "prtg_cas01.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_D02::GuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_D02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_D02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_D02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_D02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_D02::OnGuardianDied",7;
+ mes "[ Rhay ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Rhay ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Rhay ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Rhay ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("prtg_cas02.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Rhay ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Rhay ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Rhay ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#prt2";
+ SetCastleData "prtg_cas02.gat",9,1;
+ mes "[ Rhay ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Rhay ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Rhay ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Rhay ]";
+ mes "Would you like to dismiss the current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I did anything wrong? If yes, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#prt2";
+ SetCastleData "prtg_cas02.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Rhay ]";
+mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Rhay ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Rhay ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Rhay ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "prtg_cas02",15,209;
+ L6_1:
+ mes "[ Rhay ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Rhay ]";
+ mes "Master!!";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Rhay ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Rhay ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "prtg_cas02.gat",1,0;
+ SetCastleData "prtg_cas02.gat",2,0;
+ SetCastleData "prtg_cas02.gat",3,0;
+ SetCastleData "prtg_cas02.gat",4,0;
+ SetCastleData "prtg_cas02.gat",5,0;
+ SetCastleData "prtg_cas02.gat",6,0;
+ SetCastleData "prtg_cas02.gat",7,0;
+ SetCastleData "prtg_cas02.gat",8,0;
+ SetCastleData "prtg_cas02.gat",9,0;
+ SetCastleData "prtg_cas02.gat",10,0;
+ SetCastleData "prtg_cas02.gat",11,0;
+ SetCastleData "prtg_cas02.gat",12,0;
+ SetCastleData "prtg_cas02.gat",13,0;
+ SetCastleData "prtg_cas02.gat",14,0;
+ SetCastleData "prtg_cas02.gat",15,0;
+ SetCastleData "prtg_cas02.gat",16,0;
+ SetCastleData "prtg_cas02.gat",17,0;
+ SetCastleData "prtg_cas02.gat",18,0;
+ SetCastleData "prtg_cas02.gat",19,0;
+ SetCastleData "prtg_cas02.gat",20,0;
+ SetCastleData "prtg_cas02.gat",21,0;
+ SetCastleData "prtg_cas02.gat",22,0;
+ SetCastleData "prtg_cas02.gat",23,0;
+ SetCastleData "prtg_cas02.gat",24,0;
+ SetCastleData "prtg_cas02.gat",25,0;
+ Announce "[" + GetGuildName(@GIDp2) + "] has surrendered Agit [" + GetCastleName("prtg_cas02.gat") + "]",0;
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Rhay ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+
+}
diff --git a/npc/guild/old/prtg_cas03.txt b/npc/guild/old/prtg_cas03.txt
new file mode 100644
index 000000000..ef81bbef9
--- /dev/null
+++ b/npc/guild/old/prtg_cas03.txt
@@ -0,0 +1,667 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas03 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in prtg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+
+prtg_cas03.gat,168,28,4 script Lazrigees#p3-7::LazrigeesNW 722,{
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (@GIDp3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ break;
+}
+
+prtg_cas03.gat,182,28,4 duplicate(LazrigeesNW) Lazrigees#p3-8 722
+prtg_cas03.gat,43,50,4 duplicate(LazrigeesNW) Lazrigees#p3-9 722
+prtg_cas03.gat,48,50,4 duplicate(LazrigeesNW) Lazrigees#p3-10 722
+prtg_cas03.gat,43,58,4 duplicate(LazrigeesNW) Lazrigees#p3-11 722
+prtg_cas03.gat,48,58,4 duplicate(LazrigeesNW) Lazrigees#p3-12 722
+prtg_cas03.gat,158,210,4 duplicate(LazrigeesNW) Lazrigees#p3-13 722
+prtg_cas03.gat,169,210,4 duplicate(LazrigeesNW) Lazrigees#p3-14 722
+prtg_cas03.gat,162,201,4 duplicate(LazrigeesNW) Lazrigees#p3-15 722
+prtg_cas03.gat,165,201,4 duplicate(LazrigeesNW) Lazrigees#p3-16 722
+
+//================================================
+// Kafra Service
+//================================================
+prtg_cas03.gat,181,215,4 script Kafra Service#prt3 117,{
+ cutin "kafra_01",2;
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (getcharid(2) == @GIDp3) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDp3) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome. ^ff0000" + GetGuildName(@GIDp3) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Prontera -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "prontera.gat",278,211;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("prtg_cas03.gat",9) == 1) break;
+ disablenpc "Kafra Service#prt3";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+
+prtg_cas03.gat,5,70,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (getcharid(2) != @GIDp3) goto L1n;
+ warp "gld_dun03.gat",164,179;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+prtg_cas03.gat,51,100,4 script Stick 55,{
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (@GIDp3 == 0) goto LStart;
+ if (getcharid(2) != @GIDp3) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDp3)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Stick ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDp3) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDp3) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Stick ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! follow your destiny!...";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Stick ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDp3) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Stick ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDp3) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Stick ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("prtg_cas03.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("prtg_cas03.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("prtg_cas03.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("prtg_cas03.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("prtg_cas03.gat",4);
+ set @Economy,GetCastleData("prtg_cas03.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Stick ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Stick ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Stick ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas03.gat",2,@Economy+1;
+ mes "[ Stick ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Stick ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Stick ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas03.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas03.gat",2,@Economy+1;
+ mes "[ Stick ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Stick ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Stick ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("prtg_cas03.gat",5);
+ set @Defence,GetCastleData("prtg_cas03.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Stick ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Stick ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Stick ]";
+ mes "As you wish, master.";
+ close;
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas03.gat",3,@Defence+1;
+ mes "[ Stick ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Stick ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Stick ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas03.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas03.gat",3,@Defence+1;
+ mes "[ Stick ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Stick ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Stick ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("prtg_cas03.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Stick ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("prtg_cas03.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("prtg_cas03.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("prtg_cas03.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("prtg_cas03.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("prtg_cas03.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("prtg_cas03.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("prtg_cas03.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("prtg_cas03.gat",17) == 1) goto L4Error2;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_9:
+ mes "[ Stick ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Stick ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "prtg_cas03.gat",@GDnum,1;
+ SetCastleData "prtg_cas03.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_D03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_D03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_D03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_D03::OnGuardianDied",7;
+ mes "[ Stick ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Stick ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Stick ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Stick ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("prtg_cas03.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Stick ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Stick ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Stick ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#prt3";
+ SetCastleData "prtg_cas03.gat",9,1;
+ mes "[ Stick ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Stick ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Stick ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Stick ]";
+ mes "Would you like to dismiss current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "What have I done wrong? if so, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#prt3";
+ SetCastleData "prtg_cas03.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Stick ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Stick ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Stick ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Stick ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "prtg_cas03",189,132;
+ L6_1:
+ mes "[ Stick ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Stick ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Stick ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Stick ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "prtg_cas03.gat",1,0;
+ SetCastleData "prtg_cas03.gat",2,0;
+ SetCastleData "prtg_cas03.gat",3,0;
+ SetCastleData "prtg_cas03.gat",4,0;
+ SetCastleData "prtg_cas03.gat",5,0;
+ SetCastleData "prtg_cas03.gat",6,0;
+ SetCastleData "prtg_cas03.gat",7,0;
+ SetCastleData "prtg_cas03.gat",8,0;
+ SetCastleData "prtg_cas03.gat",9,0;
+ SetCastleData "prtg_cas03.gat",10,0;
+ SetCastleData "prtg_cas03.gat",11,0;
+ SetCastleData "prtg_cas03.gat",12,0;
+ SetCastleData "prtg_cas03.gat",13,0;
+ SetCastleData "prtg_cas03.gat",14,0;
+ SetCastleData "prtg_cas03.gat",15,0;
+ SetCastleData "prtg_cas03.gat",16,0;
+ SetCastleData "prtg_cas03.gat",17,0;
+ SetCastleData "prtg_cas03.gat",18,0;
+ SetCastleData "prtg_cas03.gat",19,0;
+ SetCastleData "prtg_cas03.gat",20,0;
+ SetCastleData "prtg_cas03.gat",21,0;
+ SetCastleData "prtg_cas03.gat",22,0;
+ SetCastleData "prtg_cas03.gat",23,0;
+ SetCastleData "prtg_cas03.gat",24,0;
+ SetCastleData "prtg_cas03.gat",25,0;
+ Announce "[" + GetGuildName(@GIDp3) + "] has surrendered Agit [" + GetCastleName("prtg_cas03.gat") + "]",0;
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Stick ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+}
diff --git a/npc/guild/old/prtg_cas04.txt b/npc/guild/old/prtg_cas04.txt
new file mode 100644
index 000000000..8579401ae
--- /dev/null
+++ b/npc/guild/old/prtg_cas04.txt
@@ -0,0 +1,666 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas04 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in prtg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+prtg_cas04.gat,82,29,4 script Squagul#p4-7::SquagulNW 722,{
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (@GIDp4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ break;
+}
+
+prtg_cas04.gat,75,29,4 duplicate(SquagulNW) Squagul#p4-8 722
+prtg_cas04.gat,75,27,4 duplicate(SquagulNW) Squagul#p4-9 722
+prtg_cas04.gat,82,27,4 duplicate(SquagulNW) Squagul#p4-10 722
+prtg_cas04.gat,59,29,4 duplicate(SquagulNW) Squagul#p4-11 722
+prtg_cas04.gat,67,29,4 duplicate(SquagulNW) Squagul#p4-12 722
+prtg_cas04.gat,258,25,4 duplicate(SquagulNW) Squagul#p4-13 722
+prtg_cas04.gat,258,20,4 duplicate(SquagulNW) Squagul#p4-14 722
+prtg_cas04.gat,263,20,4 duplicate(SquagulNW) Squagul#p4-15 722
+prtg_cas04.gat,263,27,4 duplicate(SquagulNW) Squagul#p4-16 722
+
+//================================================
+// Kafra Service
+//================================================
+prtg_cas04.gat,258,247,4 script Kafra Service#prt4 117,{
+ cutin "kafra_01",2;
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (getcharid(2) == @GIDp4) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDp4) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome. ^ff0000" + GetGuildName(@GIDp4) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Prontera -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "prontera.gat",278,211;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+//No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("prtg_cas04.gat",9) == 1) break;
+ disablenpc "Kafra Service#prt4";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+
+prtg_cas04.gat,56,283,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (getcharid(2) != @GIDp4) goto L1n;
+ warp "gld_dun03.gat",268,203;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+prtg_cas04.gat,259,265,4 script Bandred 55,{
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (@GIDp4 == 0) goto LStart;
+ if (getcharid(2) != @GIDp4) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDp4)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Bandred ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDp4) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDp4) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Bandred ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! follow your destiny!...";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Bandred ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDp4) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Bandred ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDp4) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Bandred ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("prtg_cas04.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("prtg_cas04.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("prtg_cas04.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("prtg_cas04.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("prtg_cas04.gat",4);
+ set @Economy,GetCastleData("prtg_cas04.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Bandred ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Bandred ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Bandred ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas04.gat",2,@Economy+1;
+ mes "[ Bandred ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Bandred ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Bandred ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas04.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas04.gat",2,@Economy+1;
+ mes "[ Bandred ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Bandred ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Bandred ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("prtg_cas04.gat",5);
+ set @Defence,GetCastleData("prtg_cas04.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Bandred ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Bandred ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Bandred ]";
+ mes "As you wish, master.";
+ close;
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas04.gat",3,@Defence+1;
+ mes "[ Bandred ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Bandred ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Bandred ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas04.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas04.gat",3,@Defence+1;
+ mes "[ Bandred ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Bandred ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Bandred ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("prtg_cas04.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Bandred ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("prtg_cas04.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("prtg_cas04.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("prtg_cas04.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("prtg_cas04.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("prtg_cas04.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("prtg_cas04.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("prtg_cas04.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("prtg_cas04.gat",17) == 1) goto L4Error2;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_9:
+ mes "[ Bandred ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Bandred ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "prtg_cas04.gat",@GDnum,1;
+ SetCastleData "prtg_cas04.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",7;
+ mes "[ Bandred ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Bandred ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Bandred ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Bandred ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("prtg_cas04.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Bandred ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Bandred ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Bandred ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#prt4";
+ SetCastleData "prtg_cas04.gat",9,1;
+ mes "[ Bandred ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Bandred ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Bandred ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Bandred ]";
+ mes "Would you like to dismiss current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "What have I done wrong? if so, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#prt4";
+ SetCastleData "prtg_cas04.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Bandred ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Bandred ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Bandred ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Bandred ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "prtg_cas04",271,162;
+ L6_1:
+ mes "[ Bandred ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Bandred ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Bandred ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Bandred ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "prtg_cas04.gat",1,0;
+ SetCastleData "prtg_cas04.gat",2,0;
+ SetCastleData "prtg_cas04.gat",3,0;
+ SetCastleData "prtg_cas04.gat",4,0;
+ SetCastleData "prtg_cas04.gat",5,0;
+ SetCastleData "prtg_cas04.gat",6,0;
+ SetCastleData "prtg_cas04.gat",7,0;
+ SetCastleData "prtg_cas04.gat",8,0;
+ SetCastleData "prtg_cas04.gat",9,0;
+ SetCastleData "prtg_cas04.gat",10,0;
+ SetCastleData "prtg_cas04.gat",11,0;
+ SetCastleData "prtg_cas04.gat",12,0;
+ SetCastleData "prtg_cas04.gat",13,0;
+ SetCastleData "prtg_cas04.gat",14,0;
+ SetCastleData "prtg_cas04.gat",15,0;
+ SetCastleData "prtg_cas04.gat",16,0;
+ SetCastleData "prtg_cas04.gat",17,0;
+ SetCastleData "prtg_cas04.gat",18,0;
+ SetCastleData "prtg_cas04.gat",19,0;
+ SetCastleData "prtg_cas04.gat",20,0;
+ SetCastleData "prtg_cas04.gat",21,0;
+ SetCastleData "prtg_cas04.gat",22,0;
+ SetCastleData "prtg_cas04.gat",23,0;
+ SetCastleData "prtg_cas04.gat",24,0;
+ SetCastleData "prtg_cas04.gat",25,0;
+ Announce "[" + GetGuildName(@GIDp4) + "] has surrendered Agit [" + GetCastleName("prtg_cas04.gat") + "]",0;
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Bandred ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+} \ No newline at end of file
diff --git a/npc/guild/old/prtg_cas05.txt b/npc/guild/old/prtg_cas05.txt
new file mode 100644
index 000000000..8f39492e0
--- /dev/null
+++ b/npc/guild/old/prtg_cas05.txt
@@ -0,0 +1,664 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas05 script
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Guild Flags, Kafra and Guild Manager scripts in prtg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//============================================================
+
+prtg_cas05.gat,19,247,4 script Guindull#p5-7::GuindullNW 722,{
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (@GIDp5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP04:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ break;
+}
+
+prtg_cas05.gat,19,243,4 duplicate(GuindullNW) Guindull#p5-8 722
+prtg_cas05.gat,26,247,4 duplicate(GuindullNW) Guindull#p5-9 722
+prtg_cas05.gat,26,243,4 duplicate(GuindullNW) Guindull#p5-10 722
+prtg_cas05.gat,249,289,4 duplicate(GuindullNW) Guindull#p5-11 722
+prtg_cas05.gat,256,289,4 duplicate(GuindullNW) Guindull#p5-12 722
+prtg_cas05.gat,253,271,4 duplicate(GuindullNW) Guindull#p5-13 722
+prtg_cas05.gat,273,257,4 duplicate(GuindullNW) Guindull#p5-14 722
+
+//================================================
+// Kafra Service
+//================================================
+prtg_cas05.gat,52,41,4 script Kafra Service#prt5 117,{
+ cutin "kafra_01",2;
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (getcharid(2) == @GIDp5) goto LStartg;
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^ff0000" + GetGuildName(@GIDp5) + "^000000 members. Please use different Kafra Service. Thank you.";
+ goto L_EXIT;
+LStartg:
+ mes "[Kafra Service]";
+ mes "Welcome. ^ff0000" + GetGuildName(@GIDp5) + "^000000 members";
+ mes "We will stay with you wherever you go";
+ next;
+ menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
+//================================================
+// Storage
+//================================================
+L2:
+ if(getskilllv(1) < 6) goto Lerror2_1;
+ openstorage;
+ goto L_EXIT;
+ Lerror2_1:
+ mes "[Kafra Service]";
+ mes "You must have lvl 6 or higher novice skill.";
+ goto L_EXIT;
+//================================================
+// Teleport Service
+//================================================
+L3:
+ mes "[Kafra Service]";
+ mes "Please confirm your destination.";
+ next;
+ menu "Prontera -> 200 z",L3_1,"Cancel",L3_2;
+ L3_1:
+ if (Zeny < 200) goto Lerror3;
+ set Zeny,Zeny-200;
+ warp "prontera.gat",278,211;
+break;
+ L3_2:
+ mes "[Kafra Service]";
+ mes "Kafra Service always trying to offer best service for you.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ Lerror3:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough Zeny to use the teleport service.";
+ goto L_EXIT;
+//================================================
+// Cart Rental
+//================================================
+L4:
+ if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
+ if (checkcart(0) == 1) goto Lerror4_3;
+ mes "[Kafra Service]";
+ mes "The cart rental fee is 800 Zeny.";
+ mes "Would you like to rent a cart?";
+ next;
+ menu "Rent a Cart",L4_1,"Cancel",-;
+ mes "[Kafra Service]";
+ mes "We always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+ L4_1:
+ If(getskilllv(39) == 0) goto Lerror4_4;
+ if (Zeny < 800) goto Lerror4_2;
+ set Zeny,Zeny-800;
+ setcart;
+ goto L_EXIT;
+ //Not a merchant class
+ Lerror4_1:
+ mes "[Kafra Service]";
+ mes "Sorry, the cart rental service is only for the merchant class.";
+ goto L_EXIT;
+ //Not enough zenny
+ Lerror4_2:
+ mes "[Kafra Service]";
+ mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
+ goto L_EXIT;
+ //Already have cart
+ Lerror4_3:
+ mes "[Kafra Service]";
+ mes "Sorry, you already have a cart now.";
+ mes "Return when you dont have one and are in need of our service.";
+ goto L_EXIT;
+ //No Pushcart Skill
+ Lerror4_4:
+ mes "[Kafra Service]";
+ mes "Sorry, you need to learn the skill [Pushcart] first";
+ goto L_EXIT;
+//================================================
+// Cancel
+//================================================
+L7:
+ mes "[Kafra Service]";
+ mes "We will always try to serve you better.";
+ mes "Thank you for using our service.";
+ goto L_EXIT;
+L_EXIT:
+ cutin "kafra_01",255;
+ close;
+OnInit:
+ if (GetCastleData("prtg_cas05.gat",9) == 1) break;
+ disablenpc "Kafra Service#prt5";
+ break;
+}
+
+//================================================
+// Guild Dungeon Switch
+//================================================
+
+prtg_cas05.gat,56,283,0 script Switch 111,{
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' Only brave man get to lead the guild base.. '";
+ next;
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",-,"No",L2;
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (getcharid(2) != @GIDp5) goto L1n;
+ warp "gld_dun03.gat",199,28;
+ break;
+L1n:
+ mes "[ Vibration of Man's Voice ]";
+ mes " ' ... ' ";
+L2:
+ close;
+}
+
+//================================================
+// Guild Castle Manager
+//================================================
+
+prtg_cas05.gat,36,37,4 script Reiner 55,{
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (@GIDp5 == 0) goto LStart;
+ if (getcharid(2) != @GIDp5) goto LStart2;
+ if (strcharinfo(0) == getguildmaster(@GIDp5)) goto LStart3;
+ goto LStart1;
+
+//================================================
+// Guild Members
+//================================================
+LStart1:
+ mes "[ Reiner ]";
+ mes "You're not ^ff0000" + getguildmaster(@GIDp5) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDp5) + "^000000 's command only";
+ close;
+//================================================
+// Castle not owned
+//================================================
+LStart:
+ mes "[ Reiner ]";
+ mes "I am waiting for my master.";
+ mes "Brave Player! follow your destiny!...";
+ close;
+//================================================
+// Non-Guild Members
+//================================================
+LStart2:
+ mes "[ Reiner ]";
+ mes "I am here to follow ^ff0000" + getguildmaster(@GIDp5) + "^000000 's command! Where are the guardians? Destroy these bastards!";
+ close;
+//================================================
+// Guild Leader
+//================================================
+LStart3:
+ mes "[ Reiner ]";
+ mes "Welcome Master ^ff0000" + getguildmaster(@GIDp5) + "^000000 !";
+ mes "I'll do anything you tell me to do sir!.";
+ next;
+ menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
+//-----------------------------------------------------------
+//================================================
+// Guild Base Briefing
+//================================================
+L1:
+ mes "[ Reiner ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : " + GetCastleData("prtg_cas05.gat",2) + " points.";
+ mes "^0000ff - You have invested " + GetCastleData("prtg_cas05.gat",4) + "times today.^000000";
+ mes " ";
+ mes "Current Defence Investment is : " + GetCastleData("prtg_cas05.gat",3) + "points.";
+ mes "^0000ff- You have invested" + GetCastleData("prtg_cas05.gat",5) + "times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ close;
+//================================================
+// Commerce Investment
+//================================================
+L2:
+ set @TriggerE,GetCastleData("prtg_cas05.gat",4);
+ set @Economy,GetCastleData("prtg_cas05.gat",2);
+ if(@Economy < 8) set $eco_invest,10000;
+ if(@Economy >= 8) set $eco_invest,20000;
+ if(@Economy >= 16) set $eco_invest,40000;
+ if(@Economy >= 25) set $eco_invest,80000;
+ if(@Economy >= 34) set $eco_invest,160000;
+ if(@Economy >= 44) set $eco_invest,320000;
+ if(@Economy >= 54) set $eco_invest,640000;
+ if(@Economy >= 65) set $eco_invest,1280000;
+ if(@Economy >= 76) set $eco_invest,2560000;
+ if(@Economy >= 88) set $eco_invest,5120000;
+ if(@TriggerE == 0) goto L2_1;
+ if(@TriggerE == 1) goto L2_1_2;
+ if(@Economy >= 100) goto L2_2;
+ mes "[ Reiner ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+L2_1:
+ if(@TriggerE == 1) goto L2_1_2;
+ mes "[ Reiner ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Commerce.",L2_1_1,"Cancel.",-;
+ mes "[ Reiner ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_1:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas05.gat",2,@Economy+1;
+ mes "[ Reiner ]";
+ mes "You have invested successfully.";
+ close;
+
+L2_1_2:
+ set $eco_invest,$eco_invest*4;
+ mes "[ Reiner ]";
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Commerce.",L2_1_3,"Cancel.",-;
+ mes "[ Reiner ]";
+ mes "As you wish, master.";
+ close;
+ L2_1_3:
+ if(Zeny < $eco_invest) goto L2_error;
+ set Zeny,Zeny-$eco_invest;
+ SetCastleData "prtg_cas05.gat",4,@TriggerE+1;
+ SetCastleData "prtg_cas05.gat",2,@Economy+1;
+ mes "[ Reiner ]";
+ mes "You have invested successfully";
+ close;
+
+L2_2:
+ mes "[ Reiner ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+
+L2_error:
+ mes "[ Reiner ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Defence Investment
+//================================================
+L3:
+ set @TriggerD,GetCastleData("prtg_cas05.gat",5);
+ set @Defence,GetCastleData("prtg_cas05.gat",3);
+ if(@Defence < 8) set $def_invest,20000;
+ if(@Defence >= 8) set $def_invest,40000;
+ if(@Defence >= 16) set $def_invest,80000;
+ if(@Defence >= 25) set $def_invest,160000;
+ if(@Defence >= 34) set $def_invest,320000;
+ if(@Defence >= 44) set $def_invest,640000;
+ if(@Defence >= 54) set $def_invest,1280000;
+ if(@Defence >= 65) set $def_invest,2560000;
+ if(@Defence >= 76) set $def_invest,5120000;
+ if(@Defence >= 88) set $def_invest,10240000;
+ if(@TriggerD == 0) goto L3_1;
+ if(@TriggerD == 1) goto L3_1_2;
+ if(@Defence >= 100) goto L3_2;
+ mes "[ Reiner ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ close;
+
+L3_1:
+ if(@TriggerD == 1) goto L3_1_2;
+ mes "[ Reiner ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
+ next;
+ menu "Invest Defence.",L3_1_1,"Cancel",-;
+ mes "[ Reiner ]";
+ mes "As you wish, master.";
+ close;
+ L3_1_1:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas05.gat",3,@Defence+1;
+ mes "[ Reiner ]";
+ mes "You have invested successfully.";
+ close;
+L3_1_2:
+ set $def_invest,$def_invest*4;
+ mes "[ Reiner ]";
+ mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
+ mes " ";
+ mes "You can invest up to two times a day, but the second time costs more";
+ mes " ";
+ mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
+ next;
+ menu "Invest Defence.",L3_1_3,"Cancel",-;
+ mes "[ Reiner ]";
+ mes "As you wish, master.";
+ close;
+
+ L3_1_3:
+ if(Zeny < $def_invest) goto L3_error;
+ set Zeny,Zeny-$def_invest;
+ SetCastleData "prtg_cas05.gat",5,@TriggerD+1;
+ SetCastleData "prtg_cas05.gat",3,@Defence+1;
+ mes "[ Reiner ]";
+ mes "You have invested successfully.";
+ close;
+L3_2:
+ mes "[ Reiner ]";
+ mes " ";
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ close;
+L3_error:
+ mes "[ Reiner ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Guardian Installation
+//================================================
+L4:
+ If(getskilllv(10002) == 0) goto L4Error;
+ set @Defence,GetCastleData("prtg_cas05.gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
+ set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
+ set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
+
+ mes "[ Reiner ]";
+ mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
+ mes "Please choose guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData("prtg_cas05.gat",10) == 1) goto L4Error2;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData("prtg_cas05.gat",11) == 1) goto L4Error2;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData("prtg_cas05.gat",12) == 1) goto L4Error2;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData("prtg_cas05.gat",13) == 1) goto L4Error2;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData("prtg_cas05.gat",14) == 1) goto L4Error2;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData("prtg_cas05.gat",15) == 1) goto L4Error2;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData("prtg_cas05.gat",16) == 1) goto L4Error2;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData("prtg_cas05.gat",17) == 1) goto L4Error2;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_9:
+ mes "[ Reiner ]";
+ mes "Would you really like to install guardian? You need 10,000 zeny to install.";
+ next;
+ menu "Install",L4_9_1,"Cancel",-;
+ mes "[ Reiner ]";
+ mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
+ close;
+ L4_9_1:
+ if (Zeny < 10000) goto L4Error3;
+ set Zeny,Zeny-10000;
+ SetCastleData "prtg_cas05.gat",@GDnum,1;
+ SetCastleData "prtg_cas05.gat",@GDnum2,@GuardianHP;
+ if(@GDnum==10) guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_D04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_D04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_D04::OnGuardianDied",7;
+ mes "[ Reiner ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+L4Error:
+ mes "[ Reiner ]";
+ mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
+ close;
+L4Error2:
+ mes "[ Reiner ]";
+ mes "Master, that guardian has already been installed..";
+ close;
+L4Error3:
+ mes "[ Reiner ]";
+ mes "Master, you do not have enough money to invest, investment has been cancelled.";
+ close;
+//================================================
+// Kafra Employment
+//================================================
+L5:
+ if (GetCastleData("prtg_cas05.gat",9) == 1) goto Lkafra_dimi;
+//================================================
+//(When Kafra is off) Employment
+//================================================
+ If(getskilllv(10001) == 0) goto L_k_a;
+ mes "[ Reiner ]";
+ mes "Would you like to employ the services of a Kafra Service?";
+ mes "^ff0000 You need 10,000 Zeny to employ... ";
+ next;
+ menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
+
+ L_k_a:
+ mes "[ Reiner ]";
+ mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
+ close;
+ L_k_0:
+ if (Zeny > 10000) goto L_k_1;
+ mes "[ Reiner ]";
+ mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
+ close;
+ L_k_1:
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#prt5";
+ SetCastleData "prtg_cas05.gat",9,1;
+ mes "[ Reiner ]";
+ mes "You have been contracted with Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I came here to follow your orders!.";
+ mes "I'll do the best I can to serve you better.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Reiner ]";
+ mes "Your employment contract lasts one month.";
+ mes "After this term, you'll have to pay again.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ close;
+L_k_e:
+ mes "[ Reiner ]";
+ mes "Yes, Master. But we should really get a Kafra as soon as possible!";
+ close;
+//=========================
+//(When Kafra is on) Dismissal
+//=========================
+Lkafra_dimi:
+ mes "[ Reiner ]";
+ mes "Would you like to dismiss current Kafra Service?";
+ next;
+ menu "Dismissal",-,"Cancel",L_D_1;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "What have I done wrong? if so, would you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",L_D_2;
+ mes "[ Kafra Service ]";
+ mes "It's such unfortunate that I'm unable to serve master anymore";
+ next;
+ disablenpc "Kafra Service#prt5";
+ SetCastleData "prtg_cas05.gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ Reiner ]";
+ mes "The Kafra Service had been dismissed";
+ mes "But... we should really get a Kafra as soon as possible!";
+ close;
+ L_D_2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ close;
+ L_D_1:
+ mes "[ Reiner ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ close;
+L5_1:
+//================================================
+// Guild Treasure Room
+//================================================
+L6:
+ mes "[ Reiner ]";
+ mes "Would you like to get into our treasure room?";
+ mes "That place is only for guild master, which means you are the only one who has access to enter.";
+ next;
+ menu "Enter Master's room.",-,"Cancel",L6_1;
+ mes "[ Reiner ]";
+ mes "Please follow me through the secret way.";
+ mes "You must push down the secret switch in order to get out.";
+ next;
+ warp "prtg_cas05",15,209;
+ L6_1:
+ mes "[ Reiner ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ close;
+//================================================
+// Surrender Castle
+//================================================
+L7:
+ mes "[ Reiner ]";
+ mes "Master..";
+ mes "Do you really want to give up this guild base?";
+ mes "It is not worth it to give up this guild base, master!!!";
+ mes "Please reconsider, master!!";
+ next;
+ menu "Empty Guild Base",L7_1,"Cancel",L7_2;
+ L7_1:
+ mes "[ Reiner ]";
+ mes "Master, please reconsider...!!";
+ next;
+ menu "Cancel",L7_2,"Empty Guild Base",-;
+ mes "[ Reiner ]";
+ mes "Master!!.....";
+ mes "Oh well..";
+ next;
+ SetCastleData "prtg_cas05.gat",1,0;
+ SetCastleData "prtg_cas05.gat",2,0;
+ SetCastleData "prtg_cas05.gat",3,0;
+ SetCastleData "prtg_cas05.gat",4,0;
+ SetCastleData "prtg_cas05.gat",5,0;
+ SetCastleData "prtg_cas05.gat",6,0;
+ SetCastleData "prtg_cas05.gat",7,0;
+ SetCastleData "prtg_cas05.gat",8,0;
+ SetCastleData "prtg_cas05.gat",9,0;
+ SetCastleData "prtg_cas05.gat",10,0;
+ SetCastleData "prtg_cas05.gat",11,0;
+ SetCastleData "prtg_cas05.gat",12,0;
+ SetCastleData "prtg_cas05.gat",13,0;
+ SetCastleData "prtg_cas05.gat",14,0;
+ SetCastleData "prtg_cas05.gat",15,0;
+ SetCastleData "prtg_cas05.gat",16,0;
+ SetCastleData "prtg_cas05.gat",17,0;
+ SetCastleData "prtg_cas05.gat",18,0;
+ SetCastleData "prtg_cas05.gat",19,0;
+ SetCastleData "prtg_cas05.gat",20,0;
+ SetCastleData "prtg_cas05.gat",21,0;
+ SetCastleData "prtg_cas05.gat",22,0;
+ SetCastleData "prtg_cas05.gat",23,0;
+ SetCastleData "prtg_cas05.gat",24,0;
+ SetCastleData "prtg_cas05.gat",25,0;
+ Announce "[" + GetGuildName(@GIDp5) + "] has surrendered Agit [" + GetCastleName("prtg_cas05.gat") + "]",0;
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),7;
+ break;
+ L7_2:
+ mes "[ Reiner ]";
+ mes "I knew it master!!";
+ mes "Please, don't freak me out like that again.";
+ close;
+} \ No newline at end of file
diff --git a/npc/guild/old/prtg_flag.txt b/npc/guild/old/prtg_flag.txt
new file mode 100644
index 000000000..156b3b09c
--- /dev/null
+++ b/npc/guild/old/prtg_flag.txt
@@ -0,0 +1,364 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Prontera Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in prontera and prt_gld
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|
+//============================================================
+
+//Prontera Castle 01 - Creamhilt
+
+prontera.gat,155,190,4 script Creamhilt#p1-1 722,{
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (@GIDp1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ break;
+}
+
+prt_gld.gat,131,60,6 script Creamhilt#p1-2::CreamhiltW 722,{
+ set @GIDp1,GetCastleData("prtg_cas01.gat",1);
+ if (@GIDp1 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDp1) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp1) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp1) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp1) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "prtg_cas01.gat",97,174;
+ break;
+OnRecvCastleP01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ break;
+}
+
+prt_gld.gat,138,68,6 duplicate(CreamhiltW) Creamhilt#p1-3 722
+prt_gld.gat,138,60,6 duplicate(CreamhiltW) Creamhilt#p1-4 722
+prt_gld.gat,135,60,6 duplicate(CreamhiltW) Creamhilt#p1-5 722
+prt_gld.gat,160,210,4 duplicate(CreamhiltW) Creamhilt#p1-6 722
+
+//Prontera Castle 02 - Sbanhealt
+
+prontera.gat,146,194,3 script Sbanhealt#p2-1 722,{
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (@GIDp2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ break;
+}
+
+prt_gld.gat,153,213,3 script Sbanhealt#p2-2::SbanhealtW 722,{
+ set @GIDp2,GetCastleData("prtg_cas02.gat",1);
+ if (@GIDp2 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDp2) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp2) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp2) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp2) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "prtg_cas02.gat",71,36;
+ break;
+OnRecvCastleP02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ break;
+}
+
+prt_gld.gat,244,126,8 duplicate(SbanhealtW) Sbanhealt#p2-3 722
+prt_gld.gat,244,128,8 duplicate(SbanhealtW) Sbanhealt#p2-4 722
+prt_gld.gat,236,126,8 duplicate(SbanhealtW) Sbanhealt#p2-5 722
+prt_gld.gat,236,128,8 duplicate(SbanhealtW) Sbanhealt#p2-6 722
+
+//Prontera Castle 03 - Lazrigees
+
+prontera.gat,143,203,2 script Lazrigees#p3-1 722,{
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (@GIDp3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ break;
+}
+
+prt_gld.gat,150,220,2 script Lazrigees#p3-2::LazrigeesW 722,{
+ set @GIDp3,GetCastleData("prtg_cas03.gat",1);
+ if (@GIDp3 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDp3) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp3) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp3) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp3) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "prtg_cas03.gat",97,174;
+ break;
+OnRecvCastleP03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ break;
+}
+
+prt_gld.gat,147,140,4 duplicate(LazrigeesW) Lazrigees#p3-3 722
+prt_gld.gat,147,136,4 duplicate(LazrigeesW) Lazrigees#p3-4 722
+prt_gld.gat,158,140,4 duplicate(LazrigeesW) Lazrigees#p3-5 722
+prt_gld.gat,158,136,4 duplicate(LazrigeesW) Lazrigees#p3-6 722
+
+//Prontera Castle 04 - Squagul
+
+prontera.gat,167,203,6 script Squagul#p4-1 722,{
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (@GIDp4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ break;
+}
+
+
+prt_gld.gat,169,220,6 script Squagul#p4-2::SquagulW 722,{
+ set @GIDp4,GetCastleData("prtg_cas04.gat",1);
+ if (@GIDp4 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDp4) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp4) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp4) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp4) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "prtg_cas04.gat",97,174;
+ break;
+OnRecvCastleP04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ break;
+}
+
+prt_gld.gat,120,243,6 duplicate(SquagulW) Squagul#p4-3 722
+prt_gld.gat,120,236,6 duplicate(SquagulW) Squagul#p4-4 722
+prt_gld.gat,122,243,6 duplicate(SquagulW) Squagul#p4-5 722
+prt_gld.gat,122,246,6 duplicate(SquagulW) Squagul#p4-6 722
+
+//Prontera Castle 05 - Guindull
+
+prontera.gat,165,194,5 script Guindull#p5-1 722,{
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (@GIDp5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+OnRecvCastleP05:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ break;
+}
+
+prt_gld.gat,167,213,5 script Guindull#p5-2::GuindullW 722,{
+ set @GIDp5,GetCastleData("prtg_cas05.gat",1);
+ if (@GIDp5 != 0) goto LStartg;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians";
+ mes " that are protecting the guild base and eliminate the Emperium";
+ close;
+LStartg:
+ if (getcharid(2) == @GIDp5) goto LStartg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of Prontera ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Prontera,";
+ mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDp5) + "^000000 guild";
+ mes " ";
+ mes "2. The guild master of ^ff0000" + GetGuildName(@GIDp5) + "^000000 is";
+ mes " ^ff0000" + GetGuildMaster(@GIDp5) + "^000000. If anyone who objects to that,";
+ mes " raise your sword to honor yourself.";
+ close;
+LStartg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave man...";
+ mes "Would you return to your honorable be?";
+ next;
+ menu "Go back to your agitating point",Lenter,"Cancel",-;
+ close;
+Lenter:
+ warp "prtg_cas05.gat",97,174;
+ break;
+OnRecvCastleP05:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ break;
+}
+
+prt_gld.gat,199,243,2 duplicate(GuindullW) Guindull#p5-3 722
+prt_gld.gat,199,236,2 duplicate(GuindullW) Guindull#p5-4 722
+prt_gld.gat,197,243,2 duplicate(GuindullW) Guindull#p5-5 722
+prt_gld.gat,197,236,2 duplicate(GuindullW) Guindull#p5-6 722 \ No newline at end of file
diff --git a/npc/guild/old/treasure/aldeg_cas01_treasure.txt b/npc/guild/old/treasure/aldeg_cas01_treasure.txt
new file mode 100644
index 000000000..7ee9a5d93
--- /dev/null
+++ b/npc/guild/old/treasure/aldeg_cas01_treasure.txt
@@ -0,0 +1,72 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas01 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in aldeg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+aldeg_cas01.gat,123,223,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "aldeg_cas01.gat",218,176;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+aldeg_cas01.gat,119,223,0 script Treasure_A01 -1,{
+OnClock1200:
+ SetCastleData "aldeg_cas01.gat",4,0;
+ SetCastleData "aldeg_cas01.gat",5,0;
+ KillMonster "aldeg_cas01.gat","Treasure_A01::TreasureDied";
+ set $Economy,GetCastleData("aldeg_cas01.gat",2);
+ if ($Economy > 100) break;
+ if (GetCastleData("aldeg_cas01.gat",1) == 0) break;
+ set $boxnum,GetCastleData("aldeg_cas01.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum <= 0) break;
+ set $boxid,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid > 2) goto TreasureSpawn2;
+ areamonster "aldeg_cas01.gat",114,218,123,227,"Treasure Chest",1324,1,"Treasure_A01::TreasureDied";
+ set $boxnum,$boxnum-1;
+ if ($boxnum <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "aldeg_cas01.gat",114,218,123,227,"Treasure Chest",1325,1,"Treasure_A01::TreasureDied";
+ set $boxnum,$boxnum-1;
+ if ($boxnum <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "aldeg_cas01.gat","Treasure Chest Broken Open",17;
+ break;
+
+Rehash:
+ set $boxid,1324;
+ areamonster "aldeg_cas01.gat",114,218,123,227,"Treasure Chest",$boxid,$boxnum,"Treasure_A01::TreasureDied";
+ break;
+}
diff --git a/npc/guild/old/treasure/aldeg_cas02_treasure.txt b/npc/guild/old/treasure/aldeg_cas02_treasure.txt
new file mode 100644
index 000000000..9144bd2a6
--- /dev/null
+++ b/npc/guild/old/treasure/aldeg_cas02_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas02 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in aldeg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+aldeg_cas02.gat,139,235,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "aldeg_cas02.gat",78,75;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+aldeg_cas02.gat,135,231,0 script Treasure_A02 -1,{
+OnClock1200:
+ SetCastleData "aldeg_cas02.gat",4,0;
+ SetCastleData "aldeg_cas02.gat",5,0;
+ KillMonster "aldeg_cas02.gat","Treasure_A02::TreasureDied";
+ set $Economy1,GetCastleData("aldeg_cas02.gat",2);
+ if ($Economy1 > 100) break;
+ if (GetCastleData("aldeg_cas02.gat",1) == 0) break;
+ set $boxnum1,GetCastleData("aldeg_cas02.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum1 <= 0) break;
+ set $boxid1,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid1 > 2) goto TreasureSpawn2;
+ areamonster "aldeg_cas02.gat",130,226,138,235,"Treasure Chest",1326,1,"Treasure_A02::TreasureDied";
+ set $boxnum1,$boxnum1-1;
+ if ($boxnum1 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "aldeg_cas02.gat",130,226,138,235,"Treasure Chest",1327,1,"Treasure_A02::TreasureDied";
+ set $boxnum1,$boxnum1-1;
+ if ($boxnum1 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "aldeg_cas02.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/aldeg_cas03_treasure.txt b/npc/guild/old/treasure/aldeg_cas03_treasure.txt
new file mode 100644
index 000000000..4b75e4b48
--- /dev/null
+++ b/npc/guild/old/treasure/aldeg_cas03_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas03 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in aldeg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+aldeg_cas03.gat,229,267,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "aldeg_cas03.gat",110,119;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+aldeg_cas03.gat,225,269,0 script Treasure_A03 -1,{
+OnClock1200:
+ SetCastleData "aldeg_cas03.gat",4,0;
+ SetCastleData "aldeg_cas03.gat",5,0;
+ KillMonster "aldeg_cas03.gat","Treasure_A03::TreasureDied";
+ set $Economy2,GetCastleData("aldeg_cas03.gat",2);
+ if ($Economy2 > 100) break;
+ if (GetCastleData("aldeg_cas03.gat",1) == 0) break;
+ set $boxnum2,GetCastleData("aldeg_cas03.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum2 <= 0) break;
+ set $boxid2,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid2 > 2) goto TreasureSpawn2;
+ areamonster "aldeg_cas03.gat",220,264,229,273,"Treasure Chest",1328,1,"Treasure_A03::TreasureDied";
+ set $boxnum2,$boxnum2-1;
+ if ($boxnum2 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "aldeg_cas03.gat",220,264,229,273,"Treasure Chest",1329,1,"Treasure_A03::TreasureDied";
+ set $boxnum2,$boxnum2-1;
+ if ($boxnum2 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "aldeg_cas03.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/aldeg_cas04_treasure.txt b/npc/guild/old/treasure/aldeg_cas04_treasure.txt
new file mode 100644
index 000000000..346a905a3
--- /dev/null
+++ b/npc/guild/old/treasure/aldeg_cas04_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas04 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in aldeg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+aldeg_cas04.gat,83,17,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "aldeg_cas04.gat",67,117;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+aldeg_cas04.gat,85,12,0 script Treasure_A04 -1,{
+OnClock1200:
+ SetCastleData "aldeg_cas04.gat",4,0;
+ SetCastleData "aldeg_cas04.gat",5,0;
+ KillMonster "aldeg_cas04.gat","Treasure_A04::TreasureDied";
+ set $Economy3,GetCastleData("aldeg_cas04.gat",2);
+ if ($Economy3 > 100) break;
+ if (GetCastleData("aldeg_cas04.gat",1) == 0) break;
+ set $boxnum3,GetCastleData("aldeg_cas04.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum3 <= 0) break;
+ set $boxid3,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid3 > 2) goto TreasureSpawn2;
+ areamonster "aldeg_cas04.gat",80,8,89,17,"Treasure Chest",1330,1,"Treasure_A04::TreasureDied";
+ set $boxnum3,$boxnum3-1;
+ if ($boxnum3 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "aldeg_cas04.gat",80,8,89,17,"Treasure Chest",1331,1,"Treasure_A04::TreasureDied";
+ set $boxnum3,$boxnum3-1;
+ if ($boxnum3 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "aldeg_cas04.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/aldeg_cas05_treasure.txt b/npc/guild/old/treasure/aldeg_cas05_treasure.txt
new file mode 100644
index 000000000..3a3bbbc86
--- /dev/null
+++ b/npc/guild/old/treasure/aldeg_cas05_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas05 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in aldeg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+aldeg_cas05.gat,64,8,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "aldeg_cas05.gat",51,179;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+aldeg_cas05.gat,62,12,0 script Treasure_A05 -1,{
+OnClock1200:
+ SetCastleData "aldeg_cas05.gat",4,0;
+ SetCastleData "aldeg_cas05.gat",5,0;
+ KillMonster "aldeg_cas05.gat","Treasure_A05::TreasureDied";
+ set $Economy4,GetCastleData("aldeg_cas05.gat",2);
+ if ($Economy4 > 100) break;
+ if (GetCastleData("aldeg_cas05.gat",1) == 0) break;
+ set $boxnum4,GetCastleData("aldeg_cas05.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum4 <= 0) break;
+ set $boxid4,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid4 > 2) goto TreasureSpawn2;
+ areamonster "aldeg_cas05.gat",58,8,65,15,"Treasure Chest",1332,1,"Treasure_A05::TreasureDied";
+ set $boxnum4,$boxnum4-1;
+ if ($boxnum4 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "aldeg_cas05.gat",58,8,65,15,"Treasure Chest",1333,1,"Treasure_A05::TreasureDied";
+ set $boxnum4,$boxnum4-1;
+ if ($boxnum4 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "aldeg_cas05.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/gefg_cas01_treasure.txt b/npc/guild/old/treasure/gefg_cas01_treasure.txt
new file mode 100644
index 000000000..122fb660b
--- /dev/null
+++ b/npc/guild/old/treasure/gefg_cas01_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas01 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in gefg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+gefg_cas01.gat,151,109,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "gefg_cas01.gat",40,49;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+gefg_cas01.gat,155,112,0 script Treasure_B01 -1,{
+OnClock1200:
+ SetCastleData "gefg_cas01.gat",4,0;
+ SetCastleData "gefg_cas01.gat",5,0;
+ KillMonster "gefg_cas01.gat","Treasure_B01::TreasureDied";
+ set $Economy5,GetCastleData("gefg_cas01.gat",2);
+ if ($Economy5 > 100) break;
+ if (GetCastleData("gefg_cas01.gat",1) == 0) break;
+ set $boxnum5,GetCastleData("gefg_cas01.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum5 <= 0) break;
+ set $boxid5,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid5 > 2) goto TreasureSpawn2;
+ areamonster "gefg_cas01.gat",150,108,158,114,"Treasure Chest",1334,1,"Treasure_B01::TreasureDied";
+ set $boxnum5,$boxnum5-1;
+ if ($boxnum5 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "gefg_cas01.gat",150,108,158,114,"Treasure Chest",1335,1,"Treasure_B01::TreasureDied";
+ set $boxnum5,$boxnum5-1;
+ if ($boxnum5 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "gefg_cas01.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/gefg_cas02_treasure.txt b/npc/guild/old/treasure/gefg_cas02_treasure.txt
new file mode 100644
index 000000000..a161f7190
--- /dev/null
+++ b/npc/guild/old/treasure/gefg_cas02_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas02 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in gefg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+gefg_cas02.gat,137,113,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "gefg_cas02.gat",12,67;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+gefg_cas02.gat,141,115,0 script Treasure_B02 -1,{
+OnClock1200:
+ SetCastleData "gefg_cas02.gat",4,0;
+ SetCastleData "gefg_cas02.gat",5,0;
+ KillMonster "gefg_cas02.gat","Treasure_B02::TreasureDied";
+ set $Economy6,GetCastleData("gefg_cas02.gat",2);
+ if ($Economy6 > 100) break;
+ if (GetCastleData("gefg_cas02.gat",1) == 0) break;
+ set $boxnum6,GetCastleData("gefg_cas02.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum6 <= 0) break;
+ set $boxid6,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid6 > 2) goto TreasureSpawn2;
+ areamonster "gefg_cas02.gat",136,112,145,118,"Treasure Chest",1336,1,"Treasure_B02::TreasureDied";
+ set $boxnum6,$boxnum6-1;
+ if ($boxnum6 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "gefg_cas02.gat",136,112,145,118,"Treasure Chest",1337,1,"Treasure_B02::TreasureDied";
+ set $boxnum6,$boxnum6-1;
+ if ($boxnum6 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "gefg_cas02.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/gefg_cas03_treasure.txt b/npc/guild/old/treasure/gefg_cas03_treasure.txt
new file mode 100644
index 000000000..7cf919115
--- /dev/null
+++ b/npc/guild/old/treasure/gefg_cas03_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas03 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in gefg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+gefg_cas03.gat,275,289,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "gefg_cas03.gat",106,24;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+gefg_cas03.gat,270,290,0 script Treasure_B03 -1,{
+OnClock1200:
+ SetCastleData "gefg_cas03.gat",4,0;
+ SetCastleData "gefg_cas03.gat",5,0;
+ KillMonster "gefg_cas03.gat","Treasure_B03::TreasureDied";
+ set $Economy7,GetCastleData("gefg_cas03.gat",2);
+ if ($Economy7 > 100) break;
+ if (GetCastleData("gefg_cas03.gat",1) == 0) break;
+ set $boxnum7,GetCastleData("gefg_cas03.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum7 <= 0) break;
+ set $boxid7,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid7 > 2) goto TreasureSpawn2;
+ areamonster "gefg_cas03.gat",266,286,275,293,"Treasure Chest",1338,1,"Treasure_B03::TreasureDied";
+ set $boxnum7,$boxnum7-1;
+ if ($boxnum7 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "gefg_cas03.gat",266,286,275,293,"Treasure Chest",1339,1,"Treasure_B03::TreasureDied";
+ set $boxnum7,$boxnum7-1;
+ if ($boxnum7 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "gefg_cas03.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/gefg_cas04_treasure.txt b/npc/guild/old/treasure/gefg_cas04_treasure.txt
new file mode 100644
index 000000000..648fa5740
--- /dev/null
+++ b/npc/guild/old/treasure/gefg_cas04_treasure.txt
@@ -0,0 +1,68 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas04 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in gefg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+
+gefg_cas04.gat,117,123,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "gefg_cas04.gat",73,47;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+gefg_cas04.gat,116,118,0 script Treasure_B04 -1,{
+OnClock1200:
+ SetCastleData "gefg_cas04.gat",4,0;
+ SetCastleData "gefg_cas04.gat",5,0;
+ KillMonster "gefg_cas04.gat","Treasure_B04::TreasureDied";
+ set $Economy8,GetCastleData("gefg_cas04.gat",2);
+ if ($Economy8 > 100) break;
+ if (GetCastleData("gefg_cas04.gat",1) == 0) break;
+ set $boxnum8,GetCastleData("gefg_cas04.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum8 <= 0) break;
+ set $boxid8,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid8 > 2) goto TreasureSpawn2;
+ areamonster "gefg_cas04.gat",112,114,119,123,"Treasure Chest",1340,1,"Treasure_B04::TreasureDied";
+ set $boxnum8,$boxnum8-1;
+ if ($boxnum8 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "gefg_cas04.gat",112,114,119,123,"Treasure Chest",1341,1,"Treasure_B04::TreasureDied";
+ set $boxnum8,$boxnum8-1;
+ if ($boxnum8 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "gefg_cas04.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/gefg_cas05_treasure.txt b/npc/guild/old/treasure/gefg_cas05_treasure.txt
new file mode 100644
index 000000000..af54278e0
--- /dev/null
+++ b/npc/guild/old/treasure/gefg_cas05_treasure.txt
@@ -0,0 +1,68 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas05 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in gefg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+
+gefg_cas05.gat,149,107,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "gefg_cas05.gat",70,53;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+gefg_cas05.gat,144,110,0 script Treasure_B05 -1,{
+OnClock1200:
+ SetCastleData "gefg_cas05.gat",4,0;
+ SetCastleData "gefg_cas05.gat",5,0;
+ KillMonster "gefg_cas05.gat","Treasure_B05::TreasureDied";
+ set $Economy9,GetCastleData("gefg_cas05.gat",2);
+ if ($Economy9 > 100) break;
+ if (GetCastleData("gefg_cas05.gat",1) == 0) break;
+ set $boxnum9,GetCastleData("gefg_cas05.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum9 <= 0) break;
+ set $boxid9,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid9 > 2) goto TreasureSpawn2;
+ areamonster "gefg_cas05.gat",140,106,147,113,"Treasure Chest",1342,1,"Treasure_B05::TreasureDied";
+ set $boxnum9,$boxnum9-1;
+ if ($boxnum9 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "gefg_cas05.gat",140,106,147,113,"Treasure Chest",1343,1,"Treasure_B05::TreasureDied";
+ set $boxnum9,$boxnum9-1;
+ if ($boxnum9 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "gefg_cas05.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/payg_cas01_treasure.txt b/npc/guild/old/treasure/payg_cas01_treasure.txt
new file mode 100644
index 000000000..c2a382316
--- /dev/null
+++ b/npc/guild/old/treasure/payg_cas01_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas01 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in payg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+payg_cas01.gat,295,8,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "payg_cas01.gat",120,59;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+payg_cas01.gat,290,7,0 script Treasure_C01 -1,{
+OnClock1200:
+ SetCastleData "payg_cas01.gat",4,0;
+ SetCastleData "payg_cas01.gat",5,0;
+ KillMonster "payg_cas01.gat","Treasure_C01::TreasureDied";
+ set $Economy10,GetCastleData("payg_cas01.gat",2);
+ if ($Economy10 > 100) break;
+ if (GetCastleData("payg_cas01.gat",1) == 0) break;
+ set $boxnum10,GetCastleData("payg_cas01.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum10 <= 0) break;
+ set $boxid10,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid10 > 2) goto TreasureSpawn2;
+ areamonster "payg_cas01.gat",286,4,295,13,"Treasure Chest",1344,1,"Treasure_C01::TreasureDied";
+ set $boxnum10,$boxnum10-1;
+ if ($boxnum10 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "payg_cas01.gat",286,4,295,13,"Treasure Chest",1345,1,"Treasure_C01::TreasureDied";
+ set $boxnum10,$boxnum10-1;
+ if ($boxnum10 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "payg_cas01.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/payg_cas02_treasure.txt b/npc/guild/old/treasure/payg_cas02_treasure.txt
new file mode 100644
index 000000000..c09679306
--- /dev/null
+++ b/npc/guild/old/treasure/payg_cas02_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas02 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in payg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+payg_cas02.gat,149,148,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "payg_cas02.gat",22,261;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+payg_cas02.gat,145,143,0 script Treasure_C02 -1,{
+OnClock1200:
+ SetCastleData "payg_cas02.gat",4,0;
+ SetCastleData "payg_cas02.gat",5,0;
+ KillMonster "payg_cas02.gat","Treasure_C02::TreasureDied";
+ set $Economy11,GetCastleData("payg_cas02.gat",2);
+ if ($Economy11 > 100) break;
+ if (GetCastleData("payg_cas02.gat",1) == 0) break;
+ set $boxnum11,GetCastleData("payg_cas02.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum11 <= 0) break;
+ set $boxid11,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid11 > 2) goto TreasureSpawn2;
+ areamonster "payg_cas02.gat",140,140,148,149,"Treasure Chest",1346,1,"Treasure_C02::TreasureDied";
+ set $boxnum11,$boxnum11-1;
+ if ($boxnum11 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "payg_cas02.gat",140,140,148,149,"Treasure Chest",1347,1,"Treasure_C02::TreasureDied";
+ set $boxnum11,$boxnum11-1;
+ if ($boxnum11 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "payg_cas02.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/payg_cas03_treasure.txt b/npc/guild/old/treasure/payg_cas03_treasure.txt
new file mode 100644
index 000000000..7e2345df5
--- /dev/null
+++ b/npc/guild/old/treasure/payg_cas03_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas03 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in payg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+payg_cas03.gat,163,167,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "payg_cas03.gat",50,261;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+payg_cas03.gat,158,168,0 script Treasure_C03 -1,{
+OnClock1200:
+ SetCastleData "payg_cas03.gat",4,0;
+ SetCastleData "payg_cas03.gat",5,0;
+ KillMonster "payg_cas03.gat","Treasure_C03::TreasureDied";
+ set $Economy12,GetCastleData("payg_cas03.gat",2);
+ if ($Economy12 > 100) break;
+ if (GetCastleData("payg_cas03.gat",1) == 0) break;
+ set $boxnum12,GetCastleData("payg_cas03.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum12 <= 0) break;
+ set $boxid12,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid12 > 2) goto TreasureSpawn2;
+ areamonster "payg_cas03.gat",154,164,162,173,"Treasure Chest",1348,1,"Treasure_C03::TreasureDied";
+ set $boxnum12,$boxnum12-1;
+ if ($boxnum12 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "payg_cas03.gat",154,164,162,173,"Treasure Chest",1349,1,"Treasure_C03::TreasureDied";
+ set $boxnum12,$boxnum12-1;
+ if ($boxnum12 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "payg_cas03.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/payg_cas04_treasure.txt b/npc/guild/old/treasure/payg_cas04_treasure.txt
new file mode 100644
index 000000000..1b9b47399
--- /dev/null
+++ b/npc/guild/old/treasure/payg_cas04_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas04 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in payg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+payg_cas04.gat,151,47,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "payg_cas04.gat",38,285;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+payg_cas04.gat,146,48,0 script Treasure_C04 -1,{
+OnClock1200:
+ SetCastleData "payg_cas04.gat",4,0;
+ SetCastleData "payg_cas04.gat",5,0;
+ KillMonster "payg_cas04.gat","Treasure_C04::TreasureDied";
+ set $Economy13,GetCastleData("payg_cas04.gat",2);
+ if ($Economy13 > 100) break;
+ if (GetCastleData("payg_cas04.gat",1) == 0) break;
+ set $boxnum13,GetCastleData("payg_cas04.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum13 <= 0) break;
+ set $boxid13,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid13 > 2) goto TreasureSpawn2;
+ areamonster "payg_cas04.gat",142,44,151,51,"Treasure Chest",1350,1,"Treasure_C04::TreasureDied";
+ set $boxnum13,$boxnum13-1;
+ if ($boxnum13 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "payg_cas04.gat",142,44,151,51,"Treasure Chest",1351,1,"Treasure_C04::TreasureDied";
+ set $boxnum13,$boxnum13-1;
+ if ($boxnum13 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "payg_cas04.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/payg_cas05_treasure.txt b/npc/guild/old/treasure/payg_cas05_treasure.txt
new file mode 100644
index 000000000..f4d494870
--- /dev/null
+++ b/npc/guild/old/treasure/payg_cas05_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas05 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in payg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+payg_cas05.gat,161,136,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "payg_cas05.gat",277,250;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+payg_cas05.gat,156,131,0 script Treasure_C05 -1,{
+OnClock1200:
+ SetCastleData "payg_cas05.gat",4,0;
+ SetCastleData "payg_cas05.gat",5,0;
+ KillMonster "payg_cas05.gat","Treasure_C05::TreasureDied";
+ set $Economy14,GetCastleData("payg_cas05.gat",2);
+ if ($Economy14 > 100) break;
+ if (GetCastleData("payg_cas05.gat",1) == 0) break;
+ set $boxnum14,GetCastleData("payg_cas05.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum14 <= 0) break;
+ set $boxid14,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid14 > 2) goto TreasureSpawn2;
+ areamonster "payg_cas05.gat",152,128,160,135,"Treasure Chest",1352,1,"Treasure_C05::TreasureDied";
+ set $boxnum14,$boxnum14-1;
+ if ($boxnum14 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "payg_cas05.gat",152,128,160,135,"Treasure Chest",1353,1,"Treasure_C05::TreasureDied";
+ set $boxnum14,$boxnum14-1;
+ if ($boxnum14 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "payg_cas05.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/prtg_cas01_treasure.txt b/npc/guild/old/treasure/prtg_cas01_treasure.txt
new file mode 100644
index 000000000..64ac99730
--- /dev/null
+++ b/npc/guild/old/treasure/prtg_cas01_treasure.txt
@@ -0,0 +1,72 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas01 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in prtg_cas01
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+prtg_cas01.gat,15,209,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "prtg_cas01.gat",112,183;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+prtg_cas01.gat,11,208,0 script Treasure_D01 -1,{
+OnClock1200:
+ SetCastleData "prtg_cas01.gat",4,0;
+ SetCastleData "prtg_cas01.gat",5,0;
+ KillMonster "prtg_cas01.gat","Treasure_D01::TreasureDied";
+ set $Economy15,GetCastleData("prtg_cas01.gat",2);
+ if ($Economy15 > 100) break;
+ if (GetCastleData("prtg_cas01.gat",1) == 0) break;
+ set $boxnum15,GetCastleData("prtg_cas01.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum15 <= 0) break;
+ set $boxid15,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid15 > 2) goto TreasureSpawn2;
+ areamonster "prtg_cas01.gat",6,204,15,213,"Treasure Chest",1354,1,"Treasure_D01::TreasureDied";
+ set $boxnum15,$boxnum15-1;
+ if ($boxnum15 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "prtg_cas01.gat",6,204,15,213,"Treasure Chest",1355,1,"Treasure_D01::TreasureDied";
+ set $boxnum15,$boxnum15-1;
+ if ($boxnum15 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "prtg_cas01.gat","Treasure Chest Broken Open",17;
+ break;
+
+Rehash:
+ set $boxid15,1324;
+ areamonster "prtg_cas01.gat",6,204,15,213,"Treasure Chest",$boxid15,$boxnum15,"Treasure_D01::TreasureDied";
+ break;
+}
diff --git a/npc/guild/old/treasure/prtg_cas02_treasure.txt b/npc/guild/old/treasure/prtg_cas02_treasure.txt
new file mode 100644
index 000000000..c0ca674fb
--- /dev/null
+++ b/npc/guild/old/treasure/prtg_cas02_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas02 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in prtg_cas02
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+prtg_cas02.gat,207,228,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "prtg_cas02.gat",94,62;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+prtg_cas02.gat,202,228,0 script Treasure_D02 -1,{
+OnClock1200:
+ SetCastleData "prtg_cas02.gat",4,0;
+ SetCastleData "prtg_cas02.gat",5,0;
+ KillMonster "prtg_cas02.gat","Treasure_D02::TreasureDied";
+ set $Economy16,GetCastleData("prtg_cas02.gat",2);
+ if ($Economy16 > 100) break;
+ if (GetCastleData("prtg_cas02.gat",1) == 0) break;
+ set $boxnum16,GetCastleData("prtg_cas02.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum16 <= 0) break;
+ set $boxid16,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid16 > 2) goto TreasureSpawn2;
+ areamonster "prtg_cas02.gat",198,224,207,233,"Treasure Chest",1356,1,"Treasure_D02::TreasureDied";
+ set $boxnum16,$boxnum16-1;
+ if ($boxnum16 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "prtg_cas02.gat",198,224,207,233,"Treasure Chest",1357,1,"Treasure_D02::TreasureDied";
+ set $boxnum16,$boxnum16-1;
+ if ($boxnum16 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "prtg_cas02.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/prtg_cas03_treasure.txt b/npc/guild/old/treasure/prtg_cas03_treasure.txt
new file mode 100644
index 000000000..d32485b7e
--- /dev/null
+++ b/npc/guild/old/treasure/prtg_cas03_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas03 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in prtg_cas03
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+prtg_cas03.gat,193,130,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "prtg_cas03.gat",51,101;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+prtg_cas03.gat,189,132,0 script Treasure_D03 -1,{
+OnClock1200:
+ SetCastleData "prtg_cas03.gat",4,0;
+ SetCastleData "prtg_cas03.gat",5,0;
+ KillMonster "prtg_cas03.gat","Treasure_D03::TreasureDied";
+ set $Economy17,GetCastleData("prtg_cas03.gat",2);
+ if ($Economy17 > 100) break;
+ if (GetCastleData("prtg_cas03.gat",1) == 0) break;
+ set $boxnum17,GetCastleData("prtg_cas03.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum17 <= 0) break;
+ set $boxid17,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid17 > 2) goto TreasureSpawn2;
+ areamonster "prtg_cas03.gat",184,128,193,135,"Treasure Chest",1358,1,"Treasure_D03::TreasureDied";
+ set $boxnum17,$boxnum17-1;
+ if ($boxnum17 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "prtg_cas03.gat",184,128,193,135,"Treasure Chest",1359,1,"Treasure_D03::TreasureDied";
+ set $boxnum17,$boxnum17-1;
+ if ($boxnum17 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "prtg_cas03.gat","Treasure Chest Broken Open",17;
+ break;
+}
diff --git a/npc/guild/old/treasure/prtg_cas04_treasure.txt b/npc/guild/old/treasure/prtg_cas04_treasure.txt
new file mode 100644
index 000000000..ee5dbcc16
--- /dev/null
+++ b/npc/guild/old/treasure/prtg_cas04_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas04 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in prtg_cas04
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+prtg_cas04.gat,275,160,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "prtg_cas04.gat",259,265;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+prtg_cas04.gat,271,162,0 script Treasure_D04 -1,{
+OnClock1200:
+ SetCastleData "prtg_cas04.gat",4,0;
+ SetCastleData "prtg_cas04.gat",5,0;
+ KillMonster "prtg_cas04.gat","Treasure_D04::TreasureDied";
+ set $Economy18,GetCastleData("prtg_cas04.gat",2);
+ if ($Economy18 > 100) break;
+ if (GetCastleData("prtg_cas04.gat",1) == 0) break;
+ set $boxnum18,GetCastleData("prtg_cas04.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum18 <= 0) break;
+ set $boxid18,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid18 > 2) goto TreasureSpawn2;
+ areamonster "prtg_cas04.gat",266,158,275,167,"Treasure Chest",1360,1,"Treasure_D04::TreasureDied";
+ set $boxnum18,$boxnum18-1;
+ if ($boxnum18 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "prtg_cas04.gat",266,158,275,167,"Treasure Chest",1361,1,"Treasure_D04::TreasureDied";
+ set $boxnum18,$boxnum18-1;
+ if ($boxnum18 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "prtg_cas04.gat","Treasure Chest Broken Open",17;
+ break;
+} \ No newline at end of file
diff --git a/npc/guild/old/treasure/prtg_cas05_treasure.txt b/npc/guild/old/treasure/prtg_cas05_treasure.txt
new file mode 100644
index 000000000..7d126ef31
--- /dev/null
+++ b/npc/guild/old/treasure/prtg_cas05_treasure.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas05 Treasure Room Script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Treasure Room Script in prtg_cas05
+//===== Additional Comments: =================================
+//= 1.1 by Akaru and ho|yAnge|X
+//============================================================
+
+//================================================
+// Exit Treasure Room Switch
+//================================================
+prtg_cas05.gat,281,176,0 script Switch 111,{
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",L1,"No",L2;
+
+L1:
+ warp "prtg_cas05.gat",36,38;
+
+L2:
+ close;
+}
+
+//================================================
+// Treasure Spawning Script
+//================================================
+prtg_cas05.gat,277,178,0 script Treasure_D05 -1,{
+OnClock1200:
+ SetCastleData "prtg_cas05.gat",4,0;
+ SetCastleData "prtg_cas05.gat",5,0;
+ KillMonster "prtg_cas05.gat","Treasure_D05::TreasureDied";
+ set $Economy19,GetCastleData("prtg_cas05.gat",2);
+ if ($Economy19 > 100) break;
+ if (GetCastleData("prtg_cas05.gat",1) == 0) break;
+ set $boxnum19,GetCastleData("prtg_cas05.gat",2)/5+4;
+ goto TreasureCheck;
+
+TreasureCheck:
+ if ($boxnum19 <= 0) break;
+ set $boxid19,rand(4);
+ goto TreasureSpawn;
+
+TreasureSpawn:
+ if ($boxid19 > 2) goto TreasureSpawn2;
+ areamonster "prtg_cas05.gat",272,174,279,181,"Treasure Chest",1362,1,"Treasure_D05::TreasureDied";
+ set $boxnum19,$boxnum19-1;
+ if ($boxnum19 <= 0) break;
+ goto TreasureCheck;
+
+TreasureSpawn2:
+ areamonster "prtg_cas05.gat",272,174,279,181,"Treasure Chest",1363,1,"Treasure_D05::TreasureDied";
+ set $boxnum19,$boxnum19-1;
+ if ($boxnum19 <= 0) break;
+ goto TreasureCheck;
+
+TreasureDied:
+ MapAnnounce "prtg_cas05.gat","Treasure Chest Broken Open",17;
+ break;
+} \ No newline at end of file
diff --git a/npc/guild/payg/payg_dunsw.txt b/npc/guild/payg/payg_dunsw.txt
new file mode 100644
index 000000000..227092a62
--- /dev/null
+++ b/npc/guild/payg/payg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+payg_cas01.gat,101,25,0 script Switch#DunPy01 111,{
+ callfunc "F_GldDunSw","payg_cas01","01",186,165;
+ close;
+}
+
+
+// Castle 2 ================================================
+payg_cas02.gat,278,247,0 script Switch#DunPy02 111,{
+ callfunc "F_GldDunSw","payg_cas02","01",54,165;
+ close;
+}
+
+
+// Castle 3 ================================================
+payg_cas03.gat,20,44,0 script Switch#DunPy03 111,{
+ callfunc "F_GldDunSw","payg_cas03","01",54,39;
+ close;
+}
+
+
+// Castle 4 ================================================
+payg_cas04.gat,52,48,0 script Switch#DunPy04 111,{
+ callfunc "F_GldDunSw","payg_cas04","01",186,39;
+ close;
+}
+
+
+// Castle 5 ================================================
+payg_cas05.gat,248,14,0 script Switch#DunPy05 111,{
+ callfunc "F_GldDunSw","payg_cas05","01",223,202;
+ close;
+}
diff --git a/npc/guild/payg/payg_ev_agit.txt b/npc/guild/payg/payg_ev_agit.txt
new file mode 100644
index 000000000..19b783d91
--- /dev/null
+++ b/npc/guild/payg/payg_ev_agit.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Payon Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================================
+payg_cas01.gat,139,139,0 script Agit_Py01 -1,{
+OnInterIfInit:
+ GetCastleData "payg_cas01.gat",0,"::OnRecvCastlePy01";
+ end;
+OnRecvCastlePy01:
+ RequestGuildInfo GetCastleData("payg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas01","Py01",139,139;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas01","Py01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas01.gat",1),6;
+ Monster "payg_cas01.gat",139,139,"EMPERIUM",1288,1,"Agit_Py01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas01","Py01";
+ end;
+}
+
+// Castle 2 ================================================================
+payg_cas02.gat,39,25,0 script Agit_Py02 -1,{
+OnInterIfInit:
+ GetCastleData "payg_cas02.gat",0,"::OnRecvCastlePy02";
+ end;
+OnRecvCastlePy02:
+ RequestGuildInfo GetCastleData("payg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas02","Py02",39,25;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas02","Py01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),6;
+ Monster "payg_cas02.gat",39,25,"EMPERIUM",1288,1,"Agit_Py02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas02","Py02";
+ end;
+}
+
+// Castle 3 ================================================================
+payg_cas03.gat,269,265,0 script Agit_Py03 -1,{
+OnInterIfInit:
+ GetCastleData "payg_cas03.gat",0,"::OnRecvCastlePy03";
+ end;
+OnRecvCastlePy03:
+ RequestGuildInfo GetCastleData("payg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas03","Py03",269,265;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas03","Py03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),6;
+ Monster "payg_cas03.gat",269,265,"EMPERIUM",1288,1,"Agit_Py03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas03","Py03";
+ end;
+}
+
+// Castle 4 ================================================================
+payg_cas04.gat,271,29,0 script Agit_Py04 -1,{
+OnInterIfInit:
+ GetCastleData "payg_cas04.gat",0,"::OnRecvCastlePy04";
+ end;
+OnRecvCastlePy04:
+ RequestGuildInfo GetCastleData("payg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas04","Py04",271,29;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas04","Py04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),6;
+ Monster "payg_cas04.gat",271,29,"EMPERIUM",1288,1,"Agit_Py04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas04","Py04";
+ end;
+}
+
+// Castle 5 ================================================================
+payg_cas05.gat,30,30,0 script Agit_Py05 -1,{
+OnInterIfInit:
+ GetCastleData "payg_cas05.gat",0,"::OnRecvCastlePy05";
+ end;
+OnRecvCastlePy05:
+ RequestGuildInfo GetCastleData("payg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas05","Py05",30,30;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas05","Py05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),6;
+ Monster "payg_cas05.gat",30,30,"EMPERIUM",1288,1,"Agit_Py05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas05","Py05";
+ end;
+}
diff --git a/npc/guild/payg/payg_flags.txt b/npc/guild/payg/payg_flags.txt
new file mode 100644
index 000000000..b22e07635
--- /dev/null
+++ b/npc/guild/payg/payg_flags.txt
@@ -0,0 +1,148 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in Payon and pay_gld
+//===== Additional Comments: =================================
+//= Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//============================================================================//
+// Castle 1
+//============================================================================//
+payon.gat,89,155,4 script Mingting#f1-1::Mingting 722,
+{
+ callfunc "F_Flags","Payon","payg_cas01",87,29;
+ close;
+
+OnRecvCastlePy01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,125,236,4 duplicate(Mingting) Mingting#f1-2 722
+pay_gld.gat,110,233,4 duplicate(Mingting) Mingting#f1-3 722
+pay_gld.gat,116,233,4 duplicate(Mingting) Mingting#f1-4 722
+pay_gld.gat,91,239,2 duplicate(Mingting) Mingting#f1-5 722
+// In Castle ===============================================
+payg_cas01.gat,238,67,4 duplicate(Mingting) Mingting#f1-6 722
+payg_cas01.gat,233,67,4 duplicate(Mingting) Mingting#f1-7 722
+payg_cas01.gat,221,123,4 duplicate(Mingting) Mingting#f1-8 722
+payg_cas01.gat,221,116,4 duplicate(Mingting) Mingting#f1-9 722
+payg_cas01.gat,206,108,4 duplicate(Mingting) Mingting#f1-10 722
+payg_cas01.gat,212,108,4 duplicate(Mingting) Mingting#f1-11 722
+
+
+
+//===========================================================================//
+// Castle 2
+//============================================================================//
+payon.gat,82,155,4 script Tiantan#f2-1::Tiantan 722,
+{
+ callfunc "F_Flags","Payon","payg_cas02",25,266;
+ close;
+
+OnRecvCastlePy02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,292,112,6 duplicate(Tiantan) Tiantan#f2-2 722
+pay_gld.gat,292,120,6 duplicate(Tiantan) Tiantan#f2-3 722
+pay_gld.gat,291,135,6 duplicate(Tiantan) Tiantan#f2-4 722
+pay_gld.gat,271,163,0 duplicate(Tiantan) Tiantan#f2-5 722
+// In Castle ===============================================
+payg_cas02.gat,254,40,6 duplicate(Tiantan) Tiantan#f2-6 722
+payg_cas02.gat,254,48,6 duplicate(Tiantan) Tiantan#f2-7 722
+payg_cas02.gat,202,49,0 duplicate(Tiantan) Tiantan#f2-8 722
+payg_cas02.gat,209,49,0 duplicate(Tiantan) Tiantan#f2-9 722
+payg_cas02.gat,59,282,4 duplicate(Tiantan) Tiantan#f2-10 722
+payg_cas02.gat,70,282,4 duplicate(Tiantan) Tiantan#f2-11 722
+
+
+
+//============================================================================//
+// Castle 3
+//============================================================================//
+payon.gat,97,155,4 script Fuying#f3-1::Fuying 722,
+{
+ callfunc "F_Flags","Payon","payg_cas03",9,263;
+ close;
+
+OnRecvCastlePy03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,321,298,2 duplicate(Fuying) Fuying#f3-2 722
+pay_gld.gat,321,289,2 duplicate(Fuying) Fuying#f3-3 722
+pay_gld.gat,327,304,1 duplicate(Fuying) Fuying#f3-4 722
+pay_gld.gat,333,254,4 duplicate(Fuying) Fuying#f3-5 722
+// In Castle ===============================================
+payg_cas03.gat,236,54,2 duplicate(Fuying) Fuying#f3-6 722
+payg_cas03.gat,236,45,2 duplicate(Fuying) Fuying#f3-7 722
+payg_cas03.gat,259,66,4 duplicate(Fuying) Fuying#f3-8 722
+payg_cas03.gat,266,66,4 duplicate(Fuying) Fuying#f3-9 722
+payg_cas03.gat,34,31,4 duplicate(Fuying) Fuying#f3-10 722
+payg_cas03.gat,43,31,4 duplicate(Fuying) Fuying#f3-11 722
+
+
+
+//============================================================================//
+// Castle 4
+//============================================================================//
+payon.gat,103,155,4 script Honglou#f4-1::Honglou 722,
+{
+ callfunc "F_Flags","Payon","payg_cas04",40,235;
+ close;
+
+OnRecvCastlePy04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,143,160,0 duplicate(Honglou) Honglou#f4-2 722
+pay_gld.gat,143,160,0 duplicate(Honglou) Honglou#f4-3 722
+pay_gld.gat,133,151,2 duplicate(Honglou) Honglou#f4-4 722
+pay_gld.gat,153,166,1 duplicate(Honglou) Honglou#f4-5 722
+// In Castle ===============================================
+payg_cas04.gat,255,259,0 duplicate(Honglou) Honglou#f4-6 722
+payg_cas04.gat,248,259,0 duplicate(Honglou) Honglou#f4-7 722
+payg_cas04.gat,248,168,6 duplicate(Honglou) Honglou#f4-8 722
+payg_cas04.gat,248,160,6 duplicate(Honglou) Honglou#f4-9 722
+payg_cas04.gat,232,181,4 duplicate(Honglou) Honglou#f4-10 722
+payg_cas04.gat,239,181,4 duplicate(Honglou) Honglou#f4-11 722
+
+
+
+//============================================================================//
+// Castle 5
+//============================================================================//
+payon.gat,75,155,4 script Zhulinxian#f5-1::Zhulinxian 722,
+{
+ callfunc "F_Flags","Payon","payg_cas05",276,227;
+ close;
+
+OnRecvCastlePy05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,208,268,4 duplicate(Zhulinxian) Zhulinxian#f5-2 722
+pay_gld.gat,199,268,4 duplicate(Zhulinxian) Zhulinxian#f5-3 722
+pay_gld.gat,190,277,3 duplicate(Zhulinxian) Zhulinxian#f5-4 722
+pay_gld.gat,187,294,2 duplicate(Zhulinxian) Zhulinxian#f5-5 722
+// In Castle ===============================================
+payg_cas05.gat,32,249,4 duplicate(Zhulinxian) Zhulinxian#f5-6 722
+payg_cas05.gat,24,249,4 duplicate(Zhulinxian) Zhulinxian#f5-7 722
+payg_cas05.gat,62,271,0 duplicate(Zhulinxian) Zhulinxian#f5-8 722
+payg_cas05.gat,57,271,0 duplicate(Zhulinxian) Zhulinxian#f5-9 722
+payg_cas05.gat,55,252,2 duplicate(Zhulinxian) Zhulinxian#f5-10 722
+payg_cas05.gat,55,260,2 duplicate(Zhulinxian) Zhulinxian#f5-11 722
diff --git a/npc/guild/payg/payg_guardians.txt b/npc/guild/payg/payg_guardians.txt
new file mode 100644
index 000000000..e89ac7910
--- /dev/null
+++ b/npc/guild/payg/payg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all payg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+payg_cas01.gat,139,139,0 script Guardian_Py01 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas01.gat",10) == 1) guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",0;
+ if (GetCastleData("payg_cas01.gat",11) == 1) guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",1;
+ if (GetCastleData("payg_cas01.gat",12) == 1) guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",2;
+ if (GetCastleData("payg_cas01.gat",13) == 1) guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",3;
+ if (GetCastleData("payg_cas01.gat",14) == 1) guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",4;
+ if (GetCastleData("payg_cas01.gat",15) == 1) guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",5;
+ if (GetCastleData("payg_cas01.gat",16) == 1) guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",6;
+ if (GetCastleData("payg_cas01.gat",17) == 1) guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas02.gat,39,25,0 script Guardian_Py02 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas02.gat",10) == 1) guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",0;
+ if (GetCastleData("payg_cas02.gat",11) == 1) guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",1;
+ if (GetCastleData("payg_cas02.gat",12) == 1) guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",2;
+ if (GetCastleData("payg_cas02.gat",13) == 1) guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",3;
+ if (GetCastleData("payg_cas02.gat",14) == 1) guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",4;
+ if (GetCastleData("payg_cas02.gat",15) == 1) guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",5;
+ if (GetCastleData("payg_cas02.gat",16) == 1) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",6;
+ if (GetCastleData("payg_cas02.gat",17) == 1) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas03.gat,269,265,0 script Guardian_Py03 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas03.gat",10) == 1) guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",0;
+ if (GetCastleData("payg_cas03.gat",11) == 1) guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",1;
+ if (GetCastleData("payg_cas03.gat",12) == 1) guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",2;
+ if (GetCastleData("payg_cas03.gat",13) == 1) guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",3;
+ if (GetCastleData("payg_cas03.gat",14) == 1) guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",4;
+ if (GetCastleData("payg_cas03.gat",15) == 1) guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",5;
+ if (GetCastleData("payg_cas03.gat",16) == 1) guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",6;
+ if (GetCastleData("payg_cas03.gat",17) == 1) guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas04.gat,271,29,0 script Guardian_Py04 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas04.gat",10) == 1) guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",0;
+ if (GetCastleData("payg_cas04.gat",11) == 1) guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",1;
+ if (GetCastleData("payg_cas04.gat",12) == 1) guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",2;
+ if (GetCastleData("payg_cas04.gat",13) == 1) guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",3;
+ if (GetCastleData("payg_cas04.gat",14) == 1) guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",4;
+ if (GetCastleData("payg_cas04.gat",15) == 1) guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",5;
+ if (GetCastleData("payg_cas04.gat",16) == 1) guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",6;
+ if (GetCastleData("payg_cas04.gat",17) == 1) guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas05.gat,30,30,0 script Guardian_Py05 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas05.gat",10) == 1) guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",0;
+ if (GetCastleData("payg_cas05.gat",11) == 1) guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",1;
+ if (GetCastleData("payg_cas05.gat",12) == 1) guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",2;
+ if (GetCastleData("payg_cas05.gat",13) == 1) guardian "payg_cas05.gat",46,273,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ if (GetCastleData("payg_cas05.gat",14) == 1) guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",4;
+ if (GetCastleData("payg_cas05.gat",15) == 1) guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",5;
+ if (GetCastleData("payg_cas05.gat",16) == 1) guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",6;
+ if (GetCastleData("payg_cas05.gat",17) == 1) guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/payg/payg_kafras.txt b/npc/guild/payg/payg_kafras.txt
new file mode 100644
index 000000000..75e758ec3
--- /dev/null
+++ b/npc/guild/payg/payg_kafras.txt
@@ -0,0 +1,65 @@
+//== eAthena Script ========================================
+//= War of Emperium Kafras for Payon Guild Castles
+//== By: =================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//== Current Version: ========================================
+//= 1.2
+//== Compatible With: ========================================
+//= eAthena 0.1+; RO Episode 4+
+//== Description: ============================================
+//= Provides Kafra services for guild members of Payon Castles.
+//= Used in conjuction with function F_Kafra.
+//== Additional Comments: ==================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 =============
+payg_cas01.gat,128,58,3 script Kafra Service#Py01 117,{
+ callfunc "F_GKafra", "payg_cas01", "Payon";
+ end;
+OnRecvCastlePy01:
+ if (GetCastleData("payg_cas01.gat",9) < 1) disablenpc "Kafra Service#Py01";
+ end;
+}
+
+
+// Castle 2 =============
+payg_cas02.gat,22,275,5 script Kafra Service#Py02 117,{
+ callfunc "F_GKafra", "payg_cas02", "Payon";
+ end;
+OnRecvCastlePy02:
+ if (GetCastleData("payg_cas02.gat",9) < 1) disablenpc "Kafra Service#Py02";
+ end;
+}
+
+
+// Castle 3 =============
+payg_cas03.gat,9,263,5 script Kafra Service#Py03 117,{
+ callfunc "F_GKafra", "payg_cas03", "Payon";
+ end;
+OnRecvCastlePy03:
+ if (GetCastleData("payg_cas03.gat",9) < 1) disablenpc "Kafra Service#Py03";
+ end;
+}
+
+
+// Castle 4 =============
+payg_cas04.gat,40,235,1 script Kafra Service#Py04 117,{
+ callfunc "F_GKafra", "payg_cas04", "Payon";
+ end;
+OnRecvCastlePy04:
+ if (GetCastleData("payg_cas04.gat",9) < 1) disablenpc "Kafra Service#Py04";
+ end;
+}
+
+
+// Castle 5 =============
+payg_cas05.gat,276,227,1 script Kafra Service#Py05 117,{
+ callfunc "F_GKafra", "payg_cas05", "Payon";
+ end;
+OnRecvCastlePy05:
+ if (GetCastleData("payg_cas05.gat",9) < 1) disablenpc "Kafra Service#Py05";
+ end;
+}
diff --git a/npc/guild/payg/payg_managers.txt b/npc/guild/payg/payg_managers.txt
new file mode 100644
index 000000000..f1811a9d2
--- /dev/null
+++ b/npc/guild/payg/payg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+payg_cas01.gat,120,58,4 script Grunday 55,{
+ if(callfunc("F_GldManager","Grunday","payg_cas01",290,7,"Py01") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",7;
+ mes "[ Grunday ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+payg_cas02.gat,22,260,7 script Cherrios 55,{
+ if(callfunc("F_GldManager","Cherrios","payg_cas02",145,143,"Py02") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",7;
+ mes "[ Cherrios ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+payg_cas03.gat,10,277,0 script Garriet 55,{
+ if(callfunc("F_GldManager","Garriet","payg_cas03",158,168,"Py03") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",7;
+ mes "[ Garriet ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+payg_cas04.gat,38,284,3 script DJ 55,{
+ if(callfunc("F_GldManager","DJ","payg_cas04",146,48,"Py04") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",7;
+ mes "[ DJ ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+payg_cas05.gat,277,249,3 script Najarf 55,{
+ if(callfunc("F_GldManager","Najarf","payg_cas05",156,131,"Py05") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas05.gat",46,273,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",7;
+ mes "[ Najarf ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/payg/payg_treas.txt b/npc/guild/payg/payg_treas.txt
new file mode 100644
index 000000000..063540f77
--- /dev/null
+++ b/npc/guild/payg/payg_treas.txt
@@ -0,0 +1,140 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<================================ Castle 1 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+payg_cas01.gat,1,1,0 script Treasure_Py01 -1,{
+OnRecvCastlePy01:
+ if($boxNumPy01 == 0) end;
+ set $@bxPy01, $boxNumPy01;
+ callfunc "F_GldTreas","payg_cas01","Py01",$boxNumPy01,$@bxPy01,$@boxIdPy01,1344,286,4,295,13,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","payg_cas01","Py01",$boxNumPy01,$@bxPy01,$@boxIdPy01,1344,286,4,295,13,0;
+ end;
+OnDied:
+ mapannounce "payg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy01, $boxNumPy01 -1;
+ if($boxNumPy01 == 0) mapannounce "payg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------------------------
+payg_cas01.gat,295,8,0 script Switch#TresPy01 111,{
+ callfunc "F_GldTreasSw", "payg_cas01",120,59;
+ end;
+}
+
+
+//<================================ Castle 2 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas02.gat,1,1,0 script Treasure_Py02 -1,{
+OnRecvCastlePy02:
+ if($boxNumPy02 == 0) end;
+ set $@bxPy02, $boxNumPy02;
+ callfunc "F_GldTreas","payg_cas02","Py02",$boxNumPy02,$@bxPy02,$@boxIdPy02,1346,140,140,148,149,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","payg_cas02","Py02",$boxNumPy02,$@bxPy02,$@boxIdPy02,1346,140,140,148,149,0;
+ end;
+OnDied:
+ mapannounce "payg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy02, $boxNumPy02 -1;
+ if($boxNumPy02 == 0) mapannounce "payg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas02.gat,149,148,0 script Switch#TresPy02 111,{
+ callfunc "F_GldTreasSw", "payg_cas02",22,261;
+ end;
+}
+
+
+//<================================ Castle 3 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas03.gat,158,168,0 script Treasure_Py03 -1,{
+OnRecvCastlePy03:
+ if($boxNumPy03 == 0) end;
+ set $@bxPy03, $boxNumPy03;
+ callfunc "F_GldTreas","payg_cas03","Py03",$boxNumPy03,$@bxPy03,$@boxIdPy03,1348,154,164,162,173,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","payg_cas03","Py03",$boxNumPy03,$@bxPy03,$@boxIdPy03,1348,154,164,162,173,0;
+ end;
+OnDied:
+ mapannounce "payg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy03, $boxNumPy03 -1;
+ if($boxNumPy03 == 0) mapannounce "payg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas03.gat,163,167,0 script Switch#TresPy03 111,{
+ callfunc "F_GldTreasSw", "payg_cas03",11,278;
+ end;
+}
+
+
+//<================================ Castle 4 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas04.gat,146,48,0 script Treasure_Py04 -1,{
+OnRecvCastlePy04:
+ if($boxNumPy04 == 0) end;
+ set $@bxPy04, $boxNumPy04;
+ callfunc "F_GldTreas","payg_cas04","Py04",$boxNumPy04,$@bxPy04,$@boxIdPy04,1350,142,44,151,51,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","payg_cas04","Py04",$boxNumPy04,$@bxPy04,$@boxIdPy04,1350,142,44,151,51,0;
+ end;
+OnDied:
+ mapannounce "payg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy04, $boxNumPy04 -1;
+ if($boxNumPy04 == 0) mapannounce "payg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas04.gat,151,47,0 script Switch#TresPy04 111,{
+ callfunc "F_GldTreasSw", "payg_cas04",38,285;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas05.gat,156,131,0 script Treasure_Py05 -1,{
+OnRecvCastlePy05:
+ if($boxNumPy05 == 0) end;
+ set $@bxPy05, $boxNumPy05;
+ callfunc "F_GldTreas","payg_cas05","Py05",$boxNumPy05,$@bxPy05,$@boxIdPy05,1352,152,128,160,135,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","payg_cas05","Py05",$boxNumPy05,$@bxPy05,$@boxIdPy05,1352,152,128,160,135,0;
+ end;
+OnDied:
+ mapannounce "payg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy05, $boxNumPy05 -1;
+ if($boxNumPy05 == 0) mapannounce "payg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas05.gat,161,136,0 script Switch#TresPy05 111,{
+ callfunc "F_GldTreasSw", "payg_cas05",277,250;
+ end;
+}
diff --git a/npc/guild/prtg/prtg_dunsw.txt b/npc/guild/prtg/prtg_dunsw.txt
new file mode 100644
index 000000000..8284147a7
--- /dev/null
+++ b/npc/guild/prtg/prtg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+prtg_cas01.gat,94,200,0 script Switch#DunPt01 111,{
+ callfunc "F_GldDunSw","prtg_cas01","03",28,251;
+ close;
+}
+
+
+// Castle 2 ================================================
+prtg_cas02.gat,84,72,0 script Switch#DunPt02 111,{
+ callfunc "F_GldDunSw","prtg_cas02","03",164,268;
+ close;
+}
+
+
+// Castle 3 ================================================
+prtg_cas03.gat,5,70,0 script Switch#DunPt03 111,{
+ callfunc "F_GldDunSw","prtg_cas03","03",164,179;
+ close;
+}
+
+
+// Castle 4 ================================================
+prtg_cas04.gat,56,283,0 script Switch#DunPt04 111,{
+ callfunc "F_GldDunSw","prtg_cas04","03",268,203;
+ close;
+}
+
+
+// Castle 5 ================================================
+prtg_cas05.gat,212,94,0 script Switch#DunPt05 111,{
+ callfunc "F_GldDunSw","prtg_cas05","03",199,28;
+ close;
+}
diff --git a/npc/guild/prtg/prtg_ev_agit.txt b/npc/guild/prtg/prtg_ev_agit.txt
new file mode 100644
index 000000000..73ac15119
--- /dev/null
+++ b/npc/guild/prtg/prtg_ev_agit.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Prontera Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Prontera Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================================
+prtg_cas01.gat,197,197,0 script Agit_Pt01 -1,{
+OnInterIfInit:
+ GetCastleData "prtg_cas01.gat",0,"::OnRecvCastlePt01";
+ end;
+OnRecvCastlePt01:
+ RequestGuildInfo GetCastleData("prtg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas01","Pt01",197,197;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas01","Pt01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),6;
+ Monster "prtg_cas01.gat",197,197,"EMPERIUM",1288,1,"Agit_Pt01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas01","Pt01";
+ end;
+}
+
+// Castle 2 ================================================================
+prtg_cas02.gat,158,174,0 script Agit_Pt02 -1,{
+OnInterIfInit:
+ GetCastleData "prtg_cas02.gat",0,"::OnRecvCastlePt02";
+ end;
+OnRecvCastlePt02:
+ RequestGuildInfo GetCastleData("prtg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas02","Pt02",158,174;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas02","Pt02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),6;
+ Monster "prtg_cas02.gat",158,174,"EMPERIUM",1288,1,"Agit_Pt02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas02","Pt02";
+ end;
+}
+
+// Castle 3 ================================================================
+prtg_cas03.gat,17,221,0 script Agit_Pt03 -1,{
+OnInterIfInit:
+ GetCastleData "prtg_cas03.gat",0,"::OnRecvCastlePt03";
+ end;
+OnRecvCastlePt03:
+ RequestGuildInfo GetCastleData("prtg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas03","Pt03",17,221;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas03","Pt03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),6;
+ Monster "prtg_cas03.gat",17,221,"EMPERIUM",1288,1,"Agit_Pt03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas03","Pt03";
+ end;
+}
+
+// Castle 4 ================================================================
+prtg_cas04.gat,292,14,0 script Agit_Pt04 -1,{
+OnInterIfInit:
+ GetCastleData "prtg_cas04.gat",0,"::OnRecvCastlePt04";
+ end;
+OnRecvCastlePt04:
+ RequestGuildInfo GetCastleData("prtg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas04","Pt04",292,14;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas04","Pt04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),6;
+ Monster "prtg_cas04.gat",292,14,"EMPERIUM",1288,1,"Agit_Pt04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas04","Pt04";
+ end;
+}
+
+// Castle 5 ================================================================
+prtg_cas05.gat,266,266,0 script Agit_Pt05 -1,{
+OnInterIfInit:
+ GetCastleData "prtg_cas05.gat",0,"::OnRecvCastlePt05";
+ end;
+OnRecvCastlePt05:
+ RequestGuildInfo GetCastleData("prtg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas05","Pt05",266,266;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas05","Pt05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),6;
+ Monster "prtg_cas05.gat",266,266,"EMPERIUM",1288,1,"Agit_Pt05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas05","Pt05";
+ end;
+}
diff --git a/npc/guild/prtg/prtg_flags.txt b/npc/guild/prtg/prtg_flags.txt
new file mode 100644
index 000000000..653e69333
--- /dev/null
+++ b/npc/guild/prtg/prtg_flags.txt
@@ -0,0 +1,175 @@
+//===== eAthena Script =======================================
+//= War of Emperium Prontera Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Displays guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+prontera.gat,155,190,4 script Creamhilt#p1-1::Creamhilt 722,
+{
+ callfunc "F_Flags","Prontera","prtg_cas01",97,174;
+ close;
+
+OnRecvCastlePt01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,131,60,6 duplicate(Creamhilt) Creamhilt#p1-2 722
+prt_gld.gat,138,68,6 duplicate(Creamhilt) Creamhilt#p1-3 722
+prt_gld.gat,138,60,6 duplicate(Creamhilt) Creamhilt#p1-4 722
+prt_gld.gat,135,60,6 duplicate(Creamhilt) Creamhilt#p1-5 722
+prt_gld.gat,160,210,4 duplicate(Creamhilt) Creamhilt#p1-6 722
+// In Castle =============================================
+prtg_cas01.gat,58,56,4 duplicate(Creamhilt) Creamhilt#p1-7 722
+prtg_cas01.gat,64,56,4 duplicate(Creamhilt) Creamhilt#p1-8 722
+prtg_cas01.gat,76,32,4 duplicate(Creamhilt) Creamhilt#p1-9 722
+prtg_cas01.gat,84,32,4 duplicate(Creamhilt) Creamhilt#p1-10 722
+prtg_cas01.gat,94,39,4 duplicate(Creamhilt) Creamhilt#p1-11 722
+prtg_cas01.gat,94,24,4 duplicate(Creamhilt) Creamhilt#p1-12 722
+prtg_cas01.gat,73,14,4 duplicate(Creamhilt) Creamhilt#p1-13 722
+prtg_cas01.gat,73,6,4 duplicate(Creamhilt) Creamhilt#p1-14 722
+prtg_cas01.gat,55,46,4 duplicate(Creamhilt) Creamhilt#p1-15 722
+prtg_cas01.gat,45,46,4 duplicate(Creamhilt) Creamhilt#p1-16 722
+
+
+
+//================================================================================//
+// Castle 2
+//================================================================================//
+prontera.gat,146,194,3 script Sbanhealt#p2-1::Sbanhealt 722,
+{
+ callfunc "F_Flags","Prontera","prtg_cas02",71,36;
+ close;
+
+OnRecvCastlePt02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,153,213,3 duplicate(Sbanhealt) Sbanhealt#p2-2 722
+prt_gld.gat,244,126,8 duplicate(Sbanhealt) Sbanhealt#p2-3 722
+prt_gld.gat,244,128,8 duplicate(Sbanhealt) Sbanhealt#p2-4 722
+prt_gld.gat,236,126,8 duplicate(Sbanhealt) Sbanhealt#p2-5 722
+prt_gld.gat,236,128,8 duplicate(Sbanhealt) Sbanhealt#p2-6 722
+// In Castle =============================================
+prtg_cas02.gat,40,227,4 duplicate(Sbanhealt) Sbanhealt#p2-7 722
+prtg_cas02.gat,46,227,4 duplicate(Sbanhealt) Sbanhealt#p2-8 722
+prtg_cas02.gat,11,219,4 duplicate(Sbanhealt) Sbanhealt#p2-9 722
+prtg_cas02.gat,11,214,4 duplicate(Sbanhealt) Sbanhealt#p2-10 722
+prtg_cas02.gat,20,219,4 duplicate(Sbanhealt) Sbanhealt#p2-11 722
+prtg_cas02.gat,20,214,4 duplicate(Sbanhealt) Sbanhealt#p2-12 722
+prtg_cas02.gat,79,227,8 duplicate(Sbanhealt) Sbanhealt#p2-13 722
+prtg_cas02.gat,70,227,8 duplicate(Sbanhealt) Sbanhealt#p2-14 722
+prtg_cas02.gat,38,189,8 duplicate(Sbanhealt) Sbanhealt#p2-15 722
+prtg_cas02.gat,34,189,8 duplicate(Sbanhealt) Sbanhealt#p2-16 722
+prtg_cas02.gat,153,161,4 duplicate(Sbanhealt) Sbanhealt#p2-17 722
+prtg_cas02.gat,162,161,4 duplicate(Sbanhealt) Sbanhealt#p2-18 722
+
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+prontera.gat,143,203,2 script Lazrigees#p3-1::Lazrigees 722,
+{
+ callfunc "F_Flags","Prontera","prtg_cas03",45,99;
+ close;
+
+OnRecvCastlePt03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,150,220,2 duplicate(Lazrigees) Lazrigees#p3-2 722
+prt_gld.gat,147,140,4 duplicate(Lazrigees) Lazrigees#p3-3 722
+prt_gld.gat,147,136,4 duplicate(Lazrigees) Lazrigees#p3-4 722
+prt_gld.gat,158,140,4 duplicate(Lazrigees) Lazrigees#p3-5 722
+prt_gld.gat,158,136,4 duplicate(Lazrigees) Lazrigees#p3-6 722
+// In Castle =============================================
+prtg_cas03.gat,168,28,4 duplicate(Lazrigees) Lazrigees#p3-7 722
+prtg_cas03.gat,182,28,4 duplicate(Lazrigees) Lazrigees#p3-8 722
+prtg_cas03.gat,43,50,4 duplicate(Lazrigees) Lazrigees#p3-9 722
+prtg_cas03.gat,48,50,4 duplicate(Lazrigees) Lazrigees#p3-10 722
+prtg_cas03.gat,43,58,4 duplicate(Lazrigees) Lazrigees#p3-11 722
+prtg_cas03.gat,48,58,4 duplicate(Lazrigees) Lazrigees#p3-12 722
+prtg_cas03.gat,158,210,4 duplicate(Lazrigees) Lazrigees#p3-13 722
+prtg_cas03.gat,169,210,4 duplicate(Lazrigees) Lazrigees#p3-14 722
+prtg_cas03.gat,162,201,4 duplicate(Lazrigees) Lazrigees#p3-15 722
+prtg_cas03.gat,165,201,4 duplicate(Lazrigees) Lazrigees#p3-16 722
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+prontera.gat,167,203,6 script Squagul#p4-1::Squagul 722,
+{
+ callfunc "F_Flags","Prontera","prtg_cas04",259,265;
+ close;
+
+OnRecvCastlePt04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,169,220,6 duplicate(Squagul) Squagul#p4-2 722
+prt_gld.gat,120,243,6 duplicate(Squagul) Squagul#p4-3 722
+prt_gld.gat,120,236,6 duplicate(Squagul) Squagul#p4-4 722
+prt_gld.gat,122,243,6 duplicate(Squagul) Squagul#p4-5 722
+prt_gld.gat,122,246,6 duplicate(Squagul) Squagul#p4-6 722
+// In Castle =============================================
+prtg_cas04.gat,82,29,4 duplicate(Squagul) Squagul#p4-7 722
+prtg_cas04.gat,75,29,4 duplicate(Squagul) Squagul#p4-8 722
+prtg_cas04.gat,75,27,4 duplicate(Squagul) Squagul#p4-9 722
+prtg_cas04.gat,82,27,4 duplicate(Squagul) Squagul#p4-10 722
+prtg_cas04.gat,59,29,4 duplicate(Squagul) Squagul#p4-11 722
+prtg_cas04.gat,67,29,4 duplicate(Squagul) Squagul#p4-12 722
+prtg_cas04.gat,258,25,4 duplicate(Squagul) Squagul#p4-13 722
+prtg_cas04.gat,258,20,4 duplicate(Squagul) Squagul#p4-14 722
+prtg_cas04.gat,263,20,4 duplicate(Squagul) Squagul#p4-15 722
+prtg_cas04.gat,263,27,4 duplicate(Squagul) Squagul#p4-16 722
+
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+prontera.gat,165,194,5 script Guindull#p5-1::Guindull 722,
+{
+ callfunc "F_Flags","Prontera","prtg_cas05",34,30;
+ close;
+
+OnRecvCastlePt05:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,167,213,5 duplicate(Guindull) Guindull#p5-2 722
+prt_gld.gat,199,243,2 duplicate(Guindull) Guindull#p5-3 722
+prt_gld.gat,199,236,2 duplicate(Guindull) Guindull#p5-4 722
+prt_gld.gat,197,243,2 duplicate(Guindull) Guindull#p5-5 722
+prt_gld.gat,197,236,2 duplicate(Guindull) Guindull#p5-6 722
+// In Castle =============================================
+prtg_cas05.gat,19,247,4 duplicate(Guindull) Guindull#p5-7 722
+prtg_cas05.gat,19,243,4 duplicate(Guindull) Guindull#p5-8 722
+prtg_cas05.gat,26,247,4 duplicate(Guindull) Guindull#p5-9 722
+prtg_cas05.gat,26,243,4 duplicate(Guindull) Guindull#p5-10 722
+prtg_cas05.gat,249,289,4 duplicate(Guindull) Guindull#p5-11 722
+prtg_cas05.gat,256,289,4 duplicate(Guindull) Guindull#p5-12 722
+prtg_cas05.gat,253,271,4 duplicate(Guindull) Guindull#p5-13 722
+prtg_cas05.gat,273,257,4 duplicate(Guindull) Guindull#p5-14 722
diff --git a/npc/guild/prtg/prtg_guardians.txt b/npc/guild/prtg/prtg_guardians.txt
new file mode 100644
index 000000000..0ed441b9d
--- /dev/null
+++ b/npc/guild/prtg/prtg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all prtg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+prtg_cas01.gat,197,197,0 script Guardian_Pt01 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas01.gat",10) == 1) guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas01.gat",11) == 1) guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas01.gat",12) == 1) guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas01.gat",13) == 1) guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas01.gat",14) == 1) guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas01.gat",15) == 1) guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas01.gat",16) == 1) guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas01.gat",17) == 1) guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas02.gat,158,174,0 script Guardian_Pt02 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas02.gat",10) == 1) guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas02.gat",11) == 1) guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas02.gat",12) == 1) guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas02.gat",13) == 1) guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas02.gat",14) == 1) guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas02.gat",15) == 1) guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas02.gat",16) == 1) guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas02.gat",17) == 1) guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",7;
+ end;
+
+GuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas03.gat,17,221,0 script Guardian_Pt03 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas03.gat",10) == 1) guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas03.gat",11) == 1) guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas03.gat",12) == 1) guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas03.gat",13) == 1) guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas03.gat",14) == 1) guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas03.gat",15) == 1) guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas03.gat",16) == 1) guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas03.gat",17) == 1) guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas04.gat,292,14,0 script Guardian_Pt04 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas04.gat",10) == 1) guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas04.gat",11) == 1) guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas04.gat",12) == 1) guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas04.gat",13) == 1) guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas04.gat",14) == 1) guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas04.gat",15) == 1) guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas04.gat",16) == 1) guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas04.gat",17) == 1) guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas05.gat,266,266,0 script Guardian_Pt05 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas05.gat",10) == 1) guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas05.gat",11) == 1) guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas05.gat",12) == 1) guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas05.gat",13) == 1) guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas05.gat",14) == 1) guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas05.gat",15) == 1) guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas05.gat",16) == 1) guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas05.gat",17) == 1) guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/prtg/prtg_kafras.txt b/npc/guild/prtg/prtg_kafras.txt
new file mode 100644
index 000000000..6549af533
--- /dev/null
+++ b/npc/guild/prtg/prtg_kafras.txt
@@ -0,0 +1,66 @@
+//=== eAthena Script ====================
+//= War of Emperium Kafras for Prontera Guild Castles
+//=== By: =========================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//=== Current Version: ===================
+//= 1.2
+//=== Compatible With: ===================
+//= eAthena 0.1+; RO Episode 4+
+//=== Description: =====================
+//= Provides Kafra services for guild members of Prontera Castles.
+//= Used in conjuction with function F_Kafra.
+//=== Additional Comments: =================
+//= v1.2 Optimized with functions.[kobra_k88]
+//==============================
+
+
+// Castle 1 ========================
+prtg_cas01.gat,96,173,0 script Kafra Service#Pt01 117,{
+ callfunc "F_GKafra", "prtg_cas01", "Prontera";
+ end;
+OnRecvCastlePt01:
+ if (GetCastleData("prtg_cas01.gat",9) < 1) disablenpc "Kafra Service#Pt01";
+ end;
+}
+
+
+// Castle 2 ========================
+prtg_cas02.gat,71,36,4 script Kafra Service#Pt02 117,{
+ callfunc "F_GKafra", "prtg_cas02", "Prontera";
+ end;
+OnRecvCastlePt02:
+ if (GetCastleData("prtg_cas02.gat",9) < 1) disablenpc "Kafra Service#Pt02";
+ end;
+}
+
+
+// Castle 3 ========================
+//prtg_cas03.gat,181,215,4 script Kafra Service#Pt03 117,
+prtg_cas03.gat,39,99,4 script Kafra Service#Pt03 117,{
+ callfunc "F_GKafra", "prtg_cas03", "Prontera";
+ end;
+OnRecvCastlePt03:
+ if (GetCastleData("prtg_cas03.gat",9) < 1) disablenpc "Kafra Service#Pt03";
+ end;
+}
+
+
+// Castle 4 ========================
+prtg_cas04.gat,258,247,4 script Kafra Service#Pt04 117,{
+ callfunc "F_GKafra", "prtg_cas04", "Prontera";
+ end;
+OnRecvCastlePt04:
+ if (GetCastleData("prtg_cas04.gat",9) < 1) disablenpc "Kafra Service#Pt04";
+ end;
+}
+
+
+// Castle 5 ========================
+prtg_cas05.gat,52,41,4 script Kafra Service#Pt05 117,{
+ callfunc "F_GKafra", "prtg_cas05", "Prontera";
+ end;
+OnRecvCastlePt05:
+ if (GetCastleData("prtg_cas05.gat",9) < 1) disablenpc "Kafra Service#Pt05";
+ end;
+}
diff --git a/npc/guild/prtg/prtg_managers.txt b/npc/guild/prtg/prtg_managers.txt
new file mode 100644
index 000000000..440d18b6a
--- /dev/null
+++ b/npc/guild/prtg/prtg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+prtg_cas01.gat,112,181,0 script Abrai 55,{
+ if(callfunc("F_GldManager","Abrai","prtg_cas01",15,209,"Pt01") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",7;
+ mes "[ Abrai ]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+prtg_cas02.gat,94,61,0 script Rhay 55,{
+ if(callfunc("F_GldManager","Rhay","prtg_cas02",201,229,"Pt02") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_Pt02::GuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",7;
+ mes "[ Rhay ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+prtg_cas03.gat,51,100,4 script Stick 55,{
+ if(callfunc("F_GldManager","Stick","prtg_cas03",189,132,"Pt03") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",7;
+ mes "[ Stick ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+prtg_cas04.gat,259,265,4 script Bandred 55,{
+ if(callfunc("F_GldManager","Bandred","prtg_cas04",271,162,"Pt04") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",7;
+ mes "[ Bandred ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+prtg_cas05.gat,36,37,4 script Reiner 55,{
+ if(callfunc("F_GldManager","Reiner","prtg_cas05",273,179,"Pt05") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",7;
+ mes "[ Reiner ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/prtg/prtg_treas.txt b/npc/guild/prtg/prtg_treas.txt
new file mode 100644
index 000000000..f5b4c012d
--- /dev/null
+++ b/npc/guild/prtg/prtg_treas.txt
@@ -0,0 +1,144 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas01.gat,1,1,0 script Treasure_Pt01 -1,{
+OnRecvCastlePt01:
+ if($boxNumPt01 == 0) end;
+ set $@bxPt01, $boxNumPt01;
+ callfunc "F_GldTreas","prtg_cas01","Pt01",$boxNumPt01,$@bxPt01,$@boxIdPt01,1354,6,204,15,213,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","prtg_cas01","Pt01",$boxNumPt01,$@bxPt01,$@boxIdPt01,1354,6,204,15,213,0;
+ end;
+OnDied:
+ mapannounce "prtg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt01, $boxNumPt01 -1;
+ if($boxNumPt01 == 0) mapannounce "prtg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas01.gat,15,209,0 script Switch#TresPt01 111,{
+ callfunc "F_GldTreasSw", "prtg_cas01",109,179;
+ end;
+}
+
+
+//<================================= Castle 2 ===============================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas02.gat,1,1,0 script Treasure_Pt02 -1,{
+OnRecvCastlePt02:
+ if($boxNumPt02 == 0) end;
+ set $@bxPt02, $boxNumPt02;
+ callfunc "F_GldTreas","prtg_cas02","Pt02",$boxNumPt02,$@bxPt02,$@boxIdPt02,1356,198,224,207,233,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","prtg_cas02","Pt02",$boxNumPt02,$@bxPt02,$@boxIdPt02,1356,198,224,207,233,0;
+ end;
+OnDied:
+ mapannounce "prtg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt02, $boxNumPt02 -1;
+ if($boxNumPt02 == 0) mapannounce "prtg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas02.gat,207,228,0 script Switch#TresPt02 111,{
+ callfunc "F_GldTreasSw", "prtg_cas02",94,62;
+ end;
+}
+
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas03.gat,1,1,0 script Treasure_Pt03 -1,{
+OnRecvCastlePt03:
+ if($boxNumPt03 == 0) end;
+ set $@bxPt03, $boxNumPt03;
+ callfunc "F_GldTreas","prtg_cas03","Pt03",$boxNumPt03,$@bxPt03,$@boxIdPt03,1358,184,128,193,135,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","prtg_cas03","Pt03",$boxNumPt03,$@bxPt03,$@boxIdPt03,1358,184,128,193,135,0;
+ end;
+OnDied:
+ mapannounce "prtg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt03, $boxNumPt03 -1;
+ if($boxNumPt03 == 0) mapannounce "prtg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas03.gat,193,130,0 script Switch#TresPt03 111,{
+ callfunc "F_GldTreasSw", "prtg_cas03",45,99;
+ end;
+}
+
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas04.gat,1,1,0 script Treasure_Pt04 -1,{
+OnRecvCastlePt04:
+ if($boxNumPt04 == 0) end;
+ set $@bxPt04, $boxNumPt04;
+ callfunc "F_GldTreas","prtg_cas04","Pt04",$boxNumPt04,$@bxPt04,$@boxIdPt04,1360,266,158,275,167,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","prtg_cas04","Pt04",$boxNumPt04,$@bxPt04,$@boxIdPt04,1360,266,158,275,167,0;
+ end;
+OnDied:
+ mapannounce "prtg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt04, $boxNumPt04 -1;
+ if($boxNumPt04 == 0) mapannounce "prtg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas04.gat,275,160,0 script Switch#TresPt04 111,{
+ callfunc "F_GldTreasSw", "prtg_cas04",259,265;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas05.gat,1,1,0 script Treasure_Pt05 -1,{
+OnRecvCastlePt05:
+ if($boxNumPt05 == 0) end;
+ set $@bxPt05, $boxNumPt05;
+ callfunc "F_GldTreas","prtg_cas05","Pt05",$boxNumPt05,$@bxPt05,$@boxIdPt05,1362,272,174,279,181,1;
+ end;
+OnClock1200:
+ callfunc "F_GldTreas","prtg_cas05","Pt05",$boxNumPt05,$@bxPt05,$@boxIdPt05,1362,272,174,279,181,0;
+ end;
+OnDied:
+ mapannounce "prtg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt05, $boxNumPt05 -1;
+ if($boxNumPt05 == 0) mapannounce "prtg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas05.gat,281,176,0 script Switch#TresPt05 111,{
+ callfunc "F_GldTreasSw", "prtg_cas05",34,30;
+ end;
+}