root/npc/custom/eAAC_Scripts/quest_warper.txt @ 1

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