One of the params is the levelarea id dunno if ure confusing it with the worldId
One of the params is the levelarea id dunno if ure confusing it with the worldId
with acdguid do you mean the "second" guid thats inside an actor?
In actor: "normal guid" at 0x0, then "second guid / acdguid" at 0x4, and then the modelname starting at 0x8 ?
that does the same, maybe I still ahve the wrong world Id, how do you know in which worldid you are?
nesox, are scene and levelarea two different words for the same thing??
It's not the same, levelareas contains definitions on monster spawns IIRC.
Scenes contains data like navigable areas, navcells/gridsquares etc.
You are talking about a RActor btw.
struct RActor
{
int RActorGuid;
int ACDGuid;
BYTE Name[128];
...
};
You can you use the ACDGuid to lookup it's corresponding ACD object if it's an ACD based RActor.
If it's -1 it's not.
Last edited by Nesox; 05-17-2012 at 10:09 AM.
Hmm ok, then I'm already using the right target Id. But the hero is still holding position.
What about the levelarea then? Is it contained inside the RActor?
Hm yes i think so, you could also check the current scene there's à reference to it there.
If you check usages on "DefLevelArea" the ptr that is passed as this for GetSNORecord when
getting à LevelArea record to figure out what offset it has.
IIRC it's in the ACD struct right after Name.
Now I'm using the value in ACD right after the name. It seems to be the correct one.
The only thing that changed is that he's now:
a) attacking when the target is out of range
and b) holding position and doing nothing if he's in range
something is seriously wrong, but i'm sure im using the right values...
any idea
it worked so good before in the beta, and now in retail its not working at all.
strange thing is, that walking/moving works perfectly, just when using attacks he doesn't move.
thank you so much for your help nesox
Last edited by ChrisSch; 05-17-2012 at 11:00 AM.
Its pretty individual depending on what power you are using.
Best way to figure it out would be to put à breakpoint right after esi is assigned then check that register what value it's holding.
Ie. Not all spells requires you to pass 2 as the second arg, also if you specify the ACDGuid you shouldn't specify any position.
You really have to check what args is passed depending on what spell is being cast, stuff like AXE_Operate_Gizmo/Unit is using different args IIRC well, not the same as spells atleast.
Good luck
Last edited by Nesox; 05-17-2012 at 11:06 AM.
I am only using cleave and jump attack from the barbarian.
After double-checking everything I've got casting to a position to work. (Like barbarian jump-attack)
But cleave still doesn't work, he's just standing there and does nothing when the mob is too close. And when its to far away he only attacks into the direction where the mob is standing, but he doesn't walk to it to get in range.
Am I really the only one with this problem after the patch?
the "wholdid" i referred to was at (beta. didn´t update yet) world + 0x08, scene + 0x08, ractor + 0xD8.
That's weird UsePower didn't change since the beta afaik.
If your args is right there should be no problem.
Try copying all args it's using when you cast cleave, put a bp in UsePower etc. then just copy them and try to call it with those args, if that doesn't work there's nothing wrong with your args but something else, dunno what else to tell you
Just a thought, set up breakpoints and test the function normally and with the shift key held in-game. Ofc, shift key holds ur character inplace.
Doesn't matter if I hold shift or not, the command structure and function parameters are the same.
Both times the function is called with 1,1,PointerToHero and EAX = AddressOfHeroRActor, ESI = the usepower structure
The structure looks like this (with and without shift)
spell id,
spell id,
1,
TargetACDId,
0.0,
0.0,
0.0,
0
0xffffffff (-1)
The function I'm using is 0x97A0D0, that should be the right usepower function, or not ?
disabling my anti-virus fixed the error with the hero stopping when mobs are too close.
but he still doesn't want to walk towards the mobs when fighting...
walking and operating gizmos works as well as picking up items (he walks to it and picks it up), but when fighting he doesnt move
Last edited by ChrisSch; 05-18-2012 at 06:17 AM.
Does anyone know what triggers repeated skill use? When holding the button down UsePower only fires once, and the parameters are identical to that of a single cast.
ChrisSh, I was using the same function in beta. I haven't bothered with my bot after retail.. yet (stuck at inferno right now).
I didn't recognize the hold position problem because I always explicitly walked up to mobs beforehand.
But I just pulled up OllDbg and did some testing with a barb.
Let me note some findings.
- 0097A310 calls 0097A0D0
- The first spell ID is the spell the character is "trying" to cast. The second one is the actual spell ID. For example, if the barb is out of fury, the rend skill will just turn into a normal attack.
- the 3rd DWORD in the use-power struct is 2 when your mouse is not hovering over mobs.
- The 8th DWORD is the first RActor GUID (i.e. 772E0000)
I don't have a real solution for the hold position problem. But it's easily circumvented by just checking the distances and walking up to the mobs explicitly. If further probing of the function at 0097A0D0 is futile, you can try 0097A310.
_Mike, I think you can just spam that function. Have you tried that? Though, I do remember playing with the first 2 args (with 0's and 1's).
Last edited by st0724; 05-18-2012 at 11:51 PM.