quest_warper.txt 72 KB

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