Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

Gold to long long [Some problems]


Saddler

Question

Hey Metin2Dev

 

I have some problems after change the gold to long long.

 

First:

 

I add 5KKK - 5.000.000.000 gold to my characther.

SI0pc.png

 

Strange thing here is, on inventory appear 5.000.000.000 Yang, but in real he just receive

705.032.704 yang.

 

Now, lets reload character.

 

Mcp2g.png

 

Yeah, now we have 705kk in gold.

 

Other issue

 

Buying itens:

First:

nGL6b.png

 

I have 5k and the scroll blessing cost 5k too.

I will buy then.

 

Here's the result:

uQUph.png

 

 

I don't test other stuff with gold, but if someone experienced that and can help me will be good.

 

Regards.

Link to comment

8 answers to this question

Recommended Posts

  • 0

Did you check the database?

Seems like the gamecore and the client recognizes your gold amount as long long, but the mysql-server can't store it so it'll overflow when you reload or buy something to refresh the values.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
  • 0

Did you check the database?

Seems like the gamecore and the client recognizes your gold amount as long long, but the mysql-server can't store it so it'll overflow when you reload or buy something to refresh the values.

 

I change the player db for gold

 

1jche.png

 

I need to do more something?

 

Regards

Link to comment
  • 0

since your yang got resetted to 4,2kkk I guess there's some more behind that since it's the length of unsigned int. The command allows you to set such high values, but somewhere in the game source there's a restriction you seem to not have noticed yet.

 

I'm not sure about it but maybe you can check the dbcache too. And look for syserr/syslog, maybe they'll provide you overflow-messages.

  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
  • 0

Changes needed:

MySQL Table

DBCache and game (common/tables.h)

Game Packets to the Client (every point packet)

Some type changes in functions like do_set or other functions

To change the gold limit you have to change the type of the points to long long not only the gold stuff

Also the Client packets and you need to change the gold display from l to L

Link to comment
  • 0

That seems to be an unsigned-int limit, 2^32-1

 

You must check length.h, and check syserr too, to be sure it's not recognized as overflow.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0

since your yang got resetted to 4,2kkk I guess there's some more behind that since it's the length of unsigned int. The command allows you to set such high values, but somewhere in the game source there's a restriction you seem to not have noticed yet.

 

I'm not sure about it but maybe you can check the dbcache too. And look for syserr/syslog, maybe they'll provide you overflow-messages.

ah, pretty what he said before me, didn't noticed.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.