Jump to content
  • 0

Donations in FluxCP as Cashpoints


Sesomaru

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  10/29/12
  • Last Seen:  

Hi I wonder where I can edit the Points in Flux CP to Cashpoints for ingame Cashshop

It only adds points to ist own shop but I want it to add them directly to the `acc_reg_num` Database so users can buy items directly from the shop there

thanks

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   5
  • Joined:  03/17/16
  • Last Seen:  

1 hour ago, Sesomaru said:

Hi I wonder where I can edit the Points in Flux CP to Cashpoints for ingame Cashshop

It only adds points to ist own shop but I want it to add them directly to the `acc_reg_num` Database so users can buy items directly from the shop there

thanks

prontera,139,174,6	script	Donation Manager	89,{
 
    mes "[Jimmy John]";
    mes "Would you like to convert your Donation Credit to cash point?";
    mes "Exchange Rate:";
    mes "^0000FF1^000000 Donation Credit = ^00FF001^000000 Cash Point";
    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)+";");
        set #CASHPOINTS,#CASHPOINTS+@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;
 
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  10/29/12
  • Last Seen:  

I dont want an exchanger

What I want is simple

User donates to the Server and get the cashpoints directly to use in the clientside cashshop

no exchanger no coins or whatever

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1615
  • Joined:  03/26/12
  • Last Seen:  

All you'd need to do is write an npc script to remove the CP cash points and give them as #cashpoint instead. A small timer script and a little sql and you're good to go.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  403
  • Reputation:   245
  • Joined:  12/17/11
  • Last Seen:  

Something like this?

Be warned that the code posted does not insert any values into the redeem_log, which essentially means no one (other than the one(s) with access to the PayPal donation account) will be able to trace/confirm received donations. 

 

 

Link to comment
Share on other sites

×
×
  • Create New...