diff options
author | eaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-21 20:10:42 +0000 |
---|---|---|
committer | eaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-21 20:10:42 +0000 |
commit | b7a29236b5f77b120d84db221011bd8e57c06f46 (patch) | |
tree | 7bb84a8cdef7ff23da1dae83470dcb33d953f369 /npc/custom/eAAC_Scripts/quest_warper.txt | |
parent | 01920ca0c1f2c30ebb0abd4793cf6e308454f0cd (diff) | |
download | hercules-b7a29236b5f77b120d84db221011bd8e57c06f46.tar.gz hercules-b7a29236b5f77b120d84db221011bd8e57c06f46.tar.bz2 hercules-b7a29236b5f77b120d84db221011bd8e57c06f46.tar.xz hercules-b7a29236b5f77b120d84db221011bd8e57c06f46.zip |
* eAAC Update + Fix [erKURITA]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6682 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/eAAC_Scripts/quest_warper.txt')
-rw-r--r-- | npc/custom/eAAC_Scripts/quest_warper.txt | 1890 |
1 files changed, 1061 insertions, 829 deletions
diff --git a/npc/custom/eAAC_Scripts/quest_warper.txt b/npc/custom/eAAC_Scripts/quest_warper.txt index a4802eeb8..2fbc252f7 100644 --- a/npc/custom/eAAC_Scripts/quest_warper.txt +++ b/npc/custom/eAAC_Scripts/quest_warper.txt @@ -1,10 +1,10 @@ //===== eAthena Script ============================================
-//= *BETA* Quest Warper Script
+//= Quest Warper Script
//===== By: =======================================================
//= Old Warper 2 by Darkchild - Remade with quest format by DZeroX
//= Huge Rewrite by Neouni
//===== Current Version: ==========================================
-//= 1.6a
+//= 2.0b
//===== Compatible With: ==========================================
//= Any eAthena Version
//===== Description: ==============================================
@@ -35,24 +35,54 @@ // - kafra storage code security added
// - Healing scripts pricing added
// - Heal Part script added
-//= 1.6 - Dungeon warp [Neouni]
+//= 1.6 - Dungeon warp [Neouni] (beta only)
// - added option to add a extra fee for going down deeper into dungeon
// partly by rebuilding the dungeon warping into variable menu's
-//= 1.6a - alot of fixes for beta release [Neouni]
+//= 1.6a - alot of fixes for beta release [Neouni] (public release)
// - fixed syntax problems
// - fixed missing pyramid gats in @DGat$ array
// - removed the culver level 5 that didn't exist
// and caused quite alot of problems (i didn't check while converting)
-//-1.7 - Readability of Dungeon menu array building increased
+//-1.7 - Readability of Dungeon menu building increased [Neouni]
// - Thanatos Tower & Louyang Dungeon added
-
-
+//-1.8 - changed around unlock variables [Neouni]
+// - Moved warp variables to mark what you have unlocked to an binary array in login based permanent variable
+// (warp variables are saved in login database, so all charservers have these unlocked)
+// - Town Warp unlock array max 21/(unknown max) items used instead of max account #variables 32 !
+// - Dungeon Warp unlock array 28/(unknown max) items used instead of max account #variables 32 !
+// - (max login ##variables = 16, i used 3)
+// - old variables are cleared on next save
+// - Extra Variable clear added for every character, just in case (request by Terces)
+//-1.8a - Show ammount of users on map [Neouni]
+// - Default = off, enable in GM menu
+// - Requested by escoteiro
+//-1.8b - Small typo fixed in stampcard script [Neouni]
+// - Reported by escoteiro
+//-1.9 - Making it more edit friendly [Neouni]
+// - Made Dungeon warp arrays more readable & editable (QWS_Darray)
+// - Made town warp arrays more readable & editable (QWS_Tarray)
+//-2.0 - Special Warp menu added [Neouni]
+// - when all towns and dungeons are collected a new option on the main menu will show
+// - it will only show when you setup the mapname of the warp !
+// - requested by escoteiro
+// - several bugs fixed
+//-2.0a - Dungeon Level Limit & Split dungeon fees
+// - Limits dungeon based on Depth, access special setup menu thru GM-Menu
+// - Dungeon fees split up based on Basic , Advanced & Overseas
+// - Old Dungeon fee system removed, all dungeon fees now set to 0
+//-2.0b
+// - Special warpname menu option name bug fixed
//=================================================================
//========================Function=&=Script========================
function script Q_Warpra {
+// Quick hack for backwards compatibility pre 1.8
+if (##QWS_UP < 18) callfunc "QWS_BackComp";
+// Extra clear variables because marker is saved on all char servers and variables can be on multiple servers
+if (QWS_ExtraVARClear < 18) callfunc "Extra_Variable_Clear";
+
mes "[Warpra]";
mes "Hello,";
mes "I can warp you to any town or dungeon, but you need to unlock them first.";
@@ -62,20 +92,37 @@ function script Q_Warpra { if(getarg(0) == 0) callfunc "QWS_MMarray",0;
if(getarg(0) == 1) callfunc "QWS_MMarray",1;
- menu @Mmenulist$[0],-,@Mmenulist$[1],-,@Mmenulist$[2],-,@Mmenulist$[3],-,@Mmenulist$[4],-,@Mmenulist$[5],-,@Mmenulist$[6],-,@Mmenulist$[7],-,@Mmenulist$[8],-,@Mmenulist$[9],-;
-
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "GameMaster Menu") goto GM_Menu;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Warp to Towns") goto L_town;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Warp to Dungeons") goto L_dungeon;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Why so few Warps ?") goto L_FewWarps;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Why don't you Unlock this location ?") goto L_NoUnlock;
- if (@Mmenuref[@menu-1] == 5) goto L_heal_Full;
- if (@Mmenuref[@menu-1] == 6) goto L_heal_Part;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Storage") goto L_Storage;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Guild Storage") goto L_GStorage;
- if (@pMmenuitems$[@Mmenuref[@menu-1]] == "Cancel") goto L_end;
- goto L_end;
+ 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]);
+ switch(@Mmenuref[@MMenu-1]+1){
+ case 1:
+ goto GM_Menu;
+ case 2:
+ warp $QW_SP_WarpMap$, $QW_SP_WarpX, $QW_SP_WarpY;
+ close2;
+ debugmes "Please check your special warp menu settings on the Warpra";
+ end;
+ case 3:
+ goto L_town;
+ case 4:
+ goto L_dungeon;
+ case 5:
+ goto L_FewWarps;
+ case 6:
+ goto L_NoUnlock;
+ case 7:
+ goto L_heal_Full;
+ case 8:
+ goto L_heal_Part;
+ case 9:
+ goto L_Storage;
+ case 10:
+ goto L_GStorage;
+ case 11:
+ goto L_end;
+ default:
+ goto L_end;
+}
//=====================GM-Menu=Functions===========================
@@ -87,6 +134,13 @@ next; //----------------Dungeon-Warp
if ($QW_DW_OFF == 0) mes "Dungeon warping = ^00FF00 On ^000000";
if ($QW_DW_OFF == 1) mes "Dungeon warping = ^FF0000 Off ^000000";
+//----------------Dungeon-Depth-Limit
+ if ($QW_DL == 1) mes "Dungeon Depth limit is ^00FF00 On ^000000";
+ if ($QW_DL == 0) mes "Dungeon Depth limit is ^FF0000 Off ^000000";
+ mes "If on Dungeon Depth limit is set to ^0000FF"+$QW_DDL+"^000000";
+//----------------ShowMapUsers
+ if ($QW_MapUserShow == 1) mes "Show Map Users = ^00FF00 On ^000000";
+ if ($QW_MapUserShow == 0) mes "Show Map Users = ^FF0000 Off ^000000";
//----------------Healfull
if ($QW_HF == 1) mes "Healing full = ^00FF00 On ^000000";
//----------------Healpart
@@ -98,67 +152,88 @@ next; //----------------GuildStorage
if ($QW_GStor == 1) mes "Guild Storage = ^00FF00 On ^000000";
if ($QW_GStor == 0) mes "Guild Storage = ^FF0000 Off ^000000";
-//----------------GMmenu
+//----------------KafraPoints
if ($QW_KPoint == 1) mes "Kafra points collect = ^00FF00 On ^000000";
if ($QW_KPoint == 0) mes "Kafra points collect = ^FF0000 Off ^000000";
-set @GMmenu,select("Town Warping","Dungeon Warping","Healing full","Healing partly","Storage","Guild Storage","Kafra points collect","Set Prices","Exit");
+//----------------GMmenu
+ 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")) {
// Using callsub and a small check to not make 1 part of the script set it on and the other turning it off again
-// why not use TWSETON & TWSETOFF ?, this saves lines
-
- if ((@GMmenu == 1)&&($QW_TW_OFF == 0)) callsub TWSET,0;
- if ((@GMmenu == 1)&&($QW_TW_OFF == 1)) callsub TWSET,1;
- if ((@GMmenu == 2)&&($QW_DW_OFF == 0)) callsub DWSET,0;
- if ((@GMmenu == 2)&&($QW_DW_OFF == 1)) callsub DWSET,1;
- if (@GMmenu == 3)&&($QW_HF == 0) callsub HFSET,0;
- if (@GMmenu == 3)&&($QW_HF == 1) callsub HFSET,1;
- if (@GMmenu == 4)&&($QW_HP == 0) callsub HPSET,0;
- if (@GMmenu == 4)&&($QW_HP == 1) callsub HPSET,1;
- if (@GMmenu == 5)&&($QW_Stor == 0) callsub SSET,0;
- if (@GMmenu == 5)&&($QW_Stor == 1) callsub SSET,1;
- if (@GMmenu == 6)&&($QW_GStor == 0) callsub GSSET,0;
- if (@GMmenu == 6)&&($QW_GStor == 1) callsub GSSET,1;
- if (@GMmenu == 7)&&($QW_KPoint == 0) callsub KPoint,0;
- if (@GMmenu == 7)&&($QW_KPoint == 1) callsub KPoint,1;
- if (@GMmenu == 8) goto Setprice;
+
+case 1:
+ if ($QW_TW_OFF == 0) {
+ set $QW_TW_OFF,1;
+ goto GM_Menu;
+ } else
+ set $QW_TW_OFF,0;
+ goto GM_Menu;
+case 2:
+ if ($QW_DW_OFF == 0) {
+ set $QW_DW_OFF,1;
+ goto GM_Menu;
+ } else
+ set $QW_DW_OFF,0;
+ goto GM_Menu;
+case 3:
+ goto DungeonLevelLimit;
+case 4:
+ if ($QW_MapUserShow == 0) {
+ set $QW_MapUserShow,1;
+ goto GM_Menu;
+ } else
+ set $QW_MapUserShow,0;
+ goto GM_Menu;
+case 5:
+ if ($QW_HF == 0) {
+ set $QW_HF,1;
+ set $QW_HP,0;
+ goto GM_Menu;
+ } else
+ set $QW_HF,0;
+ goto GM_Menu;
+case 6:
+ if ($QW_HP == 0) {
+ set $QW_HP,1;
+ set $QW_HF,0;
+ goto GM_Menu;
+ } else
+ set $QW_HP,0;
+ goto GM_Menu;
+case 7:
+ if ($QW_Stor == 0) {
+ set $QW_Stor,1;
+ goto GM_Menu;
+ } else
+ set $QW_Stor,0;
+ goto GM_Menu;
+case 8:
+ if ($QW_GStor == 0) {
+ set $QW_GStor,1;
+ goto GM_Menu;
+ } else
+ set $QW_GStor,0;
+ goto GM_Menu;
+case 9:
+ if ($QW_KPoint == 0) {
+ set $QW_KPoint,1;
+ goto GM_Menu;
+ } else
+ set $QW_KPoint,0;
+ goto GM_Menu;
+case 10:
+ goto Setprice;
+case 11:
+ goto SpecialWarpMenu;
+default:
close;
end;
-
-TWSET:
-if (getarg(0) == 0) set $QW_TW_OFF,1;
-if (getarg(0) == 1) set $QW_TW_OFF,0;
-goto GM_Menu;
-DWSET:
-if (getarg(0) == 0) set $QW_DW_OFF,1;
-if (getarg(0) == 1) set $QW_DW_OFF,0;
-goto GM_Menu;
-HFSET:
-if (getarg(0) == 0) set $QW_HF,1;
-if (getarg(0) == 0) set $QW_HP,0;
-if (getarg(0) == 1) set $QW_HF,0;
-goto GM_Menu;
-HPSET:
-if (getarg(0) == 0) set $QW_HP,1;
-if (getarg(0) == 0) set $QW_HF,0;
-if (getarg(0) == 1) set $QW_HP,0;
-goto GM_Menu;
-SSET:
-if (getarg(0) == 0) set $QW_Stor,1;
-if (getarg(0) == 1) set $QW_Stor,0;
-goto GM_Menu;
-GSSET:
-if (getarg(0) == 0) set $QW_GStor,1;
-if (getarg(0) == 1) set $QW_GStor,0;
-goto GM_Menu;
-KPoint:
-if (getarg(0) == 0) set $QW_KPoint,1;
-if (getarg(0) == 1) set $QW_KPoint,0;
-goto GM_Menu;
+}
//======================GM-Menu=Pricing============================
Setprice:
+ if ($QW_DW_FEE != 0) set $QW_DW_FEE,0;
next;
mes "Scroll thru the list to see all the options";
//----------------Warp-Basic-Price
@@ -170,9 +245,15 @@ Setprice: //----------------Warp-Oversea-Price
if ($QW_OW_PRICE != 0) mes "Overseas - Warps are = ^00FF00 "+$QW_OW_PRICE+" ^000000";
if ($QW_OW_PRICE == 0) mes "Overseas - Warps are = ^FF0000 Free ^000000";
-//----------------Warp-Oversea-Price
- if ($QW_DW_FEE != 0) mes "Dungeon level warp fee = ^00FF00 "+$QW_DW_FEE+" ^000000 zeny per level";
- if ($QW_DW_FEE == 0) mes "Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+//----------------Basic-Dungeon-Level-Warp-Fee
+ if ($QW_BW_FEE != 0) mes "Basic Dungeon level warp fee = ^00FF00 "+$QW_BW_FEE+" ^000000 zeny per level";
+ if ($QW_BW_FEE == 0) mes "Basic Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+//----------------Advanced-Dungeon-Level-Warp-Fee
+ if ($QW_AW_FEE != 0) mes "Advanced Dungeon level warp fee = ^00FF00 "+$QW_AW_FEE+" ^000000 zeny per level";
+ if ($QW_AW_FEE == 0) mes "Advanced Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+//----------------Overseas-Dungeon-Level-Warp-Fee
+ if ($QW_OW_FEE != 0) mes "Overseas Dungeon level warp fee = ^00FF00 "+$QW_OW_FEE+" ^000000 zeny per level";
+ if ($QW_OW_FEE == 0) mes "Overseas Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
//----------------Heal-Full
if ($QW_HF_PRICE != 0) mes "Full Healing = ^00FF00 "+$QW_HF_PRICE+" ^000000";
if ($QW_HF_PRICE == 0) mes "Full Healing = ^FF0000 Free ^000000";
@@ -188,20 +269,10 @@ Setprice: //----------------Guild-Storage
if ($QW_GS_PRICE != 0) mes "Guild Storage = ^00FF00 "+$QW_GS_PRICE+" ^000000";
if ($QW_GS_PRICE == 0) mes "Guild Storage = ^FF0000 Free ^000000";
-set @GMmenu2,select("Basic - Warps","Advanced - Warps","Overseas - Warps","Dungeon level warp fee","Full Healing","Part Healing","Storage","Guild Storage","Back","Exit");
- if (@GMmenu2 == 1) goto BWprice;
- if (@GMmenu2 == 2) goto AWprice;
- if (@GMmenu2 == 3) goto OWprice;
- if (@GMmenu2 == 4) goto DWfee;
- if (@GMmenu2 == 5) goto FHprice;
- if (@GMmenu2 == 6) goto PHprice;
- if (@GMmenu2 == 7) goto Sprice;
- if (@GMmenu2 == 8) goto GSprice;
- if (@GMmenu2 == 9) goto GM_Menu;
- close;
- end;
+
+ 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")) {
-BWprice:
+case 1:
next;
if ($QW_BW_PRICE != 0) mes "Basic - Warps are = ^00FF00 "+$QW_BW_PRICE+" ^000000";
if ($QW_BW_PRICE == 0) mes "Basic - Warps are = ^FF0000 Free ^000000";
@@ -209,15 +280,15 @@ BWprice: input $QW_BW_PRICE;
goto Setprice;
-AWprice:
+case 2:
next;
if ($QW_AW_PRICE != 0) mes "Advanced - Warps are = ^00FF00 "+$QW_AW_PRICE+" ^000000";
if ($QW_AW_PRICE == 0) mes "Advanced - Warps are = ^FF0000 Free ^000000";
- mes "Advanced - Warps are towns on the same island but not close to any starter town";
+ mes "Advanced - Warps are towns and dungeons on the same island but not close to any starter town";
input $QW_AW_PRICE;
goto Setprice;
-OWprice:
+case 3:
next;
if ($QW_OW_PRICE != 0) mes "Overseas - Warps are = ^00FF00 "+$QW_OW_PRICE+" ^000000";
if ($QW_OW_PRICE == 0) mes "Overseas - Warps are = ^FF0000 Free ^000000";
@@ -225,15 +296,37 @@ OWprice: input $QW_OW_PRICE;
goto Setprice;
-DWfee:
- if ($QW_DW_FEE != 0) mes "Dungeon level warp fee = ^00FF00 "+$QW_DW_FEE+" ^000000 zeny per level";
- if ($QW_DW_FEE == 0) mes "Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+case 4:
+ next;
+ if ($QW_BW_FEE != 0) mes "Basic Dungeon level warp fee = ^00FF00 "+$QW_BW_FEE+" ^000000 zeny per level";
+ if ($QW_BW_FEE == 0) mes "Basic Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+ mes "Basic - Warps are starter town related dungeons";
mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee";
mes "These costs are on top of the regular Warp costs";
- input $QW_DW_FEE;
+ input $QW_BW_FEE;
goto Setprice;
-FHprice:
+case 5:
+ next;
+ if ($QW_AW_FEE != 0) mes "Advanced Dungeon level warp fee = ^00FF00 "+$QW_AW_FEE+" ^000000 zeny per level";
+ if ($QW_AW_FEE == 0) mes "Advanced Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+ mes "Advanced - Warps are dungeons not close to any starter town";
+ mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee";
+ mes "These costs are on top of the regular Warp costs";
+ input $QW_AW_FEE;
+ goto Setprice;
+
+case 6:
+ next;
+ if ($QW_OW_FEE != 0) mes "Overseas Dungeon level warp fee = ^00FF00 "+$QW_OW_FEE+" ^000000 zeny per level";
+ if ($QW_OW_FEE == 0) mes "Overseas Dungeon level warp fee = ^FF0000 NO ^000000 zeny per level";
+ mes "Overseas - Warps are dungeons related to towns overseas reachable by boat from alberta";
+ mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee";
+ mes "These costs are on top of the regular Warp costs";
+ input $QW_OW_FEE;
+ goto Setprice;
+
+case 7:
next;
if ($QW_HF_PRICE != 0) mes "Full Healing = ^00FF00 "+$QW_HF_PRICE+" ^000000";
if ($QW_HF_PRICE == 0) mes "Full Healing = ^FF0000 Free ^000000";
@@ -241,7 +334,7 @@ FHprice: input $QW_HF_PRICE;
goto Setprice;
-PHprice:
+case 8:
next;
if ($QW_HP_H_PRICE != 0) mes "^FF0000HP ^000000Part Healing = ^00FF00 "+$QW_HP_H_PRICE+" ^000000 a point";
if ($QW_HP_H_PRICE == 0) mes "^FF0000HP ^000000Part Healing = ^FF0000 Free ^000000";
@@ -254,7 +347,7 @@ PHprice: input $QW_HP_S_PRICE;
goto Setprice;
-Sprice:
+case 9:
next;
if (($QW_S_PRICE != 0)&&($QW_S_PRICE != 60)) mes "Storage = ^00FF00 "+$QW_S_PRICE+" ^000000";
if ($QW_S_PRICE == 0) mes "Storage = ^FF0000 Free ^000000";
@@ -263,56 +356,142 @@ Sprice: input $QW_S_PRICE;
goto Setprice;
-GSprice:
+case 10:
next;
if ($QW_GS_PRICE != 0) mes "Guild Storage = ^00FF00 "+$QW_GS_PRICE+" ^000000";
if ($QW_GS_PRICE == 0) mes "Guild Storage = ^FF0000 Free ^000000";
mes "Guild Storage, free on Guild Kafras";
input $QW_GS_PRICE;
goto Setprice;
+case 11:
+ goto GM_Menu;
+default:
+ close;
+ end;
+}
+
+//======================Special=Warp=Menu==========================
+
+SpecialWarpMenu:
+ if ($QW_SP_Warpname$ == "") set $QW_SP_Warpname$,"Special Warp";
+ next;
+ mes "Scroll down to see all the information";
+ mes "The Special warp menu option will show in the main menu when all towns & dungeons are unlocked";
+ mes "And when the map for special warping has been set";
+ mes "menu option name set to ^0000FF"+$QW_SP_Warpname$+"^000000";
+ if ($QW_SP_WarpMap$ == "") mes "map is currently ^FF0000not^000000 set, and Special warp menu is off";
+ if ($QW_SP_WarpMap$ != "") mes "map is currently set to ^0000FF"+$QW_SP_WarpMap$+"^000000 and Special Warp menu is on";
+ mes "coords are set to ^0000FF"+$QW_SP_WarpX+","+$QW_SP_WarpY+"^000000";
+ switch(select("Set Special Warp name to show in menu", "Set WarpMap","Set Coords","Go Back to GM_Menu","Exit")){
+
+case 1:
+ next;
+ mes "set the name to show in the menu as option";
+ input $QW_SP_Warpname$;
+ goto SpecialWarpMenu;
+case 2:
+ next;
+ mes "set the map in the ^0000FFmapname.gat^000000 format";
+ mes "when this warpmap is set the option for players will show once they meet the requirments";
+ mes "to disable Special Warp Menu option clear this !";
+ input $QW_SP_WarpMap$;
+ goto SpecialWarpMenu;
+case 3:
+ next;
+ mes "First input = Xcoord";
+ mes "Second input = Ycoord";
+ input $QW_SP_WarpX;
+ input $QW_SP_WarpY;
+ goto SpecialWarpMenu;
+case 4:
+ goto GM_Menu;
+default:
+ close;
+ end;
+}
+
+//======================Dungeon=Level=Limit========================
+DungeonLevelLimit:
+ next;
+ if ($QW_DL == 1) mes "Dungeon Depth limit is ^00FF00 On ^000000";
+ if ($QW_DL == 0) mes "Dungeon Depth limit is ^FF0000 Off ^000000";
+ mes "If^00FF00 On ^000000Dungeon Depth limit is set to ^0000FF"+$QW_DDL+"^000000";
+
+ switch(select("Toggle Dungeon Depth Limit", "Set Dungeon Depth Limit","Go Back to GM_Menu","Exit")){
+
+case 1:
+ if ($QW_DL == 0) {
+ set $QW_DL,1;
+ goto DungeonLevelLimit;
+ } else
+ set $QW_DL,0;
+ goto DungeonLevelLimit;
+case 2:
+ next;
+ mes "set limit of Dungeon Depth 0 = entrance";
+ mes "Depth 1 is a map connected to 0 and so on";
+ mes "Shortest Route to map counts as depth";
+ input $QW_DDL;
+ goto DungeonLevelLimit;
+case 3:
+ goto GM_Menu;
+default:
+ close;
+ end;
+}
//===========================Towns=================================
L_town:
callfunc "QWS_Tarray";
-// Expected maximum is set to 22, if you add more options add a more ",@Tmenulist$[xx],-"
+// Expected maximum is set to 25 items, if you add more options add more ",@Tmenulist$[xx]"
+
+ 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]);
+
+ if (@Tmenuref[@TWMenu-1] == 57005) goto L_end; // 57005='dead' in hex
+
+ if(Zeny<@pTprice[@Tmenuref[@TWMenu-1]]) callsub L_Short_on_zeny,0;
- menu @Tmenulist$[0],-,@Tmenulist$[1],-,@Tmenulist$[2],-,@Tmenulist$[3],-,@Tmenulist$[4],-,@Tmenulist$[5],-,@Tmenulist$[6],-,@Tmenulist$[7],-,@Tmenulist$[8],-,@Tmenulist$[9],-,@Tmenulist$[10],-,@Tmenulist$[11],-,@Tmenulist$[12],-,@Tmenulist$[13],-,@Tmenulist$[14],-,@Tmenulist$[15],-,@Tmenulist$[16],-,@Tmenulist$[17],-,@Tmenulist$[18],-,@Tmenulist$[19],-,@Tmenulist$[20],-,@Tmenulist$[21],-,@Tmenulist$[22],-;
- if (@pTmap$[@Tmenuref[@menu-1]] == "L_End") goto L_end;
- if(Zeny<@pTprice[@Tmenuref[@menu-1]]) callsub L_Short_on_zeny,0;
- set Zeny, Zeny-@pTprice[@Tmenuref[@menu-1]];
- warp @pTmap$[@Tmenuref[@menu-1]],@pTXcoords[@Tmenuref[@menu-1]],@pTYcoords[@Tmenuref[@menu-1]];
+ set Zeny, Zeny-@pTprice[@Tmenuref[@TWMenu-1]];
+ if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@pTprice[@Tmenuref[@TWMenu-1]]/16);
+ warp @pTmap$[@Tmenuref[@TWMenu-1]],@pTXcoords[@Tmenuref[@TWMenu-1]],@pTYcoords[@Tmenuref[@TWMenu-1]];
close2; // this part safegaurds against errors/typos
- set Zeny, Zeny+@pTprice[@Tmenuref[@menu-1]];
- close;
+ set Zeny, Zeny+@pTprice[@Tmenuref[@TWMenu-1]];
end;
//=========================Dungeons================================
L_dungeon:
callfunc "QWS_Darray";
-// current max 31 items
- 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]);
+
+// Expected maximum is set to 35 items, if you add more options add more ",@Dmenulist$[xx]"
- if (@pDmenuitems$[@Dmenuref[DWMenu-1]] == "Cancel") goto L_end;
- set @DwarpMenu, (@Dmenuref[@DWMenu-1]);
+ 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]);
+ if (@Dmenuref[@DWMenu-1] == 57005) goto L_end; // 57005='dead' in hex
+ set @DwarpMenu, (@Dmenuref[@DWMenu-1]);
callfunc "QWS_DLarray";
next;
mes "[Warpra]";
mes "Please select where you want to go";
+
+// Expected maximum is set to 18 items, if you have dungeons with more levels add more ",@DWLmenulist$[xx]"
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]);
- if (@DWLmenuref[@DWLMenu-1] == 1337) goto L_end;
+
+ if (@DWLmenuref[@DWLMenu-1] == 57005) goto L_end; // 57005='dead' in hex
+
set @Darrayref, @DWLmenuref[@DWLMenu-1];
- set @warpprice, (@pDprice[@Dmenuref[@DWMenu-1]]+$QW_DW_FEE*@DDepth[@Darrayref]);
+ set @warpprice, @pDprice[@Dmenuref[@DWMenu-1]]+(getd(@pDfee$[@Dmenuref[@DWMenu-1]])*(@DDepth[@Darrayref]));
+
if(Zeny<@warpprice) callsub L_Short_on_zeny,1;
+
set Zeny, Zeny-(@warpprice);
+ if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@warpprice/16);
warp @DGat$[@Darrayref],@DXcoords[@Darrayref],@DYcoords[@Darrayref];
close2; // this part safegaurds against errors/typos
set Zeny, Zeny+@pTprice[@Tmenuref[@DWMenu-1]];
- close;
end;
//=============================Healing=============================
@@ -321,13 +500,12 @@ L_heal_Full: set @healfee, $QW_HF_PRICE;
if(Zeny<@healfee) callsub L_Short_on_zeny,4;
set Zeny, Zeny-@healfee;
-// if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@healfee/50); //commented out because kafra's don't offer this
+ if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + (@healfee/500);
next;
mes "[Warpra]";
mes "Close this window and I will Heal you.";
close2;
percentheal 100,100;
- close;
end;
L_heal_Part:
@@ -417,7 +595,6 @@ L_Storage: close2;
openstorage;
- close;
end;
F_CheckKafCode:
@@ -428,7 +605,6 @@ F_CheckKafCode: input @code_;
if(@code_ != #kafra_code-getcharid(3)-1337) {
dispbottom "Wrong storage password.";
- close2;
close;
}
set @kafcode_try,0;
@@ -450,7 +626,6 @@ L_GStorage: mes "Close this window and i will open the ^5533FF" + GetGuildName(@GID) + "^000000 storage.";
close2;
guildopenstorage;
- close;
end;
L_NoGuild:
@@ -489,7 +664,7 @@ L_NoUnlock: //=========================Short=On=Zeny===========================
L_Short_on_zeny:
next;
- if (getarg(0) == 0) mes "you don't seem to have "+@pTprice[@Tmenuref[@menu-1]]+" zeny, to pay for the warp fee to "+@pTmenuitems$[@Tmenuref[@menu-1]]+"";
+ 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]]+"";
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]]+"";
if (getarg(0) == 2) mes "you don't seem to have "+@fee+" zeny, to pay for the storage fee";
if (getarg(0) == 3) mes "you don't seem to have "+$QW_GS_PRICE+" zeny, to pay for the guild storage fee";
@@ -502,128 +677,61 @@ stampcard: // Counting of the ammount of places you have unlocked
next;
mes "Let me check what Towns you have";
- set @Tstamp,0;
-
-//----------------Prontera:
- if (#prontera == 1) set @Tstamp,@Tstamp+1;
-//----------------Alberta
- if (#alberta == 1) set @Tstamp,@Tstamp+1;
-//----------------Aldebaran
- if (#aldebaran == 1) set @Tstamp,@Tstamp+1;
-//----------------Amatsu:
- if (#amatsu == 1) set @Tstamp,@Tstamp+1;
-//----------------Ayotaya:
- if (#ayotaya == 1) set @Tstamp,@Tstamp+1;
-//----------------Comodo:
- if (#comodo == 1) set @Tstamp,@Tstamp+1;
-//----------------Einbech:
- if (#einbech == 1) set @Tstamp,@Tstamp+1;
-//----------------Einbroch:
- if (#einbroch == 1) set @Tstamp,@Tstamp+1;
-//----------------Geffen:
- if (#geffen == 1) set @Tstamp,@Tstamp+1;
-//----------------Gonryun:
- if (#gonryun == 1) set @Tstamp,@Tstamp+1;
-//----------------Hugel:
- if (#hugel == 1) set @Tstamp,@Tstamp+1;
-//----------------Izlude:
- if (#izlude == 1) set @Tstamp,@Tstamp+1;
-//----------------Jawaii:
- if (#jawaii == 1) set @Tstamp,@Tstamp+1;
-//----------------Lighthalzen:
- if (#lighthalzen == 1) set @Tstamp,@Tstamp+1;
-//----------------Louyang:
- if (#louyang == 1) set @Tstamp,@Tstamp+1;
-//----------------Lutie
- if (#xmas == 1) set @Tstamp,@Tstamp+1;
-//----------------Morroc:
- if (#morocc == 1) set @Tstamp,@Tstamp+1;
-//----------------Niflheim:
- if (#niflheim == 1) set @Tstamp,@Tstamp+1;
-//----------------Payon:
- if (#payon == 1) set @Tstamp,@Tstamp+1;
-//----------------Umbala:
- if (#umbala == 1) set @Tstamp,@Tstamp+1;
-//----------------Yuno:
- if (#yuno == 1) set @Tstamp,@Tstamp+1;
-
- mes "you collected^00FF00 "+@Tstamp+" of 21 ^000000Towns.";
+
+ callfunc "QWS_TownStamps";
+
+ mes "you collected^00FF00 "+@Tstamp+" of "+@MaxTstamp+" ^000000Towns.";
if (@Tstamp == 15) mes "They say there is an island you can only get to when married";
if (@Tstamp == 15) emotion 18;
next;
mes "Let me check what dungeons you have";
- set @Dstamp,0;
-
-//----------------ABYSS LAKE
- if (#abyss == 1) set @Dstamp,@Dstamp+1;
-//----------------AMATSU DUNGEON
- if (#ama_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------ANT HELL
- if (#anthell == 1) set @Dstamp,@Dstamp+1;
-//----------------AYOTAYA
- if (#ayotaya_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------BYALAN
- if (#iz_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------CLOCK TOWER
- if (#c_tower == 1) set @Dstamp,@Dstamp+1;
-//----------------COAL MINE
- if (#mjo_dun== 1) set @Dstamp,@Dstamp+1;
-//----------------CULVERT
- if (#prt_sewb == 1) set @Dstamp,@Dstamp+1;
-//----------------EINBECH DUNGEON
- if (#einbech_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------GEFENIA DUNGEON
- if (#gefenia == 1) set @Dstamp,@Dstamp+1;
-//----------------GEFFEN DUNGEON
- if (#gef_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------GLAST HEIM
- if (#gl_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------GONRYUN DUNGEON
- if (#gon_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------HIDDEN DUNGEON
- if (#hid_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------JUPEROS CAVE
- if (#juperos == 1) set @Dstamp,@Dstamp+1;
-//----------------LIGHTHALZEN BIO LAB
- if (#lighthalzen_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------LOUYANG DUNGEON
- if (#louyang_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------MAGMA DUNGEON
- if (#mag_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------ODIN TEMPLE
- if (#odintemple == 1) set @Dstamp,@Dstamp+1;
-//----------------ORC DUNGEON
- if (#orcsdun == 1) set @Dstamp,@Dstamp+1;
-//----------------PAYON DUNGEON
- if (#pay_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------PYRAMIDS
- if (#moc_pryd == 1) set @Dstamp,@Dstamp+1;
-//----------------SPHINX
- if (#in_sphinx == 1) set @Dstamp,@Dstamp+1;
-//----------------SUNKEN SHIP
- if (#treasure == 1) set @Dstamp,@Dstamp+1;
-//----------------THANATOS TOWER
- if (#thanatos_tower == 1) set @Dstamp,@Dstamp+1;
-//----------------TOY FACTORY
- if (#xmas_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------TURTLE ISTLAND
- if (#tur_dun == 1) set @Dstamp,@Dstamp+1;
-//----------------UMBALA
- if (#um_dun == 1) set @Dstamp,@Dstamp+1;
- mes "you collected^00FF00 "+@Dstamp+" of 28 ^000000Dungeons";
+
+ callfunc "QWS_DungeonStamps";
+
+ mes "you collected^00FF00 "+@Dstamp+" of "+@MaxDstamp+" ^000000Dungeons";
mes "To unlock a dungeon, search for my colleague.";
- mes "You can usually find him near the end or middle of the dungeon";
+ mes "You can usually find them near the middle or end of the dungeon";
return;
}
+function script QWS_TownStamps {
+ set @Tstamp,0;
+ set @MaxTstamp,21; //maximum number of towns
+ set @binvalue,1;
+ set @Tstamploop,0;
+ do {
+ if ((@binvalue & ##QWS_T_Unlock) == @binvalue) set @Tstamp,@Tstamp+1;
+
+ set @binvalue, @binvalue *2;
+ set @Tstamploop, @Tstamploop + 1;
+
+}while (@Tstamploop < @MaxTstamp);
+return;
+}
+
+function script QWS_DungeonStamps {
+ set @Dstamp,0;
+ set @MaxDstamp,29; //maximum number of dungeons
+ set @binvalue,1;
+ set @Dstamploop,0;
+ do {
+ if ((@binvalue & ##QWS_D_Unlock) == @binvalue) set @Dstamp,@Dstamp+1;
+
+ set @binvalue, @binvalue *2;
+ set @Dstamploop, @Dstamploop + 1;
+
+}while (@Dstamploop < @MaxDstamp);
+return;
+}
+
//======================Main=Menu=Array============================
function script QWS_MMarray {
// Currently 9 items
- setarray @pMmenuitems$[0], "GameMaster Menu", "Warp to Towns", "Warp to Dungeons", "Why so few Warps ?", "Why don't you Unlock this location ?", "Heal", "Heal", "Storage", "Guild Storage", "Cancel";
+ 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";
set @Mi,0; // That's our loop counter.
set @Mj,0; // That's the menu lines counter.
//----------------GameMaster-Menu
@@ -631,6 +739,15 @@ function script QWS_MMarray { if (getgmlevel(80)) set @Mmenuref[@Mj],@Mi;
if (getgmlevel(80)) set @Mj,@Mj+1;
set @Mi,@Mi+1;
+//----------------Special-Warp
+ callfunc "QWS_TownStamps";
+ callfunc "QWS_DungeonStamps";
+ if (@Tstamp == @MaxTstamp)&&(@Dstamp == @MaxDstamp)&&($QW_SP_WarpMap$ != "") {
+ set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
+ set @Mmenuref[@Mj],@Mi;
+ set @Mj,@Mj+1;
+ }
+ set @Mi,@Mi+1;
//----------------Town-Warp
if ($QW_TW_OFF == 0) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
if ($QW_TW_OFF == 0) set @Mmenuref[@Mj],@Mi;
@@ -681,155 +798,273 @@ function script QWS_MMarray { //======================Town=Menu=Array============================
-function script QWS_Tarray {
+//----------------Prontera // I do this to find back sections quickly altho almost the same name is a line below it now
+// setarray @pTmenuitems$[@Ti], "Prontera"; // Name of Town shown in Town select Menu
+// setarray @pTprice[@Ti], $QW_BW_PRICE; // warp prices (Basic ($QW_BW_PRICE), Advanced ($QW_AW_PRICE), Overseas $QW_OW_PRICE)
+//
+// setarray @pTmap$[@Ti], "prontera.gat"; // mapfilename of town
+// setarray @pTXcoords[@Ti], 156; // X warp coords
+// setarray @pTYcoords[@Ti], 187; // Y warp coords
+//
+// QWS_Make_Town_Menu XXX;
+//
+// the full wap commands send out by this script for these example would be
+//warp example_01.gat 123 123
+//
+// use the same XXX number as you used when making your own town warpra
+// Read below how
+//
+// example:
+//
+//syntax:
+//mapname.gat,xcoord,ycoord,directionfacing script Name of NPC NPC-ID,{
+//
+// Full example using fake map & coords
+//
+//example_01.gat,213,213,4 script Warpra 112,{
+// callfunc "QWS_Town_Warpra",XXX,"A FAKE TOWN FOR EXAMPLE";
+// close;
+// }
+// use a free number for XXX, last used is 20, for Yuno
-// Currently 22 items
+function script QWS_Tarray {
+ function QWS_Make_Town_Menu;
- setarray @pTmenuitems$[0], "Prontera", "Alberta", "Aldebaran", "Amatsu", "Ayothaya", "Comodo", "Einbech", "Einbroch", "Geffen", "Gonryun", "Hugel", "Izlude", "Jawaii", "Lighthalzen", "Louyang", "Lutie", "Morroc", "Niflheim", "Payon", "Umbala", "Yuno", "Cancel"; // townnames
- setarray @pTmap$[0], "prontera.gat", "alberta.gat", "aldebaran.gat", "amatsu.gat", "ayothaya.gat", "comodo.gat", "einbech.gat", "einbroch.gat", "geffen.gat", "gonryun.gat", "hugel.gat", "izlude.gat", "jawaii.gat", "lighthalzen.gat", "louyang.gat", "xmas.gat", "morocc.gat", "niflheim.gat", "payon.gat", "umbala.gat", "yuno.gat", "L_End"; // mapfile
- setarray @pTXcoords[0], 156, 27, 145, 197, 150, 188, 172, 230, 119, 150, 95, 128, 243, 158, 210, 148, 159, 195, 152, 130, 160, "Cancel"; // all X coords
- setarray @pTYcoords[0], 187, 236, 120, 86, 57, 161, 126, 191, 66, 130, 121, 111, 115, 110, 108, 131, 93, 186, 75, 130, 168, "Cancel"; // all Y coords
- setarray @pTprice[0], $QW_BW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, 0;
set @Ti,0; // That's our loop counter.
set @Tj,0; // That's the menu lines counter.
//----------------Prontera
- if (#prontera == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#prontera == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#prontera== 1) set @Tmenuref[@Tj],@Ti;
- if (#prontera == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Prontera";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "prontera.gat";
+ setarray @pTXcoords[@Ti], 156;
+ setarray @pTYcoords[@Ti], 187;
+
+ QWS_Make_Town_Menu 0;
//----------------Alberta
- if (#alberta == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#alberta == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#alberta == 1) set @Tmenuref[@Tj],@Ti;
- if (#alberta == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Alberta";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "alberta.gat";
+ setarray @pTXcoords[@Ti], 27;
+ setarray @pTYcoords[@Ti], 236;
+
+ QWS_Make_Town_Menu 1;
//----------------Aldebaran
- if (#aldebaran == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#aldebaran == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#aldebaran == 1) set @Tmenuref[@Tj],@Ti;
- if (#aldebaran == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Aldebaran";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "aldebaran.gat";
+ setarray @pTXcoords[@Ti], 145;
+ setarray @pTYcoords[@Ti], 120;
+
+ QWS_Make_Town_Menu 2;
//----------------Amatsu:
- if (#amatsu == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#amatsu == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#amatsu == 1) set @Tmenuref[@Tj],@Ti;
- if (#amatsu == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Amatsu";
+ setarray @pTprice[@Ti], $QW_OW_PRICE;
+
+ setarray @pTmap$[@Ti], "amatsu.gat";
+ setarray @pTXcoords[@Ti], 197;
+ setarray @pTYcoords[@Ti], 86;
+
+ QWS_Make_Town_Menu 3;
//----------------Ayothaya:
- if (#ayotaya == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#ayotaya == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#ayotaya == 1) set @Tmenuref[@Tj],@Ti;
- if (#ayotaya == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Ayothaya";
+ setarray @pTprice[@Ti], $QW_OW_PRICE;
+
+ setarray @pTmap$[@Ti], "ayothaya.gat";
+ setarray @pTXcoords[@Ti], 150;
+ setarray @pTYcoords[@Ti], 57;
+
+ QWS_Make_Town_Menu 4;
//----------------Comodo:
- if (#comodo == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#comodo == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#comodo == 1) set @Tmenuref[@Tj],@Ti;
- if (#comodo == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Comodo";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "comodo.gat";
+ setarray @pTXcoords[@Ti], 188;
+ setarray @pTYcoords[@Ti], 161;
+
+ QWS_Make_Town_Menu 5;
//----------------Einbech:
- if (#einbech == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#einbech == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#einbech == 1) set @Tmenuref[@Tj],@Ti;
- if (#einbech == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Einbech";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "einbech.gat";
+ setarray @pTXcoords[@Ti], 172;
+ setarray @pTYcoords[@Ti], 126;
+
+ QWS_Make_Town_Menu 6;
//----------------Einbroch:
- if (#einbroch == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#einbroch == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#einbroch == 1) set @Tmenuref[@Tj],@Ti;
- if (#einbroch == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Einbroch";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "einbroch.gat";
+ setarray @pTXcoords[@Ti], 230;
+ setarray @pTYcoords[@Ti], 191;
+
+ QWS_Make_Town_Menu 7;
//----------------Geffen:
- if (#geffen == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#geffen == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#geffen == 1) set @Tmenuref[@Tj],@Ti;
- if (#geffen == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Geffen";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "geffen.gat";
+ setarray @pTXcoords[@Ti], 119;
+ setarray @pTYcoords[@Ti], 66;
+
+ QWS_Make_Town_Menu 8;
//----------------Gonryun:
- if (#gonryun == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#gonryun == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#gonryun == 1) set @Tmenuref[@Tj],@Ti;
- if (#gonryun == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Gonryun";
+ setarray @pTprice[@Ti], $QW_OW_PRICE;
+
+ setarray @pTmap$[@Ti], "gonryun.gat";
+ setarray @pTXcoords[@Ti], 150;
+ setarray @pTYcoords[@Ti], 130;
+
+ QWS_Make_Town_Menu 9;
//----------------Hugel:
- if (#hugel == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#hugel == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#hugel == 1) set @Tmenuref[@Tj],@Ti;
- if (#hugel == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Hugel";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "hugel.gat";
+ setarray @pTXcoords[@Ti], 95;
+ setarray @pTYcoords[@Ti], 121;
+
+ QWS_Make_Town_Menu 10;
//----------------Izlude:
- if (#izlude == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#izlude == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#izlude == 1) set @Tmenuref[@Tj],@Ti;
- if (#izlude == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Izlude";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "izlude.gat";
+ setarray @pTXcoords[@Ti], 128;
+ setarray @pTYcoords[@Ti], 111;
+
+ QWS_Make_Town_Menu 11;
//----------------Jawaii:
- if (#jawaii == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#jawaii == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#jawaii == 1) set @Tmenuref[@Tj],@Ti;
- if (#jawaii == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Jawaii";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "jawaii.gat";
+ setarray @pTXcoords[@Ti], 243;
+ setarray @pTYcoords[@Ti], 115;
+
+ QWS_Make_Town_Menu 12;
//----------------Lighthalzen:
- if (#lighthalzen == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#lighthalzen == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#lighthalzen == 1) set @Tmenuref[@Tj],@Ti;
- if (#lighthalzen == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Lighthalzen";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "lighthalzen.gat";
+ setarray @pTXcoords[@Ti], 158;
+ setarray @pTYcoords[@Ti], 110;
+
+ QWS_Make_Town_Menu 13;
//----------------Louyang:
- if (#louyang == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#louyang == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#louyang == 1) set @Tmenuref[@Tj],@Ti;
- if (#louyang == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Louyang";
+ setarray @pTprice[@Ti], $QW_OW_PRICE;
+
+ setarray @pTmap$[@Ti], "louyang.gat";
+ setarray @pTXcoords[@Ti], 210;
+ setarray @pTYcoords[@Ti], 108;
+
+ QWS_Make_Town_Menu 14;
//----------------Lutie
- if (#xmas == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#xmas == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#xmas == 1) set @Tmenuref[@Tj],@Ti;
- if (#xmas == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Lutie";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "xmas.gat";
+ setarray @pTXcoords[@Ti], 148;
+ setarray @pTYcoords[@Ti], 131;
+
+ QWS_Make_Town_Menu 15;
//----------------Morroc:
- if (#morocc == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#morocc == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#morocc == 1) set @Tmenuref[@Tj],@Ti;
- if (#morocc == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Morroc";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "morocc.gat";
+ setarray @pTXcoords[@Ti], 159;
+ setarray @pTYcoords[@Ti], 93;
+
+ QWS_Make_Town_Menu 16;
//----------------Niflheim:
- if (#niflheim == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#niflheim == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#niflheim == 1) set @Tmenuref[@Tj],@Ti;
- if (#niflheim == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Niflheim";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "niflheim.gat";
+ setarray @pTXcoords[@Ti], 195;
+ setarray @pTYcoords[@Ti], 186;
+
+ QWS_Make_Town_Menu 17;
//----------------Payon:
- if (#payon == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#payon == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#payon == 1) set @Tmenuref[@Tj],@Ti;
- if (#payon == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Payon";
+ setarray @pTprice[@Ti], $QW_BW_PRICE;
+
+ setarray @pTmap$[@Ti], "payon.gat";
+ setarray @pTXcoords[@Ti], 152;
+ setarray @pTYcoords[@Ti], 75;
+
+ QWS_Make_Town_Menu 18;
//----------------Umbala:
- if (#umbala == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#umbala == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#umbala == 1) set @Tmenuref[@Tj],@Ti;
- if (#umbala == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Umbala";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "umbala.gat";
+ setarray @pTXcoords[@Ti], 130;
+ setarray @pTYcoords[@Ti], 130;
+
+ QWS_Make_Town_Menu 19;
//----------------Yuno:
- if (#yuno == 1)&&(@pTprice[@Ti] != 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
- if (#yuno == 1)&&(@pTprice[@Ti] == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
- if (#yuno == 1) set @Tmenuref[@Tj],@Ti;
- if (#yuno == 1) set @Tj,@Tj+1;
- set @Ti,@Ti+1;
+ setarray @pTmenuitems$[@Ti], "Yuno";
+ setarray @pTprice[@Ti], $QW_AW_PRICE;
+
+ setarray @pTmap$[@Ti], "yuno.gat";
+ setarray @pTXcoords[@Ti], 160;
+ setarray @pTYcoords[@Ti], 168;
+
+ QWS_Make_Town_Menu 20;
//----------------Cancel
+ setarray @pTmenuitems$[@Ti], "Cancel";
+ setarray @pTprice[@Ti], 0;
+
set @Tmenulist$[@Tj],@pTmenuitems$[@Ti];
- set @Tmenuref[@Tj],@Ti;
+ set @Tmenuref[@Tj],57005; // 57005='dead' in hex
+ return;
+
+
+//----------------Make Town Menu Function
+
+function QWS_Make_Town_Menu {
+ set @temptownmenubin,1;
+ if (getarg(0) == 0) goto menu_item;
+ set @templooptownmenu,0;
+ do {
+ set @temptownmenubin, @temptownmenubin * 2;
+ set @templooptownmenu, @templooptownmenu + 1;
+ }while (getarg(0) > @templooptownmenu);
+// check marker and make menu item
+menu_item:
+ if ((@temptownmenubin & ##QWS_T_Unlock) != @temptownmenubin) {
+ set @Ti,@Ti+1;
return;
}
+ if (@pTprice[@Ti] != 0)&&($QW_MapUserShow == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" -> "+@pTprice[@Ti];
+ if (@pTprice[@Ti] == 0)&&($QW_MapUserShow == 0) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti];
+ if (@pTprice[@Ti] != 0)&&($QW_MapUserShow == 1) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" ["+getmapusers(@pTmap$[@Ti])+"]"+" -> "+@pTprice[@Ti];
+ if (@pTprice[@Ti] == 0)&&($QW_MapUserShow == 1) set @Tmenulist$[@Tj], @pTmenuitems$[@Ti]+" ["+getmapusers(@pTmap$[@Ti])+"]";
+ set @Tmenuref[@Tj],@Ti;
+ set @Tj,@Tj+1;
+ set @Ti,@Ti+1;
+ return;
+
+}
+}
//====================Dungeon=Menu=Arrays==========================
//----------------A FAKE DUNGEON FOR EXAMPLE // I do this to find back sections quickly altho almost the same name is a line below it now
// setarray @pDmenuitems$[@Di], "Fake Dungeon"; // Name of Dungeon shown in Dungeon select Menu
// setarray @pDprice[@Di], $QW_BW_PRICE; // warp prices (Basic ($QW_BW_PRICE), Advanced ($QW_AW_PRICE), Overseas $QW_OW_PRICE)
-// setarray @DLevels[@Di], 2; //number of levels in dungeon (very important if incorrect will shift all leveldata!!)
+// 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 "")
+// setarray @DLevels[@Di], 2; //number of levels in dungeon (very important if set to high will shift all leveldata!!)
//
// setarray @DGat$[@Dref], "example_01.gat", "example_02.gat"; // mapfilename of dungeon level
// setarray @DLevelName$[@Dref], "Example Level 1", "Example Level 2"; // level name shown in dungeon level select
@@ -837,39 +1072,42 @@ function script QWS_Tarray { // setarray @DYcoords[@Dref], 123, 234;// Y warp coords
// setarray @DDepth[@Dref], 0, 1; // relative depth to entrance to calculate extra warp fee
//
-// if (#fake_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di]; // Builds menu item if there is a price for warping
-// if (#fake_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]; // Builds menu item if warping is free
-// if (#fake_dun == 1) set @Dmenuref[@Dj],@Di; // Allows the menu to find back which Dungeon you selected as it shifts because of dynamic menu's
-// if (#fake_dun == 1) set @Dj,@Dj+1; // set Dj higher because menu item has been added and make sure it doesn't get overwriten
+// QWS_Make_Dungeon_Menu XXX
+//
+// the full wap commands send out by this scripts for these examples would be
+// for Example Level 1:
+//warp example_01.gat 123 123
//
-// setarray @DLocRef[@Di], @Dref; // @DLocRef, reference to locate where the first level of the dungeon warp information is in the other arrays
-// set @Dref, @Dref+@DLevels[@Di]; // same as @Dj but then for the leveldata which fills up alot more quickly
-// set @Di,@Di+1; // loop counter to get data in right order and to make sure i can find back what option you select
+// for Example Level 2:
+//warp example_02.gat 234 234
+//
+// use the same XXX number as you used when making your own dungeon unlocker (Warpra Helper) inside the dungeon
+// (usually half way near a warp to next level)
+// Read below how
//
-// Small note:
-// when adding your own dungeon data, you can leave 'if (#fake_dun == 1)' out and everyone will get the option to warp to
-// if you want to use a variable make your own dungeon unlocker inside the dungeon (usually half way near a warp to next level)
// example:
-//( syntax: example_01.gat,xcoord,ycoord,directionfacing script Name of NPC NPC-ID,{ )
+//
+//syntax:
+//mapname.gat,xcoord,ycoord,directionfacing script Name of NPC NPC-ID,{
+//
+// Full example using fake map & coords
//
//example_01.gat,213,213,4 script Warpra Helper 112,{
-// if (#fake_dun == 1) mes "[Warpra]";
-// if (#fake_dun == 1) mes "Sorry I can only unlock this location.";
-// if (#fake_dun == 1) close;
-// set #fake_dun,1;
-// mes "[Warpra]";
-// mes "A FAKE DUNGEON FOR EXAMPLE unlocked!";
+// callfunc "QWS_Dungeon_Warpra",XXX,"A FAKE DUNGEON FOR EXAMPLE";
// close;
// }
+// use a free number for XXX, last used is 28, for Kiel Dungeon
+
+function script QWS_Darray {
+ function QWS_Make_Dungeon_Menu;
set @Di,0;
set @Dj,0;
set @Dref,0;
-
-function script QWS_Darray {
//----------------ABYSS LAKE
setarray @pDmenuitems$[@Di], "Abyss Lake";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "abyss_01.gat", "abyss_02.gat", "abyss_03.gat";
@@ -878,17 +1116,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 273, 270, 27;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#abyss == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#abyss == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#abyss == 1) set @Dmenuref[@Dj],@Di;
- if (#abyss == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 0;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------AMATSU DUNGEON
setarray @pDmenuitems$[@Di], "Amatsu Dungeon";
setarray @pDprice[@Di], $QW_OW_PRICE;
+ setarray @pDfee$[@Di], "$QW_OW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "ama_dun01.gat", "ama_dun02.gat", "ama_dun03.gat";
@@ -897,17 +1130,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 10, 43, 15;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#ama_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#ama_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#ama_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#ama_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 1;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------ANT HELL
setarray @pDmenuitems$[@Di], "Ant Hell Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[2], 2;
setarray @DGat$[@Dref], "anthell01.gat", "anthell02.gat";
@@ -916,17 +1144,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 262, 263;
setarray @DDepth[@Dref], 0, 1;
- if (#anthell == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#anthell == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#anthell == 1) set @Dmenuref[@Dj],@Di;
- if (#anthell == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 2;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------AYOTAYA
setarray @pDmenuitems$[@Di], "Ayotaya Dungeon";
setarray @pDprice[@Di], $QW_OW_PRICE;
+ setarray @pDfee$[@Di], "$QW_OW_FEE";
setarray @DLevels[3], 2;
setarray @DGat$[@Dref], "ayo_dun01.gat", "ayo_dun02.gat";
@@ -935,17 +1158,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 17, 13;
setarray @DDepth[@Dref], 0, 1;
- if (#ayotaya_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#ayotaya_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#ayotaya_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#ayotaya_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 3;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------BYALAN
setarray @pDmenuitems$[@Di], "Byalan Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[4], 5;
setarray @DGat$[@Dref], "iz_dun00.gat", "iz_dun01.gat", "iz_dun02.gat", "iz_dun03.gat", "iz_dun04.gat";
@@ -954,17 +1172,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 168, 37, 204, 63, 27;
setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
- if (#iz_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#iz_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#iz_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#iz_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 4;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------CLOCK TOWER
setarray @pDmenuitems$[@Di], "Clock Tower Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[5], 8;
setarray @DGat$[@Dref], "c_tower1.gat", "c_tower2.gat", "c_tower3.gat", "c_tower4.gat", "alde_dun01.gat", "alde_dun02.gat", "alde_dun03.gat", "alde_dun04.gat";
@@ -973,17 +1186,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 163, 26, 148, 63, 25, 41, 53, 130;
setarray @DDepth[@Dref], 0, 1, 2, 3, 1, 2, 3, 4;
- if (#c_tower == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#c_tower == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#c_tower == 1) set @Dmenuref[@Dj],@Di;
- if (#c_tower == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 5;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------COAL MINE
setarray @pDmenuitems$[@Di], "Coal Mine Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[6], 3;
setarray @DGat$[@Dref], "mjo_dun01.gat", "mjo_dun02.gat", "mjo_dun03.gat";
@@ -992,17 +1200,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 17, 343, 261;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#mjo_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#mjo_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#mjo_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#mjo_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 6;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------CULVERT
setarray @pDmenuitems$[@Di], "Culvert Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[7], 4;
setarray @DGat$[@Dref], "prt_sewb1.gat", "prt_sewb2.gat", "prt_sewb3.gat", "prt_sewb4.gat";
@@ -1011,17 +1214,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 248, 19, 169, 92;
setarray @DDepth[@Dref], 0, 1, 2, 3;
- if (#prt_sewb == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#prt_sewb == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#prt_sewb == 1) set @Dmenuref[@Dj],@Di;
- if (#prt_sewb == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 7;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------EINBECH DUNGEON
setarray @pDmenuitems$[@Di], "Einbech Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[8], 2;
setarray @DGat$[@Dref], "ein_dun01.gat", "ein_dun02.gat";
@@ -1030,17 +1228,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 14, 290;
setarray @DDepth[@Dref], 0, 1;
- if (#einbech_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#einbech_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#einbech_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#einbech_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 8;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------GEFENIA DUNGEON
setarray @pDmenuitems$[@Di], "Gefenia Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[9], 4;
setarray @DGat$[@Dref], "gefenia01.gat", "gefenia02.gat", "gefenia03.gat", "gefenia04.gat";
@@ -1049,17 +1242,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 167, 35, 236, 270;
setarray @DDepth[@Dref], 0, 1, 2, 3;
- if (#gef_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#gef_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#gef_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#gef_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 9;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------GEFFEN DUNGEON
setarray @pDmenuitems$[@Di], "Geffen Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 4;
setarray @DGat$[@Dref], "gef_dun00.gat", "gef_dun01.gat", "gef_dun02.gat", "gef_dun03.gat";
@@ -1068,18 +1256,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 100, 236, 132, 200;
setarray @DDepth[@Dref], 0, 1, 2, 3;
- if (#gef_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#gef_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#gef_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#gef_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 10;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------GLAST HEIM
setarray @pDmenuitems$[@Di], "Glast Heim Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
-
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 17;
setarray @DGat$[@Dref], "glast_01.gat", "gl_church.gat", "gl_chyard.gat", "gl_in01.gat", "gl_cas01.gat", "gl_cas02.gat", "gl_knt01.gat", "gl_knt02.gat", "gl_prison.gat", "gl_prison1.gat", "gl_step.gat", "gl_sew01.gat", "gl_sew02.gat", "gl_sew03.gat", "gl_sew04.gat", "gl_dun01.gat", "gl_dun02.gat";
@@ -1088,17 +1270,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 300, 8, 15, 59, 29, 25, 10, 287, 70, 14, 124, 255, 291, 273, 277, 271, 274;
setarray @DDepth[@Dref], 0, 1, 2, 1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 4, 5, 6;
- if (#gl_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#gl_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#gl_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#gl_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 11;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------GONRYUN DUNGEON
setarray @pDmenuitems$[@Di], "Gonryun Dungeon";
setarray @pDprice[@Di], $QW_OW_PRICE;
+ setarray @pDfee$[@Di], "$QW_OW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "gon_dun01.gat", "gon_dun02.gat", "gon_dun03.gat";
@@ -1107,17 +1284,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 59, 114, 9;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#gon_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#gon_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#gon_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#gon_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 12;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------HIDDEN DUNGEON
setarray @pDmenuitems$[@Di], "Hidden Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "prt_maze01.gat", "prt_maze02.gat", "prt_maze03.gat";
@@ -1126,18 +1298,13 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 6, 19, 8;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#hid_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#hid_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#hid_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#hid_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 13;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------JUPEROS CAVE
setarray @pDmenuitems$[@Di], "Juperos Cave";
setarray @pDprice[@Di], $QW_AW_PRICE;
- setarray @DLevels[@Di], 3;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
+ setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "juperos_01.gat", "juperos_02.gat";
setarray @DLevelName$[@Dref], "Level 1", "Level 2";
@@ -1145,17 +1312,26 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 247, 60;
setarray @DDepth[@Dref], 0, 1;
- if (#lighthalzen_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#lighthalzen_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#lighthalzen_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#lighthalzen_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 14;
+
+//----------------KIEL DUNGEON
+ setarray @pDmenuitems$[@Di], "Kiel Dungeon";
+ setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
+ setarray @DLevels[@Di], 2;
+
+ setarray @DGat$[@Dref], "kh_dun01.gat", "kh_dun02.gat";
+ setarray @DLevelName$[@Dref], "1st Floor", "2nd Floor";
+ setarray @DXcoords[@Dref], 63, 42;
+ setarray @DYcoords[@Dref], 10, 197;
+ setarray @DDepth[@Dref], 0, 1;
+
+ QWS_Make_Dungeon_Menu 28;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------LIGHTHALZEN BIO LAB
- setarray @pDmenuitems$[@Di], "Lighthalzen Bio Lab", "Louyang Dungeon", "Magma Dungeon", "Odin Temple", "Orc Dungeon", "Payon Dungeon", "Pyramids Dungeon", "Sphinx Dungeon", "Sunken Ship Dungeon", "Thanatos Tower", "Toy Factory Dungeon", "Turtle Island Dungeon", "Umbala Dungeon", "Cancel";
- setarray @pDprice[@Di], $QW_AW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_BW_PRICE, $QW_AW_PRICE, $QW_AW_PRICE, $QW_OW_PRICE, 0;
+ setarray @pDmenuitems$[@Di], "Lighthalzen Bio Lab";
+ setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "lhz_dun01.gat", "lhz_dun02.gat", "lhz_dun03.gat";
@@ -1164,17 +1340,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 287, 18, 137;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#lighthalzen_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#lighthalzen_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#lighthalzen_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#lighthalzen_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 15;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------LOUYANG DUNGEON
setarray @pDmenuitems$[@Di], "Louyang Dungeon";
setarray @pDprice[@Di], $QW_OW_PRICE;
+ setarray @pDfee$[@Di], "$QW_OW_FEE";
setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "lou_dun02.gat", "lou_dun03.gat";
@@ -1183,17 +1354,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 20, 38;
setarray @DDepth[@Dref], 0, 1;
- if (#louyang_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#louyang_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#louyang_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#louyang_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 16;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------MAGMA DUNGEON
setarray @pDmenuitems$[@Di], "Magma Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "mag_dun01.gat", "mag_dun02.gat";
@@ -1202,17 +1368,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 69, 32;
setarray @DDepth[@Dref], 0, 1;
- if (#mag_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#mag_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#mag_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#mag_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 17;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------ODIN TEMPLE
setarray @pDmenuitems$[@Di], "Odin Temple";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 1;
setarray @DGat$[@Dref], "odin_tem01.gat";
@@ -1221,17 +1382,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 145;
setarray @DDepth[@Dref], 0;
- if (#odintemple == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#odintemple == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#odintemple == 1) set @Dmenuref[@Dj],@Di;
- if (#odintemple == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 18;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------ORC DUNGEON
setarray @pDmenuitems$[@Di], "Orc Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "orcsdun01.gat", "orcsdun02.gat";
@@ -1240,17 +1396,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 169, 185;
setarray @DDepth[@Dref], 0, 1;
- if (#orcsdun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#orcsdun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#orcsdun == 1) set @Dmenuref[@Dj],@Di;
- if (#orcsdun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 19;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------PAYON DUNGEON
setarray @pDmenuitems$[@Di], "Payon Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 5;
setarray @DGat$[@Dref], "pay_dun00.gat", "pay_dun01.gat", "pay_dun02.gat", "pay_dun03.gat", "pay_dun04.gat";
@@ -1259,17 +1410,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 180, 33, 63, 159, 204;
setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
- if (#pay_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#pay_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#pay_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#pay_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 20;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------PYRAMIDS
setarray @pDmenuitems$[@Di], "Pyramids Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 6;
setarray @DGat$[@Dref], "moc_pryd01.gat", "moc_pryd02.gat", "moc_pryd03.gat", "moc_pryd04.gat", "moc_pryd05.gat", "moc_pryd06.gat";
@@ -1278,17 +1424,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 9, 192, 92, 11, 96, 8;
setarray @DDepth[@Dref], 0, 1, 2, 3, 1, 2;
- if (#moc_pryd == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#moc_pryd == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#moc_pryd == 1) set @Dmenuref[@Dj],@Di;
- if (#moc_pryd == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 21;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------SPHINX
setarray @pDmenuitems$[@Di], "Sphinx Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 5;
setarray @DGat$[@Dref], "in_sphinx1.gat", "in_sphinx2.gat", "in_sphinx3.gat", "in_sphinx4.gat", "in_sphinx5.gat";
@@ -1297,17 +1438,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 9, 81, 54, 222, 99;
setarray @DDepth[@Dref], 0, 1, 2, 3, 4;
- if (#in_sphinx == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#in_sphinx == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#in_sphinx == 1) set @Dmenuref[@Dj],@Di;
- if (#in_sphinx == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 22;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------SUNKEN SHIP
setarray @pDmenuitems$[@Di], "Sunken Ship Dungeon";
setarray @pDprice[@Di], $QW_BW_PRICE;
+ setarray @pDfee$[@Di], "$QW_BW_FEE";
setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "treasure01.gat", "treasure02.gat";
@@ -1316,17 +1452,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 24, 27;
setarray @DDepth[@Dref], 0, 1;
- if (#treasure == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#treasure == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#treasure == 1) set @Dmenuref[@Dj],@Di;
- if (#treasure == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 23;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------THANATOS TOWER
setarray @pDmenuitems$[@Di], "Thanatos Tower";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 13;
setarray @DGat$[@Dref], "tha_t01.gat", "tha_t02.gat", "tha_t03.gat", "tha_t04.gat", "tha_t05.gat", "tha_t06.gat", "tha_t07.gat", "tha_t08.gat", "tha_t09.gat", "tha_t10.gat", "tha_t11.gat", "tha_t12.gat", "thana_boss.gat";
@@ -1335,17 +1466,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 35, 136, 158, 143, 11, 8, 166, 44, 145, 138, 36, 83, 76;
setarray @DDepth[@Dref], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
- if (#thanatos_tower == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#thanatos_tower == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#thanatos_tower == 1) set @Dmenuref[@Dj],@Di;
- if (#thanatos_tower == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 24;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------TOY FACTORY
setarray @pDmenuitems$[@Di], "Toy Factory Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 2;
setarray @DGat$[@Dref], "xmas_dun01.gat", "xmas_dun02.gat";
@@ -1354,17 +1480,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 16, 133;
setarray @DDepth[@Dref], 0, 1;
- if (#xmas_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#xmas_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#xmas_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#xmas_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 25;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------TURTLE ISTLAND
setarray @pDmenuitems$[@Di], "Turtle Island Dungeon";
setarray @pDprice[@Di], $QW_AW_PRICE;
+ setarray @pDfee$[@Di], "$QW_AW_FEE";
setarray @DLevels[@Di], 4;
setarray @DGat$[@Dref], "tur_dun01.gat", "tur_dun02.gat", "tur_dun03.gat", "tur_dun04.gat";
@@ -1373,17 +1494,12 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 34, 256, 190, 192;
setarray @DDepth[@Dref], 0, 0, 1, 2;
- if (#tur_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#tur_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#tur_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#tur_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 26;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------UMBALA
setarray @pDmenuitems$[@Di], "Umbala Dungeon";
setarray @pDprice[@Di], $QW_OW_PRICE;
+ setarray @pDfee$[@Di], "$QW_OW_FEE";
setarray @DLevels[@Di], 3;
setarray @DGat$[@Dref], "um_dun01.gat", "um_dun02.gat", "yggdrasil01.gat";
@@ -1392,48 +1508,363 @@ function script QWS_Darray { setarray @DYcoords[@Dref], 16, 30, 63;
setarray @DDepth[@Dref], 0, 1, 2;
- if (#um_dun == 1)&&(@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
- if (#um_dun == 1)&&(@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
- if (#um_dun == 1) set @Dmenuref[@Dj],@Di;
- if (#um_dun == 1) set @Dj,@Dj+1;
+ QWS_Make_Dungeon_Menu 27;
- setarray @DLocRef[@Di], @Dref;
- set @Dref, @Dref+@DLevels[@Di];
- set @Di,@Di+1;
//----------------Cancel
setarray @pDmenuitems$[@Di], "Cancel";
setarray @pDprice[@Di], 0;
set @Dmenulist$[@Dj],@pDmenuitems$[@Di];
+ set @Dmenuref[@Dj],57005; // 57005='dead' in hex
+ return;
+
+
+//----------------Make Dungeon Menu Function
+
+function QWS_Make_Dungeon_Menu {
+ set @tempdungeonmenubin,1;
+ if (getarg(0) == 0) goto menu_item;
+ set @temploopdungeonmenu,0;
+ do {
+ set @tempdungeonmenubin, @tempdungeonmenubin * 2;
+ set @temploopdungeonmenu, @temploopdungeonmenu + 1;
+ }while (getarg(0) > @temploopdungeonmenu);
+// check marker and make menu item
+menu_item:
+ if ((@tempdungeonmenubin & ##QWS_D_Unlock) != @tempdungeonmenubin) {
+ setarray @DLocRef[@Di], @Dref;
+ set @Dref, @Dref+@DLevels[@Di];
+ set @Di,@Di+1;
+ return;
+ }
+ if ($QW_MapUserShow == 1) {
+ set @tempmapusers,0;
+ set @mapusersloop,0;
+ do {
+ set @tempmapusers,(getmapusers(@DGat$[@Dref+@mapusersloop]) + @tempmapusers);
+ set @mapusersloop, (@mapusersloop + 1);
+ }while (@DLevels[@Di] > @mapusersloop);
+ if (@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" ["+@tempmapusers+"] -> "+@pDprice[@Di];
+ if (@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" ["+@tempmapusers+"]";
+ set @Dmenuref[@Dj],@Di;
+ set @Dj,@Dj+1;
+ setarray @DLocRef[@Di], @Dref;
+ set @Dref, @Dref+@DLevels[@Di];
+ set @Di,@Di+1;
+ return;
+ }
+ if (@pDprice[@Di] != 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di]+" -> "+@pDprice[@Di];
+ if (@pDprice[@Di] == 0) set @Dmenulist$[@Dj], @pDmenuitems$[@Di];
set @Dmenuref[@Dj],@Di;
+ set @Dj,@Dj+1;
+ setarray @DLocRef[@Di], @Dref;
+ set @Dref, @Dref+@DLevels[@Di];
+ set @Di,@Di+1;
return;
+
+}
}
function script QWS_DLarray {
//----------------Start building Menu
- set @DWi,@DLocRef[@DwarpMenu]; // That's our loop counter.
+ set @DWref,@DLocRef[@DwarpMenu]; // That's our reference to the arrays with leveldata.
+ set @DWi,0; // That's our loop counter.
set @DWj,0; // That's the menu lines counter.
cleararray @DWLmenulist$[0],"",20; // Clearing the array to get rid off ghost items in menu
-Loop:
-// Main Loop
- set @warpprice, (@pDprice[@DwarpMenu]+$QW_DW_FEE*@DDepth[@DWi]);
- if (@warpprice != 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWi]+" -> "+@warpprice;
- if (@warpprice == 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWi];
- set @DWLmenuref[@DWj],@DWi;
-
- set @DWj,@DWj+1;
- set @DWi,@DWi+1;
+ do {
+ if ($QW_DL == 0)||($QW_DDL >= @DDepth[@DWref]) {
+
+ set @warpprice, (@pDprice[@DwarpMenu]+ (getd(@pDfee$[@DwarpMenu])*@DDepth[@DWref]));
+
+ if (@warpprice != 0)&&($QW_MapUserShow == 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWref]+" -> "+@warpprice;
+ if (@warpprice == 0)&&($QW_MapUserShow == 0) set @DWLmenulist$[@DWj], @DLevelName$[@DWref];
+ if (@warpprice != 0)&&($QW_MapUserShow == 1) set @DWLmenulist$[@DWj], @DLevelName$[@DWref]+" ["+getmapusers(@DGat$[@DWref])+"] -> "+@warpprice;
+ if (@warpprice == 0)&&($QW_MapUserShow == 1) set @DWLmenulist$[@DWj], @DLevelName$[@DWref]+" ["+getmapusers(@DGat$[@DWref])+"]";
+ set @DWLmenuref[@DWj],@DWref;
+
+ set @DWj,@DWj+1;
+ }
+ set @DWref, @DWref+1;
+ set @DWi,@DWi+1;
+ }while (@DWi < @DLevels[@DwarpMenu]);
+ set @DWLmenulist$[@DWj], "Exit";
+ set @DWLmenuref[@DWj],57005; // 57005='dead' in hex
+ return;
+ }
- if (@DWj == @DLevels[@DwarpMenu]) goto make_exit;
+
+//=================Backwards=Compatibility=Pre=1.8=================
+
+function script QWS_BackComp {
+// 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];
+// 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];
+// also clears variables so that the account file variables can be used for something else variable 0 = variable delete on next save
+
+// Towns
+ set @towntemp,0;
+ if (#prontera != 0) set @towntemp,@towntemp + 1;
+ if (#alberta != 0) set @towntemp,@towntemp + 2;
+ if (#aldebaran != 0) set @towntemp,@towntemp + 4;
+ if (#amatsu != 0) set @towntemp,@towntemp + 8;
+ if (#ayotaya != 0) set @towntemp,@towntemp + 16;
+ if (#comodo != 0) set @towntemp,@towntemp + 32;
+ if (#einbech != 0) set @towntemp,@towntemp + 64;
+ if (#einbroch != 0) set @towntemp,@towntemp + 128;
+ if (#geffen != 0) set @towntemp,@towntemp + 256;
+ if (#gonryun != 0) set @towntemp,@towntemp + 512;
+ if (#hugel != 0) set @towntemp,@towntemp + 1024;
+ if (#izlude != 0) set @towntemp,@towntemp + 2048;
+ if (#jawaii != 0) set @towntemp,@towntemp + 4096;
+ if (#lighthalzen != 0) set @towntemp,@towntemp + 8192;
+ if (#louyang != 0) set @towntemp,@towntemp + 16384;
+ if (#xmas != 0) set @towntemp,@towntemp + 32768;
+ if (#morocc != 0) set @towntemp,@towntemp + 65536;
+ if (#niflheim != 0) set @towntemp,@towntemp + 131072;
+ if (#payon != 0) set @towntemp,@towntemp + 262144;
+ if (#umbala != 0) set @towntemp,@towntemp + 524288;
+ if (#yuno != 0) set @towntemp,@towntemp + 1048576;
+// Clear Town variables
+ set #prontera,0;
+ set #alberta,0;
+ set #aldebaran,0;
+ set #amatsu,0;
+ set #ayotaya,0;
+ set #comodo,0;
+ set #einbech,0;
+ set #einbroch,0;
+ set #geffen,0;
+ set #gonryun,0;
+ set #hugel,0;
+ set #izlude,0;
+ set #jawaii,0;
+ set #lighthalzen,0;
+ set #louyang,0;
+ set #xmas,0;
+ set #morocc,0;
+ set #niflheim,0;
+ set #payon,0;
+ set #umbala,0;
+ set #yuno,0;
+// set Town warp unlock variable
+set ##QWS_T_Unlock, (##QWS_T_Unlock | @towntemp);
+ //because multiple account servers now stack on 1 variable i used a 'or' to stack them
+// Dungeons
+ set @dungeontemp,0;
+ if (#abyss != 0) set @dungeontemp,@dungeontemp + 1;
+ if (#ama_dun != 0) set @dungeontemp,@dungeontemp + 2;
+ if (#anthell != 0) set @dungeontemp,@dungeontemp + 4;
+ if (#ayotaya_dun != 0) set @dungeontemp,@dungeontemp + 8;
+ if (#iz_dun != 0) set @dungeontemp,@dungeontemp + 16;
+ if (#c_tower != 0) set @dungeontemp,@dungeontemp + 32;
+ if (#mjo_dun != 0) set @dungeontemp,@dungeontemp + 64;
+ if (#prt_sewb != 0) set @dungeontemp,@dungeontemp + 128;
+ if (#einbech_dun != 0) set @dungeontemp,@dungeontemp + 256;
+ if (#gefenia != 0) set @dungeontemp,@dungeontemp + 512;
+ if (#gef_dun != 0) set @dungeontemp,@dungeontemp + 1024;
+ if (#gl_dun != 0) set @dungeontemp,@dungeontemp + 2048;
+ if (#gon_dun != 0) set @dungeontemp,@dungeontemp + 4096;
+ if (#hid_dun != 0) set @dungeontemp,@dungeontemp + 8192;
+ if (#juperos != 0) set @dungeontemp,@dungeontemp + 16384;
+ if (#lighthalzen_dun != 0) set @dungeontemp,@dungeontemp + 32768;
+ if (#louyang_dun != 0) set @dungeontemp,@dungeontemp + 65536;
+ if (#mag_dun != 0) set @dungeontemp,@dungeontemp + 131072;
+ if (#odintemple != 0) set @dungeontemp,@dungeontemp + 262144;
+ if (#orcsdun != 0) set @dungeontemp,@dungeontemp + 524288;
+ if (#pay_dun != 0) set @dungeontemp,@dungeontemp + 1048576;
+ if (#moc_pryd != 0) set @dungeontemp,@dungeontemp + 2097152;
+ if (#in_sphinx != 0) set @dungeontemp,@dungeontemp + 4194304;
+ if (#treasure != 0) set @dungeontemp,@dungeontemp + 8388608;
+ if (#thanatos_tower != 0) set @dungeontemp,@dungeontemp + 16777216;
+ if (#xmas_dun != 0) set @dungeontemp,@dungeontemp + 33554432;
+ if (#tur_dun != 0) set @dungeontemp,@dungeontemp + 67108864;
+ if (#um_dun != 0) set @dungeontemp,@dungeontemp + 134217728;
+// Clear Dungeon variables
+ set #abyss,0;
+ set #ama_dun,0;
+ set #anthell,0;
+ set #ayotaya_dun,0;
+ set #iz_dun,0;
+ set #c_tower,0;
+ set #mjo_dun,0;
+ set #prt_sewb,0;
+ set #einbech_dun,0;
+ set #gefenia,0;
+ set #gef_dun,0;
+ set #gl_dun,0;
+ set #gon_dun,0;
+ set #hid_dun,0;
+ set #juperos,0;
+ set #lighthalzen_dun,0;
+ set #louyang_dun,0;
+ set #mag_dun,0;
+ set #odintemple,0;
+ set #orcsdun,0;
+ set #pay_dun,0;
+ set #moc_pryd,0;
+ set #in_sphinx,0;
+ set #treasure,0;
+ set #thanatos_tower,0;
+ set #xmas_dun,0;
+ set #tur_dun,0;
+ set #um_dun,0;
+// set Town warp unlock variable
+set ##QWS_D_Unlock, (##QWS_D_Unlock | @dungeontemp);
+//mark that this character has done the upgrade to 1.8
+set ##QWS_UP,18;
+return;
+}
+
+
+//===================Extra=Variable=Clear=Pre=1.8==================
+function script Extra_Variable_Clear {
+// Clear Town variables
+ set #prontera,0;
+ set #alberta,0;
+ set #aldebaran,0;
+ set #amatsu,0;
+ set #ayotaya,0;
+ set #comodo,0;
+ set #einbech,0;
+ set #einbroch,0;
+ set #geffen,0;
+ set #gonryun,0;
+ set #hugel,0;
+ set #izlude,0;
+ set #jawaii,0;
+ set #lighthalzen,0;
+ set #louyang,0;
+ set #xmas,0;
+ set #morocc,0;
+ set #niflheim,0;
+ set #payon,0;
+ set #umbala,0;
+ set #yuno,0;
+
+// Clear Dungeon variables
+ set #abyss,0;
+ set #ama_dun,0;
+ set #anthell,0;
+ set #ayotaya_dun,0;
+ set #iz_dun,0;
+ set #c_tower,0;
+ set #mjo_dun,0;
+ set #prt_sewb,0;
+ set #einbech_dun,0;
+ set #gefenia,0;
+ set #gef_dun,0;
+ set #gl_dun,0;
+ set #gon_dun,0;
+ set #hid_dun,0;
+ set #juperos,0;
+ set #lighthalzen_dun,0;
+ set #louyang_dun,0;
+ set #mag_dun,0;
+ set #odintemple,0;
+ set #orcsdun,0;
+ set #pay_dun,0;
+ set #moc_pryd,0;
+ set #in_sphinx,0;
+ set #treasure,0;
+ set #thanatos_tower,0;
+ set #xmas_dun,0;
+ set #tur_dun,0;
+ set #um_dun,0;
+
+// as the account based variables are limited just run this on every character to save some variables
+set QWS_ExtraVARClear,18;
+return;
+}
+
+//================Dungeon=Warpras=That=Only=Unlock=================
+
+function script QWS_Dungeon_Warpra {
+ function QWS_D_getbin;
+ function QWS_D_setbin;
- goto Loop;
+ if ((QWS_D_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
+ mes "[Warpra]";
+ mes getarg(1)+" unlocked!";
+ QWS_D_setbin(getarg(0));
+ return;
+ } else if (QWS_D_getbin(getarg(0)) == 1){
+ mes "[Warpra]";
+ mes "Sorry I can only unlock this location.";
+ } else
+ debugmes "QWS_Dungeon_Warpra error, improper syntax ?";
+ return;
+
+
+function QWS_D_setbin {
+ set @tempsetbindata,1;
+ if (getarg(0) == 0) goto binset;
+ set @temploopsetbin,0;
+ do {
+ set @tempsetbindata, @tempsetbindata * 2;
+ set @temploopsetbin, @temploopsetbin + 1;
+ } while (getarg(0) > @temploopsetbin);
+binset:
+ set ##QWS_D_Unlock,(##QWS_D_Unlock | @tempsetbindata);
+ return;
+}
-make_exit:
- set @DWLmenulist$[@DWj], "Exit";
- set @DWLmenuref[@DWj],1337; //impossible number easy to track back
+function QWS_D_getbin {
+ set @tempgetbindata,1;
+ if (getarg(0) == 0) goto binget;
+ set @temploopgetbin,0;
+ do {
+ set @tempgetbindata, @tempgetbindata * 2;
+ set @temploopgetbin, @temploopgetbin + 1;
+ } while (getarg(0) > @temploopgetbin);
+binget:
+ if ((@tempgetbindata & ##QWS_D_Unlock) == @tempgetbindata) return 1;
+ return 0;
+}
+}
+
+//==========================Town=Warpras===========================
+
+function script QWS_Town_Warpra {
+ function QWS_T_getbin;
+ function QWS_T_setbin;
+
+ if ((QWS_T_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
+ mes "[Warpra]";
+ mes getarg(1)+" unlocked!";
+ QWS_T_setbin(getarg(0));
+ return;
+ } else if (QWS_T_getbin(getarg(0)) == 1){
+callfunc "Q_Warpra",0;
+ } else
+ debugmes "QWS_Town_Warpra error, improper syntax ?";
+ return;
+
+
+function QWS_T_setbin {
+ set @tempsetbindata,1;
+ if (getarg(0) == 0) goto binset;
+ set @temploopsetbin,0;
+ do {
+ set @tempsetbindata, @tempsetbindata * 2;
+ set @temploopsetbin, @temploopsetbin + 1;
+ } while (getarg(0) > @temploopsetbin);
+binset:
+ set ##QWS_T_Unlock,(##QWS_T_Unlock | @tempsetbindata);
return;
- }
+}
+function QWS_T_getbin {
+ set @tempgetbindata,1;
+ if (getarg(0) == 0) goto binget;
+ set @temploopgetbin,0;
+ do {
+ set @tempgetbindata, @tempgetbindata * 2;
+ set @temploopgetbin, @temploopgetbin + 1;
+ } while (getarg(0) > @temploopgetbin);
+binget:
+ if ((@tempgetbindata & ##QWS_T_Unlock) == @tempgetbindata) return 1;
+ return 0;
+}
+}
//============================Warpras==============================
alb2trea.gat,73,101,4 script Warpra 113,{
@@ -1479,430 +1910,231 @@ yuno_fild03.gat,37,135,4 script Warpra 113,{ callfunc "Q_Warpra",1;
}
-
alberta.gat,32,240,4 script Warpra 113,{
- if (#alberta != 0) callfunc "Q_Warpra",0;
- set #alberta,1;
- mes "[Warpra]";
- mes "Alberta Town unlocked!";
+ callfunc "QWS_Town_Warpra",1,"Alberta Town";
close;
}
aldebaran.gat,146,118,4 script Warpra 113,{
- if (#aldebaran != 0) callfunc "Q_Warpra",0;
- set #aldebaran,1;
- mes "[Warpra]";
- mes "Aldebaran Town unlocked!";
+ callfunc "QWS_Town_Warpra",2,"Aldebaran Town";
close;
}
ayothaya.gat,216,171,5 script Warpra 113,{
- if (#ayotaya != 0) callfunc "Q_Warpra",0;
- set #ayotaya,1;
- mes "[Warpra]";
- mes "Ayotaya Town unlocked!";
+ callfunc "QWS_Town_Warpra",4,"Ayotaya Town";
close;
}
amatsu.gat,193,81,1 script Warpra 113,{
- if (#amatsu != 0) callfunc "Q_Warpra",0;
- set #amatsu,1;
- mes "[Warpra]";
- mes "Amatsu Town unlocked!";
+ callfunc "QWS_Town_Warpra",3,"Amatsu Town";
close;
}
comodo.gat,195,158,4 script Warpra 113,{
- if (#comodo != 0) callfunc "Q_Warpra",0;
- set #comodo,1;
- mes "[Warpra]";
- mes "Comodo Town unlocked!";
+ callfunc "QWS_Town_Warpra",5,"Comodo Town";
close;
}
einbroch.gat,229,196,5 script Warpra 113,{
- if (#einbroch != 0) callfunc "Q_Warpra",0;
- set #einbroch,1;
- mes "[Warpra]";
- mes "Einbroch Town unlocked!";
+ callfunc "QWS_Town_Warpra",7,"Einbroch Town";
close;
}
einbech.gat,173,131,5 script Warpra 113,{
- if (#einbech != 0) callfunc "Q_Warpra",0;
- set #einbech,1;
- mes "[Warpra]";
- mes "Einbech Town unlocked!";
+ callfunc "QWS_Town_Warpra",6,"Einbech Town";
close;
}
geffen.gat,116,66,4 script Warpra 113,{
- if (#geffen != 0) callfunc "Q_Warpra",0;
- set #geffen,1;
- mes "[Warpra]";
- mes "Geffen Town unlocked!";
+ callfunc "QWS_Town_Warpra",8,"Geffen Town";
close;
}
gonryun.gat,152,130,4 script Warpra 113,{
- if (#gonryun != 0) callfunc "Q_Warpra",0;
- set #gonryun,1;
- mes "[Warpra]";
- mes "Gonryun Town unlocked!";
+ callfunc "QWS_Town_Warpra",9,"Gonryun Town";
close;
}
hugel.gat,90,127,5 script Warpra 113,{
- if (#hugel != 0) callfunc "Q_Warpra",0;
- set #hugel,1;
- mes "[Warpra]";
- mes "Hugel Town unlocked!";
+ callfunc "QWS_Town_Warpra",10,"Hugel Town";
close;
}
jawaii.gat,107,182,5 script Warpra 113,{
- if (#jawaii != 0) callfunc "Q_Warpra",0;
- set #jawaii,1;
- mes "[Warpra]";
- mes "Jawaii Town unlocked!";
+ callfunc "QWS_Town_Warpra",12,"Jawaii Town";
close;
}
izlude.gat,132,116,4 script Warpra 113,{
- if (#izlude != 0) callfunc "Q_Warpra",0;
- set #izlude,1;
- mes "[Warpra]";
- mes "Izlude Town unlocked!";
+ callfunc "QWS_Town_Warpra",11,"Izlude Town";
close;
}
lighthalzen.gat,153,100,5 script Warpra 113,{
- if (#lighthalzen != 0) callfunc "Q_Warpra",0;
- set #lighthalzen,1;
- mes "[Warpra]";
- mes "Lighthalzen Town unlocked!";
+ callfunc "QWS_Town_Warpra",13,"Lighthalzen Town";
close;
}
louyang.gat,211,106,4 script Warpra 113,{
- if (#louyang != 0) callfunc "Q_Warpra",0;
- set #louyang,1;
- mes "[Warpra]";
- mes "Louyang Town unlocked!";
+ callfunc "QWS_Town_Warpra",14,"Louyang Town";
close;
}
morocc.gat,157,95,4 script Warpra 113,{
- if (#morocc != 0) callfunc "Q_Warpra",0;
- set #morocc,1;
- mes "[Warpra]";
- mes "Morroc Town unlocked!";
+ callfunc "QWS_Town_Warpra",16,"Morroc Town";
close;
}
nif_fild01.gat,319,77,1 script Warpra 113,{
- if (#niflheim != 0) callfunc "Q_Warpra",0;
- set #niflheim,1;
- mes "[Warpra]";
- mes "Niflheim Town unlocked!";
+ callfunc "QWS_Town_Warpra",17,"Niflheim Town";
close;
}
payon.gat,183,110,4 script Warpra 113,{
- if (#payon != 0) callfunc "Q_Warpra",0;
- set #payon,1;
- mes "[Warpra]";
- mes "Payon Town unlocked!";
+ callfunc "QWS_Town_Warpra",18,"Payon Town";
close;
}
prontera.gat,147,172,5 script Warpra 113,{
- if (#prontera != 0) callfunc "Q_Warpra",0;
- set #prontera,1;
- mes "[Warpra]";
- mes "Prontera Town unlocked!";
+ callfunc "QWS_Town_Warpra",0,"Prontera Town";
close;
}
umbala.gat,133,130,4 script Warpra 113,{
- if (#umbala != 0) callfunc "Q_Warpra",0;
- set #umbala,1;
- mes "[Warpra]";
- mes "Umbala Town unlocked!";
+ callfunc "QWS_Town_Warpra",19,"Umbala Town";
close;
}
xmas.gat,151,136,4 script Warpra 113,{
- if (#xmas != 0) callfunc "Q_Warpra",0;
- set #xmas,1;
- mes "[Warpra]";
- mes "Lutie Town unlocked!";
+ callfunc "QWS_Town_Warpra",15,"Lutie Town";
close;
}
yuno.gat,138,162,4 script Warpra 113,{
- if (#yuno != 0) callfunc "Q_Warpra",0;
- set #yuno,1;
- mes "[Warpra]";
- mes "Yuno Town unlocked!";
+ callfunc "QWS_Town_Warpra",20,"Yuno Town";
close;
}
abyss_02.gat,274,266,1 script Warpra 113,{
- if (#abyss == 1) mes "[Warpra]";
- if (#abyss == 1) mes "Sorry I can only unlock this location.";
- if (#abyss == 1) close;
- set #abyss,1;
- mes "[Warpra]";
- mes "Abyss Lake unlocked!";
+ callfunc "QWS_Dungeon_Warpra",0,"Abyss Lake";
close;
}
ama_dun02.gat,192,118,5 script Warpra Helper 112,{
- if (#ama_dun == 1) mes "[Warpra]";
- if (#ama_dun == 1) mes "Sorry I can only unlock this location.";
- if (#ama_dun == 1) close;
- set #ama_dun,1;
- mes "[Warpra]";
- mes "Amatsu Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",1,"Amatsu Dungeon";
close;
}
anthell02.gat,170,165,3 script Warpra Helper 112,{
- if (#anthell == 1) mes "[Warpra]";
- if (#anthell == 1) mes "Sorry I can only unlock this location.";
- if (#anthell == 1) close;
- set #anthell,1;
- mes "[Warpra]";
- mes "Ant Hell Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",2,"Ant Hell Dungeon";
close;
}
ayo_dun02.gat,258,193,5 script Warpra Helper 112,{
- if (#ayotaya_dun == 1) mes "[Warpra]";
- if (#ayotaya_dun == 1) mes "Sorry I can only unlock this location.";
- if (#ayotaya_dun == 1) close;
- set #ayotaya_dun,1;
- mes "[Warpra]";
- mes "Ayotaya Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",3,"Ayotaya Dungeon";
close;
}
ein_dun02.gat,292,282,1 script Warpra Helper 112,{
- if (#einbech_dun == 1) mes "[Warpra]";
- if (#einbech_dun == 1) mes "Sorry I can only unlock this location.";
- if (#einbech_dun == 1) close;
- set #einbech_dun,1;
- mes "[Warpra]";
- mes "Einbech Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",8,"Einbech Dungeon";
close;
}
iz_dun03.gat,202,47,2 script Warpra Helper 112,{
- if (#iz_dun == 1) mes "[Warpra]";
- if (#iz_dun == 1) mes "Sorry I can only unlock this location.";
- if (#iz_dun == 1) close;
- set #iz_dun,1;
- mes "[Warpra]";
- mes "Byalan Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",4,"Byalan Dungeon";
close;
}
c_tower3.gat,129,106,4 script Warpra Helper 112,{
- if (#c_tower == 1) mes "[Warpra]";
- if (#c_tower == 1) mes "Sorry I can only unlock this location.";
- if (#c_tower == 1) close;
- set #c_tower,1;
- mes "[Warpra]";
- mes "Clock Tower Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",5,"Clock Tower Dungeon";
close;
}
mjo_dun02.gat,39,25,4 script Warpra Helper 112,{
- if (#mjo_dun == 1) mes "[Warpra]";
- if (#mjo_dun == 1) mes "Sorry I can only unlock this location.";
- if (#mjo_dun == 1) close;
- set #mjo_dun,1;
- mes "[Warpra]";
- mes "Coal Mine Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",6,"Coal Mine Dungeon";
close;
}
prt_sewb2.gat,176,30,3 script Warpra Helper 112,{
- if (#prt_sewb == 1) mes "[Warpra]";
- if (#prt_sewb == 1) mes "Sorry I can only unlock this location.";
- if (#prt_sewb == 1) close;
- set #prt_sewb,1;
- mes "[Warpra]";
- mes "Culvert Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",7,"Culvert Dungeon";
close;
}
gefenia03.gat,137,34,0 script Warpra Helper 112,{
- if (#gefenia == 1) mes "[Warpra]";
- if (#gefenia == 1) mes "Sorry I can only unlock this location.";
- if (#gefenia == 1) close;
- set #gefenia,1;
- mes "[Warpra]";
- mes "Gefenia Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",9,"Gefenia Dungeon";
close;
}
gef_dun02.gat,218,61,2 script Warpra Helper 112,{
- if (#gef_dun == 1) mes "[Warpra]";
- if (#gef_dun == 1) mes "Sorry I can only unlock this location.";
- if (#gef_dun == 1) close;
- set #gef_dun,1;
- mes "[Warpra]";
- mes "Gefen Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",10,"Gefen Dungeon";
close;
}
glast_01.gat,371,308,3 script Warpra Helper 112,{
- if (#gl_dun == 1) mes "[Warpra]";
- if (#gl_dun == 1) mes "Sorry I can only unlock this location.";
- if (#gl_dun == 1) close;
- set #gl_dun,1;
- mes "[Warpra]";
- mes "Glast Heim Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",11,"Glast Heim Dungeon";
close;
}
gon_dun01.gat,167,273,4 script Warpra Helper 112,{
- if (#gon_dun == 1) mes "[Warpra]";
- if (#gon_dun == 1) mes "Sorry I can only unlock this location.";
- if (#gon_dun == 1) close;
- set #gon_dun,1;
- mes "[Warpra]";
- mes "Gonryun Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",12,"Gonryun Dungeon";
close;
}
juperos_02.gat,127,154,5 script Warpra Helper 112,{
- if (#juperos == 1) mes "[Warpra]";
- if (#juperos == 1) mes "Sorry I can only unlock this location.";
- if (#juperos == 1) close;
- set #juperos,1;
- mes "[Warpra]";
- mes "Juperos Cave unlocked!";
+ callfunc "QWS_Dungeon_Warpra",14,"Juperos Cave";
close;
}
-lhz_dun02.gat,156,151,3 script Warpra Helper 112,{
- if (#lighthalzen_dun == 1) mes "[Warpra]";
- if (#lighthalzen_dun == 1) mes "Sorry I can only unlock this location.";
- if (#lighthalzen_dun == 1) close;
- set #lighthalzen_dun,1;
- mes "[Warpra]";
- mes "Lighthalzen Bio Lab unlocked!";
+kh_dun01.gat,14,224,3 script Warpra Helper 112,{
+ callfunc "QWS_Dungeon_Warpra",28,"Kiel Dungeon";
+ close;
+}
+
+lhz_dun02.gat,156,151,5 script Warpra Helper 112,{
+ callfunc "QWS_Dungeon_Warpra",15,"Lighthalzen Bio Lab";
close;
}
lou_dun02.gat,168,264,4 script Warpra Helper 112,{
- if (#louyang_dun == 1) mes "[Warpra]";
- if (#louyang_dun == 1) mes "Sorry I can only unlock this location.";
- if (#louyang_dun == 1) close;
- set #louyang_dun,1;
- mes "[Warpra]";
- mes "Louyang Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",16,"Louyang Dungeon";
close;
}
mag_dun02.gat,46,41,3 script Warpra Helper 112,{
- if (#mag_dun == 1) mes "[Warpra]";
- if (#mag_dun == 1) mes "Sorry I can only unlock this location.";
- if (#mag_dun == 1) close;
- set #mag_dun,1;
- mes "[Warpra]";
- mes "Magma Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",17,"Magma Dungeon";
close;
}
odin_tem01.gat,115,148,3 script Warpra Helper 112,{
- if (#odintemple == 1) mes "[Warpra]";
- if (#odintemple == 1) mes "Sorry I can only unlock this location.";
- if (#odintemple == 1) close;
- set #odintemple,1;
- mes "[Warpra]";
- mes "Odin Temple unlocked!";
+ callfunc "QWS_Dungeon_Warpra",18,"Odin Temple";
close;
}
orcsdun01.gat,185,11,3 script Warpra Helper 112,{
- if (#orcsdun == 1) mes "[Warpra]";
- if (#orcsdun == 1) mes "Sorry I can only unlock this location.";
- if (#orcsdun == 1) close;
- set #orcsdun,1;
- mes "[Warpra]";
- mes "Orc Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",19,"Orc Dungeon";
close;
}
pay_dun03.gat,162,143,3 script Warpra Helper 112,{
- if (#pay_dun== 1) mes "[Warpra]";
- if (#pay_dun == 1) mes "Sorry I can only unlock this location.";
- if (#pay_dun == 1) close;
- set #pay_dun,1;
- mes "[Warpra]";
- mes "Payon Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",20,"Payon Dungeon";
close;
}
moc_pryd02.gat,101,95,3 script Warpra Helper 112,{
- if (#moc_pryd == 1) mes "[Warpra]";
- if (#moc_pryd == 1) mes "Sorry I can only unlock this location.";
- if (#moc_pryd == 1) close;
- set #moc_pryd,1;
- mes "[Warpra]";
- mes "Pyramides Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",21,"Pyramides Dungeon";
close;
}
in_sphinx2.gat,274,268,1 script Warpra Helper 112,{
- if (#in_sphinx == 1) mes "[Warpra]";
- if (#in_sphinx == 1) mes "Sorry I can only unlock this location.";
- if (#in_sphinx == 1) close;
- set #in_sphinx,1;
- mes "[Warpra]";
- mes "Sphinx Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",22,"Sphinx Dungeon";
close;
}
tha_t07.gat,111,162,3 script Warpra Helper 112,{
- if (#thanatos_tower == 1) mes "[Warpra]";
- if (#thanatos_tower == 1) mes "Sorry I can only unlock this location.";
- if (#thanatos_tower == 1) close;
- set #thanatos_tower,1;
- mes "[Warpra]";
- mes "Thanatos Tower unlocked!";
+ callfunc "QWS_Dungeon_Warpra",24,"Thanatos Tower";
close;
}
treasure02.gat,104,40,3 script Warpra Helper 112,{
- if (#treasure == 1) mes "[Warpra]";
- if (#treasure == 1) mes "Sorry I can only unlock this location.";
- if (#treasure == 1) close;
- set #treasure,1;
- mes "[Warpra]";
- mes "Sunken Ship Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",23,"Sunken Ship Dungeon";
close;
}
xmas_dun02.gat,124,131,3 script Warpra Helper 112,{
- if (#xmas_dun == 1) mes "[Warpra]";
- if (#xmas_dun == 1) mes "Sorry I can only unlock this location.";
- if (#xmas_dun == 1) close;
- set #xmas_dun,1;
- mes "[Warpra]";
- mes "Toy Factory Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",25,"Toy Factory Dungeon";
close;
}
um_dun02.gat,44,28,3 script Warpra Helper 112,{
- if (#um_dun == 1) mes "[Warpra]";
- if (#um_dun == 1) mes "Sorry I can only unlock this location.";
- if (#um_dun == 1) close;
- set #um_dun,1;
- mes "[Warpra]";
- mes "Umbala Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",27,"Umbala Dungeon";
close;
}
tur_dun02.gat,162,23,3 script Warpra Helper 112,{
- if (#tur_dun == 1) mes "[Warpra]";
- if (#tur_dun == 1) mes "Sorry I can only unlock this location.";
- if (#tur_dun == 1) close;
- set #tur_dun,1;
- mes "[Warpra]";
- mes "Turtle Island Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",26,"Turtle Island Dungeon";
close;
}
prt_maze02.gat,102,69,4 script Warpra Helper 112,{
- if (#hid_dun == 1) mes "[Warpra]";
- if (#hid_dun == 1) mes "Sorry I can only unlock this location.";
- if (#hid_dun == 1) close;
- set #hid_dun,1;
- mes "[Warpra]";
- mes "Hidden Dungeon unlocked!";
+ callfunc "QWS_Dungeon_Warpra",13,"Hidden Dungeon";
close;
-}
\ No newline at end of file +}
|