Hello everyone, I am new to the forum. I would have a problem with a script that converts Gold Coin into Cash Point. The script works, but the problem is that if for example I have 10 Cash poins, when I convert 15 Gold Coin into 1 Cash Point I do not have 11 Cash Points, but rather 1. I hope I explained myself, sorry for my bad english ...
prontera,136,171,4 script Molly 469,{
.@npcname$ = "[Molly]";
mes .@npcname$;
mes "Hello "+strcharinfo(0)+".";
mes "I can convert your Gold Coin in Cash Poin!";
mes "You need 15 Gold Coin for 0.01 Cash Poin.";
mes "How many you want to exchange?";
next;
input .@count;
if(.@count == 0) close;
if(countitem(7517) < .@count*15) goto L_NE;
delitem 7517,.@count*15;
set #CASHPOINTS,#CASHPOINTS+1;
close;
L_NE:
mes .@npcname$;
mes "You don't have that coin enough.";
close;
}
Question
Shinto
Hello everyone, I am new to the forum. I would have a problem with a script that converts Gold Coin into Cash Point. The script works, but the problem is that if for example I have 10 Cash poins, when I convert 15 Gold Coin into 1 Cash Point I do not have 11 Cash Points, but rather 1. I hope I explained myself, sorry for my bad english ...
prontera,136,171,4 script Molly 469,{ .@npcname$ = "[Molly]"; mes .@npcname$; mes "Hello "+strcharinfo(0)+"."; mes "I can convert your Gold Coin in Cash Poin!"; mes "You need 15 Gold Coin for 0.01 Cash Poin."; mes "How many you want to exchange?"; next; input .@count; if(.@count == 0) close; if(countitem(7517) < .@count*15) goto L_NE; delitem 7517,.@count*15; set #CASHPOINTS,#CASHPOINTS+1; close; L_NE: mes .@npcname$; mes "You don't have that coin enough."; close; }
Link to comment
Share on other sites
3 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.