Hello anyone here can help me edit the Token to Zeny? I don't understand how it is working I want it to make5m - 1 T, 50m - 10T,and 500m - 100T
Here's the script I use.
// 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 = (10 ** @type);
// 10^3, 10^4, 10^5
@type += 3; // So we can use pow later to determine the qt of Zeny
@prize = (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;
}
// 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 Cards", "Nevermind") ) {
case 1:
select("1000z - 1T","10000z - 10T","100000z - 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_cards","$THQS_menu_price");
case 4:
close;
}
end;
}
Question
ThyroDree
Hello anyone here can help me edit the Token to Zeny? I don't understand how it is working I want it to make 5m - 1 T, 50m - 10T, and 500m - 100T
Here's the script I use.
// 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 = (10 ** @type); // 10^3, 10^4, 10^5 @type += 3; // So we can use pow later to determine the qt of Zeny @prize = (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; } // 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 Cards", "Nevermind") ) { case 1: select("1000z - 1T","10000z - 10T","100000z - 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_cards","$THQS_menu_price"); case 4: close; } end; }
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.