Jump to content

Question

Hello !!

 

thank you for clicking on the link and reading my request....

 

 

May
i request for an NPC which can actually fetch the credits data from the
flux cp and would be a shop which would sell items in exchange of the
credits in flux panel db.

 

I m requesting u because i m
getting too much of item duper complaints and i guess setting global
variables or using the predefined db like cp_credits would actually help
in secure way of dealing with items.

 

 

Hoping for a positive response :)

 

Regards...

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

@@rector

 

prontera,166,207,4	script	Flux Point Shop	4_M_YOUNGKNIGHT,{		openshop;	end;	OnInit:		setarray .@itemIds,501, 502, 503;		setarray .@itemPrices, 1, 1, 1; 		tradertype( NST_CUSTOM );		for( .@i = 0; .@i < getarraysize( .@itemIds ); .@i++ )			sellitem .@itemIds[ .@i ], .@itemPrices[ .@i ];	end;	OnCountFunds:		query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance;		setcurrency( .@balance );	end;	OnPayFunds:		query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance;		if( .@balance < @price ) end;		query_sql "UPDATE cp_credits SET balance = balance - " +  @price + " WHERE account_id = " + getcharid( 3 );		purchaseok();	end;}

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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