Jump to content
  • 0
Sign in to follow this  
exi1992

Proof of Donation?

Question

i'm using flux control panel, it has donation module itself. but i don't want to use panel's item shop. so i created a npc. everything is ready. when you try to get one item from this npc, it wants ''proof of donation tickets".wonder if people automaticly get this proof of donation tickets to their account when they donate? They get donation credits to use it from control panel, but i don't know about proof of donation tickets. If they don't get theese normally, how can i activate it. The system i want is: you donate 2 dollars and you get 2 proof of donation tickets in game. thanks

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Might probably want to use OnPCLoginEvent label?

i'm sorry, i didn't understand what you mean. i wonder if you get what is my problem. i only wonder if a donator automaticly gets proof of donation in game when he donate from flux cp. if not how can i do it.

 

You need to make an NPC that can Convert Ponts/Cash to Item/PODs

try this Utility: Points to Item Exchanger play with it. :)

(Moved to Script Request)

i already have a npc which gives items when you give proof of donations to him. my problem is with flux cp. and i dont thing it's about script request :)

for example you donate from the panel

then, when you log in to your account, you should find your proof of donations in your storage

this is what i want

Edited by Mhalicot

Share this post


Link to post
Share on other sites
  • 0

then, when you log in to your account, you should find your proof of donations in your storage

doing like this should be discourage

because the players can still be login in the game while vote for your server

 

in the original script the fluxCP provided,

the query_sql is being read on the spot, so even if the player is online while voting

if the player click on the npc again, the points has been updated due to reading the sql table

 

but since you want to inject an item into storage, the sql query will only work if the player is offline

if you inject an item into storage while that player is online,

that player will not have the item because the character data is being processed inside char_server.exe

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

then, when you log in to your account, you should find your proof of donations in your storage

doing like this should be discourage

because the players can still be login in the game while vote for your server

 

in the original script the fluxCP provided,

the query_sql is being read on the spot, so even if the player is online while voting

if the player click on the npc again, the points has been updated due to reading the sql table

 

but since you want to inject an item into storage, the sql query will only work if the player is offline

if you inject an item into storage while that player is online,

that player will not have the item because the character data is being processed inside char_server.exe

then the users can get their proof of donations after a re-log. it's not a big deal. we can tell about this in the donation information. i just need to know how to make it. when they are done with "donation" (not voting) i want them to get proof of donation automaticly to their storage. is it possible?

Or normally, when they donate, do they get proof of donations to their storages?

Share this post


Link to post
Share on other sites
  • 0

no its not possible

you can't mess with player's online data with query_sql, Sql_Handle or mysqli_query

asking players to click on npc again is the correct method

 

if you inject items into an online player, the item sure lost, even after relog

 

 

 

if you need proof

prontera,158,185,5	script	kdjshfkjsf	100,{	query_sql "select id from storage where account_id = "+ getcharid(3) +" and nameid = 501", .@id;	if ( .@id )		query_sql "update storage set amount = amount + 1 where account_id = "+ getcharid(3) +" and nameid = 501";	else		query_sql "insert into storage ( account_id, nameid, amount, identify ) values ( "+ getcharid(3) +",501 , 1, 1, )";	mes "item successfully injected";	end;}
this script is bug
prontera,160,185,5	script	kdjshfkjsf2	100,{	.@origin = getcharid(3);	atcommand "@kick "+ strcharinfo(0);	sleep 1000;	query_sql "select id from storage where account_id = "+.@origin +" and nameid = 501", .@id;	if ( .@id )		query_sql "update storage set amount = amount + 1 where account_id = "+ .@origin +" and nameid = 501";	else		query_sql "insert into storage ( account_id, nameid, amount, identify ) values ( "+ .@origin +", 501, 1, 1 );";	end;}
this script is working

 

there is no way for fluxCP to kick an online player in a game, so its not possible

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

no its not possible

you can't mess with player's online data with query_sql, Sql_Handle or mysqli_query

asking players to click on npc again is the correct method

 

if you inject items into an online player, the item sure lost, even after relog

 

 

 

if you need proof

prontera,158,185,5	script	kdjshfkjsf	100,{	query_sql "select id from storage where account_id = "+ getcharid(3) +" and nameid = 501", .@id;	if ( .@id )		query_sql "update storage set amount = amount + 1 where account_id = "+ getcharid(3) +" and nameid = 501";	else		query_sql "insert into storage ( account_id, nameid, amount, identify ) values ( "+ getcharid(3) +",501 , 1, 1, )";	mes "item successfully injected";	end;}
this script is bug
prontera,160,185,5	script	kdjshfkjsf2	100,{	.@origin = getcharid(3);	atcommand "@kick "+ strcharinfo(0);	sleep 1000;	query_sql "select id from storage where account_id = "+.@origin +" and nameid = 501", .@id;	if ( .@id )		query_sql "update storage set amount = amount + 1 where account_id = "+ .@origin +" and nameid = 501";	else		query_sql "insert into storage ( account_id, nameid, amount, identify ) values ( "+ .@origin +", 501, 1, 1 );";	end;}
this script is working

 

there is no way for fluxCP to kick an online player in a game, so its not possible

 

thank you. so i changed the item id from your script into proof of donation. will people get proof of donation when they click it after relog if they already donated? is it connected to flux cp? or do i need add something to mysql?

Share this post


Link to post
Share on other sites
  • 0

please get yourself a test server and test the above script

the above script is a snippet to tell you, your idea is not possible

.

will people get proof of donation when they click it after relog if they already donated?

if you inject items into an online player, the item sure lost, even after relog

.

.

just use the script that fluxCP provided

that script using the correct method

.

.

like I said already, your idea is not possible

 

I not going to make anymore post if you don't even want to test

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.   Restore formatting

  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...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.