schg_cas02.txt 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854
  1. //===== eAthena Script =======================================
  2. //= War of Emperium Second Edition
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 2.1
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= WoE SE Schwaltzvalt Castle 2
  11. //===== Additional Comments: =================================
  12. //= 1.0 First Version [L0ne_W0lf]
  13. //= 1.1 Fixed setcell range of first barricade. [L0ne_W0lf]
  14. //= 1.2 Fixed first Barricade being desotryable. [L0ne_W0lf]
  15. //= 1.3 Swaped an end for a close in eco investing. [L0ne_W0lf]
  16. //= 1.4 Fixed 3rd Control Device wasting supplies. [L0ne_W0lf]
  17. //= 1.5 Fixed double message in defense investing. [L0ne_W0lf]
  18. //= Corrected a minor typo in the guild steward.
  19. //= 1.6 Fixed a guardian spawning NPCs. [L0ne_W0lf]
  20. //= 1.7 Fixed investment period not resetting. [L0ne_W0lf]
  21. //= Made it so treasure won't spawn if castle is empty.
  22. //= Treasure will now be killed before spawning.
  23. //= 1.8 Fixed error with control devices. [L0ne_W0lf]
  24. //= 1.9 Replaced effect numerics with constants. [L0ne_W0lf]
  25. //= 2.0 Applied updated eco/def systems. [L0ne_W0lf]
  26. //= 2.0a Corrected investment data being reset before applied.
  27. //= 2.1 Fixed eco/def not actually incrementing. [L0ne_W0lf]
  28. //= Can no longer gain eco/def higher than 100.
  29. //============================================================
  30. schg_cas02,1,1,0 script Manager#sch02_02 111,{
  31. end;
  32. OnInterIfInitOnce:
  33. GetCastleData "schg_cas02",0,"::OnRecvCastleSc02";
  34. end;
  35. OnRecvCastlesc02:
  36. RequestGuildInfo GetCastleData("schg_cas02",1);
  37. if (GetCastleData("schg_cas02",1) == 0) {
  38. donpcevent "Manager#sch02_02::Onstart";
  39. }
  40. end;
  41. OnAgitStart2:
  42. if (agitcheck2()) {
  43. MapRespawnGuildID "schg_cas02",GetCastleData("schg_cas02",1),2;
  44. GvgOn "schg_cas02";
  45. donpcevent "Manager#sch02_02::Onstart";
  46. }
  47. else {
  48. donpcevent "#sch02_RL00::OnDisable";
  49. donpcevent "#sch02_RL01::OnDisable";
  50. donpcevent "#sch02_RL02::OnDisable";
  51. donpcevent "#sch02_RL03::OnDisable";
  52. }
  53. end;
  54. OnAgitEnd2:
  55. GvgOff "schg_cas02";
  56. if (GetCastleData("schg_cas02",1)) {
  57. KillMonster "schg_cas02","Steward#sch02::OnStartArena";
  58. donpcevent "Manager#sch02_02::Onreset";
  59. donpcevent "Steward#sch02::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("schg_cas02",1)) {
  69. setarray $agit_sc02[0],0,0,0,0,0,0;
  70. donpcevent "#sch02_df01::OnEnable";
  71. donpcevent "#sch02_df02::OnEnable";
  72. donpcevent "#sch02_RL00::OnEnable";
  73. donpcevent "#sch02_RL01::OnEnable";
  74. donpcevent "#sch02_RL02::OnEnable";
  75. donpcevent "#sch02_RL03::OnEnable";
  76. }
  77. monster "schg_cas02",162,193,"Emperium",1288,1,"Steward#sch02::OnStartArena";
  78. end;
  79. Onreset:
  80. donpcevent "#sch02_df01::OnDisable";
  81. donpcevent "#sch02_df02::OnDisable";
  82. donpcevent "#sch02_gard01::Onreset";
  83. donpcevent "#sch02_gard02::Onreset";
  84. donpcevent "#sch02_RL00::OnDisable";
  85. donpcevent "#sch02_RL01::OnDisable";
  86. donpcevent "#sch02_RL02::OnDisable";
  87. donpcevent "#sch02_RL03::OnDisable";
  88. donpcevent "1st Guardian Stone#sch02::OnDisable";
  89. donpcevent "2nd Guardian Stone#sch02::OnDisable";
  90. donpcevent "Control Device01#sch02::OnDisable";
  91. donpcevent "Control Device02#sch02::OnDisable";
  92. donpcevent "Control Device03#sch02::OnDisable";
  93. if (agitcheck2()) {
  94. setarray $agit_sc02[0],0,0,1,1,1,0;
  95. }
  96. end;
  97. Onchange:
  98. setarray $agit_sc02[0],2,2,1,1,2,0;
  99. monster "schg_cas02",162,193,"Emperium",1288,1,"Steward#sch02::OnStartArena";
  100. donpcevent "Control Device03#sch02::OnEnable";
  101. donpcevent "1st Guardian Stone#sch02::OnEnable";
  102. donpcevent "2nd Guardian Stone#sch02::OnEnable";
  103. end;
  104. OnClock0001:
  105. if (!GetCastleData("schg_cas02",1)) end;
  106. killmonster "schg_cas02","Manager#sch02_02::OnTreasureDied";
  107. if (GetCastleData("schg_cas02",4)) {
  108. set .@Economy,GetCastleData("schg_cas02",2);
  109. SetCastleData "schg_cas02",2,.@Economy + GetCastleData("schg_cas02",4) + (rand(2) && getgdskilllv(.@GID,10014));
  110. if (GetCastleData("schg_cas02",2) > 100) SetCastleData "schg_cas02",2,100;
  111. setcastledata "schg_cas02",4,0;
  112. }
  113. if (GetCastleData("schg_cas02",5)) {
  114. set .@Defence,GetCastleData("schg_cas02",3);
  115. SetCastleData "schg_cas02",3,.@Defence + GetCastleData("schg_cas02",5);
  116. if (GetCastleData("schg_cas02",3) > 100) SetCastleData "schg_cas02",3,100;
  117. setcastledata "schg_cas02",5,0;
  118. }
  119. set .@Treasure,GetCastleData("schg_cas02",2)/5+4;
  120. if (.@Treasure) {
  121. monster "schg_cas02",249,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  122. monster "schg_cas02",250,378,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  123. monster "schg_cas02",251,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  124. monster "schg_cas02",252,378,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  125. if (.@Treasure < 5) end;
  126. monster "schg_cas02",253,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  127. if (.@Treasure < 6) end;
  128. monster "schg_cas02",246,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  129. if (.@Treasure < 7) end;
  130. monster "schg_cas02",247,376,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  131. if (.@Treasure < 8) end;
  132. monster "schg_cas02",248,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  133. if (.@Treasure < 9) end;
  134. monster "schg_cas02",249,376,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  135. if (.@Treasure < 10) end;
  136. monster "schg_cas02",250,376,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  137. if (.@Treasure < 11) end;
  138. monster "schg_cas02",250,374,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  139. if (.@Treasure < 12) end;
  140. monster "schg_cas02",251,374,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  141. if (.@Treasure < 13) end;
  142. monster "schg_cas02",252,374,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  143. if (.@Treasure < 14) end;
  144. monster "schg_cas02",253,374,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  145. if (.@Treasure < 15) end;
  146. monster "schg_cas02",246,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  147. if (.@Treasure < 16) end;
  148. monster "schg_cas02",247,372,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  149. if (.@Treasure < 17) end;
  150. monster "schg_cas02",248,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  151. if (.@Treasure < 18) end;
  152. monster "schg_cas02",249,372,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  153. if (.@Treasure < 19) end;
  154. monster "schg_cas02",250,372,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  155. if (.@Treasure < 20) end;
  156. monster "schg_cas02",249,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  157. if (.@Treasure < 21) end;
  158. monster "schg_cas02",250,370,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  159. if (.@Treasure < 22) end;
  160. monster "schg_cas02",251,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  161. if (.@Treasure < 23) end;
  162. monster "schg_cas02",252,270,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
  163. if (.@Treasure < 24) end;
  164. monster "schg_cas02",253,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
  165. }
  166. end;
  167. OnTreasureDied:
  168. end;
  169. }
  170. schg_cas02,140,184,3 script Endeef#sch02_01 868,{
  171. set .@GID, GetCastleData("schg_cas02",1);
  172. if (.@GID == 0) {
  173. mes "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  192. mes "I am Endeef, 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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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 "[Endeef]";
  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_sc02[5] == 0) {
  304. if (getgdskilllv(.@GID,10002) == 0) {
  305. mes "[Endeef]";
  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 "[Endeef]";
  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_sc02[5],1;
  322. if ($agit_sc02[0] == 0) {
  323. donpcevent "#sch02_gard01::OnEnable";
  324. }
  325. if ($agit_sc02[1] == 0) {
  326. donpcevent "#sch02_gard02::OnEnable";
  327. }
  328. close;
  329. }
  330. }
  331. else {
  332. mes "[Endeef]";
  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 "[Endeef]";
  340. mes "Our defense status is...";
  341. if ($agit_sc02[0] == 1) {
  342. mes "1st Guardian Stone: ^FF0000Destroyed^000000";
  343. }
  344. else if ($agit_sc02[0] == 2) {
  345. mes "1st Guardian Stone: ^008000Repairing^000000";
  346. }
  347. else {
  348. mes "1st Guardian Stone: ^4D4DFFOperational^000000";
  349. }
  350. if ($agit_sc02[1] == 1) {
  351. mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
  352. }
  353. else if ($agit_sc02[1] == 2) {
  354. mes "2nd Guardian Stone: ^008000Repairing^000000";
  355. }
  356. else {
  357. mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
  358. }
  359. if ($agit_sc02[2] == 1) {
  360. mes "1st Fortress Gate: ^FF0000Destroyed^000000";
  361. }
  362. else if ($agit_sc02[2] == 2) {
  363. mes "1st Fortress Gate: ^008000Repairing^000000";
  364. }
  365. else {
  366. mes "1st Fortress Gate: ^4D4DFFOperational^000000";
  367. }
  368. if ($agit_sc02[3] == 1) {
  369. mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
  370. }
  371. else if ($agit_sc02[3] == 2) {
  372. mes "2nd Fortress Gate: ^008000Repairing^000000";
  373. }
  374. else {
  375. mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
  376. }
  377. if ($agit_sc02[4] == 1) {
  378. mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
  379. }
  380. else if ($agit_sc02[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 "[Endeef]";
  389. mes "I'll be standing by,";
  390. mes "awaiting your orders.";
  391. close;
  392. }
  393. }
  394. }
  395. }
  396. else {
  397. mes "[Endeef]";
  398. mes "Who are you? Scoundrel!";
  399. mes "Leave this stronghold now!";
  400. close;
  401. }
  402. OnInit:
  403. setarray $agit_sc02[0],0,0,0,0,0,0;
  404. end;
  405. }
  406. schg_cas02,1,1,0 script #sch02_gard01 -1,{
  407. OnEnable:
  408. set .@defence,GetCastleData("schg_cas02",3);
  409. guardian "schg_cas02",326,83,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //0;
  410. if ((.@defence > 10) && (.@defence < 31)) {
  411. set .MyMobCount,2;
  412. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1;
  413. }
  414. else if ((.@defence > 30) && (.@defence < 51)) {
  415. set .MyMobCount,3;
  416. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1;
  417. guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2;
  418. }
  419. else if ((.@defence > 50) && (.@defence < 71)) {
  420. set .MyMobCount,4;
  421. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1;
  422. guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2;
  423. guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //3;
  424. }
  425. else if (.@defence > 70) {
  426. set .MyMobCount,5;
  427. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1;
  428. guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //2;
  429. guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //3;
  430. guardian "schg_cas02",285,40,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //4;
  431. }
  432. else {
  433. set .MyMobCount,2;
  434. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //1;
  435. }
  436. initnpctimer;
  437. end;
  438. OnTimer300000:
  439. set .MyMobCount,.MyMobCount+1;
  440. guardian "schg_cas02",236,41,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //5;
  441. mapannounce "schg_cas02","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  442. end;
  443. OnTimer900000:
  444. set .MyMobCount,.MyMobCount+1;
  445. guardian "schg_cas02",285,40,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //6;
  446. mapannounce "schg_cas02","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  447. end;
  448. OnTimer1800000:
  449. set .MyMobCount,.MyMobCount+1;
  450. guardian "schg_cas02",296,82,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //7;
  451. mapannounce "schg_cas02","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  452. end;
  453. OnTimer2700000:
  454. set .MyMobCount,.MyMobCount+1;
  455. guardian "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //8;
  456. mapannounce "schg_cas02","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  457. end;
  458. OnTimer3600000:
  459. set .MyMobCount,.MyMobCount+1;
  460. guardian "schg_cas02",337,95,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //9;
  461. mapannounce "schg_cas02","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 "schg_cas02",334,119,"Guardian Soldier",1899,"#sch02_gard01::OnGuardianDied"; //10;
  469. }
  470. end;
  471. Onreset:
  472. stopnpctimer;
  473. killmonster "schg_cas02","#sch02_gard01::OnGuardianDied";
  474. end;
  475. }
  476. schg_cas02,1,2,0 script #sch02_gard02 -1,{
  477. OnEnable:
  478. set .@defence,GetCastleData("schg_cas02",3);
  479. guardian "schg_cas02",359,85,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //11;
  480. if ((.@defence > 10) && (.@defence < 31)) {
  481. set .MyMobCount,2;
  482. guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12;
  483. }
  484. else if ((.@defence > 30) && (.@defence < 51)) {
  485. set .MyMobCount,3;
  486. guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12;
  487. guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13;
  488. }
  489. else if ((.@defence > 50) && (.@defence < 71)) {
  490. set .MyMobCount,4;
  491. guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12;
  492. guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13;
  493. guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //14;
  494. }
  495. else if (.@defence > 70) {
  496. set .MyMobCount,5;
  497. guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12;
  498. guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //13;
  499. guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //14;
  500. guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //15;
  501. }
  502. else {
  503. set .MyMobCount,2;
  504. guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //12;
  505. }
  506. initnpctimer;
  507. end;
  508. OnTimer600000:
  509. set .MyMobCount,.MyMobCount+1;
  510. guardian "schg_cas02",300,119,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //16;
  511. end;
  512. OnTimer1200000:
  513. set .MyMobCount,.MyMobCount+1;
  514. guardian "schg_cas02",337,154,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //17;
  515. end;
  516. OnTimer2100000:
  517. set .MyMobCount,.MyMobCount+1;
  518. guardian "schg_cas02",317,183,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //18;
  519. end;
  520. OnTimer3000000:
  521. set .MyMobCount,.MyMobCount+1;
  522. guardian "schg_cas02",307,222,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //19;
  523. end;
  524. OnTimer3900000:
  525. set .MyMobCount,.MyMobCount+1;
  526. guardian "schg_cas02",359,85,"Guardian Soldier",1899,"#sch02_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 "schg_cas02",236,41,"Guardian Soldier",1899,"#sch02_gard02::OnGuardianDied"; //21;
  534. }
  535. end;
  536. Onreset:
  537. stopnpctimer;
  538. killmonster "schg_cas02","#sch02_gard02::OnGuardianDied";
  539. end;
  540. }
  541. schg_cas02,1,3,0 script #sch02_df01 -1,{
  542. OnEnable:
  543. guardian "schg_cas02",231,58,"1st Guardian Stone",1907,"#sch02_df01::OnGuardianStoneDied"; //22;
  544. end;
  545. OnDisable:
  546. killmonster "schg_cas02","#sch02_df01::OnGuardianStoneDied";
  547. setarray $agit_sc02[0],1; //Global Variable
  548. stopnpctimer;
  549. end;
  550. OnGuardianStoneDied:
  551. // 1st Guardian Stone is Destroyed
  552. setarray $agit_sc02[0],1;
  553. if (($agit_sc02[0] == 1) || ($agit_sc02[0] == 2)) {
  554. set .@destroyed,.@destroyed + 1;
  555. }
  556. if (($agit_sc02[1] == 1) || ($agit_sc02[1] == 2)) {
  557. set .@destroyed,.@destroyed + 1;
  558. }
  559. if (.@destroyed == 2) {
  560. mapannounce "schg_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  561. donpcevent "#sch02_RL00::OnDisable";
  562. donpcevent "#sch02_gard01::Onreset";
  563. }
  564. else {
  565. mapannounce "schg_cas02","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  566. donpcevent "#sch02_gard01::Onreset";
  567. }
  568. initnpctimer;
  569. end;
  570. OnTimer300000:
  571. donpcevent "1st Guardian Stone#sch02::OnEnable";
  572. setarray $agit_sc02[0],2; //Global Variable
  573. stopnpctimer;
  574. end;
  575. }
  576. schg_cas02,231,57,0 script 1st Guardian Stone#sch02 844,{
  577. set .@GID, GetCastleData("schg_cas02",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_sc02[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 "#sch02_df01::OnEnable";
  792. specialeffect EF_ICECRASH;
  793. disablenpc "1st Guardian Stone#sch02";
  794. setarray $agit_sc02[0],0;
  795. set .@df_all,$agit_sc02[0]+$agit_sc02[1];
  796. if (.@df_all == 0) {
  797. mapannounce "schg_cas02","The Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  798. donpcevent "#sch02_RL00::OnEnable";
  799. }
  800. else {
  801. mapannounce "schg_cas02","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  802. }
  803. if ($agit_sc02[5] == 1) {
  804. donpcevent "#sch02_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#sch02";
  833. end;
  834. OnEnable:
  835. enablenpc "1st Guardian Stone#sch02";
  836. specialeffect EF_MAPPILLAR2;
  837. end;
  838. OnDisable:
  839. disablenpc "1st Guardian Stone#sch02";
  840. end;
  841. }
  842. schg_cas02,1,4,0 script #sch02_df02 -1,{
  843. OnEnable:
  844. guardian "schg_cas02",335,230,"2nd Guardian Stone",1908,"#sch02_df02::OnGuardianStoneDied"; //23;
  845. end;
  846. OnDisable:
  847. killmonster "schg_cas02","#sch02_df02::OnGuardianStoneDied";
  848. setarray $agit_sc02[1],1; //Global Variable
  849. stopnpctimer;
  850. end;
  851. OnGuardianStoneDied:
  852. // 2nd Guardian Stone is Destroyed
  853. setarray $agit_sc02[1],1;
  854. if (($agit_sc02[0] == 1) || ($agit_sc02[0] == 2)) {
  855. set .@destroyed,.@destroyed + 1;
  856. }
  857. if (($agit_sc02[1] == 1) || ($agit_sc02[1] == 2)) {
  858. set .@destroyed,.@destroyed + 1;
  859. }
  860. if (.@destroyed == 2) {
  861. mapannounce "schg_cas02","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  862. donpcevent "#sch02_RL00::OnDisable";
  863. donpcevent "#sch02_gard02::Onreset";
  864. }
  865. else {
  866. mapannounce "schg_cas02","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  867. donpcevent "#sch02_gard02::Onreset";
  868. }
  869. initnpctimer;
  870. end;
  871. OnTimer300000:
  872. donpcevent "2nd Guardian Stone#sch02::OnEnable";
  873. setarray $agit_sc02[1],2; //Global Variable
  874. stopnpctimer;
  875. end;
  876. }
  877. schg_cas02,335,231,0 script 2nd Guardian Stone#sch02 844,{
  878. set .@GID, GetCastleData("schg_cas02",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_sc02[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 "#sch02_df02::OnEnable";
  1093. specialeffect EF_ICECRASH;
  1094. disablenpc "2nd Guardian Stone#sch02";
  1095. setarray $agit_sc02[1],0;
  1096. set .@df_all,$agit_sc02[0]+$agit_sc02[1];
  1097. if (.@df_all == 0) {
  1098. mapannounce "schg_cas02","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  1099. donpcevent "#sch02_RL00::OnEnable";
  1100. }
  1101. else {
  1102. mapannounce "schg_cas02","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  1103. }
  1104. if ($agit_sc02[5] == 1) {
  1105. donpcevent "#sch02_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#sch02";
  1134. end;
  1135. OnEnable:
  1136. enablenpc "2nd Guardian Stone#sch02";
  1137. specialeffect EF_MAPPILLAR2;
  1138. end;
  1139. OnDisable:
  1140. disablenpc "2nd Guardian Stone#sch02";
  1141. end;
  1142. }
  1143. schg_cas02,2,1,0 script #sch02_RL00 -1,{
  1144. OnEnable:
  1145. setwall "schg_cas02",290,98,8,0,0,"sch02_RL00";
  1146. guardian "schg_cas02",289,98," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //24;
  1147. guardian "schg_cas02",289,100," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //25;
  1148. guardian "schg_cas02",289,102," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //26;
  1149. guardian "schg_cas02",289,104," ",1905,"#sch02_RL00::OnBarrierDestroyed"; //27;
  1150. end;
  1151. OnDisable:
  1152. delwall "sch02_RL00";
  1153. killmonster "schg_cas02","#sch02_RL00::OnBarrierDestroyed";
  1154. end;
  1155. OnBarrierDestroyed:
  1156. end;
  1157. }
  1158. schg_cas02,2,2,0 script #sch02_RL01 -1,{
  1159. OnEnable:
  1160. set .MyMobCount,6;
  1161. setwall "schg_cas02",279,98,8,0,1,"sch02_RL01";
  1162. guardian "schg_cas02",280,98," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //28;
  1163. guardian "schg_cas02",280,100," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //29;
  1164. guardian "schg_cas02",280,102," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //30;
  1165. guardian "schg_cas02",281,99," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //31;
  1166. guardian "schg_cas02",281,101," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //32;
  1167. guardian "schg_cas02",281,103," ",1905,"#sch02_RL01::OnBarrierDestroyed"; //33;
  1168. end;
  1169. OnBarrierDestroyed:
  1170. set .MyMobCount,.MyMobCount-1;
  1171. if (.MyMobCount == 0) {
  1172. setarray $agit_sc02[2],1;
  1173. mapannounce "schg_cas02","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1174. delwall "sch02_RL01";
  1175. }
  1176. end;
  1177. OnDisable:
  1178. delwall "sch02_RL01";
  1179. killmonster "schg_cas02","#sch02_RL01::OnBarrierDestroyed";
  1180. end;
  1181. }
  1182. schg_cas02,2,3,0 script #sch02_RL02 -1,{
  1183. OnEnable:
  1184. set .MyMobCount,6;
  1185. setwall "schg_cas02",230,213,6,0,1,"sch02_RL02";
  1186. guardian "schg_cas02",231,214," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //34;
  1187. guardian "schg_cas02",231,216," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //35;
  1188. guardian "schg_cas02",231,218," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //36;
  1189. guardian "schg_cas02",232,213," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //37;
  1190. guardian "schg_cas02",232,215," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //38;
  1191. guardian "schg_cas02",232,217," ",1905,"#sch02_RL02::OnBarrierDestroyed"; //39;
  1192. end;
  1193. OnBarrierDestroyed:
  1194. set .MyMobCount,.MyMobCount-1;
  1195. if (.MyMobCount == 0) {
  1196. setarray $agit_sc02[3],1;
  1197. mapannounce "schg_cas02","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1198. delwall "sch02_RL02";
  1199. }
  1200. end;
  1201. OnDisable:
  1202. delwall "sch02_RL02";
  1203. killmonster "schg_cas02","#sch02_RL02::OnBarrierDestroyed";
  1204. end;
  1205. }
  1206. schg_cas02,2,4,0 script #sch02_RL03 -1,{
  1207. OnEnable:
  1208. set .MyMobCount,4;
  1209. setwall "schg_cas02",160,141,6,6,1,"sch02_RL03";
  1210. guardian "schg_cas02",160,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //40;
  1211. guardian "schg_cas02",162,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //41;
  1212. guardian "schg_cas02",164,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //42;
  1213. guardian "schg_cas02",166,140," ",1905,"#sch02_RL03::OnBarrierDestroyed"; //43;
  1214. end;
  1215. OnBarrierDestroyed:
  1216. set .MyMobCount,.MyMobCount-1;
  1217. if (.MyMobCount == 0) {
  1218. setarray $agit_sc02[4],1;
  1219. mapannounce "schg_cas02","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
  1220. delwall "sch02_RL03";
  1221. }
  1222. end;
  1223. OnDisable:
  1224. delwall "sch02_RL03";
  1225. killmonster "schg_cas02","#sch02_RL03::OnBarrierDestroyed";
  1226. end;
  1227. }
  1228. schg_cas02,288,97,0 script Control Device01#sch02 111,{
  1229. set .@GID, GetCastleData("schg_cas02",1);
  1230. if (getcharid(2) == .@GID) {
  1231. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1232. if ($agit_sc02[2] == 2) {
  1233. mes "^3355FFDemolished Fortress";
  1234. mes "Gates can be repaired,";
  1235. mes "but you will need to gather";
  1236. mes "the following materials.^000000";
  1237. next;
  1238. mes "^4D4DFF10 Steel^000000,";
  1239. mes "^4D4DFF30 Trunks^000000,";
  1240. mes "^4D4DFF5 Oridecon^000000, and";
  1241. mes "^4D4DFF10 Emveretarcon^000000.";
  1242. next;
  1243. select("Continue");
  1244. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1245. mes "^3355FFYou will need Trunks to";
  1246. mes "repair the support frame,";
  1247. mes "Oridecon to enhance the";
  1248. mes "gate's endurance, and";
  1249. mes "Emveretarcon to basically";
  1250. mes "hold everything together.^000000";
  1251. next;
  1252. set .@ro_of01,rand(10,15);
  1253. while(1) {
  1254. if (.@ro_of02 == .@ro_of01) {
  1255. break;
  1256. }
  1257. else {
  1258. switch(rand(1,4)) {
  1259. case 1:
  1260. mes "^3355FFThe support frame";
  1261. mes "is badly damaged:";
  1262. mes "fixing this part";
  1263. mes "is a top priority.^000000";
  1264. next;
  1265. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1266. case 1:
  1267. mes "^3355FFThe frame has been";
  1268. mes "reinforced with wood.^000000";
  1269. set .@rp_temp,.@rp_temp + 1;
  1270. set .@ro_of02,.@ro_of02 + 1;
  1271. specialeffect2 EF_REPAIRWEAPON;
  1272. next;
  1273. break;
  1274. case 2:
  1275. mes "^3355FFYou tried using steel,";
  1276. mes "but it's not working very";
  1277. mes "well. You'll have to try";
  1278. mes "something else.^000000";
  1279. close;
  1280. case 3:
  1281. mes "^3355FFYou tried using emveretarcon,";
  1282. mes "but it's not working very well.^FFFFFF ^3355FF You'll have to try something else.";
  1283. close;
  1284. case 4:
  1285. mes "^3355FFYou tried using oridecon,";
  1286. mes "but it's not working very";
  1287. mes "well. You'll have to try";
  1288. mes "something else.^000000";
  1289. close;
  1290. }
  1291. break;
  1292. case 2:
  1293. mes "^3355FFIt looks like the gate's";
  1294. mes "overall endurance needs to";
  1295. mes "be reinforced with something.^000000";
  1296. next;
  1297. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1298. case 1:
  1299. mes "^3355FFYou tried using wood";
  1300. mes "to reinforce the gate.^000000";
  1301. set .@ro_of02,.@ro_of02 + 1;
  1302. next;
  1303. break;
  1304. case 2:
  1305. mes "^3355FFYou tried using steel";
  1306. mes "to reinforce the gate, but";
  1307. mes "it's not working well at all.";
  1308. mes "You'll have to start over.^000000";
  1309. close;
  1310. case 3:
  1311. mes "^3355FFYou tried using emveretarcon";
  1312. mes "to reinforce the gate, but it's";
  1313. mes "not working well at all.";
  1314. mes "You'll have to start over.^000000";
  1315. close;
  1316. case 4:
  1317. mes "^3355FFYou hammered the";
  1318. mes "oridecon: it looks";
  1319. mes "like this will work.^000000";
  1320. set .@rp_temp,.@rp_temp + 1;
  1321. set .@ro_of02,.@ro_of02 + 1;
  1322. specialeffect2 EF_REPAIRWEAPON;
  1323. next;
  1324. break;
  1325. }
  1326. break;
  1327. case 3:
  1328. mes "^3355FFThe damage to the gate";
  1329. mes "has caused all these";
  1330. mes "cracks. You'll have to";
  1331. mes "weld them solid somehow.^000000";
  1332. next;
  1333. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1334. case 1:
  1335. mes "^3355FFYou tried using wood to fix";
  1336. mes "this problem, but it seems";
  1337. mes "to have made it worse.";
  1338. mes "You'll have to start all over.^000000";
  1339. close;
  1340. case 2:
  1341. mes "^3355FFYou used steel to weld";
  1342. mes "all the cracks: the gate is";
  1343. mes "is starting to look more solid.^000000";
  1344. set .@rp_temp,.@rp_temp + 1;
  1345. set .@ro_of02,.@ro_of02 + 1;
  1346. specialeffect2 EF_REPAIRWEAPON;
  1347. next;
  1348. break;
  1349. case 3:
  1350. mes "^3355FFYou tried using emveretarcon";
  1351. mes "to reinforce the gate, but it's";
  1352. mes "not working well at all.";
  1353. mes "You'll have to start over.^000000";
  1354. close;
  1355. case 4:
  1356. mes "^3355FFYou tried using oridecon,";
  1357. mes "but it's not working very";
  1358. mes "well. You'll have to try";
  1359. mes "something else.^000000";
  1360. close;
  1361. }
  1362. break;
  1363. case 4:
  1364. mes "^3355FFNow you need to make";
  1365. mes "sure that the gate is held";
  1366. mes "together pretty solidly.^000000";
  1367. next;
  1368. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1369. case 1:
  1370. mes "^3355FFYou tried using wood to fix";
  1371. mes "this problem, but it seems";
  1372. mes "to have made it worse.";
  1373. mes "You'll have to start all over.^000000";
  1374. close;
  1375. case 2:
  1376. mes "^3355FFYou tried using steel,";
  1377. mes "but it's not working very";
  1378. mes "well. You'll have to try";
  1379. mes "something else.^000000";
  1380. close;
  1381. case 3:
  1382. mes "^3355FFYou successfully used";
  1383. mes "the emveretarcon to repair";
  1384. mes "much of the gate's damage.^000000";
  1385. set .@rp_temp,.@rp_temp + 1;
  1386. set .@ro_of02,.@ro_of02 + 1;
  1387. specialeffect2 EF_REPAIRWEAPON;
  1388. next;
  1389. break;
  1390. case 4:
  1391. mes "^3355FFYou tried using oridecon,";
  1392. mes "but it's not working very";
  1393. mes "well. You'll have to try";
  1394. mes "something else.^000000";
  1395. close;
  1396. }
  1397. }
  1398. }
  1399. }
  1400. mes "^3355FFWell, it looks like";
  1401. mes "you're just about done";
  1402. mes "with repairing the gate.^000000";
  1403. next;
  1404. if (agitcheck2() == 0) {
  1405. mes "^3355FFUnfortunately, the Fortress";
  1406. mes "Gate can't be reconstructed:";
  1407. mes "the Emperium is no longer here.^000000";
  1408. close;
  1409. }
  1410. else {
  1411. if (.@rp_temp == .@ro_of01) {
  1412. mes "^3355FFThe Fortress Gate has";
  1413. mes "been successfully repaired!^000000";
  1414. delitem 1019,30; //Wooden_Block
  1415. delitem 999,10; //Steel
  1416. delitem 1011,10; //Emveretarcon
  1417. delitem 984,5; //Oridecon
  1418. close2;
  1419. donpcevent "#sch02_RL01::OnEnable";
  1420. disablenpc "Control Device01#sch02";
  1421. mapannounce "schg_cas02","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1422. setarray $agit_sc02[2],0;
  1423. end;
  1424. }
  1425. else {
  1426. mes "^3355FFThe wall has been breached,";
  1427. mes "and the attempt to repair the";
  1428. mes "Fortress Gate has failed.";
  1429. mes "You lost some of your";
  1430. mes "repair resources...^000000";
  1431. delitem 984,2; //Oridecon
  1432. delitem 999,4; //Steel
  1433. delitem 1019,14; //Wooden_Block
  1434. delitem 1011,3; //Emveretarcon
  1435. close;
  1436. }
  1437. }
  1438. }
  1439. else {
  1440. mes "^3355FFYou can't attempt to repair";
  1441. mes "the Fortress Gate if you don't";
  1442. mes "have all the needed materials.^000000";
  1443. close;
  1444. }
  1445. }
  1446. }
  1447. }
  1448. end;
  1449. OnInit:
  1450. disablenpc "Control Device01#sch02";
  1451. end;
  1452. OnEnable:
  1453. enablenpc "Control Device01#sch02";
  1454. end;
  1455. OnDisable:
  1456. disablenpc "Control Device01#sch02";
  1457. end;
  1458. }
  1459. schg_cas02,230,209,0 script Control Device02#sch02 111,{
  1460. set .@GID, GetCastleData("schg_cas02",1);
  1461. if (getcharid(2) == .@GID) {
  1462. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1463. if ($agit_sc02[3] == 2) {
  1464. mes "^3355FFDemolished Fortress";
  1465. mes "Gates can be repaired,";
  1466. mes "but you will need to gather";
  1467. mes "the following materials.^000000";
  1468. next;
  1469. mes "^4D4DFF10 Steel^000000,";
  1470. mes "^4D4DFF30 Trunks^000000,";
  1471. mes "^4D4DFF5 Oridecon^000000, and";
  1472. mes "^4D4DFF10 Emveretarcon^000000.";
  1473. next;
  1474. select("Continue");
  1475. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1476. mes "^3355FFYou will need Trunks to";
  1477. mes "repair the support frame,";
  1478. mes "Oridecon to enhance the";
  1479. mes "gate's endurance, and";
  1480. mes "Emveretarcon to basically";
  1481. mes "hold everything together.^000000";
  1482. next;
  1483. set .@ro_of01,rand(10,15);
  1484. while(1) {
  1485. if (.@ro_of02 == .@ro_of01) {
  1486. break;
  1487. }
  1488. else {
  1489. switch(rand(1,4)) {
  1490. case 1:
  1491. mes "^3355FFThe support frame";
  1492. mes "is badly damaged:";
  1493. mes "fixing this part";
  1494. mes "is a top priority.^000000";
  1495. next;
  1496. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1497. case 1:
  1498. mes "^3355FFThe frame has been";
  1499. mes "reinforced with wood.^000000";
  1500. set .@rp_temp,.@rp_temp + 1;
  1501. set .@ro_of02,.@ro_of02 + 1;
  1502. specialeffect2 EF_REPAIRWEAPON;
  1503. next;
  1504. break;
  1505. case 2:
  1506. mes "^3355FFYou tried using steel,";
  1507. mes "but it's not working very";
  1508. mes "well. You'll have to try";
  1509. mes "something else.^000000";
  1510. close;
  1511. case 3:
  1512. mes "^3355FFYou tried using emveretarcon";
  1513. mes "to reinforce the gate, but it's";
  1514. mes "not working well at all.";
  1515. mes "You'll have to start over.^000000";
  1516. close;
  1517. case 4:
  1518. mes "^3355FFYou tried using oridecon,";
  1519. mes "but it's not working very";
  1520. mes "well. You'll have to try";
  1521. mes "something else.^000000";
  1522. close;
  1523. }
  1524. break;
  1525. case 2:
  1526. mes "^3355FFIt looks like the gate's";
  1527. mes "overall endurance needs to";
  1528. mes "be reinforced with something.^000000";
  1529. next;
  1530. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1531. case 1:
  1532. mes "^3355FFYou tried using wood";
  1533. mes "to reinforce the gate.^000000";
  1534. set .@ro_of02,.@ro_of02 + 1;
  1535. next;
  1536. break;
  1537. case 2:
  1538. mes "^3355FFYou tried using steel";
  1539. mes "to reinforce the gate, but";
  1540. mes "it's not working well at all.";
  1541. mes "You'll have to start over.^000000";
  1542. close;
  1543. case 3:
  1544. mes "^3355FFYou tried using emveretarcon";
  1545. mes "to reinforce the gate, but it's";
  1546. mes "not working well at all.";
  1547. mes "You'll have to start over.^000000";
  1548. close;
  1549. case 4:
  1550. mes "^3355FFYou hammered the";
  1551. mes "oridecon: it looks";
  1552. mes "like this will work.^000000";
  1553. set .@rp_temp,.@rp_temp + 1;
  1554. set .@ro_of02,.@ro_of02 + 1;
  1555. specialeffect2 EF_REPAIRWEAPON;
  1556. next;
  1557. break;
  1558. }
  1559. break;
  1560. case 3:
  1561. mes "^3355FFThe damage to the gate";
  1562. mes "has caused all these";
  1563. mes "cracks. You'll have to";
  1564. mes "weld them solid somehow.^000000";
  1565. next;
  1566. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1567. case 1:
  1568. mes "^3355FFYou tried using wood to fix";
  1569. mes "this problem, but it seems";
  1570. mes "to have made it worse.";
  1571. mes "You'll have to start all over.^000000";
  1572. close;
  1573. case 2:
  1574. mes "^3355FFYou used steel to weld";
  1575. mes "all the cracks: the gate is";
  1576. mes "is starting to look more solid.^000000";
  1577. set .@rp_temp,.@rp_temp + 1;
  1578. set .@ro_of02,.@ro_of02 + 1;
  1579. specialeffect2 EF_REPAIRWEAPON;
  1580. next;
  1581. break;
  1582. case 3:
  1583. mes "^3355FFYou tried using emveretarcon";
  1584. mes "to reinforce the gate, but it's";
  1585. mes "not working well at all.";
  1586. mes "You'll have to start over.^000000";
  1587. close;
  1588. case 4:
  1589. mes "^3355FFYou tried using oridecon,";
  1590. mes "but it's not working very";
  1591. mes "well. You'll have to try";
  1592. mes "something else.^000000";
  1593. close;
  1594. }
  1595. break;
  1596. case 4:
  1597. mes "^3355FFNow you need to make";
  1598. mes "sure that the gate is held";
  1599. mes "together pretty solidly.^000000";
  1600. next;
  1601. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1602. case 1:
  1603. mes "^3355FFYou tried using wood to fix";
  1604. mes "this problem, but it seems";
  1605. mes "to have made it worse.";
  1606. mes "You'll have to start all over.^000000";
  1607. close;
  1608. case 2:
  1609. mes "^3355FFYou tried using steel,";
  1610. mes "but it's not working very";
  1611. mes "well. You'll have to try";
  1612. mes "something else.^000000";
  1613. close;
  1614. case 3:
  1615. mes "^3355FFYou successfully used";
  1616. mes "the emveretarcon to repair";
  1617. mes "much of the gate's damage.^000000";
  1618. set .@rp_temp,.@rp_temp + 1;
  1619. set .@ro_of02,.@ro_of02 + 1;
  1620. specialeffect2 EF_REPAIRWEAPON;
  1621. next;
  1622. break;
  1623. case 4:
  1624. mes "^3355FFYou tried using oridecon,";
  1625. mes "but it's not working very";
  1626. mes "well. You'll have to try";
  1627. mes "something else.^000000";
  1628. close;
  1629. }
  1630. }
  1631. }
  1632. }
  1633. mes "^3355FFWell, it looks like";
  1634. mes "you're just about done";
  1635. mes "with repairing the gate.^000000";
  1636. next;
  1637. if (agitcheck2() == 0) {
  1638. mes "^3355FFUnfortunately, the Fortress";
  1639. mes "Gate can't be reconstructed:";
  1640. mes "the Emperium is no longer here.^000000";
  1641. close;
  1642. }
  1643. else {
  1644. if (.@rp_temp == .@ro_of01) {
  1645. mes "^3355FFThe Fortress Gate has";
  1646. mes "been successfully repaired!^000000";
  1647. delitem 1019,30; //Wooden_Block
  1648. delitem 999,10; //Steel
  1649. delitem 1011,10; //Emveretarcon
  1650. delitem 984,5; //Oridecon
  1651. close2;
  1652. donpcevent "#sch02_RL02::OnEnable";
  1653. disablenpc "Control Device02#sch02";
  1654. mapannounce "schg_cas02","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1655. setarray $agit_sc02[3],0; //Global Variable
  1656. setarray $agit_sc02[2],2; //Global Variable
  1657. donpcevent "Control Device01#sch02::OnEnable";
  1658. end;
  1659. }
  1660. else {
  1661. mes "^3355FFThe wall has been breached,";
  1662. mes "and the attempt to repair the";
  1663. mes "Fortress Gate has failed.";
  1664. mes "You lost some of your";
  1665. mes "repair resources...^000000";
  1666. delitem 984,2; //Oridecon
  1667. delitem 999,4; //Steel
  1668. delitem 1019,14; //Wooden_Block
  1669. delitem 1011,3; //Emveretarcon
  1670. close;
  1671. }
  1672. }
  1673. }
  1674. else {
  1675. mes "^3355FFYou can't attempt to repair";
  1676. mes "the Fortress Gate if you don't";
  1677. mes "have all the needed materials.^000000";
  1678. close;
  1679. }
  1680. }
  1681. }
  1682. }
  1683. end;
  1684. OnInit:
  1685. disablenpc "Control Device02#sch02";
  1686. end;
  1687. OnEnable:
  1688. enablenpc "Control Device02#sch02";
  1689. end;
  1690. OnDisable:
  1691. disablenpc "Control Device02#sch02";
  1692. end;
  1693. }
  1694. schg_cas02,159,143,0 script Control Device03#sch02 111,{
  1695. set .@GID, GetCastleData("schg_cas02",1);
  1696. if (getcharid(2) == .@GID) {
  1697. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1698. if ($agit_sc02[4] == 2) {
  1699. mes "^3355FFDemolished Fortress";
  1700. mes "Gates can be repaired,";
  1701. mes "but you will need to gather";
  1702. mes "the following materials.^000000";
  1703. next;
  1704. mes "^4D4DFF10 Steel^000000,";
  1705. mes "^4D4DFF30 Trunks^000000,";
  1706. mes "^4D4DFF5 Oridecon^000000, and";
  1707. mes "^4D4DFF10 Emveretarcon^000000.";
  1708. next;
  1709. select("Continue");
  1710. if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) {
  1711. mes "^3355FFYou will need Trunks to";
  1712. mes "repair the support frame,";
  1713. mes "Oridecon to enhance the";
  1714. mes "gate's endurance, and";
  1715. mes "Emveretarcon to basically";
  1716. mes "hold everything together.^000000";
  1717. next;
  1718. set .@ro_of01,rand(10,15);
  1719. while(1) {
  1720. if (.@ro_of02 == .@ro_of01) {
  1721. break;
  1722. }
  1723. else {
  1724. switch(rand(1,4)) {
  1725. case 1:
  1726. mes "^3355FFThe support frame";
  1727. mes "is badly damaged:";
  1728. mes "fixing this part";
  1729. mes "is a top priority.^000000";
  1730. next;
  1731. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1732. case 1:
  1733. mes "^3355FFThe frame has been";
  1734. mes "reinforced with wood.^000000";
  1735. set .@rp_temp,.@rp_temp + 1;
  1736. set .@ro_of02,.@ro_of02 + 1;
  1737. specialeffect2 EF_REPAIRWEAPON;
  1738. next;
  1739. break;
  1740. case 2:
  1741. mes "^3355FFYou tried using steel,";
  1742. mes "but it's not working very";
  1743. mes "well. You'll have to try";
  1744. mes "something else.^000000";
  1745. close;
  1746. case 3:
  1747. mes "^3355FFYou tried using emveretarcon";
  1748. mes "to reinforce the gate, but it's";
  1749. mes "not working well at all.";
  1750. mes "You'll have to start over.^000000";
  1751. close;
  1752. case 4:
  1753. mes "^3355FFYou tried using oridecon,";
  1754. mes "but it's not working very";
  1755. mes "well. You'll have to try";
  1756. mes "something else.^000000";
  1757. close;
  1758. }
  1759. break;
  1760. case 2:
  1761. mes "^3355FFIt looks like the gate's";
  1762. mes "overall endurance needs to";
  1763. mes "be reinforced with something.^000000";
  1764. next;
  1765. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1766. case 1:
  1767. mes "^3355FFYou tried using wood";
  1768. mes "to reinforce the gate.^000000";
  1769. set .@ro_of02,.@ro_of02 + 1;
  1770. next;
  1771. break;
  1772. case 2:
  1773. mes "^3355FFYou tried using steel";
  1774. mes "to reinforce the gate, but";
  1775. mes "it's not working well at all.";
  1776. mes "You'll have to start over.^000000";
  1777. close;
  1778. case 3:
  1779. mes "^3355FFYou tried using emveretarcon";
  1780. mes "to reinforce the gate, but it's";
  1781. mes "not working well at all.";
  1782. mes "You'll have to start over.^000000";
  1783. close;
  1784. case 4:
  1785. mes "^3355FFYou hammered the";
  1786. mes "oridecon: it looks";
  1787. mes "like this will work.^000000";
  1788. set .@rp_temp,.@rp_temp + 1;
  1789. set .@ro_of02,.@ro_of02 + 1;
  1790. specialeffect2 EF_REPAIRWEAPON;
  1791. next;
  1792. break;
  1793. }
  1794. break;
  1795. case 3:
  1796. mes "^3355FFThe damage to the gate";
  1797. mes "has caused all these";
  1798. mes "cracks. You'll have to";
  1799. mes "weld them solid somehow.^000000";
  1800. next;
  1801. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1802. case 1:
  1803. mes "^3355FFYou tried using wood to fix";
  1804. mes "this problem, but it seems";
  1805. mes "to have made it worse.";
  1806. mes "You'll have to start all over.^000000";
  1807. close;
  1808. case 2:
  1809. mes "^3355FFYou used steel to weld";
  1810. mes "all the cracks: the gate is";
  1811. mes "is starting to look more solid.^000000";
  1812. set .@rp_temp,.@rp_temp + 1;
  1813. set .@ro_of02,.@ro_of02 + 1;
  1814. specialeffect2 EF_REPAIRWEAPON;
  1815. next;
  1816. break;
  1817. case 3:
  1818. mes "^3355FFYou tried using emveretarcon";
  1819. mes "to reinforce the gate, but it's";
  1820. mes "not working well at all.";
  1821. mes "You'll have to start over.^000000";
  1822. close;
  1823. case 4:
  1824. mes "^3355FFYou tried using oridecon,";
  1825. mes "but it's not working very";
  1826. mes "well. You'll have to try";
  1827. mes "something else.^000000";
  1828. close;
  1829. }
  1830. break;
  1831. case 4:
  1832. mes "^3355FFNow you need to make";
  1833. mes "sure that the gate is held";
  1834. mes "together pretty solidly.^000000";
  1835. next;
  1836. switch(select("Trunk:Steel:Emveretarcon:Oridecon")) {
  1837. case 1:
  1838. mes "^3355FFYou tried using wood to fix";
  1839. mes "this problem, but it seems";
  1840. mes "to have made it worse.";
  1841. mes "You'll have to start all over.^000000";
  1842. close;
  1843. case 2:
  1844. mes "^3355FFYou tried using steel,";
  1845. mes "but it's not working very";
  1846. mes "well. You'll have to try";
  1847. mes "something else.^000000";
  1848. close;
  1849. case 3:
  1850. mes "^3355FFYou successfully used";
  1851. mes "the emveretarcon to repair";
  1852. mes "much of the gate's damage.^000000";
  1853. set .@rp_temp,.@rp_temp + 1;
  1854. set .@ro_of02,.@ro_of02 + 1;
  1855. specialeffect2 EF_REPAIRWEAPON;
  1856. next;
  1857. break;
  1858. case 4:
  1859. mes "^3355FFYou tried using oridecon,";
  1860. mes "but it's not working very";
  1861. mes "well. You'll have to try";
  1862. mes "something else.^000000";
  1863. close;
  1864. }
  1865. }
  1866. }
  1867. }
  1868. mes "^3355FFWell, it looks like";
  1869. mes "you're just about done";
  1870. mes "with repairing the gate.^000000";
  1871. next;
  1872. if (agitcheck2() == 0) {
  1873. mes "^3355FFUnfortunately, the Fortress";
  1874. mes "Gate can't be reconstructed:";
  1875. mes "the Emperium is no longer here.^000000";
  1876. close;
  1877. }
  1878. else {
  1879. if (.@rp_temp == .@ro_of01) {
  1880. mes "^3355FFThe Fortress Gate has";
  1881. mes "been successfully repaired!^000000";
  1882. delitem 1019,30; //Wooden_Block
  1883. delitem 999,10; //Steel
  1884. delitem 1011,10; //Emveretarcon
  1885. delitem 984,5; //Oridecon
  1886. close2;
  1887. donpcevent "#sch02_RL03::OnEnable";
  1888. disablenpc "Control Device03#sch02";
  1889. mapannounce "schg_cas02","The 3rd Fortress Gate has been reconstructed!!",bc_map,"0x00ff00";
  1890. setarray $agit_sc02[4],0;
  1891. setarray $agit_sc02[3],2;
  1892. donpcevent "Control Device02#sch02::OnEnable";
  1893. end;
  1894. }
  1895. else {
  1896. mes "^3355FFThe wall has been breached,";
  1897. mes "and the attempt to repair the";
  1898. mes "Fortress Gate has failed.";
  1899. mes "You lost some of your";
  1900. mes "repair resources...^000000";
  1901. delitem 984,2; //Oridecon
  1902. delitem 999,4; //Steel
  1903. delitem 1019,14; //Wooden_Block
  1904. delitem 1011,3; //Emveretarcon
  1905. close;
  1906. }
  1907. }
  1908. }
  1909. else {
  1910. mes "^3355FFYou can't attempt to repair";
  1911. mes "the Fortress Gate if you don't";
  1912. mes "have all the needed materials.^000000";
  1913. close;
  1914. }
  1915. }
  1916. }
  1917. }
  1918. end;
  1919. OnInit:
  1920. disablenpc "Control Device03#sch02";
  1921. end;
  1922. OnEnable:
  1923. enablenpc "Control Device03#sch02";
  1924. end;
  1925. OnDisable:
  1926. disablenpc "Control Device03#sch02";
  1927. end;
  1928. }
  1929. // Link Flags
  1930. schg_cas02,143,198,0 script LF-01#schg_cas02 111,{
  1931. set .@GID, GetCastleData("schg_cas02",1);
  1932. if (getcharid(2) == .@GID) {
  1933. mes "^3355FFThis is the Stronghold";
  1934. mes "Teleport Service. Please";
  1935. mes "choose a destination";
  1936. mes "within the stronghold.^000000";
  1937. switch(select("First Gate House:Second Gate House:Cancel")) {
  1938. case 1:
  1939. warp "schg_cas02",235,44;
  1940. end;
  1941. case 2:
  1942. warp "schg_cas02",302,233;
  1943. end;
  1944. case 3:
  1945. close;
  1946. }
  1947. }
  1948. end;
  1949. }
  1950. schg_cas02,143,202,0 script LF-02#schg_cas02 111,{
  1951. set .@GID, GetCastleData("schg_cas02",1);
  1952. if (getcharid(2) == .@GID) {
  1953. mes "^3355FFThis is the Stronghold";
  1954. mes "Teleport Service. Please";
  1955. mes "choose a destination";
  1956. mes "within the stronghold.^000000";
  1957. switch(select("Defense area 1-1:Defense area 1-2:Cancel")) {
  1958. case 1:
  1959. warp "schg_cas02",317,83;
  1960. end;
  1961. case 2:
  1962. warp "schg_cas02",359,83;
  1963. end;
  1964. case 3:
  1965. close;
  1966. }
  1967. }
  1968. end;
  1969. }
  1970. schg_cas02,143,206,0 script LF-03#schg_cas02 111,{
  1971. set .@GID, GetCastleData("schg_cas02",1);
  1972. if (getcharid(2) == .@GID) {
  1973. mes "^3355FFThis is the Stronghold";
  1974. mes "Teleport Service. Please";
  1975. mes "choose a destination";
  1976. mes "within the stronghold.^000000";
  1977. switch(select("Defense area 2-1:Defense area 2-2:Cancel")) {
  1978. case 1:
  1979. warp "schg_cas02",283,79;
  1980. end;
  1981. case 2:
  1982. warp "schg_cas02",280,122;
  1983. end;
  1984. case 3:
  1985. close;
  1986. }
  1987. }
  1988. end;
  1989. }
  1990. schg_cas02,145,208,0 script LF-04#schg_cas02 111,{
  1991. set .@GID, GetCastleData("schg_cas02",1);
  1992. if (getcharid(2) == .@GID) {
  1993. mes "^3355FFThis is the Stronghold";
  1994. mes "Teleport Service. Please";
  1995. mes "choose a destination";
  1996. mes "within the stronghold.^000000";
  1997. switch(select("Defense area 3-1:Defense area 3-2:Cancel")) {
  1998. case 1:
  1999. warp "schg_cas02",215,110;
  2000. end;
  2001. case 2:
  2002. warp "schg_cas02",255,215;
  2003. end;
  2004. case 3:
  2005. close;
  2006. }
  2007. }
  2008. end;
  2009. }
  2010. schg_cas02,180,208,0 script LF-05#schg_cas02 111,{
  2011. set .@GID, GetCastleData("schg_cas02",1);
  2012. if (getcharid(2) == .@GID) {
  2013. mes "^3355FFThis is the Stronghold";
  2014. mes "Teleport Service. Please";
  2015. mes "choose a destination";
  2016. mes "within the stronghold.^000000";
  2017. switch(select("Center 1 Area:Center 2 Area:Cancel")) {
  2018. case 1:
  2019. warp "schg_cas02",338,153;
  2020. end;
  2021. case 2:
  2022. warp "schg_cas02",213,226;
  2023. end;
  2024. case 3:
  2025. close;
  2026. }
  2027. }
  2028. end;
  2029. }
  2030. schg_cas02,182,206,0 script LF-06#schg_cas02 111,{
  2031. set .@GID, GetCastleData("schg_cas02",1);
  2032. if (getcharid(2) == .@GID) {
  2033. mes "^3355FFThis is the Stronghold";
  2034. mes "Teleport Service. Please";
  2035. mes "choose a destination";
  2036. mes "within the stronghold.^000000";
  2037. switch(select("Defense area 1-1:Defense area 2-1:Defense area 3-1:Cancel")) {
  2038. case 1:
  2039. warp "schg_cas02",317,83;
  2040. end;
  2041. case 2:
  2042. warp "schg_cas02",283,79;
  2043. end;
  2044. case 3:
  2045. warp "schg_cas02",215,110;
  2046. end;
  2047. case 4:
  2048. close;
  2049. }
  2050. }
  2051. end;
  2052. }
  2053. schg_cas02,182,202,0 script LF-07#schg_cas02 111,{
  2054. set .@GID, GetCastleData("schg_cas02",1);
  2055. if (getcharid(2) == .@GID) {
  2056. mes "^3355FFThis is the Stronghold";
  2057. mes "Teleport Service. Please";
  2058. mes "choose a destination";
  2059. mes "within the stronghold.^000000";
  2060. switch(select("Area 1-2:Area 2-2:Area 3-2:Cancel")) {
  2061. case 1:
  2062. warp "schg_cas02",359,83;
  2063. end;
  2064. case 2:
  2065. warp "schg_cas02",280,122;
  2066. end;
  2067. case 3:
  2068. warp "schg_cas02",255,215;
  2069. end;
  2070. case 4:
  2071. close;
  2072. }
  2073. }
  2074. end;
  2075. }
  2076. schg_cas02,182,198,0 script LF-08#schg_cas02 111,{
  2077. set .@GID, GetCastleData("schg_cas02",1);
  2078. if (getcharid(2) == .@GID) {
  2079. mes "^3355FFThis is the Stronghold";
  2080. mes "Teleport Service. Would";
  2081. mes "you like to teleport to the";
  2082. mes "Convenience Facility for";
  2083. mes "guild members?^000000";
  2084. switch(select("Go to Convenience Facility:Cancel")) {
  2085. case 1:
  2086. warp "schg_cas02",101,306;
  2087. end;
  2088. case 2:
  2089. close;
  2090. }
  2091. }
  2092. end;
  2093. }
  2094. schg_cas02,235,222,0 script Andlangr#LF_sc02_1::LF_sc02_1 111,{
  2095. set .@GID, GetCastleData("schg_cas02",1);
  2096. if (getcharid(2) == .@GID) {
  2097. mes "^3355FFThis is the Stronghold";
  2098. mes "Teleport Service. Would";
  2099. mes "you like to teleport to";
  2100. mes "the Emperium Center?^000000";
  2101. switch(select("Teleport:Cancel")) {
  2102. case 1:
  2103. warp "schg_cas02",136,188;
  2104. end;
  2105. case 2:
  2106. close;
  2107. }
  2108. }
  2109. end;
  2110. }
  2111. schg_cas02,157,136,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_2 111
  2112. schg_cas02,168,136,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_3 111
  2113. schg_cas02,320,232,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_4 111
  2114. schg_cas02,295,109,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_5 111
  2115. schg_cas02,295,92,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_6 111
  2116. schg_cas02,285,90,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_7 111
  2117. schg_cas02,285,190,4 duplicate(LF_sc02_1) Andlangr#LF_sc02_8 111
  2118. schg_cas02,238,66,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_9 111
  2119. schg_cas02,230,45,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_10 111
  2120. schg_cas02,233,120,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_11 111
  2121. schg_cas02,247,120,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_12 111
  2122. schg_cas02,261,162,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_13 111
  2123. schg_cas02,244,162,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_14 111
  2124. schg_cas02,235,207,0 duplicate(LF_sc02_1) Andlangr#LF_sc02_15 111
  2125. // Guild Manager
  2126. schg_cas02,105,378,3 script Steward#sch02 55,{
  2127. set .@GID, GetCastleData("schg_cas02",1);
  2128. if (.@GID == 0) {
  2129. mes "[ Steward ]";
  2130. mes "I await for the master";
  2131. mes "whom destiny will choose";
  2132. mes "for me. Do you think you";
  2133. mes "have to courage and strength";
  2134. mes "to conquer this stronghold?";
  2135. close;
  2136. }
  2137. if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
  2138. mes "[ Steward ]";
  2139. mes "Hmpf. Your threats don't";
  2140. mes "scare me! Guardians, drive";
  2141. mes "this infidel away from here!";
  2142. mes "I will always be loyal to the";
  2143. mes "master of this stronghold,";
  2144. mes "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000.";
  2145. close;
  2146. }
  2147. mes "[ Steward ]";
  2148. mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
  2149. mes "How shall I serve you today?";
  2150. mes "Was there an aspect of this";
  2151. mes "stronghold's maintenance";
  2152. mes "you wanted to discuss?";
  2153. next;
  2154. switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
  2155. case 1:
  2156. mes "[ Steward ]";
  2157. mes "The Commercial Growth";
  2158. mes "Level of the stronghold is ^0000ff" + GetCastleData("schg_cas02",2) + ".";
  2159. if (GetCastleData("schg_cas02",4) > 0) {
  2160. mes "Last time, you invested in";
  2161. mes "Commercial Growth " + GetCastleData("schg_cas02",4) + ".";
  2162. }
  2163. next;
  2164. mes "[ Steward ]";
  2165. mes "Our stronghold's";
  2166. mes "safeguard level is " + GetCastleData("schg_cas02",3) + ".";
  2167. if (GetCastleData("schg_cas02",5) > 0) {
  2168. mes "Last time, you invested";
  2169. mes "in defense " + GetCastleData("schg_cas02",5) + " times.";
  2170. }
  2171. mes " ";
  2172. mes "That is all, master.";
  2173. close;
  2174. case 2:
  2175. set .@Economy,GetCastleData("schg_cas02",2);
  2176. if (.@Economy < 6) { set .@eco_invest,5000; }
  2177. else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; }
  2178. else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; }
  2179. else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; }
  2180. else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; }
  2181. else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; }
  2182. else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; }
  2183. else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; }
  2184. else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; }
  2185. else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; }
  2186. else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; }
  2187. else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; }
  2188. else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; }
  2189. else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; }
  2190. else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; }
  2191. else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; }
  2192. else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; }
  2193. else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; }
  2194. else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; }
  2195. else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; }
  2196. //Quadruple the cost of investing if you've already invested once.
  2197. if (GetCastleData("schg_cas02",4)) {
  2198. set .@eco_invest,.@eco_invest*4;
  2199. }
  2200. mes "[ Steward ]";
  2201. mes "Raising the stronghold's";
  2202. mes "commercial growth will";
  2203. mes "increase the quantity of";
  2204. mes "goods produced for the guild.";
  2205. mes "Investing in commercial growth";
  2206. mes "will help the guild's future.";
  2207. next;
  2208. mes "[ Steward ]";
  2209. mes "You can make one investment";
  2210. mes "each day, but if you can make";
  2211. mes "two investments if you pay";
  2212. mes "more zeny: this will speed";
  2213. mes "up commercial development,";
  2214. mes "but can be quite expensive.";
  2215. next;
  2216. if (.@Economy == 100) {
  2217. mes "[ Steward ]";
  2218. mes "However, our stronghold's";
  2219. mes "commerical growth level is";
  2220. mes "at 100%. It's not possible to";
  2221. mes "develop commercial growth";
  2222. mes "any further than that.";
  2223. close;
  2224. }
  2225. if (GetCastleData("schg_cas02",4) == 2) {
  2226. mes "[ Steward ]";
  2227. mes "You've already made two";
  2228. mes "investments today, so you'll";
  2229. mes "have to wait until tomorrow";
  2230. mes "to make another investment.";
  2231. close;
  2232. }
  2233. if (GetCastleData("schg_cas02",4) == 0) {
  2234. mes "[ Steward ]";
  2235. mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
  2236. mes "to make an investment";
  2237. mes "Will you invest in this";
  2238. mes "stronghold's commerical";
  2239. mes "development now?";
  2240. }
  2241. else {
  2242. mes "[ Steward ]";
  2243. mes "You must pay ^FF0000" + .@eco_invest + "^000000";
  2244. mes "more zeny to make a second";
  2245. mes "investment today. Will you";
  2246. mes "invest one more time?";
  2247. }
  2248. next;
  2249. switch(select("Invest in Commercial Growth:Cancel")) {
  2250. case 1:
  2251. if (Zeny < .@eco_invest) {
  2252. mes "[ Steward ]";
  2253. mes "I'm sorry, Master, but";
  2254. mes "you do not have enough";
  2255. mes "zeny to make an investment";
  2256. mes "for the guild today.";
  2257. close;
  2258. }
  2259. set zeny,zeny-.@eco_invest;
  2260. SetCastleData "schg_cas02",4,GetCastleData("schg_cas02",4)+1;
  2261. mes "[ Steward ]";
  2262. mes "A wise use of the guild's";
  2263. mes "funds, Master. We can expect";
  2264. mes "to see the results of this";
  2265. mes "investment by tomorrow.";
  2266. close;
  2267. case 2:
  2268. mes "[ Steward ]";
  2269. mes "As you command, Master.";
  2270. close;
  2271. }
  2272. case 3:
  2273. set .@Defence,GetCastleData("schg_cas02",3);
  2274. if (.@Defence < 6) { set .@def_invest,10000; }
  2275. else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; }
  2276. else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; }
  2277. else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; }
  2278. else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; }
  2279. else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; }
  2280. else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; }
  2281. else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; }
  2282. else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; }
  2283. else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; }
  2284. else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; }
  2285. else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; }
  2286. else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; }
  2287. else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; }
  2288. else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; }
  2289. else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; }
  2290. else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; }
  2291. else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; }
  2292. else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; }
  2293. else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; }
  2294. //Quadruple the cost of investing if you've already invested once.
  2295. if (GetCastleData("schg_cas02",5)) {
  2296. set .@def_invest,.@def_invest*4;
  2297. }
  2298. mes "[ Steward ]";
  2299. mes "Investing in our stronghold's";
  2300. mes "defense will enhance the";
  2301. mes "durability of our Guardians";
  2302. mes "and the Emperium. We'll need";
  2303. mes "every advantage to protect";
  2304. mes "ourselves from our enemies.";
  2305. next;
  2306. mes "[ Steward ]";
  2307. mes "You can invest in defense";
  2308. mes "once per day, but if you pay";
  2309. mes "more zeny, you can invest";
  2310. mes "a maximum of two times daily.";
  2311. next;
  2312. mes "[ Steward ]";
  2313. if (GetCastleData("schg_cas02",3) == 100) {
  2314. mes "The Defense Level of this";
  2315. mes "stronghold is 100%, and";
  2316. mes "cannot be increased further.";
  2317. close;
  2318. }
  2319. if (GetCastleData("schg_cas02",5) == 2) {
  2320. mes "Master, you've already";
  2321. mes "invested in Defense twice";
  2322. mes "today. You'll need to wait";
  2323. mes "until tomorrow if you really";
  2324. mes "want to increase our defenses.";
  2325. close;
  2326. }
  2327. if (GetCastleData("schg_cas02",5) == 0) {
  2328. mes "We need ^FF0000" + .@def_invest + "^000000";
  2329. mes "zeny to invest in our";
  2330. mes "stronghold's defenses.";
  2331. mes "Will you invest now?";
  2332. }
  2333. else {
  2334. mes "We need ^FF0000" + .@def_invest + "^000000";
  2335. mes "zeny to invest in our";
  2336. mes "stronghold's defenses";
  2337. mes "a second time today.";
  2338. mes "Will you invest now?";
  2339. }
  2340. next;
  2341. switch(select("Invest in Defense:Cancel")) {
  2342. case 1:
  2343. if (Zeny < .@def_invest) {
  2344. mes "[ Steward ]";
  2345. mes "I'm sorry, Master, but";
  2346. mes "you do not have enough";
  2347. mes "zeny to make an investment";
  2348. mes "for the guild today.";
  2349. close;
  2350. }
  2351. set zeny,zeny-.@def_invest;
  2352. SetCastleData "schg_cas02",5,GetCastleData("schg_cas02",5)+1;
  2353. mes "[ Steward ]";
  2354. mes "A wise use of the guild's";
  2355. mes "funds, Master. Increasing";
  2356. mes "the frequency of treasure";
  2357. mes "procured by the guild will";
  2358. mes "definitely help us all.";
  2359. close;
  2360. case 2:
  2361. mes "[ Steward ]";
  2362. mes "As you command, Master.";
  2363. close;
  2364. }
  2365. case 4:
  2366. if (GetCastleData("schg_cas02",9) == 1) {
  2367. mes "[ Steward ]";
  2368. mes "Do you wish to dismiss";
  2369. mes "the Kafra Employee that";
  2370. mes "we've hired for the guild?";
  2371. next;
  2372. switch(select("Dismiss:Cancel")) {
  2373. case 1:
  2374. cutin "kafra_01",2;
  2375. mes "[ Hired Kafra Employee ]";
  2376. mes "Master, please reconsider!";
  2377. mes "I've been working very hard";
  2378. mes "for the success of the guild!";
  2379. mes "I'll try harder to serve the";
  2380. mes "guild members of this";
  2381. mes "stronghold, I promise!";
  2382. next;
  2383. switch(select("Dismiss:Cancel")) {
  2384. case 1:
  2385. mes "[ Hired Kafra Employee ]";
  2386. mes "Why?! What have I done";
  2387. mes "to deserve this? Waaah~!";
  2388. next;
  2389. cutin "kafra_01",255;
  2390. break;
  2391. case 2:
  2392. mes "[ Hired Kafra Employee ]";
  2393. mes "Thank you, Master!";
  2394. mes "I'll obey your every";
  2395. mes "command as best I can!";
  2396. mes "You won't regret this!";
  2397. close;
  2398. }
  2399. break;
  2400. case 2:
  2401. mes "[ Steward ]";
  2402. mes "She works very hard,";
  2403. mes "in my opinion. It was in";
  2404. mes "all of our best interests to";
  2405. mes "allow her to stay with us.";
  2406. close;
  2407. }
  2408. disablenpc "Kafra Employee#sch02";
  2409. SetCastleData "schg_cas02",9,0;
  2410. mes "[ Steward ]";
  2411. mes "That Kafra Employee";
  2412. mes "has been dismissed.";
  2413. mes "Were really dissatisfied";
  2414. mes "by the quality of her service?";
  2415. close;
  2416. }
  2417. else {
  2418. mes "[ Steward ]";
  2419. mes "Will you hire a";
  2420. mes "Kafra Employee to serve";
  2421. mes "our stronghold? You must";
  2422. mes "pay ^FF000010,000 zeny^000000 to hire one.";
  2423. next;
  2424. switch(select("Hire:Cancel")) {
  2425. case 1:
  2426. if (getgdskilllv(.@GID,10001) == 0) {
  2427. mes "[ Steward ]";
  2428. mes "Master, we cannot hire a";
  2429. mes "Kafra Employee because";
  2430. mes "you have not yet attained";
  2431. mes "the ^FF0000Contract with Kafra^000000";
  2432. mes "guild skill.";
  2433. close;
  2434. }
  2435. if (Zeny < 10000) {
  2436. mes "[ Steward ]";
  2437. mes "Master, we cannot hire a";
  2438. mes "Kafra Employee because";
  2439. mes "we do not have enough";
  2440. mes "funds to pay the contract fee.";
  2441. close;
  2442. }
  2443. set zeny,zeny-10000;
  2444. enablenpc "Kafra Employee#sch02";
  2445. SetCastleData "schg_cas02",9,1;
  2446. mes "[ Steward ]";
  2447. mes "Very well. We have formed";
  2448. mes "a contract with the Kafra";
  2449. mes "Head Office, and hired a";
  2450. mes "Kafra Employee for our";
  2451. mes "stronghold. Here she is~";
  2452. next;
  2453. cutin "kafra_01",2;
  2454. mes "[ Hired Kafra Employee ]";
  2455. mes "How do you do? I've";
  2456. mes "been dispatched by the";
  2457. mes "Kafra Head Office to";
  2458. mes "serve your guild's needs.";
  2459. mes "I'll do my best to follow";
  2460. mes "your every command, Master.";
  2461. next;
  2462. cutin "kafra_01",255;
  2463. mes "[ Steward ]";
  2464. mes "Our contract will expire";
  2465. mes "after one month, so we must";
  2466. mes "pay additional fees to keep";
  2467. mes "this Kafra Employee in";
  2468. mes "the service of our guild.";
  2469. close;
  2470. case 2:
  2471. mes "[ Steward ]";
  2472. mes "As you command, Master.";
  2473. mes "However, I suggest hiring";
  2474. mes "a Kafra Employee as soon";
  2475. mes "as possible since our guild";
  2476. mes "would greatly benefit from";
  2477. mes "the convenient Kafra services.";
  2478. close;
  2479. }
  2480. }
  2481. case 5:
  2482. mes "[ Steward ]";
  2483. mes "Do you wish to enter the";
  2484. mes "Guild Treasure Room?";
  2485. mes "Only you, the Guild Master,";
  2486. mes "are permitted to enter.";
  2487. next;
  2488. mes "[ Steward ]";
  2489. mes "Please remember to open";
  2490. mes "the Treasure Boxes at the";
  2491. mes "proper time. Otherwise, the";
  2492. mes "treasure may disappear if";
  2493. mes "something unexpected happens.";
  2494. next;
  2495. switch(select("Go to Treasure Room:Cancel")) {
  2496. case 1:
  2497. mes "[ Steward ]";
  2498. mes "Allow me to guide you";
  2499. mes "on the secret path to";
  2500. mes "the Treasure Room.";
  2501. mes "Press the secret switch";
  2502. mes "when you wish to return here.";
  2503. close2;
  2504. warp "schg_cas02",249,373;
  2505. end;
  2506. case 2:
  2507. mes "[ Steward ]";
  2508. mes "Items in the Treasure Room";
  2509. mes "are produced once each day.";
  2510. mes "Therefore, you must obtain";
  2511. mes "the treasure items everyday.";
  2512. mes "For the sake of the guild,";
  2513. mes "prioritize treasure harvesting!";
  2514. close;
  2515. }
  2516. }
  2517. Onstop:
  2518. stopnpctimer;
  2519. end;
  2520. OnStartArena:
  2521. set .@GID,getcharid(2);
  2522. // Lower castle Economy
  2523. set .@Economy,GetCastleData("schg_cas02",2) - 5;
  2524. if (.@Economy < 0) set .@Economy, 0;
  2525. SetCastleData "schg_cas02", 2, .@Economy;
  2526. // Lower Castle Defence
  2527. set .@Defence,GetCastleData("schg_cas02",3) - 5;
  2528. if (.@Defence < 0) set .@Defence, 0;
  2529. SetCastleData "schg_cas02", 3, .@Defence;
  2530. // Set new owner
  2531. SetCastleData "schg_cas02",1, .@GID;
  2532. // Clear castle's data.
  2533. for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
  2534. SetCastleData "schg_cas02", .@i, 0;
  2535. // Disable Kafra
  2536. disablenpc "Kafra Employee#sch02";
  2537. set .msg,2;
  2538. if (.msg == 1) {
  2539. announce "Fortress [" + GetCastleName("schg_cas02") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2540. donpcevent "Manager#sch02_02::Onstart";
  2541. }
  2542. else if (.msg == 2) {
  2543. announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 2] stronghold of "+GetCastleName("schg_cas02"),bc_all|bc_woe;
  2544. mapannounce "schg_cas02","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2545. if (agitcheck2()) {
  2546. donpcevent "Manager#sch02_02::Onreset";
  2547. initnpctimer;
  2548. }
  2549. else {
  2550. donpcevent "Manager#sch02_02::Onreset";
  2551. stopnpctimer;
  2552. }
  2553. }
  2554. else if (.msg == 0) {
  2555. announce "Fortress [" + GetCastleName("schg_cas02") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2556. donpcevent "Manager#sch02_02::Onreset";
  2557. stopnpctimer;
  2558. end;
  2559. }
  2560. MapRespawnGuildID "schg_cas02",GetCastleData("schg_cas02",1),2;
  2561. GetCastleData "schg_cas02",0,"::OnRecvCastlesc02";
  2562. end;
  2563. OnTimer10000:
  2564. donpcevent "Manager#sch02_02::Onchange";
  2565. mapannounce "schg_cas02","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2566. end;
  2567. }
  2568. // Guild Kafra
  2569. schg_cas02,131,365,3 script Kafra Employee#sch02 117,{
  2570. cutin "kafra_01",2;
  2571. set .@GID, GetCastleData("schg_cas02",1);
  2572. if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
  2573. mes "[Kafra Employee]";
  2574. mes "Welcome, proud member";
  2575. mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
  2576. mes "The Kafra Corporation is ready";
  2577. mes "to assist you wherever you go!";
  2578. next;
  2579. switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
  2580. case 1:
  2581. if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
  2582. mes "[Kafra Employee]";
  2583. mes "I'm so sorry, but you must";
  2584. mes "have at least Novice Skill";
  2585. mes "Lv.6 to use the Storage.";
  2586. }
  2587. else {
  2588. openstorage;
  2589. }
  2590. break;
  2591. case 2:
  2592. mes "[Kafra Employee]";
  2593. mes "Please tell me your";
  2594. mes "Warp destination.";
  2595. next;
  2596. switch(select("Juno -> 200 z:Cancel")) {
  2597. case 1:
  2598. if (Zeny < 200) {
  2599. mes "[Kafra Employee]";
  2600. mes "I'm sorry, but you don't";
  2601. mes "have enough zeny to pay";
  2602. mes "the warp fee. Would you";
  2603. mes "please check your funds again?";
  2604. close2;
  2605. cutin "kafra_01",255;
  2606. end;
  2607. }
  2608. set zeny,zeny-200;
  2609. warp "yuno",158,125;
  2610. end;
  2611. case 2:
  2612. cutin "kafra_01",255;
  2613. }
  2614. break;
  2615. case 3:
  2616. if (BaseClass != Job_Merchant) {
  2617. mes "[Kafra Employee]";
  2618. mes "I'm sorry, but the Pushcart";
  2619. mes "rental service can only be";
  2620. mes "used by Merchant, Blacksmith,";
  2621. mes "and Alchemist class characters.";
  2622. }
  2623. else if (checkcart() == 1) {
  2624. mes "[Kafra Employee]";
  2625. mes "Hm? You've already";
  2626. mes "rented a Pushcart.";
  2627. }
  2628. else {
  2629. mes "[Kafra Employee]";
  2630. mes "The Pushcart rental fee";
  2631. mes "is 800 zeny. Would you";
  2632. mes "like to rent a Pushcart?";
  2633. next;
  2634. switch(select("Rent Pushcart:Cancel")) {
  2635. case 1:
  2636. if (Zeny < 800) {
  2637. mes "[Kafra Employee]";
  2638. mes "I'm sorry, but you don't";
  2639. mes "have enough zeny to rent";
  2640. mes "one of our Pushcarts.";
  2641. close2;
  2642. cutin "kafra_01",255;
  2643. end;
  2644. }
  2645. set zeny,zeny-800;
  2646. setcart;
  2647. break;
  2648. case 2:
  2649. break;
  2650. }
  2651. }
  2652. break;
  2653. case 4:
  2654. mes "[Kafra Employee]";
  2655. mes "Thank you for using the";
  2656. mes "Kafra Service. Wherever";
  2657. mes "you go, Kafra will be";
  2658. mes "there to support you!";
  2659. close2;
  2660. cutin "kafra_01",255;
  2661. end;
  2662. }
  2663. close2;
  2664. cutin "kafra_01",255;
  2665. end;
  2666. }
  2667. else {
  2668. mes "[Kafra Employee]";
  2669. mes "I'm sorry, but I've been";
  2670. mes "exclusively contracted";
  2671. mes "to the members of the";
  2672. mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2673. mes "You'll have to ask another";
  2674. mes "Kafra Employee to help you...";
  2675. close2;
  2676. cutin "kafra_01",255;
  2677. end;
  2678. }
  2679. OnRecvCastlesc02:
  2680. if (GetCastleData("schg_cas02",1) == 0) {
  2681. monster "schg_cas02",0,0,"Evil Druid",1117,10;
  2682. monster "schg_cas02",0,0,"Khalitzburg",1132,4;
  2683. monster "schg_cas02",0,0,"Abysmal Knight",1219,3;
  2684. monster "schg_cas02",0,0,"Executioner",1205,1;
  2685. monster "schg_cas02",0,0,"Penomena",1216,10;
  2686. monster "schg_cas02",0,0,"Alarm",1193,18;
  2687. monster "schg_cas02",0,0,"Clock",1269,9;
  2688. monster "schg_cas02",0,0,"Raydric Archer",1276,12;
  2689. monster "schg_cas02",0,0,"Wanderer",1208,3;
  2690. monster "schg_cas02",0,0,"Alice",1275,1;
  2691. monster "schg_cas02",0,0,"Bloody Knight",1268,2;
  2692. monster "schg_cas02",0,0,"Dark Lord",1272,2;
  2693. monster "schg_cas02",0,0,"Tower Keeper",1270,4;
  2694. }
  2695. if (GetCastleData("schg_cas02",9) < 1) {
  2696. disablenpc "Kafra Employee#sch02";
  2697. }
  2698. end;
  2699. }
  2700. schg_cas02,257,369,0 script #sc02_switch 111,{
  2701. mes " ";
  2702. mes "^3355FFWill you pull";
  2703. mes "this small lever?^000000";
  2704. next;
  2705. switch(select("Pull Lever:Cancel")) {
  2706. case 1:
  2707. warp "schg_cas02",339,79;
  2708. end;
  2709. case 2:
  2710. close;
  2711. }
  2712. }
  2713. sch_gld,296,247,4 script Andlangr#flag_sc02_1::Sc02_Flag 722,{
  2714. set .@GID, GetCastleData("schg_cas02",1);
  2715. if (.@GID == 0) {
  2716. mes "[ Schwaltzvalt Royal Edict ]";
  2717. mes "The Holy Kingdom of";
  2718. mes "Schwaltzvalt declares that";
  2719. mes "one has yet to claim lordship";
  2720. mes "over this stronghold. The one";
  2721. mes "that breaks the Emperium will";
  2722. mes "be recognized as its new owner.";
  2723. close;
  2724. }
  2725. else {
  2726. if (getcharid(2) == .@GID) {
  2727. mes "[ Ringing Voice ]";
  2728. mes "Courageous one,";
  2729. mes "do you wish to return";
  2730. mes "to your stronghold?";
  2731. next;
  2732. switch(select("Return to the Stronghold:Cancel")) {
  2733. case 1:
  2734. set .@GID, GetCastleData("schg_cas02",1);
  2735. if (getcharid(2) == .@GID) {
  2736. warp "schg_cas02",136,188;
  2737. end;
  2738. }
  2739. close;
  2740. case 2:
  2741. close;
  2742. }
  2743. }
  2744. mes "[ Schwaltzvalt Royal Edict ]";
  2745. mes "The Holy Kingdom of";
  2746. mes "Schwaltzvalt decrees that";
  2747. mes "this stronghold is owned";
  2748. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2749. next;
  2750. mes "[ Schwaltzvalt Royal Edict ]";
  2751. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2752. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2753. mes "Any that object must claim this";
  2754. mes "stronghold through strength of";
  2755. mes "steel and magic during the";
  2756. mes "appointed Guild Siege times.";
  2757. close;
  2758. }
  2759. OnRecvCastlesc02:
  2760. FlagEmblem GetCastleData("schg_cas02",1);
  2761. end;
  2762. }
  2763. sch_gld,280,247,4 duplicate(Sc02_Flag) Andlangr#flag_sc02_2 722