Jump to content

Checkmate

Members
  • Posts

    554
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Checkmate

  1. On 3/11/2023 at 10:04 AM, Thanna20 said:

    Good Day rathena, I would like to ask if someone did encounter this problem and solve this problem before.

    image.png.2974d99334a7f7184b226ad50f45527f.png

    This message show up when I shift + click an item while the chat window is active. It does work before but I dont have any idea why its not working now. My client date is 2015-11-04aRagexe.

    Thank you.

    Well its been along time not reply to error, but i think this must be something with the diff of your client. From the error i can say that it was disabled due to crash report. So something like in the diff of your client that untick this option out. Might be that the solution to this... 
    Sorry if this not the best answer .

  2. On 3/12/2023 at 2:08 PM, Khely91 said:

    KRO link is down, and mega download limit is problem, anybody can help upload it on gdrive?

    I see what i can do to help you ...
    **Edit** im downloading the files now and i will upload it into my dummy account drive as for backup.
    **Edit** Lol those MEga.nz are really pain in the ****... Limited download for 1-2 gb only..

    Well you can try use this instead :

    https://drive.google.com/drive/folders/1NKzHYH4o2KUMxR5yFeVxV6iKkD11MLSr

    Choose the KRO Folder then download it.

    Download link II (Soon)

    • Love 1
  3. On 7/20/2018 at 4:24 PM, Ceres8154 said:

    Hi Latheesan,

     

    Did the version r600 file remove?

    I only can download previous version like r223 / r314.

    But r600 can not download...

    Have any possible update this program in future?

    Well im not sure if this was a century thread but for whos looking this type of helper try using this link 

    https://haru.ws/scriptchecker/

    *I found this after did some research to help some of my friend to do some scriptting

  4. On 11/11/2020 at 9:27 PM, Royr said:

    Alright! This is how i fixed the issue regarding not updating SQL.

     

    Make sure your using the "vote":
    Locate: addons\voteforpoints\config\addon.php

    
    'PointsType'			=> "vote", // credit, vote, cash



    What i did was creating a new table, which is "cp_v4p_voters"

    SQL Table: (Execute this query)

    
    CREATE TABLE `cp_v4p_voters` (
      `account_id` int(10) unsigned NOT NULL,
      `votepoints` int(10) unsigned NOT NULL,
      PRIMARY KEY (`account_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    First removed the existing one:
     

    
    							case "vote":
                                    // update votepoints
                                    $sql = "UPDATE $server->loginDatabase.cp_createlog SET votepoints = votepoints + ? WHERE account_id = ?";
                                    $sth = $server->connection->getStatement($sql);
                                    $sth->execute(array((int) $res->votepoints, $account_id));
                                    break;

     

    And Insert this: (Locate)

    addons\voteforpoints\modules\voteforpoints\index.php

    
    							case "vote":
    							// update votepoints
    							$sql = "UPDATE $server->loginDatabase.cp_v4p_voters SET votepoints = votepoints + ? WHERE account_id = ?";
    							$sth = $server->connection->getStatement($sql);
    							$sth->execute(array((int) $res->votepoints, $account_id));
    								if ( ! $sth->rowCount())
    								{
    									$sql = "INSERT INTO $server->loginDatabase.cp_v4p_voters VALUES (?, ?)";
    									$sth = $server->connection->getStatement($sql);
    									$bind = array($account_id, $res->votepoints);
    									$sth->execute($bind);
    
    								if ( ! $sth->rowCount())
    									$errorMessage = sprintf(Flux::message("UnableToVote"), 3);
                                    } else {
                                        $sql = "UPDATE $server->loginDatabase.cp_v4p_voters SET `value` = `value` + ? WHERE `key` = ? AND account_id = ?";
                                        $sth = $server->connection->getStatement($sql);
    									$sth->execute(array((int) $res->votepoints, $account_id));
                                    }
                                    break;

     

    PROOF it works .

    Capture.PNG.80838874b86abfeba361e4e6086e21eb.PNG

    Yeash this works flawlesly BUT it still did not work & still did not shown any point while in game.
    (Btw do you restart the whole server?)

  5. //===== rAthena Script ============================================
    //= Quest Warper Script
    //===== By: =======================================================
    //= DZeroX, Darkchild, Neouni
    //===== Current Version: ==========================================
    //= 2.3
    //===== Compatible With: ==========================================
    //= rAthena Project
    //===== Description: ==============================================
    //= Warper that works only after locations are unlocked.
    //===== Additional Comments: ======================================
    //= 1.0 - NPCs created
    //= 1.1 - Add Dungeons by sturm
    //= 1.2 - Add All char in account unlocked by ace_killer
    //= 1.3 - Add new 7 towns and 7 dungeons by escoteiro
    // - Correct bug jawaii town by escoteiro
    // - Remove some excessive warpras by escoteiro
    //= 1.4 - Rewrite of the Warpa system [Neouni]
    // - Corrected some bugs caused by autoconverting the old script
    //= 1.4a - Rewrite of menu to be custom for each player [Neouni]
    // - Dungeon listing rewrite
    // - Town listing rewrite
    // - GameMaster can Customise Main menu
    //= 1.4b - Pricing round [Neouni]
    // - GM menu added for pricing
    // - Town Warp pricing tags added
    // - Dungeon Warp pricing tags added
    //= 1.5 - storage functions pricing [Neouni]
    // - storage pricing added
    // - kafra points setting added
    // - kafra storage code security added
    // - Healing scripts pricing added
    // - Heal Part script added
    //= 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] (public release)
    // - fixed syntax problems
    // - fixed missing pyramid gats in @DGat$ array
    // - removed the culver level 5 that didn't exist
    //= 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 amount of users on map [Neouni]
    //= 1.8b - Small typo fixed in stampcard script [Neouni]
    //= 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 !
    //= 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
    //= 2.1 - Updated names to fall within retrictions. [L0ne_W0lf]
    //= 2.2 - #kafra_code is now stored as is. [brianluau]
    //= 2.3 - Added new town maps, cleanup, and removed pre-1.8 backwards fix. [Euphy]
    //=================================================================
    
    //========================Function=&=Script========================
    
    function	script	Q_Warpra	{
    	mes "[Warpra]";
    	mes "Hello,";
    	mes "I can warp you to any town, field, or dungeon, but you need to unlock them first~!";
    	mes "What do you need?";
    	
    	if(getarg(0) == 0) callfunc "QWS_MMarray",0;
    	if(getarg(0) == 1) callfunc "QWS_MMarray",1;
    	
    	set @MMenu,select(@Mmenulist$[0],@Mmenulist$[1],@Mmenulist$[2],@Mmenulist$[3],@Mmenulist$[4],@Mmenulist$[5],@Mmenulist$[6],@Mmenulist$[7],@Mmenulist$[8]);
    
    	switch(@Mmenuref[@MMenu-1]+1){
    	case 1: goto Last_Warp;
    	case 2: goto L_town;
    	case 3: goto L_field;
    	case 4: goto L_citydungeon;
    	case 5: goto L_dungeon;
    	case 6: goto L_FewWarps;
    	case 7: goto GM_Menu;
    	case 8:
    	default:
    		goto L_end;
    	}
    
    //=====================GM-Menu=Functions===========================
    
    GM_Menu:
    	next;
    	mes "Town warping = "+(($QW_TW_OFF)?"^FF0000 Off":"^00FF00 On")+"^000000";
    	mes "Field warping = "+(($QW_FW_OFF)?"^FF0000 Off":"^00FF00 On")+"^000000";
    	mes "City Dungeon warping = "+(($QW_DW_OFF)?"^FF0000 Off":"^00FF00 On")+"^000000";
    	mes "Dungeon warping = "+(($QW_DW_OFF)?"^FF0000 Off":"^00FF00 On")+"^000000";
    	mes "Field Depth limit is "+(($QW_FL)?"^00FF00 On":"^FF0000 Off")+"^000000";
    	mes "If on Field Depth limit is set to ^0000FF"+$QW_FDL+"^000000";
    	mes "City Dungeon Depth limit is "+(($QW_CDL)?"^00FF00 On":"^FF0000 Off")+"^000000";
    	mes "If on City Dungeon Depth limit is set to ^0000FF"+$QW_CDDL+"^000000";
    	mes "Dungeon Depth limit is "+(($QW_DL)?"^00FF00 On":"^FF0000 Off")+"^000000";
    	mes "If on Dungeon Depth limit is set to ^0000FF"+$QW_DDL+"^000000";
    	mes "Show Map Users = "+(($QW_MapUserShow)?"^00FF00 On":"^FF0000 Off")+"^000000";
    
    	switch(select("Town Warping","Field Warping","City Dungeon Warping","Dungeon Warping","Field Level Limit","Dungeon Level Limit","Show Map Users","Exit")) {
    	case 1: set $QW_TW_OFF,($QW_TW_OFF)?0:1; goto GM_Menu;
    	case 2: set $QW_FW_OFF,($QW_FW_OFF)?0:1; goto GM_Menu;
    	case 3: set $QW_CDW_OFF,($QW_CDW_OFF)?0:1; goto GM_Menu;
    	case 4: set $QW_DW_OFF,($QW_DW_OFF)?0:1; goto GM_Menu;
    	case 5: goto FieldLevelLimit;
    	case 6: goto CityDungeonLevelLimit;
    	case 7: goto DungeonLevelLimit;
    	case 8: set $QW_MapUserShow,($QW_MapUserShow)?0:1; goto GM_Menu;
    	default:
    		close;
    		end;
    	}
    	
    //=====================Last_Warp===========================
    
    Last_Warp:
    	next;
    	set @warpprice, 25 * BaseLevel;
    	if(Zeny < @warpprice) callsub L_Short_on_zeny,1;
    	warp lastwarp$,lastwarpx,lastwarpy;
    	message strcharinfo(0), "Warping costs " + callfunc("F_InsertComma",@warpprice) + " Zeny.";
    	set Zeny, Zeny-(@warpprice);
    	close2;
    	end;
    
    
    //===========================Towns=================================
    
    L_town:
    	callfunc "QWS_Tarray";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<39; set .@i,.@i+1)	// Expected maximum is 35
    		set .@menu$,.@menu$+@Tmenulist$[.@i]+":";
    	freeloop(0);
    	set @TWMenu,select(.@menu$);
    
    	if (@Tmenuref[@TWMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    
    	set @warpprice, 25 * BaseLevel;
    	if(Zeny<@warpprice) callsub L_Short_on_zeny,0;
    	message strcharinfo(0), "Warping costs " + callfunc("F_InsertComma",@warpprice) + " Zeny.";
    	set Zeny, Zeny-(@warpprice);
    
    	set lastwarp$, @pTmap$[@Tmenuref[@TWMenu-1]];
    	set lastwarpx, @pTXcoords[@Tmenuref[@TWMenu-1]];
    	set lastwarpy, @pTYcoords[@Tmenuref[@TWMenu-1]];
    	warp @pTmap$[@Tmenuref[@TWMenu-1]],@pTXcoords[@Tmenuref[@TWMenu-1]],@pTYcoords[@Tmenuref[@TWMenu-1]];
    
    	close2;
    	end;
    
    //=========================Fields================================
    
    L_field:
    	callfunc "QWS_Farray";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<22; set .@i,.@i+1)	// Expected maximum is 35
    		set .@menu$,.@menu$+@Fmenulist$[.@i]+":";
    	freeloop(0);
    	set @FWMenu,select(.@menu$);
    
    	if (@Fmenuref[@FWMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    	set @FwarpMenu, (@Fmenuref[@FWMenu-1]);
    	callfunc "QWS_FLarray";
    
    	next;
    	mes "[Warpra]";
    	mes "Please select where you want to go:";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<20; set .@i,.@i+1)	// Expected maximum is 18
    		set .@menu$,.@menu$+@FWLmenulist$[.@i]+":";
    	freeloop(0);
    	set @FWLMenu,select(.@menu$);
    
    	if (@FWLmenuref[@FWLMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    
    	set @Farrayref, @FWLmenuref[@FWLMenu-1];
    
    	set @warpprice, 25 * BaseLevel;
    	if(Zeny<@warpprice) callsub L_Short_on_zeny,1;
    	message strcharinfo(0), "Warping costs " + callfunc("F_InsertComma",@warpprice) + " Zeny.";
    	set Zeny, Zeny-(@warpprice);
    	set lastwarp$, @FGat$[@Farrayref];
    	set lastwarpx, @FXcoords[@Farrayref];
    	set lastwarpy, @FYcoords[@Farrayref];
    	warp @FGat$[@Farrayref],@FXcoords[@Farrayref],@FYcoords[@Farrayref];
    
    	close2;
    	end;
    
    //=========================City Dungeons================================
    
    L_citydungeon:
    	callfunc "QWS_CDarray";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<30; set .@i,.@i+1)	// Expected maximum is 30
    		set .@menu$,.@menu$+@CDmenulist$[.@i]+":";
    	freeloop(0);
    	set @CDWMenu,select(.@menu$);
    
    	if (@CDmenuref[@CDWMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    	set @CDwarpMenu, (@CDmenuref[@CDWMenu-1]);
    	callfunc "QWS_CDLarray";
    
    	next;
    	mes "[Warpra]";
    	mes "Please select where you want to go:";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<20; set .@i,.@i+1)	// Expected maximum is 18
    		set .@menu$,.@menu$+@CDWLmenulist$[.@i]+":";
    	freeloop(0);
    	set @CDWLMenu,select(.@menu$);
    
    	if (@CDWLmenuref[@CDWLMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    
    	set @CDarrayref, @CDWLmenuref[@CDWLMenu-1];
    	
    	set @warpprice, 25 * BaseLevel;
    	if(Zeny<@warpprice) callsub L_Short_on_zeny,2;
    	message strcharinfo(0), "Warping costs " + callfunc("F_InsertComma",@warpprice) + " Zeny.";
    	set Zeny, Zeny-(@warpprice);
    
    	set lastwarp$, @CDGat$[@CDarrayref];
    	set lastwarpx, @CDXcoords[@CDarrayref];
    	set lastwarpy, @CDYcoords[@CDarrayref];
    	warp @CDGat$[@CDarrayref],@CDXcoords[@CDarrayref],@CDYcoords[@CDarrayref];
    
    	close2;
    	end;
    
    //=========================Dungeons================================
    
    L_dungeon:
    	callfunc "QWS_Darray";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<30; set .@i,.@i+1)	// Expected maximum is 30
    		set .@menu$,.@menu$+@Dmenulist$[.@i]+":";
    	freeloop(0);
    	set @DWMenu,select(.@menu$);
    
    	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:";
    	freeloop(1);
    	set .@menu$,"";
    	for(set .@i,0; .@i<20; set .@i,.@i+1)	// Expected maximum is 18
    		set .@menu$,.@menu$+@DWLmenulist$[.@i]+":";
    	freeloop(0);
    	set @DWLMenu,select(.@menu$);
    
    	if (@DWLmenuref[@DWLMenu-1] == 57005) goto L_end; // 57005='dead' in hex
    
    	set @Darrayref, @DWLmenuref[@DWLMenu-1];
    	
    	set @warpprice, 25 * BaseLevel;
    	if(Zeny<@warpprice) callsub L_Short_on_zeny,3;
    	message strcharinfo(0), "Warping costs " + callfunc("F_InsertComma",@warpprice) + " Zeny.";
    	set Zeny, Zeny-(@warpprice);
    
    	set lastwarp$, @DGat$[@Darrayref];
    	set lastwarpx, @DXcoords[@Darrayref];
    	set lastwarpy, @DYcoords[@Darrayref];
    	warp @DGat$[@Darrayref],@DXcoords[@Darrayref],@DYcoords[@Darrayref];
    
    	close2;
    	end;
    
    
    //============================L_end=============================
    L_end:
    	close;
    	end;
    
    //============================Few=Warp=============================
    L_FewWarps:
    	next;
    	mes "[Warpra]";
    	mes "You need to unlock locations before they come available to you.";
    	mes "To unlock a location talk to my colleagues all over the world.";
    	mes "Each account has its own stamp card.";
    	mes "Want me to check what stamps you have collected so far?";
    	if (select("Yes","No")==1) callsub stampcard;
    	close;
    	end;
    
    	
    //=========================Short=On=Zeny===========================
    L_Short_on_zeny:
    	next;
    	switch(getarg(0)) {
    	case 0: mes "You don't seem to have the"+25 * BaseLevel +" zeny to pay for the warp to "+@pTmenuitems$[@Tmenuref[@TWMenu-1]]+"."; break;
    	case 1: mes "You don't seem to have the "+25 * BaseLevel +" zeny to pay for the warp to "+@FLevelName$[@FWLmenuref[@FWLMenu-1]]+" at "+@pFmenuitems$[@Fmenuref[@FWMenu-1]]+"."; break;
    	case 2: mes "You don't seem to have the "+25 * BaseLevel +" zeny to pay for the warp to "+@CDLevelName$[@CDWLmenuref[@CDWLMenu-1]]+" at "+@pCDmenuitems$[@CDmenuref[@CDWMenu-1]]+"."; break;
    	case 3: mes "You don't seem to have the "+25 * BaseLevel +" zeny to pay for the warp to "+@DLevelName$[@DWLmenuref[@DWLMenu-1]]+" at "+@pDmenuitems$[@Dmenuref[@DWMenu-1]]+"."; break;
    	}
    	close;
    	end;
    	
    //===========================Stamp=Card============================
    stampcard:
    // Counting of the amount of places you have unlocked
    	next;
    	mes "Let me check what Towns you have.";
    	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...";
    		emotion ET_SMILE;
    	}
    	next;
    	mes "Let me check what Fields you have.";
    	callfunc "QWS_FieldStamps";
    	mes "You collected^00FF00 "+@Fstamp+" of "+@MaxFstamp+" ^000000Fields.";
    	next;
    	mes "Let me check what city dungeons you have.";
    	callfunc "QWS_CityDungeonStamps";
    	mes "You collected^00FF00 "+@CDstamp+" of "+@MaxCDstamp+" ^000000CityDungeons.";
    	mes "To unlock a dungeon, search for my colleagues.";
    	mes "You can usually find them near the middle or end of the dungeon.";
    	next;
    	mes "Let me check what dungeons you have.";
    	callfunc "QWS_DungeonStamps";
    	mes "You collected^00FF00 "+@Dstamp+" of "+@MaxDstamp+" ^000000Dungeons.";
    	mes "To unlock a dungeon, search for my colleagues.";
    	mes "You can usually find them near the middle or end of the dungeon.";
    	return;
    }
    
    function	script	QWS_TownStamps	{
    	set @Tstamp,0;
    	set @MaxTstamp,28; //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_FieldStamps	{
    	set @Fstamp,0;
    	set @MaxFstamp,22; //maximum number of fields
    	set @binvalue,1;
    	set @Fstamploop,0;
    	do {
    		if ((@binvalue & ##QWS_F_Unlock) == @binvalue) set @Fstamp,@Fstamp+1;
    		set @binvalue, @binvalue *2;
    		set @Fstamploop, @Fstamploop + 1;
    	} while (@Fstamploop < @MaxFstamp);
    	return;
    }
    
    function	script	QWS_CityDungeonStamps	{
    	set @CDstamp,0;
    	set @MaxCDstamp,21; //maximum number of dungeons
    	set @binvalue,1;
    	set @CDstamploop,0;
    	do {
    		if ((@binvalue & ##QWS_CD_Unlock) == @binvalue) set @CDstamp,@CDstamp+1;
    		set @binvalue, @binvalue *2;
    		set @CDstamploop, @CDstamploop + 1;
    	} while (@CDstamploop < @MaxCDstamp);
    	return;
    }
    
    function	script	QWS_DungeonStamps	{
    	set @Dstamp,0;
    	set @MaxDstamp,20; //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 ... items
    	setarray @pMmenuitems$[0], "Last Warp", "Warp to Towns", "Warp to Fields","Warp to City Dungeons", "Warp to Dungeons", "Why so few warps?", "GameMaster Menu", "Cancel";
    	set @Mi,0; // loop counter
    	set @Mj,0; // menu line counter
    
    //----------------Last-Warp
    	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];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------Field-Warp
    	if ($QW_FW_OFF == 0) {
    		set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------City Dungeon-Warp
    	if ($QW_CDW_OFF == 0) {
    		set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------Dungeon-Warp
    	if ($QW_DW_OFF == 0) {
    		set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------Why-So-Few-Warps
    	set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    	set @Mmenuref[@Mj],@Mi;
    	set @Mj,@Mj+1;
    	set @Mi,@Mi+1;
    //----------------No-Unlock
    	if (getarg(0) == 1) {
    		set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------GameMaster-Menu
    	if (getgmlevel()>= 80) {
    		set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    		set @Mmenuref[@Mj],@Mi;
    		set @Mj,@Mj+1;
    	}
    	set @Mi,@Mi+1;
    //----------------Cancel
    	set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
    	set @Mmenuref[@Mj],@Mi;
    	return;
    }
    
    //======================Town=Menu=Array============================
    // Adding a town:
    //	setarray @pTmenuitems$[@Ti], "Prontera";// Name of Town shown in Town select Menu
    //	// Warp prices: Basic (0), Advanced (0), Overseas (0)
    //
    //	setarray @pTmap$[@Ti], "prontera";	// Map name
    //	setarray @pTXcoords[@Ti], 156;		// X warp coords
    //	setarray @pTYcoords[@Ti], 187;		// Y warp coords
    //
    //	QWS_Make_Town_Menu 0;	// Use a free number (last used is 30, Eclage)
    //
    // Adding a warpra:
    //	map,x,y,facing	script	Warpra#example	113,{
    //		callfunc "QWS_Town_Warpra",<town number>,"Your Town";
    //		close;
    //	}
    //	Town number is the same as "QWS_Make_Town_Menu".
    //==================================================================
    
    function	script	QWS_Tarray	{
    	function QWS_Make_Town_Menu;
    
    	set @Ti,0; // loop counter
    	set @Tj,0; // menu lines counter
    
    //----------------Prontera
    	setarray @pTmenuitems$[@Ti], "Prontera";
    
    
    	setarray @pTmap$[@Ti], "prontera";
    	setarray @pTXcoords[@Ti], 155;
    	setarray @pTYcoords[@Ti], 183;
    
    	QWS_Make_Town_Menu 0;
    //----------------Alberta
    	setarray @pTmenuitems$[@Ti], "Alberta";
    
    
    	setarray @pTmap$[@Ti], "alberta";
    	setarray @pTXcoords[@Ti], 28;
    	setarray @pTYcoords[@Ti], 234;
    
    	QWS_Make_Town_Menu 1;
    //----------------Aldebaran
    	setarray @pTmenuitems$[@Ti], "Aldebaran";
    
    
    	setarray @pTmap$[@Ti], "aldebaran";
    	setarray @pTXcoords[@Ti], 140;
    	setarray @pTYcoords[@Ti], 113;
    
    	QWS_Make_Town_Menu 2;
    //----------------Amatsu:
    	setarray @pTmenuitems$[@Ti], "Amatsu";
    
    
    	setarray @pTmap$[@Ti], "amatsu";
    	setarray @pTXcoords[@Ti], 198;
    	setarray @pTYcoords[@Ti], 84;
    
    	QWS_Make_Town_Menu 3;
    //----------------Ayothaya:
    	setarray @pTmenuitems$[@Ti], "Ayothaya";
    
    
    	setarray @pTmap$[@Ti], "ayothaya";
    	setarray @pTXcoords[@Ti], 208;
    	setarray @pTYcoords[@Ti], 166;
    
    	QWS_Make_Town_Menu 4;
    //----------------Comodo:
    	setarray @pTmenuitems$[@Ti], "Comodo";
    
    
    	setarray @pTmap$[@Ti], "comodo";
    	setarray @pTXcoords[@Ti], 189;
    	setarray @pTYcoords[@Ti], 155;
    
    	QWS_Make_Town_Menu 5;
    
    //----------------Einbech:
    	setarray @pTmenuitems$[@Ti], "Einbech";
    
    
    	setarray @pTmap$[@Ti], "einbech";
    	setarray @pTXcoords[@Ti], 63;
    	setarray @pTYcoords[@Ti], 35;
    
    	QWS_Make_Town_Menu 6;
    
    //----------------Einbroch:
    	setarray @pTmenuitems$[@Ti], "Einbroch";
    
    
    	setarray @pTmap$[@Ti], "einbroch";
    	setarray @pTXcoords[@Ti], 64;
    	setarray @pTYcoords[@Ti], 200;
    
    	QWS_Make_Town_Menu 7;
    
    //----------------Geffen:
    	setarray @pTmenuitems$[@Ti], "Geffen";
    
    
    	setarray @pTmap$[@Ti], "geffen";
    	setarray @pTXcoords[@Ti], 119;
    	setarray @pTYcoords[@Ti], 59;
    
    	QWS_Make_Town_Menu 8;
    //----------------Gonryun:
    	setarray @pTmenuitems$[@Ti], "Gonryun";
    
    
    	setarray @pTmap$[@Ti], "gonryun";
    	setarray @pTXcoords[@Ti], 160;
    	setarray @pTYcoords[@Ti], 120;
    
    	QWS_Make_Town_Menu 9;
    //----------------Hugel:
    	setarray @pTmenuitems$[@Ti], "Hugel";
    
    
    	setarray @pTmap$[@Ti], "hugel";
    	setarray @pTXcoords[@Ti], 96;
    	setarray @pTYcoords[@Ti], 145;
    
    	QWS_Make_Town_Menu 10;
    //----------------Izlude:
    	setarray @pTmenuitems$[@Ti], "Izlude";
    
    
    	setarray @pTmap$[@Ti], "izlude";
    	setarray @pTXcoords[@Ti], 128;
    	setarray @pTYcoords[@Ti], 111;
    
    	QWS_Make_Town_Menu 11;
    //----------------Jawaii:
    	setarray @pTmenuitems$[@Ti], "Jawaii";
    
    
    	setarray @pTmap$[@Ti], "jawaii";
    	setarray @pTXcoords[@Ti], 251;
    	setarray @pTYcoords[@Ti], 132;
    
    	QWS_Make_Town_Menu 12;
    //----------------Lighthalzen:
    	setarray @pTmenuitems$[@Ti], "Lighthalzen";
    
    
    	setarray @pTmap$[@Ti], "lighthalzen";
    	setarray @pTXcoords[@Ti], 158;
    	setarray @pTYcoords[@Ti], 92;
    
    	QWS_Make_Town_Menu 13;
    //----------------Louyang:
    	setarray @pTmenuitems$[@Ti], "Louyang";
    
    
    	setarray @pTmap$[@Ti], "louyang";
    	setarray @pTXcoords[@Ti], 217;
    	setarray @pTYcoords[@Ti], 100;
    
    	QWS_Make_Town_Menu 14;
    //----------------Lutie
    	setarray @pTmenuitems$[@Ti], "Lutie";
    
    
    	setarray @pTmap$[@Ti], "xmas";
    	setarray @pTXcoords[@Ti], 147;
    	setarray @pTYcoords[@Ti], 134;
    
    	QWS_Make_Town_Menu 15;
    //----------------Manuk
    	setarray @pTmenuitems$[@Ti], "Manuk";
    
    
    	setarray @pTmap$[@Ti], "manuk";
    	setarray @pTXcoords[@Ti], 282;
    	setarray @pTYcoords[@Ti], 138;
    
    	QWS_Make_Town_Menu 16;
    
    //----------------Midgard's Expedition Camp:
    	setarray @pTmenuitems$[@Ti], "Midgard's Expedition Camp";
    
    
    	setarray @pTmap$[@Ti], "mid_camp";
    	setarray @pTXcoords[@Ti], 210;
    	setarray @pTYcoords[@Ti], 288;
    
    	QWS_Make_Town_Menu 17;
    
    //----------------Morroc:
    	setarray @pTmenuitems$[@Ti], "Morroc";
    
    
    	setarray @pTmap$[@Ti], "morocc";
    	setarray @pTXcoords[@Ti], 156;
    	setarray @pTYcoords[@Ti], 93;
    
    	QWS_Make_Town_Menu 18;
    //----------------Moscovia
    	setarray @pTmenuitems$[@Ti], "Moscovia";
    
    
    	setarray @pTmap$[@Ti], "moscovia";
    	setarray @pTXcoords[@Ti], 223;
    	setarray @pTYcoords[@Ti], 184;
    
    	QWS_Make_Town_Menu 19;
    //----------------Niflheim:
    	setarray @pTmenuitems$[@Ti], "Niflheim";
    
    
    	setarray @pTmap$[@Ti], "niflheim";
    	setarray @pTXcoords[@Ti], 202;
    	setarray @pTYcoords[@Ti], 174;
    
    	QWS_Make_Town_Menu 20;
    //----------------Payon:
    	setarray @pTmenuitems$[@Ti], "Payon";
    
    
    	setarray @pTmap$[@Ti], "payon";
    	setarray @pTXcoords[@Ti], 179;
    	setarray @pTYcoords[@Ti], 100;
    
    	QWS_Make_Town_Menu 21;
    //----------------Rachel
    	setarray @pTmenuitems$[@Ti], "Rachel";
    
    
    	setarray @pTmap$[@Ti], "rachel";
    	setarray @pTXcoords[@Ti], 130;
    	setarray @pTYcoords[@Ti], 110;
    
    	QWS_Make_Town_Menu 22;
    //----------------Splendide
    	setarray @pTmenuitems$[@Ti], "Splendide";
    
    
    	setarray @pTmap$[@Ti], "splendide";
    	setarray @pTXcoords[@Ti], 201;
    	setarray @pTYcoords[@Ti], 147;
    
    	QWS_Make_Town_Menu 23;
    //----------------Thor Camp:
    	setarray @pTmenuitems$[@Ti], "Thor Camp";
    
    
    	setarray @pTmap$[@Ti], "thor_camp";
    	setarray @pTXcoords[@Ti], 246;
    	setarray @pTYcoords[@Ti], 68;
    
    	QWS_Make_Town_Menu 24;
    //----------------Umbala:
    	setarray @pTmenuitems$[@Ti], "Umbala";
    
    
    	setarray @pTmap$[@Ti], "umbala";
    	setarray @pTXcoords[@Ti], 97;
    	setarray @pTYcoords[@Ti], 153;
    
    	QWS_Make_Town_Menu 25;
    //----------------Veins
    	setarray @pTmenuitems$[@Ti], "Veins";
    
    
    	setarray @pTmap$[@Ti], "veins";
    	setarray @pTXcoords[@Ti], 216;
    	setarray @pTYcoords[@Ti], 123;
    
    	QWS_Make_Town_Menu 26;
    //----------------Yuno:
    	setarray @pTmenuitems$[@Ti], "Yuno";
    
    
    	setarray @pTmap$[@Ti], "yuno";
    	setarray @pTXcoords[@Ti], 157;
    	setarray @pTYcoords[@Ti], 51;
    
    	QWS_Make_Town_Menu 27;
    
    //----------------Cancel
    	setarray @pTmenuitems$[@Ti], "Cancel";
    
    
    	set @Tmenulist$[@Tj],@pTmenuitems$[@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;
    }
    }
    
    //====================Field=Menu=Arrays==========================
    // Adding a field:
    //	setarray @pFmenuitems$[@Fi], "Abyss Lake";	// Name of Field shown in Field select Menu
    //		// Warp prices: Basic (0), Advanced (0), Overseas (0)
    //		// Identifier for fee caluclation: Basic (0), Advanced (0), Overseas (0)
    //	setarray @FLevels[@Fi], 3;			// Number of levels in Field
    //
    //	setarray @FGat$[@Fref], "abyss_01", "abyss_02", "abyss_03";	// Map names of Field levels
    //	setarray @FLevelName$[@Fref], "Level 1", "Level 2", "Level 3";	// Name of Field levels shown in Menu
    //	setarray @FXcoords[@Fref], 265, 275, 116;			// X warp coords
    //	setarray @FYcoords[@Fref], 273, 270, 27;			// Y warp coords
    //	setarray @FDepth[@Fref], 0, 1, 2;				// Relative depth to entrance, to calculate extra warp fee
    //
    //	QWS_Make_Field_Menu 0;	// Use a free number (last used is 28, Kiel Dungeon)
    //
    // Adding a warpra:
    //	map,x,y,facing	script	Warpra Helper#example	112,{
    //		callfunc "QWS_Field_Warpra",<field number>,"Your Field";
    //		close;
    //	}
    //	Field number is the same as "QWS_Make_Field_Menu".
    //==================================================================
    
    function	script	QWS_Farray	{
    	function QWS_Make_Field_Menu;
    
    	set @Fi,0;
    	set @Fj,0;
    	set @Fref,0;
    
    //----------------AMATSU FIELDS
    	setarray @pFmenuitems$[@Fi], "Amatsu Fields";
    
    
    	setarray @FLevels[@Fi], 1;
    
    	setarray @FGat$[@Fref], "ama_fild01";
    	setarray @FLevelName$[@Fref], "Amatsu Field 1";
    	setarray @FXcoords[@Fref], 190;
    	setarray @FYcoords[@Fref], 197;
    	setarray @FDepth[@Fref], 0;
    
    	QWS_Make_Field_Menu 0;
    
    //----------------Ayothaya Fields
    	setarray @pFmenuitems$[@Fi], "Ayothaya Fields";
    
    
    	setarray @FLevels[@Fi], 2;
    	setarray @FGat$[@Fref], "ayo_fild01", "ayo_fild02";
    	setarray @FLevelName$[@Fref], "Ayothaya Field 1", "Ayothaya Field 2";
    	setarray @FXcoords[@Fref], 173, 212;
    	setarray @FYcoords[@Fref], 134, 150;
    	setarray @FDepth[@Fref], 0, 0;
    
    	QWS_Make_Field_Menu 1;
    
    //----------------Comodo Field
    	setarray @pFmenuitems$[@Fi], "Comodo Fields";
    
    
    	setarray @FLevels[@Fi], 9;
    	setarray @FGat$[@Fref], "cmd_fild01", "cmd_fild02", "cmd_fild03",  "cmd_fild04", "cmd_fild05", "cmd_fild06", "cmd_fild07", "cmd_fild08", "cmd_fild09";
    	setarray @FLevelName$[@Fref], "Comodo Field 1", "Comodo Field 2", "Comodo Field 3", "Comodo Field 4", "Comodo Field 5", "Comodo Field 6", "Comodo Field 7", "Comodo Field 8", "Comodo Field 9";
    	setarray @FXcoords[@Fref], 180,231,191,228,224,190,234,194,172;
    	setarray @FYcoords[@Fref], 178,160,172,194,203,223,177,175,172;
    	setarray @FDepth[@Fref], 0, 0,0, 0,0, 0,0, 0,0;
    
    	QWS_Make_Field_Menu 2;
    
    
    //----------------Einbroch Field
    	setarray @pFmenuitems$[@Fi], "Einbroch Fields";
    
    
    	setarray @FLevels[@Fi], 10;
    	setarray @FGat$[@Fref], "ein_fild01", "ein_fild02", "ein_fild03",  "ein_fild04", "ein_fild05", "ein_fild06", "ein_fild07", "ein_fild08", "ein_fild09", "ein_fild10";
    	setarray @FLevelName$[@Fref], "Einbroch Field 1", "Einbroch Field 2", "Einbroch Field 3", "Einbroch Field 4", "Einbroch Field 5", "Einbroch Field 6", "Einbroch Field 7", "Einbroch Field 8", "Einbroch Field 9", "Einbroch Field 10";
    	setarray @FXcoords[@Fref], 142, 182, 187, 185, 216, 195, 272, 173, 207, 196;
    	setarray @FYcoords[@Fref], 225, 141, 228, 173, 173, 148, 220, 214, 174, 200;
    	setarray @FDepth[@Fref], 0, 0,0, 0,0, 0,0, 0,0,0;
    
    	QWS_Make_Field_Menu 3;
    
    
    //----------------Geffen Field
    	setarray @pFmenuitems$[@Fi], "Geffen Fields";
    
    
    	setarray @FLevels[@Fi], 15;
    	setarray @FGat$[@Fref], "gef_fild00", "gef_fild01", "gef_fild02", "gef_fild03",  "gef_fild04", "gef_fild05", "gef_fild06", "gef_fild07", "gef_fild08", "gef_fild09", "gef_fild10","gef_fild11","gef_fild12","gef_fild13","gef_fild14";
    	setarray @FLevelName$[@Fref], "Geffen Field 0", "Geffen Field 1", "Geffen Field 2", "Geffen Field 3", "Geffen Field 4", "Geffen Field 5", "Geffen Field 6", "Geffen Field 7", "Geffen Field 8", "Geffen Field 9", "Geffen Field 10","Geffen Field 11","Geffen Field 12","Geffen Field 13","Geffen Field 14";
    	setarray @FXcoords[@Fref], 46, 213, 195, 257, 188, 166, 248, 195, 186, 221, 178, 136, 240, 235, 211;
    	setarray @FYcoords[@Fref], 199, 204, 212, 192, 171, 263, 158, 191, 183, 117, 218, 328, 181, 235, 185;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 4;
    
    //----------------Gonryun Field
    	setarray @pFmenuitems$[@Fi], "Gonryun Fields";
    
    
    	setarray @FLevels[@Fi], 1;
    	setarray @FGat$[@Fref], "gon_fild01";
    	setarray @FLevelName$[@Fref], "Gonryun Field 1";
    	setarray @FXcoords[@Fref], 220;
    	setarray @FYcoords[@Fref], 227;
    	setarray @FDepth[@Fref], 0;
    
    	QWS_Make_Field_Menu 5;
    
    //----------------Hugel Field
    	setarray @pFmenuitems$[@Fi], "Hugel Fields";
    
    
    	setarray @FLevels[@Fi], 7;
    	setarray @FGat$[@Fref], "hu_fild01", "hu_fild02", "hu_fild03",  "hu_fild04", "hu_fild05", "hu_fild06", "hu_fild07";
    	setarray @FLevelName$[@Fref], "Hugel Field 1", "Hugel Field 2", "Hugel Field 3", "Hugel Field 4", "Hugel Field 5", "Hugel Field 6", "Hugel Field 7";
    	setarray @FXcoords[@Fref], 268, 222, 232, 252, 196, 216, 227;
    	setarray @FYcoords[@Fref], 101, 193, 185, 189, 106, 220, 197;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 6;
    
    //----------------Lighthalzen Field
    	setarray @pFmenuitems$[@Fi], "Lighthalzen Fields";
    
    
    	setarray @FLevels[@Fi], 3;
    	setarray @FGat$[@Fref], "hu_fild01", "hu_fild02", "hu_fild03";
    	setarray @FLevelName$[@Fref], "Lighthalzen Field 1", "Lighthalzen Field 2", "Lighthalzen Field 3";
    	setarray @FXcoords[@Fref], 240, 185, 240;
    	setarray @FYcoords[@Fref], 179, 235, 226;
    	setarray @FDepth[@Fref], 0, 0, 0;
    
    	QWS_Make_Field_Menu 7;
    
    //----------------Louyang Field
    	setarray @pFmenuitems$[@Fi], "Louyang Fields";
    
    
    	setarray @FLevels[@Fi], 1;
    	setarray @FGat$[@Fref], "lou_fild01";
    	setarray @FLevelName$[@Fref], "Louyang Field 1";
    	setarray @FXcoords[@Fref], 229;
    	setarray @FYcoords[@Fref], 187;
    	setarray @FDepth[@Fref], 0;
    
    	QWS_Make_Field_Menu 8;
    
    //----------------Lutie Field
    	setarray @pFmenuitems$[@Fi], "Lutie Fields";
    
    
    	setarray @FLevels[@Fi], 1;
    	setarray @FGat$[@Fref], "xmas_fild01";
    	setarray @FLevelName$[@Fref], "Lutie Field 1";
    	setarray @FXcoords[@Fref], 115;
    	setarray @FYcoords[@Fref], 145;
    	setarray @FDepth[@Fref], 0;
    
    	QWS_Make_Field_Menu 9;
    
    //----------------Manuk Field
    	setarray @pFmenuitems$[@Fi], "Manuk Fields";
    
    
    	setarray @FLevels[@Fi], 3;
    	setarray @FGat$[@Fref], "man_fild01", "man_fild02", "man_fild03";
    	setarray @FLevelName$[@Fref], "Manuk Field 1", "Manuk Field 2", "Manuk Field 3";
    	setarray @FXcoords[@Fref], 35, 35, 84;
    	setarray @FYcoords[@Fref], 236, 262, 365;
    	setarray @FDepth[@Fref], 0, 0, 0;
    
    	QWS_Make_Field_Menu 10;
    
    //----------------Mjolnir Field
    	setarray @pFmenuitems$[@Fi], "Mjolnir Fields";
    
    
    	setarray @FLevels[@Fi], 12;
    	setarray @FGat$[@Fref], "mjolnir_01", "mjolnir_02", "mjolnir_03",  "mjolnir_04", "mjolnir_05", "mjolnir_06", "mjolnir_07", "mjolnir_08", "mjolnir_09", "mjolnir_10","mjolnir_11","mjolnir_12";
    	setarray @FLevelName$[@Fref], "Mjolnir Field 1", "Mjolnir Field 2", "Mjolnir Field 3", "Mjolnir Field 4", "Mjolnir Field 5", "Mjolnir Field 6", "Mjolnir Field 7", "Mjolnir Field 8", "Mjolnir Field 9", "Mjolnir Field 10","Mjolnir Field 11","Mjolnir Field 12";
    	setarray @FXcoords[@Fref], 204, 175, 208, 179, 181, 195, 235, 188, 205, 245, 180, 196;
    	setarray @FYcoords[@Fref], 120, 193, 213, 180, 240, 270, 202, 215, 144, 223, 206, 208;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 11;
    
    //----------------Moscovia Field
    	setarray @pFmenuitems$[@Fi], "Moscovia Fields";
    
    
    	setarray @FLevels[@Fi], 2;
    	setarray @FGat$[@Fref], "mosk_fild01", "mosk_fild02";
    	setarray @FLevelName$[@Fref], "Moscovia Field 1", "Moscovia Field 2";
    	setarray @FXcoords[@Fref], 82, 131;
    	setarray @FYcoords[@Fref], 104, 147;
    	setarray @FDepth[@Fref], 0, 0;
    
    	QWS_Make_Field_Menu 12;
    
    //----------------Niflheim Field
    	setarray @pFmenuitems$[@Fi], "Niflheim Fields";
    
    
    	setarray @FLevels[@Fi], 2;
    	setarray @FGat$[@Fref], "nif_fild01", "nif_fild02";
    	setarray @FLevelName$[@Fref], "Niflheim Field 1", "Niflheim Field 2";
    	setarray @FXcoords[@Fref], 215, 167;
    	setarray @FYcoords[@Fref], 229, 234;
    	setarray @FDepth[@Fref], 0, 0;
    
    	QWS_Make_Field_Menu 13;
    
    //----------------Payon Forest
    	setarray @pFmenuitems$[@Fi], "Payon Forests";
    
    
    	setarray @FLevels[@Fi], 11;
    	setarray @FGat$[@Fref], "pay_fild01", "pay_fild02", "pay_fild03",  "pay_fild04", "pay_fild05", "pay_fild06", "pay_fild07", "pay_fild08", "pay_fild09", "pay_fild10","pay_fild11";
    	setarray @FLevelName$[@Fref], "Payon Forest 1", "Payon Forest 2", "Payon Forest 3", "Payon Forest 4", "Payon Forest 5", "Payon Forest 6", "Payon Forest 7", "Payon Forest 8", "Payon Forest 9", "Payon Forest 10","Payon Forest 11";
    	setarray @FXcoords[@Fref], 158, 151, 205, 186, 134, 193, 200, 137, 201, 160, 194;
    	setarray @FYcoords[@Fref], 206, 219, 148, 247, 204, 235, 177, 189, 224, 205, 150;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 14;
    
    //----------------Prontera Field
    	setarray @pFmenuitems$[@Fi], "Prontera Fields";
    
    
    	setarray @FLevels[@Fi], 12;
    	setarray @FGat$[@Fref], "prt_fild00", "prt_fild01", "prt_fild02", "prt_fild03",  "prt_fild04", "prt_fild05", "prt_fild06", "prt_fild07", "prt_fild08", "prt_fild09", "prt_fild10","prt_fild11";
    	setarray @FLevelName$[@Fref], "Prontera Field 0", "Prontera Field 1", "Prontera Field 2", "Prontera Field 3", "Prontera Field 4", "Prontera Field 5", "Prontera Field 6", "Prontera Field 7", "Prontera Field 8", "Prontera Field 9", "Prontera Field 10","Prontera Field 11";
    	setarray @FXcoords[@Fref], 208, 190, 240, 190, 307, 239, 185, 193, 187, 210, 195, 198;
    	setarray @FYcoords[@Fref], 227, 206, 206, 143, 252, 213, 188, 194, 218, 183, 149, 164;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 15;
    
    //----------------Rachel Field
    	setarray @pFmenuitems$[@Fi], "Rachel Fields";
    
    
    	setarray @FLevels[@Fi], 13;
    	setarray @FGat$[@Fref], "ra_fild01", "ra_fild02", "ra_fild03",  "ra_fild04", "ra_fild05", "ra_fild06", "ra_fild07", "ra_fild08", "ra_fild09", "ra_fild10","ra_fild11","ra_fild12","ra_fild13";
    	setarray @FLevelName$[@Fref], "Rachel Field 1", "Rachel Field 2", "Rachel Field 3", "Rachel Field 4", "Rachel Field 5", "Rachel Field 6", "Rachel Field 7", "Rachel Field 8", "Rachel Field 9", "Rachel Field 10","Rachel Field 11","Rachel Field 12","Rachel Field 13";
    	setarray @FXcoords[@Fref], 192, 235, 202, 202, 225, 202, 263, 217, 87, 277, 221, 175, 174;
    	setarray @FYcoords[@Fref], 162, 166, 206, 208, 202, 214, 196, 201, 121, 181, 185, 200, 197;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 16;
    
    //----------------Sograt Desert
    	setarray @pFmenuitems$[@Fi], "Sograt Deserts";
    	setarray @pFprice[@Fi], 0;
    	setarray @pFfee$[@Fi], 0;
    	setarray @FLevels[@Fi], 14;
    	setarray @FGat$[@Fref], "moc_fild01","moc_fild02","moc_fild03","moc_fild07","moc_fild11","moc_fild12","moc_fild13","moc_fild16","moc_fild17","moc_fild18","moc_fild19","moc_fild20","moc_fild21","moc_fild22";
    	setarray @FLevelName$[@Fref], "Sograt Desert 1", "Sograt Desert 2",  "Sograt Desert 3", "Sograt Desert 7", "Sograt Desert 11", "Sograt Desert 12", "Sograt Desert 13", "Sograt Desert 16", "Sograt Desert 17", "Sograt Desert 18", "Sograt Desert 19", "Sograt Desert 20", "Sograt Desert 21","Sograt Desert 22";
    	setarray @FXcoords[@Fref], 219, 177, 194, 224, 198, 156, 185, 206, 208, 209, 85, 207, 31, 38;
    	setarray @FYcoords[@Fref], 205, 206, 182, 170, 216, 187, 263, 228, 238, 223, 97, 202, 195, 195;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    QWS_Make_Field_Menu 17;
    
    //----------------Splendide Field
    	setarray @pFmenuitems$[@Fi], "Splendide Fields";
    
    
    	setarray @FLevels[@Fi], 3;
    	setarray @FGat$[@Fref], "spl_fild01", "spl_fild02", "spl_fild03";
    	setarray @FLevelName$[@Fref], "Splendide Field 1", "Splendide Field 2", "Splendide Field 3";
    	setarray @FXcoords[@Fref], 175, 236, 188;
    	setarray @FYcoords[@Fref], 186, 184, 204;
    	setarray @FDepth[@Fref], 0, 0, 0;
    
    	QWS_Make_Field_Menu 18;
    
    //----------------Umbala Field
    	setarray @pFmenuitems$[@Fi], "Umbala Fields";
    
    
    	setarray @FLevels[@Fi], 4;
    	setarray @FGat$[@Fref], "um_fild01", "um_fild02", "um_fild03",  "um_fild04";
    	setarray @FLevelName$[@Fref], "Umbala Field 1", "Umbala Field 2", "Umbala Field 3", "Umbala Field 4";
    	setarray @FXcoords[@Fref], 217, 223, 237, 202;
    	setarray @FYcoords[@Fref], 206, 221, 215, 197;
    	setarray @FDepth[@Fref], 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 19;
    
    //----------------Veins Field
    	setarray @pFmenuitems$[@Fi], "Veins Fields";
    
    
    	setarray @FLevels[@Fi], 7;
    	setarray @FGat$[@Fref], "ve_fild01", "ve_fild02", "ve_fild03",  "ve_fild04", "ve_fild05", "ve_fild06", "ve_fild07";
    	setarray @FLevelName$[@Fref], "Veins Field 1", "Veins Field 2", "Veins Field 3", "Veins Field 4", "Veins Field 5", "Veins Field 6", "Veins Field 7";
    	setarray @FXcoords[@Fref], 186, 196, 222, 51, 202, 150, 149;
    	setarray @FYcoords[@Fref], 175, 370, 45, 250, 324, 223, 307;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 20;
    
    //----------------Yuno Field
    	setarray @pFmenuitems$[@Fi], "Yuno Fields";
    
    
    	setarray @FLevels[@Fi], 12;
    	setarray @FGat$[@Fref], "yuno_fild01", "yuno_fild02", "yuno_fild03",  "yuno_fild04", "yuno_fild05", "yuno_fild06", "yuno_fild07", "yuno_fild08", "yuno_fild09", "yuno_fild10","yuno_fild11","yuno_fild12";
    	setarray @FLevelName$[@Fref], "Yuno Field' 1", "Yuno Field' 2", "Yuno Field' 3", "Yuno Field' 4", "Yuno Field' 5", "Yuno Field' 6", "Yuno Field' 7", "Yuno Field' 8", "Yuno Field' 9", "Yuno Field' 10","Yuno Field' 11", "Yuno Field' 12";
    	setarray @FXcoords[@Fref], 189, 192, 221, 226, 223, 187, 231, 196, 183, 200, 195, 210;
    	setarray @FYcoords[@Fref], 224, 207, 157, 199, 177, 232, 174, 203, 214, 124, 226, 304;
    	setarray @FDepth[@Fref], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
    
    	QWS_Make_Field_Menu 21;
    
    //----------------Cancel
    	setarray @pFmenuitems$[@Fi], "Cancel";
    
    
    	set @Fmenulist$[@Fj],@pFmenuitems$[@Fi];
    	set @Fmenuref[@Fj],57005; // 57005='dead' in hex
    	return;
    
    
    //----------------Make Field Menu Function
    
    function	QWS_Make_Field_Menu	{
    	set @tempfieldmenubin,1;
    	if (getarg(0) == 0) goto menu_item;
    	set @temploopfieldmenu,0;
    	do {
    		set @tempfieldmenubin, @tempfieldmenubin * 2;
    		set @temploopfieldmenu, @temploopfieldmenu + 1;
    		}while (getarg(0) > @temploopfieldmenu);
    // check marker and make menu item
    menu_item:
    	if ((@tempfieldmenubin & ##QWS_F_Unlock) != @tempfieldmenubin) {
    		setarray @FLocRef[@Fi], @Fref;
    		set @Fref, @Fref+@FLevels[@Fi];
    		set @Fi,@Fi+1;
    		return;
    	}
    	if ($QW_MapUserShow == 1) {
    		set @tempmapusers,0;
    		set @mapusersloop,0;
    		do {
    			set @tempmapusers,(getmapusers(@FGat$[@Fref+@mapusersloop]) + @tempmapusers);
    			set @mapusersloop, (@mapusersloop + 1);
    		} while (@FLevels[@Fi] > @mapusersloop);
    		if (@pFprice[@Fi] != 0) set @Fmenulist$[@Fj], @pFmenuitems$[@Fi]+" ["+@tempmapusers+"] -> "+@pFprice[@Fi];
    		if (@pFprice[@Fi] == 0) set @Fmenulist$[@Fj], @pFmenuitems$[@Fi]+" ["+@tempmapusers+"]";
    		set @Fmenuref[@Fj],@Fi;
    		set @Fj,@Fj+1;
    		setarray @FLocRef[@Fi], @Fref;
    		set @Fref, @Fref+@FLevels[@Fi];
    		set @Fi,@Fi+1;
    		return;
    	}
    	if (@pFprice[@Fi] != 0) set @Fmenulist$[@Fj], @pFmenuitems$[@Fi]+" -> "+@pFprice[@Fi];
    	if (@pFprice[@Fi] == 0) set @Fmenulist$[@Fj], @pFmenuitems$[@Fi];
    	set @Fmenuref[@Fj],@Fi;
    	set @Fj,@Fj+1;
    	setarray @FLocRef[@Fi], @Fref;
    	set @Fref, @Fref+@FLevels[@Fi];
    	set @Fi,@Fi+1;
    	return;
    }
    }
    
    function	script	QWS_FLarray	{
    //----------------Start building Menu
    	set @FWref,@FLocRef[@FwarpMenu]; // reference to the arrays with leveldata
    	set @FWi,0;  // loop counter
    	set @FWj,0; // menu lines counter
    	cleararray @FWLmenulist$[0],"",20; // Clearing the array to get rid off ghost items in menu
    	do {
    		if ($QW_FL == 0)||($QW_FDL >= @FDepth[@FWref]) {
    			set @warpprice, 25 * BaseLevel;
    			if (@warpprice != 0)&&($QW_MapUserShow == 0) set @FWLmenulist$[@FWj], @FLevelName$[@FWref]+" -> "+@warpprice;
    			if (@warpprice == 0)&&($QW_MapUserShow == 0) set @FWLmenulist$[@FWj], @FLevelName$[@FWref];
    			if (@warpprice != 0)&&($QW_MapUserShow == 1) set @FWLmenulist$[@FWj], @FLevelName$[@FWref]+" ["+getmapusers(@FGat$[@FWref])+"] -> "+@warpprice;
    			if (@warpprice == 0)&&($QW_MapUserShow == 1) set @FWLmenulist$[@FWj], @FLevelName$[@FWref]+" ["+getmapusers(@FGat$[@FWref])+"]";
    			set @FWLmenuref[@FWj],@FWref;
    			set @FWj,@FWj+1;
    		}
    		set @FWref, @FWref+1;
    		set @FWi,@FWi+1;
    	} while (@FWi < @FLevels[@FwarpMenu]);
    	set @FWLmenulist$[@FWj], "Exit";
    	set @FWLmenuref[@FWj],57005; // 57005='dead' in hex
    	return;
    }
    
    
    //====================City=Dungeon=Menu=Arrays==========================
    // Adding a dungeon:
    //	setarray @pCDmenuitems$[@CDi], "Abyss Lake";	// Name of Dungeon shown in Dungeon select Menu
    //		// Warp prices: Basic (0), Advanced (0), Overseas (0)
    //		// Identifier for fee caluclation: Basic (0), Advanced (0), Overseas (0)
    //	setarray @CDLevels[@CDi], 3;			// Number of levels in dungeon
    //
    //	setarray @CDGat$[@CDref], "abyss_01", "abyss_02", "abyss_03";	// Map names of dungeon levels
    //	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3";	// Name of dungeon levels shown in Menu
    //	setarray @CDXcoords[@CDref], 265, 275, 116;			// X warp coords
    //	setarray @CDYcoords[@CDref], 273, 270, 27;			// Y warp coords
    //	setarray @CDDepth[@CDref], 0, 1, 2;				// Relative depth to entrance, to calculate extra warp fee
    //
    //	QWS_Make_CityDungeon_Menu 0;	// Use a free number (last used is 28, Kiel Dungeon)
    //
    // Adding a warpra:
    //	map,x,y,facing	script	Warpra Helper#example	112,{
    //		callfunc "QWS_CityDungeon_Warpra",<city dungeon number>,"Your City Dungeon";
    //		close;
    //	}
    //	City Dungeon number is the same as "QWS_Make_CityDungeon_Menu".
    //==================================================================
    
    function	script	QWS_CDarray	{
    	function QWS_Make_CityDungeon_Menu;
    
    	set @CDi,0;
    	set @CDj,0;
    	set @CDref,0;
    
    
    //----------------AMATSU DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Amatsu Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "ama_dun01", "ama_dun02", "ama_dun03";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3";
    	setarray @CDXcoords[@CDref], 228, 34, 119;
    	setarray @CDYcoords[@CDref], 11, 41, 14;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 0;
    
    //----------------AYOTAYA
    	setarray @pCDmenuitems$[@CDi], "Ayothaya Dungeon";
    
    
    	setarray @CDLevels[@CDi], 2;
    
    	setarray @CDGat$[@CDref], "ayo_dun01", "ayo_dun02";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2";
    	setarray @CDXcoords[@CDref], 275, 24;
    	setarray @CDYcoords[@CDref], 19, 26;
    	setarray @CDDepth[@CDref], 0, 1;
    
    	QWS_Make_CityDungeon_Menu 1;
    	
    //----------------Baldur Guild Dungeon
    	setarray @pCDmenuitems$[@CDi], "Baldur Guild Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "gld_dun01", "gld_dun01_2", "gld2_pay";
    	setarray @CDLevelName$[@CDref], "Baldur", "Baldur", "Hall of Abyss";
    	setarray @CDXcoords[@CDref], 119, 119, 120;
    	setarray @CDYcoords[@CDref], 93, 93, 130;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 2;
    	
    //----------------Beach Dungeon
    	setarray @pCDmenuitems$[@CDi], "Beach Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "beach_dun", "beach_dun2", "beach_dun3";
    	setarray @CDLevelName$[@CDref], "Beach Dungeon 1", "Beach Dungeon 2", "Beach Dungeon 3";
    	setarray @CDXcoords[@CDref], 266, 255, 23;
    	setarray @CDYcoords[@CDref], 67, 244, 260;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 3;
    	
    //----------------Britoniah Guild Dungeon
    	setarray @pCDmenuitems$[@CDi], "Britoniah Guild Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "gld_dun04", "gld_dun04_2", "gld2_gef";
    	setarray @CDLevelName$[@CDref], "Britoniah", "Britoniah", "Hall of Abyss";
    	setarray @CDXcoords[@CDref], 116, 116, 152;
    	setarray @CDYcoords[@CDref], 45, 45, 118;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 4;
    
    //----------------BYALAN
    	setarray @pCDmenuitems$[@CDi], "Byalan Dungeon";
    
    
    	setarray @CDLevels[@CDi], 5;
    
    	setarray @CDGat$[@CDref], "iz_dun00", "iz_dun01", "iz_dun02", "iz_dun03", "iz_dun04";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
    	setarray @CDXcoords[@CDref], 168, 253, 236, 32, 26;
    	setarray @CDYcoords[@CDref], 168, 252, 204, 63, 27;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 4;
    
    	QWS_Make_CityDungeon_Menu 5;
    
    //----------------CLOCK TOWER
    	setarray @pCDmenuitems$[@CDi], "Clock Tower Dungeon";
    
    
    	setarray @CDLevels[@CDi], 8;
    
    	setarray @CDGat$[@CDref], "c_tower1", "c_tower2", "c_tower3", "c_tower4", "alde_dun01", "alde_dun02", "alde_dun03", "alde_dun04";
    	setarray @CDLevelName$[@CDref], "Clock Tower Level 1", "Clock Tower Level 2", "Clock Tower Level 3", "Clock Tower Level 4", "Basement 1F", "Basement 2F", "Basement 3F", "Basement 4F";
    	setarray @CDXcoords[@CDref], 199, 148, 65, 56, 297, 127, 277, 268;
    	setarray @CDYcoords[@CDref], 159, 283, 147, 155, 25, 169, 178, 74;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 1, 2, 3, 4;
    
    	QWS_Make_CityDungeon_Menu 6;
    
    
    //----------------CULVERT
    	setarray @pCDmenuitems$[@CDi], "Culvert Dungeon";
    
    
    	setarray @CDLevels[@CDi], 4;
    
    	setarray @CDGat$[@CDref], "prt_sewb1", "prt_sewb2", "prt_sewb3", "prt_sewb4";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4";
    	setarray @CDXcoords[@CDref], 131, 19, 180, 100;
    	setarray @CDYcoords[@CDref], 247, 19, 169, 92;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3;
    
    	QWS_Make_CityDungeon_Menu 7;
    	
    //----------------EINBECH DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Einbech Dungeon";
    
    
    	setarray @CDLevels[@CDi], 2;
    
    	setarray @CDGat$[@CDref], "ein_dun01", "ein_dun02";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2";
    	setarray @CDXcoords[@CDref], 22, 292;
    	setarray @CDYcoords[@CDref], 14, 290;
    	setarray @CDDepth[@CDref], 0, 1;
    
    	QWS_Make_CityDungeon_Menu 8;
    
    
    //----------------GEFFEN DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Geffen Dungeon";
    
    
    	setarray @CDLevels[@CDi], 4;
    
    	setarray @CDGat$[@CDref], "gef_dun00", "gef_dun01", "gef_dun02", "gef_dun03";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4";
    	setarray @CDXcoords[@CDref], 104, 115, 106, 203;
    	setarray @CDYcoords[@CDref], 99, 236, 132, 200;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3;
    
    	QWS_Make_CityDungeon_Menu 9;
    
    
    //----------------GONRYUN DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Gonryun Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "gon_dun01", "gon_dun02", "gon_dun03";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3";
    	setarray @CDXcoords[@CDref], 153, 28, 68;
    	setarray @CDYcoords[@CDref], 53, 113, 16;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 10;
    
    
    //----------------LIGHTHALZEN BIO LAB
    	setarray @pCDmenuitems$[@CDi], "Lighthalzen Bio Lab";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "lhz_dun01", "lhz_dun02", "lhz_dun03";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3";
    	setarray @CDXcoords[@CDref], 150, 150, 140;
    	setarray @CDYcoords[@CDref], 288, 18, 134;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 11;
    
    //----------------LOUYANG DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Louyang Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "lou_dun01", "lou_dun02", "lou_dun03";
    	setarray @CDLevelName$[@CDref], "Royal Tomb Level 1", "Royal Tomb Level 2", "Royal Tomb Level 3";
    	setarray @CDXcoords[@CDref], 218, 282, 165;
    	setarray @CDYcoords[@CDref], 196, 20, 38;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 12;
    	
    //----------------Luina Guild Dungeon
    	setarray @pCDmenuitems$[@CDi], "Luina Guild Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "gld_dun02", "gld_dun02_2", "gld2_ald";
    	setarray @CDLevelName$[@CDref], "Luina", "Luina", "Hall of Abyss";
    	setarray @CDXcoords[@CDref], 39, 39, 147;
    	setarray @CDYcoords[@CDref], 161, 161, 155;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 13;
    
    //----------------PAYON DUNGEON
    	setarray @pCDmenuitems$[@CDi], "Payon Dungeon";
    
    
    	setarray @CDLevels[@CDi], 5;
    
    	setarray @CDGat$[@CDref], "pay_dun00", "pay_dun01", "pay_dun02", "pay_dun03", "pay_dun04";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
    	setarray @CDXcoords[@CDref], 21, 19, 19, 155, 201;
    	setarray @CDYcoords[@CDref], 183, 33, 63, 159, 204;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 4;
    
    	QWS_Make_CityDungeon_Menu 14;
    
    //----------------PYRAMIDS
    	setarray @pCDmenuitems$[@CDi], "Pyramids Dungeon";
    
    
    	setarray @CDLevels[@CDi], 6;
    
    	setarray @CDGat$[@CDref], "moc_pryd01", "moc_pryd02", "moc_pryd03", "moc_pryd04", "moc_pryd05", "moc_pryd06";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4", "Basement 1", "Basement 2";
    	setarray @CDXcoords[@CDref], 192, 10, 100, 181, 94, 192;
    	setarray @CDYcoords[@CDref], 9, 192, 92, 11, 96, 8;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 15;
    	
    //----------------Rachel Sanctuary
    	setarray @pCDmenuitems$[@CDi], "Rachel Sanctuary";
    
    
    	setarray @CDLevels[@CDi], 5;
    
    	setarray @CDGat$[@CDref], "ra_san01", "ra_san02", "ra_san03", "ra_san04", "ra_san05";
    	setarray @CDLevelName$[@CDref], "Rachel Sanctuary 1", "Rachel Sanctuary 2", "Rachel Sanctuary 3", "Rachel Sanctuary 4", "Rachel Sanctuary 5";
    	setarray @CDXcoords[@CDref], 140, 32, 8, 204, 150;
    	setarray @CDYcoords[@CDref], 11, 21, 149, 218, 9;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 4;
    
    	QWS_Make_CityDungeon_Menu 16;
    
    //----------------SPHINX
    	setarray @pCDmenuitems$[@CDi], "Sphinx Dungeon";
    
    
    	setarray @CDLevels[@CDi], 5;
    
    	setarray @CDGat$[@CDref], "in_sphinx1", "in_sphinx2", "in_sphinx3", "in_sphinx4", "in_sphinx5";
    	setarray @CDLevelName$[@CDref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5";
    	setarray @CDXcoords[@CDref], 288, 149, 210, 10, 100;
    	setarray @CDYcoords[@CDref], 9, 81, 54, 222, 99;
    	setarray @CDDepth[@CDref], 0, 1, 2, 3, 4;
    
    	QWS_Make_CityDungeon_Menu 17;
    
    
    //----------------TOY FACTORY
    	setarray @pCDmenuitems$[@CDi], "Toy Factory Dungeon";
    
    
    	setarray @CDLevels[@CDi], 2;
    
    	setarray @CDGat$[@CDref], "xmas_dun01", "xmas_dun02";
    	setarray @CDLevelName$[@CDref], "Factory Warehouse", "Classifying Room";
    	setarray @CDXcoords[@CDref], 205, 129;
    	setarray @CDYcoords[@CDref], 15, 133;
    	setarray @CDDepth[@CDref], 0, 1;
    
    	QWS_Make_CityDungeon_Menu 18;
    
    //----------------UMBALA
    	setarray @pCDmenuitems$[@CDi], "Umbala Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "um_dun01", "um_dun02", "yggdrasil01";;
    	setarray @CDLevelName$[@CDref], "Carpenter's Shop in The Tree", "Passage to a Foreign World", "Hvergelmir's Fountain";
    	setarray @CDXcoords[@CDref], 42, 48, 204;
    	setarray @CDYcoords[@CDref], 31, 30, 78;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 19;
    	
    //----------------Valkyrie Guild Dungeon
    	setarray @pCDmenuitems$[@CDi], "Valkyrie Guild Dungeon";
    
    
    	setarray @CDLevels[@CDi], 3;
    
    	setarray @CDGat$[@CDref], "gld_dun03", "gld_dun03_2", "gld2_prt";
    	setarray @CDLevelName$[@CDref], "Valkyrie", "Valkyrie", "Hall of Abyss";
    	setarray @CDXcoords[@CDref], 50, 50, 140;
    	setarray @CDYcoords[@CDref], 44, 44, 132;
    	setarray @CDDepth[@CDref], 0, 1, 2;
    
    	QWS_Make_CityDungeon_Menu 20;
    
    //----------------Cancel
    	setarray @pCDmenuitems$[@CDi], "Cancel";
    
    
    	set @CDmenulist$[@CDj],@pCDmenuitems$[@CDi];
    	set @CDmenuref[@CDj],57005; // 57005='dead' in hex
    	return;
    
    
    //----------------Make City Dungeon Menu Function
    
    function	QWS_Make_CityDungeon_Menu	{
    	set @tempcitydungeonmenubin,1;
    	if (getarg(0) == 0) goto menu_item;
    	set @temploopcitydungeonmenu,0;
    	do {
    		set @tempcitydungeonmenubin, @tempcitydungeonmenubin * 2;
    		set @temploopcitydungeonmenu, @temploopcitydungeonmenu + 1;
    		}while (getarg(0) > @temploopcitydungeonmenu);
    // check marker and make menu item
    menu_item:
    	if ((@tempcitydungeonmenubin & ##QWS_CD_Unlock) != @tempcitydungeonmenubin) {
    		setarray @CDLocRef[@CDi], @CDref;
    		set @CDref, @CDref+@CDLevels[@CDi];
    		set @CDi,@CDi+1;
    		return;
    	}
    	if ($QW_MapUserShow == 1) {
    		set @tempmapusers,0;
    		set @mapusersloop,0;
    		do {
    			set @tempmapusers,(getmapusers(@CDGat$[@CDref+@mapusersloop]) + @tempmapusers);
    			set @mapusersloop, (@mapusersloop + 1);
    		} while (@CDLevels[@CDi] > @mapusersloop);
    		if (@pCDprice[@CDi] != 0) set @CDmenulist$[@CDj], @pCDmenuitems$[@CDi]+" ["+@tempmapusers+"] -> "+@pCDprice[@CDi];
    		if (@pCDprice[@CDi] == 0) set @CDmenulist$[@CDj], @pCDmenuitems$[@CDi]+" ["+@tempmapusers+"]";
    		set @CDmenuref[@CDj],@CDi;
    		set @CDj,@CDj+1;
    		setarray @CDLocRef[@CDi], @CDref;
    		set @CDref, @CDref+@CDLevels[@CDi];
    		set @CDi,@CDi+1;
    		return;
    	}
    	if (@pCDprice[@CDi] != 0) set @CDmenulist$[@CDj], @pCDmenuitems$[@CDi]+" -> "+@pCDprice[@CDi];
    	if (@pCDprice[@CDi] == 0) set @CDmenulist$[@CDj], @pCDmenuitems$[@CDi];
    	set @CDmenuref[@CDj],@CDi;
    	set @CDj,@CDj+1;
    	setarray @CDLocRef[@CDi], @CDref;
    	set @CDref, @CDref+@CDLevels[@CDi];
    	set @CDi,@CDi+1;
    	return;
    }
    }
    
    function	script	QWS_CDLarray	{
    //----------------Start building Menu
    	set @CDWref,@CDLocRef[@CDwarpMenu]; // reference to the arrays with leveldata
    	set @CDWi,0;  // loop counter
    	set @CDWj,0; // menu lines counter
    	cleararray @CDWLmenulist$[0],"",15; // Clearing the array to get rid off ghost items in menu
    	do {
    		if ($QW_CDL == 0)||($QW_CDDL >= @CDDepth[@CDWref]) {
    			set @warpprice, 25 * BaseLevel;
    			if (@warpprice != 0)&&($QW_MapUserShow == 0) set @CDWLmenulist$[@CDWj], @CDLevelName$[@CDWref]+" -> "+@warpprice;
    			if (@warpprice == 0)&&($QW_MapUserShow == 0) set @CDWLmenulist$[@CDWj], @CDLevelName$[@CDWref];
    			if (@warpprice != 0)&&($QW_MapUserShow == 1) set @CDWLmenulist$[@CDWj], @CDLevelName$[@CDWref]+" ["+getmapusers(@CDGat$[@CDWref])+"] -> "+@warpprice;
    			if (@warpprice == 0)&&($QW_MapUserShow == 1) set @CDWLmenulist$[@CDWj], @CDLevelName$[@CDWref]+" ["+getmapusers(@CDGat$[@CDWref])+"]";
    			set @CDWLmenuref[@CDWj],@CDWref;
    			set @CDWj,@CDWj+1;
    		}
    		set @CDWref, @CDWref+1;
    		set @CDWi,@CDWi+1;
    	} while (@CDWi < @CDLevels[@CDwarpMenu]);
    	set @CDWLmenulist$[@CDWj], "Exit";
    	set @CDWLmenuref[@CDWj],57005; // 57005='dead' in hex
    	return;
    }
    
    
    //====================Dungeon=Menu=Arrays==========================
    // Adding a dungeon:
    //	setarray @pDmenuitems$[@Di], "Abyss Lake";	// Name of Dungeon shown in Dungeon select Menu
    //		// Warp prices: Basic (0), Advanced (0), Overseas (0)
    //		// Identifier for fee caluclation: Basic (0), Advanced (0), Overseas (0)
    //	setarray @DLevels[@Di], 3;			// Number of levels in dungeon
    //
    //	setarray @DGat$[@Dref], "abyss_01", "abyss_02", "abyss_03";	// Map names of dungeon levels
    //	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";	// Name of dungeon levels shown in Menu
    //	setarray @DXcoords[@Dref], 265, 275, 116;			// X warp coords
    //	setarray @DYcoords[@Dref], 273, 270, 27;			// Y warp coords
    //	setarray @DDepth[@Dref], 0, 1, 2;				// Relative depth to entrance, to calculate extra warp fee
    //
    //	QWS_Make_Dungeon_Menu 0;	// Use a free number (last used is 28, Kiel Dungeon)
    //
    // Adding a warpra:
    //	map,x,y,facing	script	Warpra Helper#example	112,{
    //		callfunc "QWS_Dungeon_Warpra",<dungeon number>,"Your Dungeon";
    //		close;
    //	}
    //	Dungeon number is the same as "QWS_Make_Dungeon_Menu".
    //==================================================================
    
    function	script	QWS_Darray	{
    	function QWS_Make_Dungeon_Menu;
    
    	set @Di,0;
    	set @Dj,0;
    	set @Dref,0;
    
    //----------------ABYSS LAKE
    	setarray @pDmenuitems$[@Di], "Abyss Lake";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "abyss_01", "abyss_02", "abyss_03";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
    	setarray @DXcoords[@Dref], 261, 275, 116;
    	setarray @DYcoords[@Dref], 272, 270, 27;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 0;
    
    //----------------ANT HELL
    	setarray @pDmenuitems$[@Di], "Ant Hell Dungeon"; 
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "anthell01", "anthell02";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2";
    	setarray @DXcoords[@Dref], 35, 168;
    	setarray @DYcoords[@Dref], 262, 170;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 1;
    
    
    //----------------COAL MINE
    	setarray @pDmenuitems$[@Di], "Coal Mine Dungeon";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "mjo_dun01", "mjo_dun02", "mjo_dun03";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
    	setarray @DXcoords[@Dref], 52, 381, 302;
    	setarray @DYcoords[@Dref], 17, 343, 262;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 2;
    
    
    //----------------Cursed Abbey
    	setarray @pDmenuitems$[@Di], "Cursed Abbey";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "abbey01", "abbey02", "abbey03";
    	setarray @DLevelName$[@Dref], "Cursed Abbey 1", "Cursed Abbey 2", "Cursed Abbey 3";
    	setarray @DXcoords[@Dref], 266, 255, 23;
    	setarray @DYcoords[@Dref], 67, 244, 260;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 3;
    
    
    //----------------GEFENIA DUNGEON
    	setarray @pDmenuitems$[@Di], "Gefenia Dungeon";
    
    
    	setarray @DLevels[@Di], 4;
    
    	setarray @DGat$[@Dref], "gefenia01", "gefenia02", "gefenia03", "gefenia04";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4";
    	setarray @DXcoords[@Dref], 40, 203, 266, 130;
    	setarray @DYcoords[@Dref], 103, 34, 168, 272;
    	setarray @DDepth[@Dref], 0, 1, 2, 3;
    
    	QWS_Make_Dungeon_Menu 5;
    
    
    //----------------GLAST HEIM
    	setarray @pDmenuitems$[@Di], "Glast Heim Dungeon";
    
    
    	setarray @DLevels[@Di], 17;
    
    	setarray @DGat$[@Dref], "glast_01",  "gl_cas01", "gl_cas02", "gl_knt01", "gl_knt02", "gl_chyard", "gl_sew01", "gl_sew02", "gl_sew03", "gl_sew04", "gl_church", "gl_step", "gl_dun01", "gl_dun02", "gl_prison", "gl_prison1", "gl_in01";
    	setarray @DLevelName$[@Dref], "Glast Heim Entrance", "Castle 1", "Castle 2", "Chivalry 1", "Chivalry 2", "Churchyard", "Sewers 1", "Sewers 2", "Sewers 3", "Sewers 4", "St. Abbey", "Steps", "Lowest Cave 1", "Lowest Cave 2", "Prison 1", "Prison 2", "Inside Glast Heim";
    	setarray @DXcoords[@Dref], 370, 199, 104, 150, 157, 147, 258, 108, 171, 68, 156, 12, 133, 224, 14, 150, 121;
    	setarray @DYcoords[@Dref], 304, 29, 25, 15, 287, 15, 255, 291, 283, 277, 7, 7, 271, 274, 70, 14, 59;
    	setarray @DDepth[@Dref], 0, 1, 2, 1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 4, 5, 6, 1;
    
    	QWS_Make_Dungeon_Menu 7;
    
    
    //----------------HIDDEN DUNGEON
    	setarray @pDmenuitems$[@Di], "Hidden Dungeon";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "prt_maze01", "prt_maze02", "prt_maze03";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
    	setarray @DXcoords[@Dref], 176, 93, 23;
    	setarray @DYcoords[@Dref], 7, 20, 8;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 8;
    	
    //----------------Ice Dungeon
    	setarray @pDmenuitems$[@Di], "Ice Dungeon";
    
    
    	setarray @DLevels[@Di], 4;
    
    	setarray @DGat$[@Dref], "ice_dun01", "ice_dun02", "ice_dun03", "ice_dun04";
    	setarray @DLevelName$[@Dref], "Ice Dungeon 1", "Ice Dungeon 2", "Ice Dungeon 3", "Ice Dungeon 4";
    	setarray @DXcoords[@Dref], 157, 151, 149, 33;
    	setarray @DYcoords[@Dref], 14, 155, 22, 158;
    	setarray @DDepth[@Dref], 0, 1, 2, 3;
    
    	QWS_Make_Dungeon_Menu 9;
    
    //----------------JUPEROS CAVE
    	setarray @pDmenuitems$[@Di], "Juperos Cave";
    
    
    	setarray @DLevels[@Di], 4;
    
    	setarray @DGat$[@Dref], "jupe_cave", "juperos_01", "juperos_02", "jupe_core";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4";
    	setarray @DXcoords[@Dref], 140, 53, 37, 150;
    	setarray @DYcoords[@Dref], 51, 247, 63, 285;
    	setarray @DDepth[@Dref], 0, 1, 2, 3;
    
    	QWS_Make_Dungeon_Menu 10;
    
    //----------------KIEL DUNGEON
    	setarray @pDmenuitems$[@Di], "Kiel Dungeon";
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "kh_dun01", "kh_dun02";
    	setarray @DLevelName$[@Dref], "1st Floor", "2nd Floor";
    	setarray @DXcoords[@Dref], 28, 41;
    	setarray @DYcoords[@Dref], 226, 198;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 11;
    
    //----------------MAGMA DUNGEON
    	setarray @pDmenuitems$[@Di], "Magma Dungeon";
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "mag_dun01", "mag_dun02";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2";
    	setarray @DXcoords[@Dref], 126, 47;
    	setarray @DYcoords[@Dref], 68, 30;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 12;
    	
    //----------------Nidhogg's Dungeon
    	setarray @pDmenuitems$[@Di], "Nidhogg's Dungeon";
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "nyd_dun01", "nyd_dun02";
    	setarray @DLevelName$[@Dref], "Nidhogg's Dungeon 1", "Nidhogg's Dungeon 2";
    	setarray @DXcoords[@Dref], 61, 60;
    	setarray @DYcoords[@Dref], 239, 271;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 13;
    
    
    //----------------ODIN TEMPLE
    	setarray @pDmenuitems$[@Di], "Odin Temple";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "odin_tem01", "odin_tem02", "odin_tem03";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3";
    	setarray @DXcoords[@Dref], 298, 224, 266;
    	setarray @DYcoords[@Dref], 167, 149, 280;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 14;
    
    //----------------ORC DUNGEON
    	setarray @pDmenuitems$[@Di], "Orc Dungeon";
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "orcsdun01", "orcsdun02";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2";
    	setarray @DXcoords[@Dref], 32, 21;
    	setarray @DYcoords[@Dref], 170, 185;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 15;
    
    
    //----------------SUNKEN SHIP
    	setarray @pDmenuitems$[@Di], "Sunken Ship Dungeon";
    
    
    	setarray @DLevels[@Di], 2;
    
    	setarray @DGat$[@Dref], "treasure01", "treasure02";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2";
    	setarray @DXcoords[@Dref], 69, 102;
    	setarray @DYcoords[@Dref], 24, 27;
    	setarray @DDepth[@Dref], 0, 1;
    
    	QWS_Make_Dungeon_Menu 16;
    
    //----------------THANATOS TOWER
    	setarray @pDmenuitems$[@Di], "Thanatos Tower";
    
    
    	setarray @DLevels[@Di], 13;
    
    	setarray @DGat$[@Dref], "tha_t01", "tha_t02", "tha_t03", "tha_t04", "tha_t05", "tha_t06", "tha_t07", "tha_t08", "tha_t09", "tha_t10", "tha_t11", "tha_t12", "thana_boss";
    	setarray @DLevelName$[@Dref], "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Level 7", "Level 8", "Level 9", "Level 10", "Level 11", "Level 12", "Thanatos Boss";
    	setarray @DXcoords[@Dref], 150, 150, 220, 59, 62, 206, 35, 105, 88, 168, 90, 129, 85;
    	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;
    
    	QWS_Make_Dungeon_Menu 17;
    	
    //----------------Thor Volcano
    	setarray @pDmenuitems$[@Di], "Thor Volcano";
    
    
    	setarray @DLevels[@Di], 3;
    
    	setarray @DGat$[@Dref], "thor_v01", "thor_v02", "thor_v03";
    	setarray @DLevelName$[@Dref], "Thor Volcano 1", "Thor Volcano 2", "Thor Volcano 3";
    	setarray @DXcoords[@Dref], 21, 75, 34;
    	setarray @DYcoords[@Dref], 228, 205, 272;
    	setarray @DDepth[@Dref], 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 18;
    
    
    //----------------TURTLE ISTLAND
    	setarray @pDmenuitems$[@Di], "Turtle Island Dungeon";
    
    
    	setarray @DLevels[@Di], 4;
    
    	setarray @DGat$[@Dref], "tur_dun01", "tur_dun02", "tur_dun03", "tur_dun04";
    	setarray @DLevelName$[@Dref], "Outside", "Level 1", "Level 2", "Level 3";
    	setarray @DXcoords[@Dref], 154, 148, 132, 100;
    	setarray @DYcoords[@Dref], 49, 261, 189, 192;
    	setarray @DDepth[@Dref], 0, 0, 1, 2;
    
    	QWS_Make_Dungeon_Menu 19;
    
    //----------------Cancel
    	setarray @pDmenuitems$[@Di], "Cancel";
    
    
    	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 @DWref,@DLocRef[@DwarpMenu]; // reference to the arrays with leveldata
    	set @DWi,0;  // loop counter
    	set @DWj,0; // menu lines counter
    	cleararray @DWLmenulist$[0],"",15; // Clearing the array to get rid off ghost items in menu
    	do {
    		if ($QW_DL == 0)||($QW_DDL >= @DDepth[@DWref]) {
    			set @warpprice, 25 * BaseLevel;
    			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;
    }
    
    
    //================City=Dungeon=Warpras=That=Only=Unlock=================
    
    function	script	QWS_CityDungeon_Warpra	{
    	function QWS_CD_getbin;
    	function QWS_CD_setbin;
    	
    	if ((QWS_CD_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
    		mes "[Warpra]";
    		mes getarg(1)+" unlocked!";
    		QWS_CD_setbin(getarg(0));
    		return;
    	} else if (QWS_CD_getbin(getarg(0)) == 1) {
    		mes "[Warpra]";
    		mes "Sorry, I can only unlock this location.";
    	} else
    		debugmes "QWS_CityDungeon_Warpra error, improper syntax?";
    	return;
    
    
    function	QWS_CD_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_CD_Unlock,(##QWS_CD_Unlock | @tempsetbindata);
    	return;
    }
    
    function	QWS_CD_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_CD_Unlock) == @tempgetbindata) return 1;
    	return 0;
    }
    }
    
    
    //================Dungeon=Warpras=That=Only=Unlock=================
    
    function	script	QWS_Dungeon_Warpra	{
    	function QWS_D_getbin;
    	function QWS_D_setbin;
    	
    	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;
    }
    
    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;
    }
    }
    
    
    //================Field=Warpras=That=Only=Unlock=================
    
    function	script	QWS_Field_Warpra	{
    	function QWS_F_getbin;
    	function QWS_F_setbin;
    	
    	if ((QWS_F_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
    		mes "[Warpra]";
    		mes getarg(1)+" unlocked!";
    		QWS_F_setbin(getarg(0));
    		return;
    	} else if (QWS_F_getbin(getarg(0)) == 1) {
    		mes "[Warpra]";
    		mes "Sorry, I can only unlock this location.";
    	} else
    		debugmes "QWS_Field_Warpra error, improper syntax?";
    	return;
    
    
    function	QWS_F_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_F_Unlock,(##QWS_F_Unlock | @tempsetbindata);
    	return;
    }
    
    function	QWS_F_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_F_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==============================
    
    -	script	Warpra#0	-1,{ callfunc "Q_Warpra",1; }
    
    alberta,28,240,4	script	Warpra#1	403,{ callfunc "QWS_Town_Warpra",1,"Alberta Town";  close; }
    aldebaran,145,118,4	script	Warpra#2	403,{ callfunc "QWS_Town_Warpra",2,"Aldebaran Town"; callfunc "QWS_Field_Warpra",11,"Mjolnir Fields"; callfunc "QWS_CityDungeon_Warpra",6,"Clock Tower Dungeon"; callfunc "QWS_CityDungeon_Warpra",13,"Luina Guild Dungeon"; close; }
    ayothaya,209,169,6	script	Warpra#3	403,{ callfunc "QWS_Town_Warpra",4,"Ayotaya Town"; callfunc "QWS_Field_Warpra",1,"Ayothaya Field Field"; callfunc "QWS_CityDungeon_Warpra",1,"Ayotaya Dungeon"; close; }
    amatsu,203,87,4	script	Warpra#4	403,{ callfunc "QWS_Town_Warpra",3,"Amatsu Town"; callfunc "QWS_Field_Warpra",0,"Amatsu Fields";  callfunc "QWS_CityDungeon_Warpra",0,"Amatsu Dungeon"; close; }
    comodo,194,158,4	script	Warpra#5	403,{ callfunc "QWS_Town_Warpra",5,"Comodo Town"; callfunc "QWS_Field_Warpra",2,"Comodo Fields"; callfunc "QWS_CityDungeon_Warpra",3,"Beach Dungeon"; close; }
    einbroch,69,202,4	script	Warpra#6	403,{ callfunc "QWS_Town_Warpra",7,"Einbroch Town";  callfunc "QWS_Field_Warpra",3,"Einbroch Fields"; close; }
    einbech,59,38,6	script	Warpra#7	403,{ callfunc "QWS_Town_Warpra",6,"Einbech Town"; callfunc "QWS_CityDungeon_Warpra",8,"Einbech Dungeon"; close; }
    geffen,124,72,4	script	Warpra#8	403,{ callfunc "QWS_Town_Warpra",8,"Geffen Town";  callfunc "QWS_Field_Warpra",4,"Geffen Fields"; callfunc "QWS_CityDungeon_Warpra",9,"Gefen Dungeon"; callfunc "QWS_CityDungeon_Warpra",4,"Britoniah Guild Dungeon"; close; }
    gonryun,162,122,4	script	Warpra#9	403,{ callfunc "QWS_Town_Warpra",9,"Gonryun Town";  callfunc "QWS_Field_Warpra",5,"Gonryun Fields"; callfunc "QWS_CityDungeon_Warpra",10,"Gonryun Dungeon"; close; }
    hugel,101,151,4	script	Warpra#10	403,{ callfunc "QWS_Town_Warpra",10,"Hugel Town";  callfunc "QWS_Field_Warpra",6,"Hugel Fields"; close; }
    jawaii,253,138,4	script	Warpra#11	403,{ callfunc "QWS_Town_Warpra",12,"Jawaii Town"; close; }
    izlude,132,120,4	script	Warpra#12	403,{ callfunc "QWS_Town_Warpra",11,"Izlude Town"; callfunc "QWS_CityDungeon_Warpra",5,"Byalan Dungeon"; close; }
    lighthalzen,162,102,4	script	Warpra#13	403,{ callfunc "QWS_Town_Warpra",13,"Lighthalzen Town";  callfunc "QWS_Field_Warpra",7,"Lighthalzen Fields"; callfunc "QWS_CityDungeon_Warpra",11,"Lighthalzen Bio Lab"; close; }
    louyang,208,103,6	script	Warpra#14	403,{ callfunc "QWS_Town_Warpra",14,"Louyang Town";  callfunc "QWS_Field_Warpra",8,"Louyang Fields"; callfunc "QWS_CityDungeon_Warpra",12,"Louyang Dungeon"; close; }
    morocc,159,97,4	script	Warpra#15	403,{ callfunc "QWS_Town_Warpra",18,"Morroc Town";  callfunc "QWS_Field_Warpra",17,"Sograt Deserts"; callfunc "QWS_CityDungeon_Warpra",15,"Pyramides Dungeon"; callfunc "QWS_CityDungeon_Warpra",17,"Sphinx Dungeon"; close; }
    niflheim,205,179,4	script	Warpra#16	403,{ callfunc "QWS_Town_Warpra",20,"Niflheim Town";  callfunc "QWS_Field_Warpra",13,"Niflheim Fields"; close; }
    payon,182,108,4	script	Warpra#17	403,{ callfunc "QWS_Town_Warpra",21,"Payon Town";  callfunc "QWS_Field_Warpra",14,"Payon Forests"; callfunc "QWS_CityDungeon_Warpra",14,"Payon Dungeon"; callfunc "QWS_CityDungeon_Warpra",2,"Baldur Guild Dungeon"; close; }
    prontera,159,192,4	script	Warpra#18	403,{ callfunc "QWS_Town_Warpra",0,"Prontera Town";  callfunc "QWS_Field_Warpra",15,"Prontera Fields"; callfunc "QWS_CityDungeon_Warpra",7,"Culvert Dungeon"; callfunc "QWS_CityDungeon_Warpra",20,"Valkyrie Guild Dungeon"; close; }
    umbala,106,150,3	script	Warpra#19	403,{ callfunc "QWS_Town_Warpra",25,"Umbala Town";  callfunc "QWS_Field_Warpra",19,"Umbala Fields"; close; }
    xmas,150,136,6	script	Warpra#20	403,{ callfunc "QWS_Town_Warpra",15,"Lutie Town";  callfunc "QWS_Field_Warpra",9,"Lutie Fields"; callfunc "QWS_CityDungeon_Warpra",18,"Toy Factory Dungeon"; close; }
    yuno,162,47,4	script	Warpra#21	403,{ callfunc "QWS_Town_Warpra",27,"Yuno Town";  callfunc "QWS_Field_Warpra",21,"Yuno Fields"; callfunc "QWS_CityDungeon_Warpra",19,"Umbala Dungeon"; close; }
    manuk,262,177,4	script	Warpra#22	403,{ callfunc "QWS_Town_Warpra",16,"Manuk Town";  callfunc "QWS_Field_Warpra",10,"Manuk Fields"; close; }
    moscovia,216,196,6	script	Warpra#23	403,{ callfunc "QWS_Town_Warpra",19,"Moscovia Town";  callfunc "QWS_Field_Warpra",12,"Moscovia Fields"; close; }
    rachel,135,116,4	script	Warpra#24	403,{ callfunc "QWS_Town_Warpra",22,"Rachel Town";  callfunc "QWS_Field_Warpra",16,"Rachel Fields"; callfunc "QWS_CityDungeon_Warpra",16,"Rachel Sanctuary"; close; }
    splendide,205,153,4	script	Warpra#25	403,{ callfunc "QWS_Town_Warpra",23,"Splendide Town";  callfunc "QWS_Field_Warpra",18,"Splendide Fields"; close; }
    veins,214,123,4	script	Warpra#26	403,{ callfunc "QWS_Town_Warpra",26,"Veins Town";  callfunc "QWS_Field_Warpra",20,"Veins Fields"; close; }
    thor_camp,249,76,4	script	Warpra#27	403,{ callfunc "QWS_Town_Warpra",24,"Thor Camp"; close; }
    mid_camp,216,288,4	script	Warpra#28	403,{ callfunc "QWS_Town_Warpra",17,"Midgard's Expedition Camp"; close; }
    
    
    
    abyss_01,264,267,2	script	Warpra Helper#0	403,{ callfunc "QWS_Dungeon_Warpra",0,"Abyss Lake"; close; }
    anthell01,43,263,3	script	Warpra Helper#1	403,{ callfunc "QWS_Dungeon_Warpra",1,"Ant Hell Dungeon"; close; }
    mjo_dun01,49,23,6	script	Warpra Helper#2	403,{ callfunc "QWS_Dungeon_Warpra",2,"Coal Mine Dungeon"; close; }
    gefenia01,50,100,0	script	Warpra Helper#3	403,{ callfunc "QWS_Dungeon_Warpra",5,"Gefenia Dungeon"; close; }
    glast_01,371,308,3	script	Warpra Helper#4	403,{ callfunc "QWS_Dungeon_Warpra",7,"Glast Heim Dungeon"; close; }
    jupe_cave,144,56,3	script	Warpra Helper#5	403,{ callfunc "QWS_Dungeon_Warpra",10,"Juperos Cave"; close; }
    kh_dun01,14,224,6	script	Warpra Helper#6	403,{ callfunc "QWS_Dungeon_Warpra",11,"Kiel Dungeon"; close; }
    mag_dun01,122,66,0	script	Warpra Helper#7	403,{ callfunc "QWS_Dungeon_Warpra",12,"Magma Dungeon"; close; }
    odin_tem01,115,148,3	script	Warpra Helper#8	403,{ callfunc "QWS_Dungeon_Warpra",14,"Odin Temple"; close; }
    in_orcs01,37,173,3	script	Warpra Helper#9	403,{ callfunc "QWS_Dungeon_Warpra",15,"Orc Dungeon"; close; }
    tha_t01,154,34,1	script	Warpra Helper#10	403,{ callfunc "QWS_Dungeon_Warpra",17,"Thanatos Tower"; close; }
    alb2trea,73,101,4	script	Warpra Helper#11	403,{ callfunc "QWS_Dungeon_Warpra",16,"Sunken Ship Dungeon"; close; }
    um_dun01,36,29,5	script	Warpra Helper#12	403,{ callfunc "QWS_Dungeon_Warpra",37,"Umbala Dungeon"; close; }
    tur_dun01,147,53,5	script	Warpra Helper#13	403,{ callfunc "QWS_Dungeon_Warpra",19,"Turtle Island Dungeon"; close; }
    prt_maze01,180,9,3	script	Warpra Helper#14	403,{ callfunc "QWS_Dungeon_Warpra",8,"Hidden Dungeon"; close; }
    nameless_n,259,213,4	script	Warpra Helper#15	403,{ callfunc "QWS_Dungeon_Warpra",3,"Cursed Abbey"; close; }
    ice_dun01,154,17,6	script	Warpra Helper#16	403,{ callfunc "QWS_Dungeon_Warpra",9,"Ice Dungeon"; close; }
    thor_v01,18,229,6	script	Warpra Helper#17	403,{ callfunc "QWS_Dungeon_Warpra",18,"Thor Volcano"; close; }
    

    Greetings everyone. Here i got some working script of advvance Wapra to share with you all but it seem like this script were having a little bug when the zeny is zero, the variable for last warp choice are stuck forever. Im not sure where to edit but already give a try but it seems like im still dont know how to try to fix properly. Maybe some of our expert in scripting can help me out. Btw here are the script 

     

     

  6. On 6/16/2019 at 7:36 AM, Kang said:

    An update... I think it is done!!  Now you can also warp to fields and guild dungeons, and the extremely convenient "last warp" option works too.  I also moved the dungeon unlocker warpras to the dungeon entrance. 

    Greetings.. Its been a centory since the last update but this script were bug i think.
    It cant show any GM parameters in game plus if you dont have zeny to use service called las warp, it will make you stuck with the dialogue box |

  7. On 1/15/2018 at 6:48 PM, Sehrentos said:

    I'm not sure if this works, but you could test it by making an NPC that sets a bonus2 bDropAddRace,RC_All,5; for the current chacter.

    bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}};

    Or maybe did some alteration to the eq or hg that make the drop or exp are increase or decreased.

  8. 14 minutes ago, BeWan said:

    much better if you use unique_id 

    Unique_id.. ermm how to do that? or just change the variables?
    Do you mean unique_id (gepard function) ?


    ( Btw hi there sir and by end of this month i will contact you to bought your services sir.. GG )

  9. //===== rAthena Script =======================================
    //= Freebie NPC
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Initial Version
    //===== Tested With =========================================
    //= rAthena SQL 07/16-2017 Revision
    //===== Description ==========================================
    //= This Script gives new players, which passes the level requirement
    //	if set, freebies in form of zeny and/or items.
    //	See 'OnInit' for Config.
    //===== Comments =============================================
    //= Request
    //============================================================
    prontera,0,0,6	script	Freebie NPC	100,{
    
    mes .n$;
    if(getgmlevel() >= .gm) {
    	mes "What do you want to do?";
    	next;
    	if(select("- Managment:- Player Interface") - 2) goto GM_Menu;
    	mes .n$;
    }
    if(.gm_it && getarraysize($item) < 1 || !.gm_it && getarraysize(.Free) < 1) {
    	mes "I'm sorry, but there is no freebie yet to can recieve.";
    	mes "Please wait till an GM added some.";
    	close;
    }
    if(!#free && $freebies < .f_limit) {
    	if(Upper == 0) 
    		if(.requ && BaseLevel < 99 && JobLevel < 50) set .@f,1;
    
    	else if(Upper == 1) 
    		if(.reb_lvl && BaseLevel < 99 && JobLevel < 70) set .@f,1;
    		
    	if(.@f) {
    		mes "It seems you don't meet the level requirements, which are "+ ( (Upper == 0)?"99/50":"99/70")+".";
    		close;
    	}
    	
    } else if($freebies >= .f_limit) {
    	mes "I'm sorry, but I cannot give you any freebies anymore, since I have reached the maximum allowed amount to give.";
    	close;
    	
    } else if(#free == 1) {
    	mes "Do you want to recieve your freebies now?";
    	if(select("- Yes:- No") - 1) close;
    	
    } else if(#free == 2) {
    	mes "I'm sorry, but you already recieved your freebies.";
    	close;
    }
    
    mes "You'll recieve some freebies for joining our server!!";
    mes "Do you want to to recieve 'em now or later?";
    set #free,1;
    if(select("- Now:- Later") - 1) close;
    
    next;
    mes .n$;
    mes "Here you are.";
    close2;
    if(!.gm_it) // No InGame Menu used
    	for ( set @f,0; @f < getarraysize(.Free); set @f,@f + 2)
    		if(.Free[@f] == 1) {
    			set Zeny,Zeny + .Free[@f+1];
    			dispbottom .n$+": You have recieved "+.Free[@f+1]+" Zeny.";
    		} else getitem .Free[@f],.Free[@f+1];
    else // Via InGame Menu setable 
    	for ( set @f,0; @f < getarraysize($item); set @f,@f + 2)
    		if($item[@f] == 1) {
    			set Zeny,Zeny + $item[@f+1];
    			dispbottom .n$+": You have recieved "+$item[@f+1]+" Zeny.";
    		} else getitem $item[@f],$item[@f+1];	
    
    // increasing the counter for freebies given
    set $freebies,$freebies + 1; 
    set #free,2; // Player has recieved the Freebies
    end;
    
    GM_Menu:
    mes .n$;
    mes "What do you want to manage?";
    next;
    switch(select("- View Freebies:- Freebie Management:- Player List:- Reset Variables")) {
    	
    	case 1:
    	mes .n$;
    	if(.gm_it && getarraysize($item) < 1 || !.gm_it && getarraysize(.Free) < 1) {
    		mes "I'm sorry, but there is no freebie yet to view.";
    		mes "Please add some first.";
    		close;
    	}
    	mes "Here is the list of the current freebies:";
    	next;
    	if(!.gm_it) { // No InGame Menu used
    		for ( set @f,0; @f < getarraysize(.Free); set @f,@f + 2) {
    			set @d,(@f+2)/2;
    			mes "===== Freebie #"+@d+" ======";
    			if(.Free[@f] == 1)	mes  .Free[@f+1]+ " Zeny";
    			else mes .Free[@f+1]+ "x "+getitemname(.Free[@f]);
    			if(.Free[@f+2] == 0) mes "==================";
    		}
    	} else { // Via InGame Menu setable 
    		for ( set @f,0; @f < getarraysize($item); set @f,@f + 2) {
    			set @d,(@f+2)/2;;
    			mes "===== Freebie #"+@d+" ======";
    			if($item[@f] == 1)	mes  $item[@f+1]+ " Zeny";
    			else mes $item[@f+1]+ "x "+getitemname($item[@f]);
    			if($item[@f+2] == 0) mes "==================";
    		}
    	}
    	next;
    	mes .n$;
    	mes "Max Freebies to give: "+.f_limit;
    	mes "Freebies to give left: "+(.f_limit - $freebies);
    	close;
    	
    	case 2:
    	mes .n$;
    	if(!.gm_it) {
    		mes "This menu isn't available, since the Freebie Settings be read from the script itself.";
    		close;
    	}
    	mes "Please choose what to do:";
    	next;
    	switch(select("- Add Freebies:- Delete Freebies:- Nothing")) {
    		case 1:
    		mes .n$;
    		if(getarraysize($item) >= .free_limit) {
    			mes "You can't add any freebies anymore, please remove one first.";
    			close;
    		}
    		mes "Do you want to add Zeny or an Item as Freebie?";
    		next;
    		if(select("- Zeny" + ( (.zeny)?"":" Not Allowed") +":- Item") - 1) {
    			mes .n$;
    			mes "Please type the Item ID you want to add:";
    			mes "Max are "+.free_limit+" Items.";
    			next;
    			input @item;
    			mes .n$;
    			if(@item < 501 && @item > .last) {
    				mes "The value you have put is not valid.";
    				close;
    			}
    			if(getitemname(@item) == "null" || getitemname(@item) == "") {
    				mes "The item you requested doesn't exist.";
    				close;
    			}
    			mes "Chosen Item: "+ getitemname(@item);
    			mes " ";
    			mes "Now input the amount it should have.";
    			mes "Maximum is "+.iam_limit;
    			next;
    			if(input(@amount,1,.iam_limit) != 0) {
    				mes .n$;
    				mes "You have put an invalid amount.";
    				mes "Maximum is "+.iam_limit;
    				close;
    			}
    			mes .n$;
    			mes "Result: "+@amount+" "+getitemname(@item);
    			mes "Is that correct?";
    			if(select("- Yes:- No") - 1) close;
    			setarray $item[getarraysize($item)],@item,@amount;
    		} else {
    			if(!.zeny) close;
    			mes .n$;
    			mes "Please type the amount.";
    			mes "Maximum is "+.z_limit;
    			next;
    			if(input(@amount,1,.z_limit) != 0) {
    				mes .n$;
    				mes "You have put an invalid amount.";
    				mes "Maximum is "+.z_limit;
    				close;
    			}
    			mes .n$;
    			mes "Result: "+@amount+" Zeny";
    			mes "Is that correct?";
    			if(select("- Yes:- No") - 1) close;
    			setarray $item[getarraysize($item)],1,@amount;
    		}
    		break;
    		
    		case 2:
    		mes .n$;
    		if(getarraysize($item) < 1) {
    			mes "There is no Freebie to remove.";
    			mes "Please add one first :D.";
    			close;
    		}
    		mes "Please choose the freebie you want to remove:";
    		mes "Format: Name (Current Amount)";
    		next;
    		set @r_list$,"";
    		for ( set .@e,0; .@e < getarraysize($item); set .@e,.@e + 2)
    			set @r_list$,@r_list$ + "- "+( ($item[.@e] != 1)?getitemname($item[.@e]):"Zeny")+" ("+$item[.@e+1]+")" + ( ($item[.@e+2])?":":"");
    		
    		set @re,select(@r_list$) - 1;
    		
    		mes .n$;
    		if($item[@re] != 1) mes "Chosen Item: "+ getitemname($item[@re]);
    		mes "Amount: "+ $item[@re+1] + ($item[@re] == 1)?" Zeny":"";
    		mes "Correct?";
    		if(select("- Yes:- No") - 1) close;
    		deletearray $item[@re],2;
    		break;
    		
    		case 3:
    		break;
    	}
    	close;
    	
    	case 3:
    	mes .n$;
    	mes "I will now list the player which recieved their freebies already:";
    	next;
    	mes "Freebies: "+$freebies;
    	close;
    	
    	case 4:
    	mes .n$;
    	mes "This will delete every variables' conent, also your own.";
    	if(select("- Continue:- Stop!") - 1) close;
    	set #free,0;
    	set $freebies,0;
    	deletearray $free_p$[0],getarraysize($free_p$);
    	deletearray $item[0],getarraysize($free);
    	close;
    	
    }
    
    OnInit:
    set .n$,"["+strnpcinfo(1)+"]";
    set .gm,80; // GM Access Level
    // How should be the Item Adding be handled?
    // 0 == via .Free Array > No Ingame Menu
    // 1 == via $item array > InGame Menu
    // Note: You can only use one of these options.
    set .gm_it,1;
    set .requ,0; // Level Requirement?
    set .reb_lvl,0; // When rebirthed is lvl 99/70 required?
    // Freebies:
    // Format: Reward,Amount
    // Reward can be either Item and/or Zeny.
    // For Zeny put "1" and for Item, the ID you want.
    // Amount should be obvious.
    setarray .Free[0],512,10,513,10;
    set .zeny,1; // Use zeny too?
    set .f_limit,100; // Max Freebies to give
    set .free_limit,100; // Max Freebies per player
    set .iam_limit,300; // Max Amount of an Item
    set .z_limit,1000000; // Maximum Zeny (Default: 1m)
    if(.gm_it) end;
    for ( set .@f,0; .@f < getarraysize(.Free); set .@f,.@f + 1)
    	if(!.zeny && .Free[.@f] == 1) {
    		debugmes .n$+": Loading Failed!";
    		debugmes .n$+": Reason: Misconfiguration in the .Free array (Zeny, which isn't allowed).";
    		debugmes .n$+": Solution: Either you allow the usage of Zeny or edit the values to equal or higher than 501 for Item ID's.";
    		set .@error,1;
    		break;
    	}
    if(.@error == 1) disablenpc strnpcinfo(0);
    end;
    }

    As per title above, anyone could help me to insert IP checker which is only allowed only 1 IP per freebies. Othwerise this script are perfect and only to put the IP Checker and can be used into all server. Thx to creator @llchrisll

     

  10. On 3/7/2021 at 8:03 AM, Rivers said:

    You're missing the following in your ClientInfo.xml:
     

    
    	<patchserver>
    	<type>thor</type>
    	<http>http://website.com/patcher/plist.txt</http>
    	<ftp>http://website.com/patcher/data/</ftp>
    	<grf>custom.grf</grf>
    	<inf>updates.dat</inf>

     

    Sir is this thing are required?..?
    Since my test ro not using thor but i think im using neoncube instead.
    And for the data.grf and rdata.grf which come together with the KRO, are those need to be inserted together into the main file?

  11. 7 hours ago, Chaos92 said:

    did u try using admin/GM accounts?

    for normal player, u need to add that commands in groups.conf same as how you add another commands for example go, warp, etc.

    Make sure you already recompile or build the src again.

    Damn im forgot to compile lol after updating.. what a brilliant ... Hahahaha im gonna do it tonight and no wonder it show that kind of error.. damn it.. sry for the cursed.. im just forgot to compiling things. Hahahahaaha

    Edit
    Youre right @Chaos92, i just need to recompile back again.. Hahahah thx for pointing me out.

  12. 8 hours ago, Chaos92 said:

    Since you're updating rathena to latest, why not just use the latest one .

    You can copy it from here : https://github.com/rathena/rathena/blob/master/npc/merchants/refine.txt

    Thank you sir for help me out,but it seems like its still not work. Im updating to the latest which is thiis script also the latest from github.. I already make comparison and it seem like refine(ui) were not like known command or missing undeclared function.

     

    I think there were something to do with the update itself which is make the command of refine(ui) were unrecognizable. Or somekind of bug which is still not not everyone encounter it.

  13. Sorry for the late reply but for now im out of town, i will be back to test these solution and im very grateful to have ppl like you all to help me out. Thx again ya. I will update the result soon 

     

    It seems like the trouble were split into 3 which is 2 already solve by renove the rest of zero. Or now i think im gonna try to check the script and update it to the latest and reconfigure back again in order to see if its work.

  14. 13 minutes ago, Mael said:
    
    /===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6c
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //= 1.6c Replaced function 'A_An' with "F_InsertArticle".
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //  ADD YOUR NPC HERE
    //============================================================
    prontera,142,227,6	script	HatMaker#1	562,{ callfunc "qshop"; }
    // prontera,165,203,6	script	Quest Shop#2	998,{ callfunc "qshop",1,2; }	// call the shop 1 and 2 defined below
    // etc.. Add your Shop NPCs 'Quest Shop#XXX' here
    //============================================================
    
    
    // Script Core - DO NOT DUPLICATE THIS NPC !!!!!!!!!!!!!
    //============================================================
    -	script	quest_shop	-1,{
    function Add; function Chk; function Slot;
    OnInit:
    	freeloop(1);
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
    	set .Announce,1;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .ShowID,0;  	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    	set .MaxStack,100;	// Max number of quest items purchased at one time.
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //	setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
    	setarray .Points$[0],
    		"#CASHPOINTS", "Cash Points";
    
    
    //=====================================================================================
    // ------------------- ADD YOUR SHOPS NAME AND ITEMS SHOPS STARTING HERE --------------
    //=====================================================================================
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //	setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
    	setarray .Shops$[1],
    		"Headgears Top,Mid,Bottom",	// Shop Named 1
    		//"Weapons",		// Shop Named 2
    		//"Other";		// Shop Named 3
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //	Add(<shop ID>,<reward ID>,<reward amount>,
    //	    <Zeny cost>,<point cost>,
    //	    <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    
    // Shop 1
    	Add(1,5074,1,20000,0,2286,1,2254,1);
    	Add(1,2284,1,0,0,923,20);
    	Add(1,5174,1,0,0,7445,7,7446,7,7447,7,7448,7,945,300,975,1,733,5,7166,50);
    	Add(1,5277,1,0,0,5278,1,508,200);
    	Add(1,2237,1,0,0,1020,100,983,1,2241,1);
    	Add(1,5147,1,0,0,2227,1,978,1,1057,100);
    	Add(1,5057,1,10000,0,2213,1,983,1,914,200);
    	Add(1,5076,1,0,0,2227,1,7038,500);
    	Add(1,5235,1,0,0,2227,1,7038,500,982,1,983,1);
    	Add(1,5237,1,0,0,2227,1,7038,500,975,1,982,1);
    	Add(1,5065,1,0,0,624,1,959,300,544,50,1023,1);
    	Add(1,5052,1,0,0,2211,1,978,1,7003,300);
    	Add(1,2296,1,50000,0,2243,1,999,100);
    	Add(1,5129,1,0,0,604,1,916,1);
    	Add(1,5102,1,0,0,7263,2,2276,1,2239,1,568,150);
    	Add(1,5040,1,0,0,7047,100);
    	Add(1,5109,50000,0,0,10015,1,10007,1,5023,1,975,1);
    	Add(1,5016,1,0,0,1030,10,0,0,0,0,0,0);
    	Add(1,5110,1,0,0,526,2,7270,1,941,1,10004,1);
    	Add(1,5169,1,0,0,706,1,1019,500,7200,10,1049,20,7165,500,1054,2,1024,100);
    	Add(1,5034,1,0,0,2233,1,746,20);
    	Add(1,2214,1,0,0,949,100,706,1,722,1,2213,1);
    	Add(1,5105,1,0,0,2288,1,1095,3000);
    	Add(1,5080,1,0,0,10006,1,714,1,969,3);
    	Add(1,5024,1,0,0,529,10,530,5,539,20,999,10,538,15);
    	Add(1,5028,1,0,0,2279,1,7035,50,526,100);
    	Add(1,5184,1,0,0,5120,5,995,50,983,1,720,50);
    	Add(1,5359,1,0,0,2284,1,5019,1,975,1);
    	Add(1,5214,1,0,0,976,1,1060,300,1022,100,5008,5);
    	Add(1,5026,1,0,0,1036,450,949,330,539,120,982,1);
    	Add(1,5142,1,0,0,5017,1,2229,1,5014,1,7209,100,7123,100,1036,100,979,1);
    	Add(1,5283,1,0,0,949,200,916,100,7063,20,925,1);
    	Add(1,5260,1,0,0,4293,1,538,100,530,100,529,50);
    	Add(1,5075,1,0,0,2248,1,7030,108,7194,108,7120,4);
    	Add(1,5048,1,0,0,5041,1,999,10);
    	Add(1,5036,1,0,0,2608,1,7069,500);
    	Add(1,5135,1,0,0,2295,1,969,1,975,1,999,5);
    	Add(1,5181,1,0,0,7511,100,7340,200,7023,10);
    	Add(1,5108,1,5000,0,7301,1887,5114,1,611,10);
    	Add(1,5038,1,0,0,1038,600,7048,40);
    
    // Shop 2
    	Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
    	Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
    
    // Shop 3
    	Add(3,531,1,3,0,512,1,713,1);
    	Add(3,532,1,3,0,513,1,713,1);
    	Add(3,533,1,3,0,514,1,713,1);
    	Add(3,534,1,3,0,515,1,713,1);
    
    // -----------------------------------------------------------
    
    //=====================================================================================
    // ------------------- YOUR SHOPS AND ITEMS SHOPS HAVE BEEN ADDED ---------------------
    //=====================================================================================
    
    	freeloop(0);
    	set .menu$,"";
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
    		set .menu$, .menu$+.Shops$[.@i]+":";
    		npcshopdelitem "qshop"+.@i,909;
    	}
    	end;
    
    OnMenu:
    	set .@size, getarraysize(@i);
    	if (!.@size) set @shop_index, select(.menu$);
    	else if (.@size == 1) set @shop_index, @i[0];
    	else {
    		for(set .@j,0; .@j<.@size; set .@j,.@j+1)
    			set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
    		set @shop_index, @i[select(.@menu$)-1];
    	}
    	deletearray @i[0],getarraysize(@i);
    	if (.Shops$[@shop_index] == "") {
    		message strcharinfo(0),"An error has occurred.";
    		end;
    	}
    	dispbottom "Select one item at a time.";
    	callshop "qshop"+@shop_index,1;
    	npcshopattach "qshop"+@shop_index;
    	end;
    
    OnBuyItem:
    	// .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
    	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
    	copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0]));
    	set .@q[2],.@q[1]*.@q[3];
    	if (!.@q[2] || .@q[2] > 30000) {
    		message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+".";
    		end;
    	}
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	disable_items;
    	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
    	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
    	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    	next;
    	setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
    	if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT)))
    		set .@preview,1;
    	addtimer 1000, strnpcinfo(0)+"::OnEnd";
    	while(1) {
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
    		case 1:
    			if (@qe[0]) {
    				mes "[Quest Shop]";
    				mes "You're missing one or more quest requirements.";
    				close;
    			}
    			if (!checkweight(.@q[0],.@q[2])) {
    				mes "[Quest Shop]";
    				mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    				close;
    			}
    			if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
    			if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
    			if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    				delitem .@q[.@i],.@q[.@i+1]*.@q[1];
    			getitem .@q[0],.@q[2];
    			if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):callfunc("F_InsertArticle",getitemname(.@q[0])))+"!",0;
    			specialeffect2 EF_FLOWERLEAF;
    			close;
    		case 2:
    			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
    			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
    			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
    			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
    			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
    			break;
    		case 3:
    			close;
    		}
    	}
    
    OnEnd:
    	if (@qe[7]) {
    		changelook LOOK_HEAD_BOTTOM, @qe[3];
    		changelook LOOK_HEAD_TOP, @qe[4];
    		changelook LOOK_HEAD_MID, @qe[5];
    		changelook LOOK_ROBE, @qe[6];
    	}
    	deletearray @qe[0],8;
    	end;
    
    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }
    
    function Chk {
    	if (getarg(0) < getarg(1)) {
    		set @qe[0],1;
    		return "^FF0000";
    	} else
    		return "^00FF00";
    }
    
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot) {
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$;
    	}
    }
    }
    
    function	script	qshop	{
    	deletearray @i[0],getarraysize(@i);
    	for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
    		set @i[.@i],getarg(.@i);
    	doevent "quest_shop::OnMenu";
    	end;
    }
    
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	qshop1	-1,909:-1
    -	shop	qshop2	-1,909:-1
    -	shop	qshop3	-1,909:-1
    -	shop	qshop4	-1,909:-1
    -	shop	qshop5	-1,909:-1

     

     

    Sry sir im still dont get it... and i already copy the whole script you show me and test but the error still shown.

  15. 9 hours ago, Radian said:

    You need to post the script that you are using now its hard to pin point which part is giving you an issue, as i can see its part of quest requirements.

    Noted sir. Hold on while im trying to copy the whole script.
    Here we are

     

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6c
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //= 1.6c Replaced function 'A_An' with "F_InsertArticle".
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //  ADD YOUR NPC HERE
    //============================================================
    prontera,142,227,6	script	HatMaker#1	562,{ callfunc "qshop"; }
    // prontera,165,203,6	script	Quest Shop#2	998,{ callfunc "qshop",1,2; }	// call the shop 1 and 2 defined below
    // etc.. Add your Shop NPCs 'Quest Shop#XXX' here
    //============================================================
    
    
    // Script Core - DO NOT DUPLICATE THIS NPC !!!!!!!!!!!!!
    //============================================================
    -	script	quest_shop	-1,{
    function Add; function Chk; function Slot;
    OnInit:
    	freeloop(1);
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
    	set .Announce,1;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .ShowID,0;  	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    	set .MaxStack,100;	// Max number of quest items purchased at one time.
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //	setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
    	setarray .Points$[0],
    		"#CASHPOINTS", "Cash Points";
    
    
    //=====================================================================================
    // ------------------- ADD YOUR SHOPS NAME AND ITEMS SHOPS STARTING HERE --------------
    //=====================================================================================
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //	setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
    	setarray .Shops$[1],
    		"Headgears Top,Mid,Bottom",	// Shop Named 1
    		//"Weapons",		// Shop Named 2
    		//"Other";		// Shop Named 3
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //	Add(<shop ID>,<reward ID>,<reward amount>,
    //	    <Zeny cost>,<point cost>,
    //	    <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    
    // Shop 1
    	Add(1,5074,1,20000,0,2286,1,2254,1);
    	Add(1,2284,1,0,0,923,20);
    	Add(1,5174,1,0,0,7445,7,7446,7,7447,7,7448,7,945,300,975,1,733,5,7166,50);
    	Add(1,5277,1,0,0,5278,1,508,200);
    	Add(1,2237,1,0,0,1020,100,983,1,2241,1);
    	Add(1,5147,1,0,0,2227,1,978,1,1057,100);
    	Add(1,5057,1,10000,0,2213,1,983,1,914,200);
    	Add(1,5076,1,0,0,2227,1,7038,500);
    	Add(1,5235,1,0,0,2227,1,7038,500,982,1,983,1);
    	Add(1,5237,1,0,0,2227,1,7038,500,975,1,982,1);
    	Add(1,5065,1,0,0,624,1,959,300,544,50,1023,1);
    	Add(1,5052,1,0,0,2211,1,978,1,7003,300);
    	Add(1,2296,1,50000,0,2243,1,999,100);
    	Add(1,5129,1,0,0,604,1,916,1);
    	Add(1,5102,1,0,0,7263,2,2276,1,2239,1,568,150);
    	Add(1,5040,1,0,0,7047,100);
    	Add(1,5109,50000,0,0,10015,1,10007,1,5023,1,975,1);
    	Add(1,5016,1,0,0,1030,10,0,0,0,0,0,0);
    	Add(1,5110,1,0,0,526,2,7270,1,941,1,10004,1);
    	Add(1,5169,1,0,0,706,1,1019,500,7200,10,1049,20,7165,500,1054,2,1024,100);
    	Add(1,5034,1,0,0,2233,1,746,20);
    	Add(1,2214,1,0,0,949,100,706,1,722,1,2213,1);
    	Add(1,5105,1,0,0,2288,1,1095,3000);
    	Add(1,5080,1,0,0,10006,1,714,1,969,3);
    	Add(1,5024,1,0,0,529,10,530,5,539,20,999,10,538,15);
    	Add(1,5028,1,0,0,2279,1,7035,50,526,100);
    	Add(1,5184,1,0,0,5120,5,995,50,983,1,720,50);
    	Add(1,5359,1,0,0,2284,1,5019,1,975,1);
    	Add(1,5214,1,0,0,976,1,1060,300,1022,100,5008,5);
    	Add(1,5026,1,0,0,1036,450,949,330,539,120,982,1);
    	Add(1,5142,1,0,0,5017,1,2229,1,5014,1,7209,100,7123,100,1036,100,979,1);
    	Add(1,5283,1,0,0,949,200,916,100,7063,20,925,1);
    	Add(1,5260,1,0,0,4293,1,538,100,530,100,529,50);
    	Add(1,5075,1,0,0,2248,1,7030,108,7194,108,7120,4);
    	Add(1,5048,1,0,0,5041,1,999,10);
    	Add(1,5036,1,0,0,2608,1,7069,500);
    	Add(1,5135,1,0,0,2295,1,969,1,975,1,999,5);
    	Add(1,5181,1,0,0,7511,100,7340,200,7023,10);
    	Add(1,5108,1,5000,0,7301,1887,5114,1,611,10);
    	Add(1,5038,1,0,0,1038,600,7048,40);
    	Add(1,5229,1,0,0,1038,600,7048,40,982,1,983,1);
    	Add(1,5227,1,0,0,1038,600,7048,40,975,1);
    	Add(1,5228,1,0,0,1038,600,7048,40,982,1);
    	Add(1,5186,1,0,0,1032,100,7100,100,905,250);
    	Add(1,5091,1,20000,0,10016,1,714,1,969,3);
    	Add(1,5082,1,0,0,921,300);
    	Add(1,2273,1,3500,0,2275,1,998,50,733,1);
    	Add(1,5198,1,0,0,5058,1,2214,1,949,500,914,200,622,50,1974,1);
    	Add(1,5058,1,0,0,2233,1,983,1,7206,300,7030,1);
    	Add(1,5233,1,0,0,2233,1,983,1,7206,300,7030,1,978,1);
    	Add(1,5232,1,0,0,2233,1,983,1,7206,300,7030,1,982,1,975,1);
    	Add(1,5234,1,0,0,2233,1,983,1,7206,300,7030,1,976,1);
    	Add(1,5253,1,0,0,1034,300,7445,30,5141,10,979,1);
    	Add(1,5252,1,0,0,5058,1,1022,250,7267,100);
    	Add(1,2283,1,0,0,724,1,5001,1,949,200);
    	Add(1,5243,1,0,0,975,1,976,1,914,100,7441,150,7065,25,2283,1);
    	Add(1,5259,1,0,0,978,1,7561,100,949,500,1026,200);
    	Add(1,5205,1,0,0,5185,1,610,100,706,25,7194,113);
    	Add(1,5068,1,20000,0,2255,1,2286,1);
    	Add(1,5304,1,0,0,7017,2,2510,1,983,1);
    	Add(1,5207,1,0,0,2282,5,2254,2,969,1,7063,15);
    	Add(1,5333,1,0,0,996,4,12028,1,12032,1,992,10,5011,1);
    	Add(1,5379,1,0,0,5061,2,978,1,2270,2,5083,1,1059,150);
    	Add(1,5416,1,0,0,746,20,7097,12,587,20,2717,1);
    	Add(1,5401,1,0,0,5288,1,983,1);
    	Add(1,5404,1,0,0,5187,1,1034,70,7441,10,978,10);
    	Add(1,5429,1,0,0,5100,1,1021,30,7268,1);
    	Add(1,5338,1,0,0,5100,1,7112,25,561,1);
    	Add(1,5300,1,0,0,7106,2,2246,1,7263,1);
    	Add(1,5414,1,100000000,0,7300,9,1068,4,7098,2);
    	Add(1,5307,1,0,0,2275,5,514,2,979,1,634,1,619,20,1027,20);
    	Add(1,5131,1,0,0,5128,1,969,10,978,1,985,27);
    	Add(1,5369,1,0,0,5191,6,7205,25,558,3,2210,1,7441,5);
    	Add(1,5313,1,0,0,5124,1,2249,1,5007,1,523,200);
    	Add(1,5292,1,0,0,7266,2,1035,4,10001,1);
    	Add(1,5396,1,0,0,5058,1,980,1,1022,53);
    	Add(1,5146,1,0,0,978,1,949,500,1019,1);
    	Add(1,5282,1,0,0,5200,1,982,1,978,2);
    	Add(1,5247,1,0,0,1039,60,923,25,2255,1);
    	Add(1,5210,1,0,0,2254,10,7063,50,7168,200,7038,200);
    	Add(1,5047,1,0,0,2271,1,975,1);
    	Add(1,5170,1,0,0,5172,1,7063,100,982,1);
    	Add(1,5380,1,0,0,5065,2);
    	Add(1,5303,1,0,0,712,100,710,5,629,5,10009,1);
    	Add(1,5302,1,0,0,7553,2,982,1,7771,1);
    	Add(1,5056,1,0,0,5079,1,578,100);
    	Add(1,5390,1,0,0,2236,2,978,1,1034,50,2294,2);
    	Add(1,5144,1,0,0,2214,1,2221,1,7567,25,1001,200);
    	Add(1,5063,1,0,0,970,1,930,500);
    	Add(1,5021,1,0,0,2233,1,969,1,999,20,949,80,938,800);
    	Add(1,5179,1,0,0,2234,1,969,3,2610,4,13106,2);
    	Add(1,5176,1,0,0,706,1,1019,500,7200,10,7015,20,2267,1,952,100,1028,100);
    	Add(1,5001,1,0,0,999,40,984,1,970,1,1003,1);
    	Add(1,5031,1,0,0,7013,1200);
    	Add(1,5061,1,20000,0,2269,1,999,10);
    	Add(1,5139,1,0,0,5085,1,710,5,7510,1,975,1);
    	Add(1,5070,1,0,0,7216,300,7097,300,2211,1,982,1);
    	Add(1,5071,1,10000,0,5010,1,5049,1,7101,10);
    	Add(1,5173,1,0,0,7445,7,7446,7,7447,7,7478,7,945,300,983,1,733,5,2221,1);
    	Add(1,5321,1,0,0,2275,2,2211,2,7215,4,7217,20);
    	Add(1,2240,1,0,0,1040,2,982,2,949,4,7457,1);
    	Add(1,5405,1,0,0,7441,45,949,80,916,100);
    	Add(1,5424,1,0,0,980,1,620,1,605,50,985,200);
    	Add(1,5425,1,0,0,981,1,533,1,605,50,985,200);
    	Add(1,5276,1,0,0,2261,1,914,200,983,1,976,1,975,1);
    	Add(1,5156,1,0,0,2265,10,982,1);
    	Add(1,5154,1,0,0,2202,1,7020,5);
    	Add(1,5155,1,0,0,7024,10,7754,2,7562,4,7450,1);
    	Add(1,5018,1,500,0,2247,1,916,300);
    	Add(1,5403,1,0,0,1023,1,544,5,579,1);
    	Add(1,5317,1,0,0,5120,1,2290,1,938,4);
    	Add(1,5269,1,0,0,5203,4,7063,60,2210,1);
    	Add(1,5334,1,0,0,5132,1,1971,20,7093,4,2659,1);
    	Add(1,5400,1,0,0,1022,20,1234,2);
    	Add(1,5339,1,0,0,5100,1,7112,25,1558,1);
    	Add(1,5361,1,0,0,7216,200);
    	Add(1,5346,1,0,0,5100,1,7112,25,558,1);
    	Add(1,5433,1,0,0,5185,1,969,2);
    	Add(1,5262,1,0,0,5164,1,7799,1,7578,1,969,3);	
    	Add(1,5273,1,0,0,2261,1,914,200,982,1,975,1,979,1);
    	Add(1,5319,1,0,0,5035,1,5074,1,978,1);
    	Add(1,5314,1,0,0,7567,200,5102,1);
    	Add(1,5383,1,0,0,5200,1,979,1,7445,50);
    	Add(1,5423,1,5000000,0,736,300,5074,1,994,1);
    	Add(1,5209,1,0,0,5147,1,976,1);
    	Add(1,5396,1,0,0,5430,1,5285,1,7262,20,5396,1);
    	Add(1,5371,1,0,0,5016,1,1004,35);
    	Add(1,5426,1,0,0,5027,1,976,5);
    	Add(1,5322,1,0,0,10019,1,982,2);
    	Add(1,5291,1,0,0,7323,100,969,20);
    	Add(1,5372,1,0,0,5099,1,5230,1,2747,5,982,15);
    	Add(1,5311,1,0,0,5139,5);
    	Add(1,5418,1,0,0,5016,1,2261,1,968,1,975,5,1004,35);
    	Add(1,5422,1,500000,0,1550,3,1006,20);
    	Add(1,5803,1,0,0,2215,3,2210,2,5061,1,10009,1);
    	Add(1,5393,1,777777,0,2285,5,994,10,7097,25);
    	Add(1,5365,1,0,0,574,150,7031,150);
    	Add(1,5143,1,0,0,5090,1,1020,300,975,1,982,1);
    	Add(1,5020,1,0,0,2215,1,2210,1,7063,20);
    	Add(1,5069,1,0,0,1022,99);
    	Add(1,5185,1,0,0,5061,1,712,100,7194,150,7298,100,520,50,521,50);
    	Add(1,5177,1,0,0,706,1,1019,500,7200,10,1049,500,1053,2,980,1);
    	Add(1,5084,1,0,0,1026,1000,7065,100,945,100,7030,1);
    	Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
    	Add(1,5241,1,0,0,2252,1,1036,400,7001,50,4052,1,978,1);
    	Add(1,5240,1,0,0,2252,1,1036,400,7001,50,4052,1,982,1,983,1);
    	Add(1,5238,1,0,0,2252,1,1036,400,7001,50,4052,1,975,1);
    	Add(1,5239,1,0,0,2252,1,1036,400,7001,50,4052,1,982,1);
    	Add(1,5242,1,0,0,2252,1,1036,400,7001,50,4052,1,976,1);
    	Add(1,5054,1,0,0,2252,1,1054,450,943,1200);
    	Add(1,5187,1,0,0,5085,1,5091,1,5117,2,978,1,975,1);
    	Add(1,5138,1,0,0,5123,1,5027,1,7337,50,981,1);
    	Add(1,5099,1,0,0,7267,300,7171,300,1029,5);
    	Add(1,5031,1,0,0,5009,1,5028,1,747,1,999,25);
    	Add(1,5081,1,40000,0,2249,1,714,1,969,3);
    	Add(1,5073,1,0,0,2285,1,1550,1);
    	Add(1,5117,1,50000,0,731,10,748,2,982,1);
    	Add(1,5183,1,0,0,604,100,916,100,7115,100);
    	Add(1,5151,1,0,0,5001,1,978,1,991,200);
    	Add(1,2281,1,5000,0,998,20,707,1);
    	Add(1,5043,1,0,0,2281,1,1048,50);
    	Add(1,5094,1,0,0,968,100,2299,1,1124,1,931,1000);
    	Add(1,5078,1,0,0,5033,1,5064,1);
    	Add(1,5004,1,0,0,701,5);
    	Add(1,5275,1,0,0,2261,1,914,200,975,1,976,1,981,1);
    	Add(1,5389,1,0,0,5043,5,969,10,7568,50);
    	Add(1,5323,1,0,0,5081,3,7754,1,2128,1);
    	Add(1,5806,1,0,0,2280,1,7479,1,2109,1);
    	Add(1,5807,1,0,0,5416,1,2211,2,949,100);
    	Add(1,5370,1,0,0,5302,1,981,5);
    	Add(1,5060,1,0,0,2236,1,7151,100,7111,100);
    	Add(1,5299,1,0,0,7441,20,949,50,916,15,7115,10,7440,20,7063,10,7200,10,2214,1);
    	Add(1,5023,1,0,0,1059,150,907,100,978,1);
    	Add(1,5286,1,0,0,2254,2,7101,200,2210,2,7510,10);
    	Add(1,5271,1,0,0,2254,1,723,1,7301,20,999,50,978,1);
    	Add(1,5202,1,0,0,5035,1,1062,100,535,80);
    	Add(1,5182,1,0,0,5008,10,5118,1,1060,100,2210,1);
    	Add(1,5213,1,0,0,2214,1,983,1,7063,30);
    	Add(1,5033,1,0,0,1036,20,2213,1,7065,300,7012,200);
    	Add(1,5039,1,0,0,7030,50,978,1,5015,1);
    	Add(1,5288,1,0,0,5047,1,2276,1);
    	Add(1,5211,1,0,0,5045,1,5083,1,7063,40,7553,1,982,1,975,1);
    	Add(1,5208,1,0,0,1550,1,1553,7,1556,7,1554,7,1557,7,1555,7,7015,30);
    	Add(1,5083,1,0,0,2244,1,2209,1,10007,1);
    	Add(1,2280,1,10000,0,1019,120);
    	Add(1,5067,1,0,0,5062,1,952,50,1907,1);
    	Add(1,5149,1,0,0,2234,1,714,5,2611,25);
    	Add(1,5064,1,0,0,945,600,7030,1);
    	Add(1,2278,1,0,0,705,10,909,10,914,10);
    	Add(1,5203,1,0,0,2278,1,1015,1,999,5);
    	Add(1,5212,1,0,0,1820,2,5011,1,2651,1,4125,1);
    	Add(1,5257,1,0,0,5074,1,2282,1,7064,10,969,5);
    	Add(1,5029,1,0,0,7068,300,7033,850,1015,1);
    	Add(1,2272,1,911000,0,1019,50,983,1);
    	Add(1,5062,1,0,0,2280,1,7197,300,7150,300);
    	Add(1,5049,1,0,0,1099,1500);
    	Add(1,5287,1,0,0,5062,1,5348,1,978,1);
    	Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600);
    	Add(1,5103,1,0,0,5351,1,10011,1);
    	Add(1,5059,1,0,0,5030,1,7213,100,7217,100,7161,300);
    	Add(1,5107,1,0,0,519,50,7031,50,548,50,539,50);
    	Add(1,5077,1,0,0,2278,1,975,1);
    	Add(1,5337,1,0,0,5100,1,7112,25,2617,1);
    	Add(1,5358,1,0,0,2286,1,7101,30);
    	Add(1,5152,1,0,0,2254,1,724,1,7301,20,999,50,978,1);
    	Add(1,5415,1,0,0,5255,1,5024,1);
    	Add(1,5409,1,0,0,5075,1,7101,5,981,10);
    	Add(1,5051,1,0,0,7047,100);
    	Add(1,5293,1,0,0,577,20,7134,1,581,3,7454,2,7455,2,6033,2,6022,2);
    	Add(1,5801,1,0,0,5083,1,2700,12,7566,12,7562,12,2357,3);
    	Add(1,5320,1,0,0,5205,1,1009,50,2111,1);
    	Add(1,5354,1,0,0,5431,1,12080,1,1629,1);
    	Add(1,5811,1,0,0,985,100,2241,10);
    	Add(1,5355,1,0,0,7166,100,1059,200);
    	Add(1,5243,1,0,0,7446,1,2339,10,1059,70);
    	Add(1,5310,1,0,0,5034,1,1971,2,996,6);
    	Add(1,5261,1,0,0,5164,1,714,25,2611,50,7799,4);
    	Add(1,5388,1,0,0,1048,50,926,50);
    	Add(1,5412,1,0,0,530,20,7035,10);
    	Add(1,5098,1,0,0,1029,10,2297,5,7267,50);
    	Add(1,5430,1,50000000,0,5414,1,7135,10,7451,4);
    	Add(1,5384,1,0,0,5390,1,975,1);
    	Add(1,5316,1,0,0,2226,1,622,10);
    	Add(1,5289,1,0,0,526,200,7268,1);
    	Add(1,5805,1,0,0,5161,1);
    	Add(1,5301,1,0,0,5191,3,5195,3);
    	Add(1,5345,1,0,0,5137,1,5195,2,1060,45);
    	Add(1,5411,1,0,0,5388,1,982,5,7263,2,978,2);
    	Add(1,5368,1,0,0,5197,6,7751,25,561,3,2210,1,7063,20);
    	Add(1,5079,1,0,0,2294,1,7220,400);
    	Add(1,5256,1,0,0,7510,1,2210,1,7063,50);
    	Add(1,5285,1,0,0,7192,200,10011,1);
    	Add(1,5357,1,0,0,7510,20);
    	Add(1,5188,1,0,0,5027,1,7166,50,7064,1);
    	Add(1,2292,1,2000,0,999,50);
    	Add(1,5294,1,0,0,7019,5,7567,50);
    	Add(1,5115,1,50000,0,983,1,7267,99,749,1);
    	Add(1,5284,1,0,0,5302,1,975,1,982,1,5165,1);
    	Add(1,5050,1,0,0,5037,1,7064,500);
    	Add(1,5206,1,0,0,2269,1,982,1);
    	Add(1,5278,1,0,0,2210,1,5192,1,2250,1);
    	Add(1,5121,1,0,0,7263,1,660,1,7099,30,7315,369);
    
    // Shop 2
    	Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
    	Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
    
    // Shop 3
    	Add(3,531,1,3,0,512,1,713,1);
    	Add(3,532,1,3,0,513,1,713,1);
    	Add(3,533,1,3,0,514,1,713,1);
    	Add(3,534,1,3,0,515,1,713,1);
    
    // -----------------------------------------------------------
    
    //=====================================================================================
    // ------------------- YOUR SHOPS AND ITEMS SHOPS HAVE BEEN ADDED ---------------------
    //=====================================================================================
    
    	freeloop(0);
    	set .menu$,"";
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
    		set .menu$, .menu$+.Shops$[.@i]+":";
    		npcshopdelitem "qshop"+.@i,909;
    	}
    	end;
    
    OnMenu:
    	set .@size, getarraysize(@i);
    	if (!.@size) set @shop_index, select(.menu$);
    	else if (.@size == 1) set @shop_index, @i[0];
    	else {
    		for(set .@j,0; .@j<.@size; set .@j,.@j+1)
    			set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
    		set @shop_index, @i[select(.@menu$)-1];
    	}
    	deletearray @i[0],getarraysize(@i);
    	if (.Shops$[@shop_index] == "") {
    		message strcharinfo(0),"An error has occurred.";
    		end;
    	}
    	dispbottom "Select one item at a time.";
    	callshop "qshop"+@shop_index,1;
    	npcshopattach "qshop"+@shop_index;
    	end;
    
    OnBuyItem:
    	// .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
    	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
    	copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0]));
    	set .@q[2],.@q[1]*.@q[3];
    	if (!.@q[2] || .@q[2] > 30000) {
    		message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+".";
    		end;
    	}
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	disable_items;
    	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
    	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
    	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    	next;
    	setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
    	if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT)))
    		set .@preview,1;
    	addtimer 1000, strnpcinfo(0)+"::OnEnd";
    	while(1) {
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
    		case 1:
    			if (@qe[0]) {
    				mes "[Quest Shop]";
    				mes "You're missing one or more quest requirements.";
    				close;
    			}
    			if (!checkweight(.@q[0],.@q[2])) {
    				mes "[Quest Shop]";
    				mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    				close;
    			}
    			if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
    			if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
    			if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    				delitem .@q[.@i],.@q[.@i+1]*.@q[1];
    			getitem .@q[0],.@q[2];
    			if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):callfunc("F_InsertArticle",getitemname(.@q[0])))+"!",0;
    			specialeffect2 EF_FLOWERLEAF;
    			close;
    		case 2:
    			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
    			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
    			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
    			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
    			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
    			break;
    		case 3:
    			close;
    		}
    	}
    
    OnEnd:
    	if (@qe[7]) {
    		changelook LOOK_HEAD_BOTTOM, @qe[3];
    		changelook LOOK_HEAD_TOP, @qe[4];
    		changelook LOOK_HEAD_MID, @qe[5];
    		changelook LOOK_ROBE, @qe[6];
    	}
    	deletearray @qe[0],8;
    	end;
    
    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }
    
    function Chk {
    	if (getarg(0) < getarg(1)) {
    		set @qe[0],1;
    		return "^FF0000";
    	} else
    		return "^00FF00";
    }
    
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot) {
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$;
    	}
    }
    }
    
    function	script	qshop	{
    	deletearray @i[0],getarraysize(@i);
    	for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
    		set @i[.@i],getarg(.@i);
    	doevent "quest_shop::OnMenu";
    	end;
    }
    
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	qshop1	-1,909:-1
    -	shop	qshop2	-1,909:-1
    -	shop	qshop3	-1,909:-1
    -	shop	qshop4	-1,909:-1
    -	shop	qshop5	-1,909:-1


     

  16. 10 hours ago, Mael said:

    1. Deactivate the roulette or add items to it: 

    https://github.com/rathena/rathena/blob/master/conf/battle/feature.conf#L68

    https://rathena.org/board/topic/111706-how-to-enable-roullete/#comment-328097

    2. Increase your event_queue to 10:

    https://github.com/rathena/rathena/blob/master/src/map/map.hpp#L49

    3. I think we can't help you without knowing the script.

    Thank you sir for you kindness answer and for no 3 i think it was came from euphys quest shop because im adding some extra things in there long time ago and im reused this script again in my test ro.. I will show the script here tonight for easy help from our members.

  17. Greetings everyone. Its been a century since the last time i've been here. Just a 3 simple questions. According to the picture.



    1) How to solve error like shown below ?

    268572876_Error1.png.1effd5e98ea1bec8a25a54460bf6050f.png



    2) How to solve error like shown below ?

    1298300733_Error2.png.a83ce54844fb5737dfccf8c64c1c8278.png





    3) How to solve error like shown below ?

    53152720_Error3.png.4feb3571703155c929ed02a7de74c1da.png






    Any help even to solving 1 problem,are very helpful to me.
    Thanks in advance.

     

  18. On 4/3/2018 at 12:43 PM, philfix.sai said:

    We already given you the solution, then why insist to search for another?

    All you need to do is to download the GRF below then extract it on your data folder using grf tool then use a grf builder to recreate your GRF then all is well.

    If you are lazy to do the above instructions just download the GRF then put it on your ragnarok folder, edit your data.ini then insert it.
    (mic drop) LoL.

    DATA.ini
    0=yourgrf.grf
    1=C_Angel_Fluttering.grf
    2=rdata.grf
    3=data.grf

    Just perfect and i already solve those century's ago..
    What i asked for was how to get OTHERS grf that contain other data sprite?
     

×
×
  • Create New...