-
Member
[Help] How to find InteractUnit function
And yet again... function addresses and offsets
I am working on my first fishing bot for 5.4.8 18414 x64 and I am stuck at finding InteractUnit function address for opening loot window
Script_InteractUnit offset from info dump is not working for me (I know that info dumps are made for x32, I tested it on x32 and it's never called on interaction with anything + I found x64 analog and it don't work either)
I tried to use CTM for interaction with bobber, but it's just not working
So my questions:
Do I even need Script_InteractUnit to open this loot window or it can be done by another function? (maybe DoString or idk)
How can I manually find InteractUnit address? Not asking for spoonfeeding, just for place from where to start
-
Contributor
Search for the string InteractUnit, that'll take you to the string in the data section. List cross references to that. You'll find one where there is the string, then a sub_xxxxxx (real address would be there, not x's). That'll take you to the Script_InteractUnit lua function.
-
Member
Originally Posted by
scizzydo
Search for the string InteractUnit, that'll take you to the string in the data section. List cross references to that. You'll find one where there is the string, then a sub_xxxxxx (real address would be there, not x's). That'll take you to the Script_InteractUnit lua function.
Yeah I did that and it got me to the InteractUnit function, but it's never called on interaction with anything and throws exceptions when I try to call it
Is it possible to open loot window with some other function?
-
Member
-
Contributor
you can but you need to pass the state and push all the correct values to the stack. I suggest you read into how LUA works if you want to take the approach. Most of them are ret checked too.
-
Member
You all prob know this already, but for some starters like me in the future
I misunderstood meaning of Script_InteractUnit function
I was trying to find what function is called when I actually click on bobber to interact, but Script_InteractUnit is not about it
It's called when you manually run script from game (like /run InteractUnit('target') in chat)
When I understood it, it was easier for me just to unlock that specific function and simulate keypress on macro bind
Anyways, thanks for replies!
-
Post Thanks / Like - 1 Thanks