quest_warper.txt 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908
  1. //===== eAthena Script ============================================
  2. //= *BETA* Quest Warper Script
  3. //===== By: =======================================================
  4. //= Old Warper 2 by Darkchild - Remade with quest format by DZeroX
  5. //= Huge Rewrite by Neouni
  6. //===== Current Version: ==========================================
  7. //= 1.6a
  8. //===== Compatible With: ==========================================
  9. //= Any eAthena Version
  10. //===== Description: ==============================================
  11. //= Warper that works only after locations are unlocked
  12. //===== Warning: ==================================================
  13. // you have to set the securitycode value [1337] the same as in
  14. // functions_kafras.txt if you changed it !!
  15. //===== Additional Comments: ======================================
  16. //= 1.0 - NPCs created
  17. //= 1.1 - Add Dungeons by sturm
  18. //= 1.2 - Add All char in account unlocked by ace_killer
  19. //= 1.3 - Add new 7 towns and 7 dungeons by escoteiro
  20. // - Correct bug jawaii town by escoteiro
  21. // - Remove some excessive warpras by escoteiro
  22. //= 1.4 - Rewrite of the Warpa system [Neouni]
  23. // - Corrected some bugs caused by autoconverting the old script
  24. //= 1.4a - Rewrite of menu to be custom for each player [Neouni]
  25. // - Dungeon listing rewrite
  26. // - Town listing rewrite
  27. // - GameMaster can Customise Main menu
  28. //= 1.4b - Pricing round [Neouni]
  29. // - GM menu added for pricing
  30. // - Town Warp pricing tags added
  31. // - Dungeon Warp pricing tags added
  32. //= 1.5 - storage functions pricing [Neouni]
  33. // - storage pricing added
  34. // - kafra points setting added
  35. // - kafra storage code security added
  36. // - Healing scripts pricing added
  37. // - Heal Part script added
  38. //= 1.6 - Dungeon warp [Neouni]
  39. // - added option to add a extra fee for going down deeper into dungeon
  40. // partly by rebuilding the dungeon warping into variable menu's
  41. //= 1.6a - alot of fixes for beta release [Neouni]
  42. // - fixed syntax problems
  43. // - fixed missing pyramid gats in @DGat$ array
  44. // - removed the culver level 5 that didn't exist
  45. // and caused quite alot of problems (i didn't check while converting)
  46. //-1.7 - Readability of Dungeon menu array building increased
  47. // - Thanatos Tower & Louyang Dungeon added
  48. //=================================================================
  49. //========================Function=&=Script========================
  50. function script Q_Warpra {
  51. mes "[Warpra]";
  52. mes "Hello,";
  53. mes "I can warp you to any town or dungeon, but you need to unlock them first.";
  54. mes "To unlock them, you have to visit us.";
  55. mes "What do you need?";
  56. if(getarg(0) == 0) callfunc "QWS_MMarray",0;
  57. if(getarg(0) == 1) callfunc "QWS_MMarray",1;
  58. menu @Mmenulist$[0],-,@Mmenulist$[1],-,@Mmenulist$[2],-,@Mmenulist$[3],-,@Mmenulist$[4],-,@Mmenulist$[5],-,@Mmenulist$[6],-,@Mmenulist$[7],-,@Mmenulist$[8],-,@Mmenulist$[9],-;
  59. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "GameMaster Menu") goto GM_Menu;
  60. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Warp to Towns") goto L_town;
  61. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Warp to Dungeons") goto L_dungeon;
  62. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Why so few Warps ?") goto L_FewWarps;
  63. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Why don't you Unlock this location ?") goto L_NoUnlock;
  64. if (@Mmenuref[@menu-1] == 5) goto L_heal_Full;
  65. if (@Mmenuref[@menu-1] == 6) goto L_heal_Part;
  66. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Storage") goto L_Storage;
  67. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Guild Storage") goto L_GStorage;
  68. if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Cancel") goto L_end;
  69. goto L_end;
  70. //=====================GM-Menu=Functions===========================
  71. GM_Menu:
  72. next;
  73. //----------------Town-Warp
  74. if ($QW_TW_OFF == 0) mes "Town warping = ^00FF00 On ^000000";
  75. if ($QW_TW_OFF == 1) mes "Town warping = ^FF0000 Off ^000000";
  76. //----------------Dungeon-Warp
  77. if ($QW_DW_OFF == 0) mes "Dungeon warping = ^00FF00 On ^000000";
  78. if ($QW_DW_OFF == 1) mes "Dungeon warping = ^FF0000 Off ^000000";
  79. //----------------Healfull
  80. if ($QW_HF == 1) mes "Healing full = ^00FF00 On ^000000";
  81. //----------------Healpart
  82. if ($QW_HP == 1) mes "Healing partly = ^00FF00 On ^000000";
  83. if (($QW_HF == 0)&&($QW_HP == 0)) mes "Healing = ^FF0000 Off ^000000";
  84. //----------------Storage
  85. if ($QW_Stor == 1) mes "Storage = ^00FF00 On ^000000";
  86. if ($QW_Stor == 0) mes "Storage = ^FF0000 Off ^000000";
  87. //----------------GuildStorage
  88. if ($QW_GStor == 1) mes "Guild Storage = ^00FF00 On ^000000";
  89. if ($QW_GStor == 0) mes "Guild Storage = ^FF0000 Off ^000000";
  90. //----------------GMmenu
  91. if ($QW_KPoint == 1) mes "Kafra points collect = ^00FF00 On ^000000";
  92. if ($QW_KPoint == 0) mes "Kafra points collect = ^FF0000 Off ^000000";
  93. set @GMmenu,select("Town Warping","Dungeon Warping","Healing full","Healing partly","Storage","Guild Storage","Kafra points collect","Set Prices","Exit");
  94. // Using callsub and a small check to not make 1 part of the script set it on and the other turning it off again
  95. // why not use TWSETON & TWSETOFF ?, this saves lines
  96. if ((@GMmenu == 1)&&($QW_TW_OFF == 0)) callsub TWSET,0;
  97. if ((@GMmenu == 1)&&($QW_TW_OFF == 1)) callsub TWSET,1;
  98. if ((@GMmenu == 2)&&($QW_DW_OFF == 0)) callsub DWSET,0;
  99. if ((@GMmenu == 2)&&($QW_DW_OFF == 1)) callsub DWSET,1;
  100. if (@GMmenu == 3)&&($QW_HF == 0) callsub HFSET,0;
  101. if (@GMmenu == 3)&&($QW_HF == 1) callsub HFSET,1;
  102. if (@GMmenu == 4)&&($QW_HP == 0) callsub HPSET,0;
  103. if (@GMmenu == 4)&&($QW_HP == 1) callsub HPSET,1;
  104. if (@GMmenu == 5)&&($QW_Stor == 0) callsub SSET,0;
  105. if (@GMmenu == 5)&&($QW_Stor == 1) callsub SSET,1;
  106. if (@GMmenu == 6)&&($QW_GStor == 0) callsub GSSET,0;
  107. if (@GMmenu == 6)&&($QW_GStor == 1) callsub GSSET,1;
  108. if (@GMmenu == 7)&&($QW_KPoint == 0) callsub KPoint,0;
  109. if (@GMmenu == 7)&&($QW_KPoint == 1) callsub KPoint,1;
  110. if (@GMmenu == 8) goto Setprice;
  111. close;
  112. end;
  113. TWSET:
  114. if (getarg(0) == 0) set $QW_TW_OFF,1;
  115. if (getarg(0) == 1) set $QW_TW_OFF,0;
  116. goto GM_Menu;
  117. DWSET:
  118. if (getarg(0) == 0) set $QW_DW_OFF,1;
  119. if (getarg(0) == 1) set $QW_DW_OFF,0;
  120. goto GM_Menu;
  121. HFSET:
  122. if (getarg(0) == 0) set $QW_HF,1;
  123. if (getarg(0) == 0) set $QW_HP,0;
  124. if (getarg(0) == 1) set $QW_HF,0;
  125. goto GM_Menu;
  126. HPSET:
  127. if (getarg(0) == 0) set $QW_HP,1;
  128. if (getarg(0) == 0) set $QW_HF,0;
  129. if (getarg(0) == 1) set $QW_HP,0;
  130. goto GM_Menu;
  131. SSET:
  132. if (getarg(0) == 0) set $QW_Stor,1;
  133. if (getarg(0) == 1) set $QW_Stor,0;
  134. goto GM_Menu;
  135. GSSET:
  136. if (getarg(0) == 0) set $QW_GStor,1;
  137. if (getarg(0) == 1) set $QW_GStor,0;
  138. goto GM_Menu;
  139. KPoint:
  140. if (getarg(0) == 0) set $QW_KPoint,1;
  141. if (getarg(0) == 1) set $QW_KPoint,0;
  142. goto GM_Menu;
  143. //======================GM-Menu=Pricing============================
  144. Setprice:
  145. next;
  146. mes "Scroll thru the list to see all the options";
  147. //----------------Warp-Basic-Price
  148. if ($QW_BW_PRICE != 0) mes "Basic - Warps are = ^00FF00 "+$QW_BW_PRICE+" ^000000";
  149. if ($QW_BW_PRICE == 0) mes "Basic - Warps are = ^FF0000 Free ^000000";
  150. //----------------Warp-Advanced-Price
  151. if ($QW_AW_PRICE != 0) mes "Advanced - Warps are = ^00FF00 "+$QW_AW_PRICE+" ^000000";
  152. if ($QW_AW_PRICE == 0) mes "Advanced - Warps are = ^FF0000 Free ^000000";
  153. //----------------Warp-Oversea-Price
  154. if ($QW_OW_PRICE != 0) mes "Overseas - Warps are = ^00FF00 "+$QW_OW_PRICE+" ^000000";
  155. if ($QW_OW_PRICE == 0) mes "Overseas - Warps are = ^FF0000 Free ^000000";
  156. //----------------Warp-Oversea-Price
  157. if ($QW_DW_FEE != 0) mes "Dungeon level warp fee = ^00FF00 "+$QW_DW_FEE+" ^000000 zeny per level";
  158. if ($QW_DW_FEE == 0) mes "Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
  159. //----------------Heal-Full
  160. if ($QW_HF_PRICE != 0) mes "Full Healing = ^00FF00 "+$QW_HF_PRICE+" ^000000";
  161. if ($QW_HF_PRICE == 0) mes "Full Healing = ^FF0000 Free ^000000";
  162. //----------------Heal-Part
  163. if ($QW_HP_H_PRICE != 0) mes "^FF0000HP ^000000Part Healing = ^00FF00 "+$QW_HP_H_PRICE+" ^000000 a point";
  164. if ($QW_HP_H_PRICE == 0) mes "^FF0000HP ^000000Part Healing = ^FF0000 Free ^000000";
  165. if ($QW_HP_S_PRICE != 0) mes "^0000FFSP ^000000Part Healing = ^00FF00 "+$QW_HP_S_PRICE+" ^000000 a point";
  166. if ($QW_HP_S_PRICE == 0) mes "^0000FFSP ^000000Part Healing = ^FF0000 Free ^000000";
  167. //----------------Storage
  168. if (($QW_S_PRICE != 0)&&($QW_S_PRICE != 60)) mes "Storage = ^00FF00 "+$QW_S_PRICE+" ^000000";
  169. if ($QW_S_PRICE == 0) mes "Storage = ^FF0000 Free ^000000";
  170. if ($QW_S_PRICE == 60) mes "Storage = ^0000FF Kafra Mode ^000000";
  171. //----------------Guild-Storage
  172. if ($QW_GS_PRICE != 0) mes "Guild Storage = ^00FF00 "+$QW_GS_PRICE+" ^000000";
  173. if ($QW_GS_PRICE == 0) mes "Guild Storage = ^FF0000 Free ^000000";
  174. set @GMmenu2,select("Basic - Warps","Advanced - Warps","Overseas - Warps","Dungeon level warp fee","Full Healing","Part Healing","Storage","Guild Storage","Back","Exit");
  175. if (@GMmenu2 == 1) goto BWprice;
  176. if (@GMmenu2 == 2) goto AWprice;
  177. if (@GMmenu2 == 3) goto OWprice;
  178. if (@GMmenu2 == 4) goto DWfee;
  179. if (@GMmenu2 == 5) goto FHprice;
  180. if (@GMmenu2 == 6) goto PHprice;
  181. if (@GMmenu2 == 7) goto Sprice;
  182. if (@GMmenu2 == 8) goto GSprice;
  183. if (@GMmenu2 == 9) goto GM_Menu;
  184. close;
  185. end;
  186. BWprice:
  187. next;
  188. if ($QW_BW_PRICE != 0) mes "Basic - Warps are = ^00FF00 "+$QW_BW_PRICE+" ^000000";
  189. if ($QW_BW_PRICE == 0) mes "Basic - Warps are = ^FF0000 Free ^000000";
  190. mes "Basic - Warps are starter towns and related dungeons";
  191. input $QW_BW_PRICE;
  192. goto Setprice;
  193. AWprice:
  194. next;
  195. if ($QW_AW_PRICE != 0) mes "Advanced - Warps are = ^00FF00 "+$QW_AW_PRICE+" ^000000";
  196. if ($QW_AW_PRICE == 0) mes "Advanced - Warps are = ^FF0000 Free ^000000";
  197. mes "Advanced - Warps are towns on the same island but not close to any starter town";
  198. input $QW_AW_PRICE;
  199. goto Setprice;
  200. OWprice:
  201. next;
  202. if ($QW_OW_PRICE != 0) mes "Overseas - Warps are = ^00FF00 "+$QW_OW_PRICE+" ^000000";
  203. if ($QW_OW_PRICE == 0) mes "Overseas - Warps are = ^FF0000 Free ^000000";
  204. mes "Overseas - Warps are towns and dungeons overseas reachable by boat from alberta";
  205. input $QW_OW_PRICE;
  206. goto Setprice;
  207. DWfee:
  208. if ($QW_DW_FEE != 0) mes "Dungeon level warp fee = ^00FF00 "+$QW_DW_FEE+" ^000000 zeny per level";
  209. if ($QW_DW_FEE == 0) mes "Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
  210. mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee";
  211. mes "These costs are on top of the regular Warp costs";
  212. input $QW_DW_FEE;
  213. goto Setprice;
  214. FHprice:
  215. next;
  216. if ($QW_HF_PRICE != 0) mes "Full Healing = ^00FF00 "+$QW_HF_PRICE+" ^000000";
  217. if ($QW_HF_PRICE == 0) mes "Full Healing = ^FF0000 Free ^000000";
  218. mes "Instant full healing 1 price";
  219. input $QW_HF_PRICE;
  220. goto Setprice;
  221. PHprice:
  222. next;
  223. if ($QW_HP_H_PRICE != 0) mes "^FF0000HP ^000000Part Healing = ^00FF00 "+$QW_HP_H_PRICE+" ^000000 a point";
  224. if ($QW_HP_H_PRICE == 0) mes "^FF0000HP ^000000Part Healing = ^FF0000 Free ^000000";
  225. if ($QW_HP_S_PRICE != 0) mes "^0000FFSP ^000000Part Healing = ^00FF00 "+$QW_HP_S_PRICE+" ^000000 a point";
  226. if ($QW_HP_S_PRICE == 0) mes "^0000FFSP ^000000Part Healing = ^FF0000 Free ^000000";
  227. mes "Healing price per 1 HP";
  228. mes "Healing price per 1 SP";
  229. mes "2 inputs, first HP then SP";
  230. input $QW_HP_H_PRICE;
  231. input $QW_HP_S_PRICE;
  232. goto Setprice;
  233. Sprice:
  234. next;
  235. if (($QW_S_PRICE != 0)&&($QW_S_PRICE != 60)) mes "Storage = ^00FF00 "+$QW_S_PRICE+" ^000000";
  236. if ($QW_S_PRICE == 0) mes "Storage = ^FF0000 Free ^000000";
  237. if ($QW_S_PRICE == 60) mes "Storage = ^0000FF Kafra Mode ^000000";
  238. mes "Storage cost, if set to 60 Kafra pricing will be handled";
  239. input $QW_S_PRICE;
  240. goto Setprice;
  241. GSprice:
  242. next;
  243. if ($QW_GS_PRICE != 0) mes "Guild Storage = ^00FF00 "+$QW_GS_PRICE+" ^000000";
  244. if ($QW_GS_PRICE == 0) mes "Guild Storage = ^FF0000 Free ^000000";
  245. mes "Guild Storage, free on Guild Kafras";
  246. input $QW_GS_PRICE;
  247. goto Setprice;
  248. //===========================Towns=================================
  249. L_town:
  250. callfunc "QWS_Tarray";
  251. // Expected maximum is set to 22, if you add more options add a more ",@Tmenulist$[xx],-"
  252. menu @Tmenulist$[0],-,@Tmenulist$[1],-,@Tmenulist$[2],-,@Tmenulist$[3],-,@Tmenulist$[4],-,@Tmenulist$[5],-,@Tmenulist$[6],-,@Tmenulist$[7],-,@Tmenulist$[8],-,@Tmenulist$[9],-,@Tmenulist$[10],-,@Tmenulist$[11],-,@Tmenulist$[12],-,@Tmenulist$[13],-,@Tmenulist$[14],-,@Tmenulist$[15],-,@Tmenulist$[16],-,@Tmenulist$[17],-,@Tmenulist$[18],-,@Tmenulist$[19],-,@Tmenulist$[20],-,@Tmenulist$[21],-,@Tmenulist$[22],-;
  253. if (@pTmap$[@Tmenuref[@menu-1]] == "L_End") goto L_end;
  254. if(Zeny<@pTprice[@Tmenuref[@menu-1]]) callsub L_Short_on_zeny,0;
  255. set Zeny, Zeny-@pTprice[@Tmenuref[@menu-1]];
  256. warp @pTmap$[@Tmenuref[@menu-1]],@pTXcoords[@Tmenuref[@menu-1]],@pTYcoords[@Tmenuref[@menu-1]];
  257. close2; // this part safegaurds against errors/typos
  258. set Zeny, Zeny+@pTprice[@Tmenuref[@menu-1]];
  259. close;
  260. end;
  261. //=========================Dungeons================================
  262. L_dungeon:
  263. callfunc "QWS_Darray";
  264. // current max 31 items
  265. set @DWMenu,select(@Dmenulist$[0],@Dmenulist$[1],@Dmenulist$[2],@Dmenulist$[3],@Dmenulist$[4],@Dmenulist$[5],@Dmenulist$[6],@Dmenulist$[7],@Dmenulist$[8],@Dmenulist$[9],@Dmenulist$[10],@Dmenulist$[11],@Dmenulist$[12],@Dmenulist$[13],@Dmenulist$[14],@Dmenulist$[15],@Dmenulist$[16],@Dmenulist$[17],@Dmenulist$[18],@Dmenulist$[19],@Dmenulist$[20],@Dmenulist$[21],@Dmenulist$[22],@Dmenulist$[23],@Dmenulist$[24],@Dmenulist$[25],@Dmenulist$[26],@Dmenulist$[27],@Dmenulist$[28],@Dmenulist$[29],@Dmenulist$[30]);
  266. if (@pDmenuitems$[@Dmenuref[DWMenu-1]] == "Cancel") goto L_end;
  267. set @DwarpMenu, (@Dmenuref[@DWMenu-1]);
  268. callfunc "QWS_DLarray";
  269. next;
  270. mes "[Warpra]";
  271. mes "Please select where you want to go";
  272. set @DWLMenu,select(@DWLmenulist$[0], @DWLmenulist$[1], @DWLmenulist$[2], @DWLmenulist$[3], @DWLmenulist$[4], @DWLmenulist$[5], @DWLmenulist$[6], @DWLmenulist$[7], @DWLmenulist$[8], @DWLmenulist$[9], @DWLmenulist$[10], @DWLmenulist$[11], @DWLmenulist$[12], @DWLmenulist$[13], @DWLmenulist$[14], @DWLmenulist$[15], @DWLmenulist$[16], @DWLmenulist$[17]);
  273. if (@DWLmenuref[@DWLMenu-1] == 1337) goto L_end;
  274. set @Darrayref, @DWLmenuref[@DWLMenu-1];
  275. set @warpprice, (@pDprice[@Dmenuref[@DWMenu-1]]+$QW_DW_FEE*@DDepth[@Darrayref]);
  276. if(Zeny<@warpprice) callsub L_Short_on_zeny,1;
  277. set Zeny, Zeny-(@warpprice);
  278. warp @DGat$[@Darrayref],@DXcoords[@Darrayref],@DYcoords[@Darrayref];
  279. close2; // this part safegaurds against errors/typos
  280. set Zeny, Zeny+@pTprice[@Tmenuref[@DWMenu-1]];
  281. close;
  282. end;
  283. //=============================Healing=============================
  284. L_heal_Full:
  285. set @healfee, $QW_HF_PRICE;
  286. if(Zeny<@healfee) callsub L_Short_on_zeny,4;
  287. set Zeny, Zeny-@healfee;
  288. // if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@healfee/50); //commented out because kafra's don't offer this
  289. next;
  290. mes "[Warpra]";
  291. mes "Close this window and I will Heal you.";
  292. close2;
  293. percentheal 100,100;
  294. close;
  295. end;
  296. L_heal_Part:
  297. set @healchoice,select("Full heal","Health Points only","Skill Points only","Exit");
  298. if (@healchoice == 1) callsub PHeal,1,1;
  299. if (@healchoice == 2) callsub PHeal,1,0;
  300. if (@healchoice == 3) callsub PHeal,0,1;
  301. goto L_end;
  302. PHeal:
  303. next;
  304. set @Hp, MaxHp-Hp;
  305. set @Sp, MaxSp-Sp;
  306. set @HpPrice, @hp*$QW_HP_H_PRICE;
  307. set @SpPrice, @sp*$QW_HP_S_PRICE;
  308. mes "[Warpra]";
  309. if(getarg(0) == 1) mes ""+@HpPrice+" Zeny for "+@Hp+" health points";
  310. if(getarg(1) == 1) mes ""+@SpPrice+" Zeny for "+@Sp+" skill points";
  311. set @total, @HpPrice+@SpPrice;
  312. mes "for a total of "+@total+" zeny";
  313. if (select("Heal me","Let me see the choices again")==2) goto L_heal_Part;
  314. if(getarg(0) == 1)set @HpPrice, (MaxHp-Hp)*$QW_HP_H_PRICE;
  315. if(getarg(1) == 1)set @SpPrice, (MaxSp-Sp)*$QW_HP_S_PRICE;
  316. set @healfee, @HpPrice+@SpPrice;
  317. if (getarg(0) == 1)&&(getarg(1) == 1)&&(Zeny<@healfee) goto Zeny_Short_Both;
  318. if (getarg(0) == 1)&&(Zeny<@healfee) goto Zeny_short_HP;
  319. if (getarg(1) == 1)&&(Zeny<@healfee) goto Zeny_short_SP;
  320. set Zeny, Zeny-@healfee;
  321. if (getarg(0) == 1)&&(getarg(1) == 1) percentheal 100,100;
  322. if (getarg(0) == 1) percentheal 100,0;
  323. if (getarg(1) == 1) percentheal 0,100;
  324. close;
  325. end;
  326. Zeny_Short_Both:
  327. mes "[Warpra]";
  328. mes "choose another option, you can afford both.";
  329. mes "I can heal as much as you can afford too.";
  330. if (select("OK","Exit") == 2) goto L_end;
  331. goto PHeal;
  332. Zeny_short_HP:
  333. mes "[Warpra]";
  334. mes "do you want me to partly heal your HP ?";
  335. if (select("Yes","No") == 2) goto L_end;
  336. set @Hp, Zeny/$QW_HP_H_PRICE;
  337. set @HpPrice, @Hp*$QW_HP_H_PRICE;
  338. if (@Hp == 1) mes "your not worth the effort";
  339. if (@Hp == 1) goto L_end;
  340. set Zeny, Zeny-@HpPrice;
  341. heal @Hp,0;
  342. close;
  343. end;
  344. Zeny_short_SP:
  345. mes "[Warpra]";
  346. mes "do you want me to partly heal your SP ?";
  347. if (select("Yes","No") == 2) goto L_end;
  348. set @Sp, Zeny/$QW_HP_S_PRICE;
  349. set @SpPrice, @Sp*$QW_HP_S_PRICE;
  350. if (@Sp == 1) mes "your not worth the effort";
  351. if (@Sp == 1) goto L_end;
  352. set Zeny, Zeny-@SpPrice;
  353. heal 0,@Sp;
  354. close;
  355. end;
  356. //=============================Storage=============================
  357. L_Storage:
  358. next;
  359. if(basicskillcheck(0) > 0 && getskilllv(1) < 6) goto L_StorageJBlow;
  360. set @fee, $QW_S_PRICE;
  361. if ($QW_S_PRICE == 60)&&(BaseJob == Job_Novice) set @fee, 30;
  362. if ($QW_S_PRICE == 60)&&(BaseJob != Job_Novice) set @fee, 60;
  363. if(Zeny<@fee) callsub L_Short_on_zeny,2;
  364. set Zeny, Zeny-@fee;
  365. if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@fee/5);
  366. mes "[Warpra]";
  367. mes "Close this window and i will open your storage.";
  368. callsub F_CheckKafCode; //check your storage password thru kafra coding, if set
  369. close2;
  370. openstorage;
  371. close;
  372. end;
  373. F_CheckKafCode:
  374. // you have to set the 1337 value the same as in functions_kafras.txt if you changed it !!
  375. if(#kafra_code==0) return;
  376. mes "Enter your storage password:";
  377. set @code_,0;
  378. input @code_;
  379. if(@code_ != #kafra_code-getcharid(3)-1337) {
  380. dispbottom "Wrong storage password.";
  381. close2;
  382. close;
  383. }
  384. set @kafcode_try,0;
  385. set @code_,0;
  386. return;
  387. L_StorageJBlow:
  388. mes "[Warpra]";
  389. mes "I am sorry but you have to be at least Novice level 6 if you want to use the storage.";
  390. return;
  391. L_GStorage:
  392. if(@GID==0) goto L_NoGuild;
  393. if(Zeny<$QW_GS_PRICE) callsub L_Short_on_zeny,3;
  394. set Zeny, Zeny-$QW_GS_PRICE;
  395. if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + ($QW_GS_PRICE/5);
  396. next;
  397. mes "[Warpra]";
  398. mes "Close this window and i will open the ^5533FF" + GetGuildName(@GID) + "^000000 storage.";
  399. close2;
  400. guildopenstorage;
  401. close;
  402. end;
  403. L_NoGuild:
  404. next;
  405. mes "[Warpra]";
  406. mes "You are not a part of a guild I can't help you.";
  407. close;
  408. end;
  409. L_end:
  410. close;
  411. end;
  412. //============================Few=Warp=============================
  413. L_FewWarps:
  414. next;
  415. mes "[Warpra ]";
  416. mes "You need to unlock locations before they come available to you.";
  417. mes "To unlock a location talk to my colleagues all over the world.";
  418. mes "Each account got it's own stamp card.";
  419. mes "Want me to check what stamps you have collected so far ?.";
  420. if (select("Yes","No")==1) callsub stampcard;
  421. close;
  422. end;
  423. //============================No=Unlock============================
  424. L_NoUnlock:
  425. next;
  426. mes "[Warpra ]";
  427. mes "I don't unlock this location, my assistant deeper in the dungeon will unlock this place.";
  428. close;
  429. end;
  430. //=========================Short=On=Zeny===========================
  431. L_Short_on_zeny:
  432. next;
  433. if (getarg(0) == 0) mes "you don't seem to have "+@pTprice[@Tmenuref[@menu-1]]+" zeny, to pay for the warp fee to "+@pTmenuitems$[@Tmenuref[@menu-1]]+"";
  434. if (getarg(0) == 1) mes "you don't seem to have "+@warpprice+" zeny, to pay for the warp fee to "+@DLevelName$[@DWLmenuref[@DWLMenu-1]]+" at "+@pDmenuitems$[@Dmenuref[@DWMenu-1]]+"";
  435. if (getarg(0) == 2) mes "you don't seem to have "+@fee+" zeny, to pay for the storage fee";
  436. if (getarg(0) == 3) mes "you don't seem to have "+$QW_GS_PRICE+" zeny, to pay for the guild storage fee";
  437. if (getarg(0) == 4) mes "you don't seem to have "+@healfee+" zeny, to pay for your healing";
  438. close;
  439. end;
  440. //===========================Stamp=Card============================
  441. stampcard:
  442. // Counting of the ammount of places you have unlocked
  443. next;
  444. mes "Let me check what Towns you have";
  445. set @Tstamp,0;
  446. //----------------Prontera:
  447. if (#prontera == 1) set @Tstamp,@Tstamp+1;
  448. //----------------Alberta
  449. if (#alberta == 1) set @Tstamp,@Tstamp+1;
  450. //----------------Aldebaran
  451. if (#aldebaran == 1) set @Tstamp,@Tstamp+1;
  452. //----------------Amatsu:
  453. if (#amatsu == 1) set @Tstamp,@Tstamp+1;
  454. //----------------Ayotaya:
  455. if (#ayotaya == 1) set @Tstamp,@Tstamp+1;
  456. //----------------Comodo:
  457. if (#comodo == 1) set @Tstamp,@Tstamp+1;
  458. //----------------Einbech:
  459. if (#einbech == 1) set @Tstamp,@Tstamp+1;
  460. //----------------Einbroch:
  461. if (#einbroch == 1) set @Tstamp,@Tstamp+1;
  462. //----------------Geffen:
  463. if (#geffen == 1) set @Tstamp,@Tstamp+1;
  464. //----------------Gonryun:
  465. if (#gonryun == 1) set @Tstamp,@Tstamp+1;
  466. //----------------Hugel:
  467. if (#hugel == 1) set @Tstamp,@Tstamp+1;
  468. //----------------Izlude:
  469. if (#izlude == 1) set @Tstamp,@Tstamp+1;
  470. //----------------Jawaii:
  471. if (#jawaii == 1) set @Tstamp,@Tstamp+1;
  472. //----------------Lighthalzen:
  473. if (#lighthalzen == 1) set @Tstamp,@Tstamp+1;
  474. //----------------Louyang:
  475. if (#louyang == 1) set @Tstamp,@Tstamp+1;
  476. //----------------Lutie
  477. if (#xmas == 1) set @Tstamp,@Tstamp+1;
  478. //----------------Morroc:
  479. if (#morocc == 1) set @Tstamp,@Tstamp+1;
  480. //----------------Niflheim:
  481. if (#niflheim == 1) set @Tstamp,@Tstamp+1;
  482. //----------------Payon:
  483. if (#payon == 1) set @Tstamp,@Tstamp+1;
  484. //----------------Umbala:
  485. if (#umbala == 1) set @Tstamp,@Tstamp+1;
  486. //----------------Yuno:
  487. if (#yuno == 1) set @Tstamp,@Tstamp+1;
  488. mes "you collected^00FF00 "+@Tstamp+" of 21 ^000000Towns.";
  489. if (@Tstamp == 15) mes "They say there is an island you can only get to when married";
  490. if (@Tstamp == 15) emotion 18;
  491. next;
  492. mes "Let me check what dungeons you have";
  493. set @Dstamp,0;
  494. //----------------ABYSS LAKE
  495. if (#abyss == 1) set @Dstamp,@Dstamp+1;
  496. //----------------AMATSU DUNGEON
  497. if (#ama_dun == 1) set @Dstamp,@Dstamp+1;
  498. //----------------ANT HELL
  499. if (#anthell == 1) set @Dstamp,@Dstamp+1;
  500. //----------------AYOTAYA
  501. if (#ayotaya_dun == 1) set @Dstamp,@Dstamp+1;
  502. //----------------BYALAN
  503. if (#iz_dun == 1) set @Dstamp,@Dstamp+1;
  504. //----------------CLOCK TOWER
  505. if (#c_tower == 1) set @Dstamp,@Dstamp+1;
  506. //----------------COAL MINE
  507. if (#mjo_dun== 1) set @Dstamp,@Dstamp+1;
  508. //----------------CULVERT
  509. if (#prt_sewb == 1) set @Dstamp,@Dstamp+1;
  510. //----------------EINBECH DUNGEON
  511. if (#einbech_dun == 1) set @Dstamp,@Dstamp+1;
  512. //----------------GEFENIA DUNGEON
  513. if (#gefenia == 1) set @Dstamp,@Dstamp+1;
  514. //----------------GEFFEN DUNGEON
  515. if (#gef_dun == 1) set @Dstamp,@Dstamp+1;
  516. //----------------GLAST HEIM
  517. if (#gl_dun == 1) set @Dstamp,@Dstamp+1;
  518. //----------------GONRYUN DUNGEON
  519. if (#gon_dun == 1) set @Dstamp,@Dstamp+1;
  520. //----------------HIDDEN DUNGEON
  521. if (#hid_dun == 1) set @Dstamp,@Dstamp+1;
  522. //----------------JUPEROS CAVE
  523. if (#juperos == 1) set @Dstamp,@Dstamp+1;
  524. //----------------LIGHTHALZEN BIO LAB
  525. if (#lighthalzen_dun == 1) set @Dstamp,@Dstamp+1;
  526. //----------------LOUYANG DUNGEON
  527. if (#louyang_dun == 1) set @Dstamp,@Dstamp+1;
  528. //----------------MAGMA DUNGEON
  529. if (#mag_dun == 1) set @Dstamp,@Dstamp+1;
  530. //----------------ODIN TEMPLE
  531. if (#odintemple == 1) set @Dstamp,@Dstamp+1;
  532. //----------------ORC DUNGEON
  533. if (#orcsdun == 1) set @Dstamp,@Dstamp+1;
  534. //----------------PAYON DUNGEON
  535. if (#pay_dun == 1) set @Dstamp,@Dstamp+1;
  536. //----------------PYRAMIDS
  537. if (#moc_pryd == 1) set @Dstamp,@Dstamp+1;
  538. //----------------SPHINX
  539. if (#in_sphinx == 1) set @Dstamp,@Dstamp+1;
  540. //----------------SUNKEN SHIP
  541. if (#treasure == 1) set @Dstamp,@Dstamp+1;
  542. //----------------THANATOS TOWER
  543. if (#thanatos_tower == 1) set @Dstamp,@Dstamp+1;
  544. //----------------TOY FACTORY
  545. if (#xmas_dun == 1) set @Dstamp,@Dstamp+1;
  546. //----------------TURTLE ISTLAND
  547. if (#tur_dun == 1) set @Dstamp,@Dstamp+1;
  548. //----------------UMBALA
  549. if (#um_dun == 1) set @Dstamp,@Dstamp+1;
  550. mes "you collected^00FF00 "+@Dstamp+" of 28 ^000000Dungeons";
  551. mes "To unlock a dungeon, search for my colleague.";
  552. mes "You can usually find him near the end or middle of the dungeon";
  553. return;
  554. }
  555. //======================Main=Menu=Array============================
  556. function script QWS_MMarray {
  557. // Currently 9 items
  558. setarray @pMmenuitems$[0], "GameMaster Menu", "Warp to Towns", "Warp to Dungeons", "Why so few Warps ?", "Why don't you Unlock this location ?", "Heal", "Heal", "Storage", "Guild Storage", "Cancel";
  559. set @Mi,0; // That's our loop counter.
  560. set @Mj,0; // That's the menu lines counter.
  561. //----------------GameMaster-Menu
  562. if (getgmlevel(80)) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  563. if (getgmlevel(80)) set @Mmenuref[@Mj],@Mi;
  564. if (getgmlevel(80)) set @Mj,@Mj+1;
  565. set @Mi,@Mi+1;
  566. //----------------Town-Warp
  567. if ($QW_TW_OFF == 0) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  568. if ($QW_TW_OFF == 0) set @Mmenuref[@Mj],@Mi;
  569. if ($QW_TW_OFF == 0) set @Mj,@Mj+1;
  570. set @Mi,@Mi+1;
  571. //----------------Dungeon-Warp
  572. if ($QW_DW_OFF == 0) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  573. if ($QW_DW_OFF == 0) set @Mmenuref[@Mj],@Mi;
  574. if ($QW_DW_OFF == 0) set @Mj,@Mj+1;
  575. set @Mi,@Mi+1;
  576. //----------------Why-So-Few-Warps
  577. set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  578. set @Mmenuref[@Mj],@Mi;
  579. set @Mj,@Mj+1;
  580. set @Mi,@Mi+1;
  581. //----------------No-Unlock
  582. if (getarg(0) == 1) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  583. if (getarg(0) == 1) set @Mmenuref[@Mj],@Mi;
  584. if (getarg(0) == 1) set @Mj,@Mj+1;
  585. set @Mi,@Mi+1;
  586. //----------------Healfull
  587. if ($QW_HF == 1) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  588. if ($QW_HF == 1) set @Mmenuref[@Mj],@Mi;
  589. if ($QW_HF == 1) set @Mj,@Mj+1;
  590. set @Mi,@Mi+1;
  591. //----------------Healpart
  592. if ($QW_HP == 1) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  593. if ($QW_HP == 1) set @Mmenuref[@Mj],@Mi;
  594. if ($QW_HP == 1) set @Mj,@Mj+1;
  595. set @Mi,@Mi+1;
  596. //----------------Storage
  597. if ($QW_Stor == 1) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  598. if ($QW_Stor == 1) set @Mmenuref[@Mj],@Mi;
  599. if ($QW_Stor == 1) set @Mj,@Mj+1;
  600. set @Mi,@Mi+1;
  601. //----------------GuildStorage
  602. if ($QW_GStor == 1) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  603. if ($QW_GStor == 1) set @Mmenuref[@Mj],@Mi;
  604. if ($QW_GStor == 1) set @Mj,@Mj+1;
  605. set @Mi,@Mi+1;
  606. //----------------Cancel
  607. set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
  608. set @Mmenuref[@Mj],@Mi;
  609. return;
  610. }
  611. //======================Town=Menu=Array============================
  612. function script QWS_Tarray {
  613. // Currently 22 items
  614. setarray @pTmenuitems$[0], "Prontera", "Alberta", "Aldebaran", "Amatsu", "Ayothaya", "Comodo", "Einbech", "Einbroch", "Geffen", "Gonryun", "Hugel", "Izlude", "Jawaii", "Lighthalzen", "Louyang", "Lutie", "Morroc", "Niflheim", "Payon", "Umbala", "Yuno", "Cancel"; // townnames
  615. setarray @pTmap$[0], "prontera.gat", "alberta.gat", "aldebaran.gat", "amatsu.gat", "ayothaya.gat", "comodo.gat", "einbech.gat", "einbroch.gat", "geffen.gat", "gonryun.gat", "hugel.gat", "izlude.gat", "jawaii.gat", "lighthalzen.gat", "louyang.gat", "xmas.gat", "morocc.gat", "niflheim.gat", "payon.gat", "umbala.gat", "yuno.gat", "L_End"; // mapfile
  616. setarray @pTXcoords[0], 156, 27, 145, 197, 150, 188, 172, 230, 119, 150, 95, 128, 243, 158, 210, 148, 159, 195, 152, 130, 160, "Cancel"; // all X coords
  617. setarray @pTYcoords[0], 187, 236, 120, 86, 57, 161, 126, 191, 66, 130, 121, 111, 115, 110, 108, 131, 93, 186, 75, 130, 168, "Cancel"; // all Y coords
  618. setarray @pTprice[0], $QW_BW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, 0;
  619. set @Ti,0; // That's our loop counter.
  620. set @Tj,0; // That's the menu lines counter.
  621. //----------------Prontera
  622. if (#prontera == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  623. if (#prontera == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  624. if (#prontera== 1) set @Tmenuref[@Tj],@Ti;
  625. if (#prontera == 1) set @Tj,@Tj+1;
  626. set @Ti,@Ti+1;
  627. //----------------Alberta
  628. if (#alberta == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  629. if (#alberta == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  630. if (#alberta == 1) set @Tmenuref[@Tj],@Ti;
  631. if (#alberta == 1) set @Tj,@Tj+1;
  632. set @Ti,@Ti+1;
  633. //----------------Aldebaran
  634. if (#aldebaran == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  635. if (#aldebaran == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  636. if (#aldebaran == 1) set @Tmenuref[@Tj],@Ti;
  637. if (#aldebaran == 1) set @Tj,@Tj+1;
  638. set @Ti,@Ti+1;
  639. //----------------Amatsu:
  640. if (#amatsu == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  641. if (#amatsu == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  642. if (#amatsu == 1) set @Tmenuref[@Tj],@Ti;
  643. if (#amatsu == 1) set @Tj,@Tj+1;
  644. set @Ti,@Ti+1;
  645. //----------------Ayothaya:
  646. if (#ayotaya == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  647. if (#ayotaya == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  648. if (#ayotaya == 1) set @Tmenuref[@Tj],@Ti;
  649. if (#ayotaya == 1) set @Tj,@Tj+1;
  650. set @Ti,@Ti+1;
  651. //----------------Comodo:
  652. if (#comodo == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  653. if (#comodo == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  654. if (#comodo == 1) set @Tmenuref[@Tj],@Ti;
  655. if (#comodo == 1) set @Tj,@Tj+1;
  656. set @Ti,@Ti+1;
  657. //----------------Einbech:
  658. if (#einbech == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  659. if (#einbech == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  660. if (#einbech == 1) set @Tmenuref[@Tj],@Ti;
  661. if (#einbech == 1) set @Tj,@Tj+1;
  662. set @Ti,@Ti+1;
  663. //----------------Einbroch:
  664. if (#einbroch == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  665. if (#einbroch == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  666. if (#einbroch == 1) set @Tmenuref[@Tj],@Ti;
  667. if (#einbroch == 1) set @Tj,@Tj+1;
  668. set @Ti,@Ti+1;
  669. //----------------Geffen:
  670. if (#geffen == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  671. if (#geffen == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  672. if (#geffen == 1) set @Tmenuref[@Tj],@Ti;
  673. if (#geffen == 1) set @Tj,@Tj+1;
  674. set @Ti,@Ti+1;
  675. //----------------Gonryun:
  676. if (#gonryun == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  677. if (#gonryun == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  678. if (#gonryun == 1) set @Tmenuref[@Tj],@Ti;
  679. if (#gonryun == 1) set @Tj,@Tj+1;
  680. set @Ti,@Ti+1;
  681. //----------------Hugel:
  682. if (#hugel == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  683. if (#hugel == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  684. if (#hugel == 1) set @Tmenuref[@Tj],@Ti;
  685. if (#hugel == 1) set @Tj,@Tj+1;
  686. set @Ti,@Ti+1;
  687. //----------------Izlude:
  688. if (#izlude == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  689. if (#izlude == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  690. if (#izlude == 1) set @Tmenuref[@Tj],@Ti;
  691. if (#izlude == 1) set @Tj,@Tj+1;
  692. set @Ti,@Ti+1;
  693. //----------------Jawaii:
  694. if (#jawaii == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  695. if (#jawaii == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  696. if (#jawaii == 1) set @Tmenuref[@Tj],@Ti;
  697. if (#jawaii == 1) set @Tj,@Tj+1;
  698. set @Ti,@Ti+1;
  699. //----------------Lighthalzen:
  700. if (#lighthalzen == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  701. if (#lighthalzen == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  702. if (#lighthalzen == 1) set @Tmenuref[@Tj],@Ti;
  703. if (#lighthalzen == 1) set @Tj,@Tj+1;
  704. set @Ti,@Ti+1;
  705. //----------------Louyang:
  706. if (#louyang == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  707. if (#louyang == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  708. if (#louyang == 1) set @Tmenuref[@Tj],@Ti;
  709. if (#louyang == 1) set @Tj,@Tj+1;
  710. set @Ti,@Ti+1;
  711. //----------------Lutie
  712. if (#xmas == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  713. if (#xmas == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  714. if (#xmas == 1) set @Tmenuref[@Tj],@Ti;
  715. if (#xmas == 1) set @Tj,@Tj+1;
  716. set @Ti,@Ti+1;
  717. //----------------Morroc:
  718. if (#morocc == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  719. if (#morocc == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  720. if (#morocc == 1) set @Tmenuref[@Tj],@Ti;
  721. if (#morocc == 1) set @Tj,@Tj+1;
  722. set @Ti,@Ti+1;
  723. //----------------Niflheim:
  724. if (#niflheim == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  725. if (#niflheim == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  726. if (#niflheim == 1) set @Tmenuref[@Tj],@Ti;
  727. if (#niflheim == 1) set @Tj,@Tj+1;
  728. set @Ti,@Ti+1;
  729. //----------------Payon:
  730. if (#payon == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  731. if (#payon == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  732. if (#payon == 1) set @Tmenuref[@Tj],@Ti;
  733. if (#payon == 1) set @Tj,@Tj+1;
  734. set @Ti,@Ti+1;
  735. //----------------Umbala:
  736. if (#umbala == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  737. if (#umbala == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  738. if (#umbala == 1) set @Tmenuref[@Tj],@Ti;
  739. if (#umbala == 1) set @Tj,@Tj+1;
  740. set @Ti,@Ti+1;
  741. //----------------Yuno:
  742. if (#yuno == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
  743. if (#yuno == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
  744. if (#yuno == 1) set @Tmenuref[@Tj],@Ti;
  745. if (#yuno == 1) set @Tj,@Tj+1;
  746. set @Ti,@Ti+1;
  747. //----------------Cancel
  748. set @Tmenulist$[@Tj],@pTmenuitems$[@Ti];
  749. set @Tmenuref[@Tj],@Ti;
  750. return;
  751. }
  752. //====================Dungeon=Menu=Arrays==========================
  753. //----------------A FAKE DUNGEON FOR EXAMPLE // I do this to find back sections quickly altho almost the same name is a line below it now
  754. // setarray @pDmenuitems$[@Di], "Fake Dungeon"; // Name of Dungeon shown in Dungeon select Menu
  755. // setarray @pDprice[@Di], $QW_BW_PRICE; // warp prices (Basic ($QW_BW_PRICE), Advanced ($QW_AW_PRICE), Overseas $QW_OW_PRICE)
  756. // setarray @DLevels[@Di], 2; //number of levels in dungeon (very important if incorrect will shift all leveldata!!)
  757. //
  758. // setarray @DGat$[@Dref], "example_01.gat", "example_02.gat"; // mapfilename of dungeon level
  759. // setarray @DLevelName$[@Dref], "Example Level 1", "Example Level 2"; // level name shown in dungeon level select
  760. // setarray @DXcoords[@Dref], 123, 234; // X warp coords
  761. // setarray @DYcoords[@Dref], 123, 234;// Y warp coords
  762. // setarray @DDepth[@Dref], 0, 1; // relative depth to entrance to calculate extra warp fee
  763. //
  764. // if (#fake_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di]; // Builds menu item if there is a price for warping
  765. // if (#fake_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]; // Builds menu item if warping is free
  766. // if (#fake_dun == 1) set @Dmenuref[@Dj],@Di; // Allows the menu to find back which Dungeon you selected as it shifts because of dynamic menu's
  767. // if (#fake_dun == 1) set @Dj,@Dj+1; // set Dj higher because menu item has been added and make sure it doesn't get overwriten
  768. //
  769. // setarray @DLocRef[@Di], @Dref; // @DLocRef, reference to locate where the first level of the dungeon warp information is in the other arrays
  770. // set @Dref, @Dref+@DLevels[@Di]; // same as @Dj but then for the leveldata which fills up alot more quickly
  771. // set @Di,@Di+1; // loop counter to get data in right order and to make sure i can find back what option you select
  772. //
  773. // Small note:
  774. // when adding your own dungeon data, you can leave 'if (#fake_dun == 1)' out and everyone will get the option to warp to
  775. // if you want to use a variable make your own dungeon unlocker inside the dungeon (usually half way near a warp to next level)
  776. // example:
  777. //( syntax: example_01.gat,xcoord,ycoord,directionfacing script Name of NPC NPC-ID,{ )
  778. //
  779. //example_01.gat,213,213,4 script Warpra Helper 112,{
  780. // if (#fake_dun == 1) mes "[Warpra]";
  781. // if (#fake_dun == 1) mes "Sorry I can only unlock this location.";
  782. // if (#fake_dun == 1) close;
  783. // set #fake_dun,1;
  784. // mes "[Warpra]";
  785. // mes "A FAKE DUNGEON FOR EXAMPLE unlocked!";
  786. // close;
  787. // }
  788. set @Di,0;
  789. set @Dj,0;
  790. set @Dref,0;
  791. function script QWS_Darray {
  792. //----------------ABYSS LAKE
  793. setarray @pDmenuitems$[@Di], "Abyss Lake";
  794. setarray @pDprice[@Di], $QW_AW_PRICE;
  795. setarray @DLevels[@Di], 3;
  796. setarray @DGat$[@Dref], "abyss_01.gat", "abyss_02.gat", "abyss_03.gat";
  797. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  798. setarray @DXcoords[@Dref], 265, 275, 116;
  799. setarray @DYcoords[@Dref], 273, 270, 27;
  800. setarray @DDepth[@Dref], 0, 1, 2;
  801. if (#abyss == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  802. if (#abyss == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  803. if (#abyss == 1) set @Dmenuref[@Dj],@Di;
  804. if (#abyss == 1) set @Dj,@Dj+1;
  805. setarray @DLocRef[@Di], @Dref;
  806. set @Dref, @Dref+@DLevels[@Di];
  807. set @Di,@Di+1;
  808. //----------------AMATSU DUNGEON
  809. setarray @pDmenuitems$[@Di], "Amatsu Dungeon";
  810. setarray @pDprice[@Di], $QW_OW_PRICE;
  811. setarray @DLevels[@Di], 3;
  812. setarray @DGat$[@Dref], "ama_dun01.gat", "ama_dun02.gat", "ama_dun03.gat";
  813. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  814. setarray @DXcoords[@Dref], 227, 32, 119;
  815. setarray @DYcoords[@Dref], 10, 43, 15;
  816. setarray @DDepth[@Dref], 0, 1, 2;
  817. if (#ama_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  818. if (#ama_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  819. if (#ama_dun == 1) set @Dmenuref[@Dj],@Di;
  820. if (#ama_dun == 1) set @Dj,@Dj+1;
  821. setarray @DLocRef[@Di], @Dref;
  822. set @Dref, @Dref+@DLevels[@Di];
  823. set @Di,@Di+1;
  824. //----------------ANT HELL
  825. setarray @pDmenuitems$[@Di], "Ant Hell Dungeon";
  826. setarray @pDprice[@Di], $QW_BW_PRICE;
  827. setarray @DLevels[2], 2;
  828. setarray @DGat$[@Dref], "anthell01.gat", "anthell02.gat";
  829. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  830. setarray @DXcoords[@Dref], 32, 34;
  831. setarray @DYcoords[@Dref], 262, 263;
  832. setarray @DDepth[@Dref], 0, 1;
  833. if (#anthell == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  834. if (#anthell == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  835. if (#anthell == 1) set @Dmenuref[@Dj],@Di;
  836. if (#anthell == 1) set @Dj,@Dj+1;
  837. setarray @DLocRef[@Di], @Dref;
  838. set @Dref, @Dref+@DLevels[@Di];
  839. set @Di,@Di+1;
  840. //----------------AYOTAYA
  841. setarray @pDmenuitems$[@Di], "Ayotaya Dungeon";
  842. setarray @pDprice[@Di], $QW_OW_PRICE;
  843. setarray @DLevels[3], 2;
  844. setarray @DGat$[@Dref], "ayo_dun01.gat", "ayo_dun02.gat";
  845. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  846. setarray @DXcoords[@Dref], 275, 150;
  847. setarray @DYcoords[@Dref], 17, 13;
  848. setarray @DDepth[@Dref], 0, 1;
  849. if (#ayotaya_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  850. if (#ayotaya_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  851. if (#ayotaya_dun == 1) set @Dmenuref[@Dj],@Di;
  852. if (#ayotaya_dun == 1) set @Dj,@Dj+1;
  853. setarray @DLocRef[@Di], @Dref;
  854. set @Dref, @Dref+@DLevels[@Di];
  855. set @Di,@Di+1;
  856. //----------------BYALAN
  857. setarray @pDmenuitems$[@Di], "Byalan Dungeon";
  858. setarray @pDprice[@Di], $QW_BW_PRICE;
  859. setarray @DLevels[4], 5;
  860. setarray @DGat$[@Dref], "iz_dun00.gat", "iz_dun01.gat", "iz_dun02.gat", "iz_dun03.gat", "iz_dun04.gat";
  861. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
  862. setarray @DXcoords[@Dref], 168, 41, 236, 32, 26;
  863. setarray @DYcoords[@Dref], 168, 37, 204, 63, 27;
  864. setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
  865. if (#iz_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  866. if (#iz_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  867. if (#iz_dun == 1) set @Dmenuref[@Dj],@Di;
  868. if (#iz_dun == 1) set @Dj,@Dj+1;
  869. setarray @DLocRef[@Di], @Dref;
  870. set @Dref, @Dref+@DLevels[@Di];
  871. set @Di,@Di+1;
  872. //----------------CLOCK TOWER
  873. setarray @pDmenuitems$[@Di], "Clock Tower Dungeon";
  874. setarray @pDprice[@Di], $QW_AW_PRICE;
  875. setarray @DLevels[5], 8;
  876. setarray @DGat$[@Dref], "c_tower1.gat", "c_tower2.gat", "c_tower3.gat", "c_tower4.gat", "alde_dun01.gat", "alde_dun02.gat", "alde_dun03.gat", "alde_dun04.gat";
  877. setarray @DLevelName$[@Dref], "Clock Tower Level 1", "Clock Tower Level 2", "Clock Tower Level 3", "Clock Tower Level 4", "Basement 1F", "Basement 2F", "Basement 3F", "Basement 4F";
  878. setarray @DXcoords[@Dref], 200, 268, 64, 32, 197, 262, 276, 130;
  879. setarray @DYcoords[@Dref], 163, 26, 148, 63, 25, 41, 53, 130;
  880. setarray @DDepth[@Dref], 0, 1, 2, 3, 1, 2, 3, 4;
  881. if (#c_tower == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  882. if (#c_tower == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  883. if (#c_tower == 1) set @Dmenuref[@Dj],@Di;
  884. if (#c_tower == 1) set @Dj,@Dj+1;
  885. setarray @DLocRef[@Di], @Dref;
  886. set @Dref, @Dref+@DLevels[@Di];
  887. set @Di,@Di+1;
  888. //----------------COAL MINE
  889. setarray @pDmenuitems$[@Di], "Coal Mine Dungeon";
  890. setarray @pDprice[@Di], $QW_AW_PRICE;
  891. setarray @DLevels[6], 3;
  892. setarray @DGat$[@Dref], "mjo_dun01.gat", "mjo_dun02.gat", "mjo_dun03.gat";
  893. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  894. setarray @DXcoords[@Dref], 52, 381, 302;
  895. setarray @DYcoords[@Dref], 17, 343, 261;
  896. setarray @DDepth[@Dref], 0, 1, 2;
  897. if (#mjo_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  898. if (#mjo_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  899. if (#mjo_dun == 1) set @Dmenuref[@Dj],@Di;
  900. if (#mjo_dun == 1) set @Dj,@Dj+1;
  901. setarray @DLocRef[@Di], @Dref;
  902. set @Dref, @Dref+@DLevels[@Di];
  903. set @Di,@Di+1;
  904. //----------------CULVERT
  905. setarray @pDmenuitems$[@Di], "Culvert Dungeon";
  906. setarray @pDprice[@Di], $QW_BW_PRICE;
  907. setarray @DLevels[7], 4;
  908. setarray @DGat$[@Dref], "prt_sewb1.gat", "prt_sewb2.gat", "prt_sewb3.gat", "prt_sewb4.gat";
  909. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4";
  910. setarray @DXcoords[@Dref], 132, 19, 180, 100;
  911. setarray @DYcoords[@Dref], 248, 19, 169, 92;
  912. setarray @DDepth[@Dref], 0, 1, 2, 3;
  913. if (#prt_sewb == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  914. if (#prt_sewb == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  915. if (#prt_sewb == 1) set @Dmenuref[@Dj],@Di;
  916. if (#prt_sewb == 1) set @Dj,@Dj+1;
  917. setarray @DLocRef[@Di], @Dref;
  918. set @Dref, @Dref+@DLevels[@Di];
  919. set @Di,@Di+1;
  920. //----------------EINBECH DUNGEON
  921. setarray @pDmenuitems$[@Di], "Einbech Dungeon";
  922. setarray @pDprice[@Di], $QW_AW_PRICE;
  923. setarray @DLevels[8], 2;
  924. setarray @DGat$[@Dref], "ein_dun01.gat", "ein_dun02.gat";
  925. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  926. setarray @DXcoords[@Dref], 22, 292;
  927. setarray @DYcoords[@Dref], 14, 290;
  928. setarray @DDepth[@Dref], 0, 1;
  929. if (#einbech_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  930. if (#einbech_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  931. if (#einbech_dun == 1) set @Dmenuref[@Dj],@Di;
  932. if (#einbech_dun == 1) set @Dj,@Dj+1;
  933. setarray @DLocRef[@Di], @Dref;
  934. set @Dref, @Dref+@DLevels[@Di];
  935. set @Di,@Di+1;
  936. //----------------GEFENIA DUNGEON
  937. setarray @pDmenuitems$[@Di], "Gefenia Dungeon";
  938. setarray @pDprice[@Di], $QW_BW_PRICE;
  939. setarray @DLevels[9], 4;
  940. setarray @DGat$[@Dref], "gefenia01.gat", "gefenia02.gat", "gefenia03.gat", "gefenia04.gat";
  941. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4";
  942. setarray @DXcoords[@Dref], 59, 201, 264, 33;
  943. setarray @DYcoords[@Dref], 167, 35, 236, 270;
  944. setarray @DDepth[@Dref], 0, 1, 2, 3;
  945. if (#gef_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  946. if (#gef_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  947. if (#gef_dun == 1) set @Dmenuref[@Dj],@Di;
  948. if (#gef_dun == 1) set @Dj,@Dj+1;
  949. setarray @DLocRef[@Di], @Dref;
  950. set @Dref, @Dref+@DLevels[@Di];
  951. set @Di,@Di+1;
  952. //----------------GEFFEN DUNGEON
  953. setarray @pDmenuitems$[@Di], "Geffen Dungeon";
  954. setarray @pDprice[@Di], $QW_BW_PRICE;
  955. setarray @DLevels[@Di], 4;
  956. setarray @DGat$[@Dref], "gef_dun00.gat", "gef_dun01.gat", "gef_dun02.gat", "gef_dun03.gat";
  957. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4";
  958. setarray @DXcoords[@Dref], 104, 115, 106, 203;
  959. setarray @DYcoords[@Dref], 100, 236, 132, 200;
  960. setarray @DDepth[@Dref], 0, 1, 2, 3;
  961. if (#gef_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  962. if (#gef_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  963. if (#gef_dun == 1) set @Dmenuref[@Dj],@Di;
  964. if (#gef_dun == 1) set @Dj,@Dj+1;
  965. setarray @DLocRef[@Di], @Dref;
  966. set @Dref, @Dref+@DLevels[@Di];
  967. set @Di,@Di+1;
  968. //----------------GLAST HEIM
  969. setarray @pDmenuitems$[@Di], "Glast Heim Dungeon";
  970. setarray @pDprice[@Di], $QW_BW_PRICE;
  971. setarray @DLevels[@Di], 17;
  972. setarray @DGat$[@Dref], "glast_01.gat", "gl_church.gat", "gl_chyard.gat", "gl_in01.gat", "gl_cas01.gat", "gl_cas02.gat", "gl_knt01.gat", "gl_knt02.gat", "gl_prison.gat", "gl_prison1.gat", "gl_step.gat", "gl_sew01.gat", "gl_sew02.gat", "gl_sew03.gat", "gl_sew04.gat", "gl_dun01.gat", "gl_dun02.gat";
  973. setarray @DLevelName$[@Dref], "Glast Heim Entrance", "St. Abbey", "Churchyard", "Inside Glast Heim", "Castle 1", "Castle 2", "Chivalry 1", "Chivalry 2", "Prison 1", "Prison 2", "Steps", "Sewers 1", "Sewers 2", "Sewers 3", "Sewers 4", "Lowest Cave 1", "Lowest Cave 2";
  974. setarray @DXcoords[@Dref], 370, 156, 147, 121, 199, 104, 150, 157, 14, 150, 117, 258, 108, 171, 68, 133, 224;
  975. setarray @DYcoords[@Dref], 300, 8, 15, 59, 29, 25, 10, 287, 70, 14, 124, 255, 291, 273, 277, 271, 274;
  976. setarray @DDepth[@Dref], 0, 1, 2, 1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 4, 5, 6;
  977. if (#gl_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  978. if (#gl_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  979. if (#gl_dun == 1) set @Dmenuref[@Dj],@Di;
  980. if (#gl_dun == 1) set @Dj,@Dj+1;
  981. setarray @DLocRef[@Di], @Dref;
  982. set @Dref, @Dref+@DLevels[@Di];
  983. set @Di,@Di+1;
  984. //----------------GONRYUN DUNGEON
  985. setarray @pDmenuitems$[@Di], "Gonryun Dungeon";
  986. setarray @pDprice[@Di], $QW_OW_PRICE;
  987. setarray @DLevels[@Di], 3;
  988. setarray @DGat$[@Dref], "gon_dun01.gat", "gon_dun02.gat", "gon_dun03.gat";
  989. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  990. setarray @DXcoords[@Dref], 143, 17, 68;
  991. setarray @DYcoords[@Dref], 59, 114, 9;
  992. setarray @DDepth[@Dref], 0, 1, 2;
  993. if (#gon_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  994. if (#gon_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  995. if (#gon_dun == 1) set @Dmenuref[@Dj],@Di;
  996. if (#gon_dun == 1) set @Dj,@Dj+1;
  997. setarray @DLocRef[@Di], @Dref;
  998. set @Dref, @Dref+@DLevels[@Di];
  999. set @Di,@Di+1;
  1000. //----------------HIDDEN DUNGEON
  1001. setarray @pDmenuitems$[@Di], "Hidden Dungeon";
  1002. setarray @pDprice[@Di], $QW_BW_PRICE;
  1003. setarray @DLevels[@Di], 3;
  1004. setarray @DGat$[@Dref], "prt_maze01.gat", "prt_maze02.gat", "prt_maze03.gat";
  1005. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  1006. setarray @DXcoords[@Dref], 176, 94, 23;
  1007. setarray @DYcoords[@Dref], 6, 19, 8;
  1008. setarray @DDepth[@Dref], 0, 1, 2;
  1009. if (#hid_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1010. if (#hid_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1011. if (#hid_dun == 1) set @Dmenuref[@Dj],@Di;
  1012. if (#hid_dun == 1) set @Dj,@Dj+1;
  1013. setarray @DLocRef[@Di], @Dref;
  1014. set @Dref, @Dref+@DLevels[@Di];
  1015. set @Di,@Di+1;
  1016. //----------------JUPEROS CAVE
  1017. setarray @pDmenuitems$[@Di], "Juperos Cave";
  1018. setarray @pDprice[@Di], $QW_AW_PRICE;
  1019. setarray @DLevels[@Di], 3;
  1020. setarray @DGat$[@Dref], "juperos_01.gat", "juperos_02.gat";
  1021. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  1022. setarray @DXcoords[@Dref], 53, 36;
  1023. setarray @DYcoords[@Dref], 247, 60;
  1024. setarray @DDepth[@Dref], 0, 1;
  1025. if (#lighthalzen_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1026. if (#lighthalzen_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1027. if (#lighthalzen_dun == 1) set @Dmenuref[@Dj],@Di;
  1028. if (#lighthalzen_dun == 1) set @Dj,@Dj+1;
  1029. setarray @DLocRef[@Di], @Dref;
  1030. set @Dref, @Dref+@DLevels[@Di];
  1031. set @Di,@Di+1;
  1032. //----------------LIGHTHALZEN BIO LAB
  1033. setarray @pDmenuitems$[@Di], "Lighthalzen Bio Lab", "Louyang Dungeon", "Magma Dungeon", "Odin Temple", "Orc Dungeon", "Payon Dungeon", "Pyramids Dungeon", "Sphinx Dungeon", "Sunken Ship Dungeon", "Thanatos Tower", "Toy Factory Dungeon", "Turtle Island Dungeon", "Umbala Dungeon", "Cancel";
  1034. setarray @pDprice[@Di], $QW_AW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, 0;
  1035. setarray @DLevels[@Di], 3;
  1036. setarray @DGat$[@Dref], "lhz_dun01.gat", "lhz_dun02.gat", "lhz_dun03.gat";
  1037. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
  1038. setarray @DXcoords[@Dref], 150, 150, 140;
  1039. setarray @DYcoords[@Dref], 287, 18, 137;
  1040. setarray @DDepth[@Dref], 0, 1, 2;
  1041. if (#lighthalzen_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1042. if (#lighthalzen_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1043. if (#lighthalzen_dun == 1) set @Dmenuref[@Dj],@Di;
  1044. if (#lighthalzen_dun == 1) set @Dj,@Dj+1;
  1045. setarray @DLocRef[@Di], @Dref;
  1046. set @Dref, @Dref+@DLevels[@Di];
  1047. set @Di,@Di+1;
  1048. //----------------LOUYANG DUNGEON
  1049. setarray @pDmenuitems$[@Di], "Louyang Dungeon";
  1050. setarray @pDprice[@Di], $QW_OW_PRICE;
  1051. setarray @DLevels[@Di], 2;
  1052. setarray @DGat$[@Dref], "lou_dun02.gat", "lou_dun03.gat";
  1053. setarray @DLevelName$[@Dref], "Royal Tomb Level 1", "Royal Tomb Level 2";
  1054. setarray @DXcoords[@Dref], 282, 165;
  1055. setarray @DYcoords[@Dref], 20, 38;
  1056. setarray @DDepth[@Dref], 0, 1;
  1057. if (#louyang_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1058. if (#louyang_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1059. if (#louyang_dun == 1) set @Dmenuref[@Dj],@Di;
  1060. if (#louyang_dun == 1) set @Dj,@Dj+1;
  1061. setarray @DLocRef[@Di], @Dref;
  1062. set @Dref, @Dref+@DLevels[@Di];
  1063. set @Di,@Di+1;
  1064. //----------------MAGMA DUNGEON
  1065. setarray @pDmenuitems$[@Di], "Magma Dungeon";
  1066. setarray @pDprice[@Di], $QW_AW_PRICE;
  1067. setarray @DLevels[@Di], 2;
  1068. setarray @DGat$[@Dref], "mag_dun01.gat", "mag_dun02.gat";
  1069. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  1070. setarray @DXcoords[@Dref], 126, 47;
  1071. setarray @DYcoords[@Dref], 69, 32;
  1072. setarray @DDepth[@Dref], 0, 1;
  1073. if (#mag_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1074. if (#mag_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1075. if (#mag_dun == 1) set @Dmenuref[@Dj],@Di;
  1076. if (#mag_dun == 1) set @Dj,@Dj+1;
  1077. setarray @DLocRef[@Di], @Dref;
  1078. set @Dref, @Dref+@DLevels[@Di];
  1079. set @Di,@Di+1;
  1080. //----------------ODIN TEMPLE
  1081. setarray @pDmenuitems$[@Di], "Odin Temple";
  1082. setarray @pDprice[@Di], $QW_AW_PRICE;
  1083. setarray @DLevels[@Di], 1;
  1084. setarray @DGat$[@Dref], "odin_tem01.gat";
  1085. setarray @DLevelName$[@Dref], "Level 1";
  1086. setarray @DXcoords[@Dref], 96;
  1087. setarray @DYcoords[@Dref], 145;
  1088. setarray @DDepth[@Dref], 0;
  1089. if (#odintemple == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1090. if (#odintemple == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1091. if (#odintemple == 1) set @Dmenuref[@Dj],@Di;
  1092. if (#odintemple == 1) set @Dj,@Dj+1;
  1093. setarray @DLocRef[@Di], @Dref;
  1094. set @Dref, @Dref+@DLevels[@Di];
  1095. set @Di,@Di+1;
  1096. //----------------ORC DUNGEON
  1097. setarray @pDmenuitems$[@Di], "Orc Dungeon";
  1098. setarray @pDprice[@Di], $QW_BW_PRICE;
  1099. setarray @DLevels[@Di], 2;
  1100. setarray @DGat$[@Dref], "orcsdun01.gat", "orcsdun02.gat";
  1101. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  1102. setarray @DXcoords[@Dref], 32, 21;
  1103. setarray @DYcoords[@Dref], 169, 185;
  1104. setarray @DDepth[@Dref], 0, 1;
  1105. if (#orcsdun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1106. if (#orcsdun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1107. if (#orcsdun == 1) set @Dmenuref[@Dj],@Di;
  1108. if (#orcsdun == 1) set @Dj,@Dj+1;
  1109. setarray @DLocRef[@Di], @Dref;
  1110. set @Dref, @Dref+@DLevels[@Di];
  1111. set @Di,@Di+1;
  1112. //----------------PAYON DUNGEON
  1113. setarray @pDmenuitems$[@Di], "Payon Dungeon";
  1114. setarray @pDprice[@Di], $QW_BW_PRICE;
  1115. setarray @DLevels[@Di], 5;
  1116. setarray @DGat$[@Dref], "pay_dun00.gat", "pay_dun01.gat", "pay_dun02.gat", "pay_dun03.gat", "pay_dun04.gat";
  1117. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
  1118. setarray @DXcoords[@Dref], 22, 19, 19, 155, 201;
  1119. setarray @DYcoords[@Dref], 180, 33, 63, 159, 204;
  1120. setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
  1121. if (#pay_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1122. if (#pay_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1123. if (#pay_dun == 1) set @Dmenuref[@Dj],@Di;
  1124. if (#pay_dun == 1) set @Dj,@Dj+1;
  1125. setarray @DLocRef[@Di], @Dref;
  1126. set @Dref, @Dref+@DLevels[@Di];
  1127. set @Di,@Di+1;
  1128. //----------------PYRAMIDS
  1129. setarray @pDmenuitems$[@Di], "Pyramids Dungeon";
  1130. setarray @pDprice[@Di], $QW_BW_PRICE;
  1131. setarray @DLevels[@Di], 6;
  1132. setarray @DGat$[@Dref], "moc_pryd01.gat", "moc_pryd02.gat", "moc_pryd03.gat", "moc_pryd04.gat", "moc_pryd05.gat", "moc_pryd06.gat";
  1133. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Basement 1", "Basement 2";
  1134. setarray @DXcoords[@Dref], 192, 10, 100, 181, 94, 192;
  1135. setarray @DYcoords[@Dref], 9, 192, 92, 11, 96, 8;
  1136. setarray @DDepth[@Dref], 0, 1, 2, 3, 1, 2;
  1137. if (#moc_pryd == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1138. if (#moc_pryd == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1139. if (#moc_pryd == 1) set @Dmenuref[@Dj],@Di;
  1140. if (#moc_pryd == 1) set @Dj,@Dj+1;
  1141. setarray @DLocRef[@Di], @Dref;
  1142. set @Dref, @Dref+@DLevels[@Di];
  1143. set @Di,@Di+1;
  1144. //----------------SPHINX
  1145. setarray @pDmenuitems$[@Di], "Sphinx Dungeon";
  1146. setarray @pDprice[@Di], $QW_BW_PRICE;
  1147. setarray @DLevels[@Di], 5;
  1148. setarray @DGat$[@Dref], "in_sphinx1.gat", "in_sphinx2.gat", "in_sphinx3.gat", "in_sphinx4.gat", "in_sphinx5.gat";
  1149. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
  1150. setarray @DXcoords[@Dref], 192, 149, 210, 10, 100;
  1151. setarray @DYcoords[@Dref], 9, 81, 54, 222, 99;
  1152. setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
  1153. if (#in_sphinx == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1154. if (#in_sphinx == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1155. if (#in_sphinx == 1) set @Dmenuref[@Dj],@Di;
  1156. if (#in_sphinx == 1) set @Dj,@Dj+1;
  1157. setarray @DLocRef[@Di], @Dref;
  1158. set @Dref, @Dref+@DLevels[@Di];
  1159. set @Di,@Di+1;
  1160. //----------------SUNKEN SHIP
  1161. setarray @pDmenuitems$[@Di], "Sunken Ship Dungeon";
  1162. setarray @pDprice[@Di], $QW_BW_PRICE;
  1163. setarray @DLevels[@Di], 2;
  1164. setarray @DGat$[@Dref], "treasure01.gat", "treasure02.gat";
  1165. setarray @DLevelName$[@Dref], "Level 1", "Level 2";
  1166. setarray @DXcoords[@Dref], 69, 102;
  1167. setarray @DYcoords[@Dref], 24, 27;
  1168. setarray @DDepth[@Dref], 0, 1;
  1169. if (#treasure == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1170. if (#treasure == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1171. if (#treasure == 1) set @Dmenuref[@Dj],@Di;
  1172. if (#treasure == 1) set @Dj,@Dj+1;
  1173. setarray @DLocRef[@Di], @Dref;
  1174. set @Dref, @Dref+@DLevels[@Di];
  1175. set @Di,@Di+1;
  1176. //----------------THANATOS TOWER
  1177. setarray @pDmenuitems$[@Di], "Thanatos Tower";
  1178. setarray @pDprice[@Di], $QW_AW_PRICE;
  1179. setarray @DLevels[@Di], 13;
  1180. setarray @DGat$[@Dref], "tha_t01.gat", "tha_t02.gat", "tha_t03.gat", "tha_t04.gat", "tha_t05.gat", "tha_t06.gat", "tha_t07.gat", "tha_t08.gat", "tha_t09.gat", "tha_t10.gat", "tha_t11.gat", "tha_t12.gat", "thana_boss.gat";
  1181. setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Level 7", "Level 8", "Level 9", "Level 10", "Level 11", "Level 12", "Thanatos Boss";
  1182. setarray @DXcoords[@Dref], 150, 150, 220, 59, 62, 206, 35, 105, 88, 168, 90, 129, 85;
  1183. setarray @DYcoords[@Dref], 35, 136, 158, 143, 11, 8, 166, 44, 145, 138, 36, 83, 76;
  1184. setarray @DDepth[@Dref], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
  1185. if (#thanatos_tower == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1186. if (#thanatos_tower == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1187. if (#thanatos_tower == 1) set @Dmenuref[@Dj],@Di;
  1188. if (#thanatos_tower == 1) set @Dj,@Dj+1;
  1189. setarray @DLocRef[@Di], @Dref;
  1190. set @Dref, @Dref+@DLevels[@Di];
  1191. set @Di,@Di+1;
  1192. //----------------TOY FACTORY
  1193. setarray @pDmenuitems$[@Di], "Toy Factory Dungeon";
  1194. setarray @pDprice[@Di], $QW_AW_PRICE;
  1195. setarray @DLevels[@Di], 2;
  1196. setarray @DGat$[@Dref], "xmas_dun01.gat", "xmas_dun02.gat";
  1197. setarray @DLevelName$[@Dref], "Factory Warehouse", "Classifying Room";
  1198. setarray @DXcoords[@Dref], 205, 129;
  1199. setarray @DYcoords[@Dref], 16, 133;
  1200. setarray @DDepth[@Dref], 0, 1;
  1201. if (#xmas_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1202. if (#xmas_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1203. if (#xmas_dun == 1) set @Dmenuref[@Dj],@Di;
  1204. if (#xmas_dun == 1) set @Dj,@Dj+1;
  1205. setarray @DLocRef[@Di], @Dref;
  1206. set @Dref, @Dref+@DLevels[@Di];
  1207. set @Di,@Di+1;
  1208. //----------------TURTLE ISTLAND
  1209. setarray @pDmenuitems$[@Di], "Turtle Island Dungeon";
  1210. setarray @pDprice[@Di], $QW_AW_PRICE;
  1211. setarray @DLevels[@Di], 4;
  1212. setarray @DGat$[@Dref], "tur_dun01.gat", "tur_dun02.gat", "tur_dun03.gat", "tur_dun04.gat";
  1213. setarray @DLevelName$[@Dref], "Outside", "Level 1", "Level 2", "Level 3";
  1214. setarray @DXcoords[@Dref], 161, 148, 132, 100;
  1215. setarray @DYcoords[@Dref], 34, 256, 190, 192;
  1216. setarray @DDepth[@Dref], 0, 0, 1, 2;
  1217. if (#tur_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1218. if (#tur_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1219. if (#tur_dun == 1) set @Dmenuref[@Dj],@Di;
  1220. if (#tur_dun == 1) set @Dj,@Dj+1;
  1221. setarray @DLocRef[@Di], @Dref;
  1222. set @Dref, @Dref+@DLevels[@Di];
  1223. set @Di,@Di+1;
  1224. //----------------UMBALA
  1225. setarray @pDmenuitems$[@Di], "Umbala Dungeon";
  1226. setarray @pDprice[@Di], $QW_OW_PRICE;
  1227. setarray @DLevels[@Di], 3;
  1228. setarray @DGat$[@Dref], "um_dun01.gat", "um_dun02.gat", "yggdrasil01.gat";
  1229. setarray @DLevelName$[@Dref], "Carpenter's Shop in The Tree", "Passage to a Foreign World", "Hvergelmir's Fountain";
  1230. setarray @DXcoords[@Dref], 205, 48, 40;
  1231. setarray @DYcoords[@Dref], 16, 30, 63;
  1232. setarray @DDepth[@Dref], 0, 1, 2;
  1233. if (#um_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
  1234. if (#um_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
  1235. if (#um_dun == 1) set @Dmenuref[@Dj],@Di;
  1236. if (#um_dun == 1) set @Dj,@Dj+1;
  1237. setarray @DLocRef[@Di], @Dref;
  1238. set @Dref, @Dref+@DLevels[@Di];
  1239. set @Di,@Di+1;
  1240. //----------------Cancel
  1241. setarray @pDmenuitems$[@Di], "Cancel";
  1242. setarray @pDprice[@Di], 0;
  1243. set @Dmenulist$[@Dj],@pDmenuitems$[@Di];
  1244. set @Dmenuref[@Dj],@Di;
  1245. return;
  1246. }
  1247. function script QWS_DLarray {
  1248. //----------------Start building Menu
  1249. set @DWi,@DLocRef[@DwarpMenu]; // That's our loop counter.
  1250. set @DWj,0; // That's the menu lines counter.
  1251. cleararray @DWLmenulist$[0],"",20; // Clearing the array to get rid off ghost items in menu
  1252. Loop:
  1253. // Main Loop
  1254. set @warpprice, (@pDprice[@DwarpMenu]+$QW_DW_FEE*@DDepth[@DWi]);
  1255. if (@warpprice != 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWi]+" -> "+@warpprice;
  1256. if (@warpprice == 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWi];
  1257. set @DWLmenuref[@DWj],@DWi;
  1258. set @DWj,@DWj+1;
  1259. set @DWi,@DWi+1;
  1260. if (@DWj == @DLevels[@DwarpMenu]) goto make_exit;
  1261. goto Loop;
  1262. make_exit:
  1263. set @DWLmenulist$[@DWj], "Exit";
  1264. set @DWLmenuref[@DWj],1337; //impossible number easy to track back
  1265. return;
  1266. }
  1267. //============================Warpras==============================
  1268. alb2trea.gat,73,101,4 script Warpra 113,{
  1269. callfunc "Q_Warpra",1;
  1270. }
  1271. ama_fild01.gat,178,325,1 script Warpra 113,{
  1272. callfunc "Q_Warpra",1;
  1273. }
  1274. gef_fild10.gat,71,339,4 script Warpra 113,{
  1275. callfunc "Q_Warpra",1;
  1276. }
  1277. izlu2dun.gat,104,82,4 script Warpra 113,{
  1278. callfunc "Q_Warpra",1;
  1279. }
  1280. mjolnir_02.gat,85,363,4 script Warpra 113,{
  1281. callfunc "Q_Warpra",1;
  1282. }
  1283. moc_fild04.gat,207,331,4 script Warpra 113,{
  1284. callfunc "Q_Warpra",1;
  1285. }
  1286. moc_fild19.gat,106,97,4 script Warpra 113,{
  1287. callfunc "Q_Warpra",1;
  1288. }
  1289. moc_ruins.gat,64,166,4 script Warpra 113,{
  1290. callfunc "Q_Warpra",1;
  1291. }
  1292. niflheim.gat,197,192,3 script Warpra 113,{
  1293. callfunc "Q_Warpra",1;
  1294. }
  1295. pay_arche.gat,39,135,4 script Warpra 113,{
  1296. callfunc "Q_Warpra",1;
  1297. }
  1298. prt_fild05.gat,273,215,4 script Warpra 113,{
  1299. callfunc "Q_Warpra",1;
  1300. }
  1301. tur_dun01.gat,148,239,4 script Warpra 113,{
  1302. callfunc "Q_Warpra",1;
  1303. }
  1304. valkyrie.gat,48,35,8 script Warpra 113,{
  1305. callfunc "Q_Warpra",1;
  1306. }
  1307. yuno_fild03.gat,37,135,4 script Warpra 113,{
  1308. callfunc "Q_Warpra",1;
  1309. }
  1310. alberta.gat,32,240,4 script Warpra 113,{
  1311. if (#alberta != 0) callfunc "Q_Warpra",0;
  1312. set #alberta,1;
  1313. mes "[Warpra]";
  1314. mes "Alberta Town unlocked!";
  1315. close;
  1316. }
  1317. aldebaran.gat,146,118,4 script Warpra 113,{
  1318. if (#aldebaran != 0) callfunc "Q_Warpra",0;
  1319. set #aldebaran,1;
  1320. mes "[Warpra]";
  1321. mes "Aldebaran Town unlocked!";
  1322. close;
  1323. }
  1324. ayothaya.gat,216,171,5 script Warpra 113,{
  1325. if (#ayotaya != 0) callfunc "Q_Warpra",0;
  1326. set #ayotaya,1;
  1327. mes "[Warpra]";
  1328. mes "Ayotaya Town unlocked!";
  1329. close;
  1330. }
  1331. amatsu.gat,193,81,1 script Warpra 113,{
  1332. if (#amatsu != 0) callfunc "Q_Warpra",0;
  1333. set #amatsu,1;
  1334. mes "[Warpra]";
  1335. mes "Amatsu Town unlocked!";
  1336. close;
  1337. }
  1338. comodo.gat,195,158,4 script Warpra 113,{
  1339. if (#comodo != 0) callfunc "Q_Warpra",0;
  1340. set #comodo,1;
  1341. mes "[Warpra]";
  1342. mes "Comodo Town unlocked!";
  1343. close;
  1344. }
  1345. einbroch.gat,229,196,5 script Warpra 113,{
  1346. if (#einbroch != 0) callfunc "Q_Warpra",0;
  1347. set #einbroch,1;
  1348. mes "[Warpra]";
  1349. mes "Einbroch Town unlocked!";
  1350. close;
  1351. }
  1352. einbech.gat,173,131,5 script Warpra 113,{
  1353. if (#einbech != 0) callfunc "Q_Warpra",0;
  1354. set #einbech,1;
  1355. mes "[Warpra]";
  1356. mes "Einbech Town unlocked!";
  1357. close;
  1358. }
  1359. geffen.gat,116,66,4 script Warpra 113,{
  1360. if (#geffen != 0) callfunc "Q_Warpra",0;
  1361. set #geffen,1;
  1362. mes "[Warpra]";
  1363. mes "Geffen Town unlocked!";
  1364. close;
  1365. }
  1366. gonryun.gat,152,130,4 script Warpra 113,{
  1367. if (#gonryun != 0) callfunc "Q_Warpra",0;
  1368. set #gonryun,1;
  1369. mes "[Warpra]";
  1370. mes "Gonryun Town unlocked!";
  1371. close;
  1372. }
  1373. hugel.gat,90,127,5 script Warpra 113,{
  1374. if (#hugel != 0) callfunc "Q_Warpra",0;
  1375. set #hugel,1;
  1376. mes "[Warpra]";
  1377. mes "Hugel Town unlocked!";
  1378. close;
  1379. }
  1380. jawaii.gat,107,182,5 script Warpra 113,{
  1381. if (#jawaii != 0) callfunc "Q_Warpra",0;
  1382. set #jawaii,1;
  1383. mes "[Warpra]";
  1384. mes "Jawaii Town unlocked!";
  1385. close;
  1386. }
  1387. izlude.gat,132,116,4 script Warpra 113,{
  1388. if (#izlude != 0) callfunc "Q_Warpra",0;
  1389. set #izlude,1;
  1390. mes "[Warpra]";
  1391. mes "Izlude Town unlocked!";
  1392. close;
  1393. }
  1394. lighthalzen.gat,153,100,5 script Warpra 113,{
  1395. if (#lighthalzen != 0) callfunc "Q_Warpra",0;
  1396. set #lighthalzen,1;
  1397. mes "[Warpra]";
  1398. mes "Lighthalzen Town unlocked!";
  1399. close;
  1400. }
  1401. louyang.gat,211,106,4 script Warpra 113,{
  1402. if (#louyang != 0) callfunc "Q_Warpra",0;
  1403. set #louyang,1;
  1404. mes "[Warpra]";
  1405. mes "Louyang Town unlocked!";
  1406. close;
  1407. }
  1408. morocc.gat,157,95,4 script Warpra 113,{
  1409. if (#morocc != 0) callfunc "Q_Warpra",0;
  1410. set #morocc,1;
  1411. mes "[Warpra]";
  1412. mes "Morroc Town unlocked!";
  1413. close;
  1414. }
  1415. nif_fild01.gat,319,77,1 script Warpra 113,{
  1416. if (#niflheim != 0) callfunc "Q_Warpra",0;
  1417. set #niflheim,1;
  1418. mes "[Warpra]";
  1419. mes "Niflheim Town unlocked!";
  1420. close;
  1421. }
  1422. payon.gat,183,110,4 script Warpra 113,{
  1423. if (#payon != 0) callfunc "Q_Warpra",0;
  1424. set #payon,1;
  1425. mes "[Warpra]";
  1426. mes "Payon Town unlocked!";
  1427. close;
  1428. }
  1429. prontera.gat,147,172,5 script Warpra 113,{
  1430. if (#prontera != 0) callfunc "Q_Warpra",0;
  1431. set #prontera,1;
  1432. mes "[Warpra]";
  1433. mes "Prontera Town unlocked!";
  1434. close;
  1435. }
  1436. umbala.gat,133,130,4 script Warpra 113,{
  1437. if (#umbala != 0) callfunc "Q_Warpra",0;
  1438. set #umbala,1;
  1439. mes "[Warpra]";
  1440. mes "Umbala Town unlocked!";
  1441. close;
  1442. }
  1443. xmas.gat,151,136,4 script Warpra 113,{
  1444. if (#xmas != 0) callfunc "Q_Warpra",0;
  1445. set #xmas,1;
  1446. mes "[Warpra]";
  1447. mes "Lutie Town unlocked!";
  1448. close;
  1449. }
  1450. yuno.gat,138,162,4 script Warpra 113,{
  1451. if (#yuno != 0) callfunc "Q_Warpra",0;
  1452. set #yuno,1;
  1453. mes "[Warpra]";
  1454. mes "Yuno Town unlocked!";
  1455. close;
  1456. }
  1457. abyss_02.gat,274,266,1 script Warpra 113,{
  1458. if (#abyss == 1) mes "[Warpra]";
  1459. if (#abyss == 1) mes "Sorry I can only unlock this location.";
  1460. if (#abyss == 1) close;
  1461. set #abyss,1;
  1462. mes "[Warpra]";
  1463. mes "Abyss Lake unlocked!";
  1464. close;
  1465. }
  1466. ama_dun02.gat,192,118,5 script Warpra Helper 112,{
  1467. if (#ama_dun == 1) mes "[Warpra]";
  1468. if (#ama_dun == 1) mes "Sorry I can only unlock this location.";
  1469. if (#ama_dun == 1) close;
  1470. set #ama_dun,1;
  1471. mes "[Warpra]";
  1472. mes "Amatsu Dungeon unlocked!";
  1473. close;
  1474. }
  1475. anthell02.gat,170,165,3 script Warpra Helper 112,{
  1476. if (#anthell == 1) mes "[Warpra]";
  1477. if (#anthell == 1) mes "Sorry I can only unlock this location.";
  1478. if (#anthell == 1) close;
  1479. set #anthell,1;
  1480. mes "[Warpra]";
  1481. mes "Ant Hell Dungeon unlocked!";
  1482. close;
  1483. }
  1484. ayo_dun02.gat,258,193,5 script Warpra Helper 112,{
  1485. if (#ayotaya_dun == 1) mes "[Warpra]";
  1486. if (#ayotaya_dun == 1) mes "Sorry I can only unlock this location.";
  1487. if (#ayotaya_dun == 1) close;
  1488. set #ayotaya_dun,1;
  1489. mes "[Warpra]";
  1490. mes "Ayotaya Dungeon unlocked!";
  1491. close;
  1492. }
  1493. ein_dun02.gat,292,282,1 script Warpra Helper 112,{
  1494. if (#einbech_dun == 1) mes "[Warpra]";
  1495. if (#einbech_dun == 1) mes "Sorry I can only unlock this location.";
  1496. if (#einbech_dun == 1) close;
  1497. set #einbech_dun,1;
  1498. mes "[Warpra]";
  1499. mes "Einbech Dungeon unlocked!";
  1500. close;
  1501. }
  1502. iz_dun03.gat,202,47,2 script Warpra Helper 112,{
  1503. if (#iz_dun == 1) mes "[Warpra]";
  1504. if (#iz_dun == 1) mes "Sorry I can only unlock this location.";
  1505. if (#iz_dun == 1) close;
  1506. set #iz_dun,1;
  1507. mes "[Warpra]";
  1508. mes "Byalan Dungeon unlocked!";
  1509. close;
  1510. }
  1511. c_tower3.gat,129,106,4 script Warpra Helper 112,{
  1512. if (#c_tower == 1) mes "[Warpra]";
  1513. if (#c_tower == 1) mes "Sorry I can only unlock this location.";
  1514. if (#c_tower == 1) close;
  1515. set #c_tower,1;
  1516. mes "[Warpra]";
  1517. mes "Clock Tower Dungeon unlocked!";
  1518. close;
  1519. }
  1520. mjo_dun02.gat,39,25,4 script Warpra Helper 112,{
  1521. if (#mjo_dun == 1) mes "[Warpra]";
  1522. if (#mjo_dun == 1) mes "Sorry I can only unlock this location.";
  1523. if (#mjo_dun == 1) close;
  1524. set #mjo_dun,1;
  1525. mes "[Warpra]";
  1526. mes "Coal Mine Dungeon unlocked!";
  1527. close;
  1528. }
  1529. prt_sewb2.gat,176,30,3 script Warpra Helper 112,{
  1530. if (#prt_sewb == 1) mes "[Warpra]";
  1531. if (#prt_sewb == 1) mes "Sorry I can only unlock this location.";
  1532. if (#prt_sewb == 1) close;
  1533. set #prt_sewb,1;
  1534. mes "[Warpra]";
  1535. mes "Culvert Dungeon unlocked!";
  1536. close;
  1537. }
  1538. gefenia03.gat,137,34,0 script Warpra Helper 112,{
  1539. if (#gefenia == 1) mes "[Warpra]";
  1540. if (#gefenia == 1) mes "Sorry I can only unlock this location.";
  1541. if (#gefenia == 1) close;
  1542. set #gefenia,1;
  1543. mes "[Warpra]";
  1544. mes "Gefenia Dungeon unlocked!";
  1545. close;
  1546. }
  1547. gef_dun02.gat,218,61,2 script Warpra Helper 112,{
  1548. if (#gef_dun == 1) mes "[Warpra]";
  1549. if (#gef_dun == 1) mes "Sorry I can only unlock this location.";
  1550. if (#gef_dun == 1) close;
  1551. set #gef_dun,1;
  1552. mes "[Warpra]";
  1553. mes "Gefen Dungeon unlocked!";
  1554. close;
  1555. }
  1556. glast_01.gat,371,308,3 script Warpra Helper 112,{
  1557. if (#gl_dun == 1) mes "[Warpra]";
  1558. if (#gl_dun == 1) mes "Sorry I can only unlock this location.";
  1559. if (#gl_dun == 1) close;
  1560. set #gl_dun,1;
  1561. mes "[Warpra]";
  1562. mes "Glast Heim Dungeon unlocked!";
  1563. close;
  1564. }
  1565. gon_dun01.gat,167,273,4 script Warpra Helper 112,{
  1566. if (#gon_dun == 1) mes "[Warpra]";
  1567. if (#gon_dun == 1) mes "Sorry I can only unlock this location.";
  1568. if (#gon_dun == 1) close;
  1569. set #gon_dun,1;
  1570. mes "[Warpra]";
  1571. mes "Gonryun Dungeon unlocked!";
  1572. close;
  1573. }
  1574. juperos_02.gat,127,154,5 script Warpra Helper 112,{
  1575. if (#juperos == 1) mes "[Warpra]";
  1576. if (#juperos == 1) mes "Sorry I can only unlock this location.";
  1577. if (#juperos == 1) close;
  1578. set #juperos,1;
  1579. mes "[Warpra]";
  1580. mes "Juperos Cave unlocked!";
  1581. close;
  1582. }
  1583. lhz_dun02.gat,156,151,3 script Warpra Helper 112,{
  1584. if (#lighthalzen_dun == 1) mes "[Warpra]";
  1585. if (#lighthalzen_dun == 1) mes "Sorry I can only unlock this location.";
  1586. if (#lighthalzen_dun == 1) close;
  1587. set #lighthalzen_dun,1;
  1588. mes "[Warpra]";
  1589. mes "Lighthalzen Bio Lab unlocked!";
  1590. close;
  1591. }
  1592. lou_dun02.gat,168,264,4 script Warpra Helper 112,{
  1593. if (#louyang_dun == 1) mes "[Warpra]";
  1594. if (#louyang_dun == 1) mes "Sorry I can only unlock this location.";
  1595. if (#louyang_dun == 1) close;
  1596. set #louyang_dun,1;
  1597. mes "[Warpra]";
  1598. mes "Louyang Dungeon unlocked!";
  1599. close;
  1600. }
  1601. mag_dun02.gat,46,41,3 script Warpra Helper 112,{
  1602. if (#mag_dun == 1) mes "[Warpra]";
  1603. if (#mag_dun == 1) mes "Sorry I can only unlock this location.";
  1604. if (#mag_dun == 1) close;
  1605. set #mag_dun,1;
  1606. mes "[Warpra]";
  1607. mes "Magma Dungeon unlocked!";
  1608. close;
  1609. }
  1610. odin_tem01.gat,115,148,3 script Warpra Helper 112,{
  1611. if (#odintemple == 1) mes "[Warpra]";
  1612. if (#odintemple == 1) mes "Sorry I can only unlock this location.";
  1613. if (#odintemple == 1) close;
  1614. set #odintemple,1;
  1615. mes "[Warpra]";
  1616. mes "Odin Temple unlocked!";
  1617. close;
  1618. }
  1619. orcsdun01.gat,185,11,3 script Warpra Helper 112,{
  1620. if (#orcsdun == 1) mes "[Warpra]";
  1621. if (#orcsdun == 1) mes "Sorry I can only unlock this location.";
  1622. if (#orcsdun == 1) close;
  1623. set #orcsdun,1;
  1624. mes "[Warpra]";
  1625. mes "Orc Dungeon unlocked!";
  1626. close;
  1627. }
  1628. pay_dun03.gat,162,143,3 script Warpra Helper 112,{
  1629. if (#pay_dun== 1) mes "[Warpra]";
  1630. if (#pay_dun == 1) mes "Sorry I can only unlock this location.";
  1631. if (#pay_dun == 1) close;
  1632. set #pay_dun,1;
  1633. mes "[Warpra]";
  1634. mes "Payon Dungeon unlocked!";
  1635. close;
  1636. }
  1637. moc_pryd02.gat,101,95,3 script Warpra Helper 112,{
  1638. if (#moc_pryd == 1) mes "[Warpra]";
  1639. if (#moc_pryd == 1) mes "Sorry I can only unlock this location.";
  1640. if (#moc_pryd == 1) close;
  1641. set #moc_pryd,1;
  1642. mes "[Warpra]";
  1643. mes "Pyramides Dungeon unlocked!";
  1644. close;
  1645. }
  1646. in_sphinx2.gat,274,268,1 script Warpra Helper 112,{
  1647. if (#in_sphinx == 1) mes "[Warpra]";
  1648. if (#in_sphinx == 1) mes "Sorry I can only unlock this location.";
  1649. if (#in_sphinx == 1) close;
  1650. set #in_sphinx,1;
  1651. mes "[Warpra]";
  1652. mes "Sphinx Dungeon unlocked!";
  1653. close;
  1654. }
  1655. tha_t07.gat,111,162,3 script Warpra Helper 112,{
  1656. if (#thanatos_tower == 1) mes "[Warpra]";
  1657. if (#thanatos_tower == 1) mes "Sorry I can only unlock this location.";
  1658. if (#thanatos_tower == 1) close;
  1659. set #thanatos_tower,1;
  1660. mes "[Warpra]";
  1661. mes "Thanatos Tower unlocked!";
  1662. close;
  1663. }
  1664. treasure02.gat,104,40,3 script Warpra Helper 112,{
  1665. if (#treasure == 1) mes "[Warpra]";
  1666. if (#treasure == 1) mes "Sorry I can only unlock this location.";
  1667. if (#treasure == 1) close;
  1668. set #treasure,1;
  1669. mes "[Warpra]";
  1670. mes "Sunken Ship Dungeon unlocked!";
  1671. close;
  1672. }
  1673. xmas_dun02.gat,124,131,3 script Warpra Helper 112,{
  1674. if (#xmas_dun == 1) mes "[Warpra]";
  1675. if (#xmas_dun == 1) mes "Sorry I can only unlock this location.";
  1676. if (#xmas_dun == 1) close;
  1677. set #xmas_dun,1;
  1678. mes "[Warpra]";
  1679. mes "Toy Factory Dungeon unlocked!";
  1680. close;
  1681. }
  1682. um_dun02.gat,44,28,3 script Warpra Helper 112,{
  1683. if (#um_dun == 1) mes "[Warpra]";
  1684. if (#um_dun == 1) mes "Sorry I can only unlock this location.";
  1685. if (#um_dun == 1) close;
  1686. set #um_dun,1;
  1687. mes "[Warpra]";
  1688. mes "Umbala Dungeon unlocked!";
  1689. close;
  1690. }
  1691. tur_dun02.gat,162,23,3 script Warpra Helper 112,{
  1692. if (#tur_dun == 1) mes "[Warpra]";
  1693. if (#tur_dun == 1) mes "Sorry I can only unlock this location.";
  1694. if (#tur_dun == 1) close;
  1695. set #tur_dun,1;
  1696. mes "[Warpra]";
  1697. mes "Turtle Island Dungeon unlocked!";
  1698. close;
  1699. }
  1700. prt_maze02.gat,102,69,4 script Warpra Helper 112,{
  1701. if (#hid_dun == 1) mes "[Warpra]";
  1702. if (#hid_dun == 1) mes "Sorry I can only unlock this location.";
  1703. if (#hid_dun == 1) close;
  1704. set #hid_dun,1;
  1705. mes "[Warpra]";
  1706. mes "Hidden Dungeon unlocked!";
  1707. close;
  1708. }