When I redeem something from donations through the fluxCP, it gives me an item in-game. This is item ID 677 (I can spend that on special currency shops).
Now my question is, how do i make a NPC with query that turns item 677 back into CP credits? Might i add the course isn't the same. 100x of item 677 is equal to 1 flux cp credit.
I'd like the player to be able to input how many he wants to put back. This is all i could figure out...
prontera,150,150,1 script PutBack 987,{mes "Hi. Can i help you?";menu "Put coins back to CP",-;if (countitem(677) < 100){mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";close;} mes "Input amount:"input (????) query_sql("UPDATE `cp_credits` SET `balance` = (????+00) WHERE `account_id` = '"+getcharid(3)+"'"); (is this right?) delitem 677,(input amount here); sleep2 10;dispbottom "Coins converted back to site credits.";}close;end;}
Hello hercules,
I have a question regarding SQL query.
When I redeem something from donations through the fluxCP, it gives me an item in-game. This is item ID 677 (I can spend that on special currency shops).
Now my question is, how do i make a NPC with query that turns item 677 back into CP credits? Might i add the course isn't the same. 100x of item 677 is equal to 1 flux cp credit.
I'd like the player to be able to input how many he wants to put back. This is all i could figure out...
Share this post
Link to post
Share on other sites