Jump to content
  • 0

Donation Credits exchange


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

Good day ! ^_^ rathena

please help me with this

the functions is

  • a player go to my website > he click donations > and put donation to earn
    credit points > after that player go to log in and play ingame > now he want to
    claim her credits to a npc

  • the npc will give TCG base on credit points he have

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

Before that have you checked if your flux donations is fully functional? :))

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

yes my flux is working normally

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

7 minutes ago, Questune09 said:

yes my flux is working normally

Try This
https://github.com/rathena/FluxCP/blob/master/data/npc/DonationNPC.txt

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

15 hours ago, crazyarashi said:

i think its working no error on my putty

 

but my question now i set my credit on my website to 9999 but when i click the npc and redeem my reward or exchange it to item

 

the npc said no record indicate on her list 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

To use that npc you need to use flux donation item mall system, so players buy items in fluxcp

 

Try this npc which we made for my server 

This npc converts fluxcp donation credits to ingame cashpoints using sql query from cp_credits

 

https://pastebin.com/wxZU9YH8

  • Upvote 2
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   2
  • Joined:  03/08/13
  • Last Seen:  

but mail dosent even work in new clients

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

On 4/8/2017 at 10:15 AM, Cyro said:

To use that npc you need to use flux donation item mall system, so players buy items in fluxcp

 

Try this npc which we made for my server 

This npc converts fluxcp donation credits to ingame cashpoints using sql query from cp_credits

 

https://pastebin.com/wxZU9YH8

+1 thank you its working ^^

 

by the way do i change it to credits to TCG? thank you

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

Change 

Set #cashpoints to

Getitem itemid

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

15 hours ago, Cyro said:

Change 

Set #cashpoints to

Getitem itemid

thank you so much again ^_^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

15 hours ago, Cyro said:

Change 

Set #cashpoints to

Getitem itemid

i also cant find it please modify the script 1 credit = 1 tcg thank you ^_^

 

also please remove the color codes on script

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

prontera,255,255,5	script	Cash Points Exchanger	758,{
set .@i, #CASHPOINTS;
mes "[Cashpoints Exchanger]";
mes "You have ^0055FF"+.@i+" Cash Points^000000.";
if (!.@i) { mes "Please come back later."; close; }
mes "I can convert your ^FF0000Cash Points^000000 To a ^FF0000TCG^000000.";
next;
if(select(" - Trade: - ^777777Leave^000000")==2) close;
mes "[Cashpoints Exchanger]";
mes "How many would you like to convert?";
next;
input .@j;
mes "[Cashpoints Exchanger]";
if (.@j < 1 || .@j > #CASHPOINTS) { mes "That's an invalid amount."; close; }
mes "Are you sure you want to exchange ^0055FF"+.@j+" Cashpoints^000000?";
if(select(" - Yes: - No")==2) close;
mes " ";
set #CASHPOINTS, #CASHPOINTS-(.@j*1);
getitem 7227, .@j;
mes "You now have "+countitem(7227)+" TCG.";
close;
}

Cashpoints to TCG
 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

15 hours ago, crazyarashi said:

prontera,255,255,5	script	Cash Points Exchanger	758,{
set .@i, #CASHPOINTS;
mes "[Cashpoints Exchanger]";
mes "You have ^0055FF"+.@i+" Cash Points^000000.";
if (!.@i) { mes "Please come back later."; close; }
mes "I can convert your ^FF0000Cash Points^000000 To a ^FF0000TCG^000000.";
next;
if(select(" - Trade: - ^777777Leave^000000")==2) close;
mes "[Cashpoints Exchanger]";
mes "How many would you like to convert?";
next;
input .@j;
mes "[Cashpoints Exchanger]";
if (.@j < 1 || .@j > #CASHPOINTS) { mes "That's an invalid amount."; close; }
mes "Are you sure you want to exchange ^0055FF"+.@j+" Cashpoints^000000?";
if(select(" - Yes: - No")==2) close;
mes " ";
set #CASHPOINTS, #CASHPOINTS-(.@j*1);
getitem 7227, .@j;
mes "You now have "+countitem(7227)+" TCG.";
close;
}

Cashpoints to TCG
 

thank you ^_^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

prontera,144,171,6  script  Donation Manager    89,{
 
    mes "[Jimmy John]";
    mes "Would you like to convert your Donation Credit to TcG";
    mes "Exchange Rate:";
    mes "^0000FF1^000000 Donation Credit = one TCG";
    next;
    set @dCreds,query_sql("SELECT `balance` FROM cp_credits WHERE `account_id` = "+getcharid(3)+";",.@dCreds);
    mes "Please select the service you want:";
    next;
    menu "^FF0000Exchange",dpExc,"^0000FFCheck  Points/Credits",checkPoints,"^00FF00Quit",LeEnd;
   
    dpExc:
        mes "Available Cash Point to Exchange from Donation Credit : ^0000FF" + .@dCreds + "^000000";
        next;
        mes "How many ^FF0000 Cash Point ^000000 do you want?";
        input @ExchangeECd;
        if (.@dCreds < @ExchangeECd) goto ENeedDcredits;
        mes "That will be ^0000FF" + @ExchangeECd + "^000000 Donation Credits!";
        menu "Yes, I am sure.",LEyesd,"I will decide later...^000000",LEno;
        LEyesd:
        set .@dCBal,.@dCreds-@ExchangeECd;
        query_sql("UPDATE `cp_credits` SET `balance` = "+.@dCBal+" WHERE account_id = "+getcharid(3)+";");
        getitem 7227,@ExchangeECd;
        next;
        goto Edis2;
        close;     
    LEno:
        mes "Thanks you ^0000FF" + strcharinfo(0) + "^000000!";
        mes "And done come again!";
        close;
       
    Edis2:
        mes "Your Donation Credit = ^0000FF" + .@dCBal + "^000000!";
        mes "Your Cash Point = ^0000FF" + #CASHPOINTS + "^000000! ";
        close;
       
    ENeedDcredits:
        mes "Sorry, you don't have enough Donation Credits.";
        close;
       
    checkPoints:
        mes "Your Donation Credit = ^0000FF" + .@dCreds + "^000000!";
        mes "Your Cash Point = ^0000FF" + #CASHPOINTS + "^000000! ";
        close;
 
    LeEnd:
        close; 
       
       
    OnInit:
    waitingroom "Redeem Donation",0;
    end;
 
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

On 4/9/2017 at 1:15 AM, Cyro said:

To use that npc you need to use flux donation item mall system, so players buy items in fluxcp

 

Try this npc which we made for my server 

This npc converts fluxcp donation credits to ingame cashpoints using sql query from cp_credits

 

https://pastebin.com/wxZU9YH8

@Cyro how to make it change 1 Donation Credits to 1000 Cash Point ?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

16 minutes ago, mrfizi said:

@Cyro how to make it change 1 Donation Credits to 1000 Cash Point ?

set #CASHPOINTS,#CASHPOINTS+@ExchangeECd;
to
set #CASHPOINTS,#CASHPOINTS + (@ExchangeECd*1000);

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

12 minutes ago, crazyarashi said:

set #CASHPOINTS,#CASHPOINTS+@ExchangeECd;
to
set #CASHPOINTS,#CASHPOINTS + (@ExchangeECd*1000);

 

Thank you so much for your fast reply.. /lv +1

Link to comment
Share on other sites

×
×
  • Create New...