Jump to content
  • 0

Donation Credits exchange


Question

Posted

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

16 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted
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

  • 0
Posted
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

  • 0
Posted
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
  • 0
Posted
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 ^_^

  • 0
Posted
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
  • 0
Posted
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 ?

  • 0
Posted
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
  • 0
Posted
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...