summaryrefslogtreecommitdiff
path: root/npc/guild2
diff options
context:
space:
mode:
Diffstat (limited to 'npc/guild2')
-rw-r--r--npc/guild2/arug_cas01.txt2866
-rw-r--r--npc/guild2/arug_cas02.txt2855
-rw-r--r--npc/guild2/arug_cas03.txt2867
-rw-r--r--npc/guild2/arug_cas04.txt2903
-rw-r--r--npc/guild2/arug_cas05.txt2905
5 files changed, 14396 insertions, 0 deletions
diff --git a/npc/guild2/arug_cas01.txt b/npc/guild2/arug_cas01.txt
new file mode 100644
index 000000000..78d65f4b9
--- /dev/null
+++ b/npc/guild2/arug_cas01.txt
@@ -0,0 +1,2866 @@
+//===== eAthena Script =======================================
+//= War of Emperium Second Edition
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= WoE SE Arunafeltz Castle 1
+//===== Additional Comments: =================================
+//= 1.0 First Version [L0ne_W0lf]
+//============================================================
+
+arug_cas01,1,1,0 script Manager#aru01_02 111,{
+ end;
+
+OnInterIfInitOnce:
+ GetCastleData "arug_cas01",0,"::OnRecvCastleAr01";
+ end;
+
+OnRecvCastleAr01:
+ RequestGuildInfo GetCastleData("arug_cas01",1);
+ if (GetCastleData("arug_cas01",1) == 0) {
+ donpcevent "Manager#aru01_02::Onstart";
+ }
+ end;
+
+OnAgitStart:
+ if (agitcheck()) {
+ MapRespawnGuildID "arug_cas01",GetCastleData("arug_cas01",1),2;
+ GvgOn "arug_cas01";
+ donpcevent "Manager#aru01_02::Onstart";
+ }
+ else {
+ donpcevent "#aru01_RL00::OnDisable";
+ donpcevent "#aru01_RL01::OnDisable";
+ donpcevent "#aru01_RL02::OnDisable";
+ donpcevent "#aru01_RL03::OnDisable";
+ }
+ end;
+
+OnAgitEnd:
+ GvgOff "arug_cas01";
+ if (GetCastleData("arug_cas01",1)) {
+ KillMonster "arug_cas01","Steward#aru01::OnStartArena";
+ donpcevent "Manager#aru01_02::Onreset";
+ }
+ end;
+
+Onstart:
+ // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
+ // Settings for all but Summon Guardians
+ // 0 = Okay; 1 = Destroyed; 2 = Repairing
+ // Summon Guardians
+ // 0 = Do not Summon; 1 = Summon
+ if (GetCastleData("arug_cas01",1)) {
+ setarray $agit_ar01[0],0,0,0,0,0,0;
+ donpcevent "#aru01_df01::OnEnable";
+ donpcevent "#aru01_df02::OnEnable";
+ donpcevent "#aru01_RL00::OnEnable";
+ donpcevent "#aru01_RL01::OnEnable";
+ donpcevent "#aru01_RL02::OnEnable";
+ donpcevent "#aru01_RL03::OnEnable";
+ }
+ monster "arug_cas01",87,219,"Emperium",1288,1,"Steward#aru01::OnStartArena";
+ end;
+
+Onreset:
+ donpcevent "#aru01_df01::OnDisable";
+ donpcevent "#aru01_df02::OnDisable";
+ donpcevent "#aru01_gard01::Onreset";
+ donpcevent "#aru01_gard02::Onreset";
+ donpcevent "#aru01_RL00::OnDisable";
+ donpcevent "#aru01_RL01::OnDisable";
+ donpcevent "#aru01_RL02::OnDisable";
+ donpcevent "#aru01_RL03::OnDisable";
+ donpcevent "1st Guardian Stone#aru01::OnDisable";
+ donpcevent "2nd Guardian Stone#aru01::OnDisable";
+ donpcevent "Control Device01#aru01::OnDisable";
+ donpcevent "Control Device02#aru01::OnDisable";
+ donpcevent "Control Device03#aru01::OnDisable";
+ if (agitcheck()) {
+ setarray $agit_ar01[0],0,0,1,1,1,0;
+ }
+ end;
+
+Onchange:
+ setarray $agit_ar01[0],2,2,1,1,2,0;
+ monster "arug_cas01",87,219,"Emperium",1288,1,"Steward#aru01::OnStartArena";
+ donpcevent "Control Device03#aru01::OnEnable";
+ donpcevent "1st Guardian Stone#aru01::OnEnable";
+ donpcevent "2nd Guardian Stone#aru01::OnEnable";
+ end;
+
+OnClock0001:
+ set .@Treasure,GetCastleData("arug_cas01",2)/5+4;
+ if (.@Treasure) {
+ monster "arug_cas01",251,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 2) end;
+ monster "arug_cas01",251,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 3) end;
+ monster "arug_cas01",253,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 4) end;
+ monster "arug_cas01",254,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 5) end;
+ monster "arug_cas01",255,368,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 6) end;
+ monster "arug_cas01",256,368,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 7) end;
+ monster "arug_cas01",257,368,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 8) end;
+ monster "arug_cas01",258,368,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 9) end;
+ monster "arug_cas01",251,367,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 10) end;
+ monster "arug_cas01",252,367,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 11) end;
+ monster "arug_cas01",253,367,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 12) end;
+ monster "arug_cas01",254,367,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 13) end;
+ monster "arug_cas01",255,366,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 14) end;
+ monster "arug_cas01",256,366,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 15) end;
+ monster "arug_cas01",257,366,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 16) end;
+ monster "arug_cas01",258,366,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 17) end;
+ monster "arug_cas01",251,365,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 18) end;
+ monster "arug_cas01",252,365,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 19) end;
+ monster "arug_cas01",253,365,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 20) end;
+ monster "arug_cas01",254,365,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 21) end;
+ monster "arug_cas01",255,364,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 22) end;
+ monster "arug_cas01",256,364,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 23) end;
+ monster "arug_cas01",257,364,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
+ if (.@Treasure < 24) end;
+ monster "arug_cas01",258,364,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+ }
+ end;
+
+OnTreasureDied:
+ end;
+}
+
+arug_cas01,112,193,1 script Brace#aru01_01 868,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (.@GID == 0) {
+ mes "[Brace]";
+ mes "Great job. Now, all you";
+ mes "need to do is destroy this";
+ mes "Emperium to gain ownership";
+ mes "over this stronghold.";
+ close;
+ }
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[Brace]";
+ mes "As guardian of this";
+ mes "stronghold, I answer only";
+ mes "to the master of the guild";
+ mes "that controls this place.";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "[Brace]";
+ mes "I am Brace, guardian of";
+ mes "this stronghold. For now,";
+ mes "all is quiet in this place.";
+ next;
+ switch(select("Converse:Cancel")) {
+ case 1:
+ mes "[Brace]";
+ mes "Do you have any questions";
+ mes "about this stronghold?";
+ next;
+ switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
+ case 1:
+ mes "[Brace]";
+ mes "There is one Emperium";
+ mes "and two Guardian Stones in";
+ mes "each fortress. These stones";
+ mes "are the first line of defense,";
+ mes "and must be destroyed before";
+ mes "enemies can even enter.";
+ next;
+ mes "[Brace]";
+ mes "The stones are located in";
+ mes "^4D4DFFGate Houses^000000 which must be";
+ mes "protected to prevent enemies";
+ mes "from reaching the Emperium.";
+ mes "Guardian Stones can ^4D4DFFrecall";
+ mes "your Guardians^000000 for protection.";
+ next;
+ mes "[Brace]";
+ mes "Fortresses with higher levels";
+ mes "of defense can summon more";
+ mes "Guardians: this is why it is";
+ mes "so important for guilds to";
+ mes "invest in Defense Growth.";
+ next;
+ mes "[Brace]";
+ mes "Guardian Stones that have";
+ mes "been destroyed can be revived";
+ mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
+ mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
+ close;
+ case 2:
+ mes "[Brace]";
+ mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
+ mes "and are protected by extra barricades activated by the Guardian Stones.";
+ mes "These gates are located in three different parts of the fortress.";
+ next;
+ mes "[Brace]";
+ mes "Barricades are protected by";
+ mes "Guardian Stones, and are";
+ mes "restored when the Guardian";
+ mes "Stones are retrieved. However,";
+ mes "it is not as easy to restore";
+ mes "destroyed Fortress Gates.";
+ next;
+ mes "[Brace]";
+ mes "Fortress Gates can only be";
+ mes "restored when the ^4D4DFFguild";
+ mes "master of a stronghold";
+ mes "changes^000000, or if ^4D4DFFrestoration";
+ mes "is requested by the guild";
+ mes "master of the stronghold^000000.";
+ close;
+ case 3:
+ mes "[Brace]";
+ mes "Strongholds have many";
+ mes "Link Flags that allow you";
+ mes "to access vital areas within";
+ mes "restrictions placed by the";
+ mes "Barricades. Usually, ^4D4DFFFlag 1";
+ mes "links to the Gate House^000000.";
+ next;
+ mes "[Brace]";
+ mes "Many flags link directly to";
+ mes "the flag near the Emperium.";
+ mes "The final numbered flag is";
+ mes "linked to the Convenience";
+ mes "Facility of the stronghold's";
+ mes "owner. Keep this in mind.";
+ close;
+ case 4:
+ mes "[Brace]";
+ mes "Strategy? It would be better";
+ mes "to develop your battle plan to";
+ mes "exploit your guild's advantages";
+ mes "and your enemies' weaknesses.";
+ mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ close;
+ case 5:
+ mes "[Brace]";
+ mes "You have no questions";
+ mes "to ask of me? Well, I'm";
+ mes "here to serve your needs.";
+ close;
+ }
+ case 2:
+ mes "[Brace]";
+ mes "I'm always here, so";
+ mes "feel free to request my";
+ mes "assistance whenever";
+ mes "the need arises.";
+ close;
+ }
+ }
+ else {
+ mes "[Brace]";
+ mes "Greetings, "+strcharinfo(0)+".";
+ mes "What are your orders?";
+ next;
+ switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
+ case 1:
+ if ($agit_ar01[5] == 0) {
+ if (getgdskilllv(.@GID,10002) == 0) {
+ mes "[Brace]";
+ mes "I'm sorry, but the Guardian";
+ mes "Stones aren't powerful enough";
+ mes "to summon Guardians yet. We";
+ mes "need to accumulate more";
+ mes "knowledge before they can";
+ mes "summon any Guardians.";
+ close;
+ }
+ else {
+ mes "[Brace]";
+ mes "I shall endeavor to summon";
+ mes "a Guardian through a Guardian";
+ mes "Stone. However, keep in mind";
+ mes "that this will not work if the";
+ mes "Guardian Stone is destroyed.";
+ setarray $agit_ar01[5],1;
+ if ($agit_ar01[0] == 0) {
+ donpcevent "#aru01_gard01::OnEnable";
+ }
+ if ($agit_ar01[1] == 0) {
+ donpcevent "#aru01_gard02::OnEnable";
+ }
+ close;
+ }
+ }
+ else {
+ mes "[Brace]";
+ mes "You've already commanded";
+ mes "me to summon a Guardian";
+ mes "to defend the stronghold.";
+ close;
+ }
+ case 2:
+ mes "[Brace]";
+ mes "Our defense status is...";
+ if ($agit_ar01[0] == 1) {
+ mes "1st Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar01[0] == 2) {
+ mes "1st Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar01[1] == 1) {
+ mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar01[1] == 2) {
+ mes "2nd Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar01[2] == 1) {
+ mes "1st Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar01[2] == 2) {
+ mes "1st Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar01[3] == 1) {
+ mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar01[3] == 2) {
+ mes "2nd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar01[4] == 1) {
+ mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar01[4] == 2) {
+ mes "3rd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ close;
+ case 3:
+ mes "[Brace]";
+ mes "I'll be standing by,";
+ mes "awaiting your orders.";
+ close;
+ }
+ }
+ }
+ }
+ else {
+ mes "[Brace]";
+ mes "Who are you? Scoundrel!";
+ mes "Leave this stronghold now!";
+ close;
+ }
+
+OnInit:
+ setarray $agit_ar01[0],0,0,0,0,0,0;
+ end;
+}
+
+arug_cas01,1,1,0 script #aru01_gard01 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas01",3);
+ guardian "arug_cas01",233,83,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //0;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //3;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas01",224,168,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //4;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas01",195,250,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",196,137,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //5;
+ mapannounce "arug_cas01","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",269,89,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //6;
+ mapannounce "arug_cas01","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer1800000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //7;
+ mapannounce "arug_cas01","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer2700000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //8;
+ mapannounce "arug_cas01","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer3600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",224,168,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //9;
+ mapannounce "arug_cas01","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",222,129,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //10;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas01","#aru01_gard01::OnGuardianDied";
+ end;
+}
+
+arug_cas01,1,2,0 script #aru01_gard02 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas01",3);
+ guardian "arug_cas01",294,210,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //11;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //14;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas01",235,132,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //15;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas01",292,188,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ }
+ initnpctimer;
+ end;
+
+OnTimer600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",235,132,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //16;
+ end;
+
+OnTimer1200000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //17;
+ end;
+
+OnTimer2100000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //18;
+ end;
+
+OnTimer3000000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //19;
+ end;
+
+OnTimer3900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",254,95,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //20;
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas01",242,151,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //21;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas01","#aru01_gard02::OnGuardianDied";
+ end;
+}
+
+arug_cas01,1,3,0 script #aru01_df01 -1,{
+OnEnable:
+ guardian "arug_cas01",210,234,"1st Guardian Stone",1907,"#aru01_df01::OnGuardianDied"; //22;
+ end;
+
+OnDisable:
+ killmonster "arug_cas01","#aru01_df01::OnGuardianDied";
+ setarray $agit_ar01[0],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 1st Guardian Stone is Destroyed
+ setarray $agit_ar01[0],1;
+ if (($agit_ar01[0] == 1) || ($agit_ar01[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar01[1] == 1) || ($agit_ar01[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas01","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru01_RL00::OnDisable";
+ donpcevent "#aru01_gard01::Onreset";
+ }
+ else {
+ mapannounce "arug_cas01","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru01_gard01::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "1st Guardian Stone#aru01::OnGuardian";
+ setarray $agit_ar01[0],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas01,211,234,0 script 1st Guardian Stone#aru01 844,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"1st Guardian Stone#aru01" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"1st Guardian Stone#aru01" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"1st Guardian Stone#aru01" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar01[0] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "already completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru01_df01::OnEnable";
+ specialeffect 135; //"1st Guardian Stone#aru01" EF_ICECRASH
+ disablenpc "1st Guardian Stone#aru01";
+ setarray $agit_ar01[0],0;
+ set .@df_all,$agit_ar01[0]+$agit_ar01[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas01","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru01_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas01","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar01[5] == 1) {
+ donpcevent "#aru01_gard01::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "1st Guardian Stone#aru01";
+ end;
+
+OnEnable:
+ enablenpc "1st Guardian Stone#aru01";
+ specialeffect 247; //"1st Guardian Stone#aru01" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "1st Guardian Stone#aru01";
+ end;
+}
+
+arug_cas01,1,4,0 script #aru01_df02 -1,{
+OnEnable:
+ guardian "arug_cas01",308,189,"2nd Guardian Stone",1908,"#aru01_df02::OnGuardianStoneDied"; //23;
+ end;
+
+OnDisable:
+ killmonster "arug_cas01","#aru01_df02::OnGuardianStoneDied";
+ setarray $agit_ar01[1],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 2nd Guardian Stone is Destroyed
+ setarray $agit_ar01[1],1;
+ if (($agit_ar01[0] == 1) || ($agit_ar01[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar01[1] == 1) || ($agit_ar01[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas01","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru01_RL00::OnDisable";
+ donpcevent "#aru01_gard02::Onreset";
+ }
+ else {
+ mapannounce "arug_cas01","The 2nd Guardian Stone have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru01_gard02::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "2nd Guardian Stone#aru01::OnEnable";
+ setarray $agit_ar01[1],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas01,308,189,0 script 2nd Guardian Stone#aru01 844,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"2nd Guardian Stone#aru01" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"2nd Guardian Stone#aru01" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"2nd Guardian Stone#aru01" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru01" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar01[1] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "successfully completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru01_df02::OnEnable";
+ specialeffect 135; //"2nd Guardian Stone#aru01" EF_ICECRASH
+ disablenpc "2nd Guardian Stone#aru01";
+ setarray $agit_ar01[1],0;
+ set .@df_all,$agit_ar01[0]+$agit_ar01[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas01","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru01_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas01","The 2nd Guardian Stone was repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar01[5] == 1) {
+ donpcevent "#aru01_gard02::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "2nd Guardian Stone#aru01";
+ end;
+
+OnEnable:
+ enablenpc "2nd Guardian Stone#aru01";
+ specialeffect 247; //"2nd Guardian Stone#aru01" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "2nd Guardian Stone#aru01";
+ end;
+}
+
+// Barrier Summoners
+arug_cas01,2,1,0 script #aru01_RL00 -1,{
+OnEnable:
+ setcell "arug_cas01",238,74,245,74,cell_walkable,0;
+ setcell "arug_cas01",238,74,245,74,cell_shootable,0;
+ guardian "arug_cas01",239,73," ",1905,"#aru01_RL00::OnBarrierDestroyed"; //24;
+ guardian "arug_cas01",241,73," ",1905,"#aru01_RL00::OnBarrierDestroyed"; //25;
+ guardian "arug_cas01",243,73," ",1905,"#aru01_RL00::OnBarrierDestroyed"; //26;
+ guardian "arug_cas01",245,73," ",1905,"#aru01_RL00::OnBarrierDestroyed"; //27;
+ end;
+
+OnDisable:
+ setcell "arug_cas01",238,74,245,74,cell_walkable,1;
+ setcell "arug_cas01",238,74,245,74,cell_shootable,1;
+ killmonster "arug_cas01","#aru01_RL00::OnBarrierDestroyed";
+ end;
+
+OnBarrierDestroyed:
+ end;
+}
+
+arug_cas01,2,2,0 script #aru01_RL01 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas01",239,53,246,53,cell_walkable,0;
+ guardian "arug_cas01",239,55," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //28;
+ guardian "arug_cas01",241,55," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //29;
+ guardian "arug_cas01",243,55," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //30;
+ guardian "arug_cas01",240,54," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //31;
+ guardian "arug_cas01",242,54," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //32;
+ guardian "arug_cas01",244,54," ",1905,"#aru01_RL01::OnBarrierDestroyed"; //33;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar01[2],1;
+ mapannounce "arug_cas01","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas01",239,53,246,53,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas01",239,53,246,53,cell_walkable,1;
+ killmonster "arug_cas01","#aru01_RL01::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas01,2,3,0 script #aru01_RL02 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas01",107,124,112,124,cell_walkable,0;
+ guardian "arug_cas01",107,122," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //34;
+ guardian "arug_cas01",109,122," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //35;
+ guardian "arug_cas01",111,122," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //36;
+ guardian "arug_cas01",108,123," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //37;
+ guardian "arug_cas01",110,123," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //38;
+ guardian "arug_cas01",112,123," ",1905,"#aru01_RL02::OnBarrierDestroyed"; //39;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar01[3],1;
+ mapannounce "arug_cas01","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas01",107,124,112,104,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas01",107,124,112,104,cell_walkable,1;
+ killmonster "arug_cas01","#aru01_RL02::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas01,2,4,0 script #aru01_RL03 -1,{
+OnEnable:
+ set .MyMobCount,4;
+ setcell "arug_cas01",84,171,91,171,cell_walkable,0;
+ guardian "arug_cas01",84,170," ",1905,"#aru01_RL03::OnBarrierDestroyed"; //40;
+ guardian "arug_cas01",86,170," ",1905,"#aru01_RL03::OnBarrierDestroyed"; //41;
+ guardian "arug_cas01",88,170," ",1905,"#aru01_RL03::OnBarrierDestroyed"; //42;
+ guardian "arug_cas01",90,170," ",1905,"#aru01_RL03::OnBarrierDestroyed"; //43;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar01[4],1;
+ mapannounce "arug_cas01","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
+ setcell "arug_cas01",84,171,91,171,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas01",84,171,91,171,cell_walkable,1;
+ killmonster "arug_cas01","#aru01_RL03::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas01,247,52,0 script Control Device01#aru01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar01[2] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon,";
+ mes "but it's not working very well.^FFFFFF ^3355FF You'll have to try something else.";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru01_RL01::OnEnable";
+ disablenpc "Control Device01#aru01";
+ mapannounce "arug_cas01","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[2],0;
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device01#aru01";
+ end;
+
+OnEnable:
+ enablenpc "Control Device01#aru01";
+ end;
+
+OnDisable:
+ disablenpc "Control Device01#aru01";
+ end;
+}
+
+arug_cas01,118,131,0 script Control Device02#aru01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar01[3] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru01_RL02::OnEnable";
+ disablenpc "Control Device02#aru01";
+ mapannounce "arug_cas01","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[3],0; //Global Variable
+ setarray $agit_ar01[2],2; //Global Variable
+ donpcevent "Control Device01#aru01::OnEnable";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device02#aru01";
+ end;
+
+OnEnable:
+ enablenpc "Control Device02#aru01";
+ end;
+
+OnDisable:
+ disablenpc "Control Device02#aru01";
+ end;
+}
+
+arug_cas01,82,172,0 script Control Device03#aru01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar01[4] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru01_RL03::OnEnable";
+ disablenpc "Control Device03#aru01";
+ mapannounce "arug_cas01","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[4],0;
+ setarray $agit_ar01[3],2;
+ donpcevent "Control Device02#aru01::OnDevice02#aru01_dlrp02";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device03#aru01";
+ end;
+
+OnEnable:
+ enablenpc "Control Device03#aru01";
+ end;
+
+OnDisable:
+ disablenpc "Control Device03#aru01";
+ end;
+}
+
+// Link Flags
+arug_cas01,74,232,0 script LF-01#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("First Gate House:Second Gate House:Cancel")) {
+ case 1:
+ warp "arug_cas01",158,237;
+ end;
+ case 2:
+ warp "arug_cas01",297,248;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,77,232,0 script LF-02#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
+ case 1:
+ warp "arug_cas01",197,144;
+ end;
+ case 2:
+ warp "arug_cas01",245,103;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,80,232,0 script LF-03#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
+ case 1:
+ warp "arug_cas01",256,35;
+ end;
+ case 2:
+ warp "arug_cas01",186,26;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,83,232,0 script LF-04#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas01",146,65;
+ end;
+ case 2:
+ warp "arug_cas01",176,111;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,86,232,0 script LF-05#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas01",94,126;
+ end;
+ case 2:
+ warp "arug_cas01",126,126;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,89,232,0 script LF-06#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-3:Defense Area 3-4:Cancel")) {
+ case 1:
+ warp "arug_cas01",68,171;
+ end;
+ case 2:
+ warp "arug_cas01",105,182;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,92,232,0 script LF-07#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Gate House Fork:Cancel")) {
+ case 1:
+ warp "arug_cas01",233,130;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,95,232,0 script LF-08#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Area 1-1:Area 2-1:Area 3-1:Cancel")) {
+ case 1:
+ warp "arug_cas01",197,144;
+ end;
+ case 2:
+ warp "arug_cas01",256,35;
+ end;
+ case 3:
+ warp "arug_cas01",146,65;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,98,232,0 script LF-09#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Area 1-2:Area 2-2:Area 3-3:Cancel")) {
+ case 1:
+ warp "arug_cas01",245,103;
+ end;
+ case 2:
+ warp "arug_cas01",186,26;
+ end;
+ case 3:
+ warp "arug_cas01",68,171;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,101,232,0 script LF-10#arug_cas01 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to the";
+ mes "Convenience Facility for";
+ mes "guild members?^000000";
+ switch(select("Go to Convenience Facility:Cancel")) {
+ case 1:
+ warp "arug_cas01",121,357;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,72,176,0 script Mardol#LF_ar01_1::LF_ar01_1 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas01",67,193;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas01,103,186,0 duplicate(LF_ar01_1) Mardol#LF_ar01_2 111,{
+
+arug_cas01,92,126,4 script Mardol#LF_ar01_3::LF_ar01_2 111,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas01",67,193;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+
+OnRecvCastleAr01:
+ FlagEmblem GetCastleData("arug_cas01",1);
+ end;
+}
+
+arug_cas01,127,126,4 duplicate(LF_ar01_2) Mardol#LF_ar01_3 111
+arug_cas01,150,102,0 duplicate(LF_ar01_1) Mardol#LF_ar01_4 111
+arug_cas01,208,68,0 duplicate(LF_ar01_1) Mardol#LF_ar01_5 111
+arug_cas01,249,52,0 duplicate(LF_ar01_1) Mardol#LF_ar01_6 111
+arug_cas01,234,76,0 duplicate(LF_ar01_1) Mardol#LF_ar01_7 111
+arug_cas01,249,76,0 duplicate(LF_ar01_1) Mardol#LF_ar01_8 111
+arug_cas01,204,142,0 duplicate(LF_ar01_1) Mardol#LF_ar01_9 111
+arug_cas01,183,244,0 duplicate(LF_ar01_1) Mardol#LF_ar01_10 111
+arug_cas01,292,219,0 duplicate(LF_ar01_1) Mardol#LF_ar01_11 111
+arug_cas01,102,120,4 duplicate(LF_ar01_2) Mardol#LF_ar01_12 722
+arug_cas01,117,120,4 duplicate(LF_ar01_2) Mardol#LF_ar01_13 722
+arug_cas01,233,140,4 duplicate(LF_ar01_2) Mardol#LF_ar01_14 722
+
+// Guild Manager
+arug_cas01,92,380,3 script Steward#aru01 55,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (.@GID == 0) {
+ mes "[ Steward ]";
+ mes "I await for the master";
+ mes "whom destiny will choose";
+ mes "for me. Do you think you";
+ mes "have to courage and strength";
+ mes "to conquer this stronghold?";
+ close;
+ }
+ if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[ Steward ]";
+ mes "Hmpf. Your threats don't";
+ mes "scare me! Guardians, drive";
+ mes "this infidel away from here!";
+ mes "I will always be loyal to the";
+ mes "master of this stronghold,";
+ MES "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000.";
+ close;
+ }
+ mes "[ Steward ]";
+ mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
+ mes "How shall I serve you today?";
+ mes "Was there an aspect of this";
+ mes "stronghold's maintenance";
+ mes "you wanted to discuss?";
+ next;
+ switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "The Commercial Growth";
+ mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas01",2) + ".";
+ if (GetCastleData("arug_cas01",4) > 0) {
+ mes "Last time, you invested in";
+ mes "Commercial Growth " + GetCastleData("arug_cas01",4) + ".";
+ }
+ next;
+ mes "[ Steward ]";
+ mes "Our stronghold's";
+ mes "safeguard level is " + GetCastleData("arug_cas01",3) + ".";
+ if (GetCastleData("arug_cas01",5) > 0) {
+ mes "Last time, you invested";
+ mes "in defense " + GetCastleData("arug_cas01",5) + " times.";
+ }
+ mes " ";
+ mes "That is all, master.";
+ close;
+ case 2:
+ set .@Economy,GetCastleData("arug_cas01",2);
+ if(.@Economy < 8) set .@eco_invest,10000;
+ if(.@Economy >= 8) set .@eco_invest,20000;
+ if(.@Economy >= 16) set .@eco_invest,40000;
+ if(.@Economy >= 25) set .@eco_invest,80000;
+ if(.@Economy >= 34) set .@eco_invest,160000;
+ if(.@Economy >= 44) set .@eco_invest,320000;
+ if(.@Economy >= 54) set .@eco_invest,640000;
+ if(.@Economy >= 65) set .@eco_invest,1280000;
+ if(.@Economy >= 76) set .@eco_invest,2560000;
+ if(.@Economy >= 88) set .@eco_invest,5120000;
+ mes "[ Steward ]";
+ mes "Raising the stronghold's";
+ mes "commercial growth will";
+ mes "increase the quantity of";
+ mes "goods produced for the guild.";
+ mes "Investing in commercial growth";
+ mes "will help the guild's future.";
+ next;
+ mes "[ Steward ]";
+ mes "You can make one investment";
+ mes "each day, but if you can make";
+ mes "two investments if you pay";
+ mes "more zeny: this will speed";
+ mes "up commercial development,";
+ mes "but can be quite expensive.";
+ next;
+ if (.@Economy == 100) {
+ mes "[ Steward ]";
+ mes "However, our stronghold's";
+ mes "commerical growth level is";
+ mes "at 100%. It's not possible to";
+ mes "develop commercial growth";
+ mes "any further than that.";
+ close;
+ }
+ if (GetCastleData("arug_cas01",4) == 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
+ if (GetCastleData("arug_cas01",4) == 0) {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
+ mes "to make an investment";
+ mes "Will you invest in this";
+ mes "stronghold's commerical";
+ mes "development now?";
+ }
+ else {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000";
+ mes "more zeny to make a second";
+ mes "investment today. Will you";
+ mes "invest one more time?";
+ }
+ next;
+ switch(select("Invest in Commercial Growth:Cancel")) {
+ case 1:
+ if (Zeny < .@eco_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ end;
+ }
+ set zeny,zeny-.@eco_invest;
+ SetCastleData "arug_cas01",4,GetCastleData("arug_cas01",4)+1;
+ SetCastleData "arug_cas01",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014));
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. We can expect";
+ mes "to see the results of this";
+ mes "investment by tomorrow.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 3:
+ set .@Defence,GetCastleData("arug_cas01",3);
+ if(.@Defence < 8) set .@def_invest,20000;
+ if(.@Defence >= 8) set .@def_invest,40000;
+ if(.@Defence >= 16) set .@def_invest,80000;
+ if(.@Defence >= 25) set .@def_invest,160000;
+ if(.@Defence >= 34) set .@def_invest,320000;
+ if(.@Defence >= 44) set .@def_invest,640000;
+ if(.@Defence >= 54) set .@def_invest,1280000;
+ if(.@Defence >= 65) set .@def_invest,2560000;
+ if(.@Defence >= 76) set .@def_invest,5120000;
+ if(.@Defence >= 88) set .@def_invest,10240000;
+ mes "[ Steward ]";
+ mes "Investing in our stronghold's";
+ mes "defense will enhance the";
+ mes "durability of our Guardians";
+ mes "and the Emperium. We'll need";
+ mes "every advantage to protect";
+ mes "ourselves from our enemies.";
+ next;
+ mes "[ Steward ]";
+ mes "You can invest in defense";
+ mes "once per day, but if you pay";
+ mes "more zeny, you can invest";
+ mes "a maximum of two times daily.";
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas01",3) == 100) {
+ mes "The Defense Level of this";
+ mes "stronghold is 100%, and";
+ mes "cannot be increased further.";
+ close;
+ }
+ if (GetCastleData("arug_cas01",5) == 2) {
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas01",5) == 0) {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses.";
+ mes "Will you invest now?";
+ }
+ else {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses";
+ mes "a second time today.";
+ mes "Will you invest now?";
+ }
+ next;
+ switch(select("Invest in Defense:Cancel")) {
+ case 1:
+ if (Zeny < .@def_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ close;
+ }
+ set zeny,zeny-.@def_invest;
+ SetCastleData "arug_cas01",5,GetCastleData("arug_cas01",5)+1;
+ SetCastleData "arug_cas01",3,.@Defence+1;
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. Increasing";
+ mes "the frequency of treasure";
+ mes "procured by the guild will";
+ mes "definitely help us all.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 4:
+ if (GetCastleData("arug_cas01",9) == 1) {
+ mes "[ Steward ]";
+ mes "Do you wish to dismiss";
+ mes "the Kafra Employee that";
+ mes "we've hired for the guild?";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "Master, please reconsider!";
+ mes "I've been working very hard";
+ mes "for the success of the guild!";
+ mes "I'll try harder to serve the";
+ mes "guild members of this";
+ mes "stronghold, I promise!";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ mes "[ Hired Kafra Employee ]";
+ mes "Why?! What have I done";
+ mes "to deserve this? Waaah~!";
+ next;
+ cutin "kafra_01",255;
+ break;
+ case 2:
+ mes "[ Hired Kafra Employee ]";
+ mes "Thank you, Master!";
+ mes "I'll obey your every";
+ mes "command as best I can!";
+ mes "You won't regret this!";
+ close;
+ }
+ break;
+ case 2:
+ mes "[ Steward ]";
+ mes "She works very hard,";
+ mes "in my opinion. It was in";
+ mes "all of our best interests to";
+ mes "allow her to stay with us.";
+ close;
+ }
+ disablenpc "Kafra Employee#arug_cas01";
+ SetCastleData "arug_cas01",9,0;
+ mes "[ Steward ]";
+ mes "That Kafra Employee";
+ mes "has been dismissed.";
+ mes "Were really dissatisfied";
+ mes "by the quality of her service?";
+ close;
+ }
+ else {
+ mes "[ Steward ]";
+ mes "Will you hire a";
+ mes "Kafra Employee to serve";
+ mes "our stronghold? You must";
+ mes "pay ^FF000010,000 zeny^000000 to hire one.";
+ next;
+ switch(select("Hire:Cancel")) {
+ case 1:
+ if (getgdskilllv(.@GID,10001) == 0) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "you have not yet attained";
+ mes "the ^FF0000Contract with Kafra^000000";
+ mes "guild skill.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "we do not have enough";
+ mes "funds to pay the contract fee.";
+ close;
+ }
+ set zeny,zeny-10000;
+ enablenpc "Kafra Employee#aru01";
+ SetCastleData "arug_cas01",9,1;
+ mes "[ Steward ]";
+ mes "Very well. We have formed";
+ mes "a contract with the Kafra";
+ mes "Head Office, and hired a";
+ mes "Kafra Employee for our";
+ mes "stronghold. Here she is~";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "How do you do? I've";
+ mes "been dispatched by the";
+ mes "Kafra Head Office to";
+ mes "serve your guild's needs.";
+ mes "I'll do my best to follow";
+ mes "your every command, Master.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Steward ]";
+ mes "Our contract will expire";
+ mes "after one month, so we must";
+ mes "pay additional fees to keep";
+ mes "this Kafra Employee in";
+ mes "the service of our guild.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ mes "However, I suggest hiring";
+ mes "a Kafra Employee as soon";
+ mes "as possible since our guild";
+ mes "would greatly benefit from";
+ mes "the convenient Kafra services.";
+ close;
+ }
+ }
+ case 5:
+ mes "[ Steward ]";
+ mes "Do you wish to enter the";
+ mes "Guild Treasure Room?";
+ mes "Only you, the Guild Master,";
+ mes "are permitted to enter.";
+ next;
+ mes "[ Steward ]";
+ mes "Please remember to open";
+ mes "the Treasure Boxes at the";
+ mes "proper time. Otherwise, the";
+ mes "treasure may disappear if";
+ mes "something unexpected happens.";
+ next;
+ switch(select("Go to Treasure Room:Cancel")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "Allow me to guide you";
+ mes "on the secret path to";
+ mes "the Treasure Room.";
+ mes "Press the secret switch";
+ mes "when you wish to return here.";
+ close2;
+ warp "arug_cas01",250,363;
+ end;
+ case 2:
+ mes "[ Steward ]";
+ mes "Items in the Treasure Room";
+ mes "are produced once each day.";
+ mes "Therefore, you must obtain";
+ mes "the treasure items everyday.";
+ mes "For the sake of the guild,";
+ mes "prioritize treasure harvesting!";
+ close;
+ }
+ }
+
+Onstop:
+ stopnpctimer;
+ end;
+
+OnStartArena:
+ set .@GID,getcharid(2);
+ // Lower castle Economy
+ set .@Economy,GetCastleData("arug_cas01",2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData "arug_cas01", 2, .@Economy;
+ // Lower Castle Defence
+ set .@Defence,GetCastleData("arug_cas01",3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData "arug_cas01", 3, .@Defence;
+ // Set new owner
+ SetCastleData "arug_cas01",1, .@GID;
+ // Clear castle's data.
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData "arug_cas01", .@i, 0;
+ // Disable Kafra
+ disablenpc "Kafra Employee#aru01";
+
+ set .msg,2;
+ if (.msg == 1) {
+ announce "Fortress [" + GetCastleName("arug_cas01") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru01_02::Onstart";
+ }
+ else if (.msg == 2) {
+ announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 1] stronghold of " + GetCastleName("arug_cas01"),bc_all;
+ mapannounce "arug_cas01","The emperium has been shattered!",bc_map,"0x00FF00";
+ if (agitcheck()) {
+ donpcevent "Manager#aru01_02::Onreset";
+ initnpctimer;
+ }
+ else {
+ donpcevent "Manager#aru01_02::Onreset";
+ stopnpctimer;
+ }
+ }
+ else if (.msg == 0) {
+ announce "Fortress [" + GetCastleName("arug_cas01") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru01_02::Onreset";
+ stopnpctimer;
+ end;
+ }
+ MapRespawnGuildID "arug_cas01",GetCastleData("arug_cas01",1),2;
+ GetCastleData "arug_cas01",0,"::OnRecvCastleAr01";
+ end;
+
+OnTimer10000:
+ donpcevent "Manager#aru01_02::Onchange";
+ mapannounce "arug_cas01","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00";
+ end;
+}
+
+// Guild Kafra
+arug_cas01,31,362,3 script Kafra Employee#aru01 117,{
+ cutin "kafra_01",2;
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ mes "[Kafra Employee]";
+ mes "Welcome, proud member";
+ mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
+ mes "The Kafra Corporation is ready";
+ mes "to assist you wherever you go!";
+ next;
+ switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
+ case 1:
+ if (basicskillcheck() && getskilllv(1) < 6) {
+ mes "[Kafra Employee]";
+ mes "I'm so sorry, but you must";
+ mes "have at least Novice Skill";
+ mes "Lv.6 to use the Storage.";
+ }
+ else {
+ openstorage;
+ }
+ break;
+ case 2:
+ mes "[Kafra Employee]";
+ mes "Please tell me your";
+ mes "Warp destination.";
+ next;
+ switch(select("Rachel -> 200 z:Cancel")) {
+ case 1:
+ if (Zeny < 200) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to pay";
+ mes "the warp fee. Would you";
+ mes "please check your funds again?";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-200;
+ warp "rachel",115,125;
+ end;
+ case 2:
+ cutin "kafra_01",255;
+ }
+ break;
+ case 3:
+ if (BaseClass != Job_Merchant) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but the Pushcart";
+ mes "rental service can only be";
+ mes "used by Merchant, Blacksmith,";
+ mes "and Alchemist class characters.";
+ }
+ else if (checkcart() == 1) {
+ mes "[Kafra Employee]";
+ mes "Hm? You've already";
+ mes "rented a Pushcart.";
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "The Pushcart rental fee";
+ mes "is 800 zeny. Would you";
+ mes "like to rent a Pushcart?";
+ next;
+ switch(select("Rent Pushcart:Cancel")) {
+ case 1:
+ if (Zeny < 800) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to rent";
+ mes "one of our Pushcarts.";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-800;
+ setcart;
+ break;
+ case 2:
+ break;
+ }
+ }
+ break;
+ case 4:
+ mes "[Kafra Employee]";
+ mes "Thank you for using the";
+ mes "Kafra Service. Wherever";
+ mes "you go, Kafra will be";
+ mes "there to support you!";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but I've been";
+ mes "exclusively contracted";
+ mes "to the members of the";
+ mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes "You'll have to ask another";
+ mes "Kafra Employee to help you...";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+
+OnRecvCastleAr01:
+ if (GetCastleData("arug_cas01",1) == 0) {
+ monster "arug_cas01",0,0,"Evil Druid",1117,10;
+ monster "arug_cas01",0,0,"Khalitzburg",1132,4;
+ monster "arug_cas01",0,0,"Abysmal Knight",1219,3;
+ monster "arug_cas01",0,0,"Executioner",1205,1;
+ monster "arug_cas01",0,0,"Penomena",1216,10;
+ monster "arug_cas01",0,0,"Alarm",1193,18;
+ monster "arug_cas01",0,0,"Clock",1269,9;
+ monster "arug_cas01",0,0,"Raydric Archer",1276,12;
+ monster "arug_cas01",0,0,"Wanderer",1208,3;
+ monster "arug_cas01",0,0,"Alice",1275,1;
+ monster "arug_cas01",0,0,"Bloody Knight",1268,2;
+ monster "arug_cas01",0,0,"Dark Lord",1272,2;
+ monster "arug_cas01",0,0,"Tower Keeper",1270,4;
+ }
+ if (GetCastleData("arug_cas01",9) < 1) {
+ disablenpc "Kafra Employee#aru01";
+ }
+ end;
+}
+
+arug_cas01,259,371,0 script #aru01_switch 111,{
+ mes " ";
+ mes "^3355FFWill you pull";
+ mes "this small lever?^000000";
+ next;
+ switch(select("Pull Lever:Cancel")) {
+ case 1:
+ warp "arug_cas01",121,357;
+ end;
+ case 2:
+ close;
+ }
+}
+
+aru_gld,164,270,4 script Mardol#flag_Ar01_1::Ar01_Flag 722,{
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ if (getcharid(2) == .@GID) {
+ mes "[ Ringing Voice ]";
+ mes "Courageous one,";
+ mes "do you wish to return";
+ mes "to your stronghold?";
+ next;
+ switch(select("Return to the Stronghold:Cancel")) {
+ case 1:
+ set .@GID, GetCastleData("arug_cas01",1);
+ if (getcharid(2) == .@GID) {
+ warp "arug_cas01",67,193;
+ end;
+ }
+ close;
+ case 2:
+ close;
+ }
+ }
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastleAr01:
+ FlagEmblem GetCastleData("arug_cas01",1);
+ end;
+}
+
+aru_gld,142,235,4 duplicate(Ar01_Flag) Mardol#flag_Ar01_2 722
+aru_gld,164,245,5 duplicate(Ar01_Flag) Mardol#flag_Ar01_3 722
+aru_gld,182,255,5 duplicate(Ar01_Flag) Mardol#flag_Ar01_4 722
diff --git a/npc/guild2/arug_cas02.txt b/npc/guild2/arug_cas02.txt
new file mode 100644
index 000000000..27ba393b9
--- /dev/null
+++ b/npc/guild2/arug_cas02.txt
@@ -0,0 +1,2855 @@
+//===== eAthena Script =======================================
+//= War of Emperium Second Edition
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= WoE SE Arunafeltz Castle 2
+//===== Additional Comments: =================================
+//= 1.0 First Version [L0ne_W0lf]
+//============================================================
+
+arug_cas02,1,1,0 script Manager#aru02_02 111,{
+ end;
+
+OnInterIfInitOnce:
+ GetCastleData "arug_cas02",0,"::OnRecvCastleAr02";
+ end;
+
+OnRecvCastleAr02:
+ RequestGuildInfo GetCastleData("arug_cas02",1);
+ if (GetCastleData("arug_cas02",1) == 0) {
+ donpcevent "Manager#aru02_02::Onstart";
+ }
+ end;
+
+OnAgitStart:
+ if (agitcheck()) {
+ MapRespawnGuildID "arug_cas02",GetCastleData("arug_cas02",1),2;
+ GvgOn "arug_cas02";
+ donpcevent "Manager#aru02_02::Onstart";
+ }
+ else {
+ donpcevent "#aru02_RL00::OnDisable";
+ donpcevent "#aru02_RL01::OnDisable";
+ donpcevent "#aru02_RL02::OnDisable";
+ donpcevent "#aru02_RL03::OnDisable";
+ }
+ end;
+
+OnAgitEnd:
+ GvgOff "arug_cas02";
+ if (GetCastleData("arug_cas02",1)) {
+ KillMonster "arug_cas02","Steward#aru02::OnStartArena";
+ donpcevent "Manager#aru02_02::Onreset";
+ }
+ end;
+
+Onstart:
+ // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
+ // Settings for all but Summon Guardians
+ // 0 = Okay; 1 = Destroyed; 2 = Repairing
+ // Summon Guardians
+ // 0 = Do not Summon; 1 = Summon
+ if (GetCastleData("arug_cas02",1)) {
+ setarray $agit_ar02[0],0,0,0,0,0,0;
+ donpcevent "#aru02_df01::OnEnable";
+ donpcevent "#aru02_df02::OnEnable";
+ donpcevent "#aru02_RL00::OnEnable";
+ donpcevent "#aru02_RL01::OnEnable";
+ donpcevent "#aru02_RL02::OnEnable";
+ donpcevent "#aru02_RL03::OnEnable";
+ }
+ monster "arug_cas02",89,256,"Emperium",1288,1,"Steward#aru02::OnStartArena";
+ end;
+
+Onreset:
+ donpcevent "#aru02_df01::OnDisable";
+ donpcevent "#aru02_df02::OnDisable";
+ donpcevent "#aru02_gard01::Onreset";
+ donpcevent "#aru02_gard02::Onreset";
+ donpcevent "#aru02_RL00::OnDisable";
+ donpcevent "#aru02_RL01::OnDisable";
+ donpcevent "#aru02_RL02::OnDisable";
+ donpcevent "#aru02_RL03::OnDisable";
+ donpcevent "1st Guardian Stone#aru02::OnDisable";
+ donpcevent "2nd Guardian Stone#aru02::OnDisable";
+ donpcevent "Control Device01#aru02::OnDisable";
+ donpcevent "Control Device02#aru02::OnDisable";
+ donpcevent "Control Device03#aru02::OnDisable";
+ if (agitcheck()) {
+ setarray $agit_ar02[0],0,0,1,1,1,0;
+ }
+ end;
+
+Onchange:
+ setarray $agit_ar02[0],2,2,1,1,2,0;
+ monster "arug_cas02",89,256,"Emperium",1288,1,"Steward#aru02::OnStartArena";
+ donpcevent "Control Device03#aru02::OnEnable";
+ donpcevent "1st Guardian Stone#aru02::OnEnable";
+ donpcevent "2nd Guardian Stone#aru02::OnEnable";
+ end;
+
+OnClock0001:
+ set .@Treasure,GetCastleData("arug_cas02",2)/5+4;
+ if (.@Treasure) {
+ monster "arug_cas02",382,231,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 2) end;
+ monster "arug_cas02",383,231,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 3) end;
+ monster "arug_cas02",384,231,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 4) end;
+ monster "arug_cas02",385,231,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 5) end;
+ monster "arug_cas02",386,231,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 6) end;
+ monster "arug_cas02",387,231,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 7) end;
+ monster "arug_cas02",384,230,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 8) end;
+ monster "arug_cas02",385,230,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 9) end;
+ monster "arug_cas02",386,230,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 10) end;
+ monster "arug_cas02",387,230,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 11) end;
+ monster "arug_cas02",388,230,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 12) end;
+ monster "arug_cas02",389,230,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 13) end;
+ monster "arug_cas02",382,225,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 14) end;
+ monster "arug_cas02",383,225,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 15) end;
+ monster "arug_cas02",384,225,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 16) end;
+ monster "arug_cas02",385,225,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 17) end;
+ monster "arug_cas02",386,225,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 18) end;
+ monster "arug_cas02",387,225,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 19) end;
+ monster "arug_cas02",384,224,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 20) end;
+ monster "arug_cas02",385,224,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 21) end;
+ monster "arug_cas02",386,224,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 22) end;
+ monster "arug_cas02",387,224,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 23) end;
+ monster "arug_cas02",388,224,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied";
+ if (.@Treasure < 24) end;
+ monster "arug_cas02",389,224,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied";
+ }
+ end;
+
+OnTreasureDied:
+ end;
+}
+
+arug_cas02,38,259,5 script Yumenes#aru02_01 868,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (.@GID == 0) {
+ mes "[Yumenes]";
+ mes "Great job. Now, all you";
+ mes "need to do is destroy this";
+ mes "Emperium to gain ownership";
+ mes "over this stronghold.";
+ close;
+ }
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[Brace]";
+ mes "As guardian of this";
+ mes "stronghold, I answer only";
+ mes "to the master of the guild";
+ mes "that controls this place.";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "[Yumenes]";
+ mes "I am Yumenes, guardian of";
+ mes "this stronghold. For now,";
+ mes "all is quiet in this place.";
+ next;
+ switch(select("Converse:Cancel")) {
+ case 1:
+ mes "[Yumenes]";
+ mes "Do you have any questions";
+ mes "about this stronghold?";
+ next;
+ switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
+ case 1:
+ mes "[Yumenes]";
+ mes "There is one Emperium";
+ mes "and two Guardian Stones in";
+ mes "each fortress. These stones";
+ mes "are the first line of defense,";
+ mes "and must be destroyed before";
+ mes "enemies can even enter.";
+ next;
+ mes "[Yumenes]";
+ mes "The stones are located in";
+ mes "^4D4DFFGate Houses^000000 which must be";
+ mes "protected to prevent enemies";
+ mes "from reaching the Emperium.";
+ mes "Guardian Stones can ^4D4DFFrecall";
+ mes "your Guardians^000000 for protection.";
+ next;
+ mes "[Yumenes]";
+ mes "Fortresses with higher levels";
+ mes "of defense can summon more";
+ mes "Guardians: this is why it is";
+ mes "so important for guilds to";
+ mes "invest in Defense Growth.";
+ next;
+ mes "[Yumenes]";
+ mes "Guardian Stones that have";
+ mes "been destroyed can be revived";
+ mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
+ mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
+ close;
+ case 2:
+ mes "[Yumenes]";
+ mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
+ mes "and are protected by extra barricades activated by the Guardian Stones.";
+ mes "These gates are located in three different parts of the fortress.";
+ next;
+ mes "[Yumenes]";
+ mes "Barricades are protected by";
+ mes "Guardian Stones, and are";
+ mes "restored when the Guardian";
+ mes "Stones are retrieved. However,";
+ mes "it is not as easy to restore";
+ mes "destroyed Fortress Gates.";
+ next;
+ mes "[Yumenes]";
+ mes "Fortress Gates can only be";
+ mes "restored when the ^4D4DFFguild";
+ mes "master of a stronghold";
+ mes "changes^000000, or if ^4D4DFFrestoration";
+ mes "is requested by the guild";
+ mes "master of the stronghold^000000.";
+ close;
+ case 3:
+ mes "[Yumenes]";
+ mes "Strongholds have many";
+ mes "Link Flags that allow you";
+ mes "to access vital areas within";
+ mes "restrictions placed by the";
+ mes "Barricades. Usually, ^4D4DFFFlag 1";
+ mes "links to the Gate House^000000.";
+ next;
+ mes "[Yumenes]";
+ mes "Many flags link directly to";
+ mes "the flag near the Emperium.";
+ mes "The final numbered flag is";
+ mes "linked to the Convenience";
+ mes "Facility of the stronghold's";
+ mes "owner. Keep this in mind.";
+ close;
+ case 4:
+ mes "[Yumenes]";
+ mes "Strategy? It would be better";
+ mes "to develop your battle plan to";
+ mes "exploit your guild's advantages";
+ mes "and your enemies' weaknesses.";
+ mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ close;
+ case 5:
+ mes "[Yumenes]";
+ mes "You have no questions";
+ mes "to ask of me? Well, I'm";
+ mes "here to serve your needs.";
+ close;
+ }
+ case 2:
+ mes "[Yumenes]";
+ mes "I'm always here, so";
+ mes "feel free to request my";
+ mes "assistance whenever";
+ mes "the need arises.";
+ close;
+ }
+ }
+ else {
+ mes "[Yumenes]";
+ mes "Greetings, "+strcharinfo(0)+".";
+ mes "What are your orders?";
+ next;
+ switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
+ case 1:
+ if ($agit_ar02[5] == 0) {
+ if (getgdskilllv(.@GID,10002) == 0) {
+ mes "[Yumenes]";
+ mes "I'm sorry, but the Guardian";
+ mes "Stones aren't powerful enough";
+ mes "to summon Guardians yet. We";
+ mes "need to accumulate more";
+ mes "knowledge before they can";
+ mes "summon any Guardians.";
+ close;
+ }
+ else {
+ mes "[Yumenes]";
+ mes "I shall endeavor to summon";
+ mes "a Guardian through a Guardian";
+ mes "Stone. However, keep in mind";
+ mes "that this will not work if the";
+ mes "Guardian Stone is destroyed.";
+ setarray $agit_ar02[5],1;
+ if ($agit_ar02[0] == 0) {
+ donpcevent "#aru02_gard01::OnEnable";
+ }
+ if ($agit_ar02[1] == 0) {
+ donpcevent "#aru02_gard02::OnEnable";
+ }
+ close;
+ }
+ }
+ else {
+ mes "[Yumenes]";
+ mes "You've already commanded";
+ mes "me to summon a Guardian";
+ mes "to defend the stronghold.";
+ close;
+ }
+ case 2:
+ mes "[Yumenes]";
+ mes "Our defense status is...";
+ if ($agit_ar02[0] == 1) {
+ mes "1st Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar02[0] == 2) {
+ mes "1st Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar02[1] == 1) {
+ mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar02[1] == 2) {
+ mes "2nd Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar02[2] == 1) {
+ mes "1st Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar02[2] == 2) {
+ mes "1st Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar02[3] == 1) {
+ mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar02[3] == 2) {
+ mes "2nd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar02[4] == 1) {
+ mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar02[4] == 2) {
+ mes "3rd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ close;
+ case 3:
+ mes "[Yumenes]";
+ mes "I'll be standing by,";
+ mes "awaiting your orders.";
+ close;
+ }
+ }
+ }
+ }
+ else {
+ mes "[Yumenes]";
+ mes "Who are you? Scoundrel!";
+ mes "Leave this stronghold now!";
+ close;
+ }
+
+OnInit:
+ setarray $agit_ar02[0],0,0,0,0,0,0;
+ end;
+}
+
+arug_cas02,1,1,0 script #aru02_gard01 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas02",3);
+ guardian "arug_cas02",104,32,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //0;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas02",67,36,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas02",67,36,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas02",67,85,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //2;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas02",67,36,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas02",67,85,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas02",113,87,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //3;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas02",67,36,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas02",67,85,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas02",113,87,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas02",122,112,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //4;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas02",20,169,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1;
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",67,60,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //5;
+ mapannounce "arug_cas02","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",90,167,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //6;
+ mapannounce "arug_cas02","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer1800000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",91,119,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //7;
+ mapannounce "arug_cas02","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer2700000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",122,112,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //8;
+ mapannounce "arug_cas02","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer3600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",20,169,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //9;
+ mapannounce "arug_cas02","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",67,85,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //10;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas02","#aru02_gard01::OnGuardianDied";
+ end;
+}
+
+arug_cas02,1,2,0 script #aru02_gard02 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas02",3);
+ guardian "arug_cas02",175,31,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //11;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas02",204,32,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas02",204,32,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas02",211,63,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //13;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas02",204,32,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas02",211,63,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas02",209,88,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //14;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas02",204,32,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas02",211,63,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas02",209,88,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas02",161,91,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //15;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas02",268,169,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12;
+ }
+ initnpctimer;
+ end;
+
+OnTimer600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",186,170,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //16;
+ end;
+
+OnTimer1200000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",183,121,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //17;
+ end;
+
+OnTimer2100000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",150,110,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //18;
+ end;
+
+OnTimer3000000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",161,91,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //19;
+ end;
+
+OnTimer3900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",209,88,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //20;
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas02",211,63,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //21;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas02","#aru02_gard02::OnGuardianDied";
+ end;
+}
+
+arug_cas02,1,3,0 script #aru02_df01 -1,{
+OnEnable:
+ guardian "arug_cas02",33,168,"1st Guardian Stone",1907,"#aru02_df01::OnGuardianStoneDied"; //22;
+ end;
+
+OnDisable:
+ killmonster "arug_cas02","#aru02_df01::OnGuardianStoneDied";
+ setarray $agit_ar02[0],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 1st Guardian Stone is Destroyed
+ setarray $agit_ar02[0],1;
+ if (($agit_ar02[0] == 1) || ($agit_ar02[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar02[1] == 1) || ($agit_ar02[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru02_RL00::OnDisable";
+ donpcevent "#aru02_gard01::Onreset";
+ }
+ else {
+ mapannounce "arug_cas02","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru02_gard01::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "1st Guardian Stone#aru02::OnGuardian";
+ setarray $agit_ar02[0],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas02,33,168,0 script 1st Guardian Stone#aru02 844,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"1st Guardian Stone#aru02" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"1st Guardian Stone#aru02" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"1st Guardian Stone#aru02" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar02[0] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "already completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru02_df01::OnEnable";
+ specialeffect 135; //"1st Guardian Stone#aru02" EF_ICECRASH
+ disablenpc "1st Guardian Stone#aru02";
+ setarray $agit_ar02[0],0;
+ set .@df_all,$agit_ar02[0]+$agit_ar02[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas02","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru02_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas02","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar02[5] == 1) {
+ donpcevent "#aru02_gard01::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "1st Guardian Stone#aru02";
+ end;
+
+OnEnable:
+ enablenpc "1st Guardian Stone#aru02";
+ specialeffect 247; //"1st Guardian Stone#aru02" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "1st Guardian Stone#aru02";
+ end;
+}
+
+arug_cas02,1,4,0 script #aru02_df02 -1,{
+OnEnable:
+ guardian "arug_cas02",245,168,"2nd Guardian Stone",1908,"#aru02_df02::OnGuardianStoneDied"; //23;
+ end;
+
+OnDisable:
+ killmonster "arug_cas02","#aru02_df02::OnGuardianStoneDied";
+ setarray $agit_ar02[1],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 2nd Guardian Stone is Destroyed
+ setarray $agit_ar02[1],1;
+ if (($agit_ar02[0] == 1) || ($agit_ar02[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar02[1] == 1) || ($agit_ar02[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru02_RL00::OnDisable";
+ donpcevent "#aru02_gard02::Onreset";
+ }
+ else {
+ mapannounce "arug_cas02","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru02_gard02::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "2nd Guardian Stone#aru02::OnGuardian";
+ setarray $agit_ar02[1],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas02,245,168,0 script 2nd Guardian Stone#aru02 844,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"2nd Guardian Stone#aru02" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"2nd Guardian Stone#aru02" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"2nd Guardian Stone#aru02" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru02" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar02[1] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "successfully completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru02_df02::OnEnable";
+ specialeffect 135; //"2nd Guardian Stone#aru02" EF_ICECRASH
+ disablenpc "2nd Guardian Stone#aru02";
+ setarray $agit_ar02[1],0;
+ set .@df_all,$agit_ar02[0]+$agit_ar02[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas02","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru02_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas02","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar02[5] == 1) {
+ donpcevent "#aru02_gard02::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "2nd Guardian Stone#aru02";
+ end;
+
+OnEnable:
+ enablenpc "2nd Guardian Stone#aru02";
+ specialeffect 247; //"2nd Guardian Stone#aru02" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "2nd Guardian Stone#aru02";
+ end;
+}
+
+// Barrier Summoners
+arug_cas02,2,1,0 script #aru02_RL00 -1,{
+OnEnable:
+ setcell "arug_cas02",136,136,143,136,cell_walkable,0;
+ setcell "arug_cas02",136,136,143,136,cell_shootable,0;
+ guardian "arug_cas02",137,137," ",1905,"#aru02_RL00::OnBarrierDestroyed"; //24;
+ guardian "arug_cas02",139,137," ",1905,"#aru02_RL00::OnBarrierDestroyed"; //25;
+ guardian "arug_cas02",141,137," ",1905,"#aru02_RL00::OnBarrierDestroyed"; //26;
+ guardian "arug_cas02",143,137," ",1905,"#aru02_RL00::OnBarrierDestroyed"; //27;
+ end;
+
+OnDisable:
+ setcell "arug_cas02",136,136,143,136,cell_walkable,1;
+ setcell "arug_cas02",136,136,143,136,cell_shootable,1;
+ killmonster "arug_cas02","#aru02_RL00::OnBarrierDestroyed";
+ end;
+
+OnBarrierDestroyed:
+ end;
+}
+
+arug_cas02,2,2,0 script #aru02_RL01 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas02",150,223,161,223,cell_walkable,0;
+ guardian "arug_cas02",151,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //28;
+ guardian "arug_cas02",153,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //29;
+ guardian "arug_cas02",155,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //30;
+ guardian "arug_cas02",157,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //31;
+ guardian "arug_cas02",159,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //32;
+ guardian "arug_cas02",161,222," ",1905,"#aru02_RL01::OnBarrierDestroyed"; //33;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar02[2],1;
+ mapannounce "arug_cas02","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas02",150,223,161,223,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas02",150,223,161,223,cell_walkable,1;
+ killmonster "arug_cas02","#aru02_RL01::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas02,2,3,0 script #aru02_RL02 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas02",125,342,125,349,cell_walkable,0;
+ guardian "arug_cas02",126,343," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //34;
+ guardian "arug_cas02",126,345," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //35;
+ guardian "arug_cas02",126,347," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //36;
+ guardian "arug_cas02",127,344," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //37;
+ guardian "arug_cas02",127,346," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //38;
+ guardian "arug_cas02",127,348," ",1905,"#aru02_RL02::OnBarrierDestroyed"; //39;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar02[3],1;
+ mapannounce "arug_cas02","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas02",125,342,125,349,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas02",125,342,125,349,cell_walkable,1;
+ killmonster "arug_cas02","#aru02_RL02::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas02,2,4,0 script #aru02_RL03 -1,{
+OnEnable:
+ set .MyMobCount,4;
+ setcell "arug_cas02",38,314,49,314,cell_walkable,0;
+ guardian "arug_cas02",40,315," ",1905,"#aru02_RL03::OnBarrierDestroyed"; //40;
+ guardian "arug_cas02",42,315," ",1905,"#aru02_RL03::OnBarrierDestroyed"; //41;
+ guardian "arug_cas02",44,315," ",1905,"#aru02_RL03::OnBarrierDestroyed"; //42;
+ guardian "arug_cas02",46,315," ",1905,"#aru02_RL03::OnBarrierDestroyed"; //43;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar02[4],1;
+ mapannounce "arug_cas02","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
+ setcell "arug_cas02",38,314,49,314,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas02",38,314,49,314,cell_walkable,1;
+ killmonster "arug_cas02","#aru02_RL03::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas02,143,228,0 script Control Device01#aru02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar02[2] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru02_RL01::OnEnable";
+ disablenpc "Control Device01#aru02";
+ mapannounce "arug_cas02","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[2],0;
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device01#aru02";
+ end;
+
+OnEnable:
+ enablenpc "Control Device01#aru02";
+ end;
+
+OnDisable:
+ disablenpc "Control Device01#aru02";
+ end;
+}
+
+arug_cas02,118,356,0 script Control Device02#aru02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar02[3] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru02_RL02::OnEnable";
+ disablenpc "Control Device02#aru02";
+ mapannounce "arug_cas02","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar02[3],0; //Global Variable
+ setarray $agit_ar02[2],2; //Global Variable
+ donpcevent "Control Device01#aru02::OnDevice01#aru02_dlrp01";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device02#aru02";
+ end;
+
+OnEnable:
+ enablenpc "Control Device02#aru02";
+ end;
+
+OnDisable:
+ disablenpc "Control Device02#aru02";
+ end;
+}
+
+arug_cas02,56,308,0 script Control Device03#aru02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar02[4] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru02_RL03::OnEnable";
+ disablenpc "Control Device03#aru02";
+ mapannounce "arug_cas02","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar02[4],0;
+ setarray $agit_ar02[3],2;
+ donpcevent "Control Device02#aru02::OnDevice02#aru02_dlrp02";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device03#aru02";
+ end;
+
+OnEnable:
+ enablenpc "Control Device03#aru02";
+ end;
+
+OnDisable:
+ disablenpc "Control Device03#aru02";
+ end;
+}
+
+// Link Flags
+arug_cas02,98,270,0 script LF-01#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("First Gate House:Second Gate House:Cancel")) {
+ case 1:
+ warp "arug_cas02",10,187;
+ end;
+ case 2:
+ warp "arug_cas02",268,187;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,266,0 script LF-02#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
+ case 1:
+ warp "arug_cas02",66,31;
+ end;
+ case 2:
+ warp "arug_cas02",212,31;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,262,0 script LF-03#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) {
+ case 1:
+ warp "arug_cas02",90,120;
+ end;
+ case 2:
+ warp "arug_cas02",188,119;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,258,0 script LF-04#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
+ case 1:
+ warp "arug_cas02",119,183;
+ end;
+ case 2:
+ warp "arug_cas02",159,183;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,253,0 script LF-05#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas02",156,324;
+ end;
+ case 2:
+ warp "arug_cas02",174,372;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,249,0 script LF-06#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas02",28,325;
+ end;
+ case 2:
+ warp "arug_cas02",57,325;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,245,0 script LF-07#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Center 2nd Area:Center 3rd Area:Cancel")) {
+ case 1:
+ warp "arug_cas02",156,263;
+ end;
+ case 2:
+ warp "arug_cas02",43,354;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,98,241,0 script LF-08#arug_cas02 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to the";
+ mes "Convenience Facility for";
+ mes "guild members?^000000";
+ switch(select("Go to Convenience Facility:Cancel")) {
+ case 1:
+ warp "arug_cas02",387,323;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,216,92,0 script Cyr#LF_ar02_1::LF_ar02_1 111,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas02",43,256;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas02,63,92,0 duplicate(LF_ar02_1) Cyr#LF_ar02_2 111
+arug_cas02,127,133,4 duplicate(LF_ar02_1) Cyr#LF_ar02_3 111
+arug_cas02,152,133,4 duplicate(LF_ar02_1) Cyr#LF_ar02_4 111
+arug_cas02,149,218,0 duplicate(LF_ar02_1) Cyr#LF_ar02_5 111
+arug_cas02,162,218,0 duplicate(LF_ar02_1) Cyr#LF_ar02_6 111
+arug_cas02,128,350,0 duplicate(LF_ar02_1) Cyr#LF_ar02_7 111
+arug_cas02,128,341,0 duplicate(LF_ar02_1) Cyr#LF_ar02_8 111
+arug_cas02,49,317,0 duplicate(LF_ar02_1) Cyr#LF_ar02_9 111
+arug_cas02,30,317,0 duplicate(LF_ar02_1) Cyr#LF_ar02_10 111
+arug_cas02,9,190,0 duplicate(LF_ar02_1) Cyr#LF_ar02_11 111
+arug_cas02,271,190,0 duplicate(LF_ar02_1) Cyr#LF_ar02_12 111
+
+arug_cas02,129,178,4 script Cyr#LF_ar02_13::LF_ar02_2 722,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas02",43,256;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+
+OnRecvCastleAr02:
+ FlagEmblem GetCastleData("arug_cas02",1);
+ end;
+}
+
+arug_cas02,149,178,4 duplicate(LF_ar02_2) Cyr#LF_ar02_14 722
+arug_cas02,132,38,4 duplicate(LF_ar02_2) Cyr#LF_ar02_15 722
+arug_cas02,147,38,4 duplicate(LF_ar02_2) Cyr#LF_ar02_16 722
+
+// Guild Manager
+arug_cas02,303,341,3 script Steward#aru02 55,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (.@GID == 0) {
+ mes "[ Steward ]";
+ mes "I await for the master";
+ mes "whom destiny will choose";
+ mes "for me. Do you think you";
+ mes "have to courage and strength";
+ mes "to conquer this stronghold?";
+ close;
+ }
+ if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[ Steward ]";
+ mes "Hmpf. Your threats don't";
+ mes "scare me! Guardians, drive";
+ mes "this infidel away from here!";
+ mes "I will always be loyal to the";
+ mes "master of this stronghold,";
+ MES "the one and only^FF0000" + getguildmaster(.@GID) + "^000000.";
+ close;
+ }
+ mes "[ Steward ]";
+ mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
+ mes "How shall I serve you today?";
+ mes "Was there an aspect of this";
+ mes "stronghold's maintenance";
+ mes "you wanted to discuss?";
+ next;
+ switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "The Commercial Growth";
+ mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas02",2) + ".";
+ if (GetCastleData("arug_cas02",4) > 0) {
+ mes "Last time, you invested in";
+ mes "Commercial Growth " + GetCastleData("arug_cas02",4) + ".";
+ }
+ next;
+ mes "[ Steward ]";
+ mes "Our stronghold's";
+ mes "safeguard level is " + GetCastleData("arug_cas02",3) + ".";
+ if (GetCastleData("arug_cas02",5) > 0) {
+ mes "Last time, you invested";
+ mes "in defense " + GetCastleData("arug_cas02",5) + " times.";
+ }
+ mes " ";
+ mes "That is all, master.";
+ close;
+ case 2:
+ set .@Economy,GetCastleData("arug_cas02",2);
+ if(.@Economy < 8) set .@eco_invest,10000;
+ if(.@Economy >= 8) set .@eco_invest,20000;
+ if(.@Economy >= 16) set .@eco_invest,40000;
+ if(.@Economy >= 25) set .@eco_invest,80000;
+ if(.@Economy >= 34) set .@eco_invest,160000;
+ if(.@Economy >= 44) set .@eco_invest,320000;
+ if(.@Economy >= 54) set .@eco_invest,640000;
+ if(.@Economy >= 65) set .@eco_invest,1280000;
+ if(.@Economy >= 76) set .@eco_invest,2560000;
+ if(.@Economy >= 88) set .@eco_invest,5120000;
+ mes "[ Steward ]";
+ mes "Raising the stronghold's";
+ mes "commercial growth will";
+ mes "increase the quantity of";
+ mes "goods produced for the guild.";
+ mes "Investing in commercial growth";
+ mes "will help the guild's future.";
+ next;
+ mes "[ Steward ]";
+ mes "You can make one investment";
+ mes "each day, but if you can make";
+ mes "two investments if you pay";
+ mes "more zeny: this will speed";
+ mes "up commercial development,";
+ mes "but can be quite expensive.";
+ next;
+ if (.@Economy == 100) {
+ mes "[ Steward ]";
+ mes "However, our stronghold's";
+ mes "commerical growth level is";
+ mes "at 100%. It's not possible to";
+ mes "develop commercial growth";
+ mes "any further than that.";
+ close;
+ }
+ if (GetCastleData("arug_cas02",4) == 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
+ if (GetCastleData("arug_cas02",4) == 0) {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
+ mes "to make an investment";
+ mes "Will you invest in this";
+ mes "stronghold's commerical";
+ mes "development now?";
+ }
+ else {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000";
+ mes "more zeny to make a second";
+ mes "investment today. Will you";
+ mes "invest one more time?";
+ }
+ next;
+ switch(select("Invest in Commercial Growth:Cancel")) {
+ case 1:
+ if (Zeny < .@eco_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ end;
+ }
+ set zeny,zeny-.@eco_invest;
+ SetCastleData "arug_cas02",4,GetCastleData("arug_cas02",4)+1;
+ SetCastleData "arug_cas02",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014));
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. We can expect";
+ mes "to see the results of this";
+ mes "investment by tomorrow.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 3:
+ set .@Defence,GetCastleData("arug_cas02",3);
+ if(.@Defence < 8) set .@def_invest,20000;
+ if(.@Defence >= 8) set .@def_invest,40000;
+ if(.@Defence >= 16) set .@def_invest,80000;
+ if(.@Defence >= 25) set .@def_invest,160000;
+ if(.@Defence >= 34) set .@def_invest,320000;
+ if(.@Defence >= 44) set .@def_invest,640000;
+ if(.@Defence >= 54) set .@def_invest,1280000;
+ if(.@Defence >= 65) set .@def_invest,2560000;
+ if(.@Defence >= 76) set .@def_invest,5120000;
+ if(.@Defence >= 88) set .@def_invest,10240000;
+ mes "[ Steward ]";
+ mes "Investing in our stronghold's";
+ mes "defense will enhance the";
+ mes "durability of our Guardians";
+ mes "and the Emperium. We'll need";
+ mes "every advantage to protect";
+ mes "ourselves from our enemies.";
+ next;
+ mes "[ Steward ]";
+ mes "You can invest in defense";
+ mes "once per day, but if you pay";
+ mes "more zeny, you can invest";
+ mes "a maximum of two times daily.";
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas02",3) == 100) {
+ mes "The Defense Level of this";
+ mes "stronghold is 100%, and";
+ mes "cannot be increased further.";
+ close;
+ }
+ if (GetCastleData("arug_cas02",5) == 2) {
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas02",5) == 0) {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses.";
+ mes "Will you invest now?";
+ }
+ else {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses";
+ mes "a second time today.";
+ mes "Will you invest now?";
+ }
+ next;
+ switch(select("Invest in Defense:Cancel")) {
+ case 1:
+ if (Zeny < .@def_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ close;
+ }
+ set zeny,zeny-.@def_invest;
+ SetCastleData "arug_cas02",5,GetCastleData("arug_cas02",5)+1;
+ SetCastleData "arug_cas02",3,.@Defence+1;
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. Increasing";
+ mes "the frequency of treasure";
+ mes "procured by the guild will";
+ mes "definitely help us all.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 4:
+ if (GetCastleData("arug_cas02",9) == 1) {
+ mes "[ Steward ]";
+ mes "Do you wish to dismiss";
+ mes "the Kafra Employee that";
+ mes "we've hired for the guild?";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "Master, please reconsider!";
+ mes "I've been working very hard";
+ mes "for the success of the guild!";
+ mes "I'll try harder to serve the";
+ mes "guild members of this";
+ mes "stronghold, I promise!";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ mes "[ Hired Kafra Employee ]";
+ mes "Why?! What have I done";
+ mes "to deserve this? Waaah~!";
+ next;
+ cutin "kafra_01",255;
+ break;
+ case 2:
+ mes "[ Hired Kafra Employee ]";
+ mes "Thank you, Master!";
+ mes "I'll obey your every";
+ mes "command as best I can!";
+ mes "You won't regret this!";
+ close;
+ }
+ break;
+ case 2:
+ mes "[ Steward ]";
+ mes "She works very hard,";
+ mes "in my opinion. It was in";
+ mes "all of our best interests to";
+ mes "allow her to stay with us.";
+ close;
+ }
+ disablenpc "Kafra Employee#arug_cas02";
+ SetCastleData "arug_cas02",9,0;
+ mes "[ Steward ]";
+ mes "That Kafra Employee";
+ mes "has been dismissed.";
+ mes "Were really dissatisfied";
+ mes "by the quality of her service?";
+ close;
+ }
+ else {
+ mes "[ Steward ]";
+ mes "Will you hire a";
+ mes "Kafra Employee to serve";
+ mes "our stronghold? You must";
+ mes "pay ^FF000010,000 zeny^000000 to hire one.";
+ next;
+ switch(select("Hire:Cancel")) {
+ case 1:
+ if (getgdskilllv(.@GID,10001) == 0) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "you have not yet attained";
+ mes "the ^FF0000Contract with Kafra^000000";
+ mes "guild skill.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "we do not have enough";
+ mes "funds to pay the contract fee.";
+ close;
+ }
+ set zeny,zeny-10000;
+ enablenpc "Kafra Employee#aru02";
+ SetCastleData "arug_cas02",9,1;
+ mes "[ Steward ]";
+ mes "Very well. We have formed";
+ mes "a contract with the Kafra";
+ mes "Head Office, and hired a";
+ mes "Kafra Employee for our";
+ mes "stronghold. Here she is~";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "How do you do? I've";
+ mes "been dispatched by the";
+ mes "Kafra Head Office to";
+ mes "serve your guild's needs.";
+ mes "I'll do my best to follow";
+ mes "your every command, Master.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Steward ]";
+ mes "Our contract will expire";
+ mes "after one month, so we must";
+ mes "pay additional fees to keep";
+ mes "this Kafra Employee in";
+ mes "the service of our guild.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ mes "However, I suggest hiring";
+ mes "a Kafra Employee as soon";
+ mes "as possible since our guild";
+ mes "would greatly benefit from";
+ mes "the convenient Kafra services.";
+ close;
+ }
+ }
+ case 5:
+ mes "[ Steward ]";
+ mes "Do you wish to enter the";
+ mes "Guild Treasure Room?";
+ mes "Only you, the Guild Master,";
+ mes "are permitted to enter.";
+ next;
+ mes "[ Steward ]";
+ mes "Please remember to open";
+ mes "the Treasure Boxes at the";
+ mes "proper time. Otherwise, the";
+ mes "treasure may disappear if";
+ mes "something unexpected happens.";
+ next;
+ switch(select("Go to Treasure Room:Cancel")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "Allow me to guide you";
+ mes "on the secret path to";
+ mes "the Treasure Room.";
+ mes "Press the secret switch";
+ mes "when you wish to return here.";
+ close2;
+ warp "arug_cas02",382,227;
+ end;
+ case 2:
+ mes "[ Steward ]";
+ mes "Items in the Treasure Room";
+ mes "are produced once each day.";
+ mes "Therefore, you must obtain";
+ mes "the treasure items everyday.";
+ mes "For the sake of the guild,";
+ mes "prioritize treasure harvesting!";
+ close;
+ }
+ }
+
+Onstop:
+ stopnpctimer;
+ end;
+
+OnStartArena:
+ set .@GID,getcharid(2);
+ // Lower castle Economy
+ set .@Economy,GetCastleData("arug_cas02",2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData "arug_cas02", 2, .@Economy;
+ // Lower Castle Defence
+ set .@Defence,GetCastleData("arug_cas02",3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData "arug_cas02", 3, .@Defence;
+ // Set new owner
+ SetCastleData "arug_cas02",1, .@GID;
+ // Clear castle's data.
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData "arug_cas02", .@i, 0;
+ // Disable Kafra
+ disablenpc "Kafra Employee#aru02";
+
+ set .msg,2;
+ if (.msg == 1) {
+ announce "Fortress [" + GetCastleName("arug_cas02") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru02_02::Onstart";
+ }
+ else if (.msg == 2) {
+ announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 2] stronghold of "+GetCastleName("arug_cas02"),bc_all;
+ mapannounce "arug_cas02","The emperium has been shattered!",bc_map,"0x00FF00";
+ if (agitcheck()) {
+ donpcevent "Manager#aru02_02::Onreset";
+ initnpctimer;
+ }
+ else {
+ donpcevent "Manager#aru02_02::Onreset";
+ stopnpctimer;
+ }
+ }
+ else if (.msg == 0) {
+ announce "Fortress [" + GetCastleName("arug_cas02") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru02_02::Onreset";
+ stopnpctimer;
+ end;
+ }
+ MapRespawnGuildID "arug_cas02",GetCastleData("arug_cas02",1),2;
+ GetCastleData "arug_cas02",0,"::OnRecvCastleAr02";
+ end;
+
+OnTimer10000:
+ donpcevent "Manager#aru02_02::Onchange";
+ mapannounce "arug_cas02","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00";
+ end;
+}
+
+// Guild Kafra
+arug_cas02,354,326,3 script Kafra Employee#aru02 117,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ mes "[Kafra Employee]";
+ mes "Welcome, proud member";
+ mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
+ mes "The Kafra Corporation is ready";
+ mes "to assist you wherever you go!";
+ next;
+ switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
+ case 1:
+ if (basicskillcheck() && getskilllv(1) < 6) {
+ mes "[Kafra Employee]";
+ mes "I'm so sorry, but you must";
+ mes "have at least Novice Skill";
+ mes "Lv.6 to use the Storage.";
+ }
+ else {
+ openstorage;
+ }
+ break;
+ case 2:
+ mes "[Kafra Employee]";
+ mes "Please tell me your";
+ mes "Warp destination.";
+ next;
+ switch(select("Rachel -> 200 z:Cancel")) {
+ case 1:
+ if (Zeny < 200) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to pay";
+ mes "the warp fee. Would you";
+ mes "please check your funds again?";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-200;
+ warp "rachel",115,125;
+ end;
+ case 2:
+ cutin "kafra_01",255;
+ }
+ break;
+ case 3:
+ if (BaseClass != Job_Merchant) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but the Pushcart";
+ mes "rental service can only be";
+ mes "used by Merchant, Blacksmith,";
+ mes "and Alchemist class characters.";
+ }
+ else if (checkcart() == 1) {
+ mes "[Kafra Employee]";
+ mes "Hm? You've already";
+ mes "rented a Pushcart.";
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "The Pushcart rental fee";
+ mes "is 800 zeny. Would you";
+ mes "like to rent a Pushcart?";
+ next;
+ switch(select("Rent Pushcart:Cancel")) {
+ case 1:
+ if (Zeny < 800) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to rent";
+ mes "one of our Pushcarts.";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-800;
+ setcart;
+ break;
+ case 2:
+ break;
+ }
+ }
+ break;
+ case 4:
+ mes "[Kafra Employee]";
+ mes "Thank you for using the";
+ mes "Kafra Service. Wherever";
+ mes "you go, Kafra will be";
+ mes "there to support you!";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but I've been";
+ mes "exclusively contracted";
+ mes "to the members of the";
+ mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes "You'll have to ask another";
+ mes "Kafra Employee to help you...";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+
+OnRecvCastleAr02:
+ if (GetCastleData("arug_cas02",1) == 0) {
+ monster "arug_cas02",0,0,"Evil Druid",1117,10;
+ monster "arug_cas02",0,0,"Khalitzburg",1132,4;
+ monster "arug_cas02",0,0,"Abysmal Knight",1219,3;
+ monster "arug_cas02",0,0,"Executioner",1205,1;
+ monster "arug_cas02",0,0,"Penomena",1216,10;
+ monster "arug_cas02",0,0,"Alarm",1193,18;
+ monster "arug_cas02",0,0,"Clock",1269,9;
+ monster "arug_cas02",0,0,"Raydric Archer",1276,12;
+ monster "arug_cas02",0,0,"Wanderer",1208,3;
+ monster "arug_cas02",0,0,"Alice",1275,1;
+ monster "arug_cas02",0,0,"Bloody Knight",1268,2;
+ monster "arug_cas02",0,0,"Dark Lord",1272,2;
+ monster "arug_cas02",0,0,"Tower Keeper",1270,4;
+ }
+ if (GetCastleData("arug_cas02",9) < 1) {
+ disablenpc "Kafra Employee#aru02";
+ }
+ end;
+}
+
+arug_cas02,386,227,0 script #aru02_switch 111,{
+ mes " ";
+ mes "^3355FFWill you pull";
+ mes "this small lever?^000000";
+ next;
+ switch(select("Pull Lever:Cancel")) {
+ case 1:
+ warp "arug_cas02",387,323;
+ end;
+ case 2:
+ close;
+ }
+}
+
+aru_gld,80,41,6 script Cyr#flag_Ar02_1::Ar02_Flag 722,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ if (getcharid(2) == .@GID) {
+ mes "[ Ringing Voice ]";
+ mes "Courageous one,";
+ mes "do you wish to return";
+ mes "to your stronghold?";
+ next;
+ switch(select("Return to the Stronghold:Cancel")) {
+ case 1:
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (getcharid(2) == .@GID) {
+ warp "arug_cas02",43,256;
+ end;
+ }
+ close;
+ case 2:
+ close;
+ }
+ }
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastleAr02:
+ FlagEmblem GetCastleData("arug_cas02",1);
+ end;
+}
+
+aru_gld,80,52,6 duplicate(Ar02_Flag) Cyr#flag_Ar02_2 722
+
+aru_gld,120,83,5 script Cyr#flag_Ar02_3 722,{
+ set .@GID, GetCastleData("arug_cas02",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + guildName + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + guildMaster + "^000000 is";
+ mes "Guild Master of ^FF0000" + guildName + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+OnRecvCastleAr02:
+ FlagEmblem GetCastleData("arug_cas02",1);
+ end;
+}
+
diff --git a/npc/guild2/arug_cas03.txt b/npc/guild2/arug_cas03.txt
new file mode 100644
index 000000000..5db99015b
--- /dev/null
+++ b/npc/guild2/arug_cas03.txt
@@ -0,0 +1,2867 @@
+//===== eAthena Script =======================================
+//= War of Emperium Second Edition
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= WoE SE Arunafeltz Castle 3
+//===== Additional Comments: =================================
+//= 1.0 First Version [L0ne_W0lf]
+//============================================================
+
+arug_cas03,1,1,0 script Manager#aru03_02 111,{
+ end;
+
+OnInterIfInitOnce:
+ GetCastleData "arug_cas03",0,"::OnRecvCastleAr03";
+ end;
+
+OnRecvCastleAr03:
+ RequestGuildInfo GetCastleData("arug_cas03",1);
+ if (GetCastleData("arug_cas03",1) == 0) {
+ donpcevent "Manager#aru03_02::Onstart";
+ }
+ end;
+
+OnAgitStart:
+ if (agitcheck()) {
+ MapRespawnGuildID "arug_cas03",GetCastleData("arug_cas03",1),2;
+ GvgOn "arug_cas03";
+ donpcevent "Manager#aru03_02::Onstart";
+ }
+ else {
+ donpcevent "#aru03_RL00::OnDisable";
+ donpcevent "#aru03_RL01::OnDisable";
+ donpcevent "#aru03_RL02::OnDisable";
+ donpcevent "#aru03_RL03::OnDisable";
+ }
+ end;
+
+OnAgitEnd:
+ GvgOff "arug_cas03";
+ if (GetCastleData("arug_cas03",1)) {
+ KillMonster "arug_cas03","Steward#aru03::OnStartArena";
+ donpcevent "Manager#aru03_02::Onreset";
+ }
+ end;
+
+Onstart:
+ // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
+ // Settings for all but Summon Guardians
+ // 0 = Okay; 1 = Destroyed; 2 = Repairing
+ // Summon Guardians
+ // 0 = Do not Summon; 1 = Summon
+ if (GetCastleData("arug_cas03",1)) {
+ setarray $agit_ar03[0],0,0,0,0,0,0;
+ donpcevent "#aru03_df01::OnEnable";
+ donpcevent "#aru03_df02::OnEnable";
+ donpcevent "#aru03_RL00::OnEnable";
+ donpcevent "#aru03_RL01::OnEnable";
+ donpcevent "#aru03_RL02::OnEnable";
+ donpcevent "#aru03_RL03::OnEnable";
+ }
+ monster "arug_cas03",141,293,"Emperium",1288,1,"Steward#aru03::OnStartArena";
+ end;
+
+Onreset:
+ donpcevent "#aru03_df01::OnDisable";
+ donpcevent "#aru03_df02::OnDisable";
+ donpcevent "#aru03_gard01::Onreset";
+ donpcevent "#aru03_gard02::Onreset";
+ donpcevent "#aru03_RL00::OnDisable";
+ donpcevent "#aru03_RL01::OnDisable";
+ donpcevent "#aru03_RL02::OnDisable";
+ donpcevent "#aru03_RL03::OnDisable";
+ donpcevent "1st Guardian Stone#aru03::OnDisable";
+ donpcevent "2nd Guardian Stone#aru03::OnDisable";
+ donpcevent "Control Device01#aru03::OnDisable";
+ donpcevent "Control Device02#aru03::OnDisable";
+ donpcevent "Control Device03#aru03::OnDisable";
+ if (agitcheck()) {
+ setarray $agit_ar03[0],0,0,1,1,1,0;
+ }
+ end;
+
+Onchange:
+ setarray $agit_ar03[0],2,2,1,1,2,0;
+ monster "arug_cas03",141,293,"Emperium",1288,1,"Steward#aru03::OnStartArena";
+ donpcevent "Control Device03#aru03::OnEnable";
+ donpcevent "1st Guardian Stone#aru03::OnEnable";
+ donpcevent "2nd Guardian Stone#aru03::OnEnable";
+ end;
+
+OnClock0001:
+ set .@Treasure,GetCastleData("arug_cas03",2)/5+4;
+ if (.@Treasure) {
+ monster "arug_cas03",291,276,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 2) end;
+ monster "arug_cas03",292,276,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 3) end;
+ monster "arug_cas03",293,276,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 4) end;
+ monster "arug_cas03",294,276,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 5) end;
+ monster "arug_cas03",295,276,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 6) end;
+ monster "arug_cas03",296,276,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 7) end;
+ monster "arug_cas03",293,274,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 8) end;
+ monster "arug_cas03",294,274,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 9) end;
+ monster "arug_cas03",295,274,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 10) end;
+ monster "arug_cas03",296,274,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 11) end;
+ monster "arug_cas03",297,274,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 12) end;
+ monster "arug_cas03",298,274,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 13) end;
+ monster "arug_cas03",291,272,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 14) end;
+ monster "arug_cas03",292,272,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 15) end;
+ monster "arug_cas03",293,272,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 16) end;
+ monster "arug_cas03",294,272,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 17) end;
+ monster "arug_cas03",295,272,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 18) end;
+ monster "arug_cas03",296,272,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 19) end;
+ monster "arug_cas03",293,269,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 20) end;
+ monster "arug_cas03",294,269,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 21) end;
+ monster "arug_cas03",295,269,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 22) end;
+ monster "arug_cas03",296,269,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 23) end;
+ monster "arug_cas03",297,269,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied";
+ if (.@Treasure < 24) end;
+ monster "arug_cas03",298,269,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied";
+ }
+ end;
+
+OnTreasureDied:
+ end;
+}
+
+arug_cas03,146,315,3 script Yehsus#aru03_01 868,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (.@GID == 0) {
+ mes "[Yehsus]";
+ mes "Great job. Now, all you";
+ mes "need to do is destroy this";
+ mes "Emperium to gain ownership";
+ mes "over this stronghold.";
+ close;
+ }
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[Yehsus]";
+ mes "As guardian of this";
+ mes "stronghold, I answer only";
+ mes "to the master of the guild";
+ mes "that controls this place.";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "[Yehsus]";
+ mes "I am Yehsus, guardian of";
+ mes "this stronghold. For now,";
+ mes "all is quiet in this place.";
+ next;
+ switch(select("Converse:Cancel")) {
+ case 1:
+ mes "[Yehsus]";
+ mes "Do you have any questions";
+ mes "about this stronghold?";
+ next;
+ switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
+ case 1:
+ mes "[Yehsus]";
+ mes "There is one Emperium";
+ mes "and two Guardian Stones in";
+ mes "each fortress. These stones";
+ mes "are the first line of defense,";
+ mes "and must be destroyed before";
+ mes "enemies can even enter.";
+ next;
+ mes "[Yehsus]";
+ mes "The stones are located in";
+ mes "^4D4DFFGate Houses^000000 which must be";
+ mes "protected to prevent enemies";
+ mes "from reaching the Emperium.";
+ mes "Guardian Stones can ^4D4DFFrecall";
+ mes "your Guardians^000000 for protection.";
+ next;
+ mes "[Yehsus]";
+ mes "Fortresses with higher levels";
+ mes "of defense can summon more";
+ mes "Guardians: this is why it is";
+ mes "so important for guilds to";
+ mes "invest in Defense Growth.";
+ next;
+ mes "[Yehsus]";
+ mes "Guardian Stones that have";
+ mes "been destroyed can be revived";
+ mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
+ mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
+ close;
+ case 2:
+ mes "[Yehsus]";
+ mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
+ mes "and are protected by extra barricades activated by the Guardian Stones.";
+ mes "These gates are located in three different parts of the fortress.";
+ next;
+ mes "[Yehsus]";
+ mes "Barricades are protected by";
+ mes "Guardian Stones, and are";
+ mes "restored when the Guardian";
+ mes "Stones are retrieved. However,";
+ mes "it is not as easy to restore";
+ mes "destroyed Fortress Gates.";
+ next;
+ mes "[Yehsus]";
+ mes "Fortress Gates can only be";
+ mes "restored when the ^4D4DFFguild";
+ mes "master of a stronghold";
+ mes "changes^000000, or if ^4D4DFFrestoration";
+ mes "is requested by the guild";
+ mes "master of the stronghold^000000.";
+ close;
+ case 3:
+ mes "[Yehsus]";
+ mes "Strongholds have many";
+ mes "Link Flags that allow you";
+ mes "to access vital areas within";
+ mes "restrictions placed by the";
+ mes "Barricades. Usually, ^4D4DFFFlag 1";
+ mes "links to the Gate House^000000.";
+ next;
+ mes "[Yehsus]";
+ mes "Many flags link directly to";
+ mes "the flag near the Emperium.";
+ mes "The final numbered flag is";
+ mes "linked to the Convenience";
+ mes "Facility of the stronghold's";
+ mes "owner. Keep this in mind.";
+ close;
+ case 4:
+ mes "[Yehsus]";
+ mes "Strategy? It would be better";
+ mes "to develop your battle plan to";
+ mes "exploit your guild's advantages";
+ mes "and your enemies' weaknesses.";
+ mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ close;
+ case 5:
+ mes "[Yehsus]";
+ mes "You have no questions";
+ mes "to ask of me? Well, I'm";
+ mes "here to serve your needs.";
+ close;
+ }
+ case 2:
+ mes "[Yehsus]";
+ mes "I'm always here, so";
+ mes "feel free to request my";
+ mes "assistance whenever";
+ mes "the need arises.";
+ close;
+ }
+ }
+ else {
+ mes "[Yehsus]";
+ mes "Greetings, "+strcharinfo(0)+".";
+ mes "What are your orders?";
+ next;
+ switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
+ case 1:
+ if ($agit_ar03[5] == 0) {
+ if (getgdskilllv(.@GID,10002) == 0) {
+ mes "[Yehsus]";
+ mes "I'm sorry, but the Guardian";
+ mes "Stones aren't powerful enough";
+ mes "to summon Guardians yet. We";
+ mes "need to accumulate more";
+ mes "knowledge before they can";
+ mes "summon any Guardians.";
+ close;
+ }
+ else {
+ mes "[Yehsus]";
+ mes "I shall endeavor to summon";
+ mes "a Guardian through a Guardian";
+ mes "Stone. However, keep in mind";
+ mes "that this will not work if the";
+ mes "Guardian Stone is destroyed.";
+ setarray $agit_ar03[5],1;
+ if ($agit_ar03[0] == 0) {
+ donpcevent "#aru03_gard01::OnEnable";
+ }
+ if ($agit_ar03[1] == 0) {
+ donpcevent "#aru03_gard02::OnEnable";
+ }
+ close;
+ }
+ }
+ else {
+ mes "[Yehsus]";
+ mes "You've already commanded";
+ mes "me to summon a Guardian";
+ mes "to defend the stronghold.";
+ close;
+ }
+ case 2:
+ mes "[Yehsus]";
+ mes "Our defense status is...";
+ if ($agit_ar03[0] == 1) {
+ mes "1st Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar03[0] == 2) {
+ mes "1st Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar03[1] == 1) {
+ mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar03[1] == 2) {
+ mes "2nd Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar03[2] == 1) {
+ mes "1st Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar03[2] == 2) {
+ mes "1st Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar03[3] == 1) {
+ mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar03[3] == 2) {
+ mes "2nd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar03[4] == 1) {
+ mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar03[4] == 2) {
+ mes "3rd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ close;
+ case 3:
+ mes "[Yehsus]";
+ mes "I'll be standing by,";
+ mes "awaiting your orders.";
+ close;
+ }
+ }
+ }
+ }
+ else {
+ mes "[Yehsus]";
+ mes "Who are you? Scoundrel!";
+ mes "Leave this stronghold now!";
+ close;
+ }
+
+OnInit:
+ setarray $agit_ar03[0],0,0,0,0,0,0;
+ end;
+}
+
+arug_cas03,1,1,0 script #aru03_gard01 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas03",3);
+ guardian "arug_cas03",130,60,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //0;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas03",128,90,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //2;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas03",128,90,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas03",128,100,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //3;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas03",128,90,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas03",128,100,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas03",110,96,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //4;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas03",66,157,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1;
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",91,53,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //5;
+ mapannounce "arug_cas03","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",65,71,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //6;
+ mapannounce "arug_cas03","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer1800000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",65,103,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //7;
+ mapannounce "arug_cas03","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer2700000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",110,96,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //8;
+ mapannounce "arug_cas03","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer3600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",128,100,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //9;
+ mapannounce "arug_cas03","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //10;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas03","#aru03_gard01::OnGuardianDied";
+ end;
+}
+
+arug_cas03,1,2,0 script #aru03_gard02 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas03",3);
+ guardian "arug_cas03",156,101,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //11;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas03",154,90,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //13;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas03",154,90,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas03",156,77,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //14;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas03",154,90,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas03",156,77,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas03",155,60,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //15;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas03",211,159,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12;
+ }
+ initnpctimer;
+ end;
+
+OnTimer600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",187,54,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //16;
+ end;
+
+OnTimer1200000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",212,67,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //17;
+ end;
+
+OnTimer2100000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",211,105,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //18;
+ end;
+
+OnTimer3000000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",155,60,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //19;
+ end;
+
+OnTimer3900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",156,77,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //20;
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //21;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas03","#aru03_gard02::OnGuardianDied";
+ end;
+}
+
+arug_cas03,1,3,0 script #aru03_df01 -1,{
+OnEnable:
+ guardian "arug_cas03",65,171,"1st Guardian Stone",1907,"#aru03_df01::OnGuardianStoneDied"; //22;
+ end;
+
+OnDisable:
+ killmonster "arug_cas03","#aru03_df01::OnGuardianStoneDied";
+ setarray $agit_ar03[0],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 1st Guardian Stone is Destroyed
+ setarray $agit_ar03[0],1;
+ if (($agit_ar03[0] == 1) || ($agit_ar03[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar03[1] == 1) || ($agit_ar03[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas03","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru03_RL00::OnDisable";
+ donpcevent "#aru03_gard01::Onreset";
+ }
+ else {
+ mapannounce "arug_cas03","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru03_gard01::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "1st Guardian Stone#aru03::OnGuardian";
+ setarray $agit_ar03[0],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas03,65,171,0 script 1st Guardian Stone#aru03 844,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"1st Guardian Stone#aru03" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"1st Guardian Stone#aru03" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"1st Guardian Stone#aru03" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar03[0] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "already completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru03_df01::OnEnable";
+ specialeffect 135; //"1st Guardian Stone#aru03" EF_ICECRASH
+ disablenpc "1st Guardian Stone#aru03";
+ setarray $agit_ar03[0],0;
+ set .@df_all,$agit_ar03[0]+$agit_ar03[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas03","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru03_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas03","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar03[5] == 1) {
+ donpcevent "#aru03_gard01::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "1st Guardian Stone#aru03";
+ end;
+
+OnEnable:
+ enablenpc "1st Guardian Stone#aru03";
+ specialeffect 247; //"1st Guardian Stone#aru03" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "1st Guardian Stone#aru03";
+ end;
+}
+
+arug_cas03,1,4,0 script #aru03_df02 -1,{
+OnEnable:
+ guardian "arug_cas03",212,149,"2nd Guardian Stone",1908,"#aru03_df02::OnGuardianStoneDied"; //23;
+ end;
+
+OnDisable:
+ killmonster "arug_cas03","#aru03_df02::OnGuardianStoneDied";
+ setarray $agit_ar03[1],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 2nd Guardian Stone is Destroyed
+ setarray $agit_ar03[1],1;
+ if (($agit_ar03[0] == 1) || ($agit_ar03[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar03[1] == 1) || ($agit_ar03[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas03","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru03_RL00::OnDisable";
+ donpcevent "#aru03_gard02::Onreset";
+ }
+ else {
+ mapannounce "arug_cas03","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru03_gard02::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "2nd Guardian Stone#aru03::OnGuardian";
+ setarray $agit_ar03[1],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas03,212,149,0 script 2nd Guardian Stone#aru03 844,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"2nd Guardian Stone#aru03" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"2nd Guardian Stone#aru03" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"2nd Guardian Stone#aru03" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru03" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar03[1] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "successfully completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru03_df02::OnEnable";
+ specialeffect 135; //"2nd Guardian Stone#aru03" EF_ICECRASH
+ disablenpc "2nd Guardian Stone#aru03";
+ setarray $agit_ar03[1],0;
+ set .@df_all,$agit_ar03[0]+$agit_ar03[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas03","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru03_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas03","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar03[5] == 1) {
+ donpcevent "#aru03_gard02::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "2nd Guardian Stone#aru03";
+ end;
+
+OnEnable:
+ enablenpc "2nd Guardian Stone#aru03";
+ specialeffect 247; //"2nd Guardian Stone#aru03" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "2nd Guardian Stone#aru03";
+ end;
+}
+
+// Barrier Summoners
+arug_cas03,2,1,0 script #aru03_RL00 -1,{
+OnEnable:
+ setcell "arug_cas03",138,110,145,110,cell_walkable,0;
+ setcell "arug_cas03",138,110,145,110,cell_shootable,0;
+ guardian "arug_cas03",139,111," ",1905,"#aru03_RL00::OnBarrierDestroyed"; //24;
+ guardian "arug_cas03",141,111," ",1905,"#aru03_RL00::OnBarrierDestroyed"; //25;
+ guardian "arug_cas03",143,111," ",1905,"#aru03_RL00::OnBarrierDestroyed"; //26;
+ guardian "arug_cas03",145,111," ",1905,"#aru03_RL00::OnBarrierDestroyed"; //27;
+ end;
+
+OnDisable:
+ setcell "arug_cas03",138,110,145,110,cell_walkable,1;
+ setcell "arug_cas03",138,110,145,110,cell_shootable,1;
+ killmonster "arug_cas03","#aru03_RL00::OnBarrierDestroyed";
+ end;
+
+OnBarrierDestroyed:
+ end;
+}
+
+arug_cas03,2,2,0 script #aru03_RL01 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas03",139,158,144,158,cell_walkable,0;
+ guardian "arug_cas03",140,157," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //28;
+ guardian "arug_cas03",142,157," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //29;
+ guardian "arug_cas03",144,157," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //30;
+ guardian "arug_cas03",139,156," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //31;
+ guardian "arug_cas03",141,156," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //32;
+ guardian "arug_cas03",143,156," ",1905,"#aru03_RL01::OnBarrierDestroyed"; //33;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar03[2],1;
+ mapannounce "arug_cas03","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas03",139,158,144,158,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas03",139,158,144,158,cell_walkable,1;
+ killmonster "arug_cas03","#aru03_RL01::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas03,2,3,0 script #aru03_RL02 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas03",138,210,145,210,cell_walkable,0;
+ guardian "arug_cas03",140,209," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //34;
+ guardian "arug_cas03",142,209," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //35;
+ guardian "arug_cas03",144,209," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //36;
+ guardian "arug_cas03",139,208," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //37;
+ guardian "arug_cas03",141,208," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //38;
+ guardian "arug_cas03",143,208," ",1905,"#aru03_RL02::OnBarrierDestroyed"; //39;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar03[3],1;
+ mapannounce "arug_cas03","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas03",138,210,145,210,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas03",138,210,145,210,cell_walkable,1;
+ killmonster "arug_cas03","#aru03_RL02::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas03,2,4,0 script #aru03_RL03 -1,{
+OnEnable:
+ set .MyMobCount,4;
+ setcell "arug_cas03",138,263,145,263,cell_walkable,0;
+ guardian "arug_cas03",139,262," ",1905,"#aru03_RL03::OnBarrierDestroyed"; //40;
+ guardian "arug_cas03",141,262," ",1905,"#aru03_RL03::OnBarrierDestroyed"; //41;
+ guardian "arug_cas03",143,262," ",1905,"#aru03_RL03::OnBarrierDestroyed"; //42;
+ guardian "arug_cas03",145,262," ",1905,"#aru03_RL03::OnBarrierDestroyed"; //43;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar03[4],1;
+ mapannounce "arug_cas03","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
+ setcell "arug_cas03",138,363,145,263,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas03",138,363,145,263,cell_walkable,1;
+ killmonster "arug_cas03","#aru03_RL03::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas03,136,158,0 script Control Device01#aru03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar03[2] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru03_RL01::OnEnable";
+ disablenpc "Control Device01#aru03";
+ mapannounce "arug_cas03","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[2],0;
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device01#aru03";
+ end;
+
+OnEnable:
+ enablenpc "Control Device01#aru03";
+ end;
+
+OnDisable:
+ disablenpc "Control Device01#aru03";
+ end;
+}
+
+arug_cas03,135,212,0 script Control Device02#aru03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar03[3] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru03_RL02::OnEnable";
+ disablenpc "Control Device02#aru03";
+ mapannounce "arug_cas03","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar03[3],0; //Global Variable
+ setarray $agit_ar03[2],2; //Global Variable
+ donpcevent "Control Device01#aru03::OnDevice01#aru03_dlrp01";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device02#aru03";
+ end;
+
+OnEnable:
+ enablenpc "Control Device02#aru03";
+ end;
+
+OnDisable:
+ disablenpc "Control Device02#aru03";
+ end;
+}
+
+arug_cas03,134,266,0 script Control Device03#aru03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar03[4] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru03_RL03::OnEnable";
+ disablenpc "Control Device03#aru03";
+ mapannounce "arug_cas03","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar03[4],0;
+ setarray $agit_ar03[3],2;
+ donpcevent "Control Device02#aru03::OnDevice02#aru03_dlrp02";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device03#aru03";
+ end;
+
+OnEnable:
+ enablenpc "Control Device03#aru03";
+ end;
+
+OnDisable:
+ disablenpc "Control Device03#aru03";
+ end;
+}
+
+// Link Flags
+arug_cas03,122,314,0 script LF-01#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("First Gate House:Second Gate House:Cancel")) {
+ case 1:
+ warp "arug_cas03",84,158;
+ end;
+ case 2:
+ warp "arug_cas03",197,136;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,125,314,0 script LF-02#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
+ case 1:
+ warp "arug_cas03",65,94;
+ end;
+ case 2:
+ warp "arug_cas03",211,97;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,128,314,0 script LF-03#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) {
+ case 1:
+ warp "arug_cas03",112,73;
+ end;
+ case 2:
+ warp "arug_cas03",171,73;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,131,314,0 script LF-04#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
+ case 1:
+ warp "arug_cas03",112,152;
+ end;
+ case 2:
+ warp "arug_cas03",172,152;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,134,314,0 script LF-05#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas03",120,186;
+ end;
+ case 2:
+ warp "arug_cas03",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,149,314,0 script LF-06#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas03",116,235;
+ end;
+ case 2:
+ warp "arug_cas03",164,235;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,152,314,0 script LF-07#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 2-1:Defense Area 3-1:Cancel")) {
+ case 1:
+ warp "arug_cas03",65,94;
+ end;
+ case 2:
+ warp "arug_cas03",112,152;
+ end;
+ case 3:
+ warp "arug_cas03",116,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,155,314,0 script LF-08#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-2:Defense Area 2-2:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas03",211,97;
+ end;
+ case 2:
+ warp "arug_cas03",172,152;
+ end;
+ case 3:
+ warp "arug_cas03",164,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,158,314,0 script LF-09#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-4:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas03",171,73;
+ end;
+ case 2:
+ warp "arug_cas03",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,161,314,0 script LF-10#arug_cas03 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to the";
+ mes "Convenience Facility for";
+ mes "guild members?^000000";
+ switch(select("Go to Convenience Facility:Cancel")) {
+ case 1:
+ warp "arug_cas03",321,57;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,45,158,0 script Horn#LF_ar03_01::LF_ar03_01 111,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas03",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas03,226,156,0 duplicate(LF_ar03_01) Horn#LF_ar03_01 111
+arug_cas03,134,62,4 duplicate(LF_ar03_01) Horn#LF_ar03_02 111
+arug_cas03,149,62,4 duplicate(LF_ar03_01) Horn#LF_ar03_03 111
+arug_cas03,123,154,0 duplicate(LF_ar03_01) Horn#LF_ar03_04 111
+arug_cas03,160,154,0 duplicate(LF_ar03_01) Horn#LF_ar03_05 111
+arug_cas03,135,205,0 duplicate(LF_ar03_01) Horn#LF_ar03_06 111
+arug_cas03,148,205,0 duplicate(LF_ar03_01) Horn#LF_ar03_07 111
+arug_cas03,134,260,0 duplicate(LF_ar03_01) Horn#LF_ar03_08 111
+//arug_cas03,204,142,0 duplicate(LF_ar03_01) Horn#LF_ar03_09 111
+
+arug_cas03,148,103,4 script Horn#LF_ar03_10::LF_ar03_02 722,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas03",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+
+OnRecvCastleAr03:
+ FlagEmblem GetCastleData("arug_cas03",1);
+ end;
+}
+
+arug_cas03,135,103,4 duplicate(LF_ar03_02) Horn#LF_ar03_11 722
+arug_cas03,63,51,7 duplicate(LF_ar03_02) Horn#LF_ar03_12 722
+arug_cas03,214,51,1 duplicate(LF_ar03_02) Horn#LF_ar03_13 722
+
+// Guild Manager
+arug_cas03,328,98,3 script Steward#aru03 55,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (.@GID == 0) {
+ mes "[ Steward ]";
+ mes "I await for the master";
+ mes "whom destiny will choose";
+ mes "for me. Do you think you";
+ mes "have to courage and strength";
+ mes "to conquer this stronghold?";
+ close;
+ }
+ if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[ Steward ]";
+ mes "Hmpf. Your threats don't";
+ mes "scare me! Guardians, drive";
+ mes "this infidel away from here!";
+ mes "I will always be loyal to the";
+ mes "master of this stronghold,";
+ MES "the one and only^FF0000" + getguildmaster(.@GID) + "^000000.";
+ close;
+ }
+ mes "[ Steward ]";
+ mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
+ mes "How shall I serve you today?";
+ mes "Was there an aspect of this";
+ mes "stronghold's maintenance";
+ mes "you wanted to discuss?";
+ next;
+ switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "The Commercial Growth";
+ mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas03",2) + ".";
+ if (GetCastleData("arug_cas03",4) > 0) {
+ mes "Last time, you invested in";
+ mes "Commercial Growth " + GetCastleData("arug_cas03",4) + ".";
+ }
+ next;
+ mes "[ Steward ]";
+ mes "Our stronghold's";
+ mes "safeguard level is " + GetCastleData("arug_cas03",3) + ".";
+ if (GetCastleData("arug_cas03",5) > 0) {
+ mes "Last time, you invested";
+ mes "in defense " + GetCastleData("arug_cas03",5) + " times.";
+ }
+ mes " ";
+ mes "That is all, master.";
+ close;
+ case 2:
+ set .@Economy,GetCastleData("arug_cas03",2);
+ if(.@Economy < 8) set .@eco_invest,10000;
+ if(.@Economy >= 8) set .@eco_invest,20000;
+ if(.@Economy >= 16) set .@eco_invest,40000;
+ if(.@Economy >= 25) set .@eco_invest,80000;
+ if(.@Economy >= 34) set .@eco_invest,160000;
+ if(.@Economy >= 44) set .@eco_invest,320000;
+ if(.@Economy >= 54) set .@eco_invest,640000;
+ if(.@Economy >= 65) set .@eco_invest,1280000;
+ if(.@Economy >= 76) set .@eco_invest,2560000;
+ if(.@Economy >= 88) set .@eco_invest,5120000;
+ mes "[ Steward ]";
+ mes "Raising the stronghold's";
+ mes "commercial growth will";
+ mes "increase the quantity of";
+ mes "goods produced for the guild.";
+ mes "Investing in commercial growth";
+ mes "will help the guild's future.";
+ next;
+ mes "[ Steward ]";
+ mes "You can make one investment";
+ mes "each day, but if you can make";
+ mes "two investments if you pay";
+ mes "more zeny: this will speed";
+ mes "up commercial development,";
+ mes "but can be quite expensive.";
+ next;
+ if (.@Economy == 100) {
+ mes "[ Steward ]";
+ mes "However, our stronghold's";
+ mes "commerical growth level is";
+ mes "at 100%. It's not possible to";
+ mes "develop commercial growth";
+ mes "any further than that.";
+ close;
+ }
+ if (GetCastleData("arug_cas03",4) == 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
+ if (GetCastleData("arug_cas03",4) == 0) {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
+ mes "to make an investment";
+ mes "Will you invest in this";
+ mes "stronghold's commerical";
+ mes "development now?";
+ }
+ else {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000";
+ mes "more zeny to make a second";
+ mes "investment today. Will you";
+ mes "invest one more time?";
+ }
+ next;
+ switch(select("Invest in Commercial Growth:Cancel")) {
+ case 1:
+ if (Zeny < .@eco_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ end;
+ }
+ set zeny,zeny-.@eco_invest;
+ SetCastleData "arug_cas03",4,GetCastleData("arug_cas03",4)+1;
+ SetCastleData "arug_cas03",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014));
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. We can expect";
+ mes "to see the results of this";
+ mes "investment by tomorrow.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 3:
+ set .@Defence,GetCastleData("arug_cas03",3);
+ if(.@Defence < 8) set .@def_invest,20000;
+ if(.@Defence >= 8) set .@def_invest,40000;
+ if(.@Defence >= 16) set .@def_invest,80000;
+ if(.@Defence >= 25) set .@def_invest,160000;
+ if(.@Defence >= 34) set .@def_invest,320000;
+ if(.@Defence >= 44) set .@def_invest,640000;
+ if(.@Defence >= 54) set .@def_invest,1280000;
+ if(.@Defence >= 65) set .@def_invest,2560000;
+ if(.@Defence >= 76) set .@def_invest,5120000;
+ if(.@Defence >= 88) set .@def_invest,10240000;
+ mes "[ Steward ]";
+ mes "Investing in our stronghold's";
+ mes "defense will enhance the";
+ mes "durability of our Guardians";
+ mes "and the Emperium. We'll need";
+ mes "every advantage to protect";
+ mes "ourselves from our enemies.";
+ next;
+ mes "[ Steward ]";
+ mes "You can invest in defense";
+ mes "once per day, but if you pay";
+ mes "more zeny, you can invest";
+ mes "a maximum of two times daily.";
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas03",3) == 100) {
+ mes "The Defense Level of this";
+ mes "stronghold is 100%, and";
+ mes "cannot be increased further.";
+ close;
+ }
+ if (GetCastleData("arug_cas03",5) == 2) {
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas03",5) == 0) {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses.";
+ mes "Will you invest now?";
+ }
+ else {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses";
+ mes "a second time today.";
+ mes "Will you invest now?";
+ }
+ next;
+ switch(select("Invest in Defense:Cancel")) {
+ case 1:
+ if (Zeny < .@def_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ close;
+ }
+ set zeny,zeny-.@def_invest;
+ SetCastleData "arug_cas03",5,GetCastleData("arug_cas03",5)+1;
+ SetCastleData "arug_cas03",3,.@Defence+1;
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. Increasing";
+ mes "the frequency of treasure";
+ mes "procured by the guild will";
+ mes "definitely help us all.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 4:
+ if (GetCastleData("arug_cas03",9) == 1) {
+ mes "[ Steward ]";
+ mes "Do you wish to dismiss";
+ mes "the Kafra Employee that";
+ mes "we've hired for the guild?";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "Master, please reconsider!";
+ mes "I've been working very hard";
+ mes "for the success of the guild!";
+ mes "I'll try harder to serve the";
+ mes "guild members of this";
+ mes "stronghold, I promise!";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ mes "[ Hired Kafra Employee ]";
+ mes "Why?! What have I done";
+ mes "to deserve this? Waaah~!";
+ next;
+ cutin "kafra_01",255;
+ break;
+ case 2:
+ mes "[ Hired Kafra Employee ]";
+ mes "Thank you, Master!";
+ mes "I'll obey your every";
+ mes "command as best I can!";
+ mes "You won't regret this!";
+ close;
+ }
+ break;
+ case 2:
+ mes "[ Steward ]";
+ mes "She works very hard,";
+ mes "in my opinion. It was in";
+ mes "all of our best interests to";
+ mes "allow her to stay with us.";
+ close;
+ }
+ disablenpc "Kafra Employee#arug_cas03";
+ SetCastleData "arug_cas03",9,0;
+ mes "[ Steward ]";
+ mes "That Kafra Employee";
+ mes "has been dismissed.";
+ mes "Were really dissatisfied";
+ mes "by the quality of her service?";
+ close;
+ }
+ else {
+ mes "[ Steward ]";
+ mes "Will you hire a";
+ mes "Kafra Employee to serve";
+ mes "our stronghold? You must";
+ mes "pay ^FF000010,000 zeny^000000 to hire one.";
+ next;
+ switch(select("Hire:Cancel")) {
+ case 1:
+ if (getgdskilllv(.@GID,10001) == 0) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "you have not yet attained";
+ mes "the ^FF0000Contract with Kafra^000000";
+ mes "guild skill.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "we do not have enough";
+ mes "funds to pay the contract fee.";
+ close;
+ }
+ set zeny,zeny-10000;
+ enablenpc "Kafra Employee#aru03";
+ SetCastleData "arug_cas03",9,1;
+ mes "[ Steward ]";
+ mes "Very well. We have formed";
+ mes "a contract with the Kafra";
+ mes "Head Office, and hired a";
+ mes "Kafra Employee for our";
+ mes "stronghold. Here she is~";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "How do you do? I've";
+ mes "been dispatched by the";
+ mes "Kafra Head Office to";
+ mes "serve your guild's needs.";
+ mes "I'll do my best to follow";
+ mes "your every command, Master.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Steward ]";
+ mes "Our contract will expire";
+ mes "after one month, so we must";
+ mes "pay additional fees to keep";
+ mes "this Kafra Employee in";
+ mes "the service of our guild.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ mes "However, I suggest hiring";
+ mes "a Kafra Employee as soon";
+ mes "as possible since our guild";
+ mes "would greatly benefit from";
+ mes "the convenient Kafra services.";
+ close;
+ }
+ }
+ case 5:
+ mes "[ Steward ]";
+ mes "Do you wish to enter the";
+ mes "Guild Treasure Room?";
+ mes "Only you, the Guild Master,";
+ mes "are permitted to enter.";
+ next;
+ mes "[ Steward ]";
+ mes "Please remember to open";
+ mes "the Treasure Boxes at the";
+ mes "proper time. Otherwise, the";
+ mes "treasure may disappear if";
+ mes "something unexpected happens.";
+ next;
+ switch(select("Go to Treasure Room:Cancel")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "Allow me to guide you";
+ mes "on the secret path to";
+ mes "the Treasure Room.";
+ mes "Press the secret switch";
+ mes "when you wish to return here.";
+ close2;
+ warp "arug_cas03",292,266;
+ end;
+ case 2:
+ mes "[ Steward ]";
+ mes "Items in the Treasure Room";
+ mes "are produced once each day.";
+ mes "Therefore, you must obtain";
+ mes "the treasure items everyday.";
+ mes "For the sake of the guild,";
+ mes "prioritize treasure harvesting!";
+ close;
+ }
+ }
+
+Onstop:
+ stopnpctimer;
+ end;
+
+OnStartArena:
+ set .@GID,getcharid(2);
+ // Lower castle Economy
+ set .@Economy,GetCastleData("arug_cas03",2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData "arug_cas03", 2, .@Economy;
+ // Lower Castle Defence
+ set .@Defence,GetCastleData("arug_cas03",3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData "arug_cas03", 3, .@Defence;
+ // Set new owner
+ SetCastleData "arug_cas03",1, .@GID;
+ // Clear castle's data.
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData "arug_cas03", .@i, 0;
+ // Disable Kafra
+ disablenpc "Kafra Employee#aru03";
+
+ set .msg,2;
+ if (.msg == 1) {
+ announce "Fortress [" + GetCastleName("arug_cas03") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru03_02::Onstart";
+ }
+ else if (.msg == 2) {
+ announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 3] stronghold of "+GetCastleName("arug_cas03"),bc_all;
+ mapannounce "arug_cas03","The emperium has been shattered!",bc_map,"0x00FF00";
+ if (agitcheck()) {
+ donpcevent "Manager#aru03_02::Onreset";
+ initnpctimer;
+ }
+ else {
+ donpcevent "Manager#aru03_02::Onreset";
+ stopnpctimer;
+ }
+ }
+ else if (.msg == 0) {
+ announce "Fortress [" + GetCastleName("arug_cas03") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru03_02::Onreset";
+ stopnpctimer;
+ end;
+ }
+ MapRespawnGuildID "arug_cas03",GetCastleData("arug_cas03",1),2;
+ GetCastleData "arug_cas03",0,"::OnRecvCastleAr03";
+ end;
+
+OnTimer10000:
+ donpcevent "Manager#aru03_02::Onchange";
+ mapannounce "arug_cas03","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00";
+ end;
+}
+
+// Guild Kafra
+arug_cas03,315,98,5 script Kafra Employee#aru03 117,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ mes "[Kafra Employee]";
+ mes "Welcome, proud member";
+ mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
+ mes "The Kafra Corporation is ready";
+ mes "to assist you wherever you go!";
+ next;
+ switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
+ case 1:
+ if (basicskillcheck() && getskilllv(1) < 6) {
+ mes "[Kafra Employee]";
+ mes "I'm so sorry, but you must";
+ mes "have at least Novice Skill";
+ mes "Lv.6 to use the Storage.";
+ }
+ else {
+ openstorage;
+ }
+ break;
+ case 2:
+ mes "[Kafra Employee]";
+ mes "Please tell me your";
+ mes "Warp destination.";
+ next;
+ switch(select("Rachel -> 200 z:Cancel")) {
+ case 1:
+ if (Zeny < 200) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to pay";
+ mes "the warp fee. Would you";
+ mes "please check your funds again?";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-200;
+ warp "rachel",115,125;
+ end;
+ case 2:
+ cutin "kafra_01",255;
+ }
+ break;
+ case 3:
+ if (BaseClass != Job_Merchant) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but the Pushcart";
+ mes "rental service can only be";
+ mes "used by Merchant, Blacksmith,";
+ mes "and Alchemist class characters.";
+ }
+ else if (checkcart() == 1) {
+ mes "[Kafra Employee]";
+ mes "Hm? You've already";
+ mes "rented a Pushcart.";
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "The Pushcart rental fee";
+ mes "is 800 zeny. Would you";
+ mes "like to rent a Pushcart?";
+ next;
+ switch(select("Rent Pushcart:Cancel")) {
+ case 1:
+ if (Zeny < 800) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to rent";
+ mes "one of our Pushcarts.";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-800;
+ setcart;
+ break;
+ case 2:
+ break;
+ }
+ }
+ break;
+ case 4:
+ mes "[Kafra Employee]";
+ mes "Thank you for using the";
+ mes "Kafra Service. Wherever";
+ mes "you go, Kafra will be";
+ mes "there to support you!";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but I've been";
+ mes "exclusively contracted";
+ mes "to the members of the";
+ mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes "You'll have to ask another";
+ mes "Kafra Employee to help you...";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+
+OnRecvCastleAr03:
+ if (GetCastleData("arug_cas03",1) == 0) {
+ monster "arug_cas03",0,0,"Evil Druid",1117,10;
+ monster "arug_cas03",0,0,"Khalitzburg",1132,4;
+ monster "arug_cas03",0,0,"Abysmal Knight",1219,3;
+ monster "arug_cas03",0,0,"Executioner",1205,1;
+ monster "arug_cas03",0,0,"Penomena",1216,10;
+ monster "arug_cas03",0,0,"Alarm",1193,18;
+ monster "arug_cas03",0,0,"Clock",1269,9;
+ monster "arug_cas03",0,0,"Raydric Archer",1276,12;
+ monster "arug_cas03",0,0,"Wanderer",1208,3;
+ monster "arug_cas03",0,0,"Alice",1275,1;
+ monster "arug_cas03",0,0,"Bloody Knight",1268,2;
+ monster "arug_cas03",0,0,"Dark Lord",1272,2;
+ monster "arug_cas03",0,0,"Tower Keeper",1270,4;
+ }
+ if (GetCastleData("arug_cas03",9) < 1) {
+ disablenpc "Kafra Employee#aru03";
+ }
+ end;
+}
+
+arug_cas03,299,277,0 script #aru03_switch 111,{
+ mes " ";
+ mes "^3355FFWill you pull";
+ mes "this small lever?^000000";
+ next;
+ switch(select("Pull Lever:Cancel")) {
+ case 1:
+ warp "arug_cas03",321,57;
+ end;
+ case 2:
+ close;
+ }
+}
+
+aru_gld,60,174,0 script Horn#flag_Ar03_1::Ar03_Flag 722,{
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ if (getcharid(2) == .@GID) {
+ mes "[ Ringing Voice ]";
+ mes "Courageous one,";
+ mes "do you wish to return";
+ mes "to your stronghold?";
+ next;
+ switch(select("Return to the Stronghold:Cancel")) {
+ case 1:
+ set .@GID, GetCastleData("arug_cas03",1);
+ if (getcharid(2) == .@GID) {
+ warp "arug_cas03",121,318;
+ end;
+ }
+ close;
+ case 2:
+ close;
+ }
+ }
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastleAr03:
+ FlagEmblem GetCastleData("arug_cas03",1);
+ end;
+}
+
+aru_gld,74,174,0 duplicate(Ar03_Flag) Horn#flag_Ar03_2 722,{
diff --git a/npc/guild2/arug_cas04.txt b/npc/guild2/arug_cas04.txt
new file mode 100644
index 000000000..93bb5b3c5
--- /dev/null
+++ b/npc/guild2/arug_cas04.txt
@@ -0,0 +1,2903 @@
+//===== eAthena Script =======================================
+//= War of Emperium Second Edition
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= WoE SE Arunafeltz Castle 4
+//===== Additional Comments: =================================
+//= 1.0 First Version [L0ne_W0lf]
+//============================================================
+
+arug_cas04,1,1,0 script Manager#aru04_02 111,{
+ end;
+
+OnInterIfInitOnce:
+ GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
+ end;
+
+OnRecvCastlear04:
+ RequestGuildInfo GetCastleData("arug_cas04",1);
+ if (GetCastleData("arug_cas04",1) == 0) {
+ donpcevent "Manager#aru04_02::Onstart";
+ }
+ end;
+
+OnAgitStart:
+ if (agitcheck()) {
+ MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2;
+ GvgOn "arug_cas04";
+ donpcevent "Manager#aru04_02::Onstart";
+ }
+ else {
+ donpcevent "#aru04_RL00::OnDisable";
+ donpcevent "#aru04_RL01::OnDisable";
+ donpcevent "#aru04_RL02::OnDisable";
+ donpcevent "#aru04_RL03::OnDisable";
+ }
+ end;
+
+OnAgitEnd:
+ GvgOff "arug_cas04";
+ if (GetCastleData("arug_cas04",1)) {
+ KillMonster "arug_cas04","Steward#aru04::OnStartArena";
+ donpcevent "Manager#aru04_02::Onreset";
+ }
+ end;
+
+Onstart:
+ // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
+ // Settings for all but Summon Guardians
+ // 0 = Okay; 1 = Destroyed; 2 = Repairing
+ // Summon Guardians
+ // 0 = Do not Summon; 1 = Summon
+ if (GetCastleData("arug_cas04",1)) {
+ setarray $agit_ar04[0],0,0,0,0,0,0;
+ donpcevent "#aru04_df01::OnEnable";
+ donpcevent "#aru04_df02::OnEnable";
+ donpcevent "#aru04_RL00::OnEnable";
+ donpcevent "#aru04_RL01::OnEnable";
+ donpcevent "#aru04_RL02::OnEnable";
+ donpcevent "#aru04_RL03::OnEnable";
+ }
+ monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena";
+ end;
+
+Onreset:
+ donpcevent "#aru04_df01::OnDisable";
+ donpcevent "#aru04_df02::OnDisable";
+ donpcevent "#aru04_gard01::Onreset";
+ donpcevent "#aru04_gard02::Onreset";
+ donpcevent "#aru04_RL00::OnDisable";
+ donpcevent "#aru04_RL01::OnDisable";
+ donpcevent "#aru04_RL02::OnDisable";
+ donpcevent "#aru04_RL03::OnDisable";
+ donpcevent "1st Guardian Stone#aru04::OnDisable";
+ donpcevent "2nd Guardian Stone#aru04::OnDisable";
+ donpcevent "Control Device01#aru04::OnDisable";
+ donpcevent "Control Device02#aru04::OnDisable";
+ donpcevent "Control Device03#aru04::OnDisable";
+ if (agitcheck()) {
+ setarray $agit_ar04[0],0,0,1,1,1,0;
+ }
+ end;
+
+Onchange:
+ setarray $agit_ar04[0],2,2,1,1,2,0;
+ monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena";
+ donpcevent "Control Device03#aru04::OnEnable";
+ donpcevent "1st Guardian Stone#aru04::OnEnable";
+ donpcevent "2nd Guardian Stone#aru04::OnEnable";
+ end;
+
+OnClock0001:
+ set .@Treasure,GetCastleData("arug_cas04",2)/5+4;
+ if (.@Treasure) {
+ monster "arug_cas04",291,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 2) end;
+ monster "arug_cas04",292,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 3) end;
+ monster "arug_cas04",293,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 4) end;
+ monster "arug_cas04",294,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 5) end;
+ monster "arug_cas04",295,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 6) end;
+ monster "arug_cas04",296,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 7) end;
+ monster "arug_cas04",293,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 8) end;
+ monster "arug_cas04",294,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 9) end;
+ monster "arug_cas04",295,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 10) end;
+ monster "arug_cas04",296,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 11) end;
+ monster "arug_cas04",297,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 12) end;
+ monster "arug_cas04",298,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 13) end;
+ monster "arug_cas04",291,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 14) end;
+ monster "arug_cas04",292,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 15) end;
+ monster "arug_cas04",293,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 16) end;
+ monster "arug_cas04",294,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 17) end;
+ monster "arug_cas04",295,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 18) end;
+ monster "arug_cas04",296,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 19) end;
+ monster "arug_cas04",293,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 20) end;
+ monster "arug_cas04",294,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 21) end;
+ monster "arug_cas04",295,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 22) end;
+ monster "arug_cas04",296,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 23) end;
+ monster "arug_cas04",297,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
+ if (.@Treasure < 24) end;
+ monster "arug_cas04",298,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
+ }
+ end;
+
+OnTreasureDied:
+ end;
+}
+
+arug_cas04,146,315,3 script Nios#aru04_01 868,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (.@GID == 0) {
+ mes "[Nios]";
+ mes "Great job. Now, all you";
+ mes "need to do is destroy this";
+ mes "Emperium to gain ownership";
+ mes "over this stronghold.";
+ close;
+ }
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[Nios]";
+ mes "As guardian of this";
+ mes "stronghold, I answer only";
+ mes "to the master of the guild";
+ mes "that controls this place.";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "[Nios]";
+ mes "I am Nios, guardian of";
+ mes "this stronghold. For now,";
+ mes "all is quiet in this place.";
+ next;
+ switch(select("Converse:Cancel")) {
+ case 1:
+ mes "[Nios]";
+ mes "Do you have any questions";
+ mes "about this stronghold?";
+ next;
+ switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
+ case 1:
+ mes "[Nios]";
+ mes "There is one Emperium";
+ mes "and two Guardian Stones in";
+ mes "each fortress. These stones";
+ mes "are the first line of defense,";
+ mes "and must be destroyed before";
+ mes "enemies can even enter.";
+ next;
+ mes "[Nios]";
+ mes "The stones are located in";
+ mes "^4D4DFFGate Houses^000000 which must be";
+ mes "protected to prevent enemies";
+ mes "from reaching the Emperium.";
+ mes "Guardian Stones can ^4D4DFFrecall";
+ mes "your Guardians^000000 for protection.";
+ next;
+ mes "[Nios]";
+ mes "Fortresses with higher levels";
+ mes "of defense can summon more";
+ mes "Guardians: this is why it is";
+ mes "so important for guilds to";
+ mes "invest in Defense Growth.";
+ next;
+ mes "[Nios]";
+ mes "Guardian Stones that have";
+ mes "been destroyed can be revived";
+ mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
+ mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
+ close;
+ case 2:
+ mes "[Nios]";
+ mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
+ mes "and are protected by extra barricades activated by the Guardian Stones.";
+ mes "These gates are located in three different parts of the fortress.";
+ next;
+ mes "[Nios]";
+ mes "Barricades are protected by";
+ mes "Guardian Stones, and are";
+ mes "restored when the Guardian";
+ mes "Stones are retrieved. However,";
+ mes "it is not as easy to restore";
+ mes "destroyed Fortress Gates.";
+ next;
+ mes "[Nios]";
+ mes "Fortress Gates can only be";
+ mes "restored when the ^4D4DFFguild";
+ mes "master of a stronghold";
+ mes "changes^000000, or if ^4D4DFFrestoration";
+ mes "is requested by the guild";
+ mes "master of the stronghold^000000.";
+ close;
+ case 3:
+ mes "[Nios]";
+ mes "Strongholds have many";
+ mes "Link Flags that allow you";
+ mes "to access vital areas within";
+ mes "restrictions placed by the";
+ mes "Barricades. Usually, ^4D4DFFFlag 1";
+ mes "links to the Gate House^000000.";
+ next;
+ mes "[Nios]";
+ mes "Many flags link directly to";
+ mes "the flag near the Emperium.";
+ mes "The final numbered flag is";
+ mes "linked to the Convenience";
+ mes "Facility of the stronghold's";
+ mes "owner. Keep this in mind.";
+ close;
+ case 4:
+ mes "[Nios]";
+ mes "Strategy? It would be better";
+ mes "to develop your battle plan to";
+ mes "exploit your guild's advantages";
+ mes "and your enemies' weaknesses.";
+ mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ close;
+ case 5:
+ mes "[Nios]";
+ mes "You have no questions";
+ mes "to ask of me? Well, I'm";
+ mes "here to serve your needs.";
+ close;
+ }
+ case 2:
+ mes "[Nios]";
+ mes "I'm always here, so";
+ mes "feel free to request my";
+ mes "assistance whenever";
+ mes "the need arises.";
+ close;
+ }
+ }
+ else {
+ mes "[Nios]";
+ mes "Greetings, "+strcharinfo(0)+".";
+ mes "What are your orders?";
+ next;
+ switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
+ case 1:
+ if ($agit_ar04[5] == 0) {
+ if (getgdskilllv(.@GID,10002) == 0) {
+ mes "[Nios]";
+ mes "I'm sorry, but the Guardian";
+ mes "Stones aren't powerful enough";
+ mes "to summon Guardians yet. We";
+ mes "need to accumulate more";
+ mes "knowledge before they can";
+ mes "summon any Guardians.";
+ close;
+ }
+ else {
+ mes "[Nios]";
+ mes "I shall endeavor to summon";
+ mes "a Guardian through a Guardian";
+ mes "Stone. However, keep in mind";
+ mes "that this will not work if the";
+ mes "Guardian Stone is destroyed.";
+ setarray $agit_ar04[5],1;
+ if ($agit_ar04[0] == 0) {
+ donpcevent "#aru04_gard01::OnEnable";
+ }
+ if ($agit_ar04[1] == 0) {
+ donpcevent "#aru04_gard02::OnEnable";
+ }
+ close;
+ }
+ }
+ else {
+ mes "[Nios]";
+ mes "You've already commanded";
+ mes "me to summon a Guardian";
+ mes "to defend the stronghold.";
+ close;
+ }
+ case 2:
+ mes "[Nios]";
+ mes "Our defense status is...";
+ if ($agit_ar04[0] == 1) {
+ mes "1st Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar04[0] == 2) {
+ mes "1st Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar04[1] == 1) {
+ mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar04[1] == 2) {
+ mes "2nd Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar04[2] == 1) {
+ mes "1st Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar04[2] == 2) {
+ mes "1st Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar04[3] == 1) {
+ mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar04[3] == 2) {
+ mes "2nd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar04[4] == 1) {
+ mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar04[4] == 2) {
+ mes "3rd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ close;
+ case 3:
+ mes "[Nios]";
+ mes "I'll be standing by,";
+ mes "awaiting your orders.";
+ close;
+ }
+ }
+ }
+ }
+ else {
+ mes "[Nios]";
+ mes "Who are you? Scoundrel!";
+ mes "Leave this stronghold now!";
+ close;
+ }
+
+OnInit:
+ setarray $agit_ar04[0],0,0,0,0,0,0;
+ end;
+}
+
+arug_cas04,1,1,0 script #aru04_gard01 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas04",3);
+ guardian "arug_cas04",130,60,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //0;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //4;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas04",66,157,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",91,53,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //5;
+ mapannounce "arug_cas04","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",65,71,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //6;
+ mapannounce "arug_cas04","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer1800000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",65,103,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //7;
+ mapannounce "arug_cas04","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer2700000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //8;
+ mapannounce "arug_cas04","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer3600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //9;
+ mapannounce "arug_cas04","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //10;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas04","#aru04_gard01::OnGuardianDied";
+ end;
+}
+
+arug_cas04,1,2,0 script #aru04_gard02 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas04",3);
+ guardian "arug_cas04",156,101,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //11;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //15;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas04",211,159,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
+ }
+ initnpctimer;
+ end;
+
+OnTimer600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",187,54,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //16;
+ end;
+
+OnTimer1200000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",212,67,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //17;
+ end;
+
+OnTimer2100000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",211,105,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //18;
+ end;
+
+OnTimer3000000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //19;
+ end;
+
+OnTimer3900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //20;
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //21;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas04","#aru04_gard02::OnGuardianDied";
+ end;
+}
+
+arug_cas04,1,3,0 script #aru04_df01 -1,{
+OnEnable:
+ guardian "arug_cas04",65,171,"1st Guardian Stone",1907,"#aru04_df01::OnGuardianStoneDied"; //22;
+ end;
+
+OnDisable:
+ killmonster "arug_cas04","#aru04_df01::OnGuardianStoneDied";
+ setarray $agit_ar04[0],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 1st Guardian Stone is Destroyed
+ setarray $agit_ar04[0],1;
+ if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru04_RL00::OnDisable";
+ donpcevent "#aru04_gard01::Onreset";
+ }
+ else {
+ mapannounce "arug_cas04","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru04_gard01::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "1st Guardian Stone#aru04::OnGuardian";
+ setarray $agit_ar04[0],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas04,65,171,0 script 1st Guardian Stone#aru04 844,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"1st Guardian Stone#aru04" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"1st Guardian Stone#aru04" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"1st Guardian Stone#aru04" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar04[0] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "already completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru04_df01::OnEnable";
+ specialeffect 135; //"1st Guardian Stone#aru04" EF_ICECRASH
+ disablenpc "1st Guardian Stone#aru04";
+ setarray $agit_ar04[0],0;
+ set .@df_all,$agit_ar04[0]+$agit_ar04[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru04_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas04","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar04[5] == 1) {
+ donpcevent "#aru04_gard01::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "1st Guardian Stone#aru04";
+ end;
+
+OnEnable:
+ enablenpc "1st Guardian Stone#aru04";
+ specialeffect 247; //"1st Guardian Stone#aru04" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "1st Guardian Stone#aru04";
+ end;
+}
+
+arug_cas04,1,4,0 script #aru04_df02 -1,{
+OnEnable:
+ guardian "arug_cas04",212,149,"2nd Guardian Stone",1908,"#aru04_df02::OnGuardianStoneDied"; //23;
+ end;
+
+OnDisable:
+ killmonster "arug_cas04","#aru04_df02::OnGuardianStoneDied";
+ setarray $agit_ar04[1],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 2nd Guardian Stone is Destroyed
+ setarray $agit_ar04[1],1;
+ if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru04_RL00::OnDisable";
+ donpcevent "#aru04_gard02::Onreset";
+ }
+ else {
+ mapannounce "arug_cas04","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru04_gard02::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "2nd Guardian Stone#aru04::OnGuardian";
+ setarray $agit_ar04[1],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas04,212,149,0 script 2nd Guardian Stone#aru04 844,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"2nd Guardian Stone#aru04" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"2nd Guardian Stone#aru04" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"2nd Guardian Stone#aru04" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar04[1] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "successfully completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru04_df02::OnEnable";
+ specialeffect 135; //"2nd Guardian Stone#aru04" EF_ICECRASH
+ disablenpc "2nd Guardian Stone#aru04";
+ setarray $agit_ar04[1],0;
+ set .@df_all,$agit_ar04[0]+$agit_ar04[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru04_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas04","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar04[5] == 1) {
+ donpcevent "#aru04_gard02::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "2nd Guardian Stone#aru04";
+ end;
+
+OnEnable:
+ enablenpc "2nd Guardian Stone#aru04";
+ specialeffect 247; //"2nd Guardian Stone#aru04" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "2nd Guardian Stone#aru04";
+ end;
+}
+
+// Barrier Summoners
+arug_cas04,2,1,0 script #aru04_RL00 -1,{
+OnEnable:
+ setcell "arug_cas04",138,110,145,110,cell_walkable,0;
+ setcell "arug_cas04",138,110,145,110,cell_shootable,0;
+ guardian "arug_cas04",139,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //24;
+ guardian "arug_cas04",141,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //25;
+ guardian "arug_cas04",143,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //26;
+ guardian "arug_cas04",145,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //27;
+ end;
+
+OnDisable:
+ setcell "arug_cas04",138,136,145,110,cell_walkable,1;
+ setcell "arug_cas04",138,110,145,110,cell_shootable,1;
+ killmonster "arug_cas04","#aru04_RL00::OnBarrierDestroyed";
+ end;
+
+OnBarrierDestroyed:
+ end;
+}
+
+arug_cas04,2,2,0 script #aru04_RL01 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas04",139,158,144,158,cell_walkable,0;
+ guardian "arug_cas04",140,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //28;
+ guardian "arug_cas04",142,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //29;
+ guardian "arug_cas04",144,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //30;
+ guardian "arug_cas04",139,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //31;
+ guardian "arug_cas04",141,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //32;
+ guardian "arug_cas04",143,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //33;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar04[2],1;
+ mapannounce "arug_cas04","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas04",139,158,144,158,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas04",139,158,144,158,cell_walkable,1;
+ killmonster "arug_cas04","#aru04_RL01::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas04,2,3,0 script #aru04_RL02 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas04",138,210,145,210,cell_walkable,0;
+ guardian "arug_cas04",140,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //34;
+ guardian "arug_cas04",142,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //35;
+ guardian "arug_cas04",144,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //36;
+ guardian "arug_cas04",139,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //37;
+ guardian "arug_cas04",141,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //38;
+ guardian "arug_cas04",143,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //39;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar04[3],1;
+ mapannounce "arug_cas04","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas04",138,210,145,210,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas04",138,210,145,210,cell_walkable,1;
+ killmonster "arug_cas04","#aru04_RL02::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas04,2,4,0 script #aru04_RL03 -1,{
+OnEnable:
+ set .MyMobCount,4;
+ setcell "arug_cas04",138,263,145,263,cell_walkable,0;
+ guardian "arug_cas04",139,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //40;
+ guardian "arug_cas04",141,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //41;
+ guardian "arug_cas04",143,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //42;
+ guardian "arug_cas04",145,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //43;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar04[4],1;
+ mapannounce "arug_cas04","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
+ setcell "arug_cas04",138,363,145,263,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas04",138,363,145,263,cell_walkable,1;
+ killmonster "arug_cas04","#aru04_RL03::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas04,143,158,0 script Control Device01#aru04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar04[2] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru04_RL01::OnEnable";
+ disablenpc "Control Device01#aru04";
+ mapannounce "arug_cas04","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[2],0;
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device01#aru04";
+ end;
+
+OnEnable:
+ enablenpc "Control Device01#aru04";
+ end;
+
+OnDisable:
+ disablenpc "Control Device01#aru04";
+ end;
+}
+
+arug_cas04,135,212,0 script Control Device02#aru04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar04[3] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru04_RL02::OnEnable";
+ disablenpc "Control Device02#aru04";
+ mapannounce "arug_cas04","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar04[3],0; //Global Variable
+ setarray $agit_ar04[2],2; //Global Variable
+ donpcevent "Control Device01#aru04::OnDevice01#aru04_dlrp01";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device02#aru04";
+ end;
+
+OnEnable:
+ enablenpc "Control Device02#aru04";
+ end;
+
+OnDisable:
+ disablenpc "Control Device02#aru04";
+ end;
+}
+
+arug_cas04,134,266,0 script Control Device03#aru04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar04[4] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru04_RL03::OnEnable";
+ disablenpc "Control Device03#aru04";
+ mapannounce "arug_cas04","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar04[4],0;
+ setarray $agit_ar04[3],2;
+ donpcevent "Control Device02#aru04::OnDevice02#aru04_dlrp02";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device03#aru04";
+ end;
+
+OnEnable:
+ enablenpc "Control Device03#aru04";
+ end;
+
+OnDisable:
+ disablenpc "Control Device03#aru04";
+ end;
+}
+
+// Link Flags
+arug_cas04,122,314,0 script LF-01#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("First Gate House:Second Gate House:Cancel")) {
+ case 1:
+ warp "arug_cas04",84,158;
+ end;
+ case 2:
+ warp "arug_cas04",197,136;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,125,314,0 script LF-02#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
+ case 1:
+ warp "arug_cas04",65,94;
+ end;
+ case 2:
+ warp "arug_cas04",211,97;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,128,314,0 script LF-03#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) {
+ case 1:
+ warp "arug_cas04",112,73;
+ end;
+ case 2:
+ warp "arug_cas04",171,73;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,131,314,0 script LF-04#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
+ case 1:
+ warp "arug_cas04",112,152;
+ end;
+ case 2:
+ warp "arug_cas04",172,152;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,134,314,0 script LF-05#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas04",120,186;
+ end;
+ case 2:
+ warp "arug_cas04",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,149,314,0 script LF-06#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas04",116,235;
+ end;
+ case 2:
+ warp "arug_cas04",164,235;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,152,314,0 script LF-07#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 2-1:Defense Area 3-1:Cancel")) {
+ case 1:
+ warp "arug_cas04",65,94;
+ end;
+ case 2:
+ warp "arug_cas04",112,152;
+ end;
+ case 3:
+ warp "arug_cas04",116,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,155,314,0 script LF-08#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-2:Defense Area 2-2:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas04",211,97;
+ end;
+ case 2:
+ warp "arug_cas04",172,152;
+ end;
+ case 3:
+ warp "arug_cas04",164,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,158,314,0 script LF-09#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-4:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas04",171,73;
+ end;
+ case 2:
+ warp "arug_cas04",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,161,314,0 script LF-10#arug_cas04 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to the";
+ mes "Convenience Facility for";
+ mes "guild members?^000000";
+ switch(select("Go to Convenience Facility:Cancel")) {
+ case 1:
+ warp "arug_cas04",321,57;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,45,158,0 script Gefn#LF_ar04_01::LF_ar04_01 111,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas04",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas04,226,156,0 duplicate(LF_ar04_01) Gefn#LF_ar04_01 111
+arug_cas04,134,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_02 111
+arug_cas04,149,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_03 111
+arug_cas04,123,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_04 111
+arug_cas04,160,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_05 111
+arug_cas04,135,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_06 111
+arug_cas04,148,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_07 111
+arug_cas04,134,260,0 duplicate(LF_ar04_01) Gefn#LF_ar04_08 111
+//arug_cas04,204,142,0 duplicate(LF_ar04_01) Gefn#LF_ar04_09 111
+
+arug_cas04,148,103,4 script Gefn#LF_ar04_10::LF_ar04_02 722,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas04",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+
+OnRecvCastlear04:
+ FlagEmblem GetCastleData("arug_cas04",1);
+ end;
+}
+
+arug_cas04,135,103,4 duplicate(LF_ar04_02) Gefn#LF_ar04_11 722
+arug_cas04,63,51,7 duplicate(LF_ar04_02) Gefn#LF_ar04_12 722
+arug_cas04,214,51,1 duplicate(LF_ar04_02) Gefn#LF_ar04_13 722
+
+// Guild Manager
+arug_cas04,328,98,3 script Steward#aru04 55,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (.@GID == 0) {
+ mes "[ Steward ]";
+ mes "I await for the master";
+ mes "whom destiny will choose";
+ mes "for me. Do you think you";
+ mes "have to courage and strength";
+ mes "to conquer this stronghold?";
+ close;
+ }
+ if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[ Steward ]";
+ mes "Hmpf. Your threats don't";
+ mes "scare me! Guardians, drive";
+ mes "this infidel away from here!";
+ mes "I will always be loyal to the";
+ mes "master of this stronghold,";
+ MES "the one and only^FF0000" + getguildmaster(.@GID) + "^000000.";
+ close;
+ }
+ mes "[ Steward ]";
+ mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
+ mes "How shall I serve you today?";
+ mes "Was there an aspect of this";
+ mes "stronghold's maintenance";
+ mes "you wanted to discuss?";
+ next;
+ switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "The Commercial Growth";
+ mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas04",2) + ".";
+ if (GetCastleData("arug_cas04",4) > 0) {
+ mes "Last time, you invested in";
+ mes "Commercial Growth " + GetCastleData("arug_cas04",4) + ".";
+ }
+ next;
+ mes "[ Steward ]";
+ mes "Our stronghold's";
+ mes "safeguard level is " + GetCastleData("arug_cas04",3) + ".";
+ if (GetCastleData("arug_cas04",5) > 0) {
+ mes "Last time, you invested";
+ mes "in defense " + GetCastleData("arug_cas04",5) + " times.";
+ }
+ mes " ";
+ mes "That is all, master.";
+ close;
+ case 2:
+ set .@Economy,GetCastleData("arug_cas04",2);
+ if(.@Economy < 8) set .@eco_invest,10000;
+ if(.@Economy >= 8) set .@eco_invest,20000;
+ if(.@Economy >= 16) set .@eco_invest,40000;
+ if(.@Economy >= 25) set .@eco_invest,80000;
+ if(.@Economy >= 34) set .@eco_invest,160000;
+ if(.@Economy >= 44) set .@eco_invest,320000;
+ if(.@Economy >= 54) set .@eco_invest,640000;
+ if(.@Economy >= 65) set .@eco_invest,1280000;
+ if(.@Economy >= 76) set .@eco_invest,2560000;
+ if(.@Economy >= 88) set .@eco_invest,5120000;
+ mes "[ Steward ]";
+ mes "Raising the stronghold's";
+ mes "commercial growth will";
+ mes "increase the quantity of";
+ mes "goods produced for the guild.";
+ mes "Investing in commercial growth";
+ mes "will help the guild's future.";
+ next;
+ mes "[ Steward ]";
+ mes "You can make one investment";
+ mes "each day, but if you can make";
+ mes "two investments if you pay";
+ mes "more zeny: this will speed";
+ mes "up commercial development,";
+ mes "but can be quite expensive.";
+ next;
+ if (.@Economy == 100) {
+ mes "[ Steward ]";
+ mes "However, our stronghold's";
+ mes "commerical growth level is";
+ mes "at 100%. It's not possible to";
+ mes "develop commercial growth";
+ mes "any further than that.";
+ close;
+ }
+ if (GetCastleData("arug_cas04",4) == 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
+ if (GetCastleData("arug_cas04",4) == 0) {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
+ mes "to make an investment";
+ mes "Will you invest in this";
+ mes "stronghold's commerical";
+ mes "development now?";
+ }
+ else {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000";
+ mes "more zeny to make a second";
+ mes "investment today. Will you";
+ mes "invest one more time?";
+ }
+ next;
+ switch(select("Invest in Commercial Growth:Cancel")) {
+ case 1:
+ if (Zeny < .@eco_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ end;
+ }
+ set zeny,zeny-.@eco_invest;
+ SetCastleData "arug_cas04",4,GetCastleData("arug_cas04",4)+1;
+ SetCastleData "arug_cas04",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014));
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. We can expect";
+ mes "to see the results of this";
+ mes "investment by tomorrow.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 3:
+ set .@Defence,GetCastleData("arug_cas04",3);
+ if(.@Defence < 8) set .@def_invest,20000;
+ if(.@Defence >= 8) set .@def_invest,40000;
+ if(.@Defence >= 16) set .@def_invest,80000;
+ if(.@Defence >= 25) set .@def_invest,160000;
+ if(.@Defence >= 34) set .@def_invest,320000;
+ if(.@Defence >= 44) set .@def_invest,640000;
+ if(.@Defence >= 54) set .@def_invest,1280000;
+ if(.@Defence >= 65) set .@def_invest,2560000;
+ if(.@Defence >= 76) set .@def_invest,5120000;
+ if(.@Defence >= 88) set .@def_invest,10240000;
+ mes "[ Steward ]";
+ mes "Investing in our stronghold's";
+ mes "defense will enhance the";
+ mes "durability of our Guardians";
+ mes "and the Emperium. We'll need";
+ mes "every advantage to protect";
+ mes "ourselves from our enemies.";
+ next;
+ mes "[ Steward ]";
+ mes "You can invest in defense";
+ mes "once per day, but if you pay";
+ mes "more zeny, you can invest";
+ mes "a maximum of two times daily.";
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas04",3) == 100) {
+ mes "The Defense Level of this";
+ mes "stronghold is 100%, and";
+ mes "cannot be increased further.";
+ close;
+ }
+ if (GetCastleData("arug_cas04",5) == 2) {
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas04",5) == 0) {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses.";
+ mes "Will you invest now?";
+ }
+ else {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses";
+ mes "a second time today.";
+ mes "Will you invest now?";
+ }
+ next;
+ switch(select("Invest in Defense:Cancel")) {
+ case 1:
+ if (Zeny < .@def_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ close;
+ }
+ set zeny,zeny-.@def_invest;
+ SetCastleData "arug_cas04",5,GetCastleData("arug_cas04",5)+1;
+ SetCastleData "arug_cas04",3,.@Defence+1;
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. Increasing";
+ mes "the frequency of treasure";
+ mes "procured by the guild will";
+ mes "definitely help us all.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 4:
+ if (GetCastleData("arug_cas04",9) == 1) {
+ mes "[ Steward ]";
+ mes "Do you wish to dismiss";
+ mes "the Kafra Employee that";
+ mes "we've hired for the guild?";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "Master, please reconsider!";
+ mes "I've been working very hard";
+ mes "for the success of the guild!";
+ mes "I'll try harder to serve the";
+ mes "guild members of this";
+ mes "stronghold, I promise!";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ mes "[ Hired Kafra Employee ]";
+ mes "Why?! What have I done";
+ mes "to deserve this? Waaah~!";
+ next;
+ cutin "kafra_01",255;
+ break;
+ case 2:
+ mes "[ Hired Kafra Employee ]";
+ mes "Thank you, Master!";
+ mes "I'll obey your every";
+ mes "command as best I can!";
+ mes "You won't regret this!";
+ close;
+ }
+ break;
+ case 2:
+ mes "[ Steward ]";
+ mes "She works very hard,";
+ mes "in my opinion. It was in";
+ mes "all of our best interests to";
+ mes "allow her to stay with us.";
+ close;
+ }
+ disablenpc "Kafra Employee#arug_cas04";
+ SetCastleData "arug_cas04",9,0;
+ mes "[ Steward ]";
+ mes "That Kafra Employee";
+ mes "has been dismissed.";
+ mes "Were really dissatisfied";
+ mes "by the quality of her service?";
+ close;
+ }
+ else {
+ mes "[ Steward ]";
+ mes "Will you hire a";
+ mes "Kafra Employee to serve";
+ mes "our stronghold? You must";
+ mes "pay ^FF000010,000 zeny^000000 to hire one.";
+ next;
+ switch(select("Hire:Cancel")) {
+ case 1:
+ if (getgdskilllv(.@GID,10001) == 0) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "you have not yet attained";
+ mes "the ^FF0000Contract with Kafra^000000";
+ mes "guild skill.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "we do not have enough";
+ mes "funds to pay the contract fee.";
+ close;
+ }
+ set zeny,zeny-10000;
+ enablenpc "Kafra Employee#aru04";
+ SetCastleData "arug_cas04",9,1;
+ mes "[ Steward ]";
+ mes "Very well. We have formed";
+ mes "a contract with the Kafra";
+ mes "Head Office, and hired a";
+ mes "Kafra Employee for our";
+ mes "stronghold. Here she is~";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "How do you do? I've";
+ mes "been dispatched by the";
+ mes "Kafra Head Office to";
+ mes "serve your guild's needs.";
+ mes "I'll do my best to follow";
+ mes "your every command, Master.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Steward ]";
+ mes "Our contract will expire";
+ mes "after one month, so we must";
+ mes "pay additional fees to keep";
+ mes "this Kafra Employee in";
+ mes "the service of our guild.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ mes "However, I suggest hiring";
+ mes "a Kafra Employee as soon";
+ mes "as possible since our guild";
+ mes "would greatly benefit from";
+ mes "the convenient Kafra services.";
+ close;
+ }
+ }
+ case 5:
+ mes "[ Steward ]";
+ mes "Do you wish to enter the";
+ mes "Guild Treasure Room?";
+ mes "Only you, the Guild Master,";
+ mes "are permitted to enter.";
+ next;
+ mes "[ Steward ]";
+ mes "Please remember to open";
+ mes "the Treasure Boxes at the";
+ mes "proper time. Otherwise, the";
+ mes "treasure may disappear if";
+ mes "something unexpected happens.";
+ next;
+ switch(select("Go to Treasure Room:Cancel")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "Allow me to guide you";
+ mes "on the secret path to";
+ mes "the Treasure Room.";
+ mes "Press the secret switch";
+ mes "when you wish to return here.";
+ close2;
+ warp "arug_cas04",292,266;
+ end;
+ case 2:
+ mes "[ Steward ]";
+ mes "Items in the Treasure Room";
+ mes "are produced once each day.";
+ mes "Therefore, you must obtain";
+ mes "the treasure items everyday.";
+ mes "For the sake of the guild,";
+ mes "prioritize treasure harvesting!";
+ close;
+ }
+ }
+
+Onstop:
+ stopnpctimer;
+ end;
+
+OnStartArena:
+ set .@GID,getcharid(2);
+ // Lower castle Economy
+ set .@Economy,GetCastleData("arug_cas04",2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData "arug_cas04", 2, .@Economy;
+ // Lower Castle Defence
+ set .@Defence,GetCastleData("arug_cas04",3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData "arug_cas04", 3, .@Defence;
+ // Set new owner
+ SetCastleData "arug_cas04",1, .@GID;
+ // Clear castle's data.
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData "arug_cas04", .@i, 0;
+ // Disable Kafra
+ disablenpc "Kafra Employee#aru04";
+
+ set .msg,2;
+ if (.msg == 1) {
+ announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru04_02::Onstart";
+ }
+ else if (.msg == 2) {
+ announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 4] stronghold of "+GetCastleName("arug_cas04"),bc_all;
+ mapannounce "arug_cas04","The emperium has been shattered!",bc_map,"0x00FF00";
+ if (agitcheck()) {
+ donpcevent "Manager#aru04_02::Onreset";
+ initnpctimer;
+ }
+ else {
+ donpcevent "Manager#aru04_02::Onreset";
+ stopnpctimer;
+ }
+ }
+ else if (.msg == 0) {
+ announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru04_02::Onreset";
+ stopnpctimer;
+ end;
+ }
+ MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2;
+ GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
+ end;
+
+OnTimer10000:
+ donpcevent "Manager#aru04_02::Onchange";
+ mapannounce "arug_cas04","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00";
+ end;
+}
+
+// Guild Kafra
+arug_cas04,315,98,5 script Kafra Employee#aru04 117,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ mes "[Kafra Employee]";
+ mes "Welcome, proud member";
+ mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
+ mes "The Kafra Corporation is ready";
+ mes "to assist you wherever you go!";
+ next;
+ switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
+ case 1:
+ if (basicskillcheck() && getskilllv(1) < 6) {
+ mes "[Kafra Employee]";
+ mes "I'm so sorry, but you must";
+ mes "have at least Novice Skill";
+ mes "Lv.6 to use the Storage.";
+ }
+ else {
+ openstorage;
+ }
+ break;
+ case 2:
+ mes "[Kafra Employee]";
+ mes "Please tell me your";
+ mes "Warp destination.";
+ next;
+ switch(select("Rachel -> 200 z:Cancel")) {
+ case 1:
+ if (Zeny < 200) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to pay";
+ mes "the warp fee. Would you";
+ mes "please check your funds again?";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-200;
+ warp "rachel",115,125;
+ end;
+ case 2:
+ cutin "kafra_01",255;
+ }
+ break;
+ case 3:
+ if (BaseClass != Job_Merchant) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but the Pushcart";
+ mes "rental service can only be";
+ mes "used by Merchant, Blacksmith,";
+ mes "and Alchemist class characters.";
+ }
+ else if (checkcart() == 1) {
+ mes "[Kafra Employee]";
+ mes "Hm? You've already";
+ mes "rented a Pushcart.";
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "The Pushcart rental fee";
+ mes "is 800 zeny. Would you";
+ mes "like to rent a Pushcart?";
+ next;
+ switch(select("Rent Pushcart:Cancel")) {
+ case 1:
+ if (Zeny < 800) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to rent";
+ mes "one of our Pushcarts.";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-800;
+ setcart;
+ break;
+ case 2:
+ break;
+ }
+ }
+ break;
+ case 4:
+ mes "[Kafra Employee]";
+ mes "Thank you for using the";
+ mes "Kafra Service. Wherever";
+ mes "you go, Kafra will be";
+ mes "there to support you!";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but I've been";
+ mes "exclusively contracted";
+ mes "to the members of the";
+ mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes "You'll have to ask another";
+ mes "Kafra Employee to help you...";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+
+OnRecvCastlear04:
+ if (GetCastleData("arug_cas04",1) == 0) {
+ monster "arug_cas04",0,0,"Evil Druid",1117,10;
+ monster "arug_cas04",0,0,"Khalitzburg",1132,4;
+ monster "arug_cas04",0,0,"Abysmal Knight",1219,3;
+ monster "arug_cas04",0,0,"Executioner",1205,1;
+ monster "arug_cas04",0,0,"Penomena",1216,10;
+ monster "arug_cas04",0,0,"Alarm",1193,18;
+ monster "arug_cas04",0,0,"Clock",1269,9;
+ monster "arug_cas04",0,0,"Raydric Archer",1276,12;
+ monster "arug_cas04",0,0,"Wanderer",1208,3;
+ monster "arug_cas04",0,0,"Alice",1275,1;
+ monster "arug_cas04",0,0,"Bloody Knight",1268,2;
+ monster "arug_cas04",0,0,"Dark Lord",1272,2;
+ monster "arug_cas04",0,0,"Tower Keeper",1270,4;
+ }
+ if (GetCastleData("arug_cas04",9) < 1) {
+ disablenpc "Kafra Employee#aru04";
+ }
+ end;
+}
+
+arug_cas04,299,277,0 script #aru04_switch 111,{
+ mes " ";
+ mes "^3355FFWill you pull";
+ mes "this small lever?^000000";
+ next;
+ switch(select("Pull Lever:Cancel")) {
+ case 1:
+ warp "arug_cas04",321,57;
+ end;
+ case 2:
+ close;
+ }
+}
+
+aru_gld,306,359,6 script Gefn#flag_ar04_1::ar04_Flag 722,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ if (getcharid(2) == .@GID) {
+ mes "[ Ringing Voice ]";
+ mes "Courageous one,";
+ mes "do you wish to return";
+ mes "to your stronghold?";
+ next;
+ switch(select("Return to the Stronghold:Cancel")) {
+ case 1:
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (getcharid(2) == .@GID) {
+ warp "arug_cas04",121,318;
+ end;
+ }
+ close;
+ case 2:
+ close;
+ }
+ }
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastlear04:
+ FlagEmblem GetCastleData("arug_cas04",1);
+ end;
+}
+
+aru_gld,306,348,0 duplicate(ar04_Flag) Gefn#flag_ar04_2 722
+
+aru_gld,301,318,4 script Gefn#flag_ar04_3::ar04_Flag2 722,{
+ set .@GID, GetCastleData("arug_cas04",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastlear04:
+ FlagEmblem GetCastleData("arug_cas04",1);
+ end;
+}
+
+aru_gld,306,348,0 duplicate(ar04_Flag2) Gefn#flag_ar04_4 722
diff --git a/npc/guild2/arug_cas05.txt b/npc/guild2/arug_cas05.txt
new file mode 100644
index 000000000..f12320f10
--- /dev/null
+++ b/npc/guild2/arug_cas05.txt
@@ -0,0 +1,2905 @@
+//===== eAthena Script =======================================
+//= War of Emperium Second Edition
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= WoE SE Arunafeltz Castle 5
+//===== Additional Comments: =================================
+//= 1.0 First Version [L0ne_W0lf]
+//============================================================
+
+arug_cas05,1,1,0 script Manager#aru05_02 111,{
+ end;
+
+OnInterIfInitOnce:
+ GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
+ end;
+
+OnRecvCastlear05:
+ RequestGuildInfo GetCastleData("arug_cas05",1);
+ if (GetCastleData("arug_cas05",1) == 0) {
+ donpcevent "Manager#aru05_02::Onstart";
+ }
+ end;
+
+OnAgitStart:
+ if (agitcheck()) {
+ MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2;
+ GvgOn "arug_cas05";
+ donpcevent "Manager#aru05_02::Onstart";
+ }
+ else {
+ donpcevent "#aru05_RL00::OnDisable";
+ donpcevent "#aru05_RL01::OnDisable";
+ donpcevent "#aru05_RL02::OnDisable";
+ donpcevent "#aru05_RL03::OnDisable";
+ }
+ end;
+
+OnAgitEnd:
+ GvgOff "arug_cas05";
+ if (GetCastleData("arug_cas05",1)) {
+ KillMonster "arug_cas05","Steward#aru05::OnStartArena";
+ donpcevent "Manager#aru05_02::Onreset";
+ }
+ end;
+
+Onstart:
+ // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
+ // Settings for all but Summon Guardians
+ // 0 = Okay; 1 = Destroyed; 2 = Repairing
+ // Summon Guardians
+ // 0 = Do not Summon; 1 = Summon
+ if (GetCastleData("arug_cas05",1)) {
+ setarray $agit_ar05[0],0,0,0,0,0,0;
+ donpcevent "#aru05_df01::OnEnable";
+ donpcevent "#aru05_df02::OnEnable";
+ donpcevent "#aru05_RL00::OnEnable";
+ donpcevent "#aru05_RL01::OnEnable";
+ donpcevent "#aru05_RL02::OnEnable";
+ donpcevent "#aru05_RL03::OnEnable";
+ }
+ monster "arug_cas05",141,293,"Emperium",1288,1,"Steward#aru05::OnStartArena";
+ end;
+
+Onreset:
+ donpcevent "#aru05_df01::OnDisable";
+ donpcevent "#aru05_df02::OnDisable";
+ donpcevent "#aru05_gard01::Onreset";
+ donpcevent "#aru05_gard02::Onreset";
+ donpcevent "#aru05_RL00::OnDisable";
+ donpcevent "#aru05_RL01::OnDisable";
+ donpcevent "#aru05_RL02::OnDisable";
+ donpcevent "#aru05_RL03::OnDisable";
+ donpcevent "1st Guardian Stone#aru05::OnDisable";
+ donpcevent "2nd Guardian Stone#aru05::OnDisable";
+ donpcevent "Control Device01#aru05::OnDisable";
+ donpcevent "Control Device02#aru05::OnDisable";
+ donpcevent "Control Device03#aru05::OnDisable";
+ if (agitcheck()) {
+ setarray $agit_ar05[0],0,0,1,1,1,0;
+ }
+ end;
+
+Onchange:
+ setarray $agit_ar05[0],2,2,1,1,2,0;
+ monster "arug_cas05",141,293,"Emperium",1288,1,"Steward#aru05::OnStartArena";
+ donpcevent "Control Device03#aru05::OnEnable";
+ donpcevent "1st Guardian Stone#aru05::OnEnable";
+ donpcevent "2nd Guardian Stone#aru05::OnEnable";
+ end;
+
+OnClock0001:
+ set .@Treasure,GetCastleData("arug_cas05",2)/5+4;
+ if (.@Treasure) {
+ monster "arug_cas05",291,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 2) end;
+ monster "arug_cas05",292,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 3) end;
+ monster "arug_cas05",293,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 4) end;
+ monster "arug_cas05",294,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 5) end;
+ monster "arug_cas05",295,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 6) end;
+ monster "arug_cas05",296,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 7) end;
+ monster "arug_cas05",293,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 8) end;
+ monster "arug_cas05",294,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 9) end;
+ monster "arug_cas05",295,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 10) end;
+ monster "arug_cas05",296,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 11) end;
+ monster "arug_cas05",297,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 12) end;
+ monster "arug_cas05",298,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 13) end;
+ monster "arug_cas05",291,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 14) end;
+ monster "arug_cas05",292,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 15) end;
+ monster "arug_cas05",293,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 16) end;
+ monster "arug_cas05",294,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 17) end;
+ monster "arug_cas05",295,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 18) end;
+ monster "arug_cas05",296,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 19) end;
+ monster "arug_cas05",293,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 20) end;
+ monster "arug_cas05",294,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 21) end;
+ monster "arug_cas05",295,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 22) end;
+ monster "arug_cas05",296,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 23) end;
+ monster "arug_cas05",297,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
+ if (.@Treasure < 24) end;
+ monster "arug_cas05",298,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
+ }
+ end;
+
+OnTreasureDied:
+ end;
+}
+
+arug_cas05,146,315,3 script Eeos#aru05_01 868,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (.@GID == 0) {
+ mes "[Eeos]";
+ mes "Great job. Now, all you";
+ mes "need to do is destroy this";
+ mes "Emperium to gain ownership";
+ mes "over this stronghold.";
+ close;
+ }
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[Eeos]";
+ mes "As guardian of this";
+ mes "stronghold, I answer only";
+ mes "to the master of the guild";
+ mes "that controls this place.";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "[Eeos]";
+ mes "I am Eeos, guardian of";
+ mes "this stronghold. For now,";
+ mes "all is quiet in this place.";
+ next;
+ switch(select("Converse:Cancel")) {
+ case 1:
+ mes "[Eeos]";
+ mes "Do you have any questions";
+ mes "about this stronghold?";
+ next;
+ switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
+ case 1:
+ mes "[Eeos]";
+ mes "There is one Emperium";
+ mes "and two Guardian Stones in";
+ mes "each fortress. These stones";
+ mes "are the first line of defense,";
+ mes "and must be destroyed before";
+ mes "enemies can even enter.";
+ next;
+ mes "[Eeos]";
+ mes "The stones are located in";
+ mes "^4D4DFFGate Houses^000000 which must be";
+ mes "protected to prevent enemies";
+ mes "from reaching the Emperium.";
+ mes "Guardian Stones can ^4D4DFFrecall";
+ mes "your Guardians^000000 for protection.";
+ next;
+ mes "[Eeos]";
+ mes "Fortresses with higher levels";
+ mes "of defense can summon more";
+ mes "Guardians: this is why it is";
+ mes "so important for guilds to";
+ mes "invest in Defense Growth.";
+ next;
+ mes "[Eeos]";
+ mes "Guardian Stones that have";
+ mes "been destroyed can be revived";
+ mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
+ mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
+ close;
+ case 2:
+ mes "[Eeos]";
+ mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
+ mes "and are protected by extra barricades activated by the Guardian Stones.";
+ mes "These gates are located in three different parts of the fortress.";
+ next;
+ mes "[Eeos]";
+ mes "Barricades are protected by";
+ mes "Guardian Stones, and are";
+ mes "restored when the Guardian";
+ mes "Stones are retrieved. However,";
+ mes "it is not as easy to restore";
+ mes "destroyed Fortress Gates.";
+ next;
+ mes "[Eeos]";
+ mes "Fortress Gates can only be";
+ mes "restored when the ^4D4DFFguild";
+ mes "master of a stronghold";
+ mes "changes^000000, or if ^4D4DFFrestoration";
+ mes "is requested by the guild";
+ mes "master of the stronghold^000000.";
+ close;
+ case 3:
+ mes "[Eeos]";
+ mes "Strongholds have many";
+ mes "Link Flags that allow you";
+ mes "to access vital areas within";
+ mes "restrictions placed by the";
+ mes "Barricades. Usually, ^4D4DFFFlag 1";
+ mes "links to the Gate House^000000.";
+ next;
+ mes "[Eeos]";
+ mes "Many flags link directly to";
+ mes "the flag near the Emperium.";
+ mes "The final numbered flag is";
+ mes "linked to the Convenience";
+ mes "Facility of the stronghold's";
+ mes "owner. Keep this in mind.";
+ close;
+ case 4:
+ mes "[Eeos]";
+ mes "Strategy? It would be better";
+ mes "to develop your battle plan to";
+ mes "exploit your guild's advantages";
+ mes "and your enemies' weaknesses.";
+ mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ close;
+ case 5:
+ mes "[Eeos]";
+ mes "You have no questions";
+ mes "to ask of me? Well, I'm";
+ mes "here to serve your needs.";
+ close;
+ }
+ case 2:
+ mes "[Eeos]";
+ mes "I'm always here, so";
+ mes "feel free to request my";
+ mes "assistance whenever";
+ mes "the need arises.";
+ close;
+ }
+ }
+ else {
+ mes "[Eeos]";
+ mes "Greetings, "+strcharinfo(0)+".";
+ mes "What are your orders?";
+ next;
+ switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
+ case 1:
+ if ($agit_ar05[5] == 0) {
+ if (getgdskilllv(.@GID,10002) == 0) {
+ mes "[Eeos]";
+ mes "I'm sorry, but the Guardian";
+ mes "Stones aren't powerful enough";
+ mes "to summon Guardians yet. We";
+ mes "need to accumulate more";
+ mes "knowledge before they can";
+ mes "summon any Guardians.";
+ close;
+ }
+ else {
+ mes "[Eeos]";
+ mes "I shall endeavor to summon";
+ mes "a Guardian through a Guardian";
+ mes "Stone. However, keep in mind";
+ mes "that this will not work if the";
+ mes "Guardian Stone is destroyed.";
+ setarray $agit_ar05[5],1;
+ if ($agit_ar05[0] == 0) {
+ donpcevent "#aru05_gard01::OnEnable";
+ }
+ if ($agit_ar05[1] == 0) {
+ donpcevent "#aru05_gard02::OnEnable";
+ }
+ close;
+ }
+ }
+ else {
+ mes "[Eeos]";
+ mes "You've already commanded";
+ mes "me to summon a Guardian";
+ mes "to defend the stronghold.";
+ close;
+ }
+ case 2:
+ mes "[Eeos]";
+ mes "Our defense status is...";
+ if ($agit_ar05[0] == 1) {
+ mes "1st Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar05[0] == 2) {
+ mes "1st Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar05[1] == 1) {
+ mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar05[1] == 2) {
+ mes "2nd Guardian Stone: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar05[2] == 1) {
+ mes "1st Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar05[2] == 2) {
+ mes "1st Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "1st Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar05[3] == 1) {
+ mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar05[3] == 2) {
+ mes "2nd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ if ($agit_ar05[4] == 1) {
+ mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
+ }
+ else if ($agit_ar05[4] == 2) {
+ mes "3rd Fortress Gate: ^008000Repairing^000000";
+ }
+ else {
+ mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
+ }
+ close;
+ case 3:
+ mes "[Eeos]";
+ mes "I'll be standing by,";
+ mes "awaiting your orders.";
+ close;
+ }
+ }
+ }
+ }
+ else {
+ mes "[Eeos]";
+ mes "Who are you? Scoundrel!";
+ mes "Leave this stronghold now!";
+ close;
+ }
+
+OnInit:
+ setarray $agit_ar05[0],0,0,0,0,0,0;
+ end;
+}
+
+arug_cas05,1,1,0 script #aru05_gard01 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas05",3);
+ guardian "arug_cas05",130,60,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //0;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //3;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas05",110,96,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //4;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas05",66,157,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",91,53,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //5;
+ mapannounce "arug_cas05","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",65,71,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //6;
+ mapannounce "arug_cas05","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer1800000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",65,103,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //7;
+ mapannounce "arug_cas05","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer2700000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",110,96,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //8;
+ mapannounce "arug_cas05","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ end;
+
+OnTimer3600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //9;
+ mapannounce "arug_cas05","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //10;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas05","#aru05_gard01::OnGuardianDied";
+ end;
+}
+
+arug_cas05,1,2,0 script #aru05_gard02 -1,{
+OnEnable:
+ set .@Defence,GetCastleData("arug_cas05",3);
+ guardian "arug_cas05",156,101,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //11;
+ if ((.@Defense > 10) && (.@Defense < 31)) {
+ set .MyMobCount,2;
+ guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
+ }
+ else if ((.@Defense > 30) && (.@Defense < 51)) {
+ set .MyMobCount,3;
+ guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
+ }
+ else if ((.@Defense > 50) && (.@Defense < 71)) {
+ set .MyMobCount,4;
+ guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //14;
+ }
+ else if (.@Defense > 70) {
+ set .MyMobCount,5;
+ guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas05",155,60,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //15;
+ }
+ else {
+ set .MyMobCount,2;
+ guardian "arug_cas05",211,159,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
+ }
+ initnpctimer;
+ end;
+
+OnTimer600000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",187,54,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //16;
+ end;
+
+OnTimer1200000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",212,67,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //17;
+ end;
+
+OnTimer2100000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",211,105,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //18;
+ end;
+
+OnTimer3000000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",155,60,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //19;
+ end;
+
+OnTimer3900000:
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //20;
+ stopnpctimer;
+ end;
+
+OnGuardianDied:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount < 2) {
+ set .MyMobCount,.MyMobCount+1;
+ guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //21;
+ }
+ end;
+
+Onreset:
+ stopnpctimer;
+ killmonster "arug_cas05","#aru05_gard02::OnGuardianDied";
+ end;
+}
+
+arug_cas05,1,3,0 script #aru05_df01 -1,{
+OnEnable:
+ guardian "arug_cas05",65,171,"1st Guardian Stone",1907,"#aru05_df01::OnGuardianStoneDied"; //22;
+ end;
+
+OnDisable:
+ killmonster "arug_cas05","#aru05_df01::OnGuardianStoneDied";
+ setarray $agit_ar05[0],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 1st Guardian Stone is Destroyed
+ setarray $agit_ar05[0],1;
+ if (($agit_ar05[0] == 1) || ($agit_ar05[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar05[1] == 1) || ($agit_ar05[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru05_RL00::OnDisable";
+ donpcevent "#aru05_gard01::Onreset";
+ }
+ else {
+ mapannounce "arug_cas05","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru05_gard01::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "1st Guardian Stone#aru05::OnGuardian";
+ setarray $agit_ar05[0],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas05,65,171,0 script 1st Guardian Stone#aru05 844,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"1st Guardian Stone#aru05" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"1st Guardian Stone#aru05" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"1st Guardian Stone#aru05" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"1st Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar05[0] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "already completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru05_df01::OnEnable";
+ specialeffect 135; //"1st Guardian Stone#aru05" EF_ICECRASH
+ disablenpc "1st Guardian Stone#aru05";
+ setarray $agit_ar05[0],0;
+ set .@df_all,$agit_ar05[0]+$agit_ar05[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru05_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas05","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar05[5] == 1) {
+ donpcevent "#aru05_gard01::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "1st Guardian Stone#aru05";
+ end;
+
+OnEnable:
+ enablenpc "1st Guardian Stone#aru05";
+ specialeffect 247; //"1st Guardian Stone#aru05" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "1st Guardian Stone#aru05";
+ end;
+}
+
+arug_cas05,1,4,0 script #aru05_df02 -1,{
+OnEnable:
+ guardian "arug_cas05",212,149,"2nd Guardian Stone",1908,"#aru05_df02::OnGuardianStoneDied"; //23;
+ end;
+
+OnDisable:
+ killmonster "arug_cas05","#aru05_df02::OnGuardianStoneDied";
+ setarray $agit_ar05[1],1; //Global Variable
+ stopnpctimer;
+ end;
+
+OnGuardianStoneDied:
+ // 2nd Guardian Stone is Destroyed
+ setarray $agit_ar05[1],1;
+ if (($agit_ar05[0] == 1) || ($agit_ar05[0] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (($agit_ar05[1] == 1) || ($agit_ar05[1] == 2)) {
+ set .@destroyed,.@destroyed + 1;
+ }
+ if (.@destroyed == 2) {
+ mapannounce "arug_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru05_RL00::OnDisable";
+ donpcevent "#aru05_gard02::Onreset";
+ }
+ else {
+ mapannounce "arug_cas05","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "#aru05_gard02::Onreset";
+ }
+ initnpctimer;
+ end;
+
+OnTimer300000:
+ donpcevent "2nd Guardian Stone#aru05::OnGuardian";
+ setarray $agit_ar05[1],2; //Global Variable
+ stopnpctimer;
+ end;
+}
+
+arug_cas05,212,149,0 script 2nd Guardian Stone#aru05 844,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFYou will need the";
+ mes "following materials to";
+ mes "rebuild a destroyed";
+ mes "Guardian Stone.^000000";
+ next;
+ mes "1 Oridecon";
+ mes "1 Elunium";
+ mes "30 Stones";
+ mes "5 Blue Gemstones";
+ mes "5 Yellow Gemstones";
+ mes "5 Red Gemstones";
+ next;
+ mes "^3355FFDo you want to continue?^000000";
+ switch(select("No:Continue")) {
+ case 1:
+ mes "^3355FFWork canceled.^000000";
+ close;
+ case 2:
+ if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
+ mes "^3355FFArrange Stones, Elunium, and";
+ mes "Oridecon, in that order, in the";
+ mes "center. Then you must arrange";
+ mes "the enchanted Gemstones to";
+ mes "rebuild the Guardian Stone.^000000";
+ next;
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFElunium has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFOridecon has been";
+ mes "placed in the center.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFStones have been";
+ mes "placed in the center.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Elunium.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Oridecon.^000000";
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou have lined the";
+ mes "outside of the center";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ switch(select("Elunium:Oridecon:Stone")) {
+ case 1:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Elunium.^000000";
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Oridecon.^000000";
+ set .@nice,.@nice+10;
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou covered the";
+ mes "rest of the materials";
+ mes "with some Stones.^000000";
+ next;
+ break;
+ }
+ mes "^3355FFNow you need to arrange";
+ mes "the enchanted Gemstones";
+ mes "accordingly. You can identify";
+ mes "their Magic properties by";
+ mes "their casting effect.^000000";
+ next;
+ while(1) {
+ if (.@roof0 > 7) {
+ break;
+ }
+ else {
+ switch(rand(1,3)) {
+ case 1:
+ specialeffect 54; //"2nd Guardian Stone#aru05" EF_BEGINSPELL2
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ }
+ break;
+ case 2:
+ specialeffect 225; //"2nd Guardian Stone#aru05" EF_VOLCANO
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ break;
+ case 3:
+ specialeffect 56; //"2nd Guardian Stone#aru05" EF_BEGINSPELL4
+ mes "^3355FFThe Gemstones must";
+ mes "be arranged in the correct";
+ mes "order according to their";
+ mes "magic properties and power.^000000";
+ next;
+ switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
+ case 1:
+ mes "^3355FFYou placed the Red Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou placed the Yellow Gemstone.^000000";
+ set .@nice,.@nice+10;
+ set .@roof0,.@roof0 + 1;
+ specialeffect 18; //"2nd Guardian Stone#aru05" EF_STEAL
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou placed the Blue Gemstone.";
+ mes "However, the Guardian Stone";
+ mes "Repair System failed because";
+ mes "of a magic power conflict.^000000";
+ close;
+ }
+ }
+ }
+ }
+ if (.@nice > 90) {
+ if ($agit_ar05[1] == 0) {
+ mes "^3355FFThe Guardian Stone";
+ mes "Repair System has";
+ mes "successfully completed.^000000";
+ close;
+ }
+ else {
+ if (agitcheck() == 0) {
+ mes "^3355FFIt is impossible to";
+ mes "rebuild the Guardian";
+ mes "Stone because the";
+ mes "Emperium is not present.^000000";
+ close;
+ }
+ else {
+ mes "^3355FFThe Gemstones have been";
+ mes "arranged, and the Guardian";
+ mes "Stone is successfully repaired.^000000";
+ delitem 984,1; //Oridecon
+ delitem 985,1; //Elunium
+ delitem 7049,30; //Stone
+ delitem 717,5; //Blue_Gemstone
+ delitem 715,5; //Yellow_Gemstone
+ delitem 716,5; //Red_Gemstone
+ close2;
+ donpcevent "#aru05_df02::OnEnable";
+ specialeffect 135; //"2nd Guardian Stone#aru05" EF_ICECRASH
+ disablenpc "2nd Guardian Stone#aru05";
+ setarray $agit_ar05[1],0;
+ set .@df_all,$agit_ar05[0]+$agit_ar05[1];
+ if (.@df_all == 0) {
+ mapannounce "arug_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "#aru05_RL00::OnEnable";
+ }
+ else {
+ mapannounce "arug_cas05","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
+ }
+ if ($agit_ar05[5] == 1) {
+ donpcevent "#aru05_gard02::OnEnable";
+ }
+ end;
+ }
+ }
+ }
+ else {
+ mes "^3355FFAfter all of that work...";
+ mes "It looks like you failed";
+ mes "to fix the Guardian Stone,";
+ mes "and lost some materials.^000000";
+ delitem 7049,10; //Stone
+ delitem 717,2; //Blue_Gemstone
+ delitem 715,2; //Yellow_Gemstone
+ delitem 716,2; //Red_Gemstone
+ close;
+ }
+ }
+ else {
+ mes "^3355FFYou don't have enough";
+ mes "materials to repair";
+ mes "the Guardian Stone.^000000";
+ close;
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "2nd Guardian Stone#aru05";
+ end;
+
+OnEnable:
+ enablenpc "2nd Guardian Stone#aru05";
+ specialeffect 247; //"2nd Guardian Stone#aru05" EF_MAPPILLAR2
+ end;
+
+OnDisable:
+ disablenpc "2nd Guardian Stone#aru05";
+ end;
+}
+
+// Barrier Summoners
+arug_cas05,2,1,0 script #aru05_RL00 -1,{
+OnEnable:
+ setcell "arug_cas05",138,136,145,110,cell_walkable,0;
+ setcell "arug_cas05",138,110,145,110,cell_shootable,0;
+ guardian "arug_cas05",139,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //24;
+ guardian "arug_cas05",141,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //25;
+ guardian "arug_cas05",143,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //26;
+ guardian "arug_cas05",145,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //27;
+ end;
+
+OnDisable:
+ setcell "arug_cas05",138,136,145,110,cell_walkable,1;
+ setcell "arug_cas05",138,110,145,110,cell_shootable,1;
+ killmonster "arug_cas05","#aru05_RL00::OnBarrierDestroyed";
+ end;
+
+OnBarrierDestroyed:
+ end;
+}
+
+arug_cas05,2,2,0 script #aru05_RL01 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas05",139,158,144,158,cell_walkable,0;
+ guardian "arug_cas05",140,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //28;
+ guardian "arug_cas05",142,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //29;
+ guardian "arug_cas05",144,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //30;
+ guardian "arug_cas05",139,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //31;
+ guardian "arug_cas05",141,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //32;
+ guardian "arug_cas05",143,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //33;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar05[2],1;
+ mapannounce "arug_cas05","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas05",139,158,144,158,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas05",139,158,144,158,cell_walkable,1;
+ killmonster "arug_cas05","#aru05_RL01::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas05,2,3,0 script #aru05_RL02 -1,{
+OnEnable:
+ set .MyMobCount,6;
+ setcell "arug_cas05",138,210,145,210,cell_walkable,0;
+ guardian "arug_cas05",140,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //34;
+ guardian "arug_cas05",142,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //35;
+ guardian "arug_cas05",144,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //36;
+ guardian "arug_cas05",139,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //37;
+ guardian "arug_cas05",141,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //38;
+ guardian "arug_cas05",143,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //39;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar05[3],1;
+ mapannounce "arug_cas05","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ setcell "arug_cas05",138,210,145,210,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas05",138,210,145,210,cell_walkable,1;
+ killmonster "arug_cas05","#aru05_RL02::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas05,2,4,0 script #aru05_RL03 -1,{
+OnEnable:
+ set .MyMobCount,4;
+ setcell "arug_cas05",138,263,145,263,cell_walkable,0;
+ guardian "arug_cas05",139,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //40;
+ guardian "arug_cas05",141,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //41;
+ guardian "arug_cas05",143,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //42;
+ guardian "arug_cas05",145,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //43;
+ end;
+
+OnBarrierDestroyed:
+ set .MyMobCount,.MyMobCount-1;
+ if (.MyMobCount == 0) {
+ setarray $agit_ar05[4],1;
+ mapannounce "arug_cas05","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
+ setcell "arug_cas05",138,363,145,263,cell_walkable,1;
+ }
+ end;
+
+OnDisable:
+ setcell "arug_cas05",138,363,145,263,cell_walkable,1;
+ killmonster "arug_cas05","#aru05_RL03::OnBarrierDestroyed";
+ end;
+}
+
+arug_cas05,136,158,0 script Control Device01#aru05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar05[2] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru05_RL01::OnEnable";
+ disablenpc "Control Device01#aru05";
+ mapannounce "arug_cas05","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar01[2],0;
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device01#aru05";
+ end;
+
+OnEnable:
+ enablenpc "Control Device01#aru05";
+ end;
+
+OnDisable:
+ disablenpc "Control Device01#aru05";
+ end;
+}
+
+arug_cas05,135,212,0 script Control Device02#aru05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar05[3] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru05_RL02::OnEnable";
+ disablenpc "Control Device02#aru05";
+ mapannounce "arug_cas05","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar05[3],0; //Global Variable
+ setarray $agit_ar05[2],2; //Global Variable
+ donpcevent "Control Device01#aru05::OnDevice01#aru05_dlrp01";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device02#aru05";
+ end;
+
+OnEnable:
+ enablenpc "Control Device02#aru05";
+ end;
+
+OnDisable:
+ disablenpc "Control Device02#aru05";
+ end;
+}
+
+arug_cas05,134,266,0 script Control Device03#aru05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ if (strcharinfo(0) == getguildmaster(.@GID)) {
+ if ($agit_ar05[4] == 2) {
+ mes "^3355FFDemolished Fortress";
+ mes "Gates can be repaired,";
+ mes "but you will need to gather";
+ mes "the following materials.^000000";
+ next;
+ mes "^4D4DFF10 Steel^000000,";
+ mes "^4D4DFF30 Trunks^000000,";
+ mes "^4D4DFF5 Oridecon^000000, and";
+ mes "^4D4DFF10 Emveretarcon^000000.";
+ next;
+ select("Continue");
+ if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
+ mes "^3355FFYou will need Trunks to";
+ mes "repair the support frame,";
+ mes "Oridecon to enhance the";
+ mes "gate's endurance, and";
+ mes "Emveretarcon to basically";
+ mes "hold everything together.^000000";
+ next;
+ set .@ro_of01,rand(10,15);
+ while(1) {
+ if (.@ro_of02 == .@ro_of01) {
+ break;
+ }
+ else {
+ switch(rand(1,4)) {
+ case 1:
+ mes "^3355FFThe support frame";
+ mes "is badly damaged:";
+ mes "fixing this part";
+ mes "is a top priority.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFThe frame has been";
+ mes "reinforced with wood.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 2:
+ mes "^3355FFIt looks like the gate's";
+ mes "overall endurance needs to";
+ mes "be reinforced with something.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood";
+ mes "to reinforce the gate.^000000";
+ set .@ro_of02,.@ro_of02 + 1;
+ next;
+ break;
+ case 2:
+ mes "^3355FFYou tried using steel";
+ mes "to reinforce the gate, but";
+ mes "it's not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou hammered the";
+ mes "oridecon: it looks";
+ mes "like this will work.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ }
+ break;
+ case 3:
+ mes "^3355FFThe damage to the gate";
+ mes "has caused all these";
+ mes "cracks. You'll have to";
+ mes "weld them solid somehow.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou used steel to weld";
+ mes "all the cracks: the gate is";
+ mes "is starting to look more solid.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 3:
+ mes "^3355FFYou tried using emveretarcon";
+ mes "to reinforce the gate, but it's";
+ mes "not working well at all.";
+ mes "You'll have to start over.^000000";
+ close;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ break;
+ case 4:
+ mes "^3355FFNow you need to make";
+ mes "sure that the gate is held";
+ mes "together pretty solidly.^000000";
+ next;
+ switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
+ case 1:
+ mes "^3355FFYou tried using wood to fix";
+ mes "this problem, but it seems";
+ mes "to have made it worse.";
+ mes "You'll have to start all over.^000000";
+ close;
+ case 2:
+ mes "^3355FFYou tried using steel,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ case 3:
+ mes "^3355FFYou successfully used";
+ mes "the emveretarcon to repair";
+ mes "much of the gate's damage.^000000";
+ set .@rp_temp,.@rp_temp + 1;
+ set .@ro_of02,.@ro_of02 + 1;
+ specialeffect2 101; // EF_REPAIRWEAPON
+ next;
+ break;
+ case 4:
+ mes "^3355FFYou tried using oridecon,";
+ mes "but it's not working very";
+ mes "well. You'll have to try";
+ mes "something else.^000000";
+ close;
+ }
+ }
+ }
+ }
+ mes "^3355FFWell, it looks like";
+ mes "you're just about done";
+ mes "with repairing the gate.^000000";
+ next;
+ if (agitcheck() == 0) {
+ mes "^3355FFUnfortunately, the Fortress";
+ mes "Gate can't be reconstructed:";
+ mes "the Emperium is no longer here.^000000";
+ close;
+ }
+ else {
+ if (.@rp_temp == .@ro_of01) {
+ mes "^3355FFThe Fortress Gate has";
+ mes "been successfully repaired!^000000";
+ delitem 1019,30; //Wooden_Block
+ delitem 999,10; //Steel
+ delitem 1011,10; //Emveretarcon
+ delitem 984,5; //Oridecon
+ close2;
+ donpcevent "#aru05_RL03::OnEnable";
+ disablenpc "Control Device03#aru05";
+ mapannounce "arug_cas05","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ setarray $agit_ar05[4],0;
+ setarray $agit_ar05[3],2;
+ donpcevent "Control Device02#aru05::OnDevice02#aru05_dlrp02";
+ end;
+ }
+ else {
+ mes "^3355FFThe wall has been breached,";
+ mes "and the attempt to repair the";
+ mes "Fortress Gate has failed.";
+ mes "You lost some of your";
+ mes "repair resources...^000000";
+ delitem 984,2; //Oridecon
+ delitem 999,4; //Steel
+ delitem 1019,14; //Wooden_Block
+ delitem 1011,3; //Emveretarcon
+ close;
+ }
+ }
+ }
+ else {
+ mes "^3355FFYou can't attempt to repair";
+ mes "the Fortress Gate if you don't";
+ mes "have all the needed materials.^000000";
+ close;
+ }
+ }
+ }
+ }
+ end;
+
+OnInit:
+ disablenpc "Control Device03#aru05";
+ end;
+
+OnEnable:
+ enablenpc "Control Device03#aru05";
+ end;
+
+OnDisable:
+ disablenpc "Control Device03#aru05";
+ end;
+}
+
+// Link Flags
+arug_cas05,122,314,0 script LF-01#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("First Gate House:Second Gate House:Cancel")) {
+ case 1:
+ warp "arug_cas05",84,158;
+ end;
+ case 2:
+ warp "arug_cas05",197,136;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,125,314,0 script LF-02#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
+ case 1:
+ warp "arug_cas05",65,94;
+ end;
+ case 2:
+ warp "arug_cas05",211,97;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,128,314,0 script LF-03#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) {
+ case 1:
+ warp "arug_cas05",112,73;
+ end;
+ case 2:
+ warp "arug_cas05",171,73;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,131,314,0 script LF-04#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
+ case 1:
+ warp "arug_cas05",112,152;
+ end;
+ case 2:
+ warp "arug_cas05",172,152;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,134,314,0 script LF-05#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas05",120,186;
+ end;
+ case 2:
+ warp "arug_cas05",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,149,314,0 script LF-06#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas05",116,235;
+ end;
+ case 2:
+ warp "arug_cas05",164,235;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,152,314,0 script LF-07#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-1:Defense Area 2-1:Defense Area 3-1:Cancel")) {
+ case 1:
+ warp "arug_cas05",65,94;
+ end;
+ case 2:
+ warp "arug_cas05",112,152;
+ end;
+ case 3:
+ warp "arug_cas05",116,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,155,314,0 script LF-08#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-2:Defense Area 2-2:Defense Area 3-2:Cancel")) {
+ case 1:
+ warp "arug_cas05",211,97;
+ end;
+ case 2:
+ warp "arug_cas05",172,152;
+ end;
+ case 3:
+ warp "arug_cas05",164,235;
+ end;
+ case 4:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,158,314,0 script LF-09#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Please";
+ mes "choose a destination";
+ mes "within the stronghold.^000000";
+ switch(select("Defense Area 1-4:Defense Area 2-4:Cancel")) {
+ case 1:
+ warp "arug_cas05",171,73;
+ end;
+ case 2:
+ warp "arug_cas05",162,186;
+ end;
+ case 3:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,161,314,0 script LF-10#arug_cas05 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to the";
+ mes "Convenience Facility for";
+ mes "guild members?^000000";
+ switch(select("Go to Convenience Facility:Cancel")) {
+ case 1:
+ warp "arug_cas05",321,57;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,45,158,0 script Banadis#LF_ar05_01::LF_ar05_01 111,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas05",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+}
+
+arug_cas05,226,156,0 duplicate(LF_ar05_01) Banadis#LF_ar05_01 111
+arug_cas05,134,62,4 duplicate(LF_ar05_01) Banadis#LF_ar05_02 111
+arug_cas05,149,62,4 duplicate(LF_ar05_01) Banadis#LF_ar05_03 111
+arug_cas05,123,154,0 duplicate(LF_ar05_01) Banadis#LF_ar05_04 111
+arug_cas05,160,154,0 duplicate(LF_ar05_01) Banadis#LF_ar05_05 111
+arug_cas05,135,205,0 duplicate(LF_ar05_01) Banadis#LF_ar05_06 111
+arug_cas05,148,205,0 duplicate(LF_ar05_01) Banadis#LF_ar05_07 111
+arug_cas05,134,260,0 duplicate(LF_ar05_01) Banadis#LF_ar05_08 111
+//arug_cas05,204,142,0 duplicate(LF_ar05_01) Banadis#LF_ar05_09 111
+
+arug_cas05,148,103,4 script Banadis#LF_ar05_10::LF_ar05_02 722,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ mes "^3355FFThis is the Stronghold";
+ mes "Teleport Service. Would";
+ mes "you like to teleport to";
+ mes "the Emperium Center?^000000";
+ switch(select("Teleport:Cancel")) {
+ case 1:
+ warp "arug_cas05",121,318;
+ end;
+ case 2:
+ close;
+ }
+ }
+ end;
+
+OnRecvCastlear05:
+ FlagEmblem GetCastleData("arug_cas05",1);
+ end;
+}
+
+arug_cas05,135,103,4 duplicate(LF_ar05_02) Banadis#LF_ar05_11 722
+arug_cas05,63,51,7 duplicate(LF_ar05_02) Banadis#LF_ar05_12 722
+arug_cas05,214,51,1 duplicate(LF_ar05_02) Banadis#LF_ar05_13 722
+
+// Guild Manager
+arug_cas05,328,98,3 script Steward#aru05 55,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (.@GID == 0) {
+ mes "[ Steward ]";
+ mes "I await for the master";
+ mes "whom destiny will choose";
+ mes "for me. Do you think you";
+ mes "have to courage and strength";
+ mes "to conquer this stronghold?";
+ close;
+ }
+ if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
+ mes "[ Steward ]";
+ mes "Hmpf. Your threats don't";
+ mes "scare me! Guardians, drive";
+ mes "this infidel away from here!";
+ mes "I will always be loyal to the";
+ mes "master of this stronghold,";
+ MES "the one and only^FF0000" + getguildmaster(.@GID) + "^000000.";
+ close;
+ }
+ mes "[ Steward ]";
+ mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
+ mes "How shall I serve you today?";
+ mes "Was there an aspect of this";
+ mes "stronghold's maintenance";
+ mes "you wanted to discuss?";
+ next;
+ switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "The Commercial Growth";
+ mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas05",2) + ".";
+ if (GetCastleData("arug_cas05",4) > 0) {
+ mes "Last time, you invested in";
+ mes "Commercial Growth " + GetCastleData("arug_cas05",4) + ".";
+ }
+ next;
+ mes "[ Steward ]";
+ mes "Our stronghold's";
+ mes "safeguard level is " + GetCastleData("arug_cas05",3) + ".";
+ if (GetCastleData("arug_cas05",5) > 0) {
+ mes "Last time, you invested";
+ mes "in defense " + GetCastleData("arug_cas05",5) + " times.";
+ }
+ mes " ";
+ mes "That is all, master.";
+ close;
+ case 2:
+ set .@Economy,GetCastleData("arug_cas05",2);
+ if(.@Economy < 8) set .@eco_invest,10000;
+ if(.@Economy >= 8) set .@eco_invest,20000;
+ if(.@Economy >= 16) set .@eco_invest,40000;
+ if(.@Economy >= 25) set .@eco_invest,80000;
+ if(.@Economy >= 34) set .@eco_invest,160000;
+ if(.@Economy >= 44) set .@eco_invest,320000;
+ if(.@Economy >= 54) set .@eco_invest,640000;
+ if(.@Economy >= 65) set .@eco_invest,1280000;
+ if(.@Economy >= 76) set .@eco_invest,2560000;
+ if(.@Economy >= 88) set .@eco_invest,5120000;
+ mes "[ Steward ]";
+ mes "Raising the stronghold's";
+ mes "commercial growth will";
+ mes "increase the quantity of";
+ mes "goods produced for the guild.";
+ mes "Investing in commercial growth";
+ mes "will help the guild's future.";
+ next;
+ mes "[ Steward ]";
+ mes "You can make one investment";
+ mes "each day, but if you can make";
+ mes "two investments if you pay";
+ mes "more zeny: this will speed";
+ mes "up commercial development,";
+ mes "but can be quite expensive.";
+ next;
+ if (.@Economy == 100) {
+ mes "[ Steward ]";
+ mes "However, our stronghold's";
+ mes "commerical growth level is";
+ mes "at 100%. It's not possible to";
+ mes "develop commercial growth";
+ mes "any further than that.";
+ close;
+ }
+ if (GetCastleData("arug_cas05",4) == 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
+ if (GetCastleData("arug_cas05",4) == 0) {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
+ mes "to make an investment";
+ mes "Will you invest in this";
+ mes "stronghold's commerical";
+ mes "development now?";
+ }
+ else {
+ mes "[ Steward ]";
+ mes "You must pay ^FF0000" + .@eco_invest + "^000000";
+ mes "more zeny to make a second";
+ mes "investment today. Will you";
+ mes "invest one more time?";
+ }
+ next;
+ switch(select("Invest in Commercial Growth:Cancel")) {
+ case 1:
+ if (Zeny < .@eco_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ end;
+ }
+ set zeny,zeny-.@eco_invest;
+ SetCastleData "arug_cas05",4,GetCastleData("arug_cas05",4)+1;
+ SetCastleData "arug_cas05",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014));
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. We can expect";
+ mes "to see the results of this";
+ mes "investment by tomorrow.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 3:
+ set .@Defence,GetCastleData("arug_cas05",3);
+ if(.@Defence < 8) set .@def_invest,20000;
+ if(.@Defence >= 8) set .@def_invest,40000;
+ if(.@Defence >= 16) set .@def_invest,80000;
+ if(.@Defence >= 25) set .@def_invest,160000;
+ if(.@Defence >= 34) set .@def_invest,320000;
+ if(.@Defence >= 44) set .@def_invest,640000;
+ if(.@Defence >= 54) set .@def_invest,1280000;
+ if(.@Defence >= 65) set .@def_invest,2560000;
+ if(.@Defence >= 76) set .@def_invest,5120000;
+ if(.@Defence >= 88) set .@def_invest,10240000;
+ mes "[ Steward ]";
+ mes "Investing in our stronghold's";
+ mes "defense will enhance the";
+ mes "durability of our Guardians";
+ mes "and the Emperium. We'll need";
+ mes "every advantage to protect";
+ mes "ourselves from our enemies.";
+ next;
+ mes "[ Steward ]";
+ mes "You can invest in defense";
+ mes "once per day, but if you pay";
+ mes "more zeny, you can invest";
+ mes "a maximum of two times daily.";
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas05",3) == 100) {
+ mes "The Defense Level of this";
+ mes "stronghold is 100%, and";
+ mes "cannot be increased further.";
+ close;
+ }
+ if (GetCastleData("arug_cas05",5) == 2) {
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
+ next;
+ mes "[ Steward ]";
+ if (GetCastleData("arug_cas05",5) == 0) {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses.";
+ mes "Will you invest now?";
+ }
+ else {
+ mes "We need ^FF0000" + .@def_invest + "^000000";
+ mes "zeny to invest in our";
+ mes "stronghold's defenses";
+ mes "a second time today.";
+ mes "Will you invest now?";
+ }
+ next;
+ switch(select("Invest in Defense:Cancel")) {
+ case 1:
+ if (Zeny < .@def_invest) {
+ mes "[ Steward ]";
+ mes "I'm sorry, Master, but";
+ mes "you do not have enough";
+ mes "zeny to make an investment";
+ mes "for the guild today.";
+ close;
+ }
+ set zeny,zeny-.@def_invest;
+ SetCastleData "arug_cas05",5,GetCastleData("arug_cas05",5)+1;
+ SetCastleData "arug_cas05",3,.@Defence+1;
+ mes "[ Steward ]";
+ mes "A wise use of the guild's";
+ mes "funds, Master. Increasing";
+ mes "the frequency of treasure";
+ mes "procured by the guild will";
+ mes "definitely help us all.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ close;
+ }
+ case 4:
+ if (GetCastleData("arug_cas05",9) == 1) {
+ mes "[ Steward ]";
+ mes "Do you wish to dismiss";
+ mes "the Kafra Employee that";
+ mes "we've hired for the guild?";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "Master, please reconsider!";
+ mes "I've been working very hard";
+ mes "for the success of the guild!";
+ mes "I'll try harder to serve the";
+ mes "guild members of this";
+ mes "stronghold, I promise!";
+ next;
+ switch(select("Dismiss:Cancel")) {
+ case 1:
+ mes "[ Hired Kafra Employee ]";
+ mes "Why?! What have I done";
+ mes "to deserve this? Waaah~!";
+ next;
+ cutin "kafra_01",255;
+ break;
+ case 2:
+ mes "[ Hired Kafra Employee ]";
+ mes "Thank you, Master!";
+ mes "I'll obey your every";
+ mes "command as best I can!";
+ mes "You won't regret this!";
+ close;
+ }
+ break;
+ case 2:
+ mes "[ Steward ]";
+ mes "She works very hard,";
+ mes "in my opinion. It was in";
+ mes "all of our best interests to";
+ mes "allow her to stay with us.";
+ close;
+ }
+ disablenpc "Kafra Employee#arug_cas05";
+ SetCastleData "arug_cas05",9,0;
+ mes "[ Steward ]";
+ mes "That Kafra Employee";
+ mes "has been dismissed.";
+ mes "Were really dissatisfied";
+ mes "by the quality of her service?";
+ close;
+ }
+ else {
+ mes "[ Steward ]";
+ mes "Will you hire a";
+ mes "Kafra Employee to serve";
+ mes "our stronghold? You must";
+ mes "pay ^FF000010,000 zeny^000000 to hire one.";
+ next;
+ switch(select("Hire:Cancel")) {
+ case 1:
+ if (getgdskilllv(.@GID,10001) == 0) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "you have not yet attained";
+ mes "the ^FF0000Contract with Kafra^000000";
+ mes "guild skill.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes "[ Steward ]";
+ mes "Master, we cannot hire a";
+ mes "Kafra Employee because";
+ mes "we do not have enough";
+ mes "funds to pay the contract fee.";
+ close;
+ }
+ set zeny,zeny-10000;
+ enablenpc "Kafra Employee#aru05";
+ SetCastleData "arug_cas05",9,1;
+ mes "[ Steward ]";
+ mes "Very well. We have formed";
+ mes "a contract with the Kafra";
+ mes "Head Office, and hired a";
+ mes "Kafra Employee for our";
+ mes "stronghold. Here she is~";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Hired Kafra Employee ]";
+ mes "How do you do? I've";
+ mes "been dispatched by the";
+ mes "Kafra Head Office to";
+ mes "serve your guild's needs.";
+ mes "I'll do my best to follow";
+ mes "your every command, Master.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ Steward ]";
+ mes "Our contract will expire";
+ mes "after one month, so we must";
+ mes "pay additional fees to keep";
+ mes "this Kafra Employee in";
+ mes "the service of our guild.";
+ close;
+ case 2:
+ mes "[ Steward ]";
+ mes "As you command, Master.";
+ mes "However, I suggest hiring";
+ mes "a Kafra Employee as soon";
+ mes "as possible since our guild";
+ mes "would greatly benefit from";
+ mes "the convenient Kafra services.";
+ close;
+ }
+ }
+ case 5:
+ mes "[ Steward ]";
+ mes "Do you wish to enter the";
+ mes "Guild Treasure Room?";
+ mes "Only you, the Guild Master,";
+ mes "are permitted to enter.";
+ next;
+ mes "[ Steward ]";
+ mes "Please remember to open";
+ mes "the Treasure Boxes at the";
+ mes "proper time. Otherwise, the";
+ mes "treasure may disappear if";
+ mes "something unexpected happens.";
+ next;
+ switch(select("Go to Treasure Room:Cancel")) {
+ case 1:
+ mes "[ Steward ]";
+ mes "Allow me to guide you";
+ mes "on the secret path to";
+ mes "the Treasure Room.";
+ mes "Press the secret switch";
+ mes "when you wish to return here.";
+ close2;
+ warp "arug_cas05",292,266;
+ end;
+ case 2:
+ mes "[ Steward ]";
+ mes "Items in the Treasure Room";
+ mes "are produced once each day.";
+ mes "Therefore, you must obtain";
+ mes "the treasure items everyday.";
+ mes "For the sake of the guild,";
+ mes "prioritize treasure harvesting!";
+ close;
+ }
+ }
+
+Onstop:
+ stopnpctimer;
+ end;
+
+OnStartArena:
+ set .@GID,getcharid(2);
+ // Lower castle Economy
+ set .@Economy,GetCastleData("arug_cas05",2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData "arug_cas05", 2, .@Economy;
+ // Lower Castle Defence
+ set .@Defence,GetCastleData("arug_cas05",3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData "arug_cas05", 3, .@Defence;
+ // Set new owner
+ SetCastleData "arug_cas05",1, .@GID;
+ // Clear castle's data.
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData "arug_cas05", .@i, 0;
+ // Disable Kafra
+ disablenpc "Kafra Employee#aru05";
+
+ set .msg,2;
+ if (.msg == 1) {
+ announce "Fortress [" + GetCastleName("arug_cas05") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru05_02::Onstart";
+ }
+ else if (.msg == 2) {
+ announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 5] stronghold of "+GetCastleName("arug_cas05"),bc_all;
+ mapannounce "arug_cas05","The emperium has been shattered!",bc_map,"0x00FF00";
+ if (agitcheck()) {
+ donpcevent "Manager#aru05_02::Onreset";
+ initnpctimer;
+ }
+ else {
+ donpcevent "Manager#aru05_02::Onreset";
+ stopnpctimer;
+ }
+ }
+ else if (.msg == 0) {
+ announce "Fortress [" + GetCastleName("arug_cas05") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all;
+ donpcevent "Manager#aru05_02::Onreset";
+ stopnpctimer;
+ end;
+ }
+ MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2;
+ GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
+ end;
+
+OnTimer10000:
+ donpcevent "Manager#aru05_02::Onchange";
+ mapannounce "arug_cas05","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00";
+ end;
+}
+
+// Guild Kafra
+arug_cas05,315,98,5 script Kafra Employee#aru05 117,{
+ cutin "kafra_01",2;
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ mes "[Kafra Employee]";
+ mes "Welcome, proud member";
+ mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
+ mes "The Kafra Corporation is ready";
+ mes "to assist you wherever you go!";
+ next;
+ switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
+ case 1:
+ if (basicskillcheck() && getskilllv(1) < 6) {
+ mes "[Kafra Employee]";
+ mes "I'm so sorry, but you must";
+ mes "have at least Novice Skill";
+ mes "Lv.6 to use the Storage.";
+ }
+ else {
+ openstorage;
+ }
+ break;
+ case 2:
+ mes "[Kafra Employee]";
+ mes "Please tell me your";
+ mes "Warp destination.";
+ next;
+ switch(select("Rachel -> 200 z:Cancel")) {
+ case 1:
+ if (Zeny < 200) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to pay";
+ mes "the warp fee. Would you";
+ mes "please check your funds again?";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-200;
+ warp "rachel",115,125;
+ end;
+ case 2:
+ cutin "kafra_01",255;
+ }
+ break;
+ case 3:
+ if (BaseClass != Job_Merchant) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but the Pushcart";
+ mes "rental service can only be";
+ mes "used by Merchant, Blacksmith,";
+ mes "and Alchemist class characters.";
+ }
+ else if (checkcart() == 1) {
+ mes "[Kafra Employee]";
+ mes "Hm? You've already";
+ mes "rented a Pushcart.";
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "The Pushcart rental fee";
+ mes "is 800 zeny. Would you";
+ mes "like to rent a Pushcart?";
+ next;
+ switch(select("Rent Pushcart:Cancel")) {
+ case 1:
+ if (Zeny < 800) {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but you don't";
+ mes "have enough zeny to rent";
+ mes "one of our Pushcarts.";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ set zeny,zeny-800;
+ setcart;
+ break;
+ case 2:
+ break;
+ }
+ }
+ break;
+ case 4:
+ mes "[Kafra Employee]";
+ mes "Thank you for using the";
+ mes "Kafra Service. Wherever";
+ mes "you go, Kafra will be";
+ mes "there to support you!";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+ else {
+ mes "[Kafra Employee]";
+ mes "I'm sorry, but I've been";
+ mes "exclusively contracted";
+ mes "to the members of the";
+ mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes "You'll have to ask another";
+ mes "Kafra Employee to help you...";
+ close2;
+ cutin "kafra_01",255;
+ end;
+ }
+
+OnRecvCastlear05:
+ if (GetCastleData("arug_cas05",1) == 0) {
+ monster "arug_cas05",0,0,"Evil Druid",1117,10;
+ monster "arug_cas05",0,0,"Khalitzburg",1132,4;
+ monster "arug_cas05",0,0,"Abysmal Knight",1219,3;
+ monster "arug_cas05",0,0,"Executioner",1205,1;
+ monster "arug_cas05",0,0,"Penomena",1216,10;
+ monster "arug_cas05",0,0,"Alarm",1193,18;
+ monster "arug_cas05",0,0,"Clock",1269,9;
+ monster "arug_cas05",0,0,"Raydric Archer",1276,12;
+ monster "arug_cas05",0,0,"Wanderer",1208,3;
+ monster "arug_cas05",0,0,"Alice",1275,1;
+ monster "arug_cas05",0,0,"Bloody Knight",1268,2;
+ monster "arug_cas05",0,0,"Dark Lord",1272,2;
+ monster "arug_cas05",0,0,"Tower Keeper",1270,4;
+ disablenpc "Kafra Employee#aru05";
+ }
+ if (GetCastleData("arug_cas05",9) < 1) {
+ disablenpc "Kafra Employee#aru05";
+ }
+ end;
+}
+
+arug_cas05,299,277,0 script #aru05_switch 111,{
+ mes " ";
+ mes "^3355FFWill you pull";
+ mes "this small lever?^000000";
+ next;
+ switch(select("Pull Lever:Cancel")) {
+ case 1:
+ warp "arug_cas05",321,57;
+ end;
+ case 2:
+ close;
+ }
+}
+
+aru_gld,289,103,6 script Banadis#flag_ar05_1::ar05_Flag 722,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ if (getcharid(2) == .@GID) {
+ mes "[ Ringing Voice ]";
+ mes "Courageous one,";
+ mes "do you wish to return";
+ mes "to your stronghold?";
+ next;
+ switch(select("Return to the Stronghold:Cancel")) {
+ case 1:
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (getcharid(2) == .@GID) {
+ warp "arug_cas05",121,318;
+ end;
+ }
+ close;
+ case 2:
+ close;
+ }
+ }
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastlear05:
+ FlagEmblem GetCastleData("arug_cas05",1);
+ end;
+}
+
+aru_gld,289,112,6 duplicate(ar05_Flag) Banadis#flag_ar05_2 722
+
+aru_gld,289,103,6 script Banadis#flag_ar05_3::ar05_Flag2 722,{
+ set .@GID, GetCastleData("arug_cas05",1);
+ if (.@GID == 0) {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz declares that";
+ mes "one has yet to claim lordship";
+ mes "over this stronghold. The one";
+ mes "that breaks the Emperium will";
+ mes "be recognized as its new owner.";
+ close;
+ }
+ else {
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "The Holy Kingdom of";
+ mes "Arunafeltz decrees that";
+ mes "this stronghold is owned";
+ mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ next;
+ mes "[ Arunafeltz Royal Edict ]";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
+ mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
+ mes "Any that object must claim this";
+ mes "stronghold through strength of";
+ mes "steel and magic during the";
+ mes "appointed Guild Siege times.";
+ close;
+ }
+
+OnRecvCastlear05:
+ FlagEmblem GetCastleData("arug_cas05",1);
+ end;
+}
+
+aru_gld,289,112,6 duplicate(ar05_Flag2) Banadis#flag_ar05_4 722