Real time gold updating

09/21/2015 17:11 sarkoplata#1
Hi,
I want to update huge amounts of gold in runtime, without teleporting.
Imagine a scroll that gives you a huge amount of gold like 100B. Upon usage your gold will be updated without teleporting.
Whenever your gold amount changes there is a gold update packet (0x304E) coming from the server. If you send that to client your gold will be updated. But there's a problem, for some reason, even though your gold amount changes at your inventory (and you update from db as well), when you try to spend it you get "not enough gold". And for example if you drop 1 gold, your gold amount is back to the original value (not db value, before the 0x304E change value)
So I think I can't deceive client because something must happen first before the 0x304E? No pick up, no quest reward, just 0x304E coming from nowhere.
Any ideas?

Edit: I just found out that the reason you can't spend it is actually the gameserver says no, because gameserver uses the value stored at it's memory. When I editted the value with CE, it actually worked. So somehow I need to update gameserver's memory, without teleporting the character...
09/21/2015 20:34 Royalblade*#2
OOOOOR you TP the whole char without letting the client know.
09/21/2015 20:58 sarkoplata#3
Quote:
Originally Posted by Royalblade* View Post
OOOOOR you TP the whole char without letting the client know.
This, theoretically came to my mind but I just gtfo to myself and thought I should take a break, lol
Now it made more sense when you actually said it
is there any way to tp the user to his exact location without /movetouser + /recalluser ?
09/22/2015 21:00 Devsome#4
When you create a stored procedure, you can run *exe files.
Why you arn't creating one to update the gameserver for this user, so he can buy that item ?

You sayed that you are able to make it visible after the scroll is used, but gs sayes "no fuck you"
09/22/2015 21:01 ​Exo#5
Quote:
Originally Posted by Devsome View Post
When you create a stored procedure, you can run *exe files.
Why you arn't creating one to update the gameserver for this user, so he can buy that item ?

You sayed that you are able to make it visible after the scroll is used, but gs sayes "no fuck you"
Are you suggesting overwriting the gs memory?
09/22/2015 21:03 Devsome#6
Quote:
Originally Posted by ​Exo View Post
Are you suggesting overwriting the gs memory?
Yeah why not ?
He sayed that after he edited it in CE, it worked.

Orrrrr like Akasch sayed, teleport the user to the same location with a stored procedure.
09/22/2015 21:11 sarkoplata#7
Quote:
Originally Posted by Devsome View Post
Yeah why not ?
He sayed that after he edited it in CE, it worked.

Orrrrr like Akasch sayed, teleport the user to the same location with a stored procedure.
I just found the gold amount in gs memory with few searches. If this was client, you could find the pointer and use it, but it's only for 1 character. I have no clue if you can find a specific character's gold amount in gs memory, on runtime... Doesn't seem very possible to me :o Or even if it is, im too noob for that

So, overwriting gs memory would be best, but currently gonna stick on working to enable /wp for every user.
09/22/2015 21:15 ​Exo#8
^ but let's first find a way to get rid of this gay teleport image xD
09/22/2015 21:20 sarkoplata#9
Quote:
Originally Posted by ​Exo View Post
^ but let's first find a way to get rid of this gay teleport image xD
overwrite gs memory = dont need to take care of anything else, also no client lag, 100% ez solution

just 1 problem: finding memory addresses from gs dynamically :D
09/22/2015 21:25 Devsome#10
Quote:
Originally Posted by sarkoplata View Post
overwrite gs memory = dont need to take care of anything else, also no client lag, 100% ez solution

just 1 problem: finding memory addresses from gs dynamically :D
can't you regex ?! the memory addresse. Example

player A: A5 B3 (address for gold)
player B: A4 B2 (address for gold)

Around those address is always the same (dunno but I guess)

C3 D1 [player A] DF AB
C3 D1 [player B] DF AB
09/22/2015 21:53 sarkoplata#11
Even the gold address of a player A is not static. It changes on every teleport...
09/22/2015 23:27 Devsome#12
Quote:
Originally Posted by sarkoplata View Post
Even the gold address of a player A is not static. It changes on every teleport...
does the part around the gold amount is static ?
09/23/2015 00:53 ​Exo#13
Actually this needs some debugging to see how the code allocates the memory. Needs someone with some decent asm skills.
10/02/2015 08:19 sarkoplata#14
Bumperino
10/02/2015 09:33 Devsome#15
Quote:
Originally Posted by sarkoplata View Post
Even the gold address of a player A is not static. It changes on every teleport...
Quote:
Originally Posted by Devsome View Post
does the part around the gold amount is static ?
Bumperino.
Yu no answered