From 16766b4f0911470f7e7568a952364e772ba22da1 Mon Sep 17 00:00:00 2001 From: euphyy Date: Fri, 3 Aug 2012 21:28:27 +0000 Subject: * You may notice that your /guild2/ folder shrunk considerably - you're welcome. x.x * You may also notice that your /guild2/ folder no longer functions. If that's the case... blame Maki (you can find him on the forums, IRC, TS, TSR, etc...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16571 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/guild2/agit_main_se.txt | 1796 +++++++++++++++++++++++++ npc/guild2/arug_cas01.txt | 2935 +---------------------------------------- npc/guild2/arug_cas02.txt | 2921 +---------------------------------------- npc/guild2/arug_cas03.txt | 2940 +---------------------------------------- npc/guild2/arug_cas04.txt | 2975 +---------------------------------------- npc/guild2/arug_cas05.txt | 2977 +----------------------------------------- npc/guild2/guild_dungeon.txt | 172 --- npc/guild2/schg_cas01.txt | 2942 +---------------------------------------- npc/guild2/schg_cas02.txt | 2877 +--------------------------------------- npc/guild2/schg_cas03.txt | 2935 +---------------------------------------- npc/guild2/schg_cas04.txt | 2939 +---------------------------------------- npc/guild2/schg_cas05.txt | 2939 +---------------------------------------- 12 files changed, 2198 insertions(+), 29150 deletions(-) create mode 100644 npc/guild2/agit_main_se.txt delete mode 100644 npc/guild2/guild_dungeon.txt (limited to 'npc/guild2') diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt new file mode 100644 index 000000000..c8ae4e252 --- /dev/null +++ b/npc/guild2/agit_main_se.txt @@ -0,0 +1,1796 @@ +//===== rAthena Script ======================================= +//= War of Emperium SE - Template File +//===== By: ================================================== +//= Euphy +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= rAthena SVN +//===== Description: ========================================= +//= Like agit_main, this file is required +//= for SE castles to function. +//===== Additional Comments: ================================= +//= 0.x Previous authors: L0ne_W0lf, Zephyrus, Brian. +//= 1.0 If anything breaks, blame Maki. [Euphy] +//============================================================ + +// Core, triggers all other events +- script Manager#template -1,{ +OnAgitInit2: +OnRecvCastle2: + if (strnpcinfo(2) == "template") end; + if (!getcastledata(strnpcinfo(2),1)) { + donpcevent strnpcinfo(0)+"::OnStart"; + // Monster spawns are identical for all castles. + monster strnpcinfo(2),0,0,"Evil Druid",1117,10; + monster strnpcinfo(2),0,0,"Khalitzburg",1132,4; + monster strnpcinfo(2),0,0,"Abysmal Knight",1219,3; + monster strnpcinfo(2),0,0,"Executioner",1205,1; + monster strnpcinfo(2),0,0,"Penomena",1216,10; + monster strnpcinfo(2),0,0,"Alarm",1193,18; + monster strnpcinfo(2),0,0,"Clock",1269,9; + monster strnpcinfo(2),0,0,"Raydric Archer",1276,12; + monster strnpcinfo(2),0,0,"Wanderer",1208,3; + monster strnpcinfo(2),0,0,"Alice",1275,1; + monster strnpcinfo(2),0,0,"Bloody Knight",1268,2; + monster strnpcinfo(2),0,0,"Dark Lord",1272,2; + monster strnpcinfo(2),0,0,"Tower Keeper",1270,4; + } + if (getcastledata(strnpcinfo(2),9) < 1) + disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + end; + +OnAgitStart2: + if (strnpcinfo(2) == "template") end; + if (agitcheck2()) { + maprespawnguildid strnpcinfo(2),getcastledata(strnpcinfo(2),1),2; + gvgon strnpcinfo(2); + donpcevent strnpcinfo(0)+"::OnStart"; + } + else for(set .@i,0; .@i<4; set .@i,.@i+1) + donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnDisable"; + end; + +OnAgitEnd2: + if (strnpcinfo(2) == "template") end; + gvgoff strnpcinfo(2); + if (getcastledata(strnpcinfo(2),1)) { + set .@str$,substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + killmonster strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena"; + donpcevent strnpcinfo(0)+"::OnReset"; + donpcevent "Steward#"+.@str$+"::OnStop"; + } + end; + +OnStart: + // $agit_ar0x[] - $agit_sc0x[] + // 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(strnpcinfo(2),1)) { + setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,0,0,0,0; + donpcevent "df1#"+strnpcinfo(2)+"::OnEnable"; + donpcevent "df2#"+strnpcinfo(2)+"::OnEnable"; + for(set .@i,0; .@i<4; set .@i,.@i+1) + donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; + } +OnEmpSpawn: + if (compare(strnpcinfo(2),"arug")) { + if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219; + else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],89,256; + else setarray .@i[0],141,293; // Castles 3,4,5 are identical. + } + else { + if (strnpcinfo(2) == "schg_cas02") setarray .@i[0],162,193; + else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202; + else setarray .@i[0],120,272; // Castles 1,4,5 are identical. + } + monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"::OnStartArena"; + end; + +OnReset: + set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + donpcevent "df1#"+strnpcinfo(2)+"::OnEnable"; + donpcevent "df2#"+strnpcinfo(2)+"::OnEnable"; + donpcevent "gard1#"+strnpcinfo(2)+"::OnReset"; + donpcevent "gard2#"+strnpcinfo(2)+"::OnReset"; + donpcevent "1st Guardian Stone#"+.@str$+"::OnDisable"; + donpcevent "2nd Guardian Stone#"+.@str$+"::OnDisable"; + for(set .@i,1; .@i<4; set .@i,.@i+1) + donpcevent "Control Device0"+.@i+"#"+.@str$+"::OnDisable"; + for(set .@i,0; .@i<4; set .@i,.@i+1) + donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; + if (agitcheck2()) + setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,1,1,1,0; + end; + +OnChange: + set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + setarray getd("$agit_"+.@str$+"[0]"),2,2,1,1,2,0; + donpcevent strnpcinfo(0)+"::OnEmpSpawn"; + donpcevent "Control Device03#"+.@str$+"::OnEnable"; + donpcevent "1st Guardian Stone#"+.@str$+"::OnEnable"; + donpcevent "2nd Guardian Stone#"+.@str$+"::OnEnable"; + end; + +OnClock0001: + // Spawn Treasure Chests based on castle economy. + if (strnpcinfo(2) == "template") end; + if (!getcastledata(strnpcinfo(2),1)) end; + killmonster strnpcinfo(2),strnpcinfo(0)+"::OnTreasureDied"; + if (getcastledata(strnpcinfo(2),4)) { + set .@Economy,getcastledata(strnpcinfo(2),2); + setcastledata strnpcinfo(2),2,.@Economy+getcastledata(strnpcinfo(2),4)+(rand(2) && getgdskilllv(getcastledata(strnpcinfo(2),1),10014)); + if (getcastledata(strnpcinfo(2),2) > 100) setcastledata strnpcinfo(2),2,100; + setcastledata strnpcinfo(2),4,0; + } + if (getcastledata(strnpcinfo(2),5)) { + set .@Defence,getcastledata(strnpcinfo(2),3); + setcastledata strnpcinfo(2),3,.@Defence+getcastledata(strnpcinfo(2),5); + if (getcastledata(strnpcinfo(2),3) > 100) setcastledata strnpcinfo(2),3,100; + setcastledata strnpcinfo(2),5,0; + } + set .@Treasure,getcastledata(strnpcinfo(2),2)/5+4; + if (!.@Treasure) end; + freeloop(1); + if (compare(strnpcinfo(2),"arug")) { + if (strnpcinfo(2) == "arug_cas01") { + set .@treasurebox,1943; + setarray .@treasurex[0],251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258; + setarray .@treasurey[0],369,369,369,369,368,368,368,368,367,367,367,367,366,366,366,366,365,365,365,365,364,364,364,364; + } + else if (strnpcinfo(2) == "arug_cas02") { + set .@treasurebox,1944; + setarray .@treasurex[0],382,383,384,385,386,387,384,385,386,387,388,389,382,383,384,385,386,387,384,385,386,387,388,389; + setarray .@treasurey[0],231,231,231,231,231,231,230,230,230,230,230,230,225,225,225,225,225,225,224,224,224,224,224,224; + } + else { // Castles 3,4,5 are identical, except 4's treasure. + set .@treasurebox,(strnpcinfo(2) == "arug_cas04")?1946:1945; + setarray .@treasurex[0],291,292,293,294,295,296,293,294,295,296,297,298,291,292,293,294,295,296,293,294,295,296,297,298; + setarray .@treasurey[0],276,276,276,276,276,276,274,274,274,274,274,274,272,272,272,272,272,272,269,269,269,269,269,269; + } + } + else { + if (strnpcinfo(2) == "schg_cas02") { + set .@treasurebox,1939; + setarray .@treasurex[0],249,250,251,252,253,246,247,248,249,250,250,251,252,253,246,247,248,249,250,249,250,251,252,253; + setarray .@treasurey[0],378,378,378,378,378,376,376,376,376,376,374,374,374,374,372,372,372,372,372,370,370,370,370,370; + } + else if (strnpcinfo(2) == "schg_cas03") { + set .@treasurebox,1940; + setarray .@treasurex[0],189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194; + setarray .@treasurey[0], 21, 21, 21, 21, 21, 21, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 17, 15, 15, 15, 15, 15, 15; + } + else { // Castles 1,4,5 are identical, except treasures. + if (strnpcinfo(2) == "schg_cas01") set .@treasurebox,1938; + else if (strnpcinfo(2) == "schg_cas04") set .@treasurebox,1941; + else set .@treasurebox,1942; + setarray .@treasurex[0],388,388,388,387,386,385,384,384,384,384,384,384,385,386,387,388,389,390,390,390,389,388,387,386; + setarray .@treasurey[0],388,389,390,390,390,390,389,388,387,386,385,384,384,384,384,384,384,384,385,386,386,386,386,386; + } + } + for(set .@i,0; .@i<4; set .@i,.@i+1) + monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied"; + for(set .@i,4; .@i<24; set .@i,.@i+1) { + if (.@Treasure < .@i+1) break; + monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied"; + } + freeloop(0); + end; + +OnTreasureDied: + end; +} + +// Guild Manager +- script Steward#template -1,{ + set .@GID, getcastledata(strnpcinfo(4),1); + if (!.@GID) { + 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(strnpcinfo(4),2)+"."; + if (getcastledata(strnpcinfo(4),4) > 0) { + mes "Last time, you invested in"; + mes "Commercial Growth "+getcastledata(strnpcinfo(4),4)+"."; + } + next; + mes "[ Steward ]"; + mes "Our stronghold's"; + mes "safeguard level is "+getcastledata(strnpcinfo(4),3)+"."; + if (getcastledata(strnpcinfo(4),5) > 0) { + mes "Last time, you invested"; + mes "in defense "+getcastledata(strnpcinfo(4),5)+" times."; + } + mes " "; + mes "That is all, master."; + close; + case 2: + set .@Economy,getcastledata(strnpcinfo(4),2); + setarray .@cost[0],5000,10000,20000,35000,55000,80000,110000,145000,185000,230000,280000,335000,395000,460000,530000,605000,685000,770000,860000,955000; + set .@j,0; + for(set .@i,6; .@i<101; set .@i,.@i+5) { + if (.@Economy < .@i) { + set .@eco_invest,.@cost[.@j]; + break; + } + set .@j, .@j+1; + } + // Quadruple the cost of investing if you've already invested once. + if (getcastledata(strnpcinfo(4),4)) set .@eco_invest,.@eco_invest*4; + 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(strnpcinfo(4),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(strnpcinfo(4),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 (getcastledata(strnpcinfo(4),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 (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."; + close; + } + set Zeny, Zeny-.@eco_invest; + setcastledata strnpcinfo(4),4,getcastledata(strnpcinfo(4),4)+1; + 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(strnpcinfo(4),3); + setarray .@cost[0],10000,20000,40000,70000,110000,160000,220000,290000,370000,460000,560000,670000,790000,920000,1060000,1210000,1370000,1540000,1720000,1910000; + set .@j,0; + for(set .@i,6; .@i<101; set .@i,.@i+5) { + if (.@Defence < .@i) { + set .@def_invest,.@cost[.@j]; + break; + } + set .@j, .@j+1; + } + // Quadruple the cost of investing if you've already invested once. + if (getcastledata(strnpcinfo(4),5)) set .@def_invest,.@def_invest*4; + 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(strnpcinfo(4),3) == 100) { + mes "The Defense Level of this"; + mes "stronghold is 100%, and"; + mes "cannot be increased further."; + close; + } + if (getcastledata(strnpcinfo(4),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; + } + if (getcastledata(strnpcinfo(4),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 (getcastledata(strnpcinfo(4),5) >= 2) { + mes "[ Steward ]"; + 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; + } + 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 strnpcinfo(4),5,getcastledata(strnpcinfo(4),5)+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(strnpcinfo(4),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#"+strnpcinfo(2); + setcastledata strnpcinfo(4),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#"+strnpcinfo(2); + setcastledata strnpcinfo(4),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; + if (compare(strnpcinfo(4),"arug")) { + if (strnpcinfo(4) == "arug_cas01") setarray .@i[0],250,363; + else if (strnpcinfo(4) == "arug_cas02") setarray .@i[0],382,227; + else setarray .@i[0],292,266; // Castles 3,4,5 are identical. + } + else { + if (strnpcinfo(4) == "schg_cas02") setarray .@i[0],249,373; + else if (strnpcinfo(4) == "schg_cas03") setarray .@i[0],190,16; + else setarray .@i[0],381,381; // Castles 1,4,5 are identical. + } + warp strnpcinfo(4),.@i[0],.@i[1]; + 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); + set .@region$, (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll"; + // Lower castle Economy + set .@Economy,getcastledata(strnpcinfo(4),2)-5; + if (.@Economy < 0) set .@Economy, 0; + setcastledata strnpcinfo(4),2,.@Economy; + // Lower Castle Defence + set .@Defence,getcastledata(strnpcinfo(4),3)-5; + if (.@Defence < 0) set .@Defence, 0; + setcastledata strnpcinfo(4),3,.@Defence; + // Set new owner + setcastledata strnpcinfo(4),1,.@GID; + // Clear castle's data. + for(set .@i,4; .@i<10; set .@i,.@i+1) + setcastledata strnpcinfo(4),.@i,0; + // Disable Kafra + disablenpc "Kafra Employee#"+strnpcinfo(2); + + announce "The ["+getguildname(.@GID)+"] conquered the ["+.@region$+" "+charat(strnpcinfo(2),3)+"] stronghold of "+getcastlename(strnpcinfo(4)),bc_all|bc_woe; + mapannounce strnpcinfo(4),"The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; + donpcevent "Manager#"+strnpcinfo(4)+"::OnReset"; + if (agitcheck2()) initnpctimer; + else stopnpctimer; + maprespawnguildid strnpcinfo(4),getcastledata(strnpcinfo(4),1),2; + donpcevent "Manager#"+strnpcinfo(4)+"::OnRecvCastle2"; + donpcevent "::OnRecvCastle"+strnpcinfo(2); + end; + +OnTimer10000: + donpcevent "Manager#"+strnpcinfo(4)+"::OnChange"; + mapannounce strnpcinfo(4),"Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; + end; +} + +// Castle Guardians +- script Guardian#template -1,{ + set .@GID, getcastledata(strnpcinfo(4),1); + set .@n$, "["+strnpcinfo(1)+"]"; + if (!.@GID) { + mes .@n$; + 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 .@n$; + 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 (!agitcheck2()) { + mes .@n$; + mes "I am "+strnpcinfo(1)+", guardian of"; + mes "this stronghold. For now,"; + mes "all is quiet in this place."; + next; + switch(select("Converse:Cancel")) { + case 1: + mes .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + 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 .@n$; + mes "You have no questions"; + mes "to ask of me? Well, I'm"; + mes "here to serve your needs."; + close; + } + case 2: + mes .@n$; + mes "I'm always here, so"; + mes "feel free to request my"; + mes "assistance whenever"; + mes "the need arises."; + close; + } + } + else { + mes .@n$; + mes "Greetings, "+strcharinfo(0)+"."; + mes "What are your orders?"; + next; + switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { + case 1: + if (!getd("$agit_"+strnpcinfo(2)+"[5]")) { + if (getgdskilllv(.@GID,10002) == 0) { + mes .@n$; + 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 .@n$; + 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."; + setd "$agit_"+strnpcinfo(2)+"[5]",1; + if (!getd("$agit_"+strnpcinfo(2)+"[0]")) + donpcevent "gard1#"+strnpcinfo(4)+"::OnEnable"; + if (!getd("$agit_"+strnpcinfo(2)+"[1]")) + donpcevent "gard2#"+strnpcinfo(4)+"::OnEnable"; + close; + } + } + else { + mes .@n$; + mes "You've already commanded"; + mes "me to summon a Guardian"; + mes "to defend the stronghold."; + close; + } + case 2: + mes .@n$; + mes "Our defense status is..."; + setarray .@status$[0],"^4D4DFFOperational","^FF0000Destroyed","^008000Repairing"; + mes "1st Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[0]")]+"^000000"; + mes "2nd Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[1]")]+"^000000"; + mes "1st Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[2]")]+"^000000"; + mes "2nd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[3]")]+"^000000"; + mes "3rd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[4]")]+"^000000"; + close; + case 3: + mes .@n$; + mes "I'll be standing by,"; + mes "awaiting your orders."; + close; + } + } + } + } + else { + mes .@n$; + mes "Who are you? Scoundrel!"; + mes "Leave this stronghold now!"; + close; + } + +OnInit: + setarray getd("$agit_"+strnpcinfo(2)+"[0]"),0,0,0,0,0,0; + end; +} + +// Guild Kafras +- script Kafra#template -1,{ + cutin "kafra_01",2; + set .@GID, getcastledata(strnpcinfo(4),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("NV_BASIC") < 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; + } + 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; + } +} + +// Guardian Stones (2) +- script Guardian Stone#template -1,{ + set .@GID, getcastledata(strnpcinfo(4),1); + set .@num, atoi(charat(strnpcinfo(1),0)); + set .@var$,"$agit_"+strnpcinfo(2); + 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"; + if(select("No:Continue") == 1) { + mes "^3355FFWork canceled.^000000"; + close; + } + 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; + setarray .@stone$[0],"Elunium","Oridecon","Stones"; + set .@i, select("Elunium:Oridecon:Stone")-1; + if (.@i == 2) set .@nice,.@nice+10; + mes "^3355FF"+.@stone$[.@i]+" has been"; + mes "placed in the center.^000000"; + next; + set .@i, select("Elunium:Oridecon:Stone")-1; + if (.@i == 0) set .@nice,.@nice+10; + mes "^3355FFYou have lined the"; + mes "outside of the center"; + mes "with some "+.@stone$[.@i]+".^000000"; + next; + set .@i, select("Elunium:Oridecon:Stone")-1; + if (.@i == 1) set .@nice,.@nice+10; + mes "^3355FFYou covered the"; + mes "rest of the materials"; + mes "with some "+.@stone$[.@i]+".^000000"; + next; + 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; + setarray .@effect[0],56,54,225; + setarray .@color$[0],"Red","Yellow","Blue"; + while(1) { + if (.@roof0 > 7) break; + set .@i, rand(3); + specialeffect .@effect[.@i]; + mes "^3355FFThe Gemstones must"; + mes "be arranged in the correct"; + mes "order according to their"; + mes "magic properties and power.^000000"; + next; + set .@j, select("Red Gemstone:Yellow Gemstone:Blue Gemstone")-1; + mes "^3355FFYou placed the "+.@color$[.@j]+" Gemstone.^000000"; + if (.@i == .@j) { + mes "^3355FFHowever, the Guardian Stone"; + mes "Repair System failed because"; + mes "of a magic power conflict.^000000"; + close; + } + set .@nice,.@nice+10; + set .@roof0,.@roof0+1; + specialeffect EF_STEAL; + next; + } + if (.@nice > 90) { + if (!getd(.@var$+"["+(.@num-1)+"]")) { + mes "^3355FFThe Guardian Stone"; + mes "Repair System has"; + mes "already completed.^000000"; + close; + } + else { + if (!agitcheck2()) { + 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 "df"+.@num+"#"+strnpcinfo(4)+"::OnEnable"; + specialeffect EF_ICECRASH; + disablenpc strnpcinfo(0); + setd .@var$+"["+(.@num-1)+"]",0; + set .@df_all,getd(.@var$+"[0]")+getd(.@var$+"[1]"); + if (!.@df_all) { + mapannounce strnpcinfo(4),"Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; + donpcevent "RL0#"+strnpcinfo(4)+"::OnEnable"; + } + else mapannounce strnpcinfo(4),"The "+strnpcinfo(1)+" has been repaired successfully.",bc_map,"0x00ff00"; + if (getd(.@var$+"[5]") == 1) + donpcevent "gard"+.@num+"#"+strnpcinfo(4)+"::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: +OnDisable: + disablenpc strnpcinfo(0); + end; + +OnEnable: + enablenpc strnpcinfo(0); + specialeffect EF_MAPPILLAR2; + end; +} + +// Control Devices (3) +- script Control#template -1,{ + set .@GID, getcastledata(strnpcinfo(4),1); + set .@num, atoi(charat(strnpcinfo(1),15)); + set .@var$,"$agit_"+strnpcinfo(2); + if (getcharid(2) == .@GID) { + if (strcharinfo(0) == getguildmaster(.@GID)) { + if (getd(.@var$+"["+(.@num+1)+"]") == 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 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 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 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 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 (!agitcheck2()) { + 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 "RL"+.@num+"#"+strnpcinfo(4)+"::OnEnable"; + disablenpc strnpcinfo(0); + if (.@num == 1) set .@str$,"1st"; + else if (.@num == 2) set .@str$,"2nd"; + else if (.@num == 3) set .@str$,"3rd"; + mapannounce strnpcinfo(4),"The "+.@str$+" Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; + if (.@num == 1) setd .@var$+"[2]",0; + else { + setarray getd(.@var$+"["+.@num+"]"),2,0; + donpcevent "Control Device0"+(.@num-1)+"#"+strnpcinfo(2)+"::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: +OnDisable: + disablenpc strnpcinfo(0); + end; + +OnEnable: + enablenpc strnpcinfo(0); + end; +} + +// Guardian Summoners (2) +- script gard#template -1,{ +OnEnable: + // .@x[i],.@y[i]: Normal coordinates, #0-21. + // .@w[x],.@w[y]: Special coordinates if 'defence' is under 11. + if (compare(strnpcinfo(2),"arug")) { + if (strnpcinfo(2) == "arug_cas01") { + setarray .@w[0],195,250,292,188; + setarray .x[0],233,252,232,201,224,196,269,252,201,224,222, 294,256,240,246,235,235,246,240,256,254,242; + setarray .y[0], 83, 81,108,130,168,137, 89, 81,130,168,129, 210,203,133, 92,132,132, 92,133,203, 95,151; + } + else if (strnpcinfo(2) == "arug_cas02") { + setarray .@w[0],20,169,268,169; + setarray .x[0],104,67,67,113,122,67, 90, 91,122, 20,67, 175,204,211,209,161,186,183,150,161,209,211; + setarray .y[0], 32,36,85, 87,112,60,167,119,112,169,85, 31, 32, 63, 88, 91,170,121,110, 91, 88, 63; + } + else { // Castles 3,4,5 are identical. + setarray .@w[0],66,157,211,159; + setarray .x[0],130,128,128,128,110,91,65, 65,110,128,128, 156,172,154,156,155,187,212,211,155,156,172; + setarray .y[0], 60, 77, 90,100, 96,53,71,103, 96,100, 77, 101, 95, 90, 77, 60, 54, 67,105, 60, 77, 95; + } + } + else { + if (strnpcinfo(2) == "schg_cas02") { + setarray .@w[0],337,95,307,222; + setarray .x[0],326,337,334,296,285,236,285,296,334,337,334, 359,300,337,317,307,300,337,317,307,359,236; + setarray .y[0], 83, 95,119, 82, 40, 41, 40, 82,119, 95,119, 85,119,154,183,222,119,154,183,222, 85, 41; + } + else if (strnpcinfo(2) == "schg_cas03") { + setarray .@w[0],306,325,364,305; + setarray .x[0],323,273,288,306,323,323,273,288,306,273,273, 338,364,365,317,338,338,364,365,317,364,329; + setarray .y[0],308,309,306,326,308,308,309,306,325,309,309, 309,305,261,318,310,309,305,261,318,305,314; + } + else { // Castles 1,4,5 are identical. + setarray .@w[0],108,32,128,42,187,15; // Contains an extra pair, for whatever reason. + setarray .x[0],111,109,65,110,88,64,47,109,111,112,120, 130,129,151,187,128,152,187,128,130,130,151; + setarray .y[0], 18, 44,22, 40,20,40,43, 48, 18, 32, 37, 22, 47, 18, 15, 42, 43, 15, 42, 22, 28, 18; + } + } + if (charat(strnpcinfo(1),4) == "2") set .@z,11; + freeloop(1); + set .@defence,getcastledata(strnpcinfo(2),3); + callsub OnSummon,.@z; + if (.@defence > 70) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),5; + else if (.@defence > 50) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),4; + else if (.@defence > 30) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),3; + else if (.@defence > 10) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),2; + if (.@w[4] && .@z) + guardian strnpcinfo(2),.@w[4],.@w[5],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied"; + else if (.@defence < 11) { + set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),2; + set .@i,(.@z)?2:0; + guardian strnpcinfo(2),.@w[.@i],.@w[.@i+1],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied"; + } + else for(set .@i,1; .@i 100) SetCastleData "arug_cas01",2,100; - setcastledata "arug_cas01",4,0; - } - if (GetCastleData("arug_cas01",5)) { - set .@Defence,GetCastleData("arug_cas01",3); - SetCastleData "arug_cas01",3,.@Defence + GetCastleData("arug_cas01",5); - if (GetCastleData("arug_cas01",3) > 100) SetCastleData "arug_cas01",3,100; - setcastledata "arug_cas01",5,0; - } - - set .@Treasure,GetCastleData("arug_cas01",2)/5+4; - if (.@Treasure) { - monster "arug_cas01",251,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied"; - monster "arug_cas01",252,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied"; - monster "arug_cas01",253,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied"; - 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 (agitcheck2() == 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 Soldier",1899,"#aru01_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1; - guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1; - guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2; - guardian "arug_cas01",201,130,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1; - guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2; - guardian "arug_cas01",201,130,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //3; - guardian "arug_cas01",224,168,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "arug_cas01",195,250,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",196,137,"Guardian Soldier",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 Soldier",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 Soldier",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 Soldier",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 Soldier",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 Soldier",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 Soldier",1899,"#aru01_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12; - guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12; - guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13; - guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12; - guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13; - guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //14; - guardian "arug_cas01",235,132,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "arug_cas01",292,188,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",235,132,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "arug_cas01",254,95,"Guardian Soldier",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 Soldier",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::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "arug_cas01","#aru01_df01::OnGuardianStoneDied"; - 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 has been 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 EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#aru01"; - end; -} - -arug_cas01,2,1,0 script #aru01_RL00 -1,{ -OnEnable: - setwall "arug_cas01",238,74,8,6,0,"aru01_RL00"; - 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: - delwall "aru01_RL00"; - killmonster "arug_cas01","#aru01_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -arug_cas01,2,2,0 script #aru01_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas01",239,53,8,6,1,"aru01_RL01"; - 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"; - delwall "aru01_RL01"; - } - end; - -OnDisable: - delwall "aru01_RL01"; - killmonster "arug_cas01","#aru01_RL01::OnBarrierDestroyed"; - end; -} - -arug_cas01,2,3,0 script #aru01_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas01",107,124,6,6,1,"aru01_RL02"; - 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"; - delwall "aru01_RL02"; - } - end; - -OnDisable: - delwall "aru01_RL02"; - killmonster "arug_cas01","#aru01_RL02::OnBarrierDestroyed"; - end; -} - -arug_cas01,2,4,0 script #aru01_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "arug_cas01",84,171,8,6,1,"aru01_RL03"; - 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"; - delwall "aru01_RL03"; - } - end; - -OnDisable: - delwall "aru01_RL03"; - 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 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 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 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 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 (agitcheck2() == 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 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 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 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 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 (agitcheck2() == 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 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 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 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 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 (agitcheck2() == 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::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 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,{ - +- duplicate(Manager#template) Manager#arug_cas01 -1 +- duplicate(gard#template) gard1#arug_cas01 -1 +- duplicate(gard#template) gard2#arug_cas01 -1 +- duplicate(df#template) df1#arug_cas01 -1 +- duplicate(df#template) df2#arug_cas01 -1 +- duplicate(RL#template) RL0#arug_cas01 -1 +- duplicate(RL#template) RL1#arug_cas01 -1 +- duplicate(RL#template) RL2#arug_cas01 -1 +- duplicate(RL#template) RL3#arug_cas01 -1 + +arug_cas01,92,380,3 duplicate(Steward#template) Steward#ar01 55 +arug_cas01,112,193,1 duplicate(Guardian#template) Brace#ar01 868 +arug_cas01,31,362,3 duplicate(Kafra#template) Kafra Employee#ar01 117 +arug_cas01,211,234,0 duplicate(Guardian Stone#template) 1st Guardian Stone#ar01 844 +arug_cas01,308,189,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#ar01 844 +arug_cas01,247,52,0 duplicate(Control#template) Control Device01#ar01 111 +arug_cas01,118,131,0 duplicate(Control#template) Control Device02#ar01 111 +arug_cas01,82,172,0 duplicate(Control#template) Control Device03#ar01 111 +arug_cas01,259,371,0 duplicate(Switch#template) #aru01_switch 111 +arug_cas01,157,345,3 duplicate(Sunflower#template) Mysterious Sunflower#06 977 + +arug_cas01,74,232,0 script LF-01#arug_cas01 111,{ callfunc "LinkFlag","First Gate House",158,237,"Second Gate House",297,248; } +arug_cas01,77,232,0 script LF-02#arug_cas01 111,{ callfunc "LinkFlag","Defense Area 1-1",197,144,"Defense Area 1-2",245,103; } +arug_cas01,80,232,0 script LF-03#arug_cas01 111,{ callfunc "LinkFlag","Defense Area 2-1",256,35,"Defense Area 2-2",186,26; } +arug_cas01,83,232,0 script LF-04#arug_cas01 111,{ callfunc "LinkFlag","Defense Area 2-3",146,65,"Defense Area 2-4",176,111; } +arug_cas01,86,232,0 script LF-05#arug_cas01 111,{ callfunc "LinkFlag","Defense Area 3-1",94,126,"Defense Area 3-2",126,126; } +arug_cas01,89,232,0 script LF-06#arug_cas01 111,{ callfunc "LinkFlag","Defense Area 3-3",68,171,"Defense Area 3-4",105,182; } +arug_cas01,92,232,0 script LF-07#arug_cas01 111,{ callfunc "LinkFlag","Gate House Fork",233,130; } +arug_cas01,95,232,0 script LF-08#arug_cas01 111,{ callfunc "LinkFlag","Area 1-1",197,144,"Area 2-1",256,35,"Area 3-1",146,65; } +arug_cas01,98,232,0 script LF-09#arug_cas01 111,{ callfunc "LinkFlag","Area 1-2",245,103,"Area 2-2",186,26,"Area 3-3",68,171; } +arug_cas01,101,232,0 script LF-10#arug_cas01 111,{ callfunc "LinkFlag","Convenience Facility",121,357; } +arug_cas01,72,176,0 script Mardol#LF_ar01_1::LF_ar01_1 111,{ callfunc "LinkFlag","Emperium Center",67,193; } +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; - } - } + callfunc "LinkFlag","Emperium Center",67,193; end; - OnInterIfInitOnce: 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 @@ -2259,672 +64,14 @@ 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 < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas01",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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 (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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "arug_cas01",4,GetCastleData("arug_cas01",4)+1; - 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 < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas01",5)) { - set .@def_invest,.@def_invest*4; - } - 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; - } - 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 (GetCastleData("arug_cas01",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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; - 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#aru01"; - 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|bc_woe; - donpcevent "Manager#aru01_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 1] stronghold of " + GetCastleName("arug_cas01"),bc_all|bc_woe; - mapannounce "arug_cas01","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - 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|bc_woe; - donpcevent "Manager#aru01_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "arug_cas01",GetCastleData("arug_cas01",1),2; - donpcevent "::OnRecvCastleAr01"; - end; - -OnTimer10000: - donpcevent "Manager#aru01_02::Onchange"; - mapannounce "arug_cas01","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - 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("NV_BASIC") < 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; - } - + callfunc "ReturnFlag","arug_cas01",1; + end; OnInterIfInitOnce: 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 +aru_gld,182,255,5 duplicate(Ar01_Flag) Mardol#flag_Ar01_4 722 \ No newline at end of file diff --git a/npc/guild2/arug_cas02.txt b/npc/guild2/arug_cas02.txt index 4bef4eab0..f37e7a7cb 100644 --- a/npc/guild2/arug_cas02.txt +++ b/npc/guild2/arug_cas02.txt @@ -1,2186 +1,45 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Cyr //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.3 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Arunafeltz Castle 2 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.5 Fixed error with control devices. [L0ne_W0lf] -//= 1.6 Two small fixes. (aegis carry-overs) [L0ne_W0lf] -//= 1.7 Another two fixes [Yommy] -//= 1.8 Corrected copy/paste error. [L0ne_W0lf] -//= 1.9 Implemented new Wall System. [Zephyrus] -//= 2.0 Replaced effect numerics with constants. [L0ne_W0lf] -//= 2.1 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.2 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.3 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -arug_cas02,1,1,0 script Manager#aru02_02 111,{ - end; - -OnAgitInit2: -OnRecvCastleAr02: - if (GetCastleData("arug_cas02",1) == 0) { - donpcevent "Manager#aru02_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - 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; - -OnAgitEnd2: - GvgOff "arug_cas02"; - if (GetCastleData("arug_cas02",1)) { - KillMonster "arug_cas02","Steward#aru02::OnStartArena"; - donpcevent "Manager#aru02_02::Onreset"; - donpcevent "Steward#aru02::Onstop"; - } - 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 (agitcheck2()) { - 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: - if (!GetCastleData("arug_cas02",1)) end; - killmonster "arug_cas02","Manager#aru02_02::OnTreasureDied"; - - if (GetCastleData("arug_cas02",4)) { - set .@Economy,GetCastleData("arug_cas02",2); - SetCastleData "arug_cas02",2,.@Economy + GetCastleData("arug_cas02",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("arug_cas02",2) > 100) SetCastleData "arug_cas02",2,100; - setcastledata "arug_cas02",4,0; - } - if (GetCastleData("arug_cas02",5)) { - set .@Defence,GetCastleData("arug_cas02",3); - SetCastleData "arug_cas02",3,.@Defence + GetCastleData("arug_cas02",5); - if (GetCastleData("arug_cas02",3) > 100) SetCastleData "arug_cas02",3,100; - setcastledata "arug_cas02",5,0; - } - - set .@Treasure,GetCastleData("arug_cas02",2)/5+4; - if (.@Treasure) { - monster "arug_cas02",382,231,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied"; - monster "arug_cas02",383,231,"Treasure Chest",1324,1,"Manager#aru02_02::OnTreasureDied"; - monster "arug_cas02",384,231,"Treasure Chest",1944,1,"Manager#aru02_02::OnTreasureDied"; - 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 "[Yumenes]"; - 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 (agitcheck2() == 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas02",67,36,"Guardian",1899,"#aru02_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas02",204,32,"Guardian",1899,"#aru02_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#aru02"; - end; -} - -arug_cas02,2,1,0 script #aru02_RL00 -1,{ -OnEnable: - setwall "arug_cas02",136,136,8,6,0,"aru02_RL00"; - 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: - delwall "aru02_RL00"; - killmonster "arug_cas02","#aru02_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -arug_cas02,2,2,0 script #aru02_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas02",150,223,12,6,1,"aru02_RL01"; - 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"; - delwall "aru02_RL01"; - } - end; - -OnDisable: - delwall "aru02_RL01"; - killmonster "arug_cas02","#aru02_RL01::OnBarrierDestroyed"; - end; -} - -arug_cas02,2,3,0 script #aru02_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas02",125,342,8,0,1,"aru02_RL02"; - 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"; - delwall "aru02_RL02"; - } - end; - -OnDisable: - delwall "aru02_RL02"; - killmonster "arug_cas02","#aru02_RL02::OnBarrierDestroyed"; - end; -} - -arug_cas02,2,4,0 script #aru02_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "arug_cas02",38,314,12,6,1,"aru02_RL03"; - 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"; - delwall "aru02_RL03"; - } - end; - -OnDisable: - delwall "aru02_RL03"; - 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 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 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 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 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 (agitcheck2() == 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_ar02[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 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 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 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 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 (agitcheck2() == 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::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#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 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 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 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 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 (agitcheck2() == 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::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 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; -} - +- duplicate(Manager#template) Manager#arug_cas02 -1 +- duplicate(gard#template) gard1#arug_cas02 -1 +- duplicate(gard#template) gard2#arug_cas02 -1 +- duplicate(df#template) df1#arug_cas02 -1 +- duplicate(df#template) df2#arug_cas02 -1 +- duplicate(RL#template) RL0#arug_cas02 -1 +- duplicate(RL#template) RL1#arug_cas02 -1 +- duplicate(RL#template) RL2#arug_cas02 -1 +- duplicate(RL#template) RL3#arug_cas02 -1 + +arug_cas02,303,341,3 duplicate(Steward#template) Steward#ar02 55 +arug_cas02,38,259,5 duplicate(Guardian#template) Yumenes#ar02 868 +arug_cas02,354,326,3 duplicate(Kafra#template) Kafra Employee#ar02 117 +arug_cas02,33,168,0 duplicate(Guardian Stone#template) 1st Guardian Stone#ar02 844 +arug_cas02,245,168,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#ar02 844 +arug_cas02,143,228,0 duplicate(Control#template) Control Device01#ar02 111 +arug_cas02,118,356,0 duplicate(Control#template) Control Device02#ar02 111 +arug_cas02,56,308,0 duplicate(Control#template) Control Device03#ar02 111 +arug_cas02,386,227,0 duplicate(Switch#template) #aru02_switch 111 +arug_cas02,350,294,3 duplicate(Sunflower#template) Mysterious Sunflower#07 977 + +arug_cas02,98,270,0 script LF-01#arug_cas02 111,{ callfunc "LinkFlag","First Gate House",10,187,"Second Gate House",268,187; } +arug_cas02,98,266,0 script LF-02#arug_cas02 111,{ callfunc "LinkFlag","Defense Area 1-1",66,31,"Defense Area 1-2",212,31; } +arug_cas02,98,262,0 script LF-03#arug_cas02 111,{ callfunc "LinkFlag","Defense Area 1-3",90,120,"Defense Area 1-4",188,119; } +arug_cas02,98,258,0 script LF-04#arug_cas02 111,{ callfunc "LinkFlag","Defense Area 2-1",119,183,"Defense Area 2-2",159,183; } +arug_cas02,98,253,0 script LF-05#arug_cas02 111,{ callfunc "LinkFlag","Defense Area 2-3",156,324,"Defense Area 2-4",174,372; } +arug_cas02,98,249,0 script LF-06#arug_cas02 111,{ callfunc "LinkFlag","Defense Area 3-1",28,325,"Defense Area 3-2",57,325; } +arug_cas02,98,245,0 script LF-07#arug_cas02 111,{ callfunc "LinkFlag","Center 2nd Area",156,263,"Center 3rd Area",43,354; } +arug_cas02,98,241,0 script LF-08#arug_cas02 111,{ callfunc "LinkFlag","Convenience Facility",387,323; } +arug_cas02,216,92,0 script Cyr#LF_ar02_1::LF_ar02_1 111,{ callfunc "LinkFlag","Emperium Center",43,256; } 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 @@ -2192,732 +51,32 @@ 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; - } - } + callfunc "LinkFlag","Emperium Center",43,256; end; - OnInterIfInitOnce: 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 < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas02",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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 (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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "arug_cas02",4,GetCastleData("arug_cas02",4)+1; - 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 < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas02",5)) { - set .@def_invest,.@def_invest*4; - } - 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; - } - 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 (GetCastleData("arug_cas02",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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; - 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#aru02"; - 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|bc_woe; - donpcevent "Manager#aru02_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 2] stronghold of "+GetCastleName("arug_cas02"),bc_all|bc_woe; - mapannounce "arug_cas02","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - 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|bc_woe; - donpcevent "Manager#aru02_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "arug_cas02",GetCastleData("arug_cas02",1),2; - donpcevent "::OnRecvCastleAr02"; - end; - -OnTimer10000: - donpcevent "Manager#aru02_02::Onchange"; - mapannounce "arug_cas02","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -arug_cas02,354,326,3 script Kafra Employee#aru02 117,{ - cutin "kafra_01",2; - 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("NV_BASIC") < 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; - } - + callfunc "ReturnFlag","arug_cas02",1; + end; OnInterIfInitOnce: 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" + 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; - } + callfunc "ReturnFlag","arug_cas02",0; + end; OnInterIfInitOnce: OnRecvCastleAr02: FlagEmblem GetCastleData("arug_cas02",1); end; -} +} \ No newline at end of file diff --git a/npc/guild2/arug_cas03.txt b/npc/guild2/arug_cas03.txt index 6785eb812..646127138 100644 --- a/npc/guild2/arug_cas03.txt +++ b/npc/guild2/arug_cas03.txt @@ -1,2233 +1,47 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Horn //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.1 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Arunafeltz Castle 3 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= Should take care of event-not-found error. -//= 1.5 Fixed error with control devices. [L0ne_W0lf] -//= 1.6 Corrected copy/paste error. [L0ne_W0lf] -//= 1.7 Implemented new Wall System. [Zephyrus] -//= 1.8 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.9 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.1 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -arug_cas03,1,1,0 script Manager#aru03_02 111,{ - end; - -OnAgitInit2: -OnRecvCastleAr03: - if (GetCastleData("arug_cas03",1) == 0) { - donpcevent "Manager#aru03_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - 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; - -OnAgitEnd2: - GvgOff "arug_cas03"; - if (GetCastleData("arug_cas03",1)) { - KillMonster "arug_cas03","Steward#aru03::OnStartArena"; - donpcevent "Manager#aru03_02::Onreset"; - donpcevent "Steward#aru03::Onstop"; - } - 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 (agitcheck2()) { - 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: - if (!GetCastleData("arug_cas03",1)) end; - killmonster "arug_cas03","Manager#aru03_02::OnTreasureDied"; - - if (GetCastleData("arug_cas03",4)) { - set .@Economy,GetCastleData("arug_cas03",2); - SetCastleData "arug_cas03",2,.@Economy + GetCastleData("arug_cas03",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("arug_cas03",2) > 100) SetCastleData "arug_cas03",2,100; - setcastledata "arug_cas03",4,0; - } - if (GetCastleData("arug_cas03",5)) { - set .@Defence,GetCastleData("arug_cas03",3); - SetCastleData "arug_cas03",3,.@Defence + GetCastleData("arug_cas03",5); - if (GetCastleData("arug_cas03",3) > 100) SetCastleData "arug_cas03",3,100; - setcastledata "arug_cas03",5,0; - } - - set .@Treasure,GetCastleData("arug_cas03",2)/5+4; - if (.@Treasure) { - monster "arug_cas03",291,276,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied"; - monster "arug_cas03",292,276,"Treasure Chest",1324,1,"Manager#aru03_02::OnTreasureDied"; - monster "arug_cas03",293,276,"Treasure Chest",1945,1,"Manager#aru03_02::OnTreasureDied"; - 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 (agitcheck2() == 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas03",128,77,"Guardian",1899,"#aru03_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas03",172,95,"Guardian",1899,"#aru03_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#aru03"; - end; -} - -arug_cas03,2,1,0 script #aru03_RL00 -1,{ -OnEnable: - setwall "arug_cas03",138,110,8,6,0,"aru03_RL00"; - 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: - delwall "aru03_RL00"; - killmonster "arug_cas03","#aru03_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -arug_cas03,2,2,0 script #aru03_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas03",139,158,6,6,1,"aru03_RL01"; - 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"; - delwall "aru03_RL01"; - } - end; - -OnDisable: - delwall "aru03_RL01"; - killmonster "arug_cas03","#aru03_RL01::OnBarrierDestroyed"; - end; -} - -arug_cas03,2,3,0 script #aru03_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "arug_cas03",138,210,8,6,1,"aru03_RL02"; - 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"; - delwall "aru03_RL02"; - } - end; - -OnDisable: - delwall "aru03_RL02"; - killmonster "arug_cas03","#aru03_RL02::OnBarrierDestroyed"; - end; -} - -arug_cas03,2,4,0 script #aru03_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "arug_cas03",138,263,8,6,1,"aru03_RL03"; - 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"; - delwall "aru03_RL03"; - } - end; - -OnDisable: - delwall "aru03_RL03"; - 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 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 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 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 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 (agitcheck2() == 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_ar03[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 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 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 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 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 (agitcheck2() == 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::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#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 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 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 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 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 (agitcheck2() == 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::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 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; -} - +- duplicate(Manager#template) Manager#arug_cas03 -1 +- duplicate(gard#template) gard1#arug_cas03 -1 +- duplicate(gard#template) gard2#arug_cas03 -1 +- duplicate(df#template) df1#arug_cas03 -1 +- duplicate(df#template) df2#arug_cas03 -1 +- duplicate(RL#template) RL0#arug_cas03 -1 +- duplicate(RL#template) RL1#arug_cas03 -1 +- duplicate(RL#template) RL2#arug_cas03 -1 +- duplicate(RL#template) RL3#arug_cas03 -1 + +arug_cas03,328,98,3 duplicate(Steward#template) Steward#ar03 55 +arug_cas03,146,315,3 duplicate(Guardian#template) Yehsus#ar03 868 +arug_cas03,315,98,5 duplicate(Kafra#template) Kafra Employee#ar03 117 +arug_cas03,65,171,0 duplicate(Guardian Stone#template) 1st Guardian Stone#ar03 844 +arug_cas03,212,149,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#ar03 844 +arug_cas03,136,158,0 duplicate(Control#template) Control Device01#ar03 111 +arug_cas03,135,212,0 duplicate(Control#template) Control Device02#ar03 111 +arug_cas03,134,266,0 duplicate(Control#template) Control Device03#ar03 111 +arug_cas03,299,277,0 duplicate(Switch#template) #aru03_switch 111 +arug_cas03,312,154,3 duplicate(Sunflower#template) Mysterious Sunflower#08 977 + +arug_cas03,122,314,0 script LF-01#arug_cas03 111,{ callfunc "LinkFlag","First Gate House",84,158,"Second Gate House",197,136; } +arug_cas03,125,314,0 script LF-02#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 1-2",211,97; } +arug_cas03,128,314,0 script LF-03#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 1-3",112,73,"Defense Area 1-4",171,73; } +arug_cas03,131,314,0 script LF-04#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 2-1",112,152,"Defense Area 2-2",172,152; } +arug_cas03,134,314,0 script LF-05#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 2-3",120,186,"Defense Area 2-4",162,186; } +arug_cas03,149,314,0 script LF-06#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 3-1",116,235,"Defense Area 3-2",164,235; } +arug_cas03,152,314,0 script LF-07#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 2-1",112,152,"Defense Area 3-1",116,235; } +arug_cas03,155,314,0 script LF-08#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 1-2",211,97,"Defense Area 2-2",172,152,"Defense Area 3-2",164,235; } +arug_cas03,158,314,0 script LF-09#arug_cas03 111,{ callfunc "LinkFlag","Defense Area 1-4",171,73,"Defense Area 2-4",162,186; } +arug_cas03,161,314,0 script LF-10#arug_cas03 111,{ callfunc "LinkFlag","Convenience Facility",321,57; } +arug_cas03,45,158,0 script Horn#LF_ar03_01::LF_ar03_01 111,{ callfunc "LinkFlag","Emperium Center",121,318; } 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 @@ -2237,698 +51,24 @@ 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; - } - } + callfunc "LinkFlag","Emperium Center",121,318; end; - OnInterIfInitOnce: 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 < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas03",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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 (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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "arug_cas03",4,GetCastleData("arug_cas03",4)+1; - 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 < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas03",5)) { - set .@def_invest,.@def_invest*4; - } - 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; - } - 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 (GetCastleData("arug_cas03",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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; - 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#aru03"; - 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|bc_woe; - donpcevent "Manager#aru03_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 3] stronghold of "+GetCastleName("arug_cas03"),bc_all|bc_woe; - mapannounce "arug_cas03","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - 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|bc_woe; - donpcevent "Manager#aru03_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "arug_cas03",GetCastleData("arug_cas03",1),2; - donpcevent "::OnRecvCastleAr03"; - end; - -OnTimer10000: - donpcevent "Manager#aru03_02::Onchange"; - mapannounce "arug_cas03","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -arug_cas03,315,98,5 script Kafra Employee#aru03 117,{ - cutin "kafra_01",2; - 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("NV_BASIC") < 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; - } - + callfunc "ReturnFlag","arug_cas03",1; + end; OnInterIfInitOnce: OnRecvCastleAr03: FlagEmblem GetCastleData("arug_cas03",1); end; } - -aru_gld,74,174,0 duplicate(Ar03_Flag) Horn#flag_Ar03_2 722 +aru_gld,74,174,0 duplicate(Ar03_Flag) Horn#flag_Ar03_2 722 \ No newline at end of file diff --git a/npc/guild2/arug_cas04.txt b/npc/guild2/arug_cas04.txt index 36f5cee9d..26359d10a 100644 --- a/npc/guild2/arug_cas04.txt +++ b/npc/guild2/arug_cas04.txt @@ -1,2237 +1,47 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Gefn //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.3 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Arunafeltz Castle 4 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.5 Fixed error with control devices. [L0ne_W0lf] -//= 1.6 Corrected copy/paste error. [L0ne_W0lf] -//= 1.7 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.8 Fixed wrong event call for stones. (bugreport:2386) [L0ne_W0lf] -//= 1.9 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.1 Fixed setcell extending more than it should on 3rd barricade. (bugreport:4323) [L0ne_W0lf] -//= 2.2 Corrected exterior flag positions. (bugreport:4436) [L0ne_W0lf] -//= 2.3 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -arug_cas04,1,1,0 script Manager#aru04_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlear04: - if (GetCastleData("arug_cas04",1) == 0) { - donpcevent "Manager#aru04_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - 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; - -OnAgitEnd2: - GvgOff "arug_cas04"; - if (GetCastleData("arug_cas04",1)) { - KillMonster "arug_cas04","Steward#aru04::OnStartArena"; - donpcevent "Manager#aru04_02::Onreset"; - donpcevent "Steward#aru04::Onstop"; - } - 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 (agitcheck2()) { - 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: - if (!GetCastleData("arug_cas04",1)) end; - killmonster "arug_cas04","Manager#aru04_02::OnTreasureDied"; - - if (GetCastleData("arug_cas04",4)) { - set .@Economy,GetCastleData("arug_cas04",2); - SetCastleData "arug_cas04",2,.@Economy + GetCastleData("arug_cas04",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("arug_cas04",2) > 100) SetCastleData "arug_cas04",2,100; - setcastledata "arug_cas04",4,0; - } - if (GetCastleData("arug_cas04",5)) { - set .@Defence,GetCastleData("arug_cas04",3); - SetCastleData "arug_cas04",3,.@Defence + GetCastleData("arug_cas04",5); - if (GetCastleData("arug_cas04",3) > 100) SetCastleData "arug_cas04",3,100; - setcastledata "arug_cas04",5,0; - } - - set .@Treasure,GetCastleData("arug_cas04",2)/5+4; - if (.@Treasure) { - monster "arug_cas04",291,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; - monster "arug_cas04",292,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; - monster "arug_cas04",293,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; - 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 (agitcheck2() == 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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,263,145,263,cell_walkable,1; - } - end; - -OnDisable: - setcell "arug_cas04",138,263,145,263,cell_walkable,1; - killmonster "arug_cas04","#aru04_RL03::OnBarrierDestroyed"; - end; -} - -arug_cas04,136,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 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 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 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 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 (agitcheck2() == 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_ar04[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 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 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 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 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 (agitcheck2() == 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::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#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 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 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 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 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 (agitcheck2() == 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::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 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; -} - +- duplicate(Manager#template) Manager#arug_cas04 -1 +- duplicate(gard#template) gard1#arug_cas04 -1 +- duplicate(gard#template) gard2#arug_cas04 -1 +- duplicate(df#template) df1#arug_cas04 -1 +- duplicate(df#template) df2#arug_cas04 -1 +- duplicate(RL#template) RL0#arug_cas04 -1 +- duplicate(RL#template) RL1#arug_cas04 -1 +- duplicate(RL#template) RL2#arug_cas04 -1 +- duplicate(RL#template) RL3#arug_cas04 -1 + +arug_cas04,328,98,3 duplicate(Steward#template) Steward#ar04 55 +arug_cas04,146,315,3 duplicate(Guardian#template) Nios#ar04 868 +arug_cas04,315,98,5 duplicate(Kafra#template) Kafra Employee#ar04 117 +arug_cas04,65,171,0 duplicate(Guardian Stone#template) 1st Guardian Stone#ar04 844 +arug_cas04,212,149,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#ar04 844 +arug_cas04,136,158,0 duplicate(Control#template) Control Device01#ar04 111 +arug_cas04,135,212,0 duplicate(Control#template) Control Device02#ar04 111 +arug_cas04,134,266,0 duplicate(Control#template) Control Device03#ar04 111 +arug_cas04,299,277,0 duplicate(Switch#template) #aru04_switch 111 +arug_cas04,312,154,3 duplicate(Sunflower#template) Mysterious Sunflower#09 977 + +arug_cas04,122,314,0 script LF-01#arug_cas04 111,{ callfunc "LinkFlag","First Gate House",84,158,"Second Gate House",197,136; } +arug_cas04,125,314,0 script LF-02#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 1-2",211,97; } +arug_cas04,128,314,0 script LF-03#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 1-3",112,73,"Defense Area 1-4",171,73; } +arug_cas04,131,314,0 script LF-04#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 2-1",112,152,"Defense Area 2-2",172,152; } +arug_cas04,134,314,0 script LF-05#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 2-3",120,186,"Defense Area 2-4",162,186; } +arug_cas04,149,314,0 script LF-06#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 3-1",116,235,"Defense Area 3-2",164,235; } +arug_cas04,152,314,0 script LF-07#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 2-1",112,152,"Defense Area 3-1",116,235; } +arug_cas04,155,314,0 script LF-08#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 1-2",211,97,"Defense Area 2-2",172,152,"Defense Area 3-2",164,235; } +arug_cas04,158,314,0 script LF-09#arug_cas04 111,{ callfunc "LinkFlag","Defense Area 1-4",171,73,"Defense Area 2-4",162,186; } +arug_cas04,161,314,0 script LF-10#arug_cas04 111,{ callfunc "LinkFlag","Convenience Facility",321,57; } +arug_cas04,45,158,0 script Gefn#LF_ar04_01::LF_ar04_01 111,{ callfunc "LinkFlag","Emperium Center",121,318; } 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 @@ -2241,734 +51,33 @@ 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; - } - } + callfunc "LinkFlag","Emperium Center",121,318; end; - OnInterIfInitOnce: 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 < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas04",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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 (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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "arug_cas04",4,GetCastleData("arug_cas04",4)+1; - 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 < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas04",5)) { - set .@def_invest,.@def_invest*4; - } - 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; - } - 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 (GetCastleData("arug_cas04",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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; - 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|bc_woe; - donpcevent "Manager#aru04_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 4] stronghold of "+GetCastleName("arug_cas04"),bc_all|bc_woe; - mapannounce "arug_cas04","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - 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|bc_woe; - donpcevent "Manager#aru04_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2; - donpcevent "::OnRecvCastlear04"; - end; - -OnTimer10000: - donpcevent "Manager#aru04_02::Onchange"; - mapannounce "arug_cas04","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - 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("NV_BASIC") < 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; - } - + callfunc "ReturnFlag","arug_cas04",1; + end; OnInterIfInitOnce: OnRecvCastlear04: FlagEmblem GetCastleData("arug_cas04",1); end; } - aru_gld,306,348,6 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; - } - + callfunc "ReturnFlag","arug_cas04",0; + end; OnInterIfInitOnce: OnRecvCastlear04: FlagEmblem GetCastleData("arug_cas04",1); end; } - -aru_gld,313,318,4 duplicate(ar04_Flag2) Gefn#flag_ar04_4 722 +aru_gld,313,318,4 duplicate(ar04_Flag2) Gefn#flag_ar04_4 722 \ No newline at end of file diff --git a/npc/guild2/arug_cas05.txt b/npc/guild2/arug_cas05.txt index fe6431b9f..8beb8c938 100644 --- a/npc/guild2/arug_cas05.txt +++ b/npc/guild2/arug_cas05.txt @@ -1,2237 +1,47 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Banadis //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.3 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Arunafeltz Castle 5 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.5 Fixed error with control devices. [L0ne_W0lf] -//= 1.6 Corrected copy/paste error. [L0ne_W0lf] -//= 1.7 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.8 Fixed wrong event call for stones. (bugreport:2386) [L0ne_W0lf] -//= 1.9 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.1 Fixed setcell extending more than it should on 3rd barricade. (bugreport:4323) [L0ne_W0lf] -//= 2.2 Fixed exterior flag placements. [L0ne_W0lf] -//= 2.3 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -arug_cas05,1,1,0 script Manager#aru05_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlear05: - if (GetCastleData("arug_cas05",1) == 0) { - donpcevent "Manager#aru05_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - 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; - -OnAgitEnd2: - GvgOff "arug_cas05"; - if (GetCastleData("arug_cas05",1)) { - KillMonster "arug_cas05","Steward#aru05::OnStartArena"; - donpcevent "Manager#aru05_02::Onreset"; - donpcevent "Steward#aru05::Onstop"; - } - 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 (agitcheck2()) { - 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: - if (!GetCastleData("arug_cas05",1)) end; - killmonster "arug_cas05","Manager#aru05_02::OnTreasureDied"; - - if (GetCastleData("arug_cas05",4)) { - set .@Economy,GetCastleData("arug_cas05",2); - SetCastleData "arug_cas05",2,.@Economy + GetCastleData("arug_cas05",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("arug_cas05",2) > 100) SetCastleData "arug_cas05",2,100; - setcastledata "arug_cas05",4,0; - } - if (GetCastleData("arug_cas05",5)) { - set .@Defence,GetCastleData("arug_cas05",3); - SetCastleData "arug_cas05",3,.@Defence + GetCastleData("arug_cas05",5); - if (GetCastleData("arug_cas05",3) > 100) SetCastleData "arug_cas05",3,100; - setcastledata "arug_cas05",5,0; - } - - set .@Treasure,GetCastleData("arug_cas05",2)/5+4; - if (.@Treasure) { - monster "arug_cas05",291,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied"; - monster "arug_cas05",292,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied"; - monster "arug_cas05",293,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied"; - 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 (agitcheck2() == 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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 ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 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 ((.@defence > 50) && (.@defence < 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 (.@defence > 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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::OnEnable"; - 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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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 (agitcheck2() == 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 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 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,263,145,263,cell_walkable,1; - } - end; - -OnDisable: - setcell "arug_cas05",138,263,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 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 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 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 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 (agitcheck2() == 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_ar05[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 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 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 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 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 (agitcheck2() == 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::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#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 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 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 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 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 (agitcheck2() == 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::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 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; -} - +- duplicate(Manager#template) Manager#arug_cas05 -1 +- duplicate(Manager#template) gard1#arug_cas05 -1 +- duplicate(Manager#template) gard2#arug_cas05 -1 +- duplicate(df#template) df1#arug_cas05 -1 +- duplicate(df#template) df2#arug_cas05 -1 +- duplicate(RL#template) RL0#arug_cas05 -1 +- duplicate(RL#template) RL1#arug_cas05 -1 +- duplicate(RL#template) RL2#arug_cas05 -1 +- duplicate(RL#template) RL3#arug_cas05 -1 + +arug_cas05,328,98,3 duplicate(Steward#template) Steward#ar05 55 +arug_cas05,146,315,3 duplicate(Guardian#template) Eeos#ar05 868 +arug_cas05,315,98,5 duplicate(Kafra#template) Kafra Employee#ar05 117 +arug_cas05,65,171,0 duplicate(Guardian Stone#template) 1st Guardian Stone#ar05 844 +arug_cas05,212,149,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#ar05 844 +arug_cas05,136,158,0 duplicate(Control#template) Control Device01#ar05 111 +arug_cas05,135,212,0 duplicate(Control#template) Control Device02#ar05 111 +arug_cas05,134,266,0 duplicate(Control#template) Control Device03#ar05 111 +arug_cas05,299,277,0 duplicate(Switch#template) #aru05_switch 111 +arug_cas05,312,154,3 duplicate(Sunflower#template) Mysterious Sunflower#10 977 + +arug_cas05,122,314,0 script LF-01#arug_cas05 111,{ callfunc "LinkFlag","First Gate House",84,158,"Second Gate House",197,136; } +arug_cas05,125,314,0 script LF-02#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 1-2",211,97; } +arug_cas05,128,314,0 script LF-03#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 1-3",112,73,"Defense Area 1-4",171,73; } +arug_cas05,131,314,0 script LF-04#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 2-1",112,152,"Defense Area 2-2",172,152; } +arug_cas05,134,314,0 script LF-05#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 2-3",120,186,"Defense Area 2-4",162,186; } +arug_cas05,149,314,0 script LF-06#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 3-1",116,235,"Defense Area 3-2",164,235; } +arug_cas05,152,314,0 script LF-07#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 1-1",65,94,"Defense Area 2-1",112,152,"Defense Area 3-1",116,235; } +arug_cas05,155,314,0 script LF-08#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 1-2",211,97,"Defense Area 2-2",172,152,"Defense Area 3-2",164,235; } +arug_cas05,158,314,0 script LF-09#arug_cas05 111,{ callfunc "LinkFlag","Defense Area 1-4",171,73,"Defense Area 2-4",162,186; } +arug_cas05,161,314,0 script LF-10#arug_cas05 111,{ callfunc "LinkFlag","Convenience Facility",321,57; } +arug_cas05,45,158,0 script Banadis#LF_ar05_01::LF_ar05_01 111,{ callfunc "LinkFlag","Emperium Center",121,318; } 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 @@ -2241,736 +51,33 @@ 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; - } - } + callfunc "LinkFlag","Emperium Center",121,318; end; - OnInterIfInitOnce: 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 < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas05",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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 (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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "arug_cas05",4,GetCastleData("arug_cas05",4)+1; - 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 < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("arug_cas05",5)) { - set .@def_invest,.@def_invest*4; - } - 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; - } - 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 (GetCastleData("arug_cas05",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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; - 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|bc_woe; - donpcevent "Manager#aru05_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 5] stronghold of "+GetCastleName("arug_cas05"),bc_all|bc_woe; - mapannounce "arug_cas05","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - 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|bc_woe; - donpcevent "Manager#aru05_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2; - donpcevent "::OnRecvCastlear05"; - end; - -OnTimer10000: - donpcevent "Manager#aru05_02::Onchange"; - mapannounce "arug_cas05","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - 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("NV_BASIC") < 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; - } - + callfunc "ReturnFlag","arug_cas05",1; + end; OnInterIfInitOnce: OnRecvCastlear05: FlagEmblem GetCastleData("arug_cas05",1); end; } - aru_gld,289,112,6 duplicate(ar05_Flag) Banadis#flag_ar05_2 722 - aru_gld,350,98,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; - } - + callfunc "ReturnFlag","arug_cas05",0; + end; OnInterIfInitOnce: OnRecvCastlear05: FlagEmblem GetCastleData("arug_cas05",1); end; } - -aru_gld,350,88,6 duplicate(ar05_Flag2) Banadis#flag_ar05_4 722 +aru_gld,350,88,6 duplicate(ar05_Flag2) Banadis#flag_ar05_4 722 \ No newline at end of file diff --git a/npc/guild2/guild_dungeon.txt b/npc/guild2/guild_dungeon.txt deleted file mode 100644 index 052b7441e..000000000 --- a/npc/guild2/guild_dungeon.txt +++ /dev/null @@ -1,172 +0,0 @@ -//===== rAthena Script ======================================= -//= War of Emperium Second Edition -//===== By: ================================================== -//= L0ne_W0lf -//===== Current Version: ===================================== -//= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN -//===== Description: ========================================= -//= WoE SE Guild dungeon entrances in Juno and Rachel -//===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//============================================================ - -schg_cas01,280,391,3 script Mysterious Sunflower#01 976,{ - set .@GID, GetCastleData("schg_cas01",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "schg_dun01",262,314; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -schg_cas02,174,328,3 script Mysterious Sunflower#02 976,{ - set .@GID, GetCastleData("schg_cas02",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "schg_dun01",94,284; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -schg_cas03,25,22,3 script Mysterious Sunflower#03 976,{ - set .@GID, GetCastleData("schg_cas03",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "schg_dun01",79,140; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -schg_cas04,280,391,3 script Mysterious Sunflower#04 976,{ - set .@GID, GetCastleData("schg_cas04",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "schg_dun01",212,70; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -schg_cas05,280,391,3 script Mysterious Sunflower#05 976,{ - set .@GID, GetCastleData("schg_cas05",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "schg_dun01",322,166; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -arug_cas01,157,345,3 script Mysterious Sunflower#06 977,{ - set .@GID, GetCastleData("arug_cas01",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "arug_dun01",350,350; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -arug_cas02,350,294,3 script Mysterious Sunflower#07 977,{ - set .@GID, GetCastleData("arug_cas02",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "arug_dun01",350,50; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} -arug_cas03,312,154,3 script Mysterious Sunflower#08 977,{ - set .@GID, GetCastleData("arug_cas03",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "arug_dun01",50,50; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -arug_cas04,312,154,3 script Mysterious Sunflower#09 977,{ - set .@GID, GetCastleData("arug_cas04",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "arug_dun01",50,350; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} - -arug_cas05,312,154,3 script Mysterious Sunflower#10 977,{ - set .@GID, GetCastleData("arug_cas05",1); - if (getcharid(2) == .@GID) { - mes "-It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower.-"; - next; - switch(select("Hold the stem.:Do nothing.")) { - case 1: - warp "arug_dun01",200,386; - end; - case 2: - mes "It's too scary to touch unknown things."; - close; - } - } -} diff --git a/npc/guild2/schg_cas01.txt b/npc/guild2/schg_cas01.txt index 4a328519d..a5c5fa50f 100644 --- a/npc/guild2/schg_cas01.txt +++ b/npc/guild2/schg_cas01.txt @@ -1,2260 +1,56 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Himinn //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.1 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Schwaltzvalt Castle 1 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed take-over lowering schg_cas04's eco. [L0ne_W0lf] -//= 1.3 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.4 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.5 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.6 Corrected a typo with treasure spawning. [L0ne_W0lf] -//= 1.7 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.8 Corrected wrong treasure spawn position. [zapbomb] -//= 1.9 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.1 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -schg_cas01,1,1,0 script Manager#sch01_02 111,{ - end; - -OnAgitInit2: -OnRecvCastleSc01: - if (GetCastleData("schg_cas01",1) == 0) { - donpcevent "Manager#sch01_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2; - GvgOn "schg_cas01"; - donpcevent "Manager#sch01_02::Onstart"; - } - else { - donpcevent "#sch01_RL00::OnDisable"; - donpcevent "#sch01_RL01::OnDisable"; - donpcevent "#sch01_RL02::OnDisable"; - donpcevent "#sch01_RL03::OnDisable"; - } - end; - -OnAgitEnd2: - GvgOff "schg_cas01"; - if (GetCastleData("schg_cas01",1)) { - KillMonster "schg_cas01","Steward#sch01::OnStartArena"; - donpcevent "Manager#sch01_02::Onreset"; - donpcevent "Steward#sch01::Onstop"; - } - 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("schg_cas01",1)) { - setarray $agit_sc01[0],0,0,0,0,0,0; - donpcevent "#sch01_df01::OnEnable"; - donpcevent "#sch01_df02::OnEnable"; - donpcevent "#sch01_RL00::OnEnable"; - donpcevent "#sch01_RL01::OnEnable"; - donpcevent "#sch01_RL02::OnEnable"; - donpcevent "#sch01_RL03::OnEnable"; - } - monster "schg_cas01",120,272,"Emperium",1288,1,"Steward#sch01::OnStartArena"; - end; - -Onreset: - donpcevent "#sch01_df01::OnDisable"; - donpcevent "#sch01_df02::OnDisable"; - donpcevent "#sch01_gard01::Onreset"; - donpcevent "#sch01_gard02::Onreset"; - donpcevent "#sch01_RL00::OnDisable"; - donpcevent "#sch01_RL01::OnDisable"; - donpcevent "#sch01_RL02::OnDisable"; - donpcevent "#sch01_RL03::OnDisable"; - donpcevent "1st Guardian Stone#sch01::OnDisable"; - donpcevent "2nd Guardian Stone#sch01::OnDisable"; - donpcevent "Control Device01#sch01::OnDisable"; - donpcevent "Control Device02#sch01::OnDisable"; - donpcevent "Control Device03#sch01::OnDisable"; - if (agitcheck2()) { - setarray $agit_sc01[0],0,0,1,1,1,0; - } - end; - -Onchange: - setarray $agit_sc01[0],2,2,1,1,2,0; - monster "schg_cas01",120,272,"Emperium",1288,1,"Steward#sch01::OnStartArena"; - donpcevent "Control Device03#sch01::OnEnable"; - donpcevent "1st Guardian Stone#sch01::OnEnable"; - donpcevent "2nd Guardian Stone#sch01::OnEnable"; - end; - -OnClock0001: - if (!GetCastleData("schg_cas01",1)) end; - killmonster "schg_cas01","Manager#sch01_02::OnTreasureDied"; - - if (GetCastleData("schg_cas01",4)) { - set .@Economy,GetCastleData("schg_cas01",2); - SetCastleData "schg_cas01",2,.@Economy + GetCastleData("schg_cas01",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("schg_cas01",2) > 100) SetCastleData "schg_cas01",2,100; - setcastledata "schg_cas01",4,0; - } - if (GetCastleData("schg_cas01",5)) { - set .@Defence,GetCastleData("schg_cas01",3); - SetCastleData "schg_cas01",3,.@Defence + GetCastleData("schg_cas01",5); - if (GetCastleData("schg_cas01",3) > 100) SetCastleData "schg_cas01",3,100; - setcastledata "schg_cas01",5,0; - } - - set .@Treasure,GetCastleData("schg_cas01",2)/5+4; - if (.@Treasure) { - monster "schg_cas01",388,388,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - monster "schg_cas01",388,389,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - monster "schg_cas01",388,390,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - monster "schg_cas01",387,390,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 5) end; - monster "schg_cas01",386,390,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 6) end; - monster "schg_cas01",385,390,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 7) end; - monster "schg_cas01",384,389,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 8) end; - monster "schg_cas01",384,388,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 9) end; - monster "schg_cas01",384,387,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 10) end; - monster "schg_cas01",384,386,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 11) end; - monster "schg_cas01",384,385,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 12) end; - monster "schg_cas01",384,384,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 13) end; - monster "schg_cas01",385,384,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 14) end; - monster "schg_cas01",386,384,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 15) end; - monster "schg_cas01",387,384,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 16) end; - monster "schg_cas01",388,384,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 17) end; - monster "schg_cas01",389,384,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 18) end; - monster "schg_cas01",390,384,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 19) end; - monster "schg_cas01",390,385,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 20) end; - monster "schg_cas01",390,386,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 21) end; - monster "schg_cas01",389,386,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 22) end; - monster "schg_cas01",388,386,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 23) end; - monster "schg_cas01",387,386,"Treasure Chest",1938,1,"Manager#sch01_02::OnTreasureDied"; - if (.@Treasure < 24) end; - monster "schg_cas01",386,386,"Treasure Chest",1324,1,"Manager#sch01_02::OnTreasureDied"; - } - end; - -OnTreasureDied: - end; -} - -schg_cas01,123,306,3 script Ef#sch01_01 868,{ - set .@GID, GetCastleData("schg_cas01",1); - if (.@GID == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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 (agitcheck2() == 0) { - mes "[Ef]"; - mes "I am Ef, guardian of"; - mes "this stronghold. For now,"; - mes "all is quiet in this place."; - next; - switch(select("Converse:Cancel")) { - case 1: - mes "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - mes "You have no questions"; - mes "to ask of me? Well, I'm"; - mes "here to serve your needs."; - close; - } - case 2: - mes "[Ef]"; - mes "I'm always here, so"; - mes "feel free to request my"; - mes "assistance whenever"; - mes "the need arises."; - close; - } - } - else { - mes "[Ef]"; - mes "Greetings, "+strcharinfo(0)+"."; - mes "What are your orders?"; - next; - switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { - case 1: - if ($agit_sc01[5] == 0) { - if (getgdskilllv(.@GID,10002) == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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_sc01[5],1; - if ($agit_sc01[0] == 0) { - donpcevent "#sch01_gard01::OnEnable"; - } - if ($agit_sc01[1] == 0) { - donpcevent "#sch01_gard02::OnEnable"; - } - close; - } - } - else { - mes "[Ef]"; - mes "You've already commanded"; - mes "me to summon a Guardian"; - mes "to defend the stronghold."; - close; - } - case 2: - mes "[Ef]"; - mes "Our defense status is..."; - if ($agit_sc01[0] == 1) { - mes "1st Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc01[0] == 2) { - mes "1st Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "1st Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc01[1] == 1) { - mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc01[1] == 2) { - mes "2nd Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc01[2] == 1) { - mes "1st Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc01[2] == 2) { - mes "1st Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "1st Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc01[3] == 1) { - mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc01[3] == 2) { - mes "2nd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc01[4] == 1) { - mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc01[4] == 2) { - mes "3rd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; - } - close; - case 3: - mes "[Ef]"; - mes "I'll be standing by,"; - mes "awaiting your orders."; - close; - } - } - } - } - else { - mes "[Ef]"; - mes "Who are you? Scoundrel!"; - mes "Leave this stronghold now!"; - close; - } - -OnInit: - setarray $agit_sc01[0],0,0,0,0,0,0; - end; -} - -schg_cas01,1,1,0 script #sch01_gard01 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas01",3); - guardian "schg_cas01",111,18,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas01",109,44,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas01",109,44,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //1; - guardian "schg_cas01",65,22,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas01",109,44,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //1; - guardian "schg_cas01",65,22,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //2; - guardian "schg_cas01",110,40,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas01",109,44,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //1; - guardian "schg_cas01",65,22,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //2; - guardian "schg_cas01",110,40,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //3; - guardian "schg_cas01",88,20,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "schg_cas01",108,32,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",64,40,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //5; - mapannounce "schg_cas01","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",47,43,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //6; - mapannounce "schg_cas01","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer1800000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",109,48,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //7; - mapannounce "schg_cas01","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer2700000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",111,18,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //8; - mapannounce "schg_cas01","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer3600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",112,32,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //9; - mapannounce "schg_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 "schg_cas01",120,37,"Guardian Soldier",1899,"#sch01_gard01::OnGuardianDied"; //10; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas01","#sch01_gard01::OnGuardianDied"; - end; -} - -schg_cas01,1,2,0 script #sch01_gard02 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas01",3); - guardian "schg_cas01",130,22,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas01",187,15,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas01",129,47,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //12; - guardian "schg_cas01",151,18,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas01",129,47,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //12; - guardian "schg_cas01",151,18,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //13; - guardian "schg_cas01",187,15,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas01",129,47,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //12; - guardian "schg_cas01",151,18,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //13; - guardian "schg_cas01",187,15,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //14; - guardian "schg_cas01",128,42,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "schg_cas01",128,42,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",152,43,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",187,15,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",128,42,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",130,22,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",130,28,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //20; - stopnpctimer; - end; - -OnGuardianDied: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount < 2) { - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas01",151,18,"Guardian Soldier",1899,"#sch01_gard02::OnGuardianDied"; //21; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas01","#sch01_gard02::OnGuardianDied"; - end; -} - -schg_cas01,1,3,0 script #sch01_df01 -1,{ -OnEnable: - guardian "schg_cas01",27,35,"1st Guardian Stone",1907,"#sch01_df01::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "schg_cas01","#sch01_df01::OnGuardianStoneDied"; - setarray $agit_sc01[0],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 1st Guardian Stone is Destroyed - setarray $agit_sc01[0],1; - if (($agit_sc01[0] == 1) || ($agit_sc01[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc01[1] == 1) || ($agit_sc01[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas01","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch01_RL00::OnDisable"; - donpcevent "#sch01_gard01::Onreset"; - } - else { - mapannounce "schg_cas01","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch01_gard01::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "1st Guardian Stone#sch01::OnEnable"; - setarray $agit_sc01[0],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas01,27,36,0 script 1st Guardian Stone#sch01 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc01[0] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "already completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch01_df01::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "1st Guardian Stone#sch01"; - setarray $agit_sc01[0],0; - set .@df_all,$agit_sc01[0]+$agit_sc01[1]; - if (.@df_all == 0) { - mapannounce "schg_cas01","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch01_RL00::OnEnable"; - } - else { - mapannounce "schg_cas01","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc01[5] == 1) { - donpcevent "#sch01_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#sch01"; - end; - -OnEnable: - enablenpc "1st Guardian Stone#sch01"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "1st Guardian Stone#sch01"; - end; -} - -schg_cas01,1,4,0 script #sch01_df02 -1,{ -OnEnable: - guardian "schg_cas01",207,75,"2nd Guardian Stone",1908,"#sch01_df02::OnGuardianStoneDied"; //23; - end; - -OnDisable: - killmonster "schg_cas01","#sch01_df02::OnGuardianStoneDied"; - setarray $agit_sc01[1],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 2nd Guardian Stone is Destroyed - setarray $agit_sc01[1],1; - if (($agit_sc01[0] == 1) || ($agit_sc01[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc01[1] == 1) || ($agit_sc01[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas01","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch01_RL00::OnDisable"; - donpcevent "#sch01_gard02::Onreset"; - } - else { - mapannounce "schg_cas01","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch01_gard02::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "2nd Guardian Stone#sch01::OnEnable"; - setarray $agit_sc01[1],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas01,208,75,0 script 2nd Guardian Stone#sch01 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc01[1] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "successfully completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch01_df02::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "2nd Guardian Stone#sch01"; - setarray $agit_sc01[1],0; - set .@df_all,$agit_sc01[0]+$agit_sc01[1]; - if (.@df_all == 0) { - mapannounce "schg_cas01","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch01_RL00::OnEnable"; - } - else { - mapannounce "schg_cas01","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc01[5] == 1) { - donpcevent "#sch01_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#sch01"; - end; - -OnEnable: - enablenpc "2nd Guardian Stone#sch01"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#sch01"; - end; -} - -// Barrier Summoners -schg_cas01,2,1,0 script #sch01_RL00 -1,{ -OnEnable: - setwall "schg_cas01",114,48,13,6,0,"sch01_RL00"; - guardian "schg_cas01",115,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //24; - guardian "schg_cas01",117,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //25; - guardian "schg_cas01",119,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //26; - guardian "schg_cas01",121,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //27; - guardian "schg_cas01",123,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //28; - guardian "schg_cas01",125,49," ",1905,"#sch01_RL00::OnBarrierDestroyed"; //29; - end; - -OnDisable: - delwall "sch01_RL00"; - killmonster "schg_cas01","#sch01_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -schg_cas01,2,2,0 script #sch01_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas01",114,51,13,6,1,"sch01_RL01"; - guardian "schg_cas01",115,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //30; - guardian "schg_cas01",117,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //31; - guardian "schg_cas01",119,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //32; - guardian "schg_cas01",121,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //33; - guardian "schg_cas01",123,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //34; - guardian "schg_cas01",125,50," ",1905,"#sch01_RL01::OnBarrierDestroyed"; //35; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc01[2],1; - mapannounce "schg_cas01","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch01_RL01"; - } - end; - -OnDisable: - delwall "sch01_RL01"; - killmonster "schg_cas01","#sch01_RL01::OnBarrierDestroyed"; - end; -} - -schg_cas01,2,3,0 script #sch01_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas01",114,154,13,6,1,"sch01_RL02"; - guardian "schg_cas01",115,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //36; - guardian "schg_cas01",117,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //37; - guardian "schg_cas01",119,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //38; - guardian "schg_cas01",121,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //39; - guardian "schg_cas01",123,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //40; - guardian "schg_cas01",125,153," ",1905,"#sch01_RL02::OnBarrierDestroyed"; //41; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc01[3],1; - mapannounce "schg_cas01","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch01_RL02"; - } - end; - -OnDisable: - delwall "sch01_RL02"; - killmonster "schg_cas01","#sch01_RL02::OnBarrierDestroyed"; - end; -} - -schg_cas01,2,4,0 script #sch01_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "schg_cas01",116,241,11,6,1,"sch01_RL03"; - guardian "schg_cas01",116,240," ",1905,"#sch01_RL03::OnBarrierDestroyed"; //42; - guardian "schg_cas01",118,240," ",1905,"#sch01_RL03::OnBarrierDestroyed"; //43; - guardian "schg_cas01",120,240," ",1905,"#sch01_RL03::OnBarrierDestroyed"; //44; - guardian "schg_cas01",122,240," ",1905,"#sch01_RL03::OnBarrierDestroyed"; //45; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc01[4],1; - mapannounce "schg_cas01","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; - delwall "sch01_RL03"; - } - end; - -OnDisable: - delwall "sch01_RL03"; - killmonster "schg_cas01","#sch01_RL03::OnBarrierDestroyed"; - end; -} - -schg_cas01,124,52,0 script Control Device01#sch01 111,{ - set .@GID, GetCastleData("schg_cas01",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc01[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 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 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 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 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 (agitcheck2() == 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 "#sch01_RL01::OnEnable"; - disablenpc "Control Device01#sch01"; - mapannounce "schg_cas01","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc01[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#sch01"; - end; - -OnEnable: - enablenpc "Control Device01#sch01"; - end; - -OnDisable: - disablenpc "Control Device01#sch01"; - end; -} - -schg_cas01,128,157,0 script Control Device02#sch01 111,{ - set .@GID, GetCastleData("schg_cas01",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc01[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 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 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 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 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 (agitcheck2() == 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 "#sch01_RL02::OnEnable"; - disablenpc "Control Device02#sch01"; - mapannounce "schg_cas01","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc01[3],0; //Global Variable - setarray $agit_sc01[2],2; //Global Variable - donpcevent "Control Device01#sch01::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#sch01"; - end; - -OnEnable: - enablenpc "Control Device02#sch01"; - end; - -OnDisable: - disablenpc "Control Device02#sch01"; - end; -} - -schg_cas01,109,247,0 script Control Device03#sch01 111,{ - set .@GID, GetCastleData("schg_cas01",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc01[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 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 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 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 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 (agitcheck2() == 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 "#sch01_RL03::OnEnable"; - disablenpc "Control Device03#sch01"; - mapannounce "schg_cas01","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc01[4],0; - setarray $agit_sc01[3],2; - donpcevent "Control Device02#sch01::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 Device03#sch01"; - end; - -OnEnable: - enablenpc "Control Device03#sch01"; - end; - -OnDisable: - disablenpc "Control Device03#sch01"; - end; -} - -// Link Flags -schg_cas01,106,302,0 script LF-01#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",19,26; - end; - case 2: - warp "schg_cas01",219,90; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,109,302,0 script LF-02#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",89,43; - end; - case 2: - warp "schg_cas01",141,45; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,112,302,0 script LF-03#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",137,54; - end; - case 2: - warp "schg_cas01",102,54; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,115,302,0 script LF-04#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",94,147; - end; - case 2: - warp "schg_cas01",163,140; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,118,302,0 script LF-05#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",87,220; - end; - case 2: - warp "schg_cas01",151,220; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,121,302,0 script LF-06#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",100,242; - end; - case 2: - warp "schg_cas01",136,242; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,124,302,0 script LF-07#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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("Center 1 Area:Center 2 Area:Cancel")) { - case 1: - warp "schg_cas01",120,168; - end; - case 2: - warp "schg_cas01",119,211; - end; - case 3: - close; - } - } - end; -} - -schg_cas01,127,302,0 script LF-08#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",89,43; - end; - case 2: - warp "schg_cas01",94,147; - end; - case 3: - warp "schg_cas01",100,242; - end; - case 4: - close; - } - } - end; -} - -schg_cas01,130,302,0 script LF-09#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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-3:Area 3-2:Cancel")) { - case 1: - warp "schg_cas01",141,45; - end; - case 2: - warp "schg_cas01",163,140; - end; - case 3: - warp "schg_cas01",136,243; - end; - case 4: - close; - } - } - end; -} - -schg_cas01,133,302,0 script LF-10#schg_cas01 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",275,244; - end; - case 2: - close; - } - } - end; -} - -schg_cas01,17,45,0 script Himinn#LF_sc01_1::LF_sc01_1 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",120,290; - end; - case 2: - close; - } - } - end; -} - +- duplicate(Manager#template) Manager#schg_cas01 -1 +- duplicate(gard#template) gard1#schg_cas01 -1 +- duplicate(gard#template) gard2#schg_cas01 -1 +- duplicate(df#template) df1#schg_cas01 -1 +- duplicate(df#template) df2#schg_cas01 -1 +- duplicate(RL#template) RL0#schg_cas01 -1 +- duplicate(RL#template) RL1#schg_cas01 -1 +- duplicate(RL#template) RL2#schg_cas01 -1 +- duplicate(RL#template) RL3#schg_cas01 -1 + +schg_cas01,247,305,3 duplicate(Steward#template) Steward#sc01 55 +schg_cas01,123,306,3 duplicate(Guardian#template) Ef#sc01 868 +schg_cas01,300,287,5 duplicate(Kafra#template) Kafra Employee#sc01 117 +schg_cas01,27,36,0 duplicate(Guardian Stone#template) 1st Guardian Stone#sc01 844 +schg_cas01,208,75,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#sc01 844 +schg_cas01,124,52,0 duplicate(Control#template) Control Device01#sc01 111 +schg_cas01,128,157,0 duplicate(Control#template) Control Device02#sc01 111 +schg_cas01,109,247,0 duplicate(Control#template) Control Device03#sc01 111 +schg_cas01,391,391,0 duplicate(Switch#template) #sch01_switch 111 +schg_cas01,280,391,3 duplicate(Sunflower#template) Mysterious Sunflower#01 976 + +schg_cas01,106,302,0 script LF-01#schg_cas01 111,{ callfunc "LinkFlag","First Gate House",19,26,"Second Gate House",219,90; } +schg_cas01,109,302,0 script LF-02#schg_cas01 111,{ callfunc "LinkFlag","Defense Area 1-1",89,43,"Defense Area 1-2",141,45; } +schg_cas01,112,302,0 script LF-03#schg_cas01 111,{ callfunc "LinkFlag","Defense Area 2-1",137,54,"Defense Area 2-2",102,54; } +schg_cas01,115,302,0 script LF-04#schg_cas01 111,{ callfunc "LinkFlag","Defense Area 2-3",94,147,"Defense Area 2-4",163,140; } +schg_cas01,118,302,0 script LF-05#schg_cas01 111,{ callfunc "LinkFlag","Defense Area 2-3",87,220,"Defense Area 2-4",151,220; } +schg_cas01,121,302,0 script LF-06#schg_cas01 111,{ callfunc "LinkFlag","Defense Area 3-1",100,242,"Defense Area 3-2",136,242; } +schg_cas01,124,302,0 script LF-07#schg_cas01 111,{ callfunc "LinkFlag","Center 1 Area",120,168,"Center 2 Area",119,211; } +schg_cas01,127,302,0 script LF-08#schg_cas01 111,{ callfunc "LinkFlag","Area 1-1",89,43,"Area 2-1",94,147,"Area 3-1",100,242; } +schg_cas01,130,302,0 script LF-09#schg_cas01 111,{ callfunc "LinkFlag","Area 1-2",141,45,"Area 2-3",163,140,"Area 3-2",136,243; } +schg_cas01,133,302,0 script LF-10#schg_cas01 111,{ callfunc "LinkFlag","Convenience Facility",275,244; } +schg_cas01,17,45,0 script Himinn#LF_sc01_1::LF_sc01_1 111,{ callfunc "LinkFlag","Emperium Center",120,290; } schg_cas01,207,95,0 duplicate(LF_sc01_1) Himinn#LF_sc01_2 111 - schg_cas01,111,46,4 script Himinn#LF_sc01_3::LF_sc01_2 722,{ - set .@GID, GetCastleData("schg_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 "schg_cas01",120,290; - end; - case 2: - close; - } - } + callfunc "LinkFlag","Emperium Center",120,290; end; - OnInterIfInitOnce: OnRecvCastleSc01: FlagEmblem GetCastleData("schg_cas01",1); end; } - schg_cas01,129,46,4 duplicate(LF_sc01_2) Himinn#LF_sc01_4 722 schg_cas01,99,77,0 duplicate(LF_sc01_1) Himinn#LF_sc01_5 111 schg_cas01,140,77,0 duplicate(LF_sc01_1) Himinn#LF_sc01_6 111 @@ -2267,670 +63,12 @@ schg_cas01,126,238,0 duplicate(LF_sc01_1) Himinn#LF_sc01_12 111 schg_cas01,95,247,0 duplicate(LF_sc01_1) Himinn#LF_sc01_13 111 schg_cas01,144,247,0 duplicate(LF_sc01_1) Himinn#LF_sc01_14 111 -// Guild Manager -schg_cas01,247,305,3 script Steward#sch01 55,{ - set .@GID, GetCastleData("schg_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("schg_cas01",2) + "."; - if (GetCastleData("schg_cas01",4) > 0) { - mes "Last time, you invested in"; - mes "Commercial Growth " + GetCastleData("schg_cas01",4) + "."; - } - next; - mes "[ Steward ]"; - mes "Our stronghold's"; - mes "safeguard level is " + GetCastleData("schg_cas01",3) + "."; - if (GetCastleData("schg_cas01",5) > 0) { - mes "Last time, you invested"; - mes "in defense " + GetCastleData("schg_cas01",5) + " times."; - } - mes " "; - mes "That is all, master."; - close; - case 2: - set .@Economy,GetCastleData("schg_cas01",2); - if (.@Economy < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas01",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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("schg_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("schg_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 (GetCastleData("schg_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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "schg_cas01",4,GetCastleData("schg_cas01",4)+1; - 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("schg_cas01",3); - if (.@Defence < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas01",5)) { - set .@def_invest,.@def_invest*4; - } - 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("schg_cas01",3) == 100) { - mes "The Defense Level of this"; - mes "stronghold is 100%, and"; - mes "cannot be increased further."; - close; - } - if (GetCastleData("schg_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; - } - if (GetCastleData("schg_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 (GetCastleData("schg_cas01",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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 "schg_cas01",5,GetCastleData("schg_cas01",5)+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("schg_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#sch01"; - SetCastleData "schg_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#sch01"; - SetCastleData "schg_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 "schg_cas01",381,381; - 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("schg_cas01",2) - 5; - if (.@Economy < 0) set .@Economy, 0; - SetCastleData "schg_cas01", 2, .@Economy; - // Lower Castle Defence - set .@Defence,GetCastleData("schg_cas01",3) - 5; - if (.@Defence < 0) set .@Defence, 0; - SetCastleData "schg_cas01", 3, .@Defence; - // Set new owner - SetCastleData "schg_cas01",1, .@GID; - // Clear castle's data. - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) - SetCastleData "schg_cas01", .@i, 0; - // Disable Kafra - disablenpc "Kafra Employee#sch01"; - - set .msg,2; - if (.msg == 1) { - announce "Fortress [" + GetCastleName("schg_cas01") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch01_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 1] stronghold of "+GetCastleName("schg_cas01"),bc_all|bc_woe; - mapannounce "schg_cas01","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - donpcevent "Manager#sch01_02::Onreset"; - initnpctimer; - } - else { - donpcevent "Manager#sch01_02::Onreset"; - stopnpctimer; - } - } - else if (.msg == 0) { - announce "Fortress [" + GetCastleName("schg_cas01") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch01_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2; - donpcevent "::OnRecvCastlesc01"; - end; - -OnTimer10000: - donpcevent "Manager#sch01_02::Onchange"; - mapannounce "schg_cas01","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -schg_cas01,300,287,5 script Kafra Employee#sch01 117,{ - cutin "kafra_01",2; - set .@GID, GetCastleData("schg_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("NV_BASIC") < 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("Juno -> 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 "yuno",158,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; - } - -OnRecvCastlesc01: - if (GetCastleData("schg_cas01",1) == 0) { - monster "schg_cas01",0,0,"Evil Druid",1117,10; - monster "schg_cas01",0,0,"Khalitzburg",1132,4; - monster "schg_cas01",0,0,"Abysmal Knight",1219,3; - monster "schg_cas01",0,0,"Executioner",1205,1; - monster "schg_cas01",0,0,"Penomena",1216,10; - monster "schg_cas01",0,0,"Alarm",1193,18; - monster "schg_cas01",0,0,"Clock",1269,9; - monster "schg_cas01",0,0,"Raydric Archer",1276,12; - monster "schg_cas01",0,0,"Wanderer",1208,3; - monster "schg_cas01",0,0,"Alice",1275,1; - monster "schg_cas01",0,0,"Bloody Knight",1268,2; - monster "schg_cas01",0,0,"Dark Lord",1272,2; - monster "schg_cas01",0,0,"Tower Keeper",1270,4; - } - if (GetCastleData("schg_cas01",9) < 1) { - disablenpc "Kafra Employee#sch01"; - } - end; -} - -schg_cas01,391,391,0 script #sch01_switch 111,{ - mes " "; - mes "^3355FFWill you pull"; - mes "this small lever?^000000"; - next; - switch(select("Pull Lever:Cancel")) { - case 1: - warp "schg_cas01",275,244; - end; - case 2: - close; - } -} - sch_gld,290,90,0 script Himinn#flag_sc01_1::Sc01_Flag 722,{ - set .@GID, GetCastleData("schg_cas01",1); - if (.@GID == 0) { - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt 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("schg_cas01",1); - if (getcharid(2) == .@GID) { - warp "schg_cas01",120,290; - end; - } - close; - case 2: - close; - } - } - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt decrees that"; - mes "this stronghold is owned"; - mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; - next; - mes "[ Schwaltzvalt 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; - } - + callfunc "ReturnFlag","schg_cas01",1; + end; OnInterIfInitOnce: OnRecvCastlesc01: FlagEmblem GetCastleData("schg_cas01",1); end; } - -sch_gld,297,90,0 duplicate(Sc01_Flag) Himinn#flag_sc01_2 722 +sch_gld,297,90,0 duplicate(Sc01_Flag) Himinn#flag_sc01_2 722 \ No newline at end of file diff --git a/npc/guild2/schg_cas02.txt b/npc/guild2/schg_cas02.txt index 32c52899a..144ead956 100644 --- a/npc/guild2/schg_cas02.txt +++ b/npc/guild2/schg_cas02.txt @@ -1,2190 +1,45 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Andlangr //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.2 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Schwaltzvalt Castle 2 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Fixed setcell range of first barricade. [L0ne_W0lf] -//= 1.2 Fixed first Barricade being desotryable. [L0ne_W0lf] -//= 1.3 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.4 Fixed 3rd Control Device wasting supplies. [L0ne_W0lf] -//= 1.5 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.6 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.7 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.8 Fixed error with control devices. [L0ne_W0lf] -//= 1.9 Replaced effect numerics with constants. [L0ne_W0lf] -//= 2.0 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.0a Corrected investment data being reset before applied. -//= 2.1 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.2 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -schg_cas02,1,1,0 script Manager#sch02_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlesc02: - if (GetCastleData("schg_cas02",1) == 0) { - donpcevent "Manager#sch02_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - MapRespawnGuildID "schg_cas02",GetCastleData("schg_cas02",1),2; - GvgOn "schg_cas02"; - donpcevent "Manager#sch02_02::Onstart"; - } - else { - donpcevent "#sch02_RL00::OnDisable"; - donpcevent "#sch02_RL01::OnDisable"; - donpcevent "#sch02_RL02::OnDisable"; - donpcevent "#sch02_RL03::OnDisable"; - } - end; - -OnAgitEnd2: - GvgOff "schg_cas02"; - if (GetCastleData("schg_cas02",1)) { - KillMonster "schg_cas02","Steward#sch02::OnStartArena"; - donpcevent "Manager#sch02_02::Onreset"; - donpcevent "Steward#sch02::Onstop"; - } - 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("schg_cas02",1)) { - setarray $agit_sc02[0],0,0,0,0,0,0; - donpcevent "#sch02_df01::OnEnable"; - donpcevent "#sch02_df02::OnEnable"; - donpcevent "#sch02_RL00::OnEnable"; - donpcevent "#sch02_RL01::OnEnable"; - donpcevent "#sch02_RL02::OnEnable"; - donpcevent "#sch02_RL03::OnEnable"; - } - monster "schg_cas02",162,193,"Emperium",1288,1,"Steward#sch02::OnStartArena"; - end; - -Onreset: - donpcevent "#sch02_df01::OnDisable"; - donpcevent "#sch02_df02::OnDisable"; - donpcevent "#sch02_gard01::Onreset"; - donpcevent "#sch02_gard02::Onreset"; - donpcevent "#sch02_RL00::OnDisable"; - donpcevent "#sch02_RL01::OnDisable"; - donpcevent "#sch02_RL02::OnDisable"; - donpcevent "#sch02_RL03::OnDisable"; - donpcevent "1st Guardian Stone#sch02::OnDisable"; - donpcevent "2nd Guardian Stone#sch02::OnDisable"; - donpcevent "Control Device01#sch02::OnDisable"; - donpcevent "Control Device02#sch02::OnDisable"; - donpcevent "Control Device03#sch02::OnDisable"; - if (agitcheck2()) { - setarray $agit_sc02[0],0,0,1,1,1,0; - } - end; - -Onchange: - setarray $agit_sc02[0],2,2,1,1,2,0; - monster "schg_cas02",162,193,"Emperium",1288,1,"Steward#sch02::OnStartArena"; - donpcevent "Control Device03#sch02::OnEnable"; - donpcevent "1st Guardian Stone#sch02::OnEnable"; - donpcevent "2nd Guardian Stone#sch02::OnEnable"; - end; - -OnClock0001: - if (!GetCastleData("schg_cas02",1)) end; - killmonster "schg_cas02","Manager#sch02_02::OnTreasureDied"; - - if (GetCastleData("schg_cas02",4)) { - set .@Economy,GetCastleData("schg_cas02",2); - SetCastleData "schg_cas02",2,.@Economy + GetCastleData("schg_cas02",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("schg_cas02",2) > 100) SetCastleData "schg_cas02",2,100; - setcastledata "schg_cas02",4,0; - } - if (GetCastleData("schg_cas02",5)) { - set .@Defence,GetCastleData("schg_cas02",3); - SetCastleData "schg_cas02",3,.@Defence + GetCastleData("schg_cas02",5); - if (GetCastleData("schg_cas02",3) > 100) SetCastleData "schg_cas02",3,100; - setcastledata "schg_cas02",5,0; - } - - set .@Treasure,GetCastleData("schg_cas02",2)/5+4; - if (.@Treasure) { - monster "schg_cas02",249,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - monster "schg_cas02",250,378,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - monster "schg_cas02",251,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - monster "schg_cas02",252,378,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 5) end; - monster "schg_cas02",253,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 6) end; - monster "schg_cas02",246,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 7) end; - monster "schg_cas02",247,376,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 8) end; - monster "schg_cas02",248,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 9) end; - monster "schg_cas02",249,376,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 10) end; - monster "schg_cas02",250,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 11) end; - monster "schg_cas02",250,374,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 12) end; - monster "schg_cas02",251,374,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 13) end; - monster "schg_cas02",252,374,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 14) end; - monster "schg_cas02",253,374,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 15) end; - monster "schg_cas02",246,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 16) end; - monster "schg_cas02",247,372,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 17) end; - monster "schg_cas02",248,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 18) end; - monster "schg_cas02",249,372,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 19) end; - monster "schg_cas02",250,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 20) end; - monster "schg_cas02",249,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 21) end; - monster "schg_cas02",250,370,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 22) end; - monster "schg_cas02",251,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 23) end; - monster "schg_cas02",252,270,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied"; - if (.@Treasure < 24) end; - monster "schg_cas02",253,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied"; - } - end; - -OnTreasureDied: - end; -} - -schg_cas02,140,184,3 script Endeef#sch02_01 868,{ - set .@GID, GetCastleData("schg_cas02",1); - if (.@GID == 0) { - mes "[Endeef]"; - 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 "[Endeef]"; - 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 (agitcheck2() == 0) { - mes "[Endeef]"; - mes "I am Endeef, guardian of"; - mes "this stronghold. For now,"; - mes "all is quiet in this place."; - next; - switch(select("Converse:Cancel")) { - case 1: - mes "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - 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 "[Endeef]"; - mes "You have no questions"; - mes "to ask of me? Well, I'm"; - mes "here to serve your needs."; - close; - } - case 2: - mes "[Endeef]"; - mes "I'm always here, so"; - mes "feel free to request my"; - mes "assistance whenever"; - mes "the need arises."; - close; - } - } - else { - mes "[Endeef]"; - mes "Greetings, "+strcharinfo(0)+"."; - mes "What are your orders?"; - next; - switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { - case 1: - if ($agit_sc02[5] == 0) { - if (getgdskilllv(.@GID,10002) == 0) { - mes "[Endeef]"; - 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 "[Endeef]"; - 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_sc02[5],1; - if ($agit_sc02[0] == 0) { - donpcevent "#sch02_gard01::OnEnable"; - } - if ($agit_sc02[1] == 0) { - donpcevent "#sch02_gard02::OnEnable"; - } - close; - } - } - else { - mes "[Endeef]"; - mes "You've already commanded"; - mes "me to summon a Guardian"; - mes "to defend the stronghold."; - close; - } - case 2: - mes "[Endeef]"; - mes "Our defense status is..."; - if ($agit_sc02[0] == 1) { - mes "1st Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc02[0] == 2) { - mes "1st Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "1st Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc02[1] == 1) { - mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc02[1] == 2) { - mes "2nd Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc02[2] == 1) { - mes "1st Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc02[2] == 2) { - mes "1st Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "1st Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc02[3] == 1) { - mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc02[3] == 2) { - mes "2nd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc02[4] == 1) { - mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc02[4] == 2) { - mes "3rd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; - } - close; - case 3: - mes "[Endeef]"; - mes "I'll be standing by,"; - mes "awaiting your orders."; - close; - } - } - } - } - else { - mes "[Endeef]"; - mes "Who are you? Scoundrel!"; - mes "Leave this stronghold now!"; - close; - } - -OnInit: - setarray $agit_sc02[0],0,0,0,0,0,0; - end; -} - -schg_cas02,1,1,0 script #sch02_gard01 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas02",3); - guardian "schg_cas02",326,83,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1; - guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1; - guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2; - guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1; - guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2; - guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //3; - guardian "schg_cas02",285,40,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",236,41,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //5; - mapannounce "schg_cas02","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",285,40,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //6; - mapannounce "schg_cas02","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer1800000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //7; - mapannounce "schg_cas02","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer2700000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //8; - mapannounce "schg_cas02","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer3600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //9; - mapannounce "schg_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 "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //10; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas02","#sch02_gard01::OnGuardianDied"; - end; -} - -schg_cas02,1,2,0 script #sch02_gard02 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas02",3); - guardian "schg_cas02",359,85,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12; - guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12; - guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13; - guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12; - guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13; - guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //14; - guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",359,85,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //20; - stopnpctimer; - end; - -OnGuardianDied: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount < 2) { - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas02",236,41,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //21; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas02","#sch02_gard02::OnGuardianDied"; - end; -} - -schg_cas02,1,3,0 script #sch02_df01 -1,{ -OnEnable: - guardian "schg_cas02",231,58,"1st Guardian Stone",1907,"#sch02_df01::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "schg_cas02","#sch02_df01::OnGuardianStoneDied"; - setarray $agit_sc02[0],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 1st Guardian Stone is Destroyed - setarray $agit_sc02[0],1; - if (($agit_sc02[0] == 1) || ($agit_sc02[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc02[1] == 1) || ($agit_sc02[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch02_RL00::OnDisable"; - donpcevent "#sch02_gard01::Onreset"; - } - else { - mapannounce "schg_cas02","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch02_gard01::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "1st Guardian Stone#sch02::OnEnable"; - setarray $agit_sc02[0],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas02,231,57,0 script 1st Guardian Stone#sch02 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc02[0] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "already completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch02_df01::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "1st Guardian Stone#sch02"; - setarray $agit_sc02[0],0; - set .@df_all,$agit_sc02[0]+$agit_sc02[1]; - if (.@df_all == 0) { - mapannounce "schg_cas02","The Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch02_RL00::OnEnable"; - } - else { - mapannounce "schg_cas02","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc02[5] == 1) { - donpcevent "#sch02_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#sch02"; - end; - -OnEnable: - enablenpc "1st Guardian Stone#sch02"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "1st Guardian Stone#sch02"; - end; -} - -schg_cas02,1,4,0 script #sch02_df02 -1,{ -OnEnable: - guardian "schg_cas02",335,230,"2nd Guardian Stone",1908,"#sch02_df02::OnGuardianStoneDied"; //23; - end; - -OnDisable: - killmonster "schg_cas02","#sch02_df02::OnGuardianStoneDied"; - setarray $agit_sc02[1],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 2nd Guardian Stone is Destroyed - setarray $agit_sc02[1],1; - if (($agit_sc02[0] == 1) || ($agit_sc02[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc02[1] == 1) || ($agit_sc02[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch02_RL00::OnDisable"; - donpcevent "#sch02_gard02::Onreset"; - } - else { - mapannounce "schg_cas02","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch02_gard02::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "2nd Guardian Stone#sch02::OnEnable"; - setarray $agit_sc02[1],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas02,335,231,0 script 2nd Guardian Stone#sch02 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc02[1] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "successfully completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch02_df02::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "2nd Guardian Stone#sch02"; - setarray $agit_sc02[1],0; - set .@df_all,$agit_sc02[0]+$agit_sc02[1]; - if (.@df_all == 0) { - mapannounce "schg_cas02","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch02_RL00::OnEnable"; - } - else { - mapannounce "schg_cas02","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc02[5] == 1) { - donpcevent "#sch02_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#sch02"; - end; - -OnEnable: - enablenpc "2nd Guardian Stone#sch02"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#sch02"; - end; -} - -schg_cas02,2,1,0 script #sch02_RL00 -1,{ -OnEnable: - setwall "schg_cas02",290,98,8,0,0,"sch02_RL00"; - guardian "schg_cas02",289,98," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //24; - guardian "schg_cas02",289,100," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //25; - guardian "schg_cas02",289,102," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //26; - guardian "schg_cas02",289,104," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //27; - end; - -OnDisable: - delwall "sch02_RL00"; - killmonster "schg_cas02","#sch02_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -schg_cas02,2,2,0 script #sch02_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas02",279,98,8,0,1,"sch02_RL01"; - guardian "schg_cas02",280,98," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //28; - guardian "schg_cas02",280,100," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //29; - guardian "schg_cas02",280,102," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //30; - guardian "schg_cas02",281,99," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //31; - guardian "schg_cas02",281,101," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //32; - guardian "schg_cas02",281,103," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //33; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc02[2],1; - mapannounce "schg_cas02","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch02_RL01"; - } - end; - -OnDisable: - delwall "sch02_RL01"; - killmonster "schg_cas02","#sch02_RL01::OnBarrierDestroyed"; - end; -} - -schg_cas02,2,3,0 script #sch02_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas02",230,213,6,0,1,"sch02_RL02"; - guardian "schg_cas02",231,214," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //34; - guardian "schg_cas02",231,216," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //35; - guardian "schg_cas02",231,218," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //36; - guardian "schg_cas02",232,213," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //37; - guardian "schg_cas02",232,215," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //38; - guardian "schg_cas02",232,217," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //39; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc02[3],1; - mapannounce "schg_cas02","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch02_RL02"; - } - end; - -OnDisable: - delwall "sch02_RL02"; - killmonster "schg_cas02","#sch02_RL02::OnBarrierDestroyed"; - end; -} - -schg_cas02,2,4,0 script #sch02_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "schg_cas02",160,141,6,6,1,"sch02_RL03"; - guardian "schg_cas02",160,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //40; - guardian "schg_cas02",162,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //41; - guardian "schg_cas02",164,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //42; - guardian "schg_cas02",166,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //43; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc02[4],1; - mapannounce "schg_cas02","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; - delwall "sch02_RL03"; - } - end; - -OnDisable: - delwall "sch02_RL03"; - killmonster "schg_cas02","#sch02_RL03::OnBarrierDestroyed"; - end; -} - -schg_cas02,288,97,0 script Control Device01#sch02 111,{ - set .@GID, GetCastleData("schg_cas02",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc02[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 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 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 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 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 (agitcheck2() == 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 "#sch02_RL01::OnEnable"; - disablenpc "Control Device01#sch02"; - mapannounce "schg_cas02","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc02[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#sch02"; - end; - -OnEnable: - enablenpc "Control Device01#sch02"; - end; - -OnDisable: - disablenpc "Control Device01#sch02"; - end; -} - -schg_cas02,230,209,0 script Control Device02#sch02 111,{ - set .@GID, GetCastleData("schg_cas02",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc02[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 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 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 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 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 (agitcheck2() == 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 "#sch02_RL02::OnEnable"; - disablenpc "Control Device02#sch02"; - mapannounce "schg_cas02","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc02[3],0; //Global Variable - setarray $agit_sc02[2],2; //Global Variable - donpcevent "Control Device01#sch02::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#sch02"; - end; - -OnEnable: - enablenpc "Control Device02#sch02"; - end; - -OnDisable: - disablenpc "Control Device02#sch02"; - end; -} - -schg_cas02,159,143,0 script Control Device03#sch02 111,{ - set .@GID, GetCastleData("schg_cas02",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc02[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 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 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 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 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 (agitcheck2() == 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 "#sch02_RL03::OnEnable"; - disablenpc "Control Device03#sch02"; - mapannounce "schg_cas02","The 3rd Fortress Gate has been reconstructed!!",bc_map,"0x00ff00"; - setarray $agit_sc02[4],0; - setarray $agit_sc02[3],2; - donpcevent "Control Device02#sch02::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 Device03#sch02"; - end; - -OnEnable: - enablenpc "Control Device03#sch02"; - end; - -OnDisable: - disablenpc "Control Device03#sch02"; - end; -} - -// Link Flags -schg_cas02,143,198,0 script LF-01#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",235,44; - end; - case 2: - warp "schg_cas02",302,233; - end; - case 3: - close; - } - } - end; -} - -schg_cas02,143,202,0 script LF-02#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",317,83; - end; - case 2: - warp "schg_cas02",359,83; - end; - case 3: - close; - } - } - end; -} - -schg_cas02,143,206,0 script LF-03#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",283,79; - end; - case 2: - warp "schg_cas02",280,122; - end; - case 3: - close; - } - } - end; -} - -schg_cas02,145,208,0 script LF-04#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",215,110; - end; - case 2: - warp "schg_cas02",255,215; - end; - case 3: - close; - } - } - end; -} - -schg_cas02,180,208,0 script LF-05#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 1 Area:Center 2 Area:Cancel")) { - case 1: - warp "schg_cas02",338,153; - end; - case 2: - warp "schg_cas02",213,226; - end; - case 3: - close; - } - } - end; -} - -schg_cas02,182,206,0 script LF-06#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 2-1:Defense area 3-1:Cancel")) { - case 1: - warp "schg_cas02",317,83; - end; - case 2: - warp "schg_cas02",283,79; - end; - case 3: - warp "schg_cas02",215,110; - end; - case 4: - close; - } - } - end; -} - -schg_cas02,182,202,0 script LF-07#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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("Area 1-2:Area 2-2:Area 3-2:Cancel")) { - case 1: - warp "schg_cas02",359,83; - end; - case 2: - warp "schg_cas02",280,122; - end; - case 3: - warp "schg_cas02",255,215; - end; - case 4: - close; - } - } - end; -} - -schg_cas02,182,198,0 script LF-08#schg_cas02 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",101,306; - end; - case 2: - close; - } - } - end; -} - -schg_cas02,235,222,0 script Andlangr#LF_sc02_1::LF_sc02_1 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas02",136,188; - end; - case 2: - close; - } - } - end; -} - +- duplicate(Manager#template) Manager#schg_cas02 -1 +- duplicate(gard#template) gard1#schg_cas02 -1 +- duplicate(gard#template) gard2#schg_cas02 -1 +- duplicate(df#template) df1#schg_cas02 -1 +- duplicate(df#template) df2#schg_cas02 -1 +- duplicate(RL#template) RL0#schg_cas02 -1 +- duplicate(RL#template) RL1#schg_cas02 -1 +- duplicate(RL#template) RL2#schg_cas02 -1 +- duplicate(RL#template) RL3#schg_cas02 -1 + +schg_cas02,105,378,3 duplicate(Steward#template) Steward#sc02 55 +schg_cas02,140,184,3 duplicate(Guardian#template) Endeef#sc02 868 +schg_cas02,131,365,3 duplicate(Kafra#template) Kafra Employee#sc02 117 +schg_cas02,231,57,0 duplicate(Guardian Stone#template) 1st Guardian Stone#sc02 844 +schg_cas02,335,231,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#sc02 844 +schg_cas02,288,97,0 duplicate(Control#template) Control Device01#sc02 111 +schg_cas02,230,209,0 duplicate(Control#template) Control Device02#sc02 111 +schg_cas02,159,143,0 duplicate(Control#template) Control Device03#sc02 111 +schg_cas02,257,369,0 duplicate(Switch#template) #sc02_switch 111 +schg_cas02,174,328,3 duplicate(Sunflower#template) Mysterious Sunflower#02 976 + +schg_cas02,143,198,0 script LF-01#schg_cas02 111,{ callfunc "LinkFlag","First Gate House",235,44,"Second Gate House",302,233; } +schg_cas02,143,202,0 script LF-02#schg_cas02 111,{ callfunc "LinkFlag","Defense Area 1-1",317,83,"Defense Area 1-2",359,83; } +schg_cas02,143,206,0 script LF-03#schg_cas02 111,{ callfunc "LinkFlag","Defense Area 2-1",283,79,"Defense Area 2-2",280,122; } +schg_cas02,145,208,0 script LF-04#schg_cas02 111,{ callfunc "LinkFlag","Defense Area 3-1",215,110,"Defense Area 3-2",255,215; } +schg_cas02,180,208,0 script LF-05#schg_cas02 111,{ callfunc "LinkFlag","Center 1 Area",338,153,"Center 2 Area",213,226; } +schg_cas02,182,206,0 script LF-06#schg_cas02 111,{ callfunc "LinkFlag","Defense Area 1-1",317,83,"Defense Area 2-1",283,79,"Defense Area 3-1",215,110; } +schg_cas02,182,202,0 script LF-07#schg_cas02 111,{ callfunc "LinkFlag","Area 1-2",359,83,"Area 2-2",280,122,"Area 3-2",255,215; } +schg_cas02,182,198,0 script LF-08#schg_cas02 111,{ callfunc "LinkFlag","Convenience Facility",101,306; } +schg_cas02,235,222,0 script Andlangr#LF_sc02_1::LF_sc02_1 111,{ callfunc "LinkFlag","Emperium Center",136,188; } schg_cas02,157,136,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_2 111 schg_cas02,168,136,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_3 111 schg_cas02,320,232,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_4 111 @@ -2200,670 +55,12 @@ schg_cas02,261,162,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_13 111 schg_cas02,244,162,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_14 111 schg_cas02,235,207,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_15 111 -// Guild Manager -schg_cas02,105,378,3 script Steward#sch02 55,{ - set .@GID, GetCastleData("schg_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("schg_cas02",2) + "."; - if (GetCastleData("schg_cas02",4) > 0) { - mes "Last time, you invested in"; - mes "Commercial Growth " + GetCastleData("schg_cas02",4) + "."; - } - next; - mes "[ Steward ]"; - mes "Our stronghold's"; - mes "safeguard level is " + GetCastleData("schg_cas02",3) + "."; - if (GetCastleData("schg_cas02",5) > 0) { - mes "Last time, you invested"; - mes "in defense " + GetCastleData("schg_cas02",5) + " times."; - } - mes " "; - mes "That is all, master."; - close; - case 2: - set .@Economy,GetCastleData("schg_cas02",2); - if (.@Economy < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas02",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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("schg_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("schg_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 (GetCastleData("schg_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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "schg_cas02",4,GetCastleData("schg_cas02",4)+1; - 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("schg_cas02",3); - if (.@Defence < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas02",5)) { - set .@def_invest,.@def_invest*4; - } - 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("schg_cas02",3) == 100) { - mes "The Defense Level of this"; - mes "stronghold is 100%, and"; - mes "cannot be increased further."; - close; - } - if (GetCastleData("schg_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; - } - if (GetCastleData("schg_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 (GetCastleData("schg_cas02",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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 "schg_cas02",5,GetCastleData("schg_cas02",5)+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("schg_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#sch02"; - SetCastleData "schg_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#sch02"; - SetCastleData "schg_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 "schg_cas02",249,373; - 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("schg_cas02",2) - 5; - if (.@Economy < 0) set .@Economy, 0; - SetCastleData "schg_cas02", 2, .@Economy; - // Lower Castle Defence - set .@Defence,GetCastleData("schg_cas02",3) - 5; - if (.@Defence < 0) set .@Defence, 0; - SetCastleData "schg_cas02", 3, .@Defence; - // Set new owner - SetCastleData "schg_cas02",1, .@GID; - // Clear castle's data. - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) - SetCastleData "schg_cas02", .@i, 0; - // Disable Kafra - disablenpc "Kafra Employee#sch02"; - - set .msg,2; - if (.msg == 1) { - announce "Fortress [" + GetCastleName("schg_cas02") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch02_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 2] stronghold of "+GetCastleName("schg_cas02"),bc_all|bc_woe; - mapannounce "schg_cas02","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - donpcevent "Manager#sch02_02::Onreset"; - initnpctimer; - } - else { - donpcevent "Manager#sch02_02::Onreset"; - stopnpctimer; - } - } - else if (.msg == 0) { - announce "Fortress [" + GetCastleName("schg_cas02") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch02_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "schg_cas02",GetCastleData("schg_cas02",1),2; - donpcevent "::OnRecvCastlesc02"; - end; - -OnTimer10000: - donpcevent "Manager#sch02_02::Onchange"; - mapannounce "schg_cas02","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -schg_cas02,131,365,3 script Kafra Employee#sch02 117,{ - cutin "kafra_01",2; - set .@GID, GetCastleData("schg_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("NV_BASIC") < 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("Juno -> 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 "yuno",158,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; - } - -OnRecvCastlesc02: - if (GetCastleData("schg_cas02",1) == 0) { - monster "schg_cas02",0,0,"Evil Druid",1117,10; - monster "schg_cas02",0,0,"Khalitzburg",1132,4; - monster "schg_cas02",0,0,"Abysmal Knight",1219,3; - monster "schg_cas02",0,0,"Executioner",1205,1; - monster "schg_cas02",0,0,"Penomena",1216,10; - monster "schg_cas02",0,0,"Alarm",1193,18; - monster "schg_cas02",0,0,"Clock",1269,9; - monster "schg_cas02",0,0,"Raydric Archer",1276,12; - monster "schg_cas02",0,0,"Wanderer",1208,3; - monster "schg_cas02",0,0,"Alice",1275,1; - monster "schg_cas02",0,0,"Bloody Knight",1268,2; - monster "schg_cas02",0,0,"Dark Lord",1272,2; - monster "schg_cas02",0,0,"Tower Keeper",1270,4; - } - if (GetCastleData("schg_cas02",9) < 1) { - disablenpc "Kafra Employee#sch02"; - } - end; -} - -schg_cas02,257,369,0 script #sc02_switch 111,{ - mes " "; - mes "^3355FFWill you pull"; - mes "this small lever?^000000"; - next; - switch(select("Pull Lever:Cancel")) { - case 1: - warp "schg_cas02",339,79; - end; - case 2: - close; - } -} - sch_gld,296,247,4 script Andlangr#flag_sc02_1::Sc02_Flag 722,{ - set .@GID, GetCastleData("schg_cas02",1); - if (.@GID == 0) { - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt 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("schg_cas02",1); - if (getcharid(2) == .@GID) { - warp "schg_cas02",136,188; - end; - } - close; - case 2: - close; - } - } - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt decrees that"; - mes "this stronghold is owned"; - mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; - next; - mes "[ Schwaltzvalt 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; - } - + callfunc "ReturnFlag","schg_cas02",1; + end; OnInterIfInitOnce: OnRecvCastlesc02: FlagEmblem GetCastleData("schg_cas02",1); end; } - -sch_gld,280,247,4 duplicate(Sc02_Flag) Andlangr#flag_sc02_2 722 +sch_gld,280,247,4 duplicate(Sc02_Flag) Andlangr#flag_sc02_2 722 \ No newline at end of file diff --git a/npc/guild2/schg_cas03.txt b/npc/guild2/schg_cas03.txt index 574290365..188b41229 100644 --- a/npc/guild2/schg_cas03.txt +++ b/npc/guild2/schg_cas03.txt @@ -1,2228 +1,47 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Vidblainn //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 2.4 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Schwaltzvalt Castle 3 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed 3rd Control Device wasting supplies. [L0ne_W0lf] -//= Also fixed donpcevent calling wrong NPC. -//= 1.2a Fixed another donpcevent calling the wrong NPC. [L0ne_W0lf] -//= 1.3 Wrong variable used to store castle information. [L0ne_W0lf] -//= 1.4 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.5 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.6 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.7 Fixed a typo when disabling a control device. [L0ne_W0lf] -//= 1.8 Changed the treasure box spawn from 1939 to 1940. [L0ne_W0lf] -//= 1.9 Replaced effect numerics with constants. [L0ne_W0lf] -//= 2.0 Fixed setcell coords for the first barricade. [L0ne_W0lf] -//= 2.1 Applied updated eco/def systems. [L0ne_W0lf] -//= 2.2 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 2.3 Fixed invalid corridinates when spawning a guardian. [L0ne_W0lf] -//= 2.4 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -schg_cas03,1,1,0 script Manager#sch03_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlesc03: - if (GetCastleData("schg_cas03",1) == 0) { - donpcevent "Manager#sch03_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - MapRespawnGuildID "schg_cas03",GetCastleData("schg_cas03",1),2; - GvgOn "schg_cas03"; - donpcevent "manager#sch03_02::Onstart"; - } - else { - donpcevent "#sch03_RL00::OnDisable"; - donpcevent "#sch03_RL01::OnDisable"; - donpcevent "#sch03_RL02::OnDisable"; - donpcevent "#sch03_RL03::OnDisable"; - } - end; - -OnAgitEnd2: - GvgOff "schg_cas03"; - if (GetCastleData("schg_cas03",1)) { - KillMonster "schg_cas03","Steward#sch03::OnStartArena"; - donpcevent "Manager#sch03_02::Onreset"; - donpcevent "Steward#sch03::Onstop"; - } - 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("schg_cas03",1)) { - setarray $agit_sc03[0],0,0,0,0,0,0; - donpcevent "#sch03_df01::OnEnable"; - donpcevent "#sch03_df02::OnEnable"; - donpcevent "#sch03_RL00::OnEnable"; - donpcevent "#sch03_RL01::OnEnable"; - donpcevent "#sch03_RL02::OnEnable"; - donpcevent "#sch03_RL03::OnEnable"; - } - monster "schg_cas03",338,202,"Emperium",1288,1,"Steward#sch03::OnStartArena"; - end; - -Onreset: - donpcevent "#sch03_df01::OnDisable"; - donpcevent "#sch03_df02::OnDisable"; - donpcevent "#sch03_gard01::Onreset"; - donpcevent "#sch03_gard02::Onreset"; - donpcevent "#sch03_RL00::OnDisable"; - donpcevent "#sch03_RL01::OnDisable"; - donpcevent "#sch03_RL02::OnDisable"; - donpcevent "#sch03_RL03::OnDisable"; - donpcevent "1st Guardian Stone#sch03::OnDisable"; - donpcevent "2nd Guardian Stone#sch03::OnDisable"; - donpcevent "Control Device01#sch03::OnDisable"; - donpcevent "Control Device02#sch03::OnDisable"; - donpcevent "Control Device03#sch03::OnDisable"; - if (agitcheck2()) { - setarray $agit_sc03[0],0,0,1,1,1,0; - } - end; - -Onchange: - setarray $agit_sc03[0],2,2,1,1,2,0; - monster "schg_cas03",338,202,"Emperium",1288,1,"Steward#sch03::OnStartArena"; - donpcevent "Control Device03#sch03::OnEnable"; - donpcevent "1st Guardian Stone#sch03::OnEnable"; - donpcevent "2nd Guardian Stone#sch03::OnEnable"; - end; - -OnClock0001: - if (!GetCastleData("schg_cas03",1)) end; - killmonster "schg_cas03","Manager#sch03_02::OnTreasureDied"; - - if (GetCastleData("schg_cas03",4)) { - set .@Economy,GetCastleData("schg_cas03",2); - SetCastleData "schg_cas03",2,.@Economy + GetCastleData("schg_cas03",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("schg_cas03",2) > 100) SetCastleData "schg_cas03",2,100; - setcastledata "schg_cas03",4,0; - } - if (GetCastleData("schg_cas03",5)) { - set .@Defence,GetCastleData("schg_cas03",3); - SetCastleData "schg_cas03",3,.@Defence + GetCastleData("schg_cas03",5); - if (GetCastleData("schg_cas03",3) > 100) SetCastleData "schg_cas03",3,100; - setcastledata "schg_cas03",5,0; - } - - set .@Treasure,GetCastleData("schg_cas03",2)/5+4; - if (.@Treasure) { - monster "schg_cas03",189,21,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - monster "schg_cas03",190,21,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - monster "schg_cas03",191,21,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - monster "schg_cas03",192,21,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 5) end; - monster "schg_cas03",193,21,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 6) end; - monster "schg_cas03",194,21,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 7) end; - monster "schg_cas03",189,19,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 8) end; - monster "schg_cas03",190,19,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 9) end; - monster "schg_cas03",191,19,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 10) end; - monster "schg_cas03",192,19,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 11) end; - monster "schg_cas03",193,19,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 12) end; - monster "schg_cas03",194,19,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 13) end; - monster "schg_cas03",189,17,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 14) end; - monster "schg_cas03",190,17,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 15) end; - monster "schg_cas03",191,17,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 16) end; - monster "schg_cas03",192,17,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 17) end; - monster "schg_cas03",193,17,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 18) end; - monster "schg_cas03",194,17,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 19) end; - monster "schg_cas03",189,15,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 20) end; - monster "schg_cas03",190,15,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 21) end; - monster "schg_cas03",191,15,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 22) end; - monster "schg_cas03",192,15,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 23) end; - monster "schg_cas03",193,15,"Treasure Chest",1940,1,"Manager#sch03_02::OnTreasureDied"; - if (.@Treasure < 24) end; - monster "schg_cas03",194,15,"Treasure Chest",1324,1,"Manager#sch03_02::OnTreasureDied"; - } - end; - -OnTreasureDied: - end; -} - -schg_cas03,287,226,5 script Elzee#sch03_01 868,{ - set .@GID, GetCastleData("schg_cas03",1); - if (.@GID == 0) { - mes "[Elzee]"; - 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 "[Elzee]"; - 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 (agitcheck2() == 0) { - mes "[Elzee]"; - mes "I am Elzee, guardian of"; - mes "this stronghold. For now,"; - mes "all is quiet in this place."; - next; - switch(select("Converse:Cancel")) { - case 1: - mes "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - 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 "[Elzee]"; - mes "You have no questions"; - mes "to ask of me? Well, I'm"; - mes "here to serve your needs."; - close; - } - case 2: - mes "[Elzee]"; - mes "I'm always here, so"; - mes "feel free to request my"; - mes "assistance whenever"; - mes "the need arises."; - close; - } - } - else { - mes "[Elzee]"; - mes "Greetings, "+strcharinfo(0)+"."; - mes "What are your orders?"; - next; - switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { - case 1: - if ($agit_sc03[5] == 0) { - if (getgdskilllv(.@GID,10002) == 0) { - mes "[Elzee]"; - 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 "[Elzee]"; - 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_sc03[5],1; - if ($agit_sc03[0] == 0) { - donpcevent "#sch03_gard01::OnEnable"; - } - if ($agit_sc03[1] == 0) { - donpcevent "#sch03_gard02::OnEnable"; - } - close; - } - } - else { - mes "[Elzee]"; - mes "You've already commanded"; - mes "me to summon a Guardian"; - mes "to defend the stronghold."; - close; - } - case 2: - mes "[Elzee]"; - mes "Our defense status is..."; - if ($agit_sc03[0] == 1) { - mes "1st Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc03[0] == 2) { - mes "1st Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "1st Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc03[1] == 1) { - mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc03[1] == 2) { - mes "2nd Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc03[2] == 1) { - mes "1st Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc03[2] == 2) { - mes "1st Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "1st Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc03[3] == 1) { - mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc03[3] == 2) { - mes "2nd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc03[4] == 1) { - mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc03[4] == 2) { - mes "3rd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; - } - close; - case 3: - mes "[Elzee]"; - mes "I'll be standing by,"; - mes "awaiting your orders."; - close; - } - } - } - } - else { - mes "[Elzee]"; - mes "Who are you? Scoundrel!"; - mes "Leave this stronghold now!"; - close; - } - -OnInit: - setarray $agit_sc03[0],0,0,0,0,0,0; - end; -} - -schg_cas03,1,1,0 script #sch03_gard01 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas03",3); - guardian "schg_cas03",323,308,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //1; - guardian "schg_cas03",288,306,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //1; - guardian "schg_cas03",288,306,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //2; - guardian "schg_cas03",306,326,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //1; - guardian "schg_cas03",288,306,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //2; - guardian "schg_cas03",306,326,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //3; - guardian "schg_cas03",323,308,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "schg_cas03",306,325,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",323,308,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //5; - mapannounce "schg_cas03","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //6; - mapannounce "schg_cas03","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer1800000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",288,306,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //7; - mapannounce "schg_cas03","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer2700000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",306,325,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //8; - mapannounce "schg_cas03","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer3600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //9; - mapannounce "schg_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 "schg_cas03",273,309,"Guardian",1899,"#sch03_gard01::OnGuardianDied"; //10; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas03","#sch03_gard01::OnGuardianDied"; - end; -} - -schg_cas03,1,2,0 script #sch03_gard02 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas03",3); - guardian "schg_cas03",338,309,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //12; - guardian "schg_cas03",365,261,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //12; - guardian "schg_cas03",365,261,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //13; - guardian "schg_cas03",317,318,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //12; - guardian "schg_cas03",365,261,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //13; - guardian "schg_cas03",317,318,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //14; - guardian "schg_cas03",338,310,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",338,309,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",365,261,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",317,318,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",364,305,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //20; - stopnpctimer; - end; - -OnGuardianDied: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount < 2) { - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas03",329,314,"Guardian",1899,"#sch03_gard02::OnGuardianDied"; //21; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas03","#sch03_gard02::OnGuardianDied"; - end; -} - -schg_cas03,1,3,0 script #sch03_df01 -1,{ -OnEnable: - guardian "schg_cas03",242,309,"1st Guardian Stone",1907,"#sch03_df01::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "schg_cas03","#sch03_df01::OnGuardianStoneDied"; - setarray $agit_sc03[0],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 1st Guardian Stone is Destroyed - setarray $agit_sc03[0],1; - if (($agit_sc03[0] == 1) || ($agit_sc03[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc03[1] == 1) || ($agit_sc03[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas03","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch03_RL00::OnDisable"; - donpcevent "#sch03_gard01::Onreset"; - } - else { - mapannounce "schg_cas03","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch03_gard01::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "1st Guardian Stone#sch03::OnEnable"; - setarray $agit_sc03[0],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas03,242,309,0 script 1st Guardian Stone#sch03 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc03[0] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "already completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch03_df01::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "1st Guardian Stone#sch03"; - setarray $agit_sc03[0],0; - set .@df_all,$agit_sc03[0]+$agit_sc03[1]; - if (.@df_all == 0) { - mapannounce "schg_cas03","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch03_RL00::OnEnable"; - } - else { - mapannounce "schg_cas03","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc03[5] == 1) { - donpcevent "#sch03_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#sch03"; - end; - -OnEnable: - enablenpc "1st Guardian Stone#sch03"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "1st Guardian Stone#sch03"; - end; -} - -schg_cas03,1,4,0 script #sch03_df02 -1,{ -OnEnable: - guardian "schg_cas03",376,251,"2nd Guardian Stone",1908,"#sch03_df02::OnGuardianStoneDied"; //23; - end; - -OnDisable: - killmonster "schg_cas03","#sch03_df02::OnGuardianStoneDied"; - setarray $agit_sc03[1],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 2nd Guardian Stone is Destroyed - setarray $agit_sc03[1],1; - if (($agit_sc03[0] == 1) || ($agit_sc03[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc03[1] == 1) || ($agit_sc03[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas03","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch03_RL00::OnDisable"; - donpcevent "#sch03_gard02::Onreset"; - } - else { - mapannounce "schg_cas03","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch03_gard02::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "2nd Guardian Stone#sch03::OnEnable"; - setarray $agit_sc03[1],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas03,376,250,0 script 2nd Guardian Stone#sch03 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc03[1] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "successfully completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch03_df02::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "2nd Guardian Stone#sch03"; - setarray $agit_sc03[1],0; - set .@df_all,$agit_sc03[0]+$agit_sc03[1]; - if (.@df_all == 0) { - mapannounce "schg_cas03","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch03_RL00::OnEnable"; - } - else { - mapannounce "schg_cas03","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc03[5] == 1) { - donpcevent "#sch03_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#sch03"; - end; - -OnEnable: - enablenpc "2nd Guardian Stone#sch03"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#sch03"; - end; -} - -schg_cas03,2,1,0 script #sch03_RL00 -1,{ -OnEnable: - setwall "schg_cas03",326,301,6,6,0,"sch03_RL00"; - guardian "schg_cas03",326,300," ",1905,"#sch03_RL00::OnBarrierDestroyed"; //24; - guardian "schg_cas03",328,300," ",1905,"#sch03_RL00::OnBarrierDestroyed"; //25; - guardian "schg_cas03",330,300," ",1905,"#sch03_RL00::OnBarrierDestroyed"; //26; - end; - -OnDisable: - delwall "sch03_RL00"; - killmonster "schg_cas03","#sch03_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -schg_cas03,2,2,0 script #sch03_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas03",325,277,8,6,1,"sch03_RL01"; - guardian "schg_cas03",326,278," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //27; - guardian "schg_cas03",328,278," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //28; - guardian "schg_cas03",330,278," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //29; - guardian "schg_cas03",327,279," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //30; - guardian "schg_cas03",329,279," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //31; - guardian "schg_cas03",331,279," ",1905,"#sch03_RL01::OnBarrierDestroyed"; //32; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc03[2],1; - mapannounce "schg_cas03","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch03_RL01"; - } - end; - -OnDisable: - delwall "sch03_RL01"; - killmonster "schg_cas03","#sch03_RL01::OnBarrierDestroyed"; - end; -} - -schg_cas03,2,3,0 script #sch03_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setwall "schg_cas03",200,230,8,0,1,"sch03_RL02"; - guardian "schg_cas03",201,231," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //33; - guardian "schg_cas03",201,233," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //34; - guardian "schg_cas03",201,235," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //35; - guardian "schg_cas03",202,232," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //36; - guardian "schg_cas03",202,234," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //37; - guardian "schg_cas03",202,236," ",1905,"#sch03_RL02::OnBarrierDestroyed"; //38; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc03[3],1; - mapannounce "schg_cas03","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; - delwall "sch03_RL02"; - } - end; - -OnDisable: - delwall "sch03_RL02"; - killmonster "schg_cas03","#sch03_RL02::OnBarrierDestroyed"; - end; -} - -schg_cas03,2,4,0 script #sch03_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setwall "schg_cas03",285,198,8,0,1,"sch03_RL03"; - guardian "schg_cas03",284,199," ",1905,"#sch03_RL03::OnBarrierDestroyed"; //39; - guardian "schg_cas03",284,201," ",1905,"#sch03_RL03::OnBarrierDestroyed"; //40; - guardian "schg_cas03",284,203," ",1905,"#sch03_RL03::OnBarrierDestroyed"; //41; - guardian "schg_cas03",284,205," ",1905,"#sch03_RL03::OnBarrierDestroyed"; //42; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc03[4],1; - mapannounce "schg_cas03","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; - delwall "sch03_RL03"; - } - end; - -OnDisable: - delwall "sch03_RL03"; - killmonster "schg_cas03","#sch03_RL03::OnBarrierDestroyed"; - end; -} - -schg_cas03,335,298,0 script Control Device01#sch03 111,{ - set .@GID, GetCastleData("schg_cas03",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc03[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 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 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 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 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 (agitcheck2() == 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 "#sch03_RL01::OnEnable"; - disablenpc "Control Device01#sch03"; - mapannounce "schg_cas03","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc03[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#sch03"; - end; - -OnEnable: - enablenpc "Control Device01#sch03"; - end; - -OnDisable: - disablenpc "Control Device01#sch03"; - end; -} - -schg_cas03,200,227,0 script Control Device02#sch03 111,{ - set .@GID, GetCastleData("schg_cas03",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc03[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 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 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 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 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 (agitcheck2() == 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 "#sch03_RL02::OnEnable"; - disablenpc "Control Device02#sch03"; - mapannounce "schg_cas03","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc03[3],0; //Global Variable - setarray $agit_sc03[2],2; //Global Variable - donpcevent "Control Device01#sch03::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#sch03"; - end; - -OnEnable: - enablenpc "Control Device02#sch03"; - end; - -OnDisable: - disablenpc "Control Device02#sch03"; - end; -} - -schg_cas03,273,205,0 script Control Device03#sch03 111,{ - set .@GID, GetCastleData("schg_cas03",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc03[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 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 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 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 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 (agitcheck2() == 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 "#sch03_RL03::OnEnable"; - disablenpc "Control Device03#sch03"; - mapannounce "schg_cas03","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc03[4],0; - setarray $agit_sc03[3],2; - donpcevent "Control Device02#sch03::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 Device03#sch03"; - end; - -OnEnable: - enablenpc "Control Device03#sch03"; - end; - -OnDisable: - disablenpc "Control Device03#sch03"; - end; -} - -// Link Flags -schg_cas03,346,211,0 script LF-01#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",262,323; - end; - case 2: - warp "schg_cas03",378,263; - end; - case 3: - close; - } - } - end; -} - -schg_cas03,346,207,0 script LF-02#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Center 1 Area:Cancel")) { - case 1: - warp "schg_cas03",306,320; - end; - case 2: - close; - } - } - end; -} - -schg_cas03,346,203,0 script LF-03#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",309,292; - end; - case 2: - warp "schg_cas03",348,292; - end; - case 3: - close; - } - } - end; -} - -schg_cas03,346,199,0 script LF-04#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Center 2 Area:Cancel")) { - case 1: - warp "schg_cas03",266,263; - end; - case 2: - close; - } - } - end; -} - -schg_cas03,346,195,0 script LF-05#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",226,220; - end; - case 2: - warp "schg_cas03",185,249; - end; - case 3: - close; - } - } - end; -} - -schg_cas03,346,191,0 script LF-06#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Center 3 Area:Cancel")) { - case 1: - warp "schg_cas03",271,226; - end; - case 2: - close; - } - } - end; -} - -schg_cas03,301,213,0 script LF-07#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Area 1-2:Area 2-2:Area 3-2:Cancel")) { - case 1: - warp "schg_cas03",262,323; - end; - case 2: - warp "schg_cas03",378,263; - end; - case 3: - warp "schg_cas03",306,320; - end; - case 4: - close; - } - } - end; -} - -schg_cas03,301,209,0 script LF-08#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Area 2-1:Area 2-2:Center 2 Area:Cancel")) { - case 1: - warp "schg_cas03",309,292; - end; - case 2: - warp "schg_cas03",348,292; - end; - case 3: - warp "schg_cas03",326,263; - end; - case 4: - close; - } - } - end; -} - -schg_cas03,301,194,0 script LF-09#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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("Area 3-1:Area 3-2:Center 3 Area:Cancel")) { - case 1: - warp "schg_cas03",226,220; - end; - case 2: - warp "schg_cas03",185,249; - end; - case 3: - warp "schg_cas03",271,226; - end; - case 4: - close; - } - } - end; -} - -schg_cas03,301,190,0 script LF-10#schg_cas03 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",57,13; - end; - case 2: - close; - } - } - end; -} - -schg_cas03,335,305,0 script Vidblainn#LF_sc03_1::LF_sc03_1 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",308,202; - end; - case 2: - close; - } - } - end; -} - +- duplicate(Manager#template) Manager#schg_cas03 -1 +- duplicate(gard#template) gard1#schg_cas03 -1 +- duplicate(gard#template) gard2#schg_cas03 -1 +- duplicate(df#template) df1#schg_cas03 -1 +- duplicate(df#template) df2#schg_cas03 -1 +- duplicate(RL#template) RL0#schg_cas03 -1 +- duplicate(RL#template) RL1#schg_cas03 -1 +- duplicate(RL#template) RL2#schg_cas03 -1 +- duplicate(RL#template) RL3#schg_cas03 -1 + +schg_cas03,88,90,3 duplicate(Steward#template) Steward#sc03 55 +schg_cas03,287,226,5 duplicate(Guardian#template) Elzee#sc03 868 +schg_cas03,50,50,3 duplicate(Kafra#template) Kafra Employee#sc03 117 +schg_cas03,242,309,0 duplicate(Guardian Stone#template) 1st Guardian Stone#sc03 844 +schg_cas03,376,250,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#sc03 844 +schg_cas03,335,298,0 duplicate(Control#template) Control Device01#sc03 111 +schg_cas03,200,227,0 duplicate(Control#template) Control Device02#sc03 111 +schg_cas03,273,205,0 duplicate(Control#template) Control Device03#sc03 111 +schg_cas03,199,25,0 duplicate(Switch#template) #sch03_switch 111 +schg_cas03,25,22,3 duplicate(Sunflower#template) Mysterious Sunflower#03 976 + +schg_cas03,346,211,0 script LF-01#schg_cas03 111,{ callfunc "LinkFlag","First Gate House",262,323,"Second Gate House",378,263; } +schg_cas03,346,207,0 script LF-02#schg_cas03 111,{ callfunc "LinkFlag","Center 1 Area",306,320; } +schg_cas03,346,203,0 script LF-03#schg_cas03 111,{ callfunc "LinkFlag","Defense Area 2-1",309,292,"Defense Area 2-2",348,292; } +schg_cas03,346,199,0 script LF-04#schg_cas03 111,{ callfunc "LinkFlag","Center 2 Area",266,263; } +schg_cas03,346,195,0 script LF-05#schg_cas03 111,{ callfunc "LinkFlag","Defense Area 3-1",226,220,"Defense Area 3-2",185,249; } +schg_cas03,346,191,0 script LF-06#schg_cas03 111,{ callfunc "LinkFlag","Center 3 Area",271,226; } +schg_cas03,301,213,0 script LF-07#schg_cas03 111,{ callfunc "LinkFlag","Area 1-2",262,323,"Area 2-2",378,263,"Area 3-2",306,320; } +schg_cas03,301,209,0 script LF-08#schg_cas03 111,{ callfunc "LinkFlag","Area 2-1",309,292,"Area 2-2",348,292,"Center 2 Area",326,263; } +schg_cas03,301,194,0 script LF-09#schg_cas03 111,{ callfunc "LinkFlag","Area 3-1",226,220,"Area 3-2",185,249,"Center 3 Area",271,226; } +schg_cas03,301,190,0 script LF-10#schg_cas03 111,{ callfunc "LinkFlag","Convenience Facility",57,13; } +schg_cas03,335,305,0 script Vidblainn#LF_sc03_1::LF_sc03_1 111,{ callfunc "LinkFlag","Emperium Center",308,202; } schg_cas03,322,305,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_2 111 schg_cas03,352,248,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_3 111 schg_cas03,320,283,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_4 111 @@ -2232,698 +51,24 @@ schg_cas03,207,239,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_7 111 schg_cas03,207,228,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_8 111 schg_cas03,266,206,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_9 111 schg_cas03,266,197,0 duplicate(LF_sc03_1) Vidblainn#LF_sc03_10 111 - schg_cas03,283,206,2 script Vidblainn#LF_sc03_11::LF_sc03_2 722,{ - set .@GID, GetCastleData("schg_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 "schg_cas03",308,202; - end; - case 2: - close; - } - } + callfunc "LinkFlag","Emperium Center",308,202; end; - OnInterIfInitOnce: OnRecvCastlesc03: FlagEmblem GetCastleData("schg_cas03",1); end; } - schg_cas03,283,197,2 duplicate(LF_sc03_2) Vidblainn#LF_sc03_12 722 schg_cas03,332,323,6 duplicate(LF_sc03_2) Vidblainn#LF_sc03_13 722 schg_cas03,343,323,2 duplicate(LF_sc03_2) Vidblainn#LF_sc03_14 722 -// Guild Manager -schg_cas03,88,90,3 script Steward#sch03 55,{ - set .@GID, GetCastleData("schg_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("schg_cas03",2) + "."; - if (GetCastleData("schg_cas03",4) > 0) { - mes "Last time, you invested in"; - mes "Commercial Growth " + GetCastleData("schg_cas03",4) + "."; - } - next; - mes "[ Steward ]"; - mes "Our stronghold's"; - mes "safeguard level is " + GetCastleData("schg_cas03",3) + "."; - if (GetCastleData("schg_cas03",5) > 0) { - mes "Last time, you invested"; - mes "in defense " + GetCastleData("schg_cas03",5) + " times."; - } - mes " "; - mes "That is all, master."; - close; - case 2: - set .@Economy,GetCastleData("schg_cas03",2); - if (.@Economy < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas03",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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("schg_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("schg_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 (GetCastleData("schg_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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "schg_cas03",4,GetCastleData("schg_cas03",4)+1; - 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("schg_cas03",3); - if (.@Defence < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas03",5)) { - set .@def_invest,.@def_invest*4; - } - 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("schg_cas03",3) == 100) { - mes "The Defense Level of this"; - mes "stronghold is 100%, and"; - mes "cannot be increased further."; - close; - } - if (GetCastleData("schg_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; - } - if (GetCastleData("schg_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 (GetCastleData("schg_cas03",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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 "schg_cas03",5,GetCastleData("schg_cas03",5)+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("schg_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#sch03"; - SetCastleData "schg_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#sch03"; - SetCastleData "schg_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 "schg_cas03",190,16; - 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("schg_cas03",2) - 5; - if (.@Economy < 0) set .@Economy, 0; - SetCastleData "schg_cas03", 2, .@Economy; - // Lower Castle Defence - set .@Defence,GetCastleData("schg_cas03",3) - 5; - if (.@Defence < 0) set .@Defence, 0; - SetCastleData "schg_cas03", 3, .@Defence; - // Set new owner - SetCastleData "schg_cas03",1, .@GID; - // Clear castle's data. - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) - SetCastleData "schg_cas03", .@i, 0; - // Disable Kafra - disablenpc "Kafra Employee#sch03"; - - set .msg,2; - if (.msg == 1) { - announce "Fortress [" + GetCastleName("schg_cas03") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch03_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 3] stronghold of "+GetCastleName("schg_cas03"),bc_all|bc_woe; - mapannounce "schg_cas03","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - donpcevent "Manager#sch03_02::Onreset"; - initnpctimer; - } - else { - donpcevent "Manager#sch03_02::Onreset"; - stopnpctimer; - } - } - else if (.msg == 0) { - announce "Fortress [" + GetCastleName("schg_cas03") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch03_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "schg_cas03",GetCastleData("schg_cas03",1),2; - donpcevent "::OnRecvCastlesc03"; - end; - -OnTimer10000: - donpcevent "manager#sch03_02::Onchange"; - mapannounce "schg_cas03","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -schg_cas03,50,50,3 script Kafra Employee#sch03 117,{ - cutin "kafra_01",2; - set .@GID, GetCastleData("schg_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("NV_BASIC") < 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("Juno -> 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 "yuno",158,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; - } - -OnRecvCastlesc03: - if (GetCastleData("schg_cas03",1) == 0) { - monster "schg_cas03",0,0,"Evil Druid",1117,10; - monster "schg_cas03",0,0,"Khalitzburg",1132,4; - monster "schg_cas03",0,0,"Abysmal Knight",1219,3; - monster "schg_cas03",0,0,"Executioner",1205,1; - monster "schg_cas03",0,0,"Penomena",1216,10; - monster "schg_cas03",0,0,"Alarm",1193,18; - monster "schg_cas03",0,0,"Clock",1269,9; - monster "schg_cas03",0,0,"Raydric Archer",1276,12; - monster "schg_cas03",0,0,"Wanderer",1208,3; - monster "schg_cas03",0,0,"Alice",1275,1; - monster "schg_cas03",0,0,"Bloody Knight",1268,2; - monster "schg_cas03",0,0,"Dark Lord",1272,2; - monster "schg_cas03",0,0,"Tower Keeper",1270,4; - } - if (GetCastleData("schg_cas03",9) < 1) { - disablenpc "Kafra Employee#sch03"; - } - end; -} - -schg_cas03,199,25,0 script #sch03_switch 111,{ - mes " "; - mes "^3355FFWill you pull"; - mes "this small lever?^000000"; - next; - switch(select("Pull Lever:Cancel")) { - case 1: - warp "schg_cas03",57,13; - end; - case 2: - close; - } -} - sch_gld,91,191,0 script Vidblainn#flag_sc03_1::Sc03_Flag 722,{ - set .@GID, GetCastleData("schg_cas03",1); - if (.@GID == 0) { - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt 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("schg_cas03",1); - if (getcharid(2) == .@GID) { - warp "schg_cas03",308,202; - end; - } - close; - case 2: - close; - } - } - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt decrees that"; - mes "this stronghold is owned"; - mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; - next; - mes "[ Schwaltzvalt 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; - } - + callfunc "ReturnFlag","schg_cas03",1; + end; OnInterIfInitOnce: OnRecvCastlesc03: FlagEmblem GetCastleData("schg_cas03",1); end; } - -sch_gld,104,191,0 duplicate(Sc03_Flag) Bidblind#flag_sc03_2 722 +sch_gld,104,191,0 duplicate(Sc03_Flag) Bidblind#flag_sc03_2 722 \ No newline at end of file diff --git a/npc/guild2/schg_cas04.txt b/npc/guild2/schg_cas04.txt index 651e9219b..2a5449761 100644 --- a/npc/guild2/schg_cas04.txt +++ b/npc/guild2/schg_cas04.txt @@ -1,2257 +1,56 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Hljod //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 1.8 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Schwaltzvalt Castle 4 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.5 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.6 Applied updated eco/def systems. [L0ne_W0lf] -//= 1.7 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 1.8 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -schg_cas04,1,1,0 script Manager#sch04_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlesc04: - if (GetCastleData("schg_cas04",1) == 0) { - donpcevent "Manager#sch04_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - MapRespawnGuildID "schg_cas04",GetCastleData("schg_cas04",1),2; - GvgOn "schg_cas04"; - donpcevent "Manager#sch04_02::Onstart"; - } - else { - donpcevent "#sch04_RL00::OnDisable"; - donpcevent "#sch04_RL01::OnDisable"; - donpcevent "#sch04_RL02::OnDisable"; - donpcevent "#sch04_RL03::OnDisable"; - } - end; - -OnAgitEnd2: - GvgOff "schg_cas04"; - if (GetCastleData("schg_cas04",1)) { - KillMonster "schg_cas04","Steward#sch04::OnStartArena"; - donpcevent "Manager#sch04_02::Onreset"; - donpcevent "Steward#sch04::Onstop"; - } - 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("schg_cas04",1)) { - setarray $agit_sc04[0],0,0,0,0,0,0; - donpcevent "#sch04_df01::OnEnable"; - donpcevent "#sch04_df02::OnEnable"; - donpcevent "#sch04_RL00::OnEnable"; - donpcevent "#sch04_RL01::OnEnable"; - donpcevent "#sch04_RL02::OnEnable"; - donpcevent "#sch04_RL03::OnEnable"; - } - monster "schg_cas04",120,272,"Emperium",1288,1,"Steward#sch04::OnStartArena"; - end; - -Onreset: - donpcevent "#sch04_df01::OnDisable"; - donpcevent "#sch04_df02::OnDisable"; - donpcevent "#sch04_gard01::Onreset"; - donpcevent "#sch04_gard02::Onreset"; - donpcevent "#sch04_RL00::OnDisable"; - donpcevent "#sch04_RL01::OnDisable"; - donpcevent "#sch04_RL02::OnDisable"; - donpcevent "#sch04_RL03::OnDisable"; - donpcevent "1st Guardian Stone#sch04::OnDisable"; - donpcevent "2nd Guardian Stone#sch04::OnDisable"; - donpcevent "Control Device01#sch04::OnDisable"; - donpcevent "Control Device02#sch04::OnDisable"; - donpcevent "Control Device03#sch04::OnDisable"; - if (agitcheck2()) { - setarray $agit_sc04[0],0,0,1,1,1,0; - } - end; - -Onchange: - setarray $agit_sc04[0],2,2,1,1,2,0; - monster "schg_cas04",120,272,"Emperium",1288,1,"Steward#sch04::OnStartArena"; - donpcevent "Control Device03#sch04::OnEnable"; - donpcevent "1st Guardian Stone#sch04::OnEnable"; - donpcevent "2nd Guardian Stone#sch04::OnEnable"; - end; - -OnClock0001: - if (!GetCastleData("schg_cas04",1)) end; - killmonster "schg_cas04","Manager#sch04_02::OnTreasureDied"; - - if (GetCastleData("schg_cas04",4)) { - set .@Economy,GetCastleData("schg_cas04",2); - SetCastleData "schg_cas04",2,.@Economy + GetCastleData("schg_cas04",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("schg_cas04",2) > 100) SetCastleData "schg_cas04",2,100; - setcastledata "schg_cas04",4,0; - } - if (GetCastleData("schg_cas04",5)) { - set .@Defence,GetCastleData("schg_cas04",3); - SetCastleData "schg_cas04",3,.@Defence + GetCastleData("schg_cas04",5); - if (GetCastleData("schg_cas04",3) > 100) SetCastleData "schg_cas04",3,100; - setcastledata "schg_cas04",5,0; - } - - set .@Treasure,GetCastleData("schg_cas04",2)/5+4; - if (.@Treasure) { - monster "schg_cas04",388,388,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - monster "schg_cas04",388,389,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - monster "schg_cas04",388,390,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - monster "schg_cas04",387,390,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 5) end; - monster "schg_cas04",386,390,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 6) end; - monster "schg_cas04",385,390,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 7) end; - monster "schg_cas04",384,389,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 8) end; - monster "schg_cas04",384,388,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 9) end; - monster "schg_cas04",384,387,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 10) end; - monster "schg_cas04",384,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 11) end; - monster "schg_cas04",384,385,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 12) end; - monster "schg_cas04",384,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 13) end; - monster "schg_cas04",385,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 14) end; - monster "schg_cas04",386,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 15) end; - monster "schg_cas04",387,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 16) end; - monster "schg_cas04",388,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 17) end; - monster "schg_cas04",389,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 18) end; - monster "schg_cas04",390,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 19) end; - monster "schg_cas04",390,385,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 20) end; - monster "schg_cas04",390,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 21) end; - monster "schg_cas04",389,386,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 22) end; - monster "schg_cas04",388,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 23) end; - monster "schg_cas04",387,286,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied"; - if (.@Treasure < 24) end; - monster "schg_cas04",386,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied"; - } - end; - -OnTreasureDied: - end; -} - -schg_cas04,123,306,3 script Ef#sch04_01 868,{ - set .@GID, GetCastleData("schg_cas04",1); - if (.@GID == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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 (agitcheck2() == 0) { - mes "[Ef]"; - mes "I am Ef, guardian of"; - mes "this stronghold. For now,"; - mes "all is quiet in this place."; - next; - switch(select("Converse:Cancel")) { - case 1: - mes "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - mes "You have no questions"; - mes "to ask of me? Well, I'm"; - mes "here to serve your needs."; - close; - } - case 2: - mes "[Ef]"; - mes "I'm always here, so"; - mes "feel free to request my"; - mes "assistance whenever"; - mes "the need arises."; - close; - } - } - else { - mes "[Ef]"; - mes "Greetings, "+strcharinfo(0)+"."; - mes "What are your orders?"; - next; - switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { - case 1: - if ($agit_sc04[5] == 0) { - if (getgdskilllv(.@GID,10002) == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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_sc04[5],1; - if ($agit_sc04[0] == 0) { - donpcevent "#sch04_gard01::OnEnable"; - } - if ($agit_sc04[1] == 0) { - donpcevent "#sch04_gard02::OnEnable"; - } - close; - } - } - else { - mes "[Ef]"; - mes "You've already commanded"; - mes "me to summon a Guardian"; - mes "to defend the stronghold."; - close; - } - case 2: - mes "[Ef]"; - mes "Our defense status is..."; - if ($agit_sc04[0] == 1) { - mes "1st Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc04[0] == 2) { - mes "1st Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "1st Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc04[1] == 1) { - mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc04[1] == 2) { - mes "2nd Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc04[2] == 1) { - mes "1st Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc04[2] == 2) { - mes "1st Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "1st Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc04[3] == 1) { - mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc04[3] == 2) { - mes "2nd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc04[4] == 1) { - mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc04[4] == 2) { - mes "3rd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; - } - close; - case 3: - mes "[Ef]"; - mes "I'll be standing by,"; - mes "awaiting your orders."; - close; - } - } - } - } - else { - mes "[Ef]"; - mes "Who are you? Scoundrel!"; - mes "Leave this stronghold now!"; - close; - } - -OnInit: - setarray $agit_sc04[0],0,0,0,0,0,0; - end; -} - -schg_cas04,1,1,0 script #sch04_gard01 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas04",3); - guardian "schg_cas04",111,18,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1; - guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1; - guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2; - guardian "schg_cas04",110,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1; - guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2; - guardian "schg_cas04",110,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //3; - guardian "schg_cas04",88,20,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "schg_cas04",108,32,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",64,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //5; - mapannounce "schg_cas04","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",47,43,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //6; - mapannounce "schg_cas04","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer1800000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",109,48,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //7; - mapannounce "schg_cas04","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer2700000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",111,18,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //8; - mapannounce "schg_cas04","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer3600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",112,32,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //9; - mapannounce "schg_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 "schg_cas04",120,37,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //10; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas04","#sch04_gard01::OnGuardianDied"; - end; -} - -schg_cas04,1,2,0 script #sch04_gard02 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas04",3); - guardian "schg_cas04",130,22,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12; - guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12; - guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13; - guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12; - guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13; - guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //14; - guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",152,43,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",130,22,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",130,28,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //20; - stopnpctimer; - end; - -OnGuardianDied: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount < 2) { - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //21; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas04","#sch04_gard02::OnGuardianDied"; - end; -} - -schg_cas04,1,3,0 script #sch04_df01 -1,{ -OnEnable: - guardian "schg_cas04",27,35,"1st Guardian Stone",1907,"#sch04_df01::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "schg_cas04","#sch04_df01::OnGuardianStoneDied"; - setarray $agit_sc04[0],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 1st Guardian Stone is Destroyed - setarray $agit_sc04[0],1; - if (($agit_sc04[0] == 1) || ($agit_sc04[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc04[1] == 1) || ($agit_sc04[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch04_RL00::OnDisable"; - donpcevent "#sch04_gard01::Onreset"; - } - else { - mapannounce "schg_cas04","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch04_gard01::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "1st Guardian Stone#sch04::OnEnable"; - setarray $agit_sc04[0],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas04,27,36,0 script 1st Guardian Stone#sch04 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc04[0] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "already completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch04_df01::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "1st Guardian Stone#sch04"; - setarray $agit_sc04[0],0; - set .@df_all,$agit_sc04[0]+$agit_sc04[1]; - if (.@df_all == 0) { - mapannounce "schg_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch04_RL00::OnEnable"; - } - else { - mapannounce "schg_cas04","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc04[5] == 1) { - donpcevent "#sch04_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#sch04"; - end; - -OnEnable: - enablenpc "1st Guardian Stone#sch04"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "1st Guardian Stone#sch04"; - end; -} - -schg_cas04,1,4,0 script #sch04_df02 -1,{ -OnEnable: - guardian "schg_cas04",207,75,"2nd Guardian Stone",1908,"#sch04_df02::OnGuardianStoneDied"; //23; - end; - -OnDisable: - killmonster "schg_cas04","#sch04_df02::OnGuardianStoneDied"; - setarray $agit_sc04[1],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 2nd Guardian Stone is Destroyed - setarray $agit_sc04[1],1; - if (($agit_sc04[0] == 1) || ($agit_sc04[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc04[1] == 1) || ($agit_sc04[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch04_RL00::OnDisable"; - donpcevent "#sch04_gard02::Onreset"; - } - else { - mapannounce "schg_cas04","2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch04_gard02::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "2nd Guardian Stone#sch04::OnEnable"; - setarray $agit_sc04[1],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas04,208,75,0 script 2nd Guardian Stone#sch04 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc04[1] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "successfully completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch04_df02::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "2nd Guardian Stone#sch04"; - setarray $agit_sc04[1],0; - set .@df_all,$agit_sc04[0]+$agit_sc04[1]; - if (.@df_all == 0) { - mapannounce "schg_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch04_RL00::OnEnable"; - } - else { - mapannounce "schg_cas04","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc04[5] == 1) { - donpcevent "#sch04_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#sch04"; - end; - -OnEnable: - enablenpc "2nd Guardian Stone#sch04"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#sch04"; - end; -} - -// Barrier Summoners -schg_cas04,2,1,0 script #sch04_RL00 -1,{ -OnEnable: - setcell "schg_cas04",114,48,126,48,cell_walkable,0; - setcell "schg_cas04",114,48,126,48,cell_shootable,0; - guardian "schg_cas04",115,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //24; - guardian "schg_cas04",117,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //25; - guardian "schg_cas04",119,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //26; - guardian "schg_cas04",121,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //27; - guardian "schg_cas04",123,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //28; - guardian "schg_cas04",125,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //29; - end; - -OnDisable: - setcell "schg_cas04",114,48,126,48,cell_walkable,1; - setcell "schg_cas04",114,48,126,48,cell_shootable,1; - killmonster "schg_cas04","#sch04_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -schg_cas04,2,2,0 script #sch04_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setcell "schg_cas04",114,51,126,51,cell_walkable,0; - guardian "schg_cas04",115,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //30; - guardian "schg_cas04",117,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //31; - guardian "schg_cas04",119,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //32; - guardian "schg_cas04",121,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //33; - guardian "schg_cas04",123,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //34; - guardian "schg_cas04",125,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //35; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc04[2],1; - mapannounce "schg_cas04","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; - setcell "schg_cas04",114,51,126,51,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas04",114,51,126,51,cell_walkable,1; - killmonster "schg_cas04","#sch04_RL01::OnBarrierDestroyed"; - end; -} - -schg_cas04,2,3,0 script #sch04_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setcell "schg_cas04",114,154,126,154,cell_walkable,0; - guardian "schg_cas04",115,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //36; - guardian "schg_cas04",117,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //37; - guardian "schg_cas04",119,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //38; - guardian "schg_cas04",121,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //39; - guardian "schg_cas04",123,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //40; - guardian "schg_cas04",125,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //41; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc04[3],1; - mapannounce "schg_cas04","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; - setcell "schg_cas04",114,154,126,154,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas04",114,154,126,154,cell_walkable,1; - killmonster "schg_cas04","#sch04_RL02::OnBarrierDestroyed"; - end; -} - -schg_cas04,2,4,0 script #sch04_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setcell "schg_cas04",116,241,126,241,cell_walkable,0; - guardian "schg_cas04",116,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //42; - guardian "schg_cas04",118,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //43; - guardian "schg_cas04",120,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //44; - guardian "schg_cas04",122,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //45; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc04[4],1; - mapannounce "schg_cas04","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; - setcell "schg_cas04",116,241,126,241,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas04",116,241,126,241,cell_walkable,1; - killmonster "schg_cas04","#sch04_RL03::OnBarrierDestroyed"; - end; -} - -schg_cas04,124,52,0 script Control Device01#sch04 111,{ - set .@GID, GetCastleData("schg_cas04",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc04[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 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 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 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 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 (agitcheck2() == 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 "#sch04_RL01::OnEnable"; - disablenpc "Control Device01#sch04"; - mapannounce "schg_cas04","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc04[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#sch04"; - end; - -OnEnable: - enablenpc "Control Device01#sch04"; - end; - -OnDisable: - disablenpc "Control Device01#sch04"; - end; -} - -schg_cas04,128,157,0 script Control Device02#sch04 111,{ - set .@GID, GetCastleData("schg_cas04",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc04[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 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 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 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 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 (agitcheck2() == 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 "#sch04_RL02::OnEnable"; - disablenpc "Control Device02#sch04"; - mapannounce "schg_cas04","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc04[3],0; //Global Variable - setarray $agit_sc04[2],2; //Global Variable - donpcevent "Control Device01#sch04::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#sch04"; - end; - -OnEnable: - enablenpc "Control Device02#sch04"; - end; - -OnDisable: - disablenpc "Control Device02#sch04"; - end; -} - -schg_cas04,109,247,0 script Control Device03#sch04 111,{ - set .@GID, GetCastleData("schg_cas04",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc04[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 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 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 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 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 (agitcheck2() == 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 "#sch04_RL03::OnEnable"; - disablenpc "Control Device03#sch04"; - mapannounce "schg_cas04","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc04[4],0; - setarray $agit_sc04[3],2; - donpcevent "Control Device02#sch04::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 Device03#sch04"; - end; - -OnEnable: - enablenpc "Control Device03#sch04"; - end; - -OnDisable: - disablenpc "Control Device03#sch04"; - end; -} - -// Link Flags -schg_cas04,106,302,0 script LF-01#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",19,26; - end; - case 2: - warp "schg_cas04",219,90; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,109,302,0 script LF-02#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",89,43; - end; - case 2: - warp "schg_cas04",141,45; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,112,302,0 script LF-03#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",137,54; - end; - case 2: - warp "schg_cas04",102,54; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,115,302,0 script LF-04#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",94,147; - end; - case 2: - warp "schg_cas04",163,140; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,118,302,0 script LF-05#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",87,220; - break; - case 2: - warp "schg_cas04",151,220; - break; - case 3: - close; - } - } - end; -} - -schg_cas04,121,302,0 script LF-06#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",100,242; - end; - case 2: - warp "schg_cas04",136,242; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,124,302,0 script LF-07#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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("Center 1 Area:Center 2 Area:Cancel")) { - case 1: - warp "schg_cas04",120,168; - end; - case 2: - warp "schg_cas04",119,211; - end; - case 3: - close; - } - } - end; -} - -schg_cas04,127,302,0 script LF-08#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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("Area 1-1:Area 2-1:Area 3-1:Cancel")) { - case 1: - warp "schg_cas04",89,43; - end; - case 2: - warp "schg_cas04",94,147; - end; - case 3: - warp "schg_cas04",100,242; - end; - case 4: - close; - } - } - end; -} - -schg_cas04,130,302,0 script LF-09#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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("Area 1-2:Area 2-3:Area 3-2:Cancel")) { - case 1: - warp "schg_cas04",141,45; - end; - case 2: - warp "schg_cas04",163,140; - end; - case 3: - warp "schg_cas04",136,243; - end; - case 4: - close; - } - } - end; -} - -schg_cas04,133,302,0 script LF-10#schg_cas04 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",275,244; - end; - case 2: - close; - } - } - end; -} - -schg_cas04,17,45,0 script Hljod#LF_sc04_1::LF_sc04_1 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",120,290; - end; - case 2: - close; - } - } - end; -} - +- duplicate(Manager#template) Manager#schg_cas04 -1 +- duplicate(gard#template) gard1#schg_cas04 -1 +- duplicate(gard#template) gard2#schg_cas04 -1 +- duplicate(df#template) df1#schg_cas04 -1 +- duplicate(df#template) df2#schg_cas04 -1 +- duplicate(RL#template) RL0#schg_cas04 -1 +- duplicate(RL#template) RL1#schg_cas04 -1 +- duplicate(RL#template) RL2#schg_cas04 -1 +- duplicate(RL#template) RL3#schg_cas04 -1 + +schg_cas04,247,305,3 duplicate(Steward#template) Steward#sc04 55 +schg_cas04,123,306,3 duplicate(Guardian#template) Ef#sc04 868 +schg_cas04,300,287,5 duplicate(Kafra#template) Kafra Employee#sc04 117 +schg_cas04,27,36,0 duplicate(Guardian Stone#template) 1st Guardian Stone#sc04 844 +schg_cas04,208,75,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#sc04 844 +schg_cas04,124,52,0 duplicate(Control#template) Control Device01#sc04 111 +schg_cas04,128,157,0 duplicate(Control#template) Control Device02#sc04 111 +schg_cas04,109,247,0 duplicate(Control#template) Control Device03#sc04 111 +schg_cas04,391,391,0 duplicate(Switch#template) #sch04_switch 111 +schg_cas04,280,391,3 duplicate(Sunflower#template) Mysterious Sunflower#04 976 + +schg_cas04,106,302,0 script LF-01#schg_cas04 111,{ callfunc "LinkFlag","First Gate House",19,26,"Second Gate House",219,90; } +schg_cas04,109,302,0 script LF-02#schg_cas04 111,{ callfunc "LinkFlag","Defense Area 1-1",89,43,"Defense Area 1-2",141,45; } +schg_cas04,112,302,0 script LF-03#schg_cas04 111,{ callfunc "LinkFlag","Defense Area 2-1",137,54,"Defense Area 2-2",102,54; } +schg_cas04,115,302,0 script LF-04#schg_cas04 111,{ callfunc "LinkFlag","Defense Area 2-3",94,147,"Defense Area 2-4",163,140; } +schg_cas04,118,302,0 script LF-05#schg_cas04 111,{ callfunc "LinkFlag","Defense Area 2-3",87,220,"Defense Area 2-4",151,220; } +schg_cas04,121,302,0 script LF-06#schg_cas04 111,{ callfunc "LinkFlag","Defense Area 3-1",100,242,"Defense Area 3-2",136,242; } +schg_cas04,124,302,0 script LF-07#schg_cas04 111,{ callfunc "LinkFlag","Center 1 Area",120,168,"Center 2 Area",119,211; } +schg_cas04,127,302,0 script LF-08#schg_cas04 111,{ callfunc "LinkFlag","Area 1-1",89,43,"Area 2-1",94,147,"Area 3-1",100,242; } +schg_cas04,130,302,0 script LF-09#schg_cas04 111,{ callfunc "LinkFlag","Area 1-2",141,45,"Area 2-3",163,140,"Area 3-2",136,243; } +schg_cas04,133,302,0 script LF-10#schg_cas04 111,{ callfunc "LinkFlag","Convenience Facility",275,244; } +schg_cas04,17,45,0 script Hljod#LF_sc04_1::LF_sc04_1 111,{ callfunc "LinkFlag","Emperium Center",120,290; } schg_cas04,207,95,0 duplicate(LF_sc04_1) Hljod#LF_sc04_2 111 - schg_cas04,111,46,4 script Hljod#LF_sc04_3::LF_sc04_2 722,{ - set .@GID, GetCastleData("schg_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 "schg_cas04",120,290; - end; - case 2: - close; - } - } + callfunc "LinkFlag","Emperium Center",120,290; end; - OnInterIfInitOnce: OnRecvCastlesc04: FlagEmblem GetCastleData("schg_cas04",1); end; } - schg_cas04,129,46,4 duplicate(LF_sc04_2) Hljod#LF_sc04_4 722 schg_cas04,99,77,0 duplicate(LF_sc04_1) Hljod#LF_sc04_5 111 schg_cas04,140,77,0 duplicate(LF_sc04_1) Hljod#LF_sc04_6 111 @@ -2264,670 +63,12 @@ schg_cas04,126,238,0 duplicate(LF_sc04_1) Hljod#LF_sc04_12 111 schg_cas04,95,247,0 duplicate(LF_sc04_1) Hljod#LF_sc04_13 111 schg_cas04,144,247,0 duplicate(LF_sc04_1) Hljod#LF_sc04_14 111 -// Guild Manager -schg_cas04,247,305,3 script Steward#sch04 55,{ - set .@GID, GetCastleData("schg_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("schg_cas04",2) + "."; - if (GetCastleData("schg_cas04",4) > 0) { - mes "Last time, you invested in"; - mes "Commercial Growth " + GetCastleData("schg_cas04",4) + "."; - } - next; - mes "[ Steward ]"; - mes "Our stronghold's"; - mes "safeguard level is " + GetCastleData("schg_cas04",3) + "."; - if (GetCastleData("schg_cas04",5) > 0) { - mes "Last time, you invested"; - mes "in defense " + GetCastleData("schg_cas04",5) + " times."; - } - mes " "; - mes "That is all, master."; - close; - case 2: - set .@Economy,GetCastleData("schg_cas04",2); - if (.@Economy < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas04",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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("schg_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("schg_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 (GetCastleData("schg_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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "schg_cas04",4,GetCastleData("schg_cas04",4)+1; - 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("schg_cas04",3); - if (.@Defence < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas04",5)) { - set .@def_invest,.@def_invest*4; - } - 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("schg_cas04",3) == 100) { - mes "The Defense Level of this"; - mes "stronghold is 100%, and"; - mes "cannot be increased further."; - close; - } - if (GetCastleData("schg_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; - } - if (GetCastleData("schg_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 (GetCastleData("schg_cas04",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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 "schg_cas04",5,GetCastleData("schg_cas04",5)+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("schg_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#sch04"; - SetCastleData "schg_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#sch04"; - SetCastleData "schg_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 "schg_cas04",381,381; - 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("schg_cas04",2) - 5; - if (.@Economy < 0) set .@Economy, 0; - SetCastleData "schg_cas04", 2, .@Economy; - // Lower Castle Defence - set .@Defence,GetCastleData("schg_cas04",3) - 5; - if (.@Defence < 0) set .@Defence, 0; - SetCastleData "schg_cas04", 3, .@Defence; - // Set new owner - SetCastleData "schg_cas04",1, .@GID; - // Clear castle's data. - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) - SetCastleData "schg_cas04", .@i, 0; - // Disable Kafra - disablenpc "Kafra Employee#sch04"; - - set .msg,2; - if (.msg == 1) { - announce "Fortress [" + GetCastleName("schg_cas04") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch04_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 4] stronghold of "+GetCastleName("schg_cas04"),bc_all|bc_woe; - mapannounce "schg_cas04","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - donpcevent "Manager#sch04_02::Onreset"; - initnpctimer; - } - else { - donpcevent "Manager#sch04_02::Onreset"; - stopnpctimer; - } - } - else if (.msg == 0) { - announce "Fortress [" + GetCastleName("schg_cas04") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch04_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "schg_cas04",GetCastleData("schg_cas04",1),2; - donpcevent "::OnRecvCastlesc04"; - end; - -OnTimer10000: - donpcevent "Manager#sch04_02::Onchange"; - mapannounce "schg_cas04","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -schg_cas04,300,287,5 script Kafra Employee#sch04 117,{ - cutin "kafra_01",2; - set .@GID, GetCastleData("schg_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("NV_BASIC") < 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("Juno -> 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 "yuno",158,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; - } - -OnRecvCastlesc04: - if (GetCastleData("schg_cas04",1) == 0) { - monster "schg_cas04",0,0,"Evil Druid",1117,10; - monster "schg_cas04",0,0,"Khalitzburg",1132,4; - monster "schg_cas04",0,0,"Abysmal Knight",1219,3; - monster "schg_cas04",0,0,"Executioner",1205,1; - monster "schg_cas04",0,0,"Penomena",1216,10; - monster "schg_cas04",0,0,"Alarm",1193,18; - monster "schg_cas04",0,0,"Clock",1269,9; - monster "schg_cas04",0,0,"Raydric Archer",1276,12; - monster "schg_cas04",0,0,"Wanderer",1208,3; - monster "schg_cas04",0,0,"Alice",1275,1; - monster "schg_cas04",0,0,"Bloody Knight",1268,2; - monster "schg_cas04",0,0,"Dark Lord",1272,2; - monster "schg_cas04",0,0,"Tower Keeper",1270,4; - } - if (GetCastleData("schg_cas04",9) < 1) { - disablenpc "Kafra Employee#sch04"; - } - end; -} - -schg_cas04,391,391,0 script #sch04_switch 111,{ - mes " "; - mes "^3355FFWill you pull"; - mes "this small lever?^000000"; - next; - switch(select("Pull Lever:Cancel")) { - case 1: - warp "schg_cas04",275,244; - end; - case 2: - close; - } -} - sch_gld,134,97,4 script Hljod#flag_sc04_1::sc04_Flag 722,{ - set .@GID, GetCastleData("schg_cas04",1); - if (.@GID == 0) { - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt 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("schg_cas04",1); - if (getcharid(2) == .@GID) { - warp "schg_cas04",120,290; - end; - } - close; - case 2: - close; - } - } - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt decrees that"; - mes "this stronghold is owned"; - mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; - next; - mes "[ Schwaltzvalt 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; - } - + callfunc "ReturnFlag","schg_cas04",1; + end; OnInterIfInitOnce: OnRecvCastlesc04: FlagEmblem GetCastleData("schg_cas04",1); end; } - -sch_gld,141,97,4 duplicate(sc04_Flag) Hljod#flag_sc04_2 722 +sch_gld,141,97,4 duplicate(sc04_Flag) Hljod#flag_sc04_2 722 \ No newline at end of file diff --git a/npc/guild2/schg_cas05.txt b/npc/guild2/schg_cas05.txt index 5d5dc1231..e565ee691 100644 --- a/npc/guild2/schg_cas05.txt +++ b/npc/guild2/schg_cas05.txt @@ -1,2257 +1,56 @@ //===== rAthena Script ======================================= -//= War of Emperium Second Edition +//= War of Emperium SE - Skidbladnir //===== By: ================================================== -//= L0ne_W0lf +//= Euphy //===== Current Version: ===================================== -//= 1.8 +//= 1.0 //===== Compatible With: ===================================== //= rAthena SVN -//===== Description: ========================================= -//= WoE SE Schwaltzvalt Castle 5 //===== Additional Comments: ================================= -//= 1.0 First Version [L0ne_W0lf] -//= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] -//= 1.2 Fixed double message in defense investing. [L0ne_W0lf] -//= Corrected a minor typo in the guild steward. -//= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] -//= 1.4 Fixed investment period not resetting. [L0ne_W0lf] -//= Made it so treasure won't spawn if castle is empty. -//= Treasure will now be killed before spawning. -//= 1.5 Replaced effect numerics with constants. [L0ne_W0lf] -//= 1.6 Applied updated eco/def systems. [L0ne_W0lf] -//= 1.7 Fixed eco/def not actually incrementing. [L0ne_W0lf] -//= Can no longer gain eco/def higher than 100. -//= 1.8 Fixed a possible exploit in guild castle investment. [Brian] +//= 1.0 Merged to template file. //============================================================ -schg_cas05,1,1,0 script Manager#sch05_02 111,{ - end; - -OnAgitInit2: -OnRecvCastlesc05: - if (GetCastleData("schg_cas05",1) == 0) { - donpcevent "Manager#sch05_02::Onstart"; - } - end; - -OnAgitStart2: - if (agitcheck2()) { - MapRespawnGuildID "schg_cas05",GetCastleData("schg_cas05",1),2; - GvgOn "schg_cas05"; - donpcevent "Manager#sch05_02::Onstart"; - } - else { - donpcevent "#sch05_RL00::OnDisable"; - donpcevent "#sch05_RL01::OnDisable"; - donpcevent "#sch05_RL02::OnDisable"; - donpcevent "#sch05_RL03::OnDisable"; - } - end; - -OnAgitEnd2: - GvgOff "schg_cas05"; - if (GetCastleData("schg_cas05",1)) { - KillMonster "schg_cas05","Steward#sch05::OnStartArena"; - donpcevent "Manager#sch05_02::Onreset"; - donpcevent "Steward#sch05::Onstop"; - } - 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("schg_cas05",1)) { - setarray $agit_sc05[0],0,0,0,0,0,0; - donpcevent "#sch05_df01::OnEnable"; - donpcevent "#sch05_df02::OnEnable"; - donpcevent "#sch05_RL00::OnEnable"; - donpcevent "#sch05_RL01::OnEnable"; - donpcevent "#sch05_RL02::OnEnable"; - donpcevent "#sch05_RL03::OnEnable"; - } - monster "schg_cas05",120,272,"Emperium",1288,1,"Steward#sch05::OnStartArena"; - end; - -Onreset: - donpcevent "#sch05_df01::OnDisable"; - donpcevent "#sch05_df02::OnDisable"; - donpcevent "#sch05_gard01::Onreset"; - donpcevent "#sch05_gard02::Onreset"; - donpcevent "#sch05_RL00::OnDisable"; - donpcevent "#sch05_RL01::OnDisable"; - donpcevent "#sch05_RL02::OnDisable"; - donpcevent "#sch05_RL03::OnDisable"; - donpcevent "1st Guardian Stone#sch05::OnDisable"; - donpcevent "2nd Guardian Stone#sch05::OnDisable"; - donpcevent "Control Device01#sch05::OnDisable"; - donpcevent "Control Device02#sch05::OnDisable"; - donpcevent "Control Device03#sch05::OnDisable"; - if (agitcheck2()) { - setarray $agit_sc05[0],0,0,1,1,1,0; - } - end; - -Onchange: - setarray $agit_sc05[0],2,2,1,1,2,0; - monster "schg_cas05",120,272,"Emperium",1288,1,"Steward#sch05::OnStartArena"; - donpcevent "Control Device03#sch05::OnEnable"; - donpcevent "1st Guardian Stone#sch05::OnEnable"; - donpcevent "2nd Guardian Stone#sch05::OnEnable"; - end; - -OnClock0001: - if (!GetCastleData("schg_cas05",1)) end; - killmonster "schg_cas05","Manager#sch05_02::OnTreasureDied"; - - if (GetCastleData("schg_cas05",4)) { - set .@Economy,GetCastleData("schg_cas05",2); - SetCastleData "schg_cas05",2,.@Economy + GetCastleData("schg_cas05",4) + (rand(2) && getgdskilllv(.@GID,10014)); - if (GetCastleData("schg_cas05",2) > 100) SetCastleData "schg_cas05",2,100; - setcastledata "schg_cas05",4,0; - } - if (GetCastleData("schg_cas05",5)) { - set .@Defence,GetCastleData("schg_cas05",3); - SetCastleData "schg_cas05",3,.@Defence + GetCastleData("schg_cas05",5); - if (GetCastleData("schg_cas05",3) > 100) SetCastleData "schg_cas05",3,100; - setcastledata "schg_cas05",5,0; - } - - set .@Treasure,GetCastleData("schg_cas05",2)/5+4; - if (.@Treasure) { - monster "schg_cas05",388,388,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - monster "schg_cas05",388,389,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - monster "schg_cas05",388,390,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - monster "schg_cas05",387,390,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 5) end; - monster "schg_cas05",386,390,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 6) end; - monster "schg_cas05",385,390,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 7) end; - monster "schg_cas05",384,389,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 8) end; - monster "schg_cas05",384,388,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 9) end; - monster "schg_cas05",384,387,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 10) end; - monster "schg_cas05",384,386,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 11) end; - monster "schg_cas05",384,385,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 12) end; - monster "schg_cas05",384,384,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 13) end; - monster "schg_cas05",385,384,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 14) end; - monster "schg_cas05",386,384,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 15) end; - monster "schg_cas05",387,384,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 16) end; - monster "schg_cas05",388,384,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 17) end; - monster "schg_cas05",389,384,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 18) end; - monster "schg_cas05",390,384,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 19) end; - monster "schg_cas05",390,385,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 20) end; - monster "schg_cas05",390,386,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 21) end; - monster "schg_cas05",389,386,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 22) end; - monster "schg_cas05",388,386,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 23) end; - monster "schg_cas05",387,286,"Treasure Chest",1942,1,"Manager#sch05_02::OnTreasureDied"; - if (.@Treasure < 24) end; - monster "schg_cas05",386,386,"Treasure Chest",1324,1,"Manager#sch05_02::OnTreasureDied"; - } - end; - -OnTreasureDied: - end; -} - -schg_cas05,123,306,3 script Ef#sch05_01 868,{ - set .@GID, GetCastleData("schg_cas05",1); - if (.@GID == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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 (agitcheck2() == 0) { - mes "[Ef]"; - mes "I am Ef, guardian of"; - mes "this stronghold. For now,"; - mes "all is quiet in this place."; - next; - switch(select("Converse:Cancel")) { - case 1: - mes "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - 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 "[Ef]"; - mes "You have no questions"; - mes "to ask of me? Well, I'm"; - mes "here to serve your needs."; - close; - } - case 2: - mes "[Ef]"; - mes "I'm always here, so"; - mes "feel free to request my"; - mes "assistance whenever"; - mes "the need arises."; - close; - } - } - else { - mes "[Ef]"; - mes "Greetings, "+strcharinfo(0)+"."; - mes "What are your orders?"; - next; - switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { - case 1: - if ($agit_sc05[5] == 0) { - if (getgdskilllv(.@GID,10002) == 0) { - mes "[Ef]"; - 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 "[Ef]"; - 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_sc05[5],1; - if ($agit_sc05[0] == 0) { - donpcevent "#sch05_gard01::OnEnable"; - } - if ($agit_sc05[1] == 0) { - donpcevent "#sch05_gard02::OnEnable"; - } - close; - } - } - else { - mes "[Ef]"; - mes "You've already commanded"; - mes "me to summon a Guardian"; - mes "to defend the stronghold."; - close; - } - case 2: - mes "[Ef]"; - mes "Our defense status is..."; - if ($agit_sc05[0] == 1) { - mes "1st Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc05[0] == 2) { - mes "1st Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "1st Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc05[1] == 1) { - mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; - } - else if ($agit_sc05[1] == 2) { - mes "2nd Guardian Stone: ^008000Repairing^000000"; - } - else { - mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; - } - if ($agit_sc05[2] == 1) { - mes "1st Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc05[2] == 2) { - mes "1st Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "1st Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc05[3] == 1) { - mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc05[3] == 2) { - mes "2nd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; - } - if ($agit_sc05[4] == 1) { - mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; - } - else if ($agit_sc05[4] == 2) { - mes "3rd Fortress Gate: ^008000Repairing^000000"; - } - else { - mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; - } - close; - case 3: - mes "[Ef]"; - mes "I'll be standing by,"; - mes "awaiting your orders."; - close; - } - } - } - } - else { - mes "[Ef]"; - mes "Who are you? Scoundrel!"; - mes "Leave this stronghold now!"; - close; - } - -OnInit: - setarray $agit_sc05[0],0,0,0,0,0,0; - end; -} - -schg_cas05,1,1,0 script #sch05_gard01 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas05",3); - guardian "schg_cas05",111,18,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //0; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas05",109,44,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //1; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas05",109,44,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //1; - guardian "schg_cas05",65,22,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //2; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas05",109,44,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //1; - guardian "schg_cas05",65,22,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //2; - guardian "schg_cas05",110,40,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //3; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas05",109,44,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //1; - guardian "schg_cas05",65,22,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //2; - guardian "schg_cas05",110,40,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //3; - guardian "schg_cas05",88,20,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //4; - } - else { - set .MyMobCount,2; - guardian "schg_cas05",108,32,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //1; - } - initnpctimer; - end; - -OnTimer300000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",64,40,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //5; - mapannounce "schg_cas05","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",47,43,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //6; - mapannounce "schg_cas05","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer1800000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",109,48,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //7; - mapannounce "schg_cas05","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer2700000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",111,18,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //8; - mapannounce "schg_cas05","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; - end; - -OnTimer3600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",112,32,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //9; - mapannounce "schg_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 "schg_cas05",120,37,"Guardian Soldier",1899,"#sch05_gard01::OnGuardianDied"; //10; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas05","#sch05_gard01::OnGuardianDied"; - end; -} - -schg_cas05,1,2,0 script #sch05_gard02 -1,{ -OnEnable: - set .@defence,GetCastleData("schg_cas05",3); - guardian "schg_cas05",130,22,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //11; - if ((.@defence > 10) && (.@defence < 31)) { - set .MyMobCount,2; - guardian "schg_cas05",187,15,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //12; - } - else if ((.@defence > 30) && (.@defence < 51)) { - set .MyMobCount,3; - guardian "schg_cas05",129,47,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //12; - guardian "schg_cas05",151,18,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //13; - } - else if ((.@defence > 50) && (.@defence < 71)) { - set .MyMobCount,4; - guardian "schg_cas05",129,47,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //12; - guardian "schg_cas05",151,18,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //13; - guardian "schg_cas05",187,15,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //14; - } - else if (.@defence > 70) { - set .MyMobCount,5; - guardian "schg_cas05",129,47,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //12; - guardian "schg_cas05",151,18,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //13; - guardian "schg_cas05",187,15,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //14; - guardian "schg_cas05",128,42,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //15; - } - else { - set .MyMobCount,2; - guardian "schg_cas05",128,42,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //12; - } - initnpctimer; - end; - -OnTimer600000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",152,43,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //16; - end; - -OnTimer1200000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",187,15,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //17; - end; - -OnTimer2100000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",128,42,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //18; - end; - -OnTimer3000000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",130,22,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //19; - end; - -OnTimer3900000: - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",130,28,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //20; - stopnpctimer; - end; - -OnGuardianDied: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount < 2) { - set .MyMobCount,.MyMobCount+1; - guardian "schg_cas05",151,18,"Guardian Soldier",1899,"#sch05_gard02::OnGuardianDied"; //21; - } - end; - -Onreset: - stopnpctimer; - killmonster "schg_cas05","#sch05_gard02::OnGuardianDied"; - end; -} - -schg_cas05,1,3,0 script #sch05_df01 -1,{ -OnEnable: - guardian "schg_cas05",27,35,"1st Guardian Stone",1907,"#sch05_df01::OnGuardianStoneDied"; //22; - end; - -OnDisable: - killmonster "schg_cas05","#sch05_df01::OnGuardianStoneDied"; - setarray $agit_sc05[0],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 1st Guardian Stone is Destroyed - setarray $agit_sc05[0],1; - if (($agit_sc05[0] == 1) || ($agit_sc05[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc05[1] == 1) || ($agit_sc05[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch05_RL00::OnDisable"; - donpcevent "#sch05_gard01::Onreset"; - } - else { - mapannounce "schg_cas05","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch05_gard01::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "1st Guardian Stone#sch05::OnEnable"; - setarray $agit_sc05[0],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas05,27,36,0 script 1st Guardian Stone#sch05 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc05[0] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "already completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch05_df01::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "1st Guardian Stone#sch05"; - setarray $agit_sc05[0],0; - set .@df_all,$agit_sc05[0]+$agit_sc05[1]; - if (.@df_all == 0) { - mapannounce "schg_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch05_RL00::OnEnable"; - } - else { - mapannounce "schg_cas05","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc05[5] == 1) { - donpcevent "#sch05_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#sch05"; - end; - -OnEnable: - enablenpc "1st Guardian Stone#sch05"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "1st Guardian Stone#sch05"; - end; -} - -schg_cas05,1,4,0 script #sch05_df02 -1,{ -OnEnable: - guardian "schg_cas05",207,75,"2nd Guardian Stone",1908,"#sch05_df02::OnGuardianStoneDied"; //23; - end; - -OnDisable: - killmonster "schg_cas05","#sch05_df02::OnGuardianStoneDied"; - setarray $agit_sc05[1],1; //Global Variable - stopnpctimer; - end; - -OnGuardianStoneDied: - // 2nd Guardian Stone is Destroyed - setarray $agit_sc05[1],1; - if (($agit_sc05[0] == 1) || ($agit_sc05[0] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (($agit_sc05[1] == 1) || ($agit_sc05[1] == 2)) { - set .@destroyed,.@destroyed + 1; - } - if (.@destroyed == 2) { - mapannounce "schg_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch05_RL00::OnDisable"; - donpcevent "#sch05_gard02::Onreset"; - } - else { - mapannounce "schg_cas05","2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; - donpcevent "#sch05_gard02::Onreset"; - } - initnpctimer; - end; - -OnTimer300000: - donpcevent "2nd Guardian Stone#sch05::OnEnable"; - setarray $agit_sc05[1],2; //Global Variable - stopnpctimer; - end; -} - -schg_cas05,208,75,0 script 2nd Guardian Stone#sch05 844,{ - set .@GID, GetCastleData("schg_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 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 EF_STEAL; - next; - break; - } - break; - case 2: - specialeffect 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 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 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 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_sc05[1] == 0) { - mes "^3355FFThe Guardian Stone"; - mes "Repair System has"; - mes "successfully completed.^000000"; - close; - } - else { - if (agitcheck2() == 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 "#sch05_df02::OnEnable"; - specialeffect EF_ICECRASH; - disablenpc "2nd Guardian Stone#sch05"; - setarray $agit_sc05[1],0; - set .@df_all,$agit_sc05[0]+$agit_sc05[1]; - if (.@df_all == 0) { - mapannounce "schg_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; - donpcevent "#sch05_RL00::OnEnable"; - } - else { - mapannounce "schg_cas05","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; - } - if ($agit_sc05[5] == 1) { - donpcevent "#sch05_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#sch05"; - end; - -OnEnable: - enablenpc "2nd Guardian Stone#sch05"; - specialeffect EF_MAPPILLAR2; - end; - -OnDisable: - disablenpc "2nd Guardian Stone#sch05"; - end; -} - -// Barrier Summoners -schg_cas05,2,1,0 script #sch05_RL00 -1,{ -OnEnable: - setcell "schg_cas05",114,48,126,48,cell_walkable,0; - setcell "schg_cas05",114,48,126,48,cell_shootable,0; - guardian "schg_cas05",115,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //24; - guardian "schg_cas05",117,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //25; - guardian "schg_cas05",119,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //26; - guardian "schg_cas05",121,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //27; - guardian "schg_cas05",123,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //28; - guardian "schg_cas05",125,49," ",1905,"#sch05_RL00::OnBarrierDestroyed"; //29; - end; - -OnDisable: - setcell "schg_cas05",114,48,126,48,cell_walkable,1; - setcell "schg_cas05",114,48,126,48,cell_shootable,1; - killmonster "schg_cas05","#sch05_RL00::OnBarrierDestroyed"; - end; - -OnBarrierDestroyed: - end; -} - -schg_cas05,2,2,0 script #sch05_RL01 -1,{ -OnEnable: - set .MyMobCount,6; - setcell "schg_cas05",114,51,126,51,cell_walkable,0; - guardian "schg_cas05",115,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //30; - guardian "schg_cas05",117,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //31; - guardian "schg_cas05",119,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //32; - guardian "schg_cas05",121,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //33; - guardian "schg_cas05",123,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //34; - guardian "schg_cas05",125,50," ",1905,"#sch05_RL01::OnBarrierDestroyed"; //35; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc05[2],1; - mapannounce "schg_cas05","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; - setcell "schg_cas05",114,51,126,51,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas05",114,51,126,51,cell_walkable,1; - killmonster "schg_cas05","#sch05_RL01::OnBarrierDestroyed"; - end; -} - -schg_cas05,2,3,0 script #sch05_RL02 -1,{ -OnEnable: - set .MyMobCount,6; - setcell "schg_cas05",114,154,126,154,cell_walkable,0; - guardian "schg_cas05",115,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //36; - guardian "schg_cas05",117,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //37; - guardian "schg_cas05",119,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //38; - guardian "schg_cas05",121,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //39; - guardian "schg_cas05",123,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //40; - guardian "schg_cas05",125,153," ",1905,"#sch05_RL02::OnBarrierDestroyed"; //41; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc05[3],1; - mapannounce "schg_cas05","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; - setcell "schg_cas05",114,154,126,154,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas05",114,154,126,154,cell_walkable,1; - killmonster "schg_cas05","#sch05_RL02::OnBarrierDestroyed"; - end; -} - -schg_cas05,2,4,0 script #sch05_RL03 -1,{ -OnEnable: - set .MyMobCount,4; - setcell "schg_cas05",116,241,126,241,cell_walkable,0; - guardian "schg_cas05",116,240," ",1905,"#sch05_RL03::OnBarrierDestroyed"; //42; - guardian "schg_cas05",118,240," ",1905,"#sch05_RL03::OnBarrierDestroyed"; //43; - guardian "schg_cas05",120,240," ",1905,"#sch05_RL03::OnBarrierDestroyed"; //44; - guardian "schg_cas05",122,240," ",1905,"#sch05_RL03::OnBarrierDestroyed"; //45; - end; - -OnBarrierDestroyed: - set .MyMobCount,.MyMobCount-1; - if (.MyMobCount == 0) { - setarray $agit_sc05[4],1; - mapannounce "schg_cas05","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; - setcell "schg_cas05",116,241,126,241,cell_walkable,1; - } - end; - -OnDisable: - setcell "schg_cas05",116,241,126,241,cell_walkable,1; - killmonster "schg_cas05","#sch05_RL03::OnBarrierDestroyed"; - end; -} - -schg_cas05,124,52,0 script Control Device01#sch05 111,{ - set .@GID, GetCastleData("schg_cas05",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc05[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 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 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 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 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 (agitcheck2() == 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 "#sch05_RL01::OnEnable"; - disablenpc "Control Device01#sch05"; - mapannounce "schg_cas05","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc05[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#sch05"; - end; - -OnEnable: - enablenpc "Control Device01#sch05"; - end; - -OnDisable: - disablenpc "Control Device01#sch05"; - end; -} - -schg_cas05,128,157,0 script Control Device02#sch05 111,{ - set .@GID, GetCastleData("schg_cas05",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc05[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 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 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 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 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 (agitcheck2() == 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 "#sch05_RL02::OnEnable"; - disablenpc "Control Device02#sch05"; - mapannounce "schg_cas05","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc05[3],0; //Global Variable - setarray $agit_sc05[2],2; //Global Variable - donpcevent "Control Device01#sch05::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#sch05"; - end; - -OnEnable: - enablenpc "Control Device02#sch05"; - end; - -OnDisable: - disablenpc "Control Device02#sch05"; - end; -} - -schg_cas05,109,247,0 script Control Device03#sch05 111,{ - set .@GID, GetCastleData("schg_cas05",1); - if (getcharid(2) == .@GID) { - if (strcharinfo(0) == getguildmaster(.@GID)) { - if ($agit_sc05[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 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 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 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 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 (agitcheck2() == 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 "#sch05_RL03::OnEnable"; - disablenpc "Control Device03#sch05"; - mapannounce "schg_cas05","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; - setarray $agit_sc05[4],0; - setarray $agit_sc05[3],2; - donpcevent "Control Device02#sch05::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 Device03#sch05"; - end; - -OnEnable: - enablenpc "Control Device03#sch05"; - end; - -OnDisable: - disablenpc "Control Device03#sch05"; - end; -} - -// Link Flags -schg_cas05,106,302,0 script LF-01#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",19,26; - end; - case 2: - warp "schg_cas05",219,90; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,109,302,0 script LF-02#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",89,43; - end; - case 2: - warp "schg_cas05",141,45; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,112,302,0 script LF-03#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",137,54; - end; - case 2: - warp "schg_cas05",102,54; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,115,302,0 script LF-04#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",94,147; - end; - case 2: - warp "schg_cas05",163,140; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,118,302,0 script LF-05#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",87,220; - end; - case 2: - warp "schg_cas05",151,220; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,121,302,0 script LF-06#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",100,242; - end; - case 2: - warp "schg_cas05",136,242; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,124,302,0 script LF-07#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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("Center 1 Area:Center 2 Area:Cancel")) { - case 1: - warp "schg_cas05",120,168; - end; - case 2: - warp "schg_cas05",119,211; - end; - case 3: - close; - } - } - end; -} - -schg_cas05,127,302,0 script LF-08#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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("Area 1-1:Area 2-1:Area 3-1:Cancel")) { - case 1: - warp "schg_cas05",89,43; - end; - case 2: - warp "schg_cas05",94,147; - end; - case 3: - warp "schg_cas05",100,242; - end; - case 4: - close; - } - } - end; -} - -schg_cas05,130,302,0 script LF-09#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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("Area 1-2:Area 2-3:Area 3-2:Cancel")) { - case 1: - warp "schg_cas05",141,45; - end; - case 2: - warp "schg_cas05",163,140; - end; - case 3: - warp "schg_cas05",136,243; - end; - case 4: - close; - } - } - end; -} - -schg_cas05,133,302,0 script LF-10#schg_cas05 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",275,244; - end; - case 2: - close; - } - } - end; -} - -schg_cas05,17,45,0 script Skidbladnir#LF_sc05_1::LF_sc05_1 111,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",120,290; - end; - case 2: - close; - } - } - end; -} - +- duplicate(Manager#template) Manager#schg_cas05 -1 +- duplicate(gard#template) gard1#schg_cas05 -1 +- duplicate(gard#template) gard2#schg_cas05 -1 +- duplicate(df#template) df1#schg_cas05 -1 +- duplicate(df#template) df2#schg_cas05 -1 +- duplicate(RL#template) RL0#schg_cas05 -1 +- duplicate(RL#template) RL1#schg_cas05 -1 +- duplicate(RL#template) RL2#schg_cas05 -1 +- duplicate(RL#template) RL3#schg_cas05 -1 + +schg_cas05,247,305,3 duplicate(Steward#template) Steward#sc05 55 +schg_cas05,123,306,3 duplicate(Guardian#template) Ef#sc05 868 +schg_cas05,300,287,5 duplicate(Kafra#template) Kafra Employee#sc05 117 +schg_cas05,27,36,0 duplicate(Guardian Stone#template) 1st Guardian Stone#sc05 844 +schg_cas05,208,75,0 duplicate(Guardian Stone#template) 2nd Guardian Stone#sc05 844 +schg_cas05,124,52,0 duplicate(Control#template) Control Device01#sc05 111 +schg_cas05,128,157,0 duplicate(Control#template) Control Device02#sc05 111 +schg_cas05,109,247,0 duplicate(Control#template) Control Device03#sc05 111 +schg_cas05,391,391,0 duplicate(Switch#template) #sch05_switch 111 +schg_cas05,280,391,3 duplicate(Sunflower#template) Mysterious Sunflower#05 976 + +schg_cas05,106,302,0 script LF-01#schg_cas05 111,{ callfunc "LinkFlag","First Gate House",19,26,"Second Gate House",219,90; } +schg_cas05,109,302,0 script LF-02#schg_cas05 111,{ callfunc "LinkFlag","Defense Area 1-1",89,43,"Defense Area 1-2",141,45; } +schg_cas05,112,302,0 script LF-03#schg_cas05 111,{ callfunc "LinkFlag","Defense Area 2-1",137,54,"Defense Area 2-2",102,54; } +schg_cas05,115,302,0 script LF-04#schg_cas05 111,{ callfunc "LinkFlag","Defense Area 2-3",94,147,"Defense Area 2-4",163,140; } +schg_cas05,118,302,0 script LF-05#schg_cas05 111,{ callfunc "LinkFlag","Defense Area 2-3",87,220,"Defense Area 2-4",151,220; } +schg_cas05,121,302,0 script LF-06#schg_cas05 111,{ callfunc "LinkFlag","Defense Area 3-1",100,242,"Defense Area 3-2",136,242; } +schg_cas05,124,302,0 script LF-07#schg_cas05 111,{ callfunc "LinkFlag","Center 1 Area",120,168,"Center 2 Area",119,211; } +schg_cas05,127,302,0 script LF-08#schg_cas05 111,{ callfunc "LinkFlag","Area 1-1",89,43,"Area 2-1",94,147,"Area 3-1",100,242; } +schg_cas05,130,302,0 script LF-09#schg_cas05 111,{ callfunc "LinkFlag","Area 1-2",141,45,"Area 2-3",163,140,"Area 3-2",136,243; } +schg_cas05,133,302,0 script LF-10#schg_cas05 111,{ callfunc "LinkFlag","Convenience Facility",275,244; } +schg_cas05,17,45,0 script Skidbladnir#LF_sc05_1::LF_sc05_1 111,{ callfunc "LinkFlag","Emperium Center",120,290; } schg_cas05,207,95,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_2 111 - schg_cas05,111,46,4 script Skidbladnir#LF_sc05_3::LF_sc05_2 722,{ - set .@GID, GetCastleData("schg_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 "schg_cas05",120,290; - end; - case 2: - close; - } - } + callfunc "LinkFlag","Emperium Center",120,290; end; - OnInterIfInitOnce: OnRecvCastlesc05: FlagEmblem GetCastleData("schg_cas05",1); end; } - schg_cas05,129,46,4 duplicate(LF_sc05_2) Skidbladnir#LF_sc05_4 722 schg_cas05,99,77,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_5 111 schg_cas05,140,77,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_6 111 @@ -2264,672 +63,14 @@ schg_cas05,126,238,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_12 111 schg_cas05,95,247,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_13 111 schg_cas05,144,247,0 duplicate(LF_sc05_1) Skidbladnir#LF_sc05_14 111 -// Guild Manager -schg_cas05,247,305,3 script Steward#sch05 55,{ - set .@GID, GetCastleData("schg_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("schg_cas05",2) + "."; - if (GetCastleData("schg_cas05",4) > 0) { - mes "Last time, you invested in"; - mes "Commercial Growth " + GetCastleData("schg_cas05",4) + "."; - } - next; - mes "[ Steward ]"; - mes "Our stronghold's"; - mes "safeguard level is " + GetCastleData("schg_cas05",3) + "."; - if (GetCastleData("schg_cas05",5) > 0) { - mes "Last time, you invested"; - mes "in defense " + GetCastleData("schg_cas05",5) + " times."; - } - mes " "; - mes "That is all, master."; - close; - case 2: - set .@Economy,GetCastleData("schg_cas05",2); - if (.@Economy < 6) { set .@eco_invest,5000; } - else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; } - else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; } - else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; } - else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; } - else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; } - else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; } - else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; } - else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; } - else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; } - else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; } - else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; } - else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; } - else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; } - else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; } - else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; } - else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; } - else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } - else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } - else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas05",4)) { - set .@eco_invest,.@eco_invest*4; - } - 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("schg_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("schg_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 (GetCastleData("schg_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 (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."; - close; - } - set zeny,zeny-.@eco_invest; - SetCastleData "schg_cas05",4,GetCastleData("schg_cas05",4)+1; - 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("schg_cas05",3); - if (.@Defence < 6) { set .@def_invest,10000; } - else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; } - else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; } - else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; } - else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; } - else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; } - else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; } - else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; } - else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; } - else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; } - else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; } - else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; } - else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; } - else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; } - else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; } - else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; } - else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; } - else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; } - else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; } - else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData("schg_cas05",5)) { - set .@def_invest,.@def_invest*4; - } - 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("schg_cas05",3) == 100) { - mes "The Defense Level of this"; - mes "stronghold is 100%, and"; - mes "cannot be increased further."; - close; - } - if (GetCastleData("schg_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; - } - if (GetCastleData("schg_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 (GetCastleData("schg_cas05",5) >= 2) { - mes "[ Steward ]"; - 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; - } - 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 "schg_cas05",5,GetCastleData("schg_cas05",5)+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("schg_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#sch05"; - SetCastleData "schg_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#sch05"; - SetCastleData "schg_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 "schg_cas05",381,381; - 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("schg_cas05",2) - 5; - if (.@Economy < 0) set .@Economy, 0; - SetCastleData "schg_cas05", 2, .@Economy; - // Lower Castle Defence - set .@Defence,GetCastleData("schg_cas05",3) - 5; - if (.@Defence < 0) set .@Defence, 0; - SetCastleData "schg_cas05", 3, .@Defence; - // Set new owner - SetCastleData "schg_cas05",1, .@GID; - // Clear castle's data. - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) - SetCastleData "schg_cas05", .@i, 0; - // Disable Kafra - disablenpc "Kafra Employee#sch05"; - - set .msg,2; - if (.msg == 1) { - announce "Fortress [" + GetCastleName("schg_cas05") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch05_02::Onstart"; - } - else if (.msg == 2) { - announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 5] stronghold of "+GetCastleName("schg_cas05"),bc_all|bc_woe; - mapannounce "schg_cas05","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - if (agitcheck2()) { - donpcevent "Manager#sch05_02::Onreset"; - initnpctimer; - } - else { - donpcevent "Manager#sch05_02::Onreset"; - stopnpctimer; - } - } - else if (.msg == 0) { - announce "Fortress [" + GetCastleName("schg_cas05") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe; - donpcevent "Manager#sch05_02::Onreset"; - stopnpctimer; - end; - } - MapRespawnGuildID "schg_cas05",GetCastleData("schg_cas05",1),2; - donpcevent "::OnRecvCastlesc05"; - end; - -OnTimer10000: - donpcevent "Manager#sch05_02::Onchange"; - mapannounce "schg_cas05","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; - end; -} - -// Guild Kafra -schg_cas05,300,287,5 script Kafra Employee#sch05 117,{ - cutin "kafra_01",2; - set .@GID, GetCastleData("schg_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("NV_BASIC") < 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("Juno -> 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 "yuno",158,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; - } - -OnRecvCastlesc05: - if (GetCastleData("schg_cas05",1) == 0) { - monster "schg_cas05",0,0,"Evil Druid",1117,10; - monster "schg_cas05",0,0,"Khalitzburg",1132,4; - monster "schg_cas05",0,0,"Abysmal Knight",1219,3; - monster "schg_cas05",0,0,"Executioner",1205,1; - monster "schg_cas05",0,0,"Penomena",1216,10; - monster "schg_cas05",0,0,"Alarm",1193,18; - monster "schg_cas05",0,0,"Clock",1269,9; - monster "schg_cas05",0,0,"Raydric Archer",1276,12; - monster "schg_cas05",0,0,"Wanderer",1208,3; - monster "schg_cas05",0,0,"Alice",1275,1; - monster "schg_cas05",0,0,"Bloody Knight",1268,2; - monster "schg_cas05",0,0,"Dark Lord",1272,2; - monster "schg_cas05",0,0,"Tower Keeper",1270,4; - disablenpc "Kafra Employee#sch05"; - } - end; -} - -schg_cas05,391,391,0 script #sch05_switch 111,{ - mes " "; - mes "^3355FFWill you pull"; - mes "this small lever?^000000"; - next; - switch(select("Pull Lever:Cancel")) { - case 1: - warp "schg_cas05",275,244; - end; - case 2: - close; - } -} - sch_gld,101,284,4 script Skidbladnir#flag_sc05_1::sc05_Flag 722,{ - set .@GID, GetCastleData("schg_cas05",1); - if (.@GID == 0) { - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt 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("schg_cas05",1); - if (getcharid(2) == .@GID) { - warp "schg_cas05",120,290; - end; - } - close; - case 2: - close; - } - } - mes "[ Schwaltzvalt Royal Edict ]"; - mes "The Holy Kingdom of"; - mes "Schwaltzvalt decrees that"; - mes "this stronghold is owned"; - mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; - next; - mes "[ Schwaltzvalt 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; - } - + callfunc "ReturnFlag","schg_cas05",1; + end; OnInterIfInitOnce: OnRecvCastlesc05: FlagEmblem GetCastleData("schg_cas05",1); end; } - sch_gld,91,284,4 duplicate(sc05_Flag) Skidbladnir#flag_sc05_2 722 - sch_gld,66,320,6 duplicate(sc05_Flag) Skidbladnir#flag_sc05_3 722 - -sch_gld,66,310,6 duplicate(sc05_Flag) Skidbladnir#flag_sc05_4 722 +sch_gld,66,310,6 duplicate(sc05_Flag) Skidbladnir#flag_sc05_4 722 \ No newline at end of file -- cgit v1.2.3-60-g2f50