schg_cas04.txt 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917
  1. //===== eAthena Script =======================================
  2. //= War of Emperium Second Edition
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.7
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= WoE SE Schwaltzvalt Castle 4
  11. //===== Additional Comments: =================================
  12. //= 1.0 First Version [L0ne_W0lf]
  13. //= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf]
  14. //= 1.2 Fixed double message in defense investing. [L0ne_W0lf]
  15. //= Corrected a minor typo in the guild steward.
  16. //= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf]
  17. //= 1.4 Fixed investment period not resetting. [L0ne_W0lf]
  18. //= Made it so treasure won't spawn if castle is empty.
  19. //= Treasure will now be killed before spawning.
  20. //= 1.5 Replaced effect numerics with constants. [L0ne_W0lf]
  21. //= 1.6 Applied updated eco/def systems. [L0ne_W0lf]
  22. //= 1.7 Fixed eco/def not actually incrementing. [L0ne_W0lf]
  23. //= Can no longer gain eco/def higher than 100.
  24. //============================================================
  25. schg_cas04,1,1,0 script Manager#sch04_02 111,{
  26. end;
  27. OnInterIfInitOnce:
  28. GetCastleData "schg_cas04",0,"::OnRecvCastlesc04";
  29. end;
  30. OnRecvCastlesc04:
  31. RequestGuildInfo GetCastleData("schg_cas04",1);
  32. if (GetCastleData("schg_cas04",1) == 0) {
  33. donpcevent "Manager#sch04_02::Onstart";
  34. }
  35. end;
  36. OnAgitStart2:
  37. if (agitcheck2()) {
  38. MapRespawnGuildID "schg_cas04",GetCastleData("schg_cas04",1),2;
  39. GvgOn "schg_cas04";
  40. donpcevent "Manager#sch04_02::Onstart";
  41. }
  42. else {
  43. donpcevent "#sch04_RL00::OnDisable";
  44. donpcevent "#sch04_RL01::OnDisable";
  45. donpcevent "#sch04_RL02::OnDisable";
  46. donpcevent "#sch04_RL03::OnDisable";
  47. }
  48. end;
  49. OnAgitEnd2:
  50. GvgOff "schg_cas04";
  51. if (GetCastleData("schg_cas04",1)) {
  52. KillMonster "schg_cas04","Steward#sch04::OnStartArena";
  53. donpcevent "Manager#sch04_02::Onreset";
  54. donpcevent "Steward#sch04::Onstop";
  55. }
  56. end;
  57. Onstart:
  58. // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
  59. // Settings for all but Summon Guardians
  60. // 0 = Okay; 1 = Destroyed; 2 = Repairing
  61. // Summon Guardians
  62. // 0 = Do not Summon; 1 = Summon
  63. if (GetCastleData("schg_cas04",1)) {
  64. setarray $agit_sc04[0],0,0,0,0,0,0;
  65. donpcevent "#sch04_df01::OnEnable";
  66. donpcevent "#sch04_df02::OnEnable";
  67. donpcevent "#sch04_RL00::OnEnable";
  68. donpcevent "#sch04_RL01::OnEnable";
  69. donpcevent "#sch04_RL02::OnEnable";
  70. donpcevent "#sch04_RL03::OnEnable";
  71. }
  72. monster "schg_cas04",120,272,"Emperium",1288,1,"Steward#sch04::OnStartArena";
  73. end;
  74. Onreset:
  75. donpcevent "#sch04_df01::OnDisable";
  76. donpcevent "#sch04_df02::OnDisable";
  77. donpcevent "#sch04_gard01::Onreset";
  78. donpcevent "#sch04_gard02::Onreset";
  79. donpcevent "#sch04_RL00::OnDisable";
  80. donpcevent "#sch04_RL01::OnDisable";
  81. donpcevent "#sch04_RL02::OnDisable";
  82. donpcevent "#sch04_RL03::OnDisable";
  83. donpcevent "1st Guardian Stone#sch04::OnDisable";
  84. donpcevent "2nd Guardian Stone#sch04::OnDisable";
  85. donpcevent "Control Device01#sch04::OnDisable";
  86. donpcevent "Control Device02#sch04::OnDisable";
  87. donpcevent "Control Device03#sch04::OnDisable";
  88. if (agitcheck2()) {
  89. setarray $agit_sc04[0],0,0,1,1,1,0;
  90. }
  91. end;
  92. Onchange:
  93. setarray $agit_sc04[0],2,2,1,1,2,0;
  94. monster "schg_cas04",120,272,"Emperium",1288,1,"Steward#sch04::OnStartArena";
  95. donpcevent "Control Device03#sch04::OnEnable";
  96. donpcevent "1st Guardian Stone#sch04::OnEnable";
  97. donpcevent "2nd Guardian Stone#sch04::OnEnable";
  98. end;
  99. OnClock0001:
  100. if (!GetCastleData("schg_cas04",1)) end;
  101. killmonster "schg_cas04","Manager#sch04_02::OnTreasureDied";
  102. if (GetCastleData("schg_cas04",4)) {
  103. set .@Economy,GetCastleData("schg_cas04",2);
  104. SetCastleData "schg_cas04",2,.@Economy + GetCastleData("schg_cas04",4) + (rand(2) && getgdskilllv(.@GID,10014));
  105. if (GetCastleData("schg_cas04",2) > 100) SetCastleData "schg_cas04",2,100;
  106. setcastledata "schg_cas04",4,0;
  107. }
  108. if (GetCastleData("schg_cas04",5)) {
  109. set .@Defence,GetCastleData("schg_cas04",3);
  110. SetCastleData "schg_cas04",3,.@Defence + GetCastleData("schg_cas04",5);
  111. if (GetCastleData("schg_cas04",3) > 100) SetCastleData "schg_cas04",3,100;
  112. setcastledata "schg_cas04",5,0;
  113. }
  114. set .@Treasure,GetCastleData("schg_cas04",2)/5+4;
  115. if (.@Treasure) {
  116. monster "schg_cas04",388,388,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  117. monster "schg_cas04",388,389,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  118. monster "schg_cas04",388,390,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  119. monster "schg_cas04",387,390,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  120. if (.@Treasure < 5) end;
  121. monster "schg_cas04",386,390,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  122. if (.@Treasure < 6) end;
  123. monster "schg_cas04",385,390,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  124. if (.@Treasure < 7) end;
  125. monster "schg_cas04",384,389,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  126. if (.@Treasure < 8) end;
  127. monster "schg_cas04",384,388,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  128. if (.@Treasure < 9) end;
  129. monster "schg_cas04",384,387,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  130. if (.@Treasure < 10) end;
  131. monster "schg_cas04",384,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  132. if (.@Treasure < 11) end;
  133. monster "schg_cas04",384,385,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  134. if (.@Treasure < 12) end;
  135. monster "schg_cas04",384,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  136. if (.@Treasure < 13) end;
  137. monster "schg_cas04",385,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  138. if (.@Treasure < 14) end;
  139. monster "schg_cas04",386,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  140. if (.@Treasure < 15) end;
  141. monster "schg_cas04",387,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  142. if (.@Treasure < 16) end;
  143. monster "schg_cas04",388,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  144. if (.@Treasure < 17) end;
  145. monster "schg_cas04",389,384,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  146. if (.@Treasure < 18) end;
  147. monster "schg_cas04",390,384,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  148. if (.@Treasure < 19) end;
  149. monster "schg_cas04",390,385,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  150. if (.@Treasure < 20) end;
  151. monster "schg_cas04",390,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  152. if (.@Treasure < 21) end;
  153. monster "schg_cas04",389,386,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  154. if (.@Treasure < 22) end;
  155. monster "schg_cas04",388,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  156. if (.@Treasure < 23) end;
  157. monster "schg_cas04",387,286,"Treasure Chest",1941,1,"Manager#sch04_02::OnTreasureDied";
  158. if (.@Treasure < 24) end;
  159. monster "schg_cas04",386,386,"Treasure Chest",1324,1,"Manager#sch04_02::OnTreasureDied";
  160. }
  161. end;
  162. OnTreasureDied:
  163. end;
  164. }
  165. schg_cas04,123,306,3 script Ef#sch04_01 868,{
  166. set .@GID, GetCastleData("schg_cas04",1);
  167. if (.@GID == 0) {
  168. mes "[Ef]";
  169. mes "Great job. Now, all you";
  170. mes "need to do is destroy this";
  171. mes "Emperium to gain ownership";
  172. mes "over this stronghold.";
  173. close;
  174. }
  175. if (getcharid(2) == .@GID) {
  176. if (strcharinfo(0) != getguildmaster(.@GID)) {
  177. mes "[Ef]";
  178. mes "As guardian of this";
  179. mes "stronghold, I answer only";
  180. mes "to the master of the guild";
  181. mes "that controls this place.";
  182. close;
  183. }
  184. else {
  185. if (agitcheck2() == 0) {
  186. mes "[Ef]";
  187. mes "I am Ef, guardian of";
  188. mes "this stronghold. For now,";
  189. mes "all is quiet in this place.";
  190. next;
  191. switch(select("Converse:Cancel")) {
  192. case 1:
  193. mes "[Ef]";
  194. mes "Do you have any questions";
  195. mes "about this stronghold?";
  196. next;
  197. switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) {
  198. case 1:
  199. mes "[Ef]";
  200. mes "There is one Emperium";
  201. mes "and two Guardian Stones in";
  202. mes "each fortress. These stones";
  203. mes "are the first line of defense,";
  204. mes "and must be destroyed before";
  205. mes "enemies can even enter.";
  206. next;
  207. mes "[Ef]";
  208. mes "The stones are located in";
  209. mes "^4D4DFFGate Houses^000000 which must be";
  210. mes "protected to prevent enemies";
  211. mes "from reaching the Emperium.";
  212. mes "Guardian Stones can ^4D4DFFrecall";
  213. mes "your Guardians^000000 for protection.";
  214. next;
  215. mes "[Ef]";
  216. mes "Fortresses with higher levels";
  217. mes "of defense can summon more";
  218. mes "Guardians: this is why it is";
  219. mes "so important for guilds to";
  220. mes "invest in Defense Growth.";
  221. next;
  222. mes "[Ef]";
  223. mes "Guardian Stones that have";
  224. mes "been destroyed can be revived";
  225. mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give";
  226. mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones.";
  227. close;
  228. case 2:
  229. mes "[Ef]";
  230. mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,";
  231. mes "and are protected by extra barricades activated by the Guardian Stones.";
  232. mes "These gates are located in three different parts of the fortress.";
  233. next;
  234. mes "[Ef]";
  235. mes "Barricades are protected by";
  236. mes "Guardian Stones, and are";
  237. mes "restored when the Guardian";
  238. mes "Stones are retrieved. However,";
  239. mes "it is not as easy to restore";
  240. mes "destroyed Fortress Gates.";
  241. next;
  242. mes "[Ef]";
  243. mes "Fortress Gates can only be";
  244. mes "restored when the ^4D4DFFguild";
  245. mes "master of a stronghold";
  246. mes "changes^000000, or if ^4D4DFFrestoration";
  247. mes "is requested by the guild";
  248. mes "master of the stronghold^000000.";
  249. close;
  250. case 3:
  251. mes "[Ef]";
  252. mes "Strongholds have many";
  253. mes "Link Flags that allow you";
  254. mes "to access vital areas within";
  255. mes "restrictions placed by the";
  256. mes "Barricades. Usually, ^4D4DFFFlag 1";
  257. mes "links to the Gate House^000000.";
  258. next;
  259. mes "[Ef]";
  260. mes "Many flags link directly to";
  261. mes "the flag near the Emperium.";
  262. mes "The final numbered flag is";
  263. mes "linked to the Convenience";
  264. mes "Facility of the stronghold's";
  265. mes "owner. Keep this in mind.";
  266. close;
  267. case 4:
  268. mes "[Ef]";
  269. mes "Strategy? It would be better";
  270. mes "to develop your battle plan to";
  271. mes "exploit your guild's advantages";
  272. mes "and your enemies' weaknesses.";
  273. mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
  274. close;
  275. case 5:
  276. mes "[Ef]";
  277. mes "You have no questions";
  278. mes "to ask of me? Well, I'm";
  279. mes "here to serve your needs.";
  280. close;
  281. }
  282. case 2:
  283. mes "[Ef]";
  284. mes "I'm always here, so";
  285. mes "feel free to request my";
  286. mes "assistance whenever";
  287. mes "the need arises.";
  288. close;
  289. }
  290. }
  291. else {
  292. mes "[Ef]";
  293. mes "Greetings, "+strcharinfo(0)+".";
  294. mes "What are your orders?";
  295. next;
  296. switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) {
  297. case 1:
  298. if ($agit_sc04[5] == 0) {
  299. if (getgdskilllv(.@GID,10002) == 0) {
  300. mes "[Ef]";
  301. mes "I'm sorry, but the Guardian";
  302. mes "Stones aren't powerful enough";
  303. mes "to summon Guardians yet. We";
  304. mes "need to accumulate more";
  305. mes "knowledge before they can";
  306. mes "summon any Guardians.";
  307. close;
  308. }
  309. else {
  310. mes "[Ef]";
  311. mes "I shall endeavor to summon";
  312. mes "a Guardian through a Guardian";
  313. mes "Stone. However, keep in mind";
  314. mes "that this will not work if the";
  315. mes "Guardian Stone is destroyed.";
  316. setarray $agit_sc04[5],1;
  317. if ($agit_sc04[0] == 0) {
  318. donpcevent "#sch04_gard01::OnEnable";
  319. }
  320. if ($agit_sc04[1] == 0) {
  321. donpcevent "#sch04_gard02::OnEnable";
  322. }
  323. close;
  324. }
  325. }
  326. else {
  327. mes "[Ef]";
  328. mes "You've already commanded";
  329. mes "me to summon a Guardian";
  330. mes "to defend the stronghold.";
  331. close;
  332. }
  333. case 2:
  334. mes "[Ef]";
  335. mes "Our defense status is...";
  336. if ($agit_sc04[0] == 1) {
  337. mes "1st Guardian Stone: ^FF0000Destroyed^000000";
  338. }
  339. else if ($agit_sc04[0] == 2) {
  340. mes "1st Guardian Stone: ^008000Repairing^000000";
  341. }
  342. else {
  343. mes "1st Guardian Stone: ^4D4DFFOperational^000000";
  344. }
  345. if ($agit_sc04[1] == 1) {
  346. mes "2nd Guardian Stone: ^FF0000Destroyed^000000";
  347. }
  348. else if ($agit_sc04[1] == 2) {
  349. mes "2nd Guardian Stone: ^008000Repairing^000000";
  350. }
  351. else {
  352. mes "2nd Guardian Stone: ^4D4DFFOperational^000000";
  353. }
  354. if ($agit_sc04[2] == 1) {
  355. mes "1st Fortress Gate: ^FF0000Destroyed^000000";
  356. }
  357. else if ($agit_sc04[2] == 2) {
  358. mes "1st Fortress Gate: ^008000Repairing^000000";
  359. }
  360. else {
  361. mes "1st Fortress Gate: ^4D4DFFOperational^000000";
  362. }
  363. if ($agit_sc04[3] == 1) {
  364. mes "2nd Fortress Gate: ^FF0000Destroyed^000000";
  365. }
  366. else if ($agit_sc04[3] == 2) {
  367. mes "2nd Fortress Gate: ^008000Repairing^000000";
  368. }
  369. else {
  370. mes "2nd Fortress Gate: ^4D4DFFOperational^000000";
  371. }
  372. if ($agit_sc04[4] == 1) {
  373. mes "3rd Fortress Gate: ^FF0000Destroyed^000000";
  374. }
  375. else if ($agit_sc04[4] == 2) {
  376. mes "3rd Fortress Gate: ^008000Repairing^000000";
  377. }
  378. else {
  379. mes "3rd Fortress Gate: ^4D4DFFOperational^000000";
  380. }
  381. close;
  382. case 3:
  383. mes "[Ef]";
  384. mes "I'll be standing by,";
  385. mes "awaiting your orders.";
  386. close;
  387. }
  388. }
  389. }
  390. }
  391. else {
  392. mes "[Ef]";
  393. mes "Who are you? Scoundrel!";
  394. mes "Leave this stronghold now!";
  395. close;
  396. }
  397. OnInit:
  398. setarray $agit_sc04[0],0,0,0,0,0,0;
  399. end;
  400. }
  401. schg_cas04,1,1,0 script #sch04_gard01 -1,{
  402. OnEnable:
  403. set .@defence,GetCastleData("schg_cas04",3);
  404. guardian "schg_cas04",111,18,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //0;
  405. if ((.@defence > 10) && (.@defence < 31)) {
  406. set .MyMobCount,2;
  407. guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1;
  408. }
  409. else if ((.@defence > 30) && (.@defence < 51)) {
  410. set .MyMobCount,3;
  411. guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1;
  412. guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2;
  413. }
  414. else if ((.@defence > 50) && (.@defence < 71)) {
  415. set .MyMobCount,4;
  416. guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1;
  417. guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2;
  418. guardian "schg_cas04",110,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //3;
  419. }
  420. else if (.@defence > 70) {
  421. set .MyMobCount,5;
  422. guardian "schg_cas04",109,44,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1;
  423. guardian "schg_cas04",65,22,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //2;
  424. guardian "schg_cas04",110,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //3;
  425. guardian "schg_cas04",88,20,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //4;
  426. }
  427. else {
  428. set .MyMobCount,2;
  429. guardian "schg_cas04",108,32,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //1;
  430. }
  431. initnpctimer;
  432. end;
  433. OnTimer300000:
  434. set .MyMobCount,.MyMobCount+1;
  435. guardian "schg_cas04",64,40,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //5;
  436. mapannounce "schg_cas04","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  437. end;
  438. OnTimer900000:
  439. set .MyMobCount,.MyMobCount+1;
  440. guardian "schg_cas04",47,43,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //6;
  441. mapannounce "schg_cas04","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  442. end;
  443. OnTimer1800000:
  444. set .MyMobCount,.MyMobCount+1;
  445. guardian "schg_cas04",109,48,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //7;
  446. mapannounce "schg_cas04","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  447. end;
  448. OnTimer2700000:
  449. set .MyMobCount,.MyMobCount+1;
  450. guardian "schg_cas04",111,18,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //8;
  451. mapannounce "schg_cas04","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  452. end;
  453. OnTimer3600000:
  454. set .MyMobCount,.MyMobCount+1;
  455. guardian "schg_cas04",112,32,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //9;
  456. mapannounce "schg_cas04","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
  457. stopnpctimer;
  458. end;
  459. OnGuardianDied:
  460. set .MyMobCount,.MyMobCount-1;
  461. if (.MyMobCount < 2) {
  462. set .MyMobCount,.MyMobCount+1;
  463. guardian "schg_cas04",120,37,"Guardian Soldier",1899,"#sch04_gard01::OnGuardianDied"; //10;
  464. }
  465. end;
  466. Onreset:
  467. stopnpctimer;
  468. killmonster "schg_cas04","#sch04_gard01::OnGuardianDied";
  469. end;
  470. }
  471. schg_cas04,1,2,0 script #sch04_gard02 -1,{
  472. OnEnable:
  473. set .@defence,GetCastleData("schg_cas04",3);
  474. guardian "schg_cas04",130,22,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //11;
  475. if ((.@defence > 10) && (.@defence < 31)) {
  476. set .MyMobCount,2;
  477. guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12;
  478. }
  479. else if ((.@defence > 30) && (.@defence < 51)) {
  480. set .MyMobCount,3;
  481. guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12;
  482. guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13;
  483. }
  484. else if ((.@defence > 50) && (.@defence < 71)) {
  485. set .MyMobCount,4;
  486. guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12;
  487. guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13;
  488. guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //14;
  489. }
  490. else if (.@defence > 70) {
  491. set .MyMobCount,5;
  492. guardian "schg_cas04",129,47,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12;
  493. guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //13;
  494. guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //14;
  495. guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //15;
  496. }
  497. else {
  498. set .MyMobCount,2;
  499. guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //12;
  500. }
  501. initnpctimer;
  502. end;
  503. OnTimer600000:
  504. set .MyMobCount,.MyMobCount+1;
  505. guardian "schg_cas04",152,43,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //16;
  506. end;
  507. OnTimer1200000:
  508. set .MyMobCount,.MyMobCount+1;
  509. guardian "schg_cas04",187,15,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //17;
  510. end;
  511. OnTimer2100000:
  512. set .MyMobCount,.MyMobCount+1;
  513. guardian "schg_cas04",128,42,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //18;
  514. end;
  515. OnTimer3000000:
  516. set .MyMobCount,.MyMobCount+1;
  517. guardian "schg_cas04",130,22,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //19;
  518. end;
  519. OnTimer3900000:
  520. set .MyMobCount,.MyMobCount+1;
  521. guardian "schg_cas04",130,28,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //20;
  522. stopnpctimer;
  523. end;
  524. OnGuardianDied:
  525. set .MyMobCount,.MyMobCount-1;
  526. if (.MyMobCount < 2) {
  527. set .MyMobCount,.MyMobCount+1;
  528. guardian "schg_cas04",151,18,"Guardian Soldier",1899,"#sch04_gard02::OnGuardianDied"; //21;
  529. }
  530. end;
  531. Onreset:
  532. stopnpctimer;
  533. killmonster "schg_cas04","#sch04_gard02::OnGuardianDied";
  534. end;
  535. }
  536. schg_cas04,1,3,0 script #sch04_df01 -1,{
  537. OnEnable:
  538. guardian "schg_cas04",27,35,"1st Guardian Stone",1907,"#sch04_df01::OnGuardianStoneDied"; //22;
  539. end;
  540. OnDisable:
  541. killmonster "schg_cas04","#sch04_df01::OnGuardianStoneDied";
  542. setarray $agit_sc04[0],1; //Global Variable
  543. stopnpctimer;
  544. end;
  545. OnGuardianStoneDied:
  546. // 1st Guardian Stone is Destroyed
  547. setarray $agit_sc04[0],1;
  548. if (($agit_sc04[0] == 1) || ($agit_sc04[0] == 2)) {
  549. set .@destroyed,.@destroyed + 1;
  550. }
  551. if (($agit_sc04[1] == 1) || ($agit_sc04[1] == 2)) {
  552. set .@destroyed,.@destroyed + 1;
  553. }
  554. if (.@destroyed == 2) {
  555. mapannounce "schg_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  556. donpcevent "#sch04_RL00::OnDisable";
  557. donpcevent "#sch04_gard01::Onreset";
  558. }
  559. else {
  560. mapannounce "schg_cas04","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  561. donpcevent "#sch04_gard01::Onreset";
  562. }
  563. initnpctimer;
  564. end;
  565. OnTimer300000:
  566. donpcevent "1st Guardian Stone#sch04::OnEnable";
  567. setarray $agit_sc04[0],2; //Global Variable
  568. stopnpctimer;
  569. end;
  570. }
  571. schg_cas04,27,36,0 script 1st Guardian Stone#sch04 844,{
  572. set .@GID, GetCastleData("schg_cas04",1);
  573. if (getcharid(2) == .@GID) {
  574. mes "^3355FFYou will need the";
  575. mes "following materials to";
  576. mes "rebuild a destroyed";
  577. mes "Guardian Stone.^000000";
  578. next;
  579. mes "1 Oridecon";
  580. mes "1 Elunium";
  581. mes "30 Stones";
  582. mes "5 Blue Gemstones";
  583. mes "5 Yellow Gemstones";
  584. mes "5 Red Gemstones";
  585. next;
  586. mes "^3355FFDo you want to continue?^000000";
  587. switch(select("No:Continue")) {
  588. case 1:
  589. mes "^3355FFWork canceled.^000000";
  590. close;
  591. case 2:
  592. if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
  593. mes "^3355FFArrange Stones, Elunium, and";
  594. mes "Oridecon, in that order, in the";
  595. mes "center. Then you must arrange";
  596. mes "the enchanted Gemstones to";
  597. mes "rebuild the Guardian Stone.^000000";
  598. next;
  599. switch(select("Elunium:Oridecon:Stone")) {
  600. case 1:
  601. mes "^3355FFElunium has been";
  602. mes "placed in the center.^000000";
  603. next;
  604. break;
  605. case 2:
  606. mes "^3355FFOridecon has been";
  607. mes "placed in the center.^000000";
  608. next;
  609. break;
  610. case 3:
  611. mes "^3355FFStones have been";
  612. mes "placed in the center.^000000";
  613. set .@nice,.@nice+10;
  614. next;
  615. break;
  616. }
  617. switch(select("Elunium:Oridecon:Stone")) {
  618. case 1:
  619. mes "^3355FFYou have lined the";
  620. mes "outside of the center";
  621. mes "with some Elunium.^000000";
  622. set .@nice,.@nice+10;
  623. next;
  624. break;
  625. case 2:
  626. mes "^3355FFYou have lined the";
  627. mes "outside of the center";
  628. mes "with some Oridecon.^000000";
  629. next;
  630. break;
  631. case 3:
  632. mes "^3355FFYou have lined the";
  633. mes "outside of the center";
  634. mes "with some Stones.^000000";
  635. next;
  636. break;
  637. }
  638. switch(select("Elunium:Oridecon:Stone")) {
  639. case 1:
  640. mes "^3355FFYou covered the";
  641. mes "rest of the materials";
  642. mes "with some Elunium.^000000";
  643. next;
  644. break;
  645. case 2:
  646. mes "^3355FFYou covered the";
  647. mes "rest of the materials";
  648. mes "with some Oridecon.^000000";
  649. set .@nice,.@nice+10;
  650. next;
  651. break;
  652. case 3:
  653. mes "^3355FFYou covered the";
  654. mes "rest of the materials";
  655. mes "with some Stones.^000000";
  656. next;
  657. break;
  658. }
  659. mes "^3355FFNow you need to arrange";
  660. mes "the enchanted Gemstones";
  661. mes "accordingly. You can identify";
  662. mes "their Magic properties by";
  663. mes "their casting effect.^000000";
  664. next;
  665. while(1) {
  666. if (.@roof0 > 7) {
  667. break;
  668. }
  669. else {
  670. switch(rand(1,3)) {
  671. case 1:
  672. specialeffect EF_BEGINSPELL2;
  673. mes "^3355FFThe Gemstones must";
  674. mes "be arranged in the correct";
  675. mes "order according to their";
  676. mes "magic properties and power.^000000";
  677. next;
  678. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  679. case 1:
  680. mes "^3355FFYou placed the Red Gemstone.";
  681. mes "However, the Guardian Stone";
  682. mes "Repair System failed because";
  683. mes "of a magic power conflict.^000000";
  684. close;
  685. case 2:
  686. mes "^3355FFYou placed the Yellow Gemstone.";
  687. mes "However, the Guardian Stone";
  688. mes "Repair System failed because";
  689. mes "of a magic power conflict.^000000";
  690. close;
  691. case 3:
  692. mes "^3355FFYou placed the Blue Gemstone.^000000";
  693. set .@nice,.@nice+10;
  694. set .@roof0,.@roof0 + 1;
  695. specialeffect EF_STEAL;
  696. next;
  697. break;
  698. }
  699. break;
  700. case 2:
  701. specialeffect EF_VOLCANO;
  702. mes "^3355FFThe Gemstones must";
  703. mes "be arranged in the correct";
  704. mes "order according to their";
  705. mes "magic properties and power.^000000";
  706. next;
  707. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  708. case 1:
  709. mes "^3355FFYou placed the Red Gemstone.^000000";
  710. set .@nice,.@nice+10;
  711. set .@roof0,.@roof0 + 1;
  712. specialeffect EF_STEAL;
  713. next;
  714. break;
  715. case 2:
  716. mes "^3355FFYou placed the Yellow Gemstone.";
  717. mes "However, the Guardian Stone";
  718. mes "Repair System failed because";
  719. mes "of a magic power conflict.^000000";
  720. close;
  721. case 3:
  722. mes "^3355FFYou placed the Blue Gemstone.";
  723. mes "However, the Guardian Stone";
  724. mes "Repair System failed because";
  725. mes "of a magic power conflict.^000000";
  726. close;
  727. }
  728. break;
  729. case 3:
  730. specialeffect EF_BEGINSPELL4;
  731. mes "^3355FFThe Gemstones must";
  732. mes "be arranged in the correct";
  733. mes "order according to their";
  734. mes "magic properties and power.^000000";
  735. next;
  736. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  737. case 1:
  738. mes "^3355FFYou placed the Red Gemstone.";
  739. mes "However, the Guardian Stone";
  740. mes "Repair System failed because";
  741. mes "of a magic power conflict.^000000";
  742. close;
  743. case 2:
  744. mes "^3355FFYou placed the Yellow Gemstone.^000000";
  745. set .@nice,.@nice+10;
  746. set .@roof0,.@roof0 + 1;
  747. specialeffect EF_STEAL;
  748. next;
  749. break;
  750. case 3:
  751. mes "^3355FFYou placed the Blue Gemstone.";
  752. mes "However, the Guardian Stone";
  753. mes "Repair System failed because";
  754. mes "of a magic power conflict.^000000";
  755. close;
  756. }
  757. }
  758. }
  759. }
  760. if (.@nice > 90) {
  761. if ($agit_sc04[0] == 0) {
  762. mes "^3355FFThe Guardian Stone";
  763. mes "Repair System has";
  764. mes "already completed.^000000";
  765. close;
  766. }
  767. else {
  768. if (agitcheck2() == 0) {
  769. mes "^3355FFIt is impossible to";
  770. mes "rebuild the Guardian";
  771. mes "Stone because the";
  772. mes "Emperium is not present.^000000";
  773. close;
  774. }
  775. else {
  776. mes "^3355FFThe Gemstones have been";
  777. mes "arranged, and the Guardian";
  778. mes "Stone is successfully repaired.^000000";
  779. delitem 984,1; //Oridecon
  780. delitem 985,1; //Elunium
  781. delitem 7049,30; //Stone
  782. delitem 717,5; //Blue_Gemstone
  783. delitem 715,5; //Yellow_Gemstone
  784. delitem 716,5; //Red_Gemstone
  785. close2;
  786. donpcevent "#sch04_df01::OnEnable";
  787. specialeffect EF_ICECRASH;
  788. disablenpc "1st Guardian Stone#sch04";
  789. setarray $agit_sc04[0],0;
  790. set .@df_all,$agit_sc04[0]+$agit_sc04[1];
  791. if (.@df_all == 0) {
  792. mapannounce "schg_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  793. donpcevent "#sch04_RL00::OnEnable";
  794. }
  795. else {
  796. mapannounce "schg_cas04","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  797. }
  798. if ($agit_sc04[5] == 1) {
  799. donpcevent "#sch04_gard01::OnEnable";
  800. }
  801. end;
  802. }
  803. }
  804. }
  805. else {
  806. mes "^3355FFAfter all of that work...";
  807. mes "It looks like you failed";
  808. mes "to fix the Guardian Stone,";
  809. mes "and lost some materials.^000000";
  810. delitem 7049,10; //Stone
  811. delitem 717,2; //Blue_Gemstone
  812. delitem 715,2; //Yellow_Gemstone
  813. delitem 716,2; //Red_Gemstone
  814. close;
  815. }
  816. }
  817. else {
  818. mes "^3355FFYou don't have enough";
  819. mes "materials to repair";
  820. mes "the Guardian Stone.^000000";
  821. close;
  822. }
  823. }
  824. }
  825. end;
  826. OnInit:
  827. disablenpc "1st Guardian Stone#sch04";
  828. end;
  829. OnEnable:
  830. enablenpc "1st Guardian Stone#sch04";
  831. specialeffect EF_MAPPILLAR2;
  832. end;
  833. OnDisable:
  834. disablenpc "1st Guardian Stone#sch04";
  835. end;
  836. }
  837. schg_cas04,1,4,0 script #sch04_df02 -1,{
  838. OnEnable:
  839. guardian "schg_cas04",207,75,"2nd Guardian Stone",1908,"#sch04_df02::OnGuardianStoneDied"; //23;
  840. end;
  841. OnDisable:
  842. killmonster "schg_cas04","#sch04_df02::OnGuardianStoneDied";
  843. setarray $agit_sc04[1],1; //Global Variable
  844. stopnpctimer;
  845. end;
  846. OnGuardianStoneDied:
  847. // 2nd Guardian Stone is Destroyed
  848. setarray $agit_sc04[1],1;
  849. if (($agit_sc04[0] == 1) || ($agit_sc04[0] == 2)) {
  850. set .@destroyed,.@destroyed + 1;
  851. }
  852. if (($agit_sc04[1] == 1) || ($agit_sc04[1] == 2)) {
  853. set .@destroyed,.@destroyed + 1;
  854. }
  855. if (.@destroyed == 2) {
  856. mapannounce "schg_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
  857. donpcevent "#sch04_RL00::OnDisable";
  858. donpcevent "#sch04_gard02::Onreset";
  859. }
  860. else {
  861. mapannounce "schg_cas04","2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00";
  862. donpcevent "#sch04_gard02::Onreset";
  863. }
  864. initnpctimer;
  865. end;
  866. OnTimer300000:
  867. donpcevent "2nd Guardian Stone#sch04::OnEnable";
  868. setarray $agit_sc04[1],2; //Global Variable
  869. stopnpctimer;
  870. end;
  871. }
  872. schg_cas04,208,75,0 script 2nd Guardian Stone#sch04 844,{
  873. set .@GID, GetCastleData("schg_cas04",1);
  874. if (getcharid(2) == .@GID) {
  875. mes "^3355FFYou will need the";
  876. mes "following materials to";
  877. mes "rebuild a destroyed";
  878. mes "Guardian Stone.^000000";
  879. next;
  880. mes "1 Oridecon";
  881. mes "1 Elunium";
  882. mes "30 Stones";
  883. mes "5 Blue Gemstones";
  884. mes "5 Yellow Gemstones";
  885. mes "5 Red Gemstones";
  886. next;
  887. mes "^3355FFDo you want to continue?^000000";
  888. switch(select("No:Continue")) {
  889. case 1:
  890. mes "^3355FFWork canceled.^000000";
  891. close;
  892. case 2:
  893. if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) {
  894. mes "^3355FFArrange Stones, Elunium, and";
  895. mes "Oridecon, in that order, in the";
  896. mes "center. Then you must arrange";
  897. mes "the enchanted Gemstones to";
  898. mes "rebuild the Guardian Stone.^000000";
  899. next;
  900. switch(select("Elunium:Oridecon:Stone")) {
  901. case 1:
  902. mes "^3355FFElunium has been";
  903. mes "placed in the center.^000000";
  904. next;
  905. break;
  906. case 2:
  907. mes "^3355FFOridecon has been";
  908. mes "placed in the center.^000000";
  909. next;
  910. break;
  911. case 3:
  912. mes "^3355FFStones have been";
  913. mes "placed in the center.^000000";
  914. set .@nice,.@nice+10;
  915. next;
  916. break;
  917. }
  918. switch(select("Elunium:Oridecon:Stone")) {
  919. case 1:
  920. mes "^3355FFYou have lined the";
  921. mes "outside of the center";
  922. mes "with some Elunium.^000000";
  923. set .@nice,.@nice+10;
  924. next;
  925. break;
  926. case 2:
  927. mes "^3355FFYou have lined the";
  928. mes "outside of the center";
  929. mes "with some Oridecon.^000000";
  930. next;
  931. break;
  932. case 3:
  933. mes "^3355FFYou have lined the";
  934. mes "outside of the center";
  935. mes "with some Stones.^000000";
  936. next;
  937. break;
  938. }
  939. switch(select("Elunium:Oridecon:Stone")) {
  940. case 1:
  941. mes "^3355FFYou covered the";
  942. mes "rest of the materials";
  943. mes "with some Elunium.^000000";
  944. next;
  945. break;
  946. case 2:
  947. mes "^3355FFYou covered the";
  948. mes "rest of the materials";
  949. mes "with some Oridecon.^000000";
  950. set .@nice,.@nice+10;
  951. next;
  952. break;
  953. case 3:
  954. mes "^3355FFYou covered the";
  955. mes "rest of the materials";
  956. mes "with some Stones.^000000";
  957. next;
  958. break;
  959. }
  960. mes "^3355FFNow you need to arrange";
  961. mes "the enchanted Gemstones";
  962. mes "accordingly. You can identify";
  963. mes "their Magic properties by";
  964. mes "their casting effect.^000000";
  965. next;
  966. while(1) {
  967. if (.@roof0 > 7) {
  968. break;
  969. }
  970. else {
  971. switch(rand(1,3)) {
  972. case 1:
  973. specialeffect EF_BEGINSPELL2;
  974. mes "^3355FFThe Gemstones must";
  975. mes "be arranged in the correct";
  976. mes "order according to their";
  977. mes "magic properties and power.^000000";
  978. next;
  979. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  980. case 1:
  981. mes "^3355FFYou placed the Red Gemstone.";
  982. mes "However, the Guardian Stone";
  983. mes "Repair System failed because";
  984. mes "of a magic power conflict.^000000";
  985. close;
  986. case 2:
  987. mes "^3355FFYou placed the Yellow Gemstone.";
  988. mes "However, the Guardian Stone";
  989. mes "Repair System failed because";
  990. mes "of a magic power conflict.^000000";
  991. close;
  992. case 3:
  993. mes "^3355FFYou placed the Blue Gemstone.^000000";
  994. set .@nice,.@nice+10;
  995. set .@roof0,.@roof0 + 1;
  996. specialeffect EF_STEAL;
  997. next;
  998. break;
  999. }
  1000. break;
  1001. case 2:
  1002. specialeffect EF_VOLCANO;
  1003. mes "^3355FFThe Gemstones must";
  1004. mes "be arranged in the correct";
  1005. mes "order according to their";
  1006. mes "magic properties and power.^000000";
  1007. next;
  1008. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  1009. case 1:
  1010. mes "^3355FFYou placed the Red Gemstone.^000000";
  1011. set .@nice,.@nice+10;
  1012. set .@roof0,.@roof0 + 1;
  1013. specialeffect EF_STEAL;
  1014. next;
  1015. break;
  1016. case 2:
  1017. mes "^3355FFYou placed the Yellow Gemstone.";
  1018. mes "However, the Guardian Stone";
  1019. mes "Repair System failed because";
  1020. mes "of a magic power conflict.^000000";
  1021. close;
  1022. case 3:
  1023. mes "^3355FFYou placed the Blue Gemstone.";
  1024. mes "However, the Guardian Stone";
  1025. mes "Repair System failed because";
  1026. mes "of a magic power conflict.^000000";
  1027. close;
  1028. }
  1029. break;
  1030. case 3:
  1031. specialeffect EF_BEGINSPELL4;
  1032. mes "^3355FFThe Gemstones must";
  1033. mes "be arranged in the correct";
  1034. mes "order according to their";
  1035. mes "magic properties and power.^000000";
  1036. next;
  1037. switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) {
  1038. case 1:
  1039. mes "^3355FFYou placed the Red Gemstone.";
  1040. mes "However, the Guardian Stone";
  1041. mes "Repair System failed because";
  1042. mes "of a magic power conflict.^000000";
  1043. close;
  1044. case 2:
  1045. mes "^3355FFYou placed the Yellow Gemstone.^000000";
  1046. set .@nice,.@nice+10;
  1047. set .@roof0,.@roof0 + 1;
  1048. specialeffect EF_STEAL;
  1049. next;
  1050. break;
  1051. case 3:
  1052. mes "^3355FFYou placed the Blue Gemstone.";
  1053. mes "However, the Guardian Stone";
  1054. mes "Repair System failed because";
  1055. mes "of a magic power conflict.^000000";
  1056. close;
  1057. }
  1058. }
  1059. }
  1060. }
  1061. if (.@nice > 90) {
  1062. if ($agit_sc04[1] == 0) {
  1063. mes "^3355FFThe Guardian Stone";
  1064. mes "Repair System has";
  1065. mes "successfully completed.^000000";
  1066. close;
  1067. }
  1068. else {
  1069. if (agitcheck2() == 0) {
  1070. mes "^3355FFIt is impossible to";
  1071. mes "rebuild the Guardian";
  1072. mes "Stone because the";
  1073. mes "Emperium is not present.^000000";
  1074. close;
  1075. }
  1076. else {
  1077. mes "^3355FFThe Gemstones have been";
  1078. mes "arranged, and the Guardian";
  1079. mes "Stone is successfully repaired.^000000";
  1080. delitem 984,1; //Oridecon
  1081. delitem 985,1; //Elunium
  1082. delitem 7049,30; //Stone
  1083. delitem 717,5; //Blue_Gemstone
  1084. delitem 715,5; //Yellow_Gemstone
  1085. delitem 716,5; //Red_Gemstone
  1086. close2;
  1087. donpcevent "#sch04_df02::OnEnable";
  1088. specialeffect EF_ICECRASH;
  1089. disablenpc "2nd Guardian Stone#sch04";
  1090. setarray $agit_sc04[1],0;
  1091. set .@df_all,$agit_sc04[0]+$agit_sc04[1];
  1092. if (.@df_all == 0) {
  1093. mapannounce "schg_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
  1094. donpcevent "#sch04_RL00::OnEnable";
  1095. }
  1096. else {
  1097. mapannounce "schg_cas04","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
  1098. }
  1099. if ($agit_sc04[5] == 1) {
  1100. donpcevent "#sch04_gard02::OnEnable";
  1101. }
  1102. end;
  1103. }
  1104. }
  1105. }
  1106. else {
  1107. mes "^3355FFAfter all of that work...";
  1108. mes "It looks like you failed";
  1109. mes "to fix the Guardian Stone,";
  1110. mes "and lost some materials.^000000";
  1111. delitem 7049,10; //Stone
  1112. delitem 717,2; //Blue_Gemstone
  1113. delitem 715,2; //Yellow_Gemstone
  1114. delitem 716,2; //Red_Gemstone
  1115. close;
  1116. }
  1117. }
  1118. else {
  1119. mes "^3355FFYou don't have enough";
  1120. mes "materials to repair";
  1121. mes "the Guardian Stone.^000000";
  1122. close;
  1123. }
  1124. }
  1125. }
  1126. end;
  1127. OnInit:
  1128. disablenpc "2nd Guardian Stone#sch04";
  1129. end;
  1130. OnEnable:
  1131. enablenpc "2nd Guardian Stone#sch04";
  1132. specialeffect EF_MAPPILLAR2;
  1133. end;
  1134. OnDisable:
  1135. disablenpc "2nd Guardian Stone#sch04";
  1136. end;
  1137. }
  1138. // Barrier Summoners
  1139. schg_cas04,2,1,0 script #sch04_RL00 -1,{
  1140. OnEnable:
  1141. setcell "schg_cas04",114,48,126,48,cell_walkable,0;
  1142. setcell "schg_cas04",114,48,126,48,cell_shootable,0;
  1143. guardian "schg_cas04",115,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //24;
  1144. guardian "schg_cas04",117,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //25;
  1145. guardian "schg_cas04",119,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //26;
  1146. guardian "schg_cas04",121,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //27;
  1147. guardian "schg_cas04",123,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //28;
  1148. guardian "schg_cas04",125,49," ",1905,"#sch04_RL00::OnBarrierDestroyed"; //29;
  1149. end;
  1150. OnDisable:
  1151. setcell "schg_cas04",114,48,126,48,cell_walkable,1;
  1152. setcell "schg_cas04",114,48,126,48,cell_shootable,1;
  1153. killmonster "schg_cas04","#sch04_RL00::OnBarrierDestroyed";
  1154. end;
  1155. OnBarrierDestroyed:
  1156. end;
  1157. }
  1158. schg_cas04,2,2,0 script #sch04_RL01 -1,{
  1159. OnEnable:
  1160. set .MyMobCount,6;
  1161. setcell "schg_cas04",114,51,126,51,cell_walkable,0;
  1162. guardian "schg_cas04",115,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //30;
  1163. guardian "schg_cas04",117,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //31;
  1164. guardian "schg_cas04",119,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //32;
  1165. guardian "schg_cas04",121,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //33;
  1166. guardian "schg_cas04",123,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //34;
  1167. guardian "schg_cas04",125,50," ",1905,"#sch04_RL01::OnBarrierDestroyed"; //35;
  1168. end;
  1169. OnBarrierDestroyed:
  1170. set .MyMobCount,.MyMobCount-1;
  1171. if (.MyMobCount == 0) {
  1172. setarray $agit_sc04[2],1;
  1173. mapannounce "schg_cas04","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1174. setcell "schg_cas04",114,51,126,51,cell_walkable,1;
  1175. }
  1176. end;
  1177. OnDisable:
  1178. setcell "schg_cas04",114,51,126,51,cell_walkable,1;
  1179. killmonster "schg_cas04","#sch04_RL01::OnBarrierDestroyed";
  1180. end;
  1181. }
  1182. schg_cas04,2,3,0 script #sch04_RL02 -1,{
  1183. OnEnable:
  1184. set .MyMobCount,6;
  1185. setcell "schg_cas04",114,154,126,154,cell_walkable,0;
  1186. guardian "schg_cas04",115,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //36;
  1187. guardian "schg_cas04",117,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //37;
  1188. guardian "schg_cas04",119,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //38;
  1189. guardian "schg_cas04",121,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //39;
  1190. guardian "schg_cas04",123,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //40;
  1191. guardian "schg_cas04",125,153," ",1905,"#sch04_RL02::OnBarrierDestroyed"; //41;
  1192. end;
  1193. OnBarrierDestroyed:
  1194. set .MyMobCount,.MyMobCount-1;
  1195. if (.MyMobCount == 0) {
  1196. setarray $agit_sc04[3],1;
  1197. mapannounce "schg_cas04","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00";
  1198. setcell "schg_cas04",114,154,126,154,cell_walkable,1;
  1199. }
  1200. end;
  1201. OnDisable:
  1202. setcell "schg_cas04",114,154,126,154,cell_walkable,1;
  1203. killmonster "schg_cas04","#sch04_RL02::OnBarrierDestroyed";
  1204. end;
  1205. }
  1206. schg_cas04,2,4,0 script #sch04_RL03 -1,{
  1207. OnEnable:
  1208. set .MyMobCount,4;
  1209. setcell "schg_cas04",116,241,126,241,cell_walkable,0;
  1210. guardian "schg_cas04",116,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //42;
  1211. guardian "schg_cas04",118,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //43;
  1212. guardian "schg_cas04",120,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //44;
  1213. guardian "schg_cas04",122,240," ",1905,"#sch04_RL03::OnBarrierDestroyed"; //45;
  1214. end;
  1215. OnBarrierDestroyed:
  1216. set .MyMobCount,.MyMobCount-1;
  1217. if (.MyMobCount == 0) {
  1218. setarray $agit_sc04[4],1;
  1219. mapannounce "schg_cas04","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00";
  1220. setcell "schg_cas04",116,241,126,241,cell_walkable,1;
  1221. }
  1222. end;
  1223. OnDisable:
  1224. setcell "schg_cas04",116,241,126,241,cell_walkable,1;
  1225. killmonster "schg_cas04","#sch04_RL03::OnBarrierDestroyed";
  1226. end;
  1227. }
  1228. schg_cas04,124,52,0 script Control Device01#sch04 111,{
  1229. set .@GID, GetCastleData("schg_cas04",1);
  1230. if (getcharid(2) == .@GID) {
  1231. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1232. if ($agit_sc04[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 "#sch04_RL01::OnEnable";
  1420. disablenpc "Control Device01#sch04";
  1421. mapannounce "schg_cas04","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1422. setarray $agit_sc04[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#sch04";
  1451. end;
  1452. OnEnable:
  1453. enablenpc "Control Device01#sch04";
  1454. end;
  1455. OnDisable:
  1456. disablenpc "Control Device01#sch04";
  1457. end;
  1458. }
  1459. schg_cas04,128,157,0 script Control Device02#sch04 111,{
  1460. set .@GID, GetCastleData("schg_cas04",1);
  1461. if (getcharid(2) == .@GID) {
  1462. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1463. if ($agit_sc04[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 "#sch04_RL02::OnEnable";
  1653. disablenpc "Control Device02#sch04";
  1654. mapannounce "schg_cas04","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1655. setarray $agit_sc04[3],0; //Global Variable
  1656. setarray $agit_sc04[2],2; //Global Variable
  1657. donpcevent "Control Device01#sch04::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#sch04";
  1686. end;
  1687. OnEnable:
  1688. enablenpc "Control Device02#sch04";
  1689. end;
  1690. OnDisable:
  1691. disablenpc "Control Device02#sch04";
  1692. end;
  1693. }
  1694. schg_cas04,109,247,0 script Control Device03#sch04 111,{
  1695. set .@GID, GetCastleData("schg_cas04",1);
  1696. if (getcharid(2) == .@GID) {
  1697. if (strcharinfo(0) == getguildmaster(.@GID)) {
  1698. if ($agit_sc04[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 "#sch04_RL03::OnEnable";
  1888. disablenpc "Control Device03#sch04";
  1889. mapannounce "schg_cas04","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
  1890. setarray $agit_sc04[4],0;
  1891. setarray $agit_sc04[3],2;
  1892. donpcevent "Control Device02#sch04::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#sch04";
  1921. end;
  1922. OnEnable:
  1923. enablenpc "Control Device03#sch04";
  1924. end;
  1925. OnDisable:
  1926. disablenpc "Control Device03#sch04";
  1927. end;
  1928. }
  1929. // Link Flags
  1930. schg_cas04,106,302,0 script LF-01#schg_cas04 111,{
  1931. set .@GID, GetCastleData("schg_cas04",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_cas04",19,26;
  1940. end;
  1941. case 2:
  1942. warp "schg_cas04",219,90;
  1943. end;
  1944. case 3:
  1945. close;
  1946. }
  1947. }
  1948. end;
  1949. }
  1950. schg_cas04,109,302,0 script LF-02#schg_cas04 111,{
  1951. set .@GID, GetCastleData("schg_cas04",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_cas04",89,43;
  1960. end;
  1961. case 2:
  1962. warp "schg_cas04",141,45;
  1963. end;
  1964. case 3:
  1965. close;
  1966. }
  1967. }
  1968. end;
  1969. }
  1970. schg_cas04,112,302,0 script LF-03#schg_cas04 111,{
  1971. set .@GID, GetCastleData("schg_cas04",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_cas04",137,54;
  1980. end;
  1981. case 2:
  1982. warp "schg_cas04",102,54;
  1983. end;
  1984. case 3:
  1985. close;
  1986. }
  1987. }
  1988. end;
  1989. }
  1990. schg_cas04,115,302,0 script LF-04#schg_cas04 111,{
  1991. set .@GID, GetCastleData("schg_cas04",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 2-3:Defense Area 2-4:Cancel")) {
  1998. case 1:
  1999. warp "schg_cas04",94,147;
  2000. end;
  2001. case 2:
  2002. warp "schg_cas04",163,140;
  2003. end;
  2004. case 3:
  2005. close;
  2006. }
  2007. }
  2008. end;
  2009. }
  2010. schg_cas04,118,302,0 script LF-05#schg_cas04 111,{
  2011. set .@GID, GetCastleData("schg_cas04",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("Defense Area 2-3:Defense Area 2-4:Cancel")) {
  2018. case 1:
  2019. warp "schg_cas04",87,220;
  2020. break;
  2021. case 2:
  2022. warp "schg_cas04",151,220;
  2023. break;
  2024. case 3:
  2025. close;
  2026. }
  2027. }
  2028. end;
  2029. }
  2030. schg_cas04,121,302,0 script LF-06#schg_cas04 111,{
  2031. set .@GID, GetCastleData("schg_cas04",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 3-1:Defense Area 3-2:Cancel")) {
  2038. case 1:
  2039. warp "schg_cas04",100,242;
  2040. end;
  2041. case 2:
  2042. warp "schg_cas04",136,242;
  2043. end;
  2044. case 3:
  2045. close;
  2046. }
  2047. }
  2048. end;
  2049. }
  2050. schg_cas04,124,302,0 script LF-07#schg_cas04 111,{
  2051. set .@GID, GetCastleData("schg_cas04",1);
  2052. if (getcharid(2) == .@GID) {
  2053. mes "^3355FFThis is the Stronghold";
  2054. mes "Teleport Service. Please";
  2055. mes "choose a destination";
  2056. mes "within the stronghold.^000000";
  2057. switch(select("Center 1 Area:Center 2 Area:Cancel")) {
  2058. case 1:
  2059. warp "schg_cas04",120,168;
  2060. end;
  2061. case 2:
  2062. warp "schg_cas04",119,211;
  2063. end;
  2064. case 3:
  2065. close;
  2066. }
  2067. }
  2068. end;
  2069. }
  2070. schg_cas04,127,302,0 script LF-08#schg_cas04 111,{
  2071. set .@GID, GetCastleData("schg_cas04",1);
  2072. if (getcharid(2) == .@GID) {
  2073. mes "^3355FFThis is the Stronghold";
  2074. mes "Teleport Service. Please";
  2075. mes "choose a destination";
  2076. mes "within the stronghold.^000000";
  2077. switch(select("Area 1-1:Area 2-1:Area 3-1:Cancel")) {
  2078. case 1:
  2079. warp "schg_cas04",89,43;
  2080. end;
  2081. case 2:
  2082. warp "schg_cas04",94,147;
  2083. end;
  2084. case 3:
  2085. warp "schg_cas04",100,242;
  2086. end;
  2087. case 4:
  2088. close;
  2089. }
  2090. }
  2091. end;
  2092. }
  2093. schg_cas04,130,302,0 script LF-09#schg_cas04 111,{
  2094. set .@GID, GetCastleData("schg_cas04",1);
  2095. if (getcharid(2) == .@GID) {
  2096. mes "^3355FFThis is the Stronghold";
  2097. mes "Teleport Service. Please";
  2098. mes "choose a destination";
  2099. mes "within the stronghold.^000000";
  2100. switch(select("Area 1-2:Area 2-3:Area 3-2:Cancel")) {
  2101. case 1:
  2102. warp "schg_cas04",141,45;
  2103. end;
  2104. case 2:
  2105. warp "schg_cas04",163,140;
  2106. end;
  2107. case 3:
  2108. warp "schg_cas04",136,243;
  2109. end;
  2110. case 4:
  2111. close;
  2112. }
  2113. }
  2114. end;
  2115. }
  2116. schg_cas04,133,302,0 script LF-10#schg_cas04 111,{
  2117. set .@GID, GetCastleData("schg_cas04",1);
  2118. if (getcharid(2) == .@GID) {
  2119. mes "^3355FFThis is the Stronghold";
  2120. mes "Teleport Service. Would";
  2121. mes "you like to teleport to the";
  2122. mes "Convenience Facility for";
  2123. mes "guild members?^000000";
  2124. switch(select("Go to Convenience Facility:Cancel")) {
  2125. case 1:
  2126. warp "schg_cas04",275,244;
  2127. end;
  2128. case 2:
  2129. close;
  2130. }
  2131. }
  2132. end;
  2133. }
  2134. schg_cas04,17,45,0 script Hljod#LF_sc04_1::LF_sc04_1 111,{
  2135. set .@GID, GetCastleData("schg_cas04",1);
  2136. if (getcharid(2) == .@GID) {
  2137. mes "^3355FFThis is the Stronghold";
  2138. mes "Teleport Service. Would";
  2139. mes "you like to teleport to";
  2140. mes "the Emperium Center?^000000";
  2141. switch(select("Teleport:Cancel")) {
  2142. case 1:
  2143. warp "schg_cas04",120,290;
  2144. end;
  2145. case 2:
  2146. close;
  2147. }
  2148. }
  2149. end;
  2150. }
  2151. schg_cas04,207,95,0 duplicate(LF_sc04_1) Hljod#LF_sc04_2 111
  2152. schg_cas04,111,46,4 script Hljod#LF_sc04_3::LF_sc04_2 722,{
  2153. set .@GID, GetCastleData("schg_cas04",1);
  2154. if (getcharid(2) == .@GID) {
  2155. mes "^3355FFThis is the Stronghold";
  2156. mes "Teleport Service. Would";
  2157. mes "you like to teleport to";
  2158. mes "the Emperium Center?^000000";
  2159. switch(select("Teleport:Cancel")) {
  2160. case 1:
  2161. warp "schg_cas04",120,290;
  2162. end;
  2163. case 2:
  2164. close;
  2165. }
  2166. }
  2167. end;
  2168. OnRecvCastlesc04:
  2169. FlagEmblem GetCastleData("schg_cas04",1);
  2170. end;
  2171. }
  2172. schg_cas04,129,46,4 duplicate(LF_sc04_2) Hljod#LF_sc04_4 722
  2173. schg_cas04,99,77,0 duplicate(LF_sc04_1) Hljod#LF_sc04_5 111
  2174. schg_cas04,140,77,0 duplicate(LF_sc04_1) Hljod#LF_sc04_6 111
  2175. schg_cas04,109,150,4 duplicate(LF_sc04_2) Hljod#LF_sc04_7 722
  2176. schg_cas04,130,150,4 duplicate(LF_sc04_2) Hljod#LF_sc04_8 722
  2177. schg_cas04,112,212,0 duplicate(LF_sc04_1) Hljod#LF_sc04_9 111
  2178. schg_cas04,127,212,0 duplicate(LF_sc04_1) Hljod#LF_sc04_10 111
  2179. schg_cas04,113,238,0 duplicate(LF_sc04_1) Hljod#LF_sc04_11 111
  2180. schg_cas04,126,238,0 duplicate(LF_sc04_1) Hljod#LF_sc04_12 111
  2181. schg_cas04,95,247,0 duplicate(LF_sc04_1) Hljod#LF_sc04_13 111
  2182. schg_cas04,144,247,0 duplicate(LF_sc04_1) Hljod#LF_sc04_14 111
  2183. // Guild Manager
  2184. schg_cas04,247,305,3 script Steward#sch04 55,{
  2185. set .@GID, GetCastleData("schg_cas04",1);
  2186. if (.@GID == 0) {
  2187. mes "[ Steward ]";
  2188. mes "I await for the master";
  2189. mes "whom destiny will choose";
  2190. mes "for me. Do you think you";
  2191. mes "have to courage and strength";
  2192. mes "to conquer this stronghold?";
  2193. close;
  2194. }
  2195. if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
  2196. mes "[ Steward ]";
  2197. mes "Hmpf. Your threats don't";
  2198. mes "scare me! Guardians, drive";
  2199. mes "this infidel away from here!";
  2200. mes "I will always be loyal to the";
  2201. mes "master of this stronghold,";
  2202. mes "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000.";
  2203. close;
  2204. }
  2205. mes "[ Steward ]";
  2206. mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
  2207. mes "How shall I serve you today?";
  2208. mes "Was there an aspect of this";
  2209. mes "stronghold's maintenance";
  2210. mes "you wanted to discuss?";
  2211. next;
  2212. switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
  2213. case 1:
  2214. mes "[ Steward ]";
  2215. mes "The Commercial Growth";
  2216. mes "Level of the stronghold is ^0000ff" + GetCastleData("schg_cas04",2) + ".";
  2217. if (GetCastleData("schg_cas04",4) > 0) {
  2218. mes "Last time, you invested in";
  2219. mes "Commercial Growth " + GetCastleData("schg_cas04",4) + ".";
  2220. }
  2221. next;
  2222. mes "[ Steward ]";
  2223. mes "Our stronghold's";
  2224. mes "safeguard level is " + GetCastleData("schg_cas04",3) + ".";
  2225. if (GetCastleData("schg_cas04",5) > 0) {
  2226. mes "Last time, you invested";
  2227. mes "in defense " + GetCastleData("schg_cas04",5) + " times.";
  2228. }
  2229. mes " ";
  2230. mes "That is all, master.";
  2231. close;
  2232. case 2:
  2233. set .@Economy,GetCastleData("schg_cas04",2);
  2234. if (.@Economy < 6) { set .@eco_invest,5000; }
  2235. else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; }
  2236. else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; }
  2237. else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; }
  2238. else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; }
  2239. else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; }
  2240. else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; }
  2241. else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; }
  2242. else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; }
  2243. else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; }
  2244. else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; }
  2245. else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; }
  2246. else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; }
  2247. else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; }
  2248. else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; }
  2249. else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; }
  2250. else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; }
  2251. else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; }
  2252. else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; }
  2253. else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; }
  2254. //Quadruple the cost of investing if you've already invested once.
  2255. if (GetCastleData("schg_cas04",4)) {
  2256. set .@eco_invest,.@eco_invest*4;
  2257. }
  2258. mes "[ Steward ]";
  2259. mes "Raising the stronghold's";
  2260. mes "commercial growth will";
  2261. mes "increase the quantity of";
  2262. mes "goods produced for the guild.";
  2263. mes "Investing in commercial growth";
  2264. mes "will help the guild's future.";
  2265. next;
  2266. mes "[ Steward ]";
  2267. mes "You can make one investment";
  2268. mes "each day, but if you can make";
  2269. mes "two investments if you pay";
  2270. mes "more zeny: this will speed";
  2271. mes "up commercial development,";
  2272. mes "but can be quite expensive.";
  2273. next;
  2274. if (.@Economy == 100) {
  2275. mes "[ Steward ]";
  2276. mes "However, our stronghold's";
  2277. mes "commerical growth level is";
  2278. mes "at 100%. It's not possible to";
  2279. mes "develop commercial growth";
  2280. mes "any further than that.";
  2281. close;
  2282. }
  2283. if (GetCastleData("schg_cas04",4) == 2) {
  2284. mes "[ Steward ]";
  2285. mes "You've already made two";
  2286. mes "investments today, so you'll";
  2287. mes "have to wait until tomorrow";
  2288. mes "to make another investment.";
  2289. close;
  2290. }
  2291. if (GetCastleData("schg_cas04",4) == 0) {
  2292. mes "[ Steward ]";
  2293. mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
  2294. mes "to make an investment";
  2295. mes "Will you invest in this";
  2296. mes "stronghold's commerical";
  2297. mes "development now?";
  2298. }
  2299. else {
  2300. mes "[ Steward ]";
  2301. mes "You must pay ^FF0000" + .@eco_invest + "^000000";
  2302. mes "more zeny to make a second";
  2303. mes "investment today. Will you";
  2304. mes "invest one more time?";
  2305. }
  2306. next;
  2307. switch(select("Invest in Commercial Growth:Cancel")) {
  2308. case 1:
  2309. if (Zeny < .@eco_invest) {
  2310. mes "[ Steward ]";
  2311. mes "I'm sorry, Master, but";
  2312. mes "you do not have enough";
  2313. mes "zeny to make an investment";
  2314. mes "for the guild today.";
  2315. close;
  2316. }
  2317. set zeny,zeny-.@eco_invest;
  2318. SetCastleData "schg_cas04",4,GetCastleData("schg_cas04",4)+1;
  2319. mes "[ Steward ]";
  2320. mes "A wise use of the guild's";
  2321. mes "funds, Master. We can expect";
  2322. mes "to see the results of this";
  2323. mes "investment by tomorrow.";
  2324. close;
  2325. case 2:
  2326. mes "[ Steward ]";
  2327. mes "As you command, Master.";
  2328. close;
  2329. }
  2330. case 3:
  2331. set .@Defence,GetCastleData("schg_cas04",3);
  2332. if (.@Defence < 6) { set .@def_invest,10000; }
  2333. else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; }
  2334. else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; }
  2335. else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; }
  2336. else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; }
  2337. else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; }
  2338. else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; }
  2339. else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; }
  2340. else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; }
  2341. else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; }
  2342. else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; }
  2343. else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; }
  2344. else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; }
  2345. else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; }
  2346. else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; }
  2347. else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; }
  2348. else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; }
  2349. else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; }
  2350. else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; }
  2351. else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; }
  2352. //Quadruple the cost of investing if you've already invested once.
  2353. if (GetCastleData("schg_cas04",5)) {
  2354. set .@def_invest,.@def_invest*4;
  2355. }
  2356. mes "[ Steward ]";
  2357. mes "Investing in our stronghold's";
  2358. mes "defense will enhance the";
  2359. mes "durability of our Guardians";
  2360. mes "and the Emperium. We'll need";
  2361. mes "every advantage to protect";
  2362. mes "ourselves from our enemies.";
  2363. next;
  2364. mes "[ Steward ]";
  2365. mes "You can invest in defense";
  2366. mes "once per day, but if you pay";
  2367. mes "more zeny, you can invest";
  2368. mes "a maximum of two times daily.";
  2369. next;
  2370. mes "[ Steward ]";
  2371. if (GetCastleData("schg_cas04",3) == 100) {
  2372. mes "The Defense Level of this";
  2373. mes "stronghold is 100%, and";
  2374. mes "cannot be increased further.";
  2375. close;
  2376. }
  2377. if (GetCastleData("schg_cas04",5) == 2) {
  2378. mes "Master, you've already";
  2379. mes "invested in Defense twice";
  2380. mes "today. You'll need to wait";
  2381. mes "until tomorrow if you really";
  2382. mes "want to increase our defenses.";
  2383. close;
  2384. }
  2385. if (GetCastleData("schg_cas04",5) == 0) {
  2386. mes "We need ^FF0000" + .@def_invest + "^000000";
  2387. mes "zeny to invest in our";
  2388. mes "stronghold's defenses.";
  2389. mes "Will you invest now?";
  2390. }
  2391. else {
  2392. mes "We need ^FF0000" + .@def_invest + "^000000";
  2393. mes "zeny to invest in our";
  2394. mes "stronghold's defenses";
  2395. mes "a second time today.";
  2396. mes "Will you invest now?";
  2397. }
  2398. next;
  2399. switch(select("Invest in Defense:Cancel")) {
  2400. case 1:
  2401. if (Zeny < .@def_invest) {
  2402. mes "[ Steward ]";
  2403. mes "I'm sorry, Master, but";
  2404. mes "you do not have enough";
  2405. mes "zeny to make an investment";
  2406. mes "for the guild today.";
  2407. close;
  2408. }
  2409. set zeny,zeny-.@def_invest;
  2410. SetCastleData "schg_cas04",5,GetCastleData("schg_cas04",5)+1;
  2411. mes "[ Steward ]";
  2412. mes "A wise use of the guild's";
  2413. mes "funds, Master. Increasing";
  2414. mes "the frequency of treasure";
  2415. mes "procured by the guild will";
  2416. mes "definitely help us all.";
  2417. close;
  2418. case 2:
  2419. mes "[ Steward ]";
  2420. mes "As you command, Master.";
  2421. close;
  2422. }
  2423. case 4:
  2424. if (GetCastleData("schg_cas04",9) == 1) {
  2425. mes "[ Steward ]";
  2426. mes "Do you wish to dismiss";
  2427. mes "the Kafra Employee that";
  2428. mes "we've hired for the guild?";
  2429. next;
  2430. switch(select("Dismiss:Cancel")) {
  2431. case 1:
  2432. cutin "kafra_01",2;
  2433. mes "[ Hired Kafra Employee ]";
  2434. mes "Master, please reconsider!";
  2435. mes "I've been working very hard";
  2436. mes "for the success of the guild!";
  2437. mes "I'll try harder to serve the";
  2438. mes "guild members of this";
  2439. mes "stronghold, I promise!";
  2440. next;
  2441. switch(select("Dismiss:Cancel")) {
  2442. case 1:
  2443. mes "[ Hired Kafra Employee ]";
  2444. mes "Why?! What have I done";
  2445. mes "to deserve this? Waaah~!";
  2446. next;
  2447. cutin "kafra_01",255;
  2448. break;
  2449. case 2:
  2450. mes "[ Hired Kafra Employee ]";
  2451. mes "Thank you, Master!";
  2452. mes "I'll obey your every";
  2453. mes "command as best I can!";
  2454. mes "You won't regret this!";
  2455. close;
  2456. }
  2457. break;
  2458. case 2:
  2459. mes "[ Steward ]";
  2460. mes "She works very hard,";
  2461. mes "in my opinion. It was in";
  2462. mes "all of our best interests to";
  2463. mes "allow her to stay with us.";
  2464. close;
  2465. }
  2466. disablenpc "Kafra Employee#sch04";
  2467. SetCastleData "schg_cas04",9,0;
  2468. mes "[ Steward ]";
  2469. mes "That Kafra Employee";
  2470. mes "has been dismissed.";
  2471. mes "Were really dissatisfied";
  2472. mes "by the quality of her service?";
  2473. close;
  2474. }
  2475. else {
  2476. mes "[ Steward ]";
  2477. mes "Will you hire a";
  2478. mes "Kafra Employee to serve";
  2479. mes "our stronghold? You must";
  2480. mes "pay ^FF000010,000 zeny^000000 to hire one.";
  2481. next;
  2482. switch(select("Hire:Cancel")) {
  2483. case 1:
  2484. if (getgdskilllv(.@GID,10001) == 0) {
  2485. mes "[ Steward ]";
  2486. mes "Master, we cannot hire a";
  2487. mes "Kafra Employee because";
  2488. mes "you have not yet attained";
  2489. mes "the ^FF0000Contract with Kafra^000000";
  2490. mes "guild skill.";
  2491. close;
  2492. }
  2493. if (Zeny < 10000) {
  2494. mes "[ Steward ]";
  2495. mes "Master, we cannot hire a";
  2496. mes "Kafra Employee because";
  2497. mes "we do not have enough";
  2498. mes "funds to pay the contract fee.";
  2499. close;
  2500. }
  2501. set zeny,zeny-10000;
  2502. enablenpc "Kafra Employee#sch04";
  2503. SetCastleData "schg_cas04",9,1;
  2504. mes "[ Steward ]";
  2505. mes "Very well. We have formed";
  2506. mes "a contract with the Kafra";
  2507. mes "Head Office, and hired a";
  2508. mes "Kafra Employee for our";
  2509. mes "stronghold. Here she is~";
  2510. next;
  2511. cutin "kafra_01",2;
  2512. mes "[ Hired Kafra Employee ]";
  2513. mes "How do you do? I've";
  2514. mes "been dispatched by the";
  2515. mes "Kafra Head Office to";
  2516. mes "serve your guild's needs.";
  2517. mes "I'll do my best to follow";
  2518. mes "your every command, Master.";
  2519. next;
  2520. cutin "kafra_01",255;
  2521. mes "[ Steward ]";
  2522. mes "Our contract will expire";
  2523. mes "after one month, so we must";
  2524. mes "pay additional fees to keep";
  2525. mes "this Kafra Employee in";
  2526. mes "the service of our guild.";
  2527. close;
  2528. case 2:
  2529. mes "[ Steward ]";
  2530. mes "As you command, Master.";
  2531. mes "However, I suggest hiring";
  2532. mes "a Kafra Employee as soon";
  2533. mes "as possible since our guild";
  2534. mes "would greatly benefit from";
  2535. mes "the convenient Kafra services.";
  2536. close;
  2537. }
  2538. }
  2539. case 5:
  2540. mes "[ Steward ]";
  2541. mes "Do you wish to enter the";
  2542. mes "Guild Treasure Room?";
  2543. mes "Only you, the Guild Master,";
  2544. mes "are permitted to enter.";
  2545. next;
  2546. mes "[ Steward ]";
  2547. mes "Please remember to open";
  2548. mes "the Treasure Boxes at the";
  2549. mes "proper time. Otherwise, the";
  2550. mes "treasure may disappear if";
  2551. mes "something unexpected happens.";
  2552. next;
  2553. switch(select("Go to Treasure Room:Cancel")) {
  2554. case 1:
  2555. mes "[ Steward ]";
  2556. mes "Allow me to guide you";
  2557. mes "on the secret path to";
  2558. mes "the Treasure Room.";
  2559. mes "Press the secret switch";
  2560. mes "when you wish to return here.";
  2561. close2;
  2562. warp "schg_cas04",381,381;
  2563. end;
  2564. case 2:
  2565. mes "[ Steward ]";
  2566. mes "Items in the Treasure Room";
  2567. mes "are produced once each day.";
  2568. mes "Therefore, you must obtain";
  2569. mes "the treasure items everyday.";
  2570. mes "For the sake of the guild,";
  2571. mes "prioritize treasure harvesting!";
  2572. close;
  2573. }
  2574. }
  2575. Onstop:
  2576. stopnpctimer;
  2577. end;
  2578. OnStartArena:
  2579. set .@GID,getcharid(2);
  2580. // Lower castle Economy
  2581. set .@Economy,GetCastleData("schg_cas04",2) - 5;
  2582. if (.@Economy < 0) set .@Economy, 0;
  2583. SetCastleData "schg_cas04", 2, .@Economy;
  2584. // Lower Castle Defence
  2585. set .@Defence,GetCastleData("schg_cas04",3) - 5;
  2586. if (.@Defence < 0) set .@Defence, 0;
  2587. SetCastleData "schg_cas04", 3, .@Defence;
  2588. // Set new owner
  2589. SetCastleData "schg_cas04",1, .@GID;
  2590. // Clear castle's data.
  2591. for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
  2592. SetCastleData "schg_cas04", .@i, 0;
  2593. // Disable Kafra
  2594. disablenpc "Kafra Employee#sch04";
  2595. set .msg,2;
  2596. if (.msg == 1) {
  2597. announce "Fortress [" + GetCastleName("schg_cas04") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2598. donpcevent "Manager#sch04_02::Onstart";
  2599. }
  2600. else if (.msg == 2) {
  2601. announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 4] stronghold of "+GetCastleName("schg_cas04"),bc_all|bc_woe;
  2602. mapannounce "schg_cas04","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2603. if (agitcheck2()) {
  2604. donpcevent "Manager#sch04_02::Onreset";
  2605. initnpctimer;
  2606. }
  2607. else {
  2608. donpcevent "Manager#sch04_02::Onreset";
  2609. stopnpctimer;
  2610. }
  2611. }
  2612. else if (.msg == 0) {
  2613. announce "Fortress [" + GetCastleName("schg_cas04") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
  2614. donpcevent "Manager#sch04_02::Onreset";
  2615. stopnpctimer;
  2616. end;
  2617. }
  2618. MapRespawnGuildID "schg_cas04",GetCastleData("schg_cas04",1),2;
  2619. GetCastleData "schg_cas04",0,"::OnRecvCastlesc04";
  2620. end;
  2621. OnTimer10000:
  2622. donpcevent "Manager#sch04_02::Onchange";
  2623. mapannounce "schg_cas04","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  2624. end;
  2625. }
  2626. // Guild Kafra
  2627. schg_cas04,300,287,5 script Kafra Employee#sch04 117,{
  2628. cutin "kafra_01",2;
  2629. set .@GID, GetCastleData("schg_cas04",1);
  2630. if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
  2631. mes "[Kafra Employee]";
  2632. mes "Welcome, proud member";
  2633. mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
  2634. mes "The Kafra Corporation is ready";
  2635. mes "to assist you wherever you go!";
  2636. next;
  2637. switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
  2638. case 1:
  2639. if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
  2640. mes "[Kafra Employee]";
  2641. mes "I'm so sorry, but you must";
  2642. mes "have at least Novice Skill";
  2643. mes "Lv.6 to use the Storage.";
  2644. }
  2645. else {
  2646. openstorage;
  2647. }
  2648. break;
  2649. case 2:
  2650. mes "[Kafra Employee]";
  2651. mes "Please tell me your";
  2652. mes "Warp destination.";
  2653. next;
  2654. switch(select("Juno -> 200 z:Cancel")) {
  2655. case 1:
  2656. if (Zeny < 200) {
  2657. mes "[Kafra Employee]";
  2658. mes "I'm sorry, but you don't";
  2659. mes "have enough zeny to pay";
  2660. mes "the warp fee. Would you";
  2661. mes "please check your funds again?";
  2662. close2;
  2663. cutin "kafra_01",255;
  2664. end;
  2665. }
  2666. set zeny,zeny-200;
  2667. warp "yuno",158,125;
  2668. end;
  2669. case 2:
  2670. cutin "kafra_01",255;
  2671. }
  2672. break;
  2673. case 3:
  2674. if (BaseClass != Job_Merchant) {
  2675. mes "[Kafra Employee]";
  2676. mes "I'm sorry, but the Pushcart";
  2677. mes "rental service can only be";
  2678. mes "used by Merchant, Blacksmith,";
  2679. mes "and Alchemist class characters.";
  2680. }
  2681. else if (checkcart() == 1) {
  2682. mes "[Kafra Employee]";
  2683. mes "Hm? You've already";
  2684. mes "rented a Pushcart.";
  2685. }
  2686. else {
  2687. mes "[Kafra Employee]";
  2688. mes "The Pushcart rental fee";
  2689. mes "is 800 zeny. Would you";
  2690. mes "like to rent a Pushcart?";
  2691. next;
  2692. switch(select("Rent Pushcart:Cancel")) {
  2693. case 1:
  2694. if (Zeny < 800) {
  2695. mes "[Kafra Employee]";
  2696. mes "I'm sorry, but you don't";
  2697. mes "have enough zeny to rent";
  2698. mes "one of our Pushcarts.";
  2699. close2;
  2700. cutin "kafra_01",255;
  2701. end;
  2702. }
  2703. set zeny,zeny-800;
  2704. setcart;
  2705. break;
  2706. case 2:
  2707. break;
  2708. }
  2709. }
  2710. break;
  2711. case 4:
  2712. mes "[Kafra Employee]";
  2713. mes "Thank you for using the";
  2714. mes "Kafra Service. Wherever";
  2715. mes "you go, Kafra will be";
  2716. mes "there to support you!";
  2717. close2;
  2718. cutin "kafra_01",255;
  2719. end;
  2720. }
  2721. close2;
  2722. cutin "kafra_01",255;
  2723. end;
  2724. }
  2725. else {
  2726. mes "[Kafra Employee]";
  2727. mes "I'm sorry, but I've been";
  2728. mes "exclusively contracted";
  2729. mes "to the members of the";
  2730. mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2731. mes "You'll have to ask another";
  2732. mes "Kafra Employee to help you...";
  2733. close2;
  2734. cutin "kafra_01",255;
  2735. end;
  2736. }
  2737. OnRecvCastlesc04:
  2738. if (GetCastleData("schg_cas04",1) == 0) {
  2739. monster "schg_cas04",0,0,"Evil Druid",1117,10;
  2740. monster "schg_cas04",0,0,"Khalitzburg",1132,4;
  2741. monster "schg_cas04",0,0,"Abysmal Knight",1219,3;
  2742. monster "schg_cas04",0,0,"Executioner",1205,1;
  2743. monster "schg_cas04",0,0,"Penomena",1216,10;
  2744. monster "schg_cas04",0,0,"Alarm",1193,18;
  2745. monster "schg_cas04",0,0,"Clock",1269,9;
  2746. monster "schg_cas04",0,0,"Raydric Archer",1276,12;
  2747. monster "schg_cas04",0,0,"Wanderer",1208,3;
  2748. monster "schg_cas04",0,0,"Alice",1275,1;
  2749. monster "schg_cas04",0,0,"Bloody Knight",1268,2;
  2750. monster "schg_cas04",0,0,"Dark Lord",1272,2;
  2751. monster "schg_cas04",0,0,"Tower Keeper",1270,4;
  2752. }
  2753. if (GetCastleData("schg_cas04",9) < 1) {
  2754. disablenpc "Kafra Employee#sch04";
  2755. }
  2756. end;
  2757. }
  2758. schg_cas04,391,391,0 script #sch04_switch 111,{
  2759. mes " ";
  2760. mes "^3355FFWill you pull";
  2761. mes "this small lever?^000000";
  2762. next;
  2763. switch(select("Pull Lever:Cancel")) {
  2764. case 1:
  2765. warp "schg_cas04",275,244;
  2766. end;
  2767. case 2:
  2768. close;
  2769. }
  2770. }
  2771. sch_gld,134,97,4 script Hljod#flag_sc04_1::sc04_Flag 722,{
  2772. set .@GID, GetCastleData("schg_cas04",1);
  2773. if (.@GID == 0) {
  2774. mes "[ Schwaltzvalt Royal Edict ]";
  2775. mes "The Holy Kingdom of";
  2776. mes "Schwaltzvalt declares that";
  2777. mes "one has yet to claim lordship";
  2778. mes "over this stronghold. The one";
  2779. mes "that breaks the Emperium will";
  2780. mes "be recognized as its new owner.";
  2781. close;
  2782. }
  2783. else {
  2784. if (getcharid(2) == .@GID) {
  2785. mes "[ Ringing Voice ]";
  2786. mes "Courageous one,";
  2787. mes "do you wish to return";
  2788. mes "to your stronghold?";
  2789. next;
  2790. switch(select("Return to the Stronghold:Cancel")) {
  2791. case 1:
  2792. set .@GID, GetCastleData("schg_cas04",1);
  2793. if (getcharid(2) == .@GID) {
  2794. warp "schg_cas04",120,290;
  2795. end;
  2796. }
  2797. close;
  2798. case 2:
  2799. close;
  2800. }
  2801. }
  2802. mes "[ Schwaltzvalt Royal Edict ]";
  2803. mes "The Holy Kingdom of";
  2804. mes "Schwaltzvalt decrees that";
  2805. mes "this stronghold is owned";
  2806. mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
  2807. next;
  2808. mes "[ Schwaltzvalt Royal Edict ]";
  2809. mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
  2810. mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
  2811. mes "Any that object must claim this";
  2812. mes "stronghold through strength of";
  2813. mes "steel and magic during the";
  2814. mes "appointed Guild Siege times.";
  2815. close;
  2816. }
  2817. OnRecvCastlesc04:
  2818. FlagEmblem GetCastleData("schg_cas04",1);
  2819. end;
  2820. }
  2821. sch_gld,141,97,4 duplicate(sc04_Flag) Hljod#flag_sc04_2 722