After editing the 25,000z for being a treasure hunter i changed it into 100m in the script and in the THQ_TTSHOP script i removed some items there and added some.. now i got the problem when opening the Token Shop it says in the server
also i tried putting back the original script it still reads the script items i added in the token shops and still cant open some shop menu... T_T
THQS_TTshop.txt
//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.2a
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
//= Event_THQS - Used to check if you have already registered
//= #Treasure_Token - used to keep track of tokens
//= 1.0 - Straight conversion of Aegis NPC file
//= 1.1 - balanced some prices, fixed 1 missing label
//= removed Executioner&Mysteltain swords [Lupus]
//= 1.2 - Optmized and fixed small error [Panikon]
//= 1.2a - Fixed zeny formula [Panikon]
//============================================================
prt_in,159,172,0 warp thqwrp 3,3,yuno_in01,123,155
// Main configuration object
- script THQS#Configuration FAKE_NPC,{
OnInit:
// Axes
setarray $THQS_menu_weapons_1[0], Sabbath, Slaughter, Tomahawk, Great_Axe, Guillotine;
setarray $THQS_menu_price_1[0], 160, 160, 180, 200, 200;
// One Handed Swords
setarray $THQS_menu_weapons_2[0], Edge, Solar_Sword, Scissores_Sword, Nagan, Immaterial_Sword, Excalibur, Byeorrun_Gum, Tale_Fing_;
setarray $THQS_menu_price_2[0], 130, 150, 170, 180, 200, 200, 240, 320;
// Two Handed Swords
setarray $THQS_menu_weapons_3[0],Dragon_Slayer, Schweizersabel, Katzbalger, Muramasa, Masamune;
setarray $THQS_menu_price_3[0], 140,200,300,300,400;
// Books
setarray $THQS_menu_weapons_4[0],Book_Of_Blazing_Sun, Book_Of_Billows, Book_Of_Gust_Of_Wind, Book_Of_Mother_Earth, Book_Of_The_Apocalypse, Bible, Tablet;
setarray $THQS_menu_price_4[0], 80, 80, 80, 80, 80, 90, 120;
// Bows
setarray $THQS_menu_weapons_5[0], Bow_Of_Rudra, Bow_Of_Roguemaster;
setarray $THQS_menu_price_5[0], 150, 150;
// Katars
setarray $THQS_menu_weapons_6[0], Katar_Of_Cold_Icicle,Katar_Of_Thornbush,Katar_Of_Raging_Blaze,Katar_Of_Piercing_Wind,Ghoul_Leg,Infiltrator;
setarray $THQS_menu_price_6[0],70,70,70,70,125,150;
// Knuckles
setarray $THQS_menu_weapons_7[0],Kaiser_Knuckle,Berserk;
setarray $THQS_menu_price_7[0],75,75;
// Maces
setarray $THQS_menu_weapons_8[0],Spike,Slash,Grand_Cross,Quadrille,Mjolnir;
setarray $THQS_menu_price_8[0],65,90,100,110,1000;
// Whips
setarray $THQS_menu_weapons_9[0],Rapture_Rose,Chemeti;
setarray $THQS_menu_price_9[0],50,65;
// Wands
setarray $THQS_menu_weapons_10[0],Mighty_Staff,Wizardy_Staff,Bone_Wand,Staff_Of_Soul;
setarray $THQS_menu_price_10[0],90,150,110,120;
// Cards
setarray $THQS_menu_spec_11[0],Symbol_Of_Sun, Silver_Fancy, Rough_Billows, Slilince_Wave, Anger_Of_Valkurye, Air_Stream,Indication_Of_Tempest,Feather_Of_Angel,Crystal_Of_Snow,Cold_Moonlight,Mystery_Wheel,Golden_Bug_Card,Ghostring_Card,Deviling_Card,Antique_Pipe;
setarray $THQS_menu_price_11[0],300,300,300,300,300,300,300,300,300,300,300,350,350,350,600;
end;
}
// Trades tokens
// getarg(0) - number of tokens to be traded
function script thqs_trade_token {
@type = getarg(0);
if( @type == 4 )
close;
// 10^0, 10^1, 10^2
@type -= 1;
@price = pow(10, @type);
// 10^3, 10^4, 10^5
@type += 3; // So we can use pow later to determine the qt of Zeny
@prize = pow(10, @type);
if( #Treasure_Token < @price ) {
mes "You don't have enough tokens!";
close;
}
if( Zeny == MAX_ZENY ) {
mes "You can't add more zeny to your character";
close;
}
Zeny += @prize;
#Treasure_Token -= @price;
close;
}
// Creates a buying menu
// getarg(0) - .@mw$ -> ID
// getarg(1) - .@mp$ -> PRICE
function script thqs_menu_buy {
if( getargcount() != 2 ) {
debugmes "thqs_menu_buy: Wrong number of arguments!!";
close;
}
.@mw$ = getarg(0);
.@mp$ = getarg(1);
if( getarraysize( getd(.@mw$) ) != getarraysize( getd(.@mp$) ) ) {
debugmes "thqs_menu_buy: Missing entries in data!";
close;
}
// Dynamic menu
// Uses a dynamic string and then applies it to a *select
.@select_menu$ = "";
for( .@i = 0; .@i < getarraysize( getd(.@mw$) ); .@i++ ) {
.@price = getd(.@mp$+"["+.@i+"]");
if( .@select_menu$ != "")
.@select_menu$ = .@select_menu$+":"+getitemname( getd(.@mw$+"["+.@i+"]") )+" - "+.@price+"T";
else
.@select_menu$ = getitemname( getd(.@mw$+"["+.@i+"]") )+" - "+.@price+"T";
}
.@select_menu$ = .@select_menu$ + ":Nevermind";
select(.@select_menu$);
if( @menu == (.@i+1) )
close;
@index = @menu - 1; // Arrays are 0 indexed while our menu is not
@item_id = getd(.@mw$+"["+@index+"]");
@price = getd(.@mp$+"["+@index+"]");
if( #Treasure_Token < @price ) {
mes "You don't have enough tokens!";
close;
}
#Treasure_Token -= @price;
logmes "Treasure Token: Bought a "+getitemname(@item_id);
getitem @item_id,1;
close;
}
// Creates the first weapon menu
// getarg(0) - @menu
function script ths_menu_weapons {
@first_option = getarg(0);
if( @first_option == 11 )
close;
mes "[Ash]";
mes "This is what we have to offer."+@first_option;
next;
// Array names so they can be used by thqs_menu_buy
.@mw$ = "$THQS_menu_weapons_"+@first_option;
.@mp$ = "$THQS_menu_price_"+@first_option;
thqs_menu_buy(.@mw$,.@mp$);
}
// Main script
prt_in,164,174,1 script Treasure Hunter's Shop 1_M_YOUNGKNIGHT,{
mes "[Ash]";
mes "Ahh, "+strcharinfo(PC_NAME)+"! Welcome to the Offical Treasure Hunter's Guild Shop.";
mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!";
next;
switch( select("How does this place work?","What do you have in stock?","Nevermind") ) {
case 1:
mes "[Ash]";
mes "Well you see here you can exchange your treasure hunter tokens for zeny or rare weapons forged by our blacksmiths.";
mes " ";
mes "Everything has its own price value and the only way you can get the tokens is by completing quests assigned to you,the system normally works like this.";
mes " ";
mes "The harder the mission the more Tokens you will earn. All red quests are worth 4-8 Tokens, and the rest are worth 1-5.";
mes " ";
mes "Hope that solves your problem and questions.";
close;
case 2:
break;
case 3:
close;
}
mes "[Ash]";
mes "Ok here is our Big list of goods.";
mes " ";
mes "(Note T stands for a Treasure Token.)";
next;
mes "[Ash]";
mes "This is what we have to offer.";
next;
switch( select("Trade for zeny", "Trade for Weapons", "Trade for Special Items", "Nevermind") ) {
case 1:
select("5000000z - 1T","50000000z - 10T","600000000z - 100T","Nevermind");
thqs_trade_token(@menu);
case 2:
mes "[Ash]";
mes "This is what we have to offer.";
next;
select("Axe's","1 Handed Swords","2 Handed Swords","Book's","Bow's","Katar's","Knuckle's","Mace's","Whips","Wands","Nevermind");
ths_menu_weapons(@menu);
case 3:
mes "[Ash]";
mes "This is what we have to offer.";
next;
thqs_menu_buy("$THQS_menu_spec","$THQS_menu_price_11");
case 4:
close;
}
end;
}
THQS_GuildNPC
//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
//= Event_THQS - Used to check if you have already registered
//= #Treasure_Token - used to keep track of tokens
//============================================================
yuno_in01,124,164,6 script Guild Leader 1_M_PRON_KING,{
mes "[Keegan]";
mes "What brings you here? Have something to say?";
next;
switch (select("I want to be a Treasure Hunter", "Take a New Quest.", "Take me to the Official Shop.", "Nevermind.",N_NVM)) {
case 1:
if (Event_THQS==1)
goto N_AlreadyReg;
mes "[Keegan]";
mes "Well "+strcharinfo(PC_NAME)+" if you want to be a Treasure Hunter first you must.";
mes " ";
mes "^FF00001.^000000 You well be changed ^FF0000100,000,000z^000000 for basic training and your proof of being a member.";
mes " ";
mes "Umm... Well that is all you need to do. Hahaha.";
next;
if (select("Pay ^FF0000100,000,000z^000000.", "Thats way to high!!") != 1) {
mes "[Keegan]";
mes "Well if you can't afford a small ^FF0000100,000,000z^000000 you shouldent be a Treasure Hunter yet.";
close;
}
if (Zeny < 100000000)
goto N_NoZeny;
Zeny -= 100000000;
//getitem 7950, 1;
//getitem 7951, 1;
Event_THQS = 1;
mes "[Keegan]";
mes "Congratulations!";
emotion(e_grat);
next;
mes "[Keegan]";
mes "Welcome to the Guild of Treasure Hunters.";
mes "You may now take a Treasure Hunting Quest as you see fit.";
close;
case 2:
if (Event_THQS!=1)
goto A_NeedReg;
mes "[Keegan]";
mes "Well "+strcharinfo(PC_NAME)+" if you wish to take a quest go talk to the fellow Treasure Hunter in the other room there.";
close;
case 3:
if (Event_THQS!=1)
goto N_NeedMem;
mes "[Keegan]";
mes "Yes "+strcharinfo(PC_NAME)+" I will take you to our shop right away!";
next;
warp "prt_in",166,171;
close;
case 4:
mes "[Keegan]";
mes "Alright come back when you have the free time to spare.";
close;
}
N_NoZeny:
mes "[Keegan]";
mes "Hmmm you don't seem to have ^FF0000100,000,000z^000000 "+strcharinfo(PC_NAME)+". Please come back when you do.";
close;
N_AlreadyReg:
mes "[Keegan]";
mes "Ha ha ha...you are already a member.";
close;
A_NeedReg:
mes "[Keegan]";
mes "Sorry you must be a member of the Treasure Hunter Guild if you wish to take a quest.";
mes " ";
mes "Also now that you are a member feel free to use our shops anytime you wish.They are all located on this floor.";
mes " ";
mes "We also have another shop for members only,in which we use little metal diamonds called Treasure Hunter Tokens to exchange for rare goods.";
mes " ";
mes "You will even have access to our exclusive personal Dungeon.";
close;
N_NeedMem:
mes "[Keegan]";
mes "Im sorry only members may visit our private shop.";
close;
}
After editing the 25,000z for being a treasure hunter i changed it into 100m in the script and in the THQ_TTSHOP script i removed some items there and added some.. now i got the problem when opening the Token Shop it says in the server
also i tried putting back the original script it still reads the script items i added in the token shops and still cant open some shop menu... T_T
THQS_TTshop.txt
THQS_GuildNPC
Edited by PandaaaShare this post
Link to post
Share on other sites