Advertisement
Guest User

Untitled

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