schg_cas01.txt 88 KB

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