Advertisement
Guest User

Untitled

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