schg_cas03.txt 88 KB

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