Jump to content
  • 0

Auto Donation System


ReSp

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   0
  • Joined:  10/23/15
  • Last Seen:  

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.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   234
  • Joined:  07/24/13
  • Last Seen:  

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 + .@balance);
		announce "Gain cash point: "+.@balance+"",bc_self, 0xADFFC5, FW_BOLD;
	}
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

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 + .@balance);
		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
Link to comment
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.

×
×
  • Create New...