arug_cas04.txt 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957
  1. //===== eAthena Script =======================================
  2. //= War of Emperium Second Edition
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 2.2
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= WoE SE Arunafeltz Castle 4
  11. //===== Additional Comments: =================================
  12. //= 1.0 First Version [L0ne_W0lf]
  13. //= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf]
  14. //= 1.2 Fixed double message in defense investing. [L0ne_W0lf]
  15. //= Corrected a minor typo in the guild steward.
  16. //= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf]
  17. //= 1.4 Fixed investment period not resetting. [L0ne_W0lf]
  18. //= Made it so treasure won't spawn if castle is empty.
  19. //= Treasure will now be killed before spawning.
  20. //= 1.5 Fixed error with control devices. [L0ne_W0lf]
  21. //= 1.6 Corrected copy/paste error. [L0ne_W0lf]
  22. //= 1.7 Replaced effect numerics with constants. [L0ne_W0lf]
  23. //= 1.8 Fixed wrong event call for stones. (bugreport:2386) [L0ne_W0lf]
  24. //= 1.9 Applied updated eco/def systems. [L0ne_W0lf]
  25. //= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf]
  26. //= Can no longer gain eco/def higher than 100.
  27. //= 2.1 Fixed setcell extending more than it should on 3rd barricade. (bugreport:4323) [L0ne_W0lf]
  28. //= 2.2 Corrected exterior flag positions. (bugreport:4436) [L0ne_W0lf]
  29. //============================================================
  30. arug_cas04,1,1,0 script Manager#aru04_02 111,{
  31. end;
  32. OnInterIfInitOnce:
  33. GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
  34. end;
  35. OnRecvCastlear04:
  36. RequestGuildInfo GetCastleData("arug_cas04",1);
  37. if (GetCastleData("arug_cas04",1) == 0) {
  38. donpcevent "Manager#aru04_02::Onstart";
  39. }
  40. end;
  41. OnAgitStart2:
  42. if (agitcheck2()) {
  43. MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2;
  44. GvgOn "arug_cas04";
  45. donpcevent "Manager#aru04_02::Onstart";
  46. }
  47. else {
  48. donpcevent "#aru04_RL00::OnDisable";
  49. donpcevent "#aru04_RL01::OnDisable";
  50. donpcevent "#aru04_RL02::OnDisable";
  51. donpcevent "#aru04_RL03::OnDisable";
  52. }
  53. end;
  54. OnAgitEnd2:
  55. GvgOff "arug_cas04";
  56. if (GetCastleData("arug_cas04",1)) {
  57. KillMonster "arug_cas04","Steward#aru04::OnStartArena";
  58. donpcevent "Manager#aru04_02::Onreset";
  59. donpcevent "Steward#aru04::Onstop";
  60. }
  61. end;
  62. Onstart:
  63. // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
  64. // Settings for all but Summon Guardians
  65. // 0 = Okay; 1 = Destroyed; 2 = Repairing
  66. // Summon Guardians
  67. // 0 = Do not Summon; 1 = Summon
  68. if (GetCastleData("arug_cas04",1)) {
  69. setarray $agit_ar04[0],0,0,0,0,0,0;
  70. donpcevent "#aru04_df01::OnEnable";
  71. donpcevent "#aru04_df02::OnEnable";
  72. donpcevent "#aru04_RL00::OnEnable";
  73. donpcevent "#aru04_RL01::OnEnable";
  74. donpcevent "#aru04_RL02::OnEnable";
  75. donpcevent "#aru04_RL03::OnEnable";
  76. }
  77. monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena";
  78. end;
  79. Onreset:
  80. donpcevent "#aru04_df01::OnDisable";
  81. donpcevent "#aru04_df02::OnDisable";
  82. donpcevent "#aru04_gard01::Onreset";
  83. donpcevent "#aru04_gard02::Onreset";
  84. donpcevent "#aru04_RL00::OnDisable";
  85. donpcevent "#aru04_RL01::OnDisable";
  86. donpcevent "#aru04_RL02::OnDisable";
  87. donpcevent "#aru04_RL03::OnDisable";
  88. donpcevent "1st Guardian Stone#aru04::OnDisable";
  89. donpcevent "2nd Guardian Stone#aru04::OnDisable";
  90. donpcevent "Control Device01#aru04::OnDisable";
  91. donpcevent "Control Device02#aru04::OnDisable";
  92. donpcevent "Control Device03#aru04::OnDisable";
  93. if (agitcheck2()) {
  94. setarray $agit_ar04[0],0,0,1,1,1,0;
  95. }
  96. end;
  97. Onchange:
  98. setarray $agit_ar04[0],2,2,1,1,2,0;
  99. monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena";
  100. donpcevent "Control Device03#aru04::OnEnable";
  101. donpcevent "1st Guardian Stone#aru04::OnEnable";
  102. donpcevent "2nd Guardian Stone#aru04::OnEnable";
  103. end;
  104. OnClock0001:
  105. if (!GetCastleData("arug_cas04",1)) end;
  106. killmonster "arug_cas04","Manager#aru04_02::OnTreasureDied";
  107. if (GetCastleData("arug_cas04",4)) {
  108. set .@Economy,GetCastleData("arug_cas04",2);
  109. SetCastleData "arug_cas04",2,.@Economy + GetCastleData("arug_cas04",4) + (rand(2) && getgdskilllv(.@GID,10014));
  110. if (GetCastleData("arug_cas04",2) > 100) SetCastleData "arug_cas04",2,100;
  111. setcastledata "arug_cas04",4,0;
  112. }
  113. if (GetCastleData("arug_cas04",5)) {
  114. set .@Defence,GetCastleData("arug_cas04",3);
  115. SetCastleData "arug_cas04",3,.@Defence + GetCastleData("arug_cas04",5);
  116. if (GetCastleData("arug_cas04",3) > 100) SetCastleData "arug_cas04",3,100;
  117. setcastledata "arug_cas04",5,0;
  118. }
  119. set .@Treasure,GetCastleData("arug_cas04",2)/5+4;
  120. if (.@Treasure) {
  121. monster "arug_cas04",291,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  122. monster "arug_cas04",292,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  123. monster "arug_cas04",293,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  124. monster "arug_cas04",294,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  125. if (.@Treasure < 5) end;
  126. monster "arug_cas04",295,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  127. if (.@Treasure < 6) end;
  128. monster "arug_cas04",296,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  129. if (.@Treasure < 7) end;
  130. monster "arug_cas04",293,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  131. if (.@Treasure < 8) end;
  132. monster "arug_cas04",294,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  133. if (.@Treasure < 9) end;
  134. monster "arug_cas04",295,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  135. if (.@Treasure < 10) end;
  136. monster "arug_cas04",296,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  137. if (.@Treasure < 11) end;
  138. monster "arug_cas04",297,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  139. if (.@Treasure < 12) end;
  140. monster "arug_cas04",298,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  141. if (.@Treasure < 13) end;
  142. monster "arug_cas04",291,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  143. if (.@Treasure < 14) end;
  144. monster "arug_cas04",292,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  145. if (.@Treasure < 15) end;
  146. monster "arug_cas04",293,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  147. if (.@Treasure < 16) end;
  148. monster "arug_cas04",294,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  149. if (.@Treasure < 17) end;
  150. monster "arug_cas04",295,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  151. if (.@Treasure < 18) end;
  152. monster "arug_cas04",296,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  153. if (.@Treasure < 19) end;
  154. monster "arug_cas04",293,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  155. if (.@Treasure < 20) end;
  156. monster "arug_cas04",294,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  157. if (.@Treasure < 21) end;
  158. monster "arug_cas04",295,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  159. if (.@Treasure < 22) end;
  160. monster "arug_cas04",296,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  161. if (.@Treasure < 23) end;
  162. monster "arug_cas04",297,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied";
  163. if (.@Treasure < 24) end;
  164. monster "arug_cas04",298,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied";
  165. }
  166. end;
  167. OnTreasureDied:
  168. end;
  169. }
  170. arug_cas04,146,315,3 script Nios#aru04_01 868,{
  171. set .@GID, GetCastleData("arug_cas04",1);
  172. if (.@GID == 0) {
  173. mes "[Nios]";
  174. mes "Great job. Now, all you";
  175. mes "need to do is destroy this";
  176. mes "Emperium to gain ownership";
  177. mes "over this stronghold.";
  178. close;
  179. }
  180. if (getcharid(2) == .@GID) {
  181. if (strcharinfo(0) != getguildmaster(.@GID)) {
  182. mes "[Nios]";
  183. mes "As guardian of this";
  184. mes "stronghold, I answer only";
  185. mes "to the master of the guild";
  186. mes "that controls this place.";
  187. close;
  188. }
  189. else {
  190. if (agitcheck2() == 0) {
  191. mes "[Nios]";
  192. mes "I am Nios, guardian of";
  193. mes "this stronghold. For now,";
  194. mes "all is quiet in this place.";
  195. next;
  196. switch(select("Converse:Cancel")) {
  197. case 1:
  198. mes "[Nios]";
  199. mes "Do you have any questions";
  200. mes "about this stronghold?";
  201. next;
  202. switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
  203. case 1:
  204. mes "[Nios]";
  205. mes "There is one Emperium";
  206. mes "and two Guardian Stones in";
  207. mes "each fortress. These stones";
  208. mes "are the first line of defense,";
  209. mes "and must be destroyed before";
  210. mes "enemies can even enter.";
  211. next;
  212. mes "[Nios]";
  213. mes "The stones are located in";
  214. mes "^4D4DFFGate Houses^000000 which must be";
  215. mes "protected to prevent enemies";
  216. mes "from reaching the Emperium.";
  217. mes "Guardian Stones can ^4D4DFFrecall";
  218. mes "your Guardians^000000 for protection.";
  219. next;
  220. mes "[Nios]";
  221. mes "Fortresses with higher levels";
  222. mes "of defense can summon more";
  223. mes "Guardians: this is why it is";
  224. mes "so important for guilds to";
  225. mes "invest in Defense Growth.";
  226. next;
  227. mes "[Nios]";
  228. mes "Guardian Stones that have";
  229. mes "been destroyed can be revived";
  230. mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
  231. mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
  232. close;
  233. case 2:
  234. mes "[Nios]";
  235. mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
  236. mes "and are protected by extra barricades activated by the Guardian Stones.";
  237. mes "These gates are located in three different parts of the fortress.";
  238. next;
  239. mes "[Nios]";
  240. mes "Barricades are protected by";
  241. mes "Guardian Stones, and are";
  242. mes "restored when the Guardian";
  243. mes "Stones are retrieved. However,";
  244. mes "it is not as easy to restore";
  245. mes "destroyed Fortress Gates.";
  246. next;
  247. mes "[Nios]";
  248. mes "Fortress Gates can only be";
  249. mes "restored when the ^4D4DFFguild";
  250. mes "master of a stronghold";
  251. mes "changes^000000, or if ^4D4DFFrestoration";
  252. mes "is requested by the guild";
  253. mes "master of the stronghold^000000.";
  254. close;
  255. case 3:
  256. mes "[Nios]";
  257. mes "Strongholds have many";
  258. mes "Link Flags that allow you";
  259. mes "to access vital areas within";
  260. mes "restrictions placed by the";
  261. mes "Barricades. Usually, ^4D4DFFFlag 1";
  262. mes "links to the Gate House^000000.";
  263. next;
  264. mes "[Nios]";
  265. mes "Many flags link directly to";
  266. mes "the flag near the Emperium.";
  267. mes "The final numbered flag is";
  268. mes "linked to the Convenience";
  269. mes "Facility of the stronghold's";
  270. mes "owner. Keep this in mind.";
  271. close;
  272. case 4:
  273. mes "[Nios]";
  274. mes "Strategy? It would be better";
  275. mes "to develop your battle plan to";
  276. mes "exploit your guild's advantages";
  277. mes "and your enemies' weaknesses.";
  278. mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
  279. close;
  280. case 5:
  281. mes "[Nios]";
  282. mes "You have no questions";
  283. mes "to ask of me? Well, I'm";
  284. mes "here to serve your needs.";
  285. close;
  286. }
  287. case 2:
  288. mes "[Nios]";
  289. mes "I'm always here, so";
  290. mes "feel free to request my";
  291. mes "assistance whenever";
  292. mes "the need arises.";
  293. close;
  294. }
  295. }
  296. else {
  297. mes "[Nios]";
  298. mes "Greetings, "+strcharinfo(0)+".";
  299. mes "What are your orders?";
  300. next;
  301. switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
  302. case 1:
  303. if ($agit_ar04[5] == 0) {
  304. if (getgdskilllv(.@GID,10002) == 0) {
  305. mes "[Nios]";
  306. mes "I'm sorry, but the Guardian";
  307. mes "Stones aren't powerful enough";
  308. mes "to summon Guardians yet. We";
  309. mes "need to accumulate more";
  310. mes "knowledge before they can";
  311. mes "summon any Guardians.";
  312. close;
  313. }
  314. else {
  315. mes "[Nios]";
  316. mes "I shall endeavor to summon";
  317. mes "a Guardian through a Guardian";
  318. mes "Stone. However, keep in mind";
  319. mes "that this will not work if the";
  320. mes "Guardian Stone is destroyed.";
  321. setarray $agit_ar04[5],1;
  322. if ($agit_ar04[0] == 0) {
  323. donpcevent "#aru04_gard01::OnEnable";
  324. }
  325. if ($agit_ar04[1] == 0) {
  326. donpcevent "#aru04_gard02::OnEnable";
  327. }
  328. close;
  329. }
  330. }
  331. else {
  332. mes "[Nios]";
  333. mes "You've already commanded";
  334. mes "me to summon a Guardian";
  335. mes "to defend the stronghold.";
  336. close;
  337. }
  338. case 2:
  339. mes "[Nios]";
  340. mes "Our defense status is...";
  341. if ($agit_ar04[0] == 1) {
  342. mes "1st Guardian Stone: ^FF0000Destroyed^000000";
  343. }
  344. else if ($agit_ar04[0] == 2) {
  345. mes "1st Guardian Stone: ^008000Repairing^000000";
  346. }
  347. else {
  348. mes "1st Guardian Stone: ^4D4DFFOperational^000000";
  349. }
  350. if ($agit_ar04[1] == 1) {
  351. mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
  352. }
  353. else if ($agit_ar04[1] == 2) {
  354. mes "2nd Guardian Stone: ^008000Repairing^000000";
  355. }
  356. else {
  357. mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
  358. }
  359. if ($agit_ar04[2] == 1) {
  360. mes "1st Fortress Gate: ^FF0000Destroyed^000000";
  361. }
  362. else if ($agit_ar04[2] == 2) {
  363. mes "1st Fortress Gate: ^008000Repairing^000000";
  364. }
  365. else {
  366. mes "1st Fortress Gate: ^4D4DFFOperational^000000";
  367. }
  368. if ($agit_ar04[3] == 1) {
  369. mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
  370. }
  371. else if ($agit_ar04[3] == 2) {
  372. mes "2nd Fortress Gate: ^008000Repairing^000000";
  373. }
  374. else {
  375. mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
  376. }
  377. if ($agit_ar04[4] == 1) {
  378. mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
  379. }
  380. else if ($agit_ar04[4] == 2) {
  381. mes "3rd Fortress Gate: ^008000Repairing^000000";
  382. }
  383. else {
  384. mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
  385. }
  386. close;
  387. case 3:
  388. mes "[Nios]";
  389. mes "I'll be standing by,";
  390. mes "awaiting your orders.";
  391. close;
  392. }
  393. }
  394. }
  395. }
  396. else {
  397. mes "[Nios]";
  398. mes "Who are you? Scoundrel!";
  399. mes "Leave this stronghold now!";
  400. close;
  401. }
  402. OnInit:
  403. setarray $agit_ar04[0],0,0,0,0,0,0;
  404. end;
  405. }
  406. arug_cas04,1,1,0 script #aru04_gard01 -1,{
  407. OnEnable:
  408. set .@defence,GetCastleData("arug_cas04",3);
  409. guardian "arug_cas04",130,60,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //0;
  410. if ((.@defence > 10) && (.@defence < 31)) {
  411. set .MyMobCount,2;
  412. guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
  413. }
  414. else if ((.@defence > 30) && (.@defence < 51)) {
  415. set .MyMobCount,3;
  416. guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
  417. guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
  418. }
  419. else if ((.@defence > 50) && (.@defence < 71)) {
  420. set .MyMobCount,4;
  421. guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
  422. guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
  423. guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3;
  424. }
  425. else if (.@defence > 70) {
  426. set .MyMobCount,5;
  427. guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
  428. guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2;
  429. guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3;
  430. guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //4;
  431. }
  432. else {
  433. set .MyMobCount,2;
  434. guardian "arug_cas04",66,157,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1;
  435. }
  436. initnpctimer;
  437. end;
  438. OnTimer300000:
  439. set .MyMobCount,.MyMobCount+1;
  440. guardian "arug_cas04",91,53,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //5;
  441. mapannounce "arug_cas04","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  442. end;
  443. OnTimer900000:
  444. set .MyMobCount,.MyMobCount+1;
  445. guardian "arug_cas04",65,71,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //6;
  446. mapannounce "arug_cas04","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  447. end;
  448. OnTimer1800000:
  449. set .MyMobCount,.MyMobCount+1;
  450. guardian "arug_cas04",65,103,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //7;
  451. mapannounce "arug_cas04","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  452. end;
  453. OnTimer2700000:
  454. set .MyMobCount,.MyMobCount+1;
  455. guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //8;
  456. mapannounce "arug_cas04","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  457. end;
  458. OnTimer3600000:
  459. set .MyMobCount,.MyMobCount+1;
  460. guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //9;
  461. mapannounce "arug_cas04","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  462. stopnpctimer;
  463. end;
  464. OnGuardianDied:
  465. set .MyMobCount,.MyMobCount-1;
  466. if (.MyMobCount < 2) {
  467. set .MyMobCount,.MyMobCount+1;
  468. guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //10;
  469. }
  470. end;
  471. Onreset:
  472. stopnpctimer;
  473. killmonster "arug_cas04","#aru04_gard01::OnGuardianDied";
  474. end;
  475. }
  476. arug_cas04,1,2,0 script #aru04_gard02 -1,{
  477. OnEnable:
  478. set .@defence,GetCastleData("arug_cas04",3);
  479. guardian "arug_cas04",156,101,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //11;
  480. if ((.@defence > 10) && (.@defence < 31)) {
  481. set .MyMobCount,2;
  482. guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
  483. }
  484. else if ((.@defence > 30) && (.@defence < 51)) {
  485. set .MyMobCount,3;
  486. guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
  487. guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
  488. }
  489. else if ((.@defence > 50) && (.@defence < 71)) {
  490. set .MyMobCount,4;
  491. guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
  492. guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
  493. guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14;
  494. }
  495. else if (.@defence > 70) {
  496. set .MyMobCount,5;
  497. guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
  498. guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13;
  499. guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14;
  500. guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //15;
  501. }
  502. else {
  503. set .MyMobCount,2;
  504. guardian "arug_cas04",211,159,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12;
  505. }
  506. initnpctimer;
  507. end;
  508. OnTimer600000:
  509. set .MyMobCount,.MyMobCount+1;
  510. guardian "arug_cas04",187,54,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //16;
  511. end;
  512. OnTimer1200000:
  513. set .MyMobCount,.MyMobCount+1;
  514. guardian "arug_cas04",212,67,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //17;
  515. end;
  516. OnTimer2100000:
  517. set .MyMobCount,.MyMobCount+1;
  518. guardian "arug_cas04",211,105,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //18;
  519. end;
  520. OnTimer3000000:
  521. set .MyMobCount,.MyMobCount+1;
  522. guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //19;
  523. end;
  524. OnTimer3900000:
  525. set .MyMobCount,.MyMobCount+1;
  526. guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //20;
  527. stopnpctimer;
  528. end;
  529. OnGuardianDied:
  530. set .MyMobCount,.MyMobCount-1;
  531. if (.MyMobCount < 2) {
  532. set .MyMobCount,.MyMobCount+1;
  533. guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //21;
  534. }
  535. end;
  536. Onreset:
  537. stopnpctimer;
  538. killmonster "arug_cas04","#aru04_gard02::OnGuardianDied";
  539. end;
  540. }
  541. arug_cas04,1,3,0 script #aru04_df01 -1,{
  542. OnEnable:
  543. guardian "arug_cas04",65,171,"1st Guardian Stone",1907,"#aru04_df01::OnGuardianStoneDied"; //22;
  544. end;
  545. OnDisable:
  546. killmonster "arug_cas04","#aru04_df01::OnGuardianStoneDied";
  547. setarray $agit_ar04[0],1; //Global Variable
  548. stopnpctimer;
  549. end;
  550. OnGuardianStoneDied:
  551. // 1st Guardian Stone is Destroyed
  552. setarray $agit_ar04[0],1;
  553. if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) {
  554. set .@destroyed,.@destroyed + 1;
  555. }
  556. if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) {
  557. set .@destroyed,.@destroyed + 1;
  558. }
  559. if (.@destroyed == 2) {
  560. mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  561. donpcevent "#aru04_RL00::OnDisable";
  562. donpcevent "#aru04_gard01::Onreset";
  563. }
  564. else {
  565. mapannounce "arug_cas04","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  566. donpcevent "#aru04_gard01::Onreset";
  567. }
  568. initnpctimer;
  569. end;
  570. OnTimer300000:
  571. donpcevent "1st Guardian Stone#aru04::OnEnable";
  572. setarray $agit_ar04[0],2; //Global Variable
  573. stopnpctimer;
  574. end;
  575. }
  576. arug_cas04,65,171,0 script 1st Guardian Stone#aru04 844,{
  577. set .@GID, GetCastleData("arug_cas04",1);
  578. if (getcharid(2) == .@GID) {
  579. mes "^3355FFYou will need the";
  580. mes "following materials to";
  581. mes "rebuild a destroyed";
  582. mes "Guardian Stone.^000000";
  583. next;
  584. mes "1 Oridecon";
  585. mes "1 Elunium";
  586. mes "30 Stones";
  587. mes "5 Blue Gemstones";
  588. mes "5 Yellow Gemstones";
  589. mes "5 Red Gemstones";
  590. next;
  591. mes "^3355FFDo you want to continue?^000000";
  592. switch(select("No:Continue")) {
  593. case 1:
  594. mes "^3355FFWork canceled.^000000";
  595. close;
  596. case 2:
  597. if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
  598. mes "^3355FFArrange Stones, Elunium, and";
  599. mes "Oridecon, in that order, in the";
  600. mes "center. Then you must arrange";
  601. mes "the enchanted Gemstones to";
  602. mes "rebuild the Guardian Stone.^000000";
  603. next;
  604. switch(select("Elunium:Oridecon:Stone")) {
  605. case 1:
  606. mes "^3355FFElunium has been";
  607. mes "placed in the center.^000000";
  608. next;
  609. break;
  610. case 2:
  611. mes "^3355FFOridecon has been";
  612. mes "placed in the center.^000000";
  613. next;
  614. break;
  615. case 3:
  616. mes "^3355FFStones have been";
  617. mes "placed in the center.^000000";
  618. set .@nice,.@nice+10;
  619. next;
  620. break;
  621. }
  622. switch(select("Elunium:Oridecon:Stone")) {
  623. case 1:
  624. mes "^3355FFYou have lined the";
  625. mes "outside of the center";
  626. mes "with some Elunium.^000000";
  627. set .@nice,.@nice+10;
  628. next;
  629. break;
  630. case 2:
  631. mes "^3355FFYou have lined the";
  632. mes "outside of the center";
  633. mes "with some Oridecon.^000000";
  634. next;
  635. break;
  636. case 3:
  637. mes "^3355FFYou have lined the";
  638. mes "outside of the center";
  639. mes "with some Stones.^000000";
  640. next;
  641. break;
  642. }
  643. switch(select("Elunium:Oridecon:Stone")) {
  644. case 1:
  645. mes "^3355FFYou covered the";
  646. mes "rest of the materials";
  647. mes "with some Elunium.^000000";
  648. next;
  649. break;
  650. case 2:
  651. mes "^3355FFYou covered the";
  652. mes "rest of the materials";
  653. mes "with some Oridecon.^000000";
  654. set .@nice,.@nice+10;
  655. next;
  656. break;
  657. case 3:
  658. mes "^3355FFYou covered the";
  659. mes "rest of the materials";
  660. mes "with some Stones.^000000";
  661. next;
  662. break;
  663. }
  664. mes "^3355FFNow you need to arrange";
  665. mes "the enchanted Gemstones";
  666. mes "accordingly. You can identify";
  667. mes "their Magic properties by";
  668. mes "their casting effect.^000000";
  669. next;
  670. while(1) {
  671. if (.@roof0 > 7) {
  672. break;
  673. }
  674. else {
  675. switch(rand(1,3)) {
  676. case 1:
  677. specialeffect EF_BEGINSPELL2;
  678. mes "^3355FFThe Gemstones must";
  679. mes "be arranged in the correct";
  680. mes "order according to their";
  681. mes "magic properties and power.^000000";
  682. next;
  683. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  684. case 1:
  685. mes "^3355FFYou placed the Red Gemstone.";
  686. mes "However, the Guardian Stone";
  687. mes "Repair System failed because";
  688. mes "of a magic power conflict.^000000";
  689. close;
  690. case 2:
  691. mes "^3355FFYou placed the Yellow Gemstone.";
  692. mes "However, the Guardian Stone";
  693. mes "Repair System failed because";
  694. mes "of a magic power conflict.^000000";
  695. close;
  696. case 3:
  697. mes "^3355FFYou placed the Blue Gemstone.^000000";
  698. set .@nice,.@nice+10;
  699. set .@roof0,.@roof0 + 1;
  700. specialeffect EF_STEAL;
  701. next;
  702. break;
  703. }
  704. break;
  705. case 2:
  706. specialeffect EF_VOLCANO;
  707. mes "^3355FFThe Gemstones must";
  708. mes "be arranged in the correct";
  709. mes "order according to their";
  710. mes "magic properties and power.^000000";
  711. next;
  712. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  713. case 1:
  714. mes "^3355FFYou placed the Red Gemstone.^000000";
  715. set .@nice,.@nice+10;
  716. set .@roof0,.@roof0 + 1;
  717. specialeffect EF_STEAL;
  718. next;
  719. break;
  720. case 2:
  721. mes "^3355FFYou placed the Yellow Gemstone.";
  722. mes "However, the Guardian Stone";
  723. mes "Repair System failed because";
  724. mes "of a magic power conflict.^000000";
  725. close;
  726. case 3:
  727. mes "^3355FFYou placed the Blue Gemstone.";
  728. mes "However, the Guardian Stone";
  729. mes "Repair System failed because";
  730. mes "of a magic power conflict.^000000";
  731. close;
  732. }
  733. break;
  734. case 3:
  735. specialeffect EF_BEGINSPELL4;
  736. mes "^3355FFThe Gemstones must";
  737. mes "be arranged in the correct";
  738. mes "order according to their";
  739. mes "magic properties and power.^000000";
  740. next;
  741. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  742. case 1:
  743. mes "^3355FFYou placed the Red Gemstone.";
  744. mes "However, the Guardian Stone";
  745. mes "Repair System failed because";
  746. mes "of a magic power conflict.^000000";
  747. close;
  748. case 2:
  749. mes "^3355FFYou placed the Yellow Gemstone.^000000";
  750. set .@nice,.@nice+10;
  751. set .@roof0,.@roof0 + 1;
  752. specialeffect EF_STEAL;
  753. next;
  754. break;
  755. case 3:
  756. mes "^3355FFYou placed the Blue Gemstone.";
  757. mes "However, the Guardian Stone";
  758. mes "Repair System failed because";
  759. mes "of a magic power conflict.^000000";
  760. close;
  761. }
  762. }
  763. }
  764. }
  765. if (.@nice > 90) {
  766. if ($agit_ar04[0] == 0) {
  767. mes "^3355FFThe Guardian Stone";
  768. mes "Repair System has";
  769. mes "already completed.^000000";
  770. close;
  771. }
  772. else {
  773. if (agitcheck2() == 0) {
  774. mes "^3355FFIt is impossible to";
  775. mes "rebuild the Guardian";
  776. mes "Stone because the";
  777. mes "Emperium is not present.^000000";
  778. close;
  779. }
  780. else {
  781. mes "^3355FFThe Gemstones have been";
  782. mes "arranged, and the Guardian";
  783. mes "Stone is successfully repaired.^000000";
  784. delitem 984,1; //Oridecon
  785. delitem 985,1; //Elunium
  786. delitem 7049,30; //Stone
  787. delitem 717,5; //Blue_Gemstone
  788. delitem 715,5; //Yellow_Gemstone
  789. delitem 716,5; //Red_Gemstone
  790. close2;
  791. donpcevent "#aru04_df01::OnEnable";
  792. specialeffect EF_ICECRASH;
  793. disablenpc "1st Guardian Stone#aru04";
  794. setarray $agit_ar04[0],0;
  795. set .@df_all,$agit_ar04[0]+$agit_ar04[1];
  796. if (.@df_all == 0) {
  797. mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  798. donpcevent "#aru04_RL00::OnEnable";
  799. }
  800. else {
  801. mapannounce "arug_cas04","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  802. }
  803. if ($agit_ar04[5] == 1) {
  804. donpcevent "#aru04_gard01::OnEnable";
  805. }
  806. end;
  807. }
  808. }
  809. }
  810. else {
  811. mes "^3355FFAfter all of that work...";
  812. mes "It looks like you failed";
  813. mes "to fix the Guardian Stone,";
  814. mes "and lost some materials.^000000";
  815. delitem 7049,10; //Stone
  816. delitem 717,2; //Blue_Gemstone
  817. delitem 715,2; //Yellow_Gemstone
  818. delitem 716,2; //Red_Gemstone
  819. close;
  820. }
  821. }
  822. else {
  823. mes "^3355FFYou don't have enough";
  824. mes "materials to repair";
  825. mes "the Guardian Stone.^000000";
  826. close;
  827. }
  828. }
  829. }
  830. end;
  831. OnInit:
  832. disablenpc "1st Guardian Stone#aru04";
  833. end;
  834. OnEnable:
  835. enablenpc "1st Guardian Stone#aru04";
  836. specialeffect EF_MAPPILLAR2;
  837. end;
  838. OnDisable:
  839. disablenpc "1st Guardian Stone#aru04";
  840. end;
  841. }
  842. arug_cas04,1,4,0 script #aru04_df02 -1,{
  843. OnEnable:
  844. guardian "arug_cas04",212,149,"2nd Guardian Stone",1908,"#aru04_df02::OnGuardianStoneDied"; //23;
  845. end;
  846. OnDisable:
  847. killmonster "arug_cas04","#aru04_df02::OnGuardianStoneDied";
  848. setarray $agit_ar04[1],1; //Global Variable
  849. stopnpctimer;
  850. end;
  851. OnGuardianStoneDied:
  852. // 2nd Guardian Stone is Destroyed
  853. setarray $agit_ar04[1],1;
  854. if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) {
  855. set .@destroyed,.@destroyed + 1;
  856. }
  857. if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) {
  858. set .@destroyed,.@destroyed + 1;
  859. }
  860. if (.@destroyed == 2) {
  861. mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  862. donpcevent "#aru04_RL00::OnDisable";
  863. donpcevent "#aru04_gard02::Onreset";
  864. }
  865. else {
  866. mapannounce "arug_cas04","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  867. donpcevent "#aru04_gard02::Onreset";
  868. }
  869. initnpctimer;
  870. end;
  871. OnTimer300000:
  872. donpcevent "2nd Guardian Stone#aru04::OnEnable";
  873. setarray $agit_ar04[1],2; //Global Variable
  874. stopnpctimer;
  875. end;
  876. }
  877. arug_cas04,212,149,0 script 2nd Guardian Stone#aru04 844,{
  878. set .@GID, GetCastleData("arug_cas04",1);
  879. if (getcharid(2) == .@GID) {
  880. mes "^3355FFYou will need the";
  881. mes "following materials to";
  882. mes "rebuild a destroyed";
  883. mes "Guardian Stone.^000000";
  884. next;
  885. mes "1 Oridecon";
  886. mes "1 Elunium";
  887. mes "30 Stones";
  888. mes "5 Blue Gemstones";
  889. mes "5 Yellow Gemstones";
  890. mes "5 Red Gemstones";
  891. next;
  892. mes "^3355FFDo you want to continue?^000000";
  893. switch(select("No:Continue")) {
  894. case 1:
  895. mes "^3355FFWork canceled.^000000";
  896. close;
  897. case 2:
  898. if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
  899. mes "^3355FFArrange Stones, Elunium, and";
  900. mes "Oridecon, in that order, in the";
  901. mes "center. Then you must arrange";
  902. mes "the enchanted Gemstones to";
  903. mes "rebuild the Guardian Stone.^000000";
  904. next;
  905. switch(select("Elunium:Oridecon:Stone")) {
  906. case 1:
  907. mes "^3355FFElunium has been";
  908. mes "placed in the center.^000000";
  909. next;
  910. break;
  911. case 2:
  912. mes "^3355FFOridecon has been";
  913. mes "placed in the center.^000000";
  914. next;
  915. break;
  916. case 3:
  917. mes "^3355FFStones have been";
  918. mes "placed in the center.^000000";
  919. set .@nice,.@nice+10;
  920. next;
  921. break;
  922. }
  923. switch(select("Elunium:Oridecon:Stone")) {
  924. case 1:
  925. mes "^3355FFYou have lined the";
  926. mes "outside of the center";
  927. mes "with some Elunium.^000000";
  928. set .@nice,.@nice+10;
  929. next;
  930. break;
  931. case 2:
  932. mes "^3355FFYou have lined the";
  933. mes "outside of the center";
  934. mes "with some Oridecon.^000000";
  935. next;
  936. break;
  937. case 3:
  938. mes "^3355FFYou have lined the";
  939. mes "outside of the center";
  940. mes "with some Stones.^000000";
  941. next;
  942. break;
  943. }
  944. switch(select("Elunium:Oridecon:Stone")) {
  945. case 1:
  946. mes "^3355FFYou covered the";
  947. mes "rest of the materials";
  948. mes "with some Elunium.^000000";
  949. next;
  950. break;
  951. case 2:
  952. mes "^3355FFYou covered the";
  953. mes "rest of the materials";
  954. mes "with some Oridecon.^000000";
  955. set .@nice,.@nice+10;
  956. next;
  957. break;
  958. case 3:
  959. mes "^3355FFYou covered the";
  960. mes "rest of the materials";
  961. mes "with some Stones.^000000";
  962. next;
  963. break;
  964. }
  965. mes "^3355FFNow you need to arrange";
  966. mes "the enchanted Gemstones";
  967. mes "accordingly. You can identify";
  968. mes "their Magic properties by";
  969. mes "their casting effect.^000000";
  970. next;
  971. while(1) {
  972. if (.@roof0 > 7) {
  973. break;
  974. }
  975. else {
  976. switch(rand(1,3)) {
  977. case 1:
  978. specialeffect EF_BEGINSPELL2;
  979. mes "^3355FFThe Gemstones must";
  980. mes "be arranged in the correct";
  981. mes "order according to their";
  982. mes "magic properties and power.^000000";
  983. next;
  984. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  985. case 1:
  986. mes "^3355FFYou placed the Red Gemstone.";
  987. mes "However, the Guardian Stone";
  988. mes "Repair System failed because";
  989. mes "of a magic power conflict.^000000";
  990. close;
  991. case 2:
  992. mes "^3355FFYou placed the Yellow Gemstone.";
  993. mes "However, the Guardian Stone";
  994. mes "Repair System failed because";
  995. mes "of a magic power conflict.^000000";
  996. close;
  997. case 3:
  998. mes "^3355FFYou placed the Blue Gemstone.^000000";
  999. set .@nice,.@nice+10;
  1000. set .@roof0,.@roof0 + 1;
  1001. specialeffect EF_STEAL;
  1002. next;
  1003. break;
  1004. }
  1005. break;
  1006. case 2:
  1007. specialeffect EF_VOLCANO;
  1008. mes "^3355FFThe Gemstones must";
  1009. mes "be arranged in the correct";
  1010. mes "order according to their";
  1011. mes "magic properties and power.^000000";
  1012. next;
  1013. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  1014. case 1:
  1015. mes "^3355FFYou placed the Red Gemstone.^000000";
  1016. set .@nice,.@nice+10;
  1017. set .@roof0,.@roof0 + 1;
  1018. specialeffect EF_STEAL;
  1019. next;
  1020. break;
  1021. case 2:
  1022. mes "^3355FFYou placed the Yellow Gemstone.";
  1023. mes "However, the Guardian Stone";
  1024. mes "Repair System failed because";
  1025. mes "of a magic power conflict.^000000";
  1026. close;
  1027. case 3:
  1028. mes "^3355FFYou placed the Blue Gemstone.";
  1029. mes "However, the Guardian Stone";
  1030. mes "Repair System failed because";
  1031. mes "of a magic power conflict.^000000";
  1032. close;
  1033. }
  1034. break;
  1035. case 3:
  1036. specialeffect EF_BEGINSPELL4;
  1037. mes "^3355FFThe Gemstones must";
  1038. mes "be arranged in the correct";
  1039. mes "order according to their";
  1040. mes "magic properties and power.^000000";
  1041. next;
  1042. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  1043. case 1:
  1044. mes "^3355FFYou placed the Red Gemstone.";
  1045. mes "However, the Guardian Stone";
  1046. mes "Repair System failed because";
  1047. mes "of a magic power conflict.^000000";
  1048. close;
  1049. case 2:
  1050. mes "^3355FFYou placed the Yellow Gemstone.^000000";
  1051. set .@nice,.@nice+10;
  1052. set .@roof0,.@roof0 + 1;
  1053. specialeffect EF_STEAL;
  1054. next;
  1055. break;
  1056. case 3:
  1057. mes "^3355FFYou placed the Blue Gemstone.";
  1058. mes "However, the Guardian Stone";
  1059. mes "Repair System failed because";
  1060. mes "of a magic power conflict.^000000";
  1061. close;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. if (.@nice > 90) {
  1067. if ($agit_ar04[1] == 0) {
  1068. mes "^3355FFThe Guardian Stone";
  1069. mes "Repair System has";
  1070. mes "successfully completed.^000000";
  1071. close;
  1072. }
  1073. else {
  1074. if (agitcheck2() == 0) {
  1075. mes "^3355FFIt is impossible to";
  1076. mes "rebuild the Guardian";
  1077. mes "Stone because the";
  1078. mes "Emperium is not present.^000000";
  1079. close;
  1080. }
  1081. else {
  1082. mes "^3355FFThe Gemstones have been";
  1083. mes "arranged, and the Guardian";
  1084. mes "Stone is successfully repaired.^000000";
  1085. delitem 984,1; //Oridecon
  1086. delitem 985,1; //Elunium
  1087. delitem 7049,30; //Stone
  1088. delitem 717,5; //Blue_Gemstone
  1089. delitem 715,5; //Yellow_Gemstone
  1090. delitem 716,5; //Red_Gemstone
  1091. close2;
  1092. donpcevent "#aru04_df02::OnEnable";
  1093. specialeffect EF_ICECRASH;
  1094. disablenpc "2nd Guardian Stone#aru04";
  1095. setarray $agit_ar04[1],0;
  1096. set .@df_all,$agit_ar04[0]+$agit_ar04[1];
  1097. if (.@df_all == 0) {
  1098. mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  1099. donpcevent "#aru04_RL00::OnEnable";
  1100. }
  1101. else {
  1102. mapannounce "arug_cas04","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  1103. }
  1104. if ($agit_ar04[5] == 1) {
  1105. donpcevent "#aru04_gard02::OnEnable";
  1106. }
  1107. end;
  1108. }
  1109. }
  1110. }
  1111. else {
  1112. mes "^3355FFAfter all of that work...";
  1113. mes "It looks like you failed";
  1114. mes "to fix the Guardian Stone,";
  1115. mes "and lost some materials.^000000";
  1116. delitem 7049,10; //Stone
  1117. delitem 717,2; //Blue_Gemstone
  1118. delitem 715,2; //Yellow_Gemstone
  1119. delitem 716,2; //Red_Gemstone
  1120. close;
  1121. }
  1122. }
  1123. else {
  1124. mes "^3355FFYou don't have enough";
  1125. mes "materials to repair";
  1126. mes "the Guardian Stone.^000000";
  1127. close;
  1128. }
  1129. }
  1130. }
  1131. end;
  1132. OnInit:
  1133. disablenpc "2nd Guardian Stone#aru04";
  1134. end;
  1135. OnEnable:
  1136. enablenpc "2nd Guardian Stone#aru04";
  1137. specialeffect 247; //"2nd Guardian Stone#aru04" EF_MAPPILLAR2
  1138. end;
  1139. OnDisable:
  1140. disablenpc "2nd Guardian Stone#aru04";
  1141. end;
  1142. }
  1143. // Barrier Summoners
  1144. arug_cas04,2,1,0 script #aru04_RL00 -1,{
  1145. OnEnable:
  1146. setcell "arug_cas04",138,110,145,110,cell_walkable,0;
  1147. setcell "arug_cas04",138,110,145,110,cell_shootable,0;
  1148. guardian "arug_cas04",139,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //24;
  1149. guardian "arug_cas04",141,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //25;
  1150. guardian "arug_cas04",143,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //26;
  1151. guardian "arug_cas04",145,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //27;
  1152. end;
  1153. OnDisable:
  1154. setcell "arug_cas04",138,136,145,110,cell_walkable,1;
  1155. setcell "arug_cas04",138,110,145,110,cell_shootable,1;
  1156. killmonster "arug_cas04","#aru04_RL00::OnBarrierDestroyed";
  1157. end;
  1158. OnBarrierDestroyed:
  1159. end;
  1160. }
  1161. arug_cas04,2,2,0 script #aru04_RL01 -1,{
  1162. OnEnable:
  1163. set .MyMobCount,6;
  1164. setcell "arug_cas04",139,158,144,158,cell_walkable,0;
  1165. guardian "arug_cas04",140,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //28;
  1166. guardian "arug_cas04",142,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //29;
  1167. guardian "arug_cas04",144,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //30;
  1168. guardian "arug_cas04",139,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //31;
  1169. guardian "arug_cas04",141,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //32;
  1170. guardian "arug_cas04",143,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //33;
  1171. end;
  1172. OnBarrierDestroyed:
  1173. set .MyMobCount,.MyMobCount-1;
  1174. if (.MyMobCount == 0) {
  1175. setarray $agit_ar04[2],1;
  1176. mapannounce "arug_cas04","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1177. setcell "arug_cas04",139,158,144,158,cell_walkable,1;
  1178. }
  1179. end;
  1180. OnDisable:
  1181. setcell "arug_cas04",139,158,144,158,cell_walkable,1;
  1182. killmonster "arug_cas04","#aru04_RL01::OnBarrierDestroyed";
  1183. end;
  1184. }
  1185. arug_cas04,2,3,0 script #aru04_RL02 -1,{
  1186. OnEnable:
  1187. set .MyMobCount,6;
  1188. setcell "arug_cas04",138,210,145,210,cell_walkable,0;
  1189. guardian "arug_cas04",140,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //34;
  1190. guardian "arug_cas04",142,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //35;
  1191. guardian "arug_cas04",144,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //36;
  1192. guardian "arug_cas04",139,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //37;
  1193. guardian "arug_cas04",141,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //38;
  1194. guardian "arug_cas04",143,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //39;
  1195. end;
  1196. OnBarrierDestroyed:
  1197. set .MyMobCount,.MyMobCount-1;
  1198. if (.MyMobCount == 0) {
  1199. setarray $agit_ar04[3],1;
  1200. mapannounce "arug_cas04","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1201. setcell "arug_cas04",138,210,145,210,cell_walkable,1;
  1202. }
  1203. end;
  1204. OnDisable:
  1205. setcell "arug_cas04",138,210,145,210,cell_walkable,1;
  1206. killmonster "arug_cas04","#aru04_RL02::OnBarrierDestroyed";
  1207. end;
  1208. }
  1209. arug_cas04,2,4,0 script #aru04_RL03 -1,{
  1210. OnEnable:
  1211. set .MyMobCount,4;
  1212. setcell "arug_cas04",138,263,145,263,cell_walkable,0;
  1213. guardian "arug_cas04",139,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //40;
  1214. guardian "arug_cas04",141,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //41;
  1215. guardian "arug_cas04",143,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //42;
  1216. guardian "arug_cas04",145,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //43;
  1217. end;
  1218. OnBarrierDestroyed:
  1219. set .MyMobCount,.MyMobCount-1;
  1220. if (.MyMobCount == 0) {
  1221. setarray $agit_ar04[4],1;
  1222. mapannounce "arug_cas04","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
  1223. setcell "arug_cas04",138,263,145,263,cell_walkable,1;
  1224. }
  1225. end;
  1226. OnDisable:
  1227. setcell "arug_cas04",138,263,145,263,cell_walkable,1;
  1228. killmonster "arug_cas04","#aru04_RL03::OnBarrierDestroyed";
  1229. end;
  1230. }
  1231. arug_cas04,136,158,0 script Control Device01#aru04 111,{
  1232. set .@GID, GetCastleData("arug_cas04",1);
  1233. if (getcharid(2) == .@GID) {
  1234. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1235. if ($agit_ar04[2] == 2) {
  1236. mes "^3355FFDemolished Fortress";
  1237. mes "Gates can be repaired,";
  1238. mes "but you will need to gather";
  1239. mes "the following materials.^000000";
  1240. next;
  1241. mes "^4D4DFF10 Steel^000000,";
  1242. mes "^4D4DFF30 Trunks^000000,";
  1243. mes "^4D4DFF5 Oridecon^000000, and";
  1244. mes "^4D4DFF10 Emveretarcon^000000.";
  1245. next;
  1246. select("Continue");
  1247. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1248. mes "^3355FFYou will need Trunks to";
  1249. mes "repair the support frame,";
  1250. mes "Oridecon to enhance the";
  1251. mes "gate's endurance, and";
  1252. mes "Emveretarcon to basically";
  1253. mes "hold everything together.^000000";
  1254. next;
  1255. set .@ro_of01,rand(10,15);
  1256. while(1) {
  1257. if (.@ro_of02 == .@ro_of01) {
  1258. break;
  1259. }
  1260. else {
  1261. switch(rand(1,4)) {
  1262. case 1:
  1263. mes "^3355FFThe support frame";
  1264. mes "is badly damaged:";
  1265. mes "fixing this part";
  1266. mes "is a top priority.^000000";
  1267. next;
  1268. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1269. case 1:
  1270. mes "^3355FFThe frame has been";
  1271. mes "reinforced with wood.^000000";
  1272. set .@rp_temp,.@rp_temp + 1;
  1273. set .@ro_of02,.@ro_of02 + 1;
  1274. specialeffect2 EF_REPAIRWEAPON;
  1275. next;
  1276. break;
  1277. case 2:
  1278. mes "^3355FFYou tried using steel,";
  1279. mes "but it's not working very";
  1280. mes "well. You'll have to try";
  1281. mes "something else.^000000";
  1282. close;
  1283. case 3:
  1284. mes "^3355FFYou tried using emveretarcon";
  1285. mes "to reinforce the gate, but it's";
  1286. mes "not working well at all.";
  1287. mes "You'll have to start over.^000000";
  1288. close;
  1289. case 4:
  1290. mes "^3355FFYou tried using oridecon,";
  1291. mes "but it's not working very";
  1292. mes "well. You'll have to try";
  1293. mes "something else.^000000";
  1294. close;
  1295. }
  1296. break;
  1297. case 2:
  1298. mes "^3355FFIt looks like the gate's";
  1299. mes "overall endurance needs to";
  1300. mes "be reinforced with something.^000000";
  1301. next;
  1302. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1303. case 1:
  1304. mes "^3355FFYou tried using wood";
  1305. mes "to reinforce the gate.^000000";
  1306. set .@ro_of02,.@ro_of02 + 1;
  1307. next;
  1308. break;
  1309. case 2:
  1310. mes "^3355FFYou tried using steel";
  1311. mes "to reinforce the gate, but";
  1312. mes "it's not working well at all.";
  1313. mes "You'll have to start over.^000000";
  1314. close;
  1315. case 3:
  1316. mes "^3355FFYou tried using emveretarcon";
  1317. mes "to reinforce the gate, but it's";
  1318. mes "not working well at all.";
  1319. mes "You'll have to start over.^000000";
  1320. close;
  1321. case 4:
  1322. mes "^3355FFYou hammered the";
  1323. mes "oridecon: it looks";
  1324. mes "like this will work.^000000";
  1325. set .@rp_temp,.@rp_temp + 1;
  1326. set .@ro_of02,.@ro_of02 + 1;
  1327. specialeffect2 EF_REPAIRWEAPON;
  1328. next;
  1329. break;
  1330. }
  1331. break;
  1332. case 3:
  1333. mes "^3355FFThe damage to the gate";
  1334. mes "has caused all these";
  1335. mes "cracks. You'll have to";
  1336. mes "weld them solid somehow.^000000";
  1337. next;
  1338. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1339. case 1:
  1340. mes "^3355FFYou tried using wood to fix";
  1341. mes "this problem, but it seems";
  1342. mes "to have made it worse.";
  1343. mes "You'll have to start all over.^000000";
  1344. close;
  1345. case 2:
  1346. mes "^3355FFYou used steel to weld";
  1347. mes "all the cracks: the gate is";
  1348. mes "is starting to look more solid.^000000";
  1349. set .@rp_temp,.@rp_temp + 1;
  1350. set .@ro_of02,.@ro_of02 + 1;
  1351. specialeffect2 EF_REPAIRWEAPON;
  1352. next;
  1353. break;
  1354. case 3:
  1355. mes "^3355FFYou tried using emveretarcon";
  1356. mes "to reinforce the gate, but it's";
  1357. mes "not working well at all.";
  1358. mes "You'll have to start over.^000000";
  1359. close;
  1360. case 4:
  1361. mes "^3355FFYou tried using oridecon,";
  1362. mes "but it's not working very";
  1363. mes "well. You'll have to try";
  1364. mes "something else.^000000";
  1365. close;
  1366. }
  1367. break;
  1368. case 4:
  1369. mes "^3355FFNow you need to make";
  1370. mes "sure that the gate is held";
  1371. mes "together pretty solidly.^000000";
  1372. next;
  1373. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1374. case 1:
  1375. mes "^3355FFYou tried using wood to fix";
  1376. mes "this problem, but it seems";
  1377. mes "to have made it worse.";
  1378. mes "You'll have to start all over.^000000";
  1379. close;
  1380. case 2:
  1381. mes "^3355FFYou tried using steel,";
  1382. mes "but it's not working very";
  1383. mes "well. You'll have to try";
  1384. mes "something else.^000000";
  1385. close;
  1386. case 3:
  1387. mes "^3355FFYou successfully used";
  1388. mes "the emveretarcon to repair";
  1389. mes "much of the gate's damage.^000000";
  1390. set .@rp_temp,.@rp_temp + 1;
  1391. set .@ro_of02,.@ro_of02 + 1;
  1392. specialeffect2 EF_REPAIRWEAPON;
  1393. next;
  1394. break;
  1395. case 4:
  1396. mes "^3355FFYou tried using oridecon,";
  1397. mes "but it's not working very";
  1398. mes "well. You'll have to try";
  1399. mes "something else.^000000";
  1400. close;
  1401. }
  1402. }
  1403. }
  1404. }
  1405. mes "^3355FFWell, it looks like";
  1406. mes "you're just about done";
  1407. mes "with repairing the gate.^000000";
  1408. next;
  1409. if (agitcheck2() == 0) {
  1410. mes "^3355FFUnfortunately, the Fortress";
  1411. mes "Gate can't be reconstructed:";
  1412. mes "the Emperium is no longer here.^000000";
  1413. close;
  1414. }
  1415. else {
  1416. if (.@rp_temp == .@ro_of01) {
  1417. mes "^3355FFThe Fortress Gate has";
  1418. mes "been successfully repaired!^000000";
  1419. delitem 1019,30; //Wooden_Block
  1420. delitem 999,10; //Steel
  1421. delitem 1011,10; //Emveretarcon
  1422. delitem 984,5; //Oridecon
  1423. close2;
  1424. donpcevent "#aru04_RL01::OnEnable";
  1425. disablenpc "Control Device01#aru04";
  1426. mapannounce "arug_cas04","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1427. setarray $agit_ar04[2],0;
  1428. end;
  1429. }
  1430. else {
  1431. mes "^3355FFThe wall has been breached,";
  1432. mes "and the attempt to repair the";
  1433. mes "Fortress Gate has failed.";
  1434. mes "You lost some of your";
  1435. mes "repair resources...^000000";
  1436. delitem 984,2; //Oridecon
  1437. delitem 999,4; //Steel
  1438. delitem 1019,14; //Wooden_Block
  1439. delitem 1011,3; //Emveretarcon
  1440. close;
  1441. }
  1442. }
  1443. }
  1444. else {
  1445. mes "^3355FFYou can't attempt to repair";
  1446. mes "the Fortress Gate if you don't";
  1447. mes "have all the needed materials.^000000";
  1448. close;
  1449. }
  1450. }
  1451. }
  1452. }
  1453. end;
  1454. OnInit:
  1455. disablenpc "Control Device01#aru04";
  1456. end;
  1457. OnEnable:
  1458. enablenpc "Control Device01#aru04";
  1459. end;
  1460. OnDisable:
  1461. disablenpc "Control Device01#aru04";
  1462. end;
  1463. }
  1464. arug_cas04,135,212,0 script Control Device02#aru04 111,{
  1465. set .@GID, GetCastleData("arug_cas04",1);
  1466. if (getcharid(2) == .@GID) {
  1467. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1468. if ($agit_ar04[3] == 2) {
  1469. mes "^3355FFDemolished Fortress";
  1470. mes "Gates can be repaired,";
  1471. mes "but you will need to gather";
  1472. mes "the following materials.^000000";
  1473. next;
  1474. mes "^4D4DFF10 Steel^000000,";
  1475. mes "^4D4DFF30 Trunks^000000,";
  1476. mes "^4D4DFF5 Oridecon^000000, and";
  1477. mes "^4D4DFF10 Emveretarcon^000000.";
  1478. next;
  1479. select("Continue");
  1480. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1481. mes "^3355FFYou will need Trunks to";
  1482. mes "repair the support frame,";
  1483. mes "Oridecon to enhance the";
  1484. mes "gate's endurance, and";
  1485. mes "Emveretarcon to basically";
  1486. mes "hold everything together.^000000";
  1487. next;
  1488. set .@ro_of01,rand(10,15);
  1489. while(1) {
  1490. if (.@ro_of02 == .@ro_of01) {
  1491. break;
  1492. }
  1493. else {
  1494. switch(rand(1,4)) {
  1495. case 1:
  1496. mes "^3355FFThe support frame";
  1497. mes "is badly damaged:";
  1498. mes "fixing this part";
  1499. mes "is a top priority.^000000";
  1500. next;
  1501. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1502. case 1:
  1503. mes "^3355FFThe frame has been";
  1504. mes "reinforced with wood.^000000";
  1505. set .@rp_temp,.@rp_temp + 1;
  1506. set .@ro_of02,.@ro_of02 + 1;
  1507. specialeffect2 EF_REPAIRWEAPON;
  1508. next;
  1509. break;
  1510. case 2:
  1511. mes "^3355FFYou tried using steel,";
  1512. mes "but it's not working very";
  1513. mes "well. You'll have to try";
  1514. mes "something else.^000000";
  1515. close;
  1516. case 3:
  1517. mes "^3355FFYou tried using emveretarcon";
  1518. mes "to reinforce the gate, but it's";
  1519. mes "not working well at all.";
  1520. mes "You'll have to start over.^000000";
  1521. close;
  1522. case 4:
  1523. mes "^3355FFYou tried using oridecon,";
  1524. mes "but it's not working very";
  1525. mes "well. You'll have to try";
  1526. mes "something else.^000000";
  1527. close;
  1528. }
  1529. break;
  1530. case 2:
  1531. mes "^3355FFIt looks like the gate's";
  1532. mes "overall endurance needs to";
  1533. mes "be reinforced with something.^000000";
  1534. next;
  1535. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1536. case 1:
  1537. mes "^3355FFYou tried using wood";
  1538. mes "to reinforce the gate.^000000";
  1539. set .@ro_of02,.@ro_of02 + 1;
  1540. next;
  1541. break;
  1542. case 2:
  1543. mes "^3355FFYou tried using steel";
  1544. mes "to reinforce the gate, but";
  1545. mes "it's not working well at all.";
  1546. mes "You'll have to start over.^000000";
  1547. close;
  1548. case 3:
  1549. mes "^3355FFYou tried using emveretarcon";
  1550. mes "to reinforce the gate, but it's";
  1551. mes "not working well at all.";
  1552. mes "You'll have to start over.^000000";
  1553. close;
  1554. case 4:
  1555. mes "^3355FFYou hammered the";
  1556. mes "oridecon: it looks";
  1557. mes "like this will work.^000000";
  1558. set .@rp_temp,.@rp_temp + 1;
  1559. set .@ro_of02,.@ro_of02 + 1;
  1560. specialeffect2 EF_REPAIRWEAPON;
  1561. next;
  1562. break;
  1563. }
  1564. break;
  1565. case 3:
  1566. mes "^3355FFThe damage to the gate";
  1567. mes "has caused all these";
  1568. mes "cracks. You'll have to";
  1569. mes "weld them solid somehow.^000000";
  1570. next;
  1571. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1572. case 1:
  1573. mes "^3355FFYou tried using wood to fix";
  1574. mes "this problem, but it seems";
  1575. mes "to have made it worse.";
  1576. mes "You'll have to start all over.^000000";
  1577. close;
  1578. case 2:
  1579. mes "^3355FFYou used steel to weld";
  1580. mes "all the cracks: the gate is";
  1581. mes "is starting to look more solid.^000000";
  1582. set .@rp_temp,.@rp_temp + 1;
  1583. set .@ro_of02,.@ro_of02 + 1;
  1584. specialeffect2 EF_REPAIRWEAPON;
  1585. next;
  1586. break;
  1587. case 3:
  1588. mes "^3355FFYou tried using emveretarcon";
  1589. mes "to reinforce the gate, but it's";
  1590. mes "not working well at all.";
  1591. mes "You'll have to start over.^000000";
  1592. close;
  1593. case 4:
  1594. mes "^3355FFYou tried using oridecon,";
  1595. mes "but it's not working very";
  1596. mes "well. You'll have to try";
  1597. mes "something else.^000000";
  1598. close;
  1599. }
  1600. break;
  1601. case 4:
  1602. mes "^3355FFNow you need to make";
  1603. mes "sure that the gate is held";
  1604. mes "together pretty solidly.^000000";
  1605. next;
  1606. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1607. case 1:
  1608. mes "^3355FFYou tried using wood to fix";
  1609. mes "this problem, but it seems";
  1610. mes "to have made it worse.";
  1611. mes "You'll have to start all over.^000000";
  1612. close;
  1613. case 2:
  1614. mes "^3355FFYou tried using steel,";
  1615. mes "but it's not working very";
  1616. mes "well. You'll have to try";
  1617. mes "something else.^000000";
  1618. close;
  1619. case 3:
  1620. mes "^3355FFYou successfully used";
  1621. mes "the emveretarcon to repair";
  1622. mes "much of the gate's damage.^000000";
  1623. set .@rp_temp,.@rp_temp + 1;
  1624. set .@ro_of02,.@ro_of02 + 1;
  1625. specialeffect2 EF_REPAIRWEAPON;
  1626. next;
  1627. break;
  1628. case 4:
  1629. mes "^3355FFYou tried using oridecon,";
  1630. mes "but it's not working very";
  1631. mes "well. You'll have to try";
  1632. mes "something else.^000000";
  1633. close;
  1634. }
  1635. }
  1636. }
  1637. }
  1638. mes "^3355FFWell, it looks like";
  1639. mes "you're just about done";
  1640. mes "with repairing the gate.^000000";
  1641. next;
  1642. if (agitcheck2() == 0) {
  1643. mes "^3355FFUnfortunately, the Fortress";
  1644. mes "Gate can't be reconstructed:";
  1645. mes "the Emperium is no longer here.^000000";
  1646. close;
  1647. }
  1648. else {
  1649. if (.@rp_temp == .@ro_of01) {
  1650. mes "^3355FFThe Fortress Gate has";
  1651. mes "been successfully repaired!^000000";
  1652. delitem 1019,30; //Wooden_Block
  1653. delitem 999,10; //Steel
  1654. delitem 1011,10; //Emveretarcon
  1655. delitem 984,5; //Oridecon
  1656. close2;
  1657. donpcevent "#aru04_RL02::OnEnable";
  1658. disablenpc "Control Device02#aru04";
  1659. mapannounce "arug_cas04","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1660. setarray $agit_ar04[3],0; //Global Variable
  1661. setarray $agit_ar04[2],2; //Global Variable
  1662. donpcevent "Control Device01#aru04::OnEnable";
  1663. end;
  1664. }
  1665. else {
  1666. mes "^3355FFThe wall has been breached,";
  1667. mes "and the attempt to repair the";
  1668. mes "Fortress Gate has failed.";
  1669. mes "You lost some of your";
  1670. mes "repair resources...^000000";
  1671. delitem 984,2; //Oridecon
  1672. delitem 999,4; //Steel
  1673. delitem 1019,14; //Wooden_Block
  1674. delitem 1011,3; //Emveretarcon
  1675. close;
  1676. }
  1677. }
  1678. }
  1679. else {
  1680. mes "^3355FFYou can't attempt to repair";
  1681. mes "the Fortress Gate if you don't";
  1682. mes "have all the needed materials.^000000";
  1683. close;
  1684. }
  1685. }
  1686. }
  1687. }
  1688. end;
  1689. OnInit:
  1690. disablenpc "Control Device02#aru04";
  1691. end;
  1692. OnEnable:
  1693. enablenpc "Control Device02#aru04";
  1694. end;
  1695. OnDisable:
  1696. disablenpc "Control Device02#aru04";
  1697. end;
  1698. }
  1699. arug_cas04,134,266,0 script Control Device03#aru04 111,{
  1700. set .@GID, GetCastleData("arug_cas04",1);
  1701. if (getcharid(2) == .@GID) {
  1702. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1703. if ($agit_ar04[4] == 2) {
  1704. mes "^3355FFDemolished Fortress";
  1705. mes "Gates can be repaired,";
  1706. mes "but you will need to gather";
  1707. mes "the following materials.^000000";
  1708. next;
  1709. mes "^4D4DFF10 Steel^000000,";
  1710. mes "^4D4DFF30 Trunks^000000,";
  1711. mes "^4D4DFF5 Oridecon^000000, and";
  1712. mes "^4D4DFF10 Emveretarcon^000000.";
  1713. next;
  1714. select("Continue");
  1715. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1716. mes "^3355FFYou will need Trunks to";
  1717. mes "repair the support frame,";
  1718. mes "Oridecon to enhance the";
  1719. mes "gate's endurance, and";
  1720. mes "Emveretarcon to basically";
  1721. mes "hold everything together.^000000";
  1722. next;
  1723. set .@ro_of01,rand(10,15);
  1724. while(1) {
  1725. if (.@ro_of02 == .@ro_of01) {
  1726. break;
  1727. }
  1728. else {
  1729. switch(rand(1,4)) {
  1730. case 1:
  1731. mes "^3355FFThe support frame";
  1732. mes "is badly damaged:";
  1733. mes "fixing this part";
  1734. mes "is a top priority.^000000";
  1735. next;
  1736. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1737. case 1:
  1738. mes "^3355FFThe frame has been";
  1739. mes "reinforced with wood.^000000";
  1740. set .@rp_temp,.@rp_temp + 1;
  1741. set .@ro_of02,.@ro_of02 + 1;
  1742. specialeffect2 EF_REPAIRWEAPON;
  1743. next;
  1744. break;
  1745. case 2:
  1746. mes "^3355FFYou tried using steel,";
  1747. mes "but it's not working very";
  1748. mes "well. You'll have to try";
  1749. mes "something else.^000000";
  1750. close;
  1751. case 3:
  1752. mes "^3355FFYou tried using emveretarcon";
  1753. mes "to reinforce the gate, but it's";
  1754. mes "not working well at all.";
  1755. mes "You'll have to start over.^000000";
  1756. close;
  1757. case 4:
  1758. mes "^3355FFYou tried using oridecon,";
  1759. mes "but it's not working very";
  1760. mes "well. You'll have to try";
  1761. mes "something else.^000000";
  1762. close;
  1763. }
  1764. break;
  1765. case 2:
  1766. mes "^3355FFIt looks like the gate's";
  1767. mes "overall endurance needs to";
  1768. mes "be reinforced with something.^000000";
  1769. next;
  1770. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1771. case 1:
  1772. mes "^3355FFYou tried using wood";
  1773. mes "to reinforce the gate.^000000";
  1774. set .@ro_of02,.@ro_of02 + 1;
  1775. next;
  1776. break;
  1777. case 2:
  1778. mes "^3355FFYou tried using steel";
  1779. mes "to reinforce the gate, but";
  1780. mes "it's not working well at all.";
  1781. mes "You'll have to start over.^000000";
  1782. close;
  1783. case 3:
  1784. mes "^3355FFYou tried using emveretarcon";
  1785. mes "to reinforce the gate, but it's";
  1786. mes "not working well at all.";
  1787. mes "You'll have to start over.^000000";
  1788. close;
  1789. case 4:
  1790. mes "^3355FFYou hammered the";
  1791. mes "oridecon: it looks";
  1792. mes "like this will work.^000000";
  1793. set .@rp_temp,.@rp_temp + 1;
  1794. set .@ro_of02,.@ro_of02 + 1;
  1795. specialeffect2 EF_REPAIRWEAPON;
  1796. next;
  1797. break;
  1798. }
  1799. break;
  1800. case 3:
  1801. mes "^3355FFThe damage to the gate";
  1802. mes "has caused all these";
  1803. mes "cracks. You'll have to";
  1804. mes "weld them solid somehow.^000000";
  1805. next;
  1806. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1807. case 1:
  1808. mes "^3355FFYou tried using wood to fix";
  1809. mes "this problem, but it seems";
  1810. mes "to have made it worse.";
  1811. mes "You'll have to start all over.^000000";
  1812. close;
  1813. case 2:
  1814. mes "^3355FFYou used steel to weld";
  1815. mes "all the cracks: the gate is";
  1816. mes "is starting to look more solid.^000000";
  1817. set .@rp_temp,.@rp_temp + 1;
  1818. set .@ro_of02,.@ro_of02 + 1;
  1819. specialeffect2 EF_REPAIRWEAPON;
  1820. next;
  1821. break;
  1822. case 3:
  1823. mes "^3355FFYou tried using emveretarcon";
  1824. mes "to reinforce the gate, but it's";
  1825. mes "not working well at all.";
  1826. mes "You'll have to start over.^000000";
  1827. close;
  1828. case 4:
  1829. mes "^3355FFYou tried using oridecon,";
  1830. mes "but it's not working very";
  1831. mes "well. You'll have to try";
  1832. mes "something else.^000000";
  1833. close;
  1834. }
  1835. break;
  1836. case 4:
  1837. mes "^3355FFNow you need to make";
  1838. mes "sure that the gate is held";
  1839. mes "together pretty solidly.^000000";
  1840. next;
  1841. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1842. case 1:
  1843. mes "^3355FFYou tried using wood to fix";
  1844. mes "this problem, but it seems";
  1845. mes "to have made it worse.";
  1846. mes "You'll have to start all over.^000000";
  1847. close;
  1848. case 2:
  1849. mes "^3355FFYou tried using steel,";
  1850. mes "but it's not working very";
  1851. mes "well. You'll have to try";
  1852. mes "something else.^000000";
  1853. close;
  1854. case 3:
  1855. mes "^3355FFYou successfully used";
  1856. mes "the emveretarcon to repair";
  1857. mes "much of the gate's damage.^000000";
  1858. set .@rp_temp,.@rp_temp + 1;
  1859. set .@ro_of02,.@ro_of02 + 1;
  1860. specialeffect2 EF_REPAIRWEAPON;
  1861. next;
  1862. break;
  1863. case 4:
  1864. mes "^3355FFYou tried using oridecon,";
  1865. mes "but it's not working very";
  1866. mes "well. You'll have to try";
  1867. mes "something else.^000000";
  1868. close;
  1869. }
  1870. }
  1871. }
  1872. }
  1873. mes "^3355FFWell, it looks like";
  1874. mes "you're just about done";
  1875. mes "with repairing the gate.^000000";
  1876. next;
  1877. if (agitcheck2() == 0) {
  1878. mes "^3355FFUnfortunately, the Fortress";
  1879. mes "Gate can't be reconstructed:";
  1880. mes "the Emperium is no longer here.^000000";
  1881. close;
  1882. }
  1883. else {
  1884. if (.@rp_temp == .@ro_of01) {
  1885. mes "^3355FFThe Fortress Gate has";
  1886. mes "been successfully repaired!^000000";
  1887. delitem 1019,30; //Wooden_Block
  1888. delitem 999,10; //Steel
  1889. delitem 1011,10; //Emveretarcon
  1890. delitem 984,5; //Oridecon
  1891. close2;
  1892. donpcevent "#aru04_RL03::OnEnable";
  1893. disablenpc "Control Device03#aru04";
  1894. mapannounce "arug_cas04","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1895. setarray $agit_ar04[4],0;
  1896. setarray $agit_ar04[3],2;
  1897. donpcevent "Control Device02#aru04::OnEnable";
  1898. end;
  1899. }
  1900. else {
  1901. mes "^3355FFThe wall has been breached,";
  1902. mes "and the attempt to repair the";
  1903. mes "Fortress Gate has failed.";
  1904. mes "You lost some of your";
  1905. mes "repair resources...^000000";
  1906. delitem 984,2; //Oridecon
  1907. delitem 999,4; //Steel
  1908. delitem 1019,14; //Wooden_Block
  1909. delitem 1011,3; //Emveretarcon
  1910. close;
  1911. }
  1912. }
  1913. }
  1914. else {
  1915. mes "^3355FFYou can't attempt to repair";
  1916. mes "the Fortress Gate if you don't";
  1917. mes "have all the needed materials.^000000";
  1918. close;
  1919. }
  1920. }
  1921. }
  1922. }
  1923. end;
  1924. OnInit:
  1925. disablenpc "Control Device03#aru04";
  1926. end;
  1927. OnEnable:
  1928. enablenpc "Control Device03#aru04";
  1929. end;
  1930. OnDisable:
  1931. disablenpc "Control Device03#aru04";
  1932. end;
  1933. }
  1934. // Link Flags
  1935. arug_cas04,122,314,0 script LF-01#arug_cas04 111,{
  1936. set .@GID, GetCastleData("arug_cas04",1);
  1937. if (getcharid(2) == .@GID) {
  1938. mes "^3355FFThis is the Stronghold";
  1939. mes "Teleport Service. Please";
  1940. mes "choose a destination";
  1941. mes "within the stronghold.^000000";
  1942. switch(select("First Gate House:Second Gate House:Cancel")) {
  1943. case 1:
  1944. warp "arug_cas04",84,158;
  1945. end;
  1946. case 2:
  1947. warp "arug_cas04",197,136;
  1948. end;
  1949. case 3:
  1950. close;
  1951. }
  1952. }
  1953. end;
  1954. }
  1955. arug_cas04,125,314,0 script LF-02#arug_cas04 111,{
  1956. set .@GID, GetCastleData("arug_cas04",1);
  1957. if (getcharid(2) == .@GID) {
  1958. mes "^3355FFThis is the Stronghold";
  1959. mes "Teleport Service. Please";
  1960. mes "choose a destination";
  1961. mes "within the stronghold.^000000";
  1962. switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) {
  1963. case 1:
  1964. warp "arug_cas04",65,94;
  1965. end;
  1966. case 2:
  1967. warp "arug_cas04",211,97;
  1968. end;
  1969. case 3:
  1970. close;
  1971. }
  1972. }
  1973. end;
  1974. }
  1975. arug_cas04,128,314,0 script LF-03#arug_cas04 111,{
  1976. set .@GID, GetCastleData("arug_cas04",1);
  1977. if (getcharid(2) == .@GID) {
  1978. mes "^3355FFThis is the Stronghold";
  1979. mes "Teleport Service. Please";
  1980. mes "choose a destination";
  1981. mes "within the stronghold.^000000";
  1982. switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) {
  1983. case 1:
  1984. warp "arug_cas04",112,73;
  1985. end;
  1986. case 2:
  1987. warp "arug_cas04",171,73;
  1988. end;
  1989. case 3:
  1990. close;
  1991. }
  1992. }
  1993. end;
  1994. }
  1995. arug_cas04,131,314,0 script LF-04#arug_cas04 111,{
  1996. set .@GID, GetCastleData("arug_cas04",1);
  1997. if (getcharid(2) == .@GID) {
  1998. mes "^3355FFThis is the Stronghold";
  1999. mes "Teleport Service. Please";
  2000. mes "choose a destination";
  2001. mes "within the stronghold.^000000";
  2002. switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) {
  2003. case 1:
  2004. warp "arug_cas04",112,152;
  2005. end;
  2006. case 2:
  2007. warp "arug_cas04",172,152;
  2008. end;
  2009. case 3:
  2010. close;
  2011. }
  2012. }
  2013. end;
  2014. }
  2015. arug_cas04,134,314,0 script LF-05#arug_cas04 111,{
  2016. set .@GID, GetCastleData("arug_cas04",1);
  2017. if (getcharid(2) == .@GID) {
  2018. mes "^3355FFThis is the Stronghold";
  2019. mes "Teleport Service. Please";
  2020. mes "choose a destination";
  2021. mes "within the stronghold.^000000";
  2022. switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) {
  2023. case 1:
  2024. warp "arug_cas04",120,186;
  2025. end;
  2026. case 2:
  2027. warp "arug_cas04",162,186;
  2028. end;
  2029. case 3:
  2030. close;
  2031. }
  2032. }
  2033. end;
  2034. }
  2035. arug_cas04,149,314,0 script LF-06#arug_cas04 111,{
  2036. set .@GID, GetCastleData("arug_cas04",1);
  2037. if (getcharid(2) == .@GID) {
  2038. mes "^3355FFThis is the Stronghold";
  2039. mes "Teleport Service. Please";
  2040. mes "choose a destination";
  2041. mes "within the stronghold.^000000";
  2042. switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) {
  2043. case 1:
  2044. warp "arug_cas04",116,235;
  2045. end;
  2046. case 2:
  2047. warp "arug_cas04",164,235;
  2048. end;
  2049. case 3:
  2050. close;
  2051. }
  2052. }
  2053. end;
  2054. }
  2055. arug_cas04,152,314,0 script LF-07#arug_cas04 111,{
  2056. set .@GID, GetCastleData("arug_cas04",1);
  2057. if (getcharid(2) == .@GID) {
  2058. mes "^3355FFThis is the Stronghold";
  2059. mes "Teleport Service. Please";
  2060. mes "choose a destination";
  2061. mes "within the stronghold.^000000";
  2062. switch(select("Defense Area 1-1:Defense Area 2-1:Defense Area 3-1:Cancel")) {
  2063. case 1:
  2064. warp "arug_cas04",65,94;
  2065. end;
  2066. case 2:
  2067. warp "arug_cas04",112,152;
  2068. end;
  2069. case 3:
  2070. warp "arug_cas04",116,235;
  2071. end;
  2072. case 4:
  2073. close;
  2074. }
  2075. }
  2076. end;
  2077. }
  2078. arug_cas04,155,314,0 script LF-08#arug_cas04 111,{
  2079. set .@GID, GetCastleData("arug_cas04",1);
  2080. if (getcharid(2) == .@GID) {
  2081. mes "^3355FFThis is the Stronghold";
  2082. mes "Teleport Service. Please";
  2083. mes "choose a destination";
  2084. mes "within the stronghold.^000000";
  2085. switch(select("Defense Area 1-2:Defense Area 2-2:Defense Area 3-2:Cancel")) {
  2086. case 1:
  2087. warp "arug_cas04",211,97;
  2088. end;
  2089. case 2:
  2090. warp "arug_cas04",172,152;
  2091. end;
  2092. case 3:
  2093. warp "arug_cas04",164,235;
  2094. end;
  2095. case 4:
  2096. close;
  2097. }
  2098. }
  2099. end;
  2100. }
  2101. arug_cas04,158,314,0 script LF-09#arug_cas04 111,{
  2102. set .@GID, GetCastleData("arug_cas04",1);
  2103. if (getcharid(2) == .@GID) {
  2104. mes "^3355FFThis is the Stronghold";
  2105. mes "Teleport Service. Please";
  2106. mes "choose a destination";
  2107. mes "within the stronghold.^000000";
  2108. switch(select("Defense Area 1-4:Defense Area 2-4:Cancel")) {
  2109. case 1:
  2110. warp "arug_cas04",171,73;
  2111. end;
  2112. case 2:
  2113. warp "arug_cas04",162,186;
  2114. end;
  2115. case 3:
  2116. close;
  2117. }
  2118. }
  2119. end;
  2120. }
  2121. arug_cas04,161,314,0 script LF-10#arug_cas04 111,{
  2122. set .@GID, GetCastleData("arug_cas04",1);
  2123. if (getcharid(2) == .@GID) {
  2124. mes "^3355FFThis is the Stronghold";
  2125. mes "Teleport Service. Would";
  2126. mes "you like to teleport to the";
  2127. mes "Convenience Facility for";
  2128. mes "guild members?^000000";
  2129. switch(select("Go to Convenience Facility:Cancel")) {
  2130. case 1:
  2131. warp "arug_cas04",321,57;
  2132. end;
  2133. case 2:
  2134. close;
  2135. }
  2136. }
  2137. end;
  2138. }
  2139. arug_cas04,45,158,0 script Gefn#LF_ar04_01::LF_ar04_01 111,{
  2140. set .@GID, GetCastleData("arug_cas04",1);
  2141. if (getcharid(2) == .@GID) {
  2142. mes "^3355FFThis is the Stronghold";
  2143. mes "Teleport Service. Would";
  2144. mes "you like to teleport to";
  2145. mes "the Emperium Center?^000000";
  2146. switch(select("Teleport:Cancel")) {
  2147. case 1:
  2148. warp "arug_cas04",121,318;
  2149. end;
  2150. case 2:
  2151. close;
  2152. }
  2153. }
  2154. end;
  2155. }
  2156. arug_cas04,226,156,0 duplicate(LF_ar04_01) Gefn#LF_ar04_01 111
  2157. arug_cas04,134,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_02 111
  2158. arug_cas04,149,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_03 111
  2159. arug_cas04,123,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_04 111
  2160. arug_cas04,160,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_05 111
  2161. arug_cas04,135,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_06 111
  2162. arug_cas04,148,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_07 111
  2163. arug_cas04,134,260,0 duplicate(LF_ar04_01) Gefn#LF_ar04_08 111
  2164. //arug_cas04,204,142,0 duplicate(LF_ar04_01) Gefn#LF_ar04_09 111
  2165. arug_cas04,148,103,4 script Gefn#LF_ar04_10::LF_ar04_02 722,{
  2166. set .@GID, GetCastleData("arug_cas04",1);
  2167. if (getcharid(2) == .@GID) {
  2168. mes "^3355FFThis is the Stronghold";
  2169. mes "Teleport Service. Would";
  2170. mes "you like to teleport to";
  2171. mes "the Emperium Center?^000000";
  2172. switch(select("Teleport:Cancel")) {
  2173. case 1:
  2174. warp "arug_cas04",121,318;
  2175. end;
  2176. case 2:
  2177. close;
  2178. }
  2179. }
  2180. end;
  2181. OnRecvCastlear04:
  2182. FlagEmblem GetCastleData("arug_cas04",1);
  2183. end;
  2184. }
  2185. arug_cas04,135,103,4 duplicate(LF_ar04_02) Gefn#LF_ar04_11 722
  2186. arug_cas04,63,51,7 duplicate(LF_ar04_02) Gefn#LF_ar04_12 722
  2187. arug_cas04,214,51,1 duplicate(LF_ar04_02) Gefn#LF_ar04_13 722
  2188. // Guild Manager
  2189. arug_cas04,328,98,3 script Steward#aru04 55,{
  2190. set .@GID, GetCastleData("arug_cas04",1);
  2191. if (.@GID == 0) {
  2192. mes "[ Steward ]";
  2193. mes "I await for the master";
  2194. mes "whom destiny will choose";
  2195. mes "for me. Do you think you";
  2196. mes "have to courage and strength";
  2197. mes "to conquer this stronghold?";
  2198. close;
  2199. }
  2200. if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
  2201. mes "[ Steward ]";
  2202. mes "Hmpf. Your threats don't";
  2203. mes "scare me! Guardians, drive";
  2204. mes "this infidel away from here!";
  2205. mes "I will always be loyal to the";
  2206. mes "master of this stronghold,";
  2207. mes "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000.";
  2208. close;
  2209. }
  2210. mes "[ Steward ]";
  2211. mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
  2212. mes "How shall I serve you today?";
  2213. mes "Was there an aspect of this";
  2214. mes "stronghold's maintenance";
  2215. mes "you wanted to discuss?";
  2216. next;
  2217. switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
  2218. case 1:
  2219. mes "[ Steward ]";
  2220. mes "The Commercial Growth";
  2221. mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas04",2) + ".";
  2222. if (GetCastleData("arug_cas04",4) > 0) {
  2223. mes "Last time, you invested in";
  2224. mes "Commercial Growth " + GetCastleData("arug_cas04",4) + ".";
  2225. }
  2226. next;
  2227. mes "[ Steward ]";
  2228. mes "Our stronghold's";
  2229. mes "safeguard level is " + GetCastleData("arug_cas04",3) + ".";
  2230. if (GetCastleData("arug_cas04",5) > 0) {
  2231. mes "Last time, you invested";
  2232. mes "in defense " + GetCastleData("arug_cas04",5) + " times.";
  2233. }
  2234. mes " ";
  2235. mes "That is all, master.";
  2236. close;
  2237. case 2:
  2238. set .@Economy,GetCastleData("arug_cas04",2);
  2239. if (.@Economy < 6) { set .@eco_invest,5000; }
  2240. else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; }
  2241. else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; }
  2242. else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; }
  2243. else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; }
  2244. else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; }
  2245. else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; }
  2246. else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; }
  2247. else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; }
  2248. else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; }
  2249. else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; }
  2250. else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; }
  2251. else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; }
  2252. else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; }
  2253. else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; }
  2254. else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; }
  2255. else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; }
  2256. else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; }
  2257. else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; }
  2258. else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; }
  2259. //Quadruple the cost of investing if you've already invested once.
  2260. if (GetCastleData("arug_cas04",4)) {
  2261. set .@eco_invest,.@eco_invest*4;
  2262. }
  2263. mes "[ Steward ]";
  2264. mes "Raising the stronghold's";
  2265. mes "commercial growth will";
  2266. mes "increase the quantity of";
  2267. mes "goods produced for the guild.";
  2268. mes "Investing in commercial growth";
  2269. mes "will help the guild's future.";
  2270. next;
  2271. mes "[ Steward ]";
  2272. mes "You can make one investment";
  2273. mes "each day, but if you can make";
  2274. mes "two investments if you pay";
  2275. mes "more zeny: this will speed";
  2276. mes "up commercial development,";
  2277. mes "but can be quite expensive.";
  2278. next;
  2279. if (.@Economy == 100) {
  2280. mes "[ Steward ]";
  2281. mes "However, our stronghold's";
  2282. mes "commerical growth level is";
  2283. mes "at 100%. It's not possible to";
  2284. mes "develop commercial growth";
  2285. mes "any further than that.";
  2286. close;
  2287. }
  2288. if (GetCastleData("arug_cas04",4) == 2) {
  2289. mes "[ Steward ]";
  2290. mes "You've already made two";
  2291. mes "investments today, so you'll";
  2292. mes "have to wait until tomorrow";
  2293. mes "to make another investment.";
  2294. close;
  2295. }
  2296. if (GetCastleData("arug_cas04",4) == 0) {
  2297. mes "[ Steward ]";
  2298. mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
  2299. mes "to make an investment";
  2300. mes "Will you invest in this";
  2301. mes "stronghold's commerical";
  2302. mes "development now?";
  2303. }
  2304. else {
  2305. mes "[ Steward ]";
  2306. mes "You must pay ^FF0000" + .@eco_invest + "^000000";
  2307. mes "more zeny to make a second";
  2308. mes "investment today. Will you";
  2309. mes "invest one more time?";
  2310. }
  2311. next;
  2312. switch(select("Invest in Commercial Growth:Cancel")) {
  2313. case 1:
  2314. if (Zeny < .@eco_invest) {
  2315. mes "[ Steward ]";
  2316. mes "I'm sorry, Master, but";
  2317. mes "you do not have enough";
  2318. mes "zeny to make an investment";
  2319. mes "for the guild today.";
  2320. close;
  2321. }
  2322. set zeny,zeny-.@eco_invest;
  2323. SetCastleData "arug_cas04",4,GetCastleData("arug_cas04",4)+1;
  2324. mes "[ Steward ]";
  2325. mes "A wise use of the guild's";
  2326. mes "funds, Master. We can expect";
  2327. mes "to see the results of this";
  2328. mes "investment by tomorrow.";
  2329. close;
  2330. case 2:
  2331. mes "[ Steward ]";
  2332. mes "As you command, Master.";
  2333. close;
  2334. }
  2335. case 3:
  2336. set .@Defence,GetCastleData("arug_cas04",3);
  2337. if (.@Defence < 6) { set .@def_invest,10000; }
  2338. else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; }
  2339. else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; }
  2340. else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; }
  2341. else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; }
  2342. else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; }
  2343. else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; }
  2344. else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; }
  2345. else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; }
  2346. else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; }
  2347. else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; }
  2348. else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; }
  2349. else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; }
  2350. else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; }
  2351. else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; }
  2352. else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; }
  2353. else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; }
  2354. else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; }
  2355. else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; }
  2356. else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; }
  2357. //Quadruple the cost of investing if you've already invested once.
  2358. if (GetCastleData("arug_cas04",5)) {
  2359. set .@def_invest,.@def_invest*4;
  2360. }
  2361. mes "[ Steward ]";
  2362. mes "Investing in our stronghold's";
  2363. mes "defense will enhance the";
  2364. mes "durability of our Guardians";
  2365. mes "and the Emperium. We'll need";
  2366. mes "every advantage to protect";
  2367. mes "ourselves from our enemies.";
  2368. next;
  2369. mes "[ Steward ]";
  2370. mes "You can invest in defense";
  2371. mes "once per day, but if you pay";
  2372. mes "more zeny, you can invest";
  2373. mes "a maximum of two times daily.";
  2374. next;
  2375. mes "[ Steward ]";
  2376. if (GetCastleData("arug_cas04",3) == 100) {
  2377. mes "The Defense Level of this";
  2378. mes "stronghold is 100%, and";
  2379. mes "cannot be increased further.";
  2380. close;
  2381. }
  2382. if (GetCastleData("arug_cas04",5) == 2) {
  2383. mes "Master, you've already";
  2384. mes "invested in Defense twice";
  2385. mes "today. You'll need to wait";
  2386. mes "until tomorrow if you really";
  2387. mes "want to increase our defenses.";
  2388. close;
  2389. }
  2390. if (GetCastleData("arug_cas04",5) == 0) {
  2391. mes "We need ^FF0000" + .@def_invest + "^000000";
  2392. mes "zeny to invest in our";
  2393. mes "stronghold's defenses.";
  2394. mes "Will you invest now?";
  2395. }
  2396. else {
  2397. mes "We need ^FF0000" + .@def_invest + "^000000";
  2398. mes "zeny to invest in our";
  2399. mes "stronghold's defenses";
  2400. mes "a second time today.";
  2401. mes "Will you invest now?";
  2402. }
  2403. next;
  2404. switch(select("Invest in Defense:Cancel")) {
  2405. case 1:
  2406. if (Zeny < .@def_invest) {
  2407. mes "[ Steward ]";
  2408. mes "I'm sorry, Master, but";
  2409. mes "you do not have enough";
  2410. mes "zeny to make an investment";
  2411. mes "for the guild today.";
  2412. close;
  2413. }
  2414. set zeny,zeny-.@def_invest;
  2415. SetCastleData "arug_cas04",5,GetCastleData("arug_cas04",5)+1;
  2416. mes "[ Steward ]";
  2417. mes "A wise use of the guild's";
  2418. mes "funds, Master. Increasing";
  2419. mes "the frequency of treasure";
  2420. mes "procured by the guild will";
  2421. mes "definitely help us all.";
  2422. close;
  2423. case 2:
  2424. mes "[ Steward ]";
  2425. mes "As you command, Master.";
  2426. close;
  2427. }
  2428. case 4:
  2429. if (GetCastleData("arug_cas04",9) == 1) {
  2430. mes "[ Steward ]";
  2431. mes "Do you wish to dismiss";
  2432. mes "the Kafra Employee that";
  2433. mes "we've hired for the guild?";
  2434. next;
  2435. switch(select("Dismiss:Cancel")) {
  2436. case 1:
  2437. cutin "kafra_01",2;
  2438. mes "[ Hired Kafra Employee ]";
  2439. mes "Master, please reconsider!";
  2440. mes "I've been working very hard";
  2441. mes "for the success of the guild!";
  2442. mes "I'll try harder to serve the";
  2443. mes "guild members of this";
  2444. mes "stronghold, I promise!";
  2445. next;
  2446. switch(select("Dismiss:Cancel")) {
  2447. case 1:
  2448. mes "[ Hired Kafra Employee ]";
  2449. mes "Why?! What have I done";
  2450. mes "to deserve this? Waaah~!";
  2451. next;
  2452. cutin "kafra_01",255;
  2453. break;
  2454. case 2:
  2455. mes "[ Hired Kafra Employee ]";
  2456. mes "Thank you, Master!";
  2457. mes "I'll obey your every";
  2458. mes "command as best I can!";
  2459. mes "You won't regret this!";
  2460. close;
  2461. }
  2462. break;
  2463. case 2:
  2464. mes "[ Steward ]";
  2465. mes "She works very hard,";
  2466. mes "in my opinion. It was in";
  2467. mes "all of our best interests to";
  2468. mes "allow her to stay with us.";
  2469. close;
  2470. }
  2471. disablenpc "Kafra Employee#arug_cas04";
  2472. SetCastleData "arug_cas04",9,0;
  2473. mes "[ Steward ]";
  2474. mes "That Kafra Employee";
  2475. mes "has been dismissed.";
  2476. mes "Were really dissatisfied";
  2477. mes "by the quality of her service?";
  2478. close;
  2479. }
  2480. else {
  2481. mes "[ Steward ]";
  2482. mes "Will you hire a";
  2483. mes "Kafra Employee to serve";
  2484. mes "our stronghold? You must";
  2485. mes "pay ^FF000010,000 zeny^000000 to hire one.";
  2486. next;
  2487. switch(select("Hire:Cancel")) {
  2488. case 1:
  2489. if (getgdskilllv(.@GID,10001) == 0) {
  2490. mes "[ Steward ]";
  2491. mes "Master, we cannot hire a";
  2492. mes "Kafra Employee because";
  2493. mes "you have not yet attained";
  2494. mes "the ^FF0000Contract with Kafra^000000";
  2495. mes "guild skill.";
  2496. close;
  2497. }
  2498. if (Zeny < 10000) {
  2499. mes "[ Steward ]";
  2500. mes "Master, we cannot hire a";
  2501. mes "Kafra Employee because";
  2502. mes "we do not have enough";
  2503. mes "funds to pay the contract fee.";
  2504. close;
  2505. }
  2506. set zeny,zeny-10000;
  2507. enablenpc "Kafra Employee#aru04";
  2508. SetCastleData "arug_cas04",9,1;
  2509. mes "[ Steward ]";
  2510. mes "Very well. We have formed";
  2511. mes "a contract with the Kafra";
  2512. mes "Head Office, and hired a";
  2513. mes "Kafra Employee for our";
  2514. mes "stronghold. Here she is~";
  2515. next;
  2516. cutin "kafra_01",2;
  2517. mes "[ Hired Kafra Employee ]";
  2518. mes "How do you do? I've";
  2519. mes "been dispatched by the";
  2520. mes "Kafra Head Office to";
  2521. mes "serve your guild's needs.";
  2522. mes "I'll do my best to follow";
  2523. mes "your every command, Master.";
  2524. next;
  2525. cutin "kafra_01",255;
  2526. mes "[ Steward ]";
  2527. mes "Our contract will expire";
  2528. mes "after one month, so we must";
  2529. mes "pay additional fees to keep";
  2530. mes "this Kafra Employee in";
  2531. mes "the service of our guild.";
  2532. close;
  2533. case 2:
  2534. mes "[ Steward ]";
  2535. mes "As you command, Master.";
  2536. mes "However, I suggest hiring";
  2537. mes "a Kafra Employee as soon";
  2538. mes "as possible since our guild";
  2539. mes "would greatly benefit from";
  2540. mes "the convenient Kafra services.";
  2541. close;
  2542. }
  2543. }
  2544. case 5:
  2545. mes "[ Steward ]";
  2546. mes "Do you wish to enter the";
  2547. mes "Guild Treasure Room?";
  2548. mes "Only you, the Guild Master,";
  2549. mes "are permitted to enter.";
  2550. next;
  2551. mes "[ Steward ]";
  2552. mes "Please remember to open";
  2553. mes "the Treasure Boxes at the";
  2554. mes "proper time. Otherwise, the";
  2555. mes "treasure may disappear if";
  2556. mes "something unexpected happens.";
  2557. next;
  2558. switch(select("Go to Treasure Room:Cancel")) {
  2559. case 1:
  2560. mes "[ Steward ]";
  2561. mes "Allow me to guide you";
  2562. mes "on the secret path to";
  2563. mes "the Treasure Room.";
  2564. mes "Press the secret switch";
  2565. mes "when you wish to return here.";
  2566. close2;
  2567. warp "arug_cas04",292,266;
  2568. end;
  2569. case 2:
  2570. mes "[ Steward ]";
  2571. mes "Items in the Treasure Room";
  2572. mes "are produced once each day.";
  2573. mes "Therefore, you must obtain";
  2574. mes "the treasure items everyday.";
  2575. mes "For the sake of the guild,";
  2576. mes "prioritize treasure harvesting!";
  2577. close;
  2578. }
  2579. }
  2580. Onstop:
  2581. stopnpctimer;
  2582. end;
  2583. OnStartArena:
  2584. set .@GID,getcharid(2);
  2585. // Lower castle Economy
  2586. set .@Economy,GetCastleData("arug_cas04",2) - 5;
  2587. if (.@Economy < 0) set .@Economy, 0;
  2588. SetCastleData "arug_cas04", 2, .@Economy;
  2589. // Lower Castle Defence
  2590. set .@Defence,GetCastleData("arug_cas04",3) - 5;
  2591. if (.@Defence < 0) set .@Defence, 0;
  2592. SetCastleData "arug_cas04", 3, .@Defence;
  2593. // Set new owner
  2594. SetCastleData "arug_cas04",1, .@GID;
  2595. // Clear castle's data.
  2596. for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
  2597. SetCastleData "arug_cas04", .@i, 0;
  2598. // Disable Kafra
  2599. disablenpc "Kafra Employee#aru04";
  2600. set .msg,2;
  2601. if (.msg == 1) {
  2602. announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2603. donpcevent "Manager#aru04_02::Onstart";
  2604. }
  2605. else if (.msg == 2) {
  2606. announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 4] stronghold of "+GetCastleName("arug_cas04"),bc_all|bc_woe;
  2607. mapannounce "arug_cas04","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2608. if (agitcheck2()) {
  2609. donpcevent "Manager#aru04_02::Onreset";
  2610. initnpctimer;
  2611. }
  2612. else {
  2613. donpcevent "Manager#aru04_02::Onreset";
  2614. stopnpctimer;
  2615. }
  2616. }
  2617. else if (.msg == 0) {
  2618. announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2619. donpcevent "Manager#aru04_02::Onreset";
  2620. stopnpctimer;
  2621. end;
  2622. }
  2623. MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2;
  2624. GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
  2625. end;
  2626. OnTimer10000:
  2627. donpcevent "Manager#aru04_02::Onchange";
  2628. 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;
  2629. end;
  2630. }
  2631. // Guild Kafra
  2632. arug_cas04,315,98,5 script Kafra Employee#aru04 117,{
  2633. set .@GID, GetCastleData("arug_cas04",1);
  2634. if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
  2635. mes "[Kafra Employee]";
  2636. mes "Welcome, proud member";
  2637. mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
  2638. mes "The Kafra Corporation is ready";
  2639. mes "to assist you wherever you go!";
  2640. next;
  2641. switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
  2642. case 1:
  2643. if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
  2644. mes "[Kafra Employee]";
  2645. mes "I'm so sorry, but you must";
  2646. mes "have at least Novice Skill";
  2647. mes "Lv.6 to use the Storage.";
  2648. }
  2649. else {
  2650. openstorage;
  2651. }
  2652. break;
  2653. case 2:
  2654. mes "[Kafra Employee]";
  2655. mes "Please tell me your";
  2656. mes "Warp destination.";
  2657. next;
  2658. switch(select("Rachel -> 200 z:Cancel")) {
  2659. case 1:
  2660. if (Zeny < 200) {
  2661. mes "[Kafra Employee]";
  2662. mes "I'm sorry, but you don't";
  2663. mes "have enough zeny to pay";
  2664. mes "the warp fee. Would you";
  2665. mes "please check your funds again?";
  2666. close2;
  2667. cutin "kafra_01",255;
  2668. end;
  2669. }
  2670. set zeny,zeny-200;
  2671. warp "rachel",115,125;
  2672. end;
  2673. case 2:
  2674. cutin "kafra_01",255;
  2675. }
  2676. break;
  2677. case 3:
  2678. if (BaseClass != Job_Merchant) {
  2679. mes "[Kafra Employee]";
  2680. mes "I'm sorry, but the Pushcart";
  2681. mes "rental service can only be";
  2682. mes "used by Merchant, Blacksmith,";
  2683. mes "and Alchemist class characters.";
  2684. }
  2685. else if (checkcart() == 1) {
  2686. mes "[Kafra Employee]";
  2687. mes "Hm? You've already";
  2688. mes "rented a Pushcart.";
  2689. }
  2690. else {
  2691. mes "[Kafra Employee]";
  2692. mes "The Pushcart rental fee";
  2693. mes "is 800 zeny. Would you";
  2694. mes "like to rent a Pushcart?";
  2695. next;
  2696. switch(select("Rent Pushcart:Cancel")) {
  2697. case 1:
  2698. if (Zeny < 800) {
  2699. mes "[Kafra Employee]";
  2700. mes "I'm sorry, but you don't";
  2701. mes "have enough zeny to rent";
  2702. mes "one of our Pushcarts.";
  2703. close2;
  2704. cutin "kafra_01",255;
  2705. end;
  2706. }
  2707. set zeny,zeny-800;
  2708. setcart;
  2709. break;
  2710. case 2:
  2711. break;
  2712. }
  2713. }
  2714. break;
  2715. case 4:
  2716. mes "[Kafra Employee]";
  2717. mes "Thank you for using the";
  2718. mes "Kafra Service. Wherever";
  2719. mes "you go, Kafra will be";
  2720. mes "there to support you!";
  2721. close2;
  2722. cutin "kafra_01",255;
  2723. end;
  2724. }
  2725. close2;
  2726. cutin "kafra_01",255;
  2727. end;
  2728. }
  2729. else {
  2730. mes "[Kafra Employee]";
  2731. mes "I'm sorry, but I've been";
  2732. mes "exclusively contracted";
  2733. mes "to the members of the";
  2734. mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2735. mes "You'll have to ask another";
  2736. mes "Kafra Employee to help you...";
  2737. close2;
  2738. cutin "kafra_01",255;
  2739. end;
  2740. }
  2741. OnRecvCastlear04:
  2742. if (GetCastleData("arug_cas04",1) == 0) {
  2743. monster "arug_cas04",0,0,"Evil Druid",1117,10;
  2744. monster "arug_cas04",0,0,"Khalitzburg",1132,4;
  2745. monster "arug_cas04",0,0,"Abysmal Knight",1219,3;
  2746. monster "arug_cas04",0,0,"Executioner",1205,1;
  2747. monster "arug_cas04",0,0,"Penomena",1216,10;
  2748. monster "arug_cas04",0,0,"Alarm",1193,18;
  2749. monster "arug_cas04",0,0,"Clock",1269,9;
  2750. monster "arug_cas04",0,0,"Raydric Archer",1276,12;
  2751. monster "arug_cas04",0,0,"Wanderer",1208,3;
  2752. monster "arug_cas04",0,0,"Alice",1275,1;
  2753. monster "arug_cas04",0,0,"Bloody Knight",1268,2;
  2754. monster "arug_cas04",0,0,"Dark Lord",1272,2;
  2755. monster "arug_cas04",0,0,"Tower Keeper",1270,4;
  2756. }
  2757. if (GetCastleData("arug_cas04",9) < 1) {
  2758. disablenpc "Kafra Employee#aru04";
  2759. }
  2760. end;
  2761. }
  2762. arug_cas04,299,277,0 script #aru04_switch 111,{
  2763. mes " ";
  2764. mes "^3355FFWill you pull";
  2765. mes "this small lever?^000000";
  2766. next;
  2767. switch(select("Pull Lever:Cancel")) {
  2768. case 1:
  2769. warp "arug_cas04",321,57;
  2770. end;
  2771. case 2:
  2772. close;
  2773. }
  2774. }
  2775. aru_gld,306,359,6 script Gefn#flag_ar04_1::ar04_Flag 722,{
  2776. set .@GID, GetCastleData("arug_cas04",1);
  2777. if (.@GID == 0) {
  2778. mes "[ Arunafeltz Royal Edict ]";
  2779. mes "The Holy Kingdom of";
  2780. mes "Arunafeltz declares that";
  2781. mes "one has yet to claim lordship";
  2782. mes "over this stronghold. The one";
  2783. mes "that breaks the Emperium will";
  2784. mes "be recognized as its new owner.";
  2785. close;
  2786. }
  2787. else {
  2788. if (getcharid(2) == .@GID) {
  2789. mes "[ Ringing Voice ]";
  2790. mes "Courageous one,";
  2791. mes "do you wish to return";
  2792. mes "to your stronghold?";
  2793. next;
  2794. switch(select("Return to the Stronghold:Cancel")) {
  2795. case 1:
  2796. set .@GID, GetCastleData("arug_cas04",1);
  2797. if (getcharid(2) == .@GID) {
  2798. warp "arug_cas04",121,318;
  2799. end;
  2800. }
  2801. close;
  2802. case 2:
  2803. close;
  2804. }
  2805. }
  2806. mes "[ Arunafeltz Royal Edict ]";
  2807. mes "The Holy Kingdom of";
  2808. mes "Arunafeltz decrees that";
  2809. mes "this stronghold is owned";
  2810. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2811. next;
  2812. mes "[ Arunafeltz Royal Edict ]";
  2813. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2814. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2815. mes "Any that object must claim this";
  2816. mes "stronghold through strength of";
  2817. mes "steel and magic during the";
  2818. mes "appointed Guild Siege times.";
  2819. close;
  2820. }
  2821. OnRecvCastlear04:
  2822. FlagEmblem GetCastleData("arug_cas04",1);
  2823. end;
  2824. }
  2825. aru_gld,306,348,6 duplicate(ar04_Flag) Gefn#flag_ar04_2 722
  2826. aru_gld,301,318,4 script Gefn#flag_ar04_3::ar04_Flag2 722,{
  2827. set .@GID, GetCastleData("arug_cas04",1);
  2828. if (.@GID == 0) {
  2829. mes "[ Arunafeltz Royal Edict ]";
  2830. mes "The Holy Kingdom of";
  2831. mes "Arunafeltz declares that";
  2832. mes "one has yet to claim lordship";
  2833. mes "over this stronghold. The one";
  2834. mes "that breaks the Emperium will";
  2835. mes "be recognized as its new owner.";
  2836. close;
  2837. }
  2838. else {
  2839. mes "[ Arunafeltz Royal Edict ]";
  2840. mes "The Holy Kingdom of";
  2841. mes "Arunafeltz decrees that";
  2842. mes "this stronghold is owned";
  2843. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2844. next;
  2845. mes "[ Arunafeltz Royal Edict ]";
  2846. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2847. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2848. mes "Any that object must claim this";
  2849. mes "stronghold through strength of";
  2850. mes "steel and magic during the";
  2851. mes "appointed Guild Siege times.";
  2852. close;
  2853. }
  2854. OnRecvCastlear04:
  2855. FlagEmblem GetCastleData("arug_cas04",1);
  2856. end;
  2857. }
  2858. aru_gld,313,318,4 duplicate(ar04_Flag2) Gefn#flag_ar04_4 722