Jump to content
  • 0

Npc that calculates all Zeny in server for Admin


anakpondok

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  03/21/13
  • Last Seen:  

i'm trying to make an npc for admins to be able to check current total zeny in server

 

i could load it from mysql no problem 

 

the problem is when the message appear it only shows 2,147,483,647 zeny, i know this is due to signed int on zeny

 

my question is how to turn zeny into double only on my script so that the npc will show the correct amount of zeny?

 

 

i have been testing on a very simple script to be able to show amount above 2,147,483,647 and i keep on getting 0

 

the simple script i made is 

 

set a, 4000000000;

mes " Zeny is "+ a;

close;

 

Please kindly help

Edited by anakpondok
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

not sure if this really work ...

 

query_sql( "SELECT SUM(`zeny`) FROM `char`",.@zeny$ );
mes "Total Zeny : "+.@zeny$;

if run by query...you can retrieve all zeny...and by using char variable to save the data....perhap you can achieve what you want...

 

 

if you want to change the zeny limit in server...believe that are alot part you need to change...datatype...sql datatype...and etc...

 

 

 

edit :

if you are using flux cp ... or ceres cp....i think both have the function ...just view the "server info" page of your website....

Edited by Emistry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  03/21/13
  • Last Seen:  

not sure if this really work ...

 

query_sql( "SELECT SUM(`zeny`) FROM `char`",.@zeny$ );
mes "Total Zeny : "+.@zeny$;

if run by query...you can retrieve all zeny...and by using char variable to save the data....perhap you can achieve what you want...

 

 

if you want to change the zeny limit in server...believe that are alot part you need to change...datatype...sql datatype...and etc...

 

 

 

edit :

if you are using flux cp ... or ceres cp....i think both have the function ...just view the "server info" page of your website....

Yes sir, i use something like that to retrieve the zeny and still shows the max int limit, would it be possible to assign the .@zeny$ to be double?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

You cannot use number formats other than integer, unfortunately =/

But if you use Emistry's way, you select the value as a string, which is not as limited as an integer.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  03/21/13
  • Last Seen:  

You cannot use number formats other than integer, unfortunately =/

But if you use Emistry's way, you select the value as a string, which is not as limited as an integer.

ahhhhh now i understand coz of the $, sorry emistry didn't notice that, will try, thx so much emistry and deadlysilence

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