prontera,196,141,4 script POD 831,{
mes "[Trader]";
mes "Hello dear! I exchange your ITEM A to ITEM B.";
mes " ";
mes "You currently have ^ff0000"+countitem(itema)+"^000000 ITEM A.";
menu "Exchange ITEM A to "+getitemname(itemb)+"", L_PODS, "Nevermind", L_Cancel;
close;
L_PODS:
next;
mes "[Trader]";
mes "How many ITEM B you want to get?";
mes "^ff0000Note^000000: 1 "+getitemname(itemb)+" = 5 "+getitemname(itemb)+"";
input .@count;
if (.@count == 0) close;
if (countitem(itemb) < .@count*1) goto L_Noitem;
delitem itema,.@count*5;
getitem itemb,.@count*1;
close;
L_Noitem:
next;
mes "[Trader]";
mes "You dont have enough "+getitemname(itema)+"";
close;
L_Cancel:
mes "[Trader]";
mes "Come back anytime!";
close;
end;
}
This script is working but I want to have a random rate of ITEM A to be exchanged to ITEM B. Numbers are 1, 2 or 3 maximum. So for example, the script returned 1 as the exchange rate, it would be like this: 1 ITEM A = 1 ITEM B. Then another session if the script returned 3 as the exchange rate, then 3 ITEM A = 1 ITEM B. The npc must show the random rate after the player has got the exchanged item.
I can pay to have something like this.
EXAMPLE: When the npc is clicked, it will ask how many ITEM A the player wants to exchange. So for example, if the player has 20 pcs ITEM A, and he puts all 20 to exchange and the script gave him 3 as the exchange rate, he will only receive 6 ITEM B and only 18 ITEM A will be decreased in his inventory. Meaning, 2 ITEM A will be left.
Alternatively, if the player puts 20 to exchange and the script gave him 1 as the exchange rate, then he will receive 20 ITEM B all in all with no ITEM A left in his inventory.
Question
c2greentea
This script is working but I want to have a random rate of ITEM A to be exchanged to ITEM B. Numbers are 1, 2 or 3 maximum. So for example, the script returned 1 as the exchange rate, it would be like this: 1 ITEM A = 1 ITEM B. Then another session if the script returned 3 as the exchange rate, then 3 ITEM A = 1 ITEM B. The npc must show the random rate after the player has got the exchanged item.
I can pay to have something like this.
EXAMPLE: When the npc is clicked, it will ask how many ITEM A the player wants to exchange. So for example, if the player has 20 pcs ITEM A, and he puts all 20 to exchange and the script gave him 3 as the exchange rate, he will only receive 6 ITEM B and only 18 ITEM A will be decreased in his inventory. Meaning, 2 ITEM A will be left.
Alternatively, if the player puts 20 to exchange and the script gave him 1 as the exchange rate, then he will receive 20 ITEM B all in all with no ITEM A left in his inventory.
Edited by c2greenteaLink to comment
Share on other sites
0 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.