schg_cas05.txt 88 KB

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