hey folks, what are the methods to attack a creature? i'm puzzling over this
hey folks, what are the methods to attack a creature? i'm puzzling over this
3 ways on the top of my mind.
Mouse simulation, either by clicking directly on the gamescreen or on the battlelist.
Calling internal functions for attacking.
Sending an attack packet.
Made a quick test for method #2
This will work when you are injected. If you're not you can use codecavesCode:DWORD id = 0; //Id of the creature you want to attack *(DWORD*)(0x8195AC) = id; //0x8195AC is the red square address __asm{ MOV ECX, id MOV EAX, 0x416A30 CALL EAX }
Last edited by ottizy; 09-08-2014 at 12:55 PM.
I thought about making a click in the battle, but I need the position of the creature in the b list
I think by calling internal function could be a little less difficult than that
Could you explain a little this function? thank bro
internal function does not need to inject dll, right?
To call one of Tibias functions you do need to either inject a DLL or write a code cave and modify some assembly. Injecting a DLL would be simpler IMO, since you can at least debug it slightly, whereas with assembly you don't get quite as much information.
Personally, if you're not injected I'd advise:
1. Sending a packet by writing to Tibias memory
2. Right clicking the battle list
And my input on "how to":
1. No idea, not done it before.
2. Find the GUI structure in Tibia, by resizing the battle list object and searching for changed value, it's a level 3 or 4 pointer IIRC, so you'll need to get a list of 10-20 values and find level 3-4 pointers to them, then work out which come back when you restart Tibia or whatever. Now you can simply analyse the battle list structure to work out if the list of heroes is actually in any order relative to what it is in the display (I believe it is), then you just use basic math to calculate the position of the creature within the battle list, and using information about how far you have scrolled (from the battle list pointer you found earlier) you should be able to pinpoint exactly where the creatures are in the battle list. Further to that, you will likely find this way very easy as if you track the creatures in the battle list, you can easily access their last known location when they died, giving you hints for your looter to work from.
GL