lionellex Posted September 20, 2016 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 60 Reputation: 1 Joined: 09/10/16 Last Seen: October 9, 2016 Share 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 Link to comment Share on other sites More sharing options...
0 Secrets Posted September 21, 2016 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 437 Joined: 01/26/16 Last Seen: Wednesday at 03:00 PM Share Posted September 21, 2016 set command is deprecated. Use direct assignment instead. For example: #CASHPOINTS += (.@amount*10); 1 Quote Link to comment Share on other sites More sharing options...
0 Lelouch vi Britannia Posted September 20, 2016 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 715 Reputation: 84 Joined: 01/05/12 Last Seen: April 10, 2023 Share Posted September 20, 2016 https://rathena.org/board/topic/70305-cash-exhchange-to-coin/#entry135386 Quote Link to comment Share on other sites More sharing options...
0 lionellex Posted September 20, 2016 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 60 Reputation: 1 Joined: 09/10/16 Last Seen: October 9, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
0 Lelouch vi Britannia Posted September 21, 2016 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 715 Reputation: 84 Joined: 01/05/12 Last Seen: April 10, 2023 Share Posted September 21, 2016 Change this... set #CASHPOINTS,#CASHPOINTS+10; to this... set #CASHPOINTS,#CASHPOINTS+(.@amount*10); 1 Quote Link to comment Share on other sites More sharing options...
0 lionellex Posted September 21, 2016 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 60 Reputation: 1 Joined: 09/10/16 Last Seen: October 9, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
0 lionellex Posted September 21, 2016 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 60 Reputation: 1 Joined: 09/10/16 Last Seen: October 9, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
0 nitrous Posted September 21, 2016 Group: Developer Topic Count: 4 Topics Per Day: 0.00 Content Count: 141 Reputation: 46 Joined: 08/14/12 Last Seen: April 5 Share Posted September 21, 2016 Just put #CASHPOINTS += (.@amount*10); 1 Quote Link to comment Share on other sites More sharing options...
0 lionellex Posted September 21, 2016 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 60 Reputation: 1 Joined: 09/10/16 Last Seen: October 9, 2016 Author Share Posted September 21, 2016 Just put #CASHPOINTS += (.@amount*10); Alright, confirmed working. thanks guys. Quote Link to comment Share on other sites More sharing options...
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 lionellexLink to comment
Share on other sites
8 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.