arug_cas05.txt 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959
  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 5
  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 Fixed exterior flag placements. [L0ne_W0lf]
  29. //============================================================
  30. arug_cas05,1,1,0 script Manager#aru05_02 111,{
  31. end;
  32. OnInterIfInitOnce:
  33. GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
  34. end;
  35. OnRecvCastlear05:
  36. RequestGuildInfo GetCastleData("arug_cas05",1);
  37. if (GetCastleData("arug_cas05",1) == 0) {
  38. donpcevent "Manager#aru05_02::Onstart";
  39. }
  40. end;
  41. OnAgitStart2:
  42. if (agitcheck2()) {
  43. MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2;
  44. GvgOn "arug_cas05";
  45. donpcevent "Manager#aru05_02::Onstart";
  46. }
  47. else {
  48. donpcevent "#aru05_RL00::OnDisable";
  49. donpcevent "#aru05_RL01::OnDisable";
  50. donpcevent "#aru05_RL02::OnDisable";
  51. donpcevent "#aru05_RL03::OnDisable";
  52. }
  53. end;
  54. OnAgitEnd2:
  55. GvgOff "arug_cas05";
  56. if (GetCastleData("arug_cas05",1)) {
  57. KillMonster "arug_cas05","Steward#aru05::OnStartArena";
  58. donpcevent "Manager#aru05_02::Onreset";
  59. donpcevent "Steward#aru05::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_cas05",1)) {
  69. setarray $agit_ar05[0],0,0,0,0,0,0;
  70. donpcevent "#aru05_df01::OnEnable";
  71. donpcevent "#aru05_df02::OnEnable";
  72. donpcevent "#aru05_RL00::OnEnable";
  73. donpcevent "#aru05_RL01::OnEnable";
  74. donpcevent "#aru05_RL02::OnEnable";
  75. donpcevent "#aru05_RL03::OnEnable";
  76. }
  77. monster "arug_cas05",141,293,"Emperium",1288,1,"Steward#aru05::OnStartArena";
  78. end;
  79. Onreset:
  80. donpcevent "#aru05_df01::OnDisable";
  81. donpcevent "#aru05_df02::OnDisable";
  82. donpcevent "#aru05_gard01::Onreset";
  83. donpcevent "#aru05_gard02::Onreset";
  84. donpcevent "#aru05_RL00::OnDisable";
  85. donpcevent "#aru05_RL01::OnDisable";
  86. donpcevent "#aru05_RL02::OnDisable";
  87. donpcevent "#aru05_RL03::OnDisable";
  88. donpcevent "1st Guardian Stone#aru05::OnDisable";
  89. donpcevent "2nd Guardian Stone#aru05::OnDisable";
  90. donpcevent "Control Device01#aru05::OnDisable";
  91. donpcevent "Control Device02#aru05::OnDisable";
  92. donpcevent "Control Device03#aru05::OnDisable";
  93. if (agitcheck2()) {
  94. setarray $agit_ar05[0],0,0,1,1,1,0;
  95. }
  96. end;
  97. Onchange:
  98. setarray $agit_ar05[0],2,2,1,1,2,0;
  99. monster "arug_cas05",141,293,"Emperium",1288,1,"Steward#aru05::OnStartArena";
  100. donpcevent "Control Device03#aru05::OnEnable";
  101. donpcevent "1st Guardian Stone#aru05::OnEnable";
  102. donpcevent "2nd Guardian Stone#aru05::OnEnable";
  103. end;
  104. OnClock0001:
  105. if (!GetCastleData("arug_cas05",1)) end;
  106. killmonster "arug_cas05","Manager#aru05_02::OnTreasureDied";
  107. if (GetCastleData("arug_cas05",4)) {
  108. set .@Economy,GetCastleData("arug_cas05",2);
  109. SetCastleData "arug_cas05",2,.@Economy + GetCastleData("arug_cas05",4) + (rand(2) && getgdskilllv(.@GID,10014));
  110. if (GetCastleData("arug_cas05",2) > 100) SetCastleData "arug_cas05",2,100;
  111. setcastledata "arug_cas05",4,0;
  112. }
  113. if (GetCastleData("arug_cas05",5)) {
  114. set .@Defence,GetCastleData("arug_cas05",3);
  115. SetCastleData "arug_cas05",3,.@Defence + GetCastleData("arug_cas05",5);
  116. if (GetCastleData("arug_cas05",3) > 100) SetCastleData "arug_cas05",3,100;
  117. setcastledata "arug_cas05",5,0;
  118. }
  119. set .@Treasure,GetCastleData("arug_cas05",2)/5+4;
  120. if (.@Treasure) {
  121. monster "arug_cas05",291,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  122. monster "arug_cas05",292,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  123. monster "arug_cas05",293,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  124. monster "arug_cas05",294,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  125. if (.@Treasure < 5) end;
  126. monster "arug_cas05",295,276,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  127. if (.@Treasure < 6) end;
  128. monster "arug_cas05",296,276,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  129. if (.@Treasure < 7) end;
  130. monster "arug_cas05",293,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  131. if (.@Treasure < 8) end;
  132. monster "arug_cas05",294,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  133. if (.@Treasure < 9) end;
  134. monster "arug_cas05",295,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  135. if (.@Treasure < 10) end;
  136. monster "arug_cas05",296,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  137. if (.@Treasure < 11) end;
  138. monster "arug_cas05",297,274,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  139. if (.@Treasure < 12) end;
  140. monster "arug_cas05",298,274,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  141. if (.@Treasure < 13) end;
  142. monster "arug_cas05",291,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  143. if (.@Treasure < 14) end;
  144. monster "arug_cas05",292,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  145. if (.@Treasure < 15) end;
  146. monster "arug_cas05",293,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  147. if (.@Treasure < 16) end;
  148. monster "arug_cas05",294,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  149. if (.@Treasure < 17) end;
  150. monster "arug_cas05",295,272,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  151. if (.@Treasure < 18) end;
  152. monster "arug_cas05",296,272,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  153. if (.@Treasure < 19) end;
  154. monster "arug_cas05",293,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  155. if (.@Treasure < 20) end;
  156. monster "arug_cas05",294,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  157. if (.@Treasure < 21) end;
  158. monster "arug_cas05",295,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  159. if (.@Treasure < 22) end;
  160. monster "arug_cas05",296,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  161. if (.@Treasure < 23) end;
  162. monster "arug_cas05",297,269,"Treasure Chest",1945,1,"Manager#aru05_02::OnTreasureDied";
  163. if (.@Treasure < 24) end;
  164. monster "arug_cas05",298,269,"Treasure Chest",1324,1,"Manager#aru05_02::OnTreasureDied";
  165. }
  166. end;
  167. OnTreasureDied:
  168. end;
  169. }
  170. arug_cas05,146,315,3 script Eeos#aru05_01 868,{
  171. set .@GID, GetCastleData("arug_cas05",1);
  172. if (.@GID == 0) {
  173. mes "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  192. mes "I am Eeos, 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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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 "[Eeos]";
  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_ar05[5] == 0) {
  304. if (getgdskilllv(.@GID,10002) == 0) {
  305. mes "[Eeos]";
  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 "[Eeos]";
  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_ar05[5],1;
  322. if ($agit_ar05[0] == 0) {
  323. donpcevent "#aru05_gard01::OnEnable";
  324. }
  325. if ($agit_ar05[1] == 0) {
  326. donpcevent "#aru05_gard02::OnEnable";
  327. }
  328. close;
  329. }
  330. }
  331. else {
  332. mes "[Eeos]";
  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 "[Eeos]";
  340. mes "Our defense status is...";
  341. if ($agit_ar05[0] == 1) {
  342. mes "1st Guardian Stone: ^FF0000Destroyed^000000";
  343. }
  344. else if ($agit_ar05[0] == 2) {
  345. mes "1st Guardian Stone: ^008000Repairing^000000";
  346. }
  347. else {
  348. mes "1st Guardian Stone: ^4D4DFFOperational^000000";
  349. }
  350. if ($agit_ar05[1] == 1) {
  351. mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
  352. }
  353. else if ($agit_ar05[1] == 2) {
  354. mes "2nd Guardian Stone: ^008000Repairing^000000";
  355. }
  356. else {
  357. mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
  358. }
  359. if ($agit_ar05[2] == 1) {
  360. mes "1st Fortress Gate: ^FF0000Destroyed^000000";
  361. }
  362. else if ($agit_ar05[2] == 2) {
  363. mes "1st Fortress Gate: ^008000Repairing^000000";
  364. }
  365. else {
  366. mes "1st Fortress Gate: ^4D4DFFOperational^000000";
  367. }
  368. if ($agit_ar05[3] == 1) {
  369. mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
  370. }
  371. else if ($agit_ar05[3] == 2) {
  372. mes "2nd Fortress Gate: ^008000Repairing^000000";
  373. }
  374. else {
  375. mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
  376. }
  377. if ($agit_ar05[4] == 1) {
  378. mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
  379. }
  380. else if ($agit_ar05[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 "[Eeos]";
  389. mes "I'll be standing by,";
  390. mes "awaiting your orders.";
  391. close;
  392. }
  393. }
  394. }
  395. }
  396. else {
  397. mes "[Eeos]";
  398. mes "Who are you? Scoundrel!";
  399. mes "Leave this stronghold now!";
  400. close;
  401. }
  402. OnInit:
  403. setarray $agit_ar05[0],0,0,0,0,0,0;
  404. end;
  405. }
  406. arug_cas05,1,1,0 script #aru05_gard01 -1,{
  407. OnEnable:
  408. set .@defence,GetCastleData("arug_cas05",3);
  409. guardian "arug_cas05",130,60,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //0;
  410. if ((.@defence > 10) && (.@defence < 31)) {
  411. set .MyMobCount,2;
  412. guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
  413. }
  414. else if ((.@defence > 30) && (.@defence < 51)) {
  415. set .MyMobCount,3;
  416. guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
  417. guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
  418. }
  419. else if ((.@defence > 50) && (.@defence < 71)) {
  420. set .MyMobCount,4;
  421. guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
  422. guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
  423. guardian "arug_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //3;
  424. }
  425. else if (.@defence > 70) {
  426. set .MyMobCount,5;
  427. guardian "arug_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
  428. guardian "arug_cas05",128,90,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //2;
  429. guardian "arug_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //3;
  430. guardian "arug_cas05",110,96,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //4;
  431. }
  432. else {
  433. set .MyMobCount,2;
  434. guardian "arug_cas05",66,157,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //1;
  435. }
  436. initnpctimer;
  437. end;
  438. OnTimer300000:
  439. set .MyMobCount,.MyMobCount+1;
  440. guardian "arug_cas05",91,53,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //5;
  441. mapannounce "arug_cas05","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_cas05",65,71,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //6;
  446. mapannounce "arug_cas05","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_cas05",65,103,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //7;
  451. mapannounce "arug_cas05","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_cas05",110,96,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //8;
  456. mapannounce "arug_cas05","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_cas05",128,100,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //9;
  461. mapannounce "arug_cas05","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_cas05",128,77,"Guardian",1899,"#aru05_gard01::OnGuardianDied"; //10;
  469. }
  470. end;
  471. Onreset:
  472. stopnpctimer;
  473. killmonster "arug_cas05","#aru05_gard01::OnGuardianDied";
  474. end;
  475. }
  476. arug_cas05,1,2,0 script #aru05_gard02 -1,{
  477. OnEnable:
  478. set .@defence,GetCastleData("arug_cas05",3);
  479. guardian "arug_cas05",156,101,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //11;
  480. if ((.@defence > 10) && (.@defence < 31)) {
  481. set .MyMobCount,2;
  482. guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
  483. }
  484. else if ((.@defence > 30) && (.@defence < 51)) {
  485. set .MyMobCount,3;
  486. guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
  487. guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
  488. }
  489. else if ((.@defence > 50) && (.@defence < 71)) {
  490. set .MyMobCount,4;
  491. guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
  492. guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
  493. guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //14;
  494. }
  495. else if (.@defence > 70) {
  496. set .MyMobCount,5;
  497. guardian "arug_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
  498. guardian "arug_cas05",154,90,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //13;
  499. guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //14;
  500. guardian "arug_cas05",155,60,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //15;
  501. }
  502. else {
  503. set .MyMobCount,2;
  504. guardian "arug_cas05",211,159,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //12;
  505. }
  506. initnpctimer;
  507. end;
  508. OnTimer600000:
  509. set .MyMobCount,.MyMobCount+1;
  510. guardian "arug_cas05",187,54,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //16;
  511. end;
  512. OnTimer1200000:
  513. set .MyMobCount,.MyMobCount+1;
  514. guardian "arug_cas05",212,67,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //17;
  515. end;
  516. OnTimer2100000:
  517. set .MyMobCount,.MyMobCount+1;
  518. guardian "arug_cas05",211,105,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //18;
  519. end;
  520. OnTimer3000000:
  521. set .MyMobCount,.MyMobCount+1;
  522. guardian "arug_cas05",155,60,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //19;
  523. end;
  524. OnTimer3900000:
  525. set .MyMobCount,.MyMobCount+1;
  526. guardian "arug_cas05",156,77,"Guardian",1899,"#aru05_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_cas05",172,95,"Guardian",1899,"#aru05_gard02::OnGuardianDied"; //21;
  534. }
  535. end;
  536. Onreset:
  537. stopnpctimer;
  538. killmonster "arug_cas05","#aru05_gard02::OnGuardianDied";
  539. end;
  540. }
  541. arug_cas05,1,3,0 script #aru05_df01 -1,{
  542. OnEnable:
  543. guardian "arug_cas05",65,171,"1st Guardian Stone",1907,"#aru05_df01::OnGuardianStoneDied"; //22;
  544. end;
  545. OnDisable:
  546. killmonster "arug_cas05","#aru05_df01::OnGuardianStoneDied";
  547. setarray $agit_ar05[0],1; //Global Variable
  548. stopnpctimer;
  549. end;
  550. OnGuardianStoneDied:
  551. // 1st Guardian Stone is Destroyed
  552. setarray $agit_ar05[0],1;
  553. if (($agit_ar05[0] == 1) || ($agit_ar05[0] == 2)) {
  554. set .@destroyed,.@destroyed + 1;
  555. }
  556. if (($agit_ar05[1] == 1) || ($agit_ar05[1] == 2)) {
  557. set .@destroyed,.@destroyed + 1;
  558. }
  559. if (.@destroyed == 2) {
  560. mapannounce "arug_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  561. donpcevent "#aru05_RL00::OnDisable";
  562. donpcevent "#aru05_gard01::Onreset";
  563. }
  564. else {
  565. mapannounce "arug_cas05","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  566. donpcevent "#aru05_gard01::Onreset";
  567. }
  568. initnpctimer;
  569. end;
  570. OnTimer300000:
  571. donpcevent "1st Guardian Stone#aru05::OnEnable";
  572. setarray $agit_ar05[0],2; //Global Variable
  573. stopnpctimer;
  574. end;
  575. }
  576. arug_cas05,65,171,0 script 1st Guardian Stone#aru05 844,{
  577. set .@GID, GetCastleData("arug_cas05",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_ar05[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 "#aru05_df01::OnEnable";
  792. specialeffect EF_ICECRASH;
  793. disablenpc "1st Guardian Stone#aru05";
  794. setarray $agit_ar05[0],0;
  795. set .@df_all,$agit_ar05[0]+$agit_ar05[1];
  796. if (.@df_all == 0) {
  797. mapannounce "arug_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  798. donpcevent "#aru05_RL00::OnEnable";
  799. }
  800. else {
  801. mapannounce "arug_cas05","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  802. }
  803. if ($agit_ar05[5] == 1) {
  804. donpcevent "#aru05_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#aru05";
  833. end;
  834. OnEnable:
  835. enablenpc "1st Guardian Stone#aru05";
  836. specialeffect EF_MAPPILLAR2;
  837. end;
  838. OnDisable:
  839. disablenpc "1st Guardian Stone#aru05";
  840. end;
  841. }
  842. arug_cas05,1,4,0 script #aru05_df02 -1,{
  843. OnEnable:
  844. guardian "arug_cas05",212,149,"2nd Guardian Stone",1908,"#aru05_df02::OnGuardianStoneDied"; //23;
  845. end;
  846. OnDisable:
  847. killmonster "arug_cas05","#aru05_df02::OnGuardianStoneDied";
  848. setarray $agit_ar05[1],1; //Global Variable
  849. stopnpctimer;
  850. end;
  851. OnGuardianStoneDied:
  852. // 2nd Guardian Stone is Destroyed
  853. setarray $agit_ar05[1],1;
  854. if (($agit_ar05[0] == 1) || ($agit_ar05[0] == 2)) {
  855. set .@destroyed,.@destroyed + 1;
  856. }
  857. if (($agit_ar05[1] == 1) || ($agit_ar05[1] == 2)) {
  858. set .@destroyed,.@destroyed + 1;
  859. }
  860. if (.@destroyed == 2) {
  861. mapannounce "arug_cas05","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  862. donpcevent "#aru05_RL00::OnDisable";
  863. donpcevent "#aru05_gard02::Onreset";
  864. }
  865. else {
  866. mapannounce "arug_cas05","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  867. donpcevent "#aru05_gard02::Onreset";
  868. }
  869. initnpctimer;
  870. end;
  871. OnTimer300000:
  872. donpcevent "2nd Guardian Stone#aru05::OnEnable";
  873. setarray $agit_ar05[1],2; //Global Variable
  874. stopnpctimer;
  875. end;
  876. }
  877. arug_cas05,212,149,0 script 2nd Guardian Stone#aru05 844,{
  878. set .@GID, GetCastleData("arug_cas05",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_ar05[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 "#aru05_df02::OnEnable";
  1093. specialeffect EF_ICECRASH;
  1094. disablenpc "2nd Guardian Stone#aru05";
  1095. setarray $agit_ar05[1],0;
  1096. set .@df_all,$agit_ar05[0]+$agit_ar05[1];
  1097. if (.@df_all == 0) {
  1098. mapannounce "arug_cas05","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  1099. donpcevent "#aru05_RL00::OnEnable";
  1100. }
  1101. else {
  1102. mapannounce "arug_cas05","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  1103. }
  1104. if ($agit_ar05[5] == 1) {
  1105. donpcevent "#aru05_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#aru05";
  1134. end;
  1135. OnEnable:
  1136. enablenpc "2nd Guardian Stone#aru05";
  1137. specialeffect EF_MAPPILLAR2;
  1138. end;
  1139. OnDisable:
  1140. disablenpc "2nd Guardian Stone#aru05";
  1141. end;
  1142. }
  1143. // Barrier Summoners
  1144. arug_cas05,2,1,0 script #aru05_RL00 -1,{
  1145. OnEnable:
  1146. setcell "arug_cas05",138,136,145,110,cell_walkable,0;
  1147. setcell "arug_cas05",138,110,145,110,cell_shootable,0;
  1148. guardian "arug_cas05",139,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //24;
  1149. guardian "arug_cas05",141,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //25;
  1150. guardian "arug_cas05",143,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //26;
  1151. guardian "arug_cas05",145,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //27;
  1152. end;
  1153. OnDisable:
  1154. setcell "arug_cas05",138,136,145,110,cell_walkable,1;
  1155. setcell "arug_cas05",138,110,145,110,cell_shootable,1;
  1156. killmonster "arug_cas05","#aru05_RL00::OnBarrierDestroyed";
  1157. end;
  1158. OnBarrierDestroyed:
  1159. end;
  1160. }
  1161. arug_cas05,2,2,0 script #aru05_RL01 -1,{
  1162. OnEnable:
  1163. set .MyMobCount,6;
  1164. setcell "arug_cas05",139,158,144,158,cell_walkable,0;
  1165. guardian "arug_cas05",140,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //28;
  1166. guardian "arug_cas05",142,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //29;
  1167. guardian "arug_cas05",144,157," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //30;
  1168. guardian "arug_cas05",139,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //31;
  1169. guardian "arug_cas05",141,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //32;
  1170. guardian "arug_cas05",143,156," ",1905,"#aru05_RL01::OnBarrierDestroyed"; //33;
  1171. end;
  1172. OnBarrierDestroyed:
  1173. set .MyMobCount,.MyMobCount-1;
  1174. if (.MyMobCount == 0) {
  1175. setarray $agit_ar05[2],1;
  1176. mapannounce "arug_cas05","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1177. setcell "arug_cas05",139,158,144,158,cell_walkable,1;
  1178. }
  1179. end;
  1180. OnDisable:
  1181. setcell "arug_cas05",139,158,144,158,cell_walkable,1;
  1182. killmonster "arug_cas05","#aru05_RL01::OnBarrierDestroyed";
  1183. end;
  1184. }
  1185. arug_cas05,2,3,0 script #aru05_RL02 -1,{
  1186. OnEnable:
  1187. set .MyMobCount,6;
  1188. setcell "arug_cas05",138,210,145,210,cell_walkable,0;
  1189. guardian "arug_cas05",140,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //34;
  1190. guardian "arug_cas05",142,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //35;
  1191. guardian "arug_cas05",144,209," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //36;
  1192. guardian "arug_cas05",139,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //37;
  1193. guardian "arug_cas05",141,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //38;
  1194. guardian "arug_cas05",143,208," ",1905,"#aru05_RL02::OnBarrierDestroyed"; //39;
  1195. end;
  1196. OnBarrierDestroyed:
  1197. set .MyMobCount,.MyMobCount-1;
  1198. if (.MyMobCount == 0) {
  1199. setarray $agit_ar05[3],1;
  1200. mapannounce "arug_cas05","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1201. setcell "arug_cas05",138,210,145,210,cell_walkable,1;
  1202. }
  1203. end;
  1204. OnDisable:
  1205. setcell "arug_cas05",138,210,145,210,cell_walkable,1;
  1206. killmonster "arug_cas05","#aru05_RL02::OnBarrierDestroyed";
  1207. end;
  1208. }
  1209. arug_cas05,2,4,0 script #aru05_RL03 -1,{
  1210. OnEnable:
  1211. set .MyMobCount,4;
  1212. setcell "arug_cas05",138,263,145,263,cell_walkable,0;
  1213. guardian "arug_cas05",139,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //40;
  1214. guardian "arug_cas05",141,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //41;
  1215. guardian "arug_cas05",143,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //42;
  1216. guardian "arug_cas05",145,262," ",1905,"#aru05_RL03::OnBarrierDestroyed"; //43;
  1217. end;
  1218. OnBarrierDestroyed:
  1219. set .MyMobCount,.MyMobCount-1;
  1220. if (.MyMobCount == 0) {
  1221. setarray $agit_ar05[4],1;
  1222. mapannounce "arug_cas05","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
  1223. setcell "arug_cas05",138,263,145,263,cell_walkable,1;
  1224. }
  1225. end;
  1226. OnDisable:
  1227. setcell "arug_cas05",138,263,145,263,cell_walkable,1;
  1228. killmonster "arug_cas05","#aru05_RL03::OnBarrierDestroyed";
  1229. end;
  1230. }
  1231. arug_cas05,136,158,0 script Control Device01#aru05 111,{
  1232. set .@GID, GetCastleData("arug_cas05",1);
  1233. if (getcharid(2) == .@GID) {
  1234. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1235. if ($agit_ar05[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 "#aru05_RL01::OnEnable";
  1425. disablenpc "Control Device01#aru05";
  1426. mapannounce "arug_cas05","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1427. setarray $agit_ar05[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#aru05";
  1456. end;
  1457. OnEnable:
  1458. enablenpc "Control Device01#aru05";
  1459. end;
  1460. OnDisable:
  1461. disablenpc "Control Device01#aru05";
  1462. end;
  1463. }
  1464. arug_cas05,135,212,0 script Control Device02#aru05 111,{
  1465. set .@GID, GetCastleData("arug_cas05",1);
  1466. if (getcharid(2) == .@GID) {
  1467. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1468. if ($agit_ar05[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 "#aru05_RL02::OnEnable";
  1658. disablenpc "Control Device02#aru05";
  1659. mapannounce "arug_cas05","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1660. setarray $agit_ar05[3],0; //Global Variable
  1661. setarray $agit_ar05[2],2; //Global Variable
  1662. donpcevent "Control Device01#aru05::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#aru05";
  1691. end;
  1692. OnEnable:
  1693. enablenpc "Control Device02#aru05";
  1694. end;
  1695. OnDisable:
  1696. disablenpc "Control Device02#aru05";
  1697. end;
  1698. }
  1699. arug_cas05,134,266,0 script Control Device03#aru05 111,{
  1700. set .@GID, GetCastleData("arug_cas05",1);
  1701. if (getcharid(2) == .@GID) {
  1702. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1703. if ($agit_ar05[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 "#aru05_RL03::OnEnable";
  1893. disablenpc "Control Device03#aru05";
  1894. mapannounce "arug_cas05","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1895. setarray $agit_ar05[4],0;
  1896. setarray $agit_ar05[3],2;
  1897. donpcevent "Control Device02#aru05::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#aru05";
  1926. end;
  1927. OnEnable:
  1928. enablenpc "Control Device03#aru05";
  1929. end;
  1930. OnDisable:
  1931. disablenpc "Control Device03#aru05";
  1932. end;
  1933. }
  1934. // Link Flags
  1935. arug_cas05,122,314,0 script LF-01#arug_cas05 111,{
  1936. set .@GID, GetCastleData("arug_cas05",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_cas05",84,158;
  1945. end;
  1946. case 2:
  1947. warp "arug_cas05",197,136;
  1948. end;
  1949. case 3:
  1950. close;
  1951. }
  1952. }
  1953. end;
  1954. }
  1955. arug_cas05,125,314,0 script LF-02#arug_cas05 111,{
  1956. set .@GID, GetCastleData("arug_cas05",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_cas05",65,94;
  1965. end;
  1966. case 2:
  1967. warp "arug_cas05",211,97;
  1968. end;
  1969. case 3:
  1970. close;
  1971. }
  1972. }
  1973. end;
  1974. }
  1975. arug_cas05,128,314,0 script LF-03#arug_cas05 111,{
  1976. set .@GID, GetCastleData("arug_cas05",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_cas05",112,73;
  1985. end;
  1986. case 2:
  1987. warp "arug_cas05",171,73;
  1988. end;
  1989. case 3:
  1990. close;
  1991. }
  1992. }
  1993. end;
  1994. }
  1995. arug_cas05,131,314,0 script LF-04#arug_cas05 111,{
  1996. set .@GID, GetCastleData("arug_cas05",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_cas05",112,152;
  2005. end;
  2006. case 2:
  2007. warp "arug_cas05",172,152;
  2008. end;
  2009. case 3:
  2010. close;
  2011. }
  2012. }
  2013. end;
  2014. }
  2015. arug_cas05,134,314,0 script LF-05#arug_cas05 111,{
  2016. set .@GID, GetCastleData("arug_cas05",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_cas05",120,186;
  2025. end;
  2026. case 2:
  2027. warp "arug_cas05",162,186;
  2028. end;
  2029. case 3:
  2030. close;
  2031. }
  2032. }
  2033. end;
  2034. }
  2035. arug_cas05,149,314,0 script LF-06#arug_cas05 111,{
  2036. set .@GID, GetCastleData("arug_cas05",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_cas05",116,235;
  2045. end;
  2046. case 2:
  2047. warp "arug_cas05",164,235;
  2048. end;
  2049. case 3:
  2050. close;
  2051. }
  2052. }
  2053. end;
  2054. }
  2055. arug_cas05,152,314,0 script LF-07#arug_cas05 111,{
  2056. set .@GID, GetCastleData("arug_cas05",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_cas05",65,94;
  2065. end;
  2066. case 2:
  2067. warp "arug_cas05",112,152;
  2068. end;
  2069. case 3:
  2070. warp "arug_cas05",116,235;
  2071. end;
  2072. case 4:
  2073. close;
  2074. }
  2075. }
  2076. end;
  2077. }
  2078. arug_cas05,155,314,0 script LF-08#arug_cas05 111,{
  2079. set .@GID, GetCastleData("arug_cas05",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_cas05",211,97;
  2088. end;
  2089. case 2:
  2090. warp "arug_cas05",172,152;
  2091. end;
  2092. case 3:
  2093. warp "arug_cas05",164,235;
  2094. end;
  2095. case 4:
  2096. close;
  2097. }
  2098. }
  2099. end;
  2100. }
  2101. arug_cas05,158,314,0 script LF-09#arug_cas05 111,{
  2102. set .@GID, GetCastleData("arug_cas05",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_cas05",171,73;
  2111. end;
  2112. case 2:
  2113. warp "arug_cas05",162,186;
  2114. end;
  2115. case 3:
  2116. close;
  2117. }
  2118. }
  2119. end;
  2120. }
  2121. arug_cas05,161,314,0 script LF-10#arug_cas05 111,{
  2122. set .@GID, GetCastleData("arug_cas05",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_cas05",321,57;
  2132. end;
  2133. case 2:
  2134. close;
  2135. }
  2136. }
  2137. end;
  2138. }
  2139. arug_cas05,45,158,0 script Banadis#LF_ar05_01::LF_ar05_01 111,{
  2140. set .@GID, GetCastleData("arug_cas05",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_cas05",121,318;
  2149. end;
  2150. case 2:
  2151. close;
  2152. }
  2153. }
  2154. end;
  2155. }
  2156. arug_cas05,226,156,0 duplicate(LF_ar05_01) Banadis#LF_ar05_01 111
  2157. arug_cas05,134,62,4 duplicate(LF_ar05_01) Banadis#LF_ar05_02 111
  2158. arug_cas05,149,62,4 duplicate(LF_ar05_01) Banadis#LF_ar05_03 111
  2159. arug_cas05,123,154,0 duplicate(LF_ar05_01) Banadis#LF_ar05_04 111
  2160. arug_cas05,160,154,0 duplicate(LF_ar05_01) Banadis#LF_ar05_05 111
  2161. arug_cas05,135,205,0 duplicate(LF_ar05_01) Banadis#LF_ar05_06 111
  2162. arug_cas05,148,205,0 duplicate(LF_ar05_01) Banadis#LF_ar05_07 111
  2163. arug_cas05,134,260,0 duplicate(LF_ar05_01) Banadis#LF_ar05_08 111
  2164. //arug_cas05,204,142,0 duplicate(LF_ar05_01) Banadis#LF_ar05_09 111
  2165. arug_cas05,148,103,4 script Banadis#LF_ar05_10::LF_ar05_02 722,{
  2166. set .@GID, GetCastleData("arug_cas05",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_cas05",121,318;
  2175. end;
  2176. case 2:
  2177. close;
  2178. }
  2179. }
  2180. end;
  2181. OnRecvCastlear05:
  2182. FlagEmblem GetCastleData("arug_cas05",1);
  2183. end;
  2184. }
  2185. arug_cas05,135,103,4 duplicate(LF_ar05_02) Banadis#LF_ar05_11 722
  2186. arug_cas05,63,51,7 duplicate(LF_ar05_02) Banadis#LF_ar05_12 722
  2187. arug_cas05,214,51,1 duplicate(LF_ar05_02) Banadis#LF_ar05_13 722
  2188. // Guild Manager
  2189. arug_cas05,328,98,3 script Steward#aru05 55,{
  2190. set .@GID, GetCastleData("arug_cas05",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_cas05",2) + ".";
  2222. if (GetCastleData("arug_cas05",4) > 0) {
  2223. mes "Last time, you invested in";
  2224. mes "Commercial Growth " + GetCastleData("arug_cas05",4) + ".";
  2225. }
  2226. next;
  2227. mes "[ Steward ]";
  2228. mes "Our stronghold's";
  2229. mes "safeguard level is " + GetCastleData("arug_cas05",3) + ".";
  2230. if (GetCastleData("arug_cas05",5) > 0) {
  2231. mes "Last time, you invested";
  2232. mes "in defense " + GetCastleData("arug_cas05",5) + " times.";
  2233. }
  2234. mes " ";
  2235. mes "That is all, master.";
  2236. close;
  2237. case 2:
  2238. set .@Economy,GetCastleData("arug_cas05",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_cas05",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_cas05",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_cas05",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_cas05",4,GetCastleData("arug_cas05",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_cas05",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_cas05",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_cas05",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_cas05",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_cas05",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_cas05",5,GetCastleData("arug_cas05",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_cas05",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_cas05";
  2472. SetCastleData "arug_cas05",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#aru05";
  2508. SetCastleData "arug_cas05",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_cas05",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_cas05",2) - 5;
  2587. if (.@Economy < 0) set .@Economy, 0;
  2588. SetCastleData "arug_cas05", 2, .@Economy;
  2589. // Lower Castle Defence
  2590. set .@Defence,GetCastleData("arug_cas05",3) - 5;
  2591. if (.@Defence < 0) set .@Defence, 0;
  2592. SetCastleData "arug_cas05", 3, .@Defence;
  2593. // Set new owner
  2594. SetCastleData "arug_cas05",1, .@GID;
  2595. // Clear castle's data.
  2596. for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
  2597. SetCastleData "arug_cas05", .@i, 0;
  2598. // Disable Kafra
  2599. disablenpc "Kafra Employee#aru05";
  2600. set .msg,2;
  2601. if (.msg == 1) {
  2602. announce "Fortress [" + GetCastleName("arug_cas05") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2603. donpcevent "Manager#aru05_02::Onstart";
  2604. }
  2605. else if (.msg == 2) {
  2606. announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 5] stronghold of "+GetCastleName("arug_cas05"),bc_all|bc_woe;
  2607. mapannounce "arug_cas05","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2608. if (agitcheck2()) {
  2609. donpcevent "Manager#aru05_02::Onreset";
  2610. initnpctimer;
  2611. }
  2612. else {
  2613. donpcevent "Manager#aru05_02::Onreset";
  2614. stopnpctimer;
  2615. }
  2616. }
  2617. else if (.msg == 0) {
  2618. announce "Fortress [" + GetCastleName("arug_cas05") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2619. donpcevent "Manager#aru05_02::Onreset";
  2620. stopnpctimer;
  2621. end;
  2622. }
  2623. MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2;
  2624. GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
  2625. end;
  2626. OnTimer10000:
  2627. donpcevent "Manager#aru05_02::Onchange";
  2628. mapannounce "arug_cas05","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2629. end;
  2630. }
  2631. // Guild Kafra
  2632. arug_cas05,315,98,5 script Kafra Employee#aru05 117,{
  2633. cutin "kafra_01",2;
  2634. set .@GID, GetCastleData("arug_cas05",1);
  2635. if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
  2636. mes "[Kafra Employee]";
  2637. mes "Welcome, proud member";
  2638. mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
  2639. mes "The Kafra Corporation is ready";
  2640. mes "to assist you wherever you go!";
  2641. next;
  2642. switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
  2643. case 1:
  2644. if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
  2645. mes "[Kafra Employee]";
  2646. mes "I'm so sorry, but you must";
  2647. mes "have at least Novice Skill";
  2648. mes "Lv.6 to use the Storage.";
  2649. }
  2650. else {
  2651. openstorage;
  2652. }
  2653. break;
  2654. case 2:
  2655. mes "[Kafra Employee]";
  2656. mes "Please tell me your";
  2657. mes "Warp destination.";
  2658. next;
  2659. switch(select("Rachel -> 200 z:Cancel")) {
  2660. case 1:
  2661. if (Zeny < 200) {
  2662. mes "[Kafra Employee]";
  2663. mes "I'm sorry, but you don't";
  2664. mes "have enough zeny to pay";
  2665. mes "the warp fee. Would you";
  2666. mes "please check your funds again?";
  2667. close2;
  2668. cutin "kafra_01",255;
  2669. end;
  2670. }
  2671. set zeny,zeny-200;
  2672. warp "rachel",115,125;
  2673. end;
  2674. case 2:
  2675. cutin "kafra_01",255;
  2676. }
  2677. break;
  2678. case 3:
  2679. if (BaseClass != Job_Merchant) {
  2680. mes "[Kafra Employee]";
  2681. mes "I'm sorry, but the Pushcart";
  2682. mes "rental service can only be";
  2683. mes "used by Merchant, Blacksmith,";
  2684. mes "and Alchemist class characters.";
  2685. }
  2686. else if (checkcart() == 1) {
  2687. mes "[Kafra Employee]";
  2688. mes "Hm? You've already";
  2689. mes "rented a Pushcart.";
  2690. }
  2691. else {
  2692. mes "[Kafra Employee]";
  2693. mes "The Pushcart rental fee";
  2694. mes "is 800 zeny. Would you";
  2695. mes "like to rent a Pushcart?";
  2696. next;
  2697. switch(select("Rent Pushcart:Cancel")) {
  2698. case 1:
  2699. if (Zeny < 800) {
  2700. mes "[Kafra Employee]";
  2701. mes "I'm sorry, but you don't";
  2702. mes "have enough zeny to rent";
  2703. mes "one of our Pushcarts.";
  2704. close2;
  2705. cutin "kafra_01",255;
  2706. end;
  2707. }
  2708. set zeny,zeny-800;
  2709. setcart;
  2710. break;
  2711. case 2:
  2712. break;
  2713. }
  2714. }
  2715. break;
  2716. case 4:
  2717. mes "[Kafra Employee]";
  2718. mes "Thank you for using the";
  2719. mes "Kafra Service. Wherever";
  2720. mes "you go, Kafra will be";
  2721. mes "there to support you!";
  2722. close2;
  2723. cutin "kafra_01",255;
  2724. end;
  2725. }
  2726. close2;
  2727. cutin "kafra_01",255;
  2728. end;
  2729. }
  2730. else {
  2731. mes "[Kafra Employee]";
  2732. mes "I'm sorry, but I've been";
  2733. mes "exclusively contracted";
  2734. mes "to the members of the";
  2735. mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2736. mes "You'll have to ask another";
  2737. mes "Kafra Employee to help you...";
  2738. close2;
  2739. cutin "kafra_01",255;
  2740. end;
  2741. }
  2742. OnRecvCastlear05:
  2743. if (GetCastleData("arug_cas05",1) == 0) {
  2744. monster "arug_cas05",0,0,"Evil Druid",1117,10;
  2745. monster "arug_cas05",0,0,"Khalitzburg",1132,4;
  2746. monster "arug_cas05",0,0,"Abysmal Knight",1219,3;
  2747. monster "arug_cas05",0,0,"Executioner",1205,1;
  2748. monster "arug_cas05",0,0,"Penomena",1216,10;
  2749. monster "arug_cas05",0,0,"Alarm",1193,18;
  2750. monster "arug_cas05",0,0,"Clock",1269,9;
  2751. monster "arug_cas05",0,0,"Raydric Archer",1276,12;
  2752. monster "arug_cas05",0,0,"Wanderer",1208,3;
  2753. monster "arug_cas05",0,0,"Alice",1275,1;
  2754. monster "arug_cas05",0,0,"Bloody Knight",1268,2;
  2755. monster "arug_cas05",0,0,"Dark Lord",1272,2;
  2756. monster "arug_cas05",0,0,"Tower Keeper",1270,4;
  2757. disablenpc "Kafra Employee#aru05";
  2758. }
  2759. if (GetCastleData("arug_cas05",9) < 1) {
  2760. disablenpc "Kafra Employee#aru05";
  2761. }
  2762. end;
  2763. }
  2764. arug_cas05,299,277,0 script #aru05_switch 111,{
  2765. mes " ";
  2766. mes "^3355FFWill you pull";
  2767. mes "this small lever?^000000";
  2768. next;
  2769. switch(select("Pull Lever:Cancel")) {
  2770. case 1:
  2771. warp "arug_cas05",321,57;
  2772. end;
  2773. case 2:
  2774. close;
  2775. }
  2776. }
  2777. aru_gld,289,103,6 script Banadis#flag_ar05_1::ar05_Flag 722,{
  2778. set .@GID, GetCastleData("arug_cas05",1);
  2779. if (.@GID == 0) {
  2780. mes "[ Arunafeltz Royal Edict ]";
  2781. mes "The Holy Kingdom of";
  2782. mes "Arunafeltz declares that";
  2783. mes "one has yet to claim lordship";
  2784. mes "over this stronghold. The one";
  2785. mes "that breaks the Emperium will";
  2786. mes "be recognized as its new owner.";
  2787. close;
  2788. }
  2789. else {
  2790. if (getcharid(2) == .@GID) {
  2791. mes "[ Ringing Voice ]";
  2792. mes "Courageous one,";
  2793. mes "do you wish to return";
  2794. mes "to your stronghold?";
  2795. next;
  2796. switch(select("Return to the Stronghold:Cancel")) {
  2797. case 1:
  2798. set .@GID, GetCastleData("arug_cas05",1);
  2799. if (getcharid(2) == .@GID) {
  2800. warp "arug_cas05",121,318;
  2801. end;
  2802. }
  2803. close;
  2804. case 2:
  2805. close;
  2806. }
  2807. }
  2808. mes "[ Arunafeltz Royal Edict ]";
  2809. mes "The Holy Kingdom of";
  2810. mes "Arunafeltz decrees that";
  2811. mes "this stronghold is owned";
  2812. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2813. next;
  2814. mes "[ Arunafeltz Royal Edict ]";
  2815. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2816. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2817. mes "Any that object must claim this";
  2818. mes "stronghold through strength of";
  2819. mes "steel and magic during the";
  2820. mes "appointed Guild Siege times.";
  2821. close;
  2822. }
  2823. OnRecvCastlear05:
  2824. FlagEmblem GetCastleData("arug_cas05",1);
  2825. end;
  2826. }
  2827. aru_gld,289,112,6 duplicate(ar05_Flag) Banadis#flag_ar05_2 722
  2828. aru_gld,350,98,6 script Banadis#flag_ar05_3::ar05_Flag2 722,{
  2829. set .@GID, GetCastleData("arug_cas05",1);
  2830. if (.@GID == 0) {
  2831. mes "[ Arunafeltz Royal Edict ]";
  2832. mes "The Holy Kingdom of";
  2833. mes "Arunafeltz declares that";
  2834. mes "one has yet to claim lordship";
  2835. mes "over this stronghold. The one";
  2836. mes "that breaks the Emperium will";
  2837. mes "be recognized as its new owner.";
  2838. close;
  2839. }
  2840. else {
  2841. mes "[ Arunafeltz Royal Edict ]";
  2842. mes "The Holy Kingdom of";
  2843. mes "Arunafeltz decrees that";
  2844. mes "this stronghold is owned";
  2845. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2846. next;
  2847. mes "[ Arunafeltz Royal Edict ]";
  2848. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2849. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2850. mes "Any that object must claim this";
  2851. mes "stronghold through strength of";
  2852. mes "steel and magic during the";
  2853. mes "appointed Guild Siege times.";
  2854. close;
  2855. }
  2856. OnRecvCastlear05:
  2857. FlagEmblem GetCastleData("arug_cas05",1);
  2858. end;
  2859. }
  2860. aru_gld,350,88,6 duplicate(ar05_Flag2) Banadis#flag_ar05_4 722