summaryrefslogtreecommitdiff
path: root/npc/guild/old
diff options
context:
space:
mode:
Diffstat (limited to 'npc/guild/old')
-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
70 files changed, 19853 insertions, 0 deletions
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