[OTClient] How to build a Full Light Hack
Hi,
this tutorial is meant to build a Full Light Hack mostly based on OTClient source code. You will need Cheat Engine to follow this guide and I'll use Medivia (Open GL version) as example, since their client is a customized OTClient version.
Outline:
- Find Light address
- Find and patch instructions responsible for changes to the Light address when we turn a torch on/off
- Find and patch instructions responsible for changes to the Light address when we get into a cave
Find Light address
For a light hack, of course, we need somehow to overwrite the client's light value, so we need Light address.
You can check that OTClient stores a light value in the creature object (or children objects in the hierarchy): https://github.com/edubart/otclient/...ent/creature.h
At this time, the current Light structure is defined at https://github.com/edubart/otclient/...nt/thingtype.h
The easiest way I can think of to find Light address is to find Direction first, because Direction is a few members above Light and Direction is enum (this means Direction is really easy to find with Cheat Engine),
defined at https://github.com/edubart/otclient/...client/const.h
Steps:
- Turn your character to north and search for 0
http://i.imgur.com/g71W9EN.png
- Turn east and search for 1
- Turn south and search for 2
- After repeating this process a bit, I'll suppose you got a single address. So, add this address to the list and browse memory region
- As we know, Light address is really close to the Direction address. So, turning a torch on/off we can see where the Light is stored
http://i.imgur.com/DQf8RfW.png
- If you got to this point, you know the address where Light is stored, but you need the pointer path, since it is not static. For this, add the Light address to the list and use Pointer scan for this address CE feature with the following configuration. Hint: begin Max level with 1 and increase it until you got a path
http://i.imgur.com/jQ07giM.png
- Expected result
http://i.imgur.com/AtLhAP5.png