lionellex Posted September 20, 2016 Posted September 20, 2016 (edited) Hi, I wonder if its possible to change #CASHPOINTS to Gold Coins (7517) ? Or is there any NPC that converts the Gold Coins to #CASHPOINTS ? EDIT: My mistake, what I'm trying to say is, A NPC that converts Gold Coins to Cash Points. Edited September 20, 2016 by lionellex Quote
0 Secrets Posted September 21, 2016 Posted September 21, 2016 set command is deprecated. Use direct assignment instead. For example: #CASHPOINTS += (.@amount*10); 1 Quote
0 Lelouch vi Britannia Posted September 20, 2016 Posted September 20, 2016 https://rathena.org/board/topic/70305-cash-exhchange-to-coin/#entry135386 Quote
0 lionellex Posted September 20, 2016 Author Posted September 20, 2016 (edited) https://rathena.org/board/topic/70305-cash-exhchange-to-coin/#entry135386 Ops my mistake, what I'm trying to say is, A NPC that converts Gold Coins to Cash Points. EDIT: prt_in,47,101,2 script Cash Exchanger 721,{ mes .NPC$; mes "Can exchange your " +getitemname(.ID)+ " for Cash Points. Want to exchange?"; next; if (select("Yes:No") - 1) close; mes .NPC$; mes "Okay how many " +getitemname(.ID)+ " will you exchange?"; next; input .@amount; if (.@amount == 0) { mes .NPC$; mes "Cannot trade 0 amount"; close; } mes .NPC$; mes "So you want to exchange " +.@amount+ "x " +getitemname(.ID); next; if (select("Yes:No") - 1) close; mes .NPC$; mes "Let me check if you have that amount of requirements"; next; if (countitem(.ID) < .@amount) { mes .NPC$; mes "Seems like you put an invalid amount"; close; } mes .NPC$; mes "Ohh that's nice here you go!"; delitem .ID,.@amount; set #CASHPOINTS,#CASHPOINTS+10; dispbottom "You now have " +#CASHPOINTS+ " Cash Points"; next; mes .NPC$; mes "Success trading"; close; OnInit: set .NPC$,"[ " +strnpcinfo(1)+ " ]"; // NPC Name set .ID,7517; // Requirement end; } Okay I found this script from THIS thread. I kinda change a little here and there. Everything works fine, except 1 issue. whenever I give this NPC more than 1 piece of GOLD COIN, it will still give me only 10 Cash Points. How do I set it to give more than just 10 Cash Point when I give this NPC more than 1 piece of GOLD COIN. Edited September 20, 2016 by lionellex Quote
0 Lelouch vi Britannia Posted September 21, 2016 Posted September 21, 2016 Change this... set #CASHPOINTS,#CASHPOINTS+10; to this... set #CASHPOINTS,#CASHPOINTS+(.@amount*10); 1 Quote
0 lionellex Posted September 21, 2016 Author Posted September 21, 2016 (edited) Change this... set #CASHPOINTS,#CASHPOINTS+10; to this... set #CASHPOINTS,#CASHPOINTS+(.@amount*10); Thanks sir, its working now. Thanks a lot. Edited September 21, 2016 by lionellex Quote
0 lionellex Posted September 21, 2016 Author Posted September 21, 2016 set command is deprecated. Use direct assignment instead. For example: #CASHPOINTS += (.@amount*10); Okay so I change set #CASHPOINTS,#CASHPOINTS+(.@amount*10); to set #CASHPOINTS += (.@amount*10); like this? Quote
0 nitrous Posted September 21, 2016 Posted September 21, 2016 Just put #CASHPOINTS += (.@amount*10); 1 Quote
0 lionellex Posted September 21, 2016 Author Posted September 21, 2016 Just put #CASHPOINTS += (.@amount*10); Alright, confirmed working. thanks guys. Quote
Question
lionellex
Hi, I wonder if its possible to change #CASHPOINTS to Gold Coins (7517) ? Or is there any NPC that converts the Gold Coins to #CASHPOINTS ?
EDIT: My mistake, what I'm trying to say is, A NPC that converts Gold Coins to Cash Points.
Edited by lionellex8 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.