• 0
ReSp

Auto Donation System

Question

Hello all.

Help me please with automatic donation system.

My website is on FluxCP, rAthena server.

Players must donation for example on paypal, and then get cash points at account in game.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 1
14 hours ago, ReSp said:

Hello all.

Help me please with automatic donation system.

My website is on FluxCP, rAthena server.

Players must donation for example on paypal, and then get cash points at account in game.

Hi, you can use this simple script:
 

//===== rAthena Script =======================================
//= Donate converter
//===== By: ==================================================
//= Balfear
//===== Last Updated: ========================================
//= 20171207
//===== Description: ========================================= 
//= Automatic convert player balance("cp_credits") to cashpoint in game when player login.
//============================================================
-	script	balance2cashpoint	-1,{
OnPCLoginEvent:
	query_sql("select balance from `cp_credits` WHERE account_id = " + getcharid(3) + "", .@balance);
	if (.@balance != 0) {
		query_sql ("UPDATE `cp_credits` SET balance = 0 WHERE account_id = " + getcharid(3) + "");
		set #CASHPOINTS,(#CASHPOINTS + [email protected]);
		announce "Gain cash point: "+.@balance+"",bc_self, 0xADFFC5, FW_BOLD;
	}
	end;
}

 

Share this post


Link to post
Share on other sites
  • 0
On 12/7/2017 at 1:32 PM, ReSp said:

Hello all.

Help me please with automatic donation system.

My website is on FluxCP, rAthena server.

Players must donation for example on paypal, and then get cash points at account in game.

Flux CP has built in NPC that can let you get proof of donation. And create a script for it so that you can exchange PODs to CASH or what #2 post says.

Share this post


Link to post
Share on other sites
  • 0
On 12/7/2017 at 9:33 PM, Balfear said:

Hi, you can use this simple script:
 

//===== rAthena Script =======================================
//= Donate converter
//===== By: ==================================================
//= Balfear
//===== Last Updated: ========================================
//= 20171207
//===== Description: ========================================= 
//= Automatic convert player balance("cp_credits") to cashpoint in game when player login.
//============================================================
-	script	balance2cashpoint	-1,{
OnPCLoginEvent:
	query_sql("select balance from `cp_credits` WHERE account_id = " + getcharid(3) + "", .@balance);
	if (.@balance != 0) {
		query_sql ("UPDATE `cp_credits` SET balance = 0 WHERE account_id = " + getcharid(3) + "");
		set #CASHPOINTS,(#CASHPOINTS + [email protected]);
		announce "Gain cash point: "+.@balance+"",bc_self, 0xADFFC5, FW_BOLD;
	}
	end;
}

  

I have this error (sorry I'm not a coder ^^):

Quote

[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/auto_donation_converter.txt', line '19'. Stopping...
 * w1=
 * w2=
 * w3=
 * w4=
 

EDIT: I have found the problem... after the last "}" there is an invisible ascii character! XD... Mistery of "copy & paste"!!!!

Edited by CyberDevil
corrected

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...