array of bytes? idea?

05/25/2011 16:27 ¼S†a†icConfig¼#1
there was a game i played along time ago where you could change the array of bytes so when you buy an item instead of taking away your silver it gave you the amount of silver the item costed...Is that possible to do on 12sky2?

im not that advanced yet or else id try myself...but would really like to know if thats at all possible...
05/26/2011 17:25 ovicka#2
Everything is possible you just need to think ! I don't know anyway of doing it but it's posible to find.
05/27/2011 01:15 tri407tiny#3
sadly a prgram is made of "bytes" thus he basiclly modified part of the virtual preloaded memory, what does that mean, it may be possible but what he did was game specific.
05/28/2011 10:47 Mega Byte#4
Yeah.. what he did was change the ASM or the bytes that the asm represents to instead subtracting to add for example

SUB EAX, EBX
MOV [MoneyAddress],EAX

he would of changed to

ADD EAX,EBX
MOV [MoneyAddress],EAX

Another change you could make is to make the item not change your money when you buy it.
NOP
NOP
NOP
NOP
NOP
NOP
NOP

etc....

But as tri407tiny said you can only do this in some games. For example most single player rpg games.

12sky2 does client side checks to see if you can buy the item and then sends packet to server containing item id and count of how many to buy. It also contains your X Z Y and target NPC I think.

The server does some checks to see if you can buy the item and that the invintory slot is free. If so silver is deducted item is given invintory is updated and the transaction is complete.
07/11/2011 05:26 suryaprasath#5
Well, you are widening the char into a short value. What you want is to interpret two [Only registered and activated users can see links. Click Here To Register...] as an short. static_cast cannot cast from unsigned char* to unsigned short*. You have to cast to void*, then to unsigned short*:

unsigned short *p = static_cast<unsigned short*>(static_cast<void*>(&packetBuffer[1]));
07/11/2011 06:10 Mega Byte#6
unrelated.. but yeah you could do that i havent really used static or dynamic cast or reintepret cast so wouldnt have any idea how to use them.

But in TS2 you cant do this money hack. Ive tried everywhere I can think. If someone does find it let me know and I can prevent it in pserver :D