-
Member
[C#] Help ObjMgr Units\Players Enemy
Hello! please help me find a solution.
how to search for enemy unit \ players?
or unit \ players who can attack ...
Code:
public bool IsEnemy
{
get {
uint by = ObjectManager.Memory.ReadUInt(BaseAddress + 0x8);
return ObjectManager.Memory.Read(????????????)
}
}
I apologize for my bad English.
-
Contributor
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
-
Member
I apologize once again have to bother.
my experience is very bad in the hook.
or I'm doing is not what we need.
Code:
public uint Reaction
{
get
{
return WoW.Lua.UnitReaction(BaseAddress, ObjtMgr.Me.BaseAddress);
}
}
////////////////////////////////////////////////////////////////////////////////////
public static uint UnitReaction(uint baseaddress, uint Me)
{
uint pReaction = Hook.Memory.AllocateMemory(0x4);
string[] asm = new string[]
{
"push " + baseaddress,
"mov ecx, " + Me,
"call " + Hook.Process.BaseOffset()+(uint)0x8E7F40,
"mov [" + pReaction + "], eax",
"retn",
};
WoW.Lua.Hook.InjectAndExecute(asm);
uint reaction = Hook.Memory.ReadUInt(pReaction);
Hook.Memory.FreeMemory(pReaction);
return reaction;
}
//////////////////////////////////////////////////////////////////////////////////////////
error:
throw gcnew Exception(String::Format("Assembly failed! Error code: {0}; Error Line: {1}", fasm_state->error_code, fasm_state->error_data->line_number));
As I understand it, the problem AllocateMemory (0x4) - how to count?
or in something else?
is it possible to ask you for a more recent example UnitReaction?
very difficult to learn misunderstanding how it should work =)
sorry for my disgusting English
-
Contributor
Do you need those information for Players (Enemy and Friends) or NPCs?
-
Member
do for BG and AOE packs
1. find all targets within 30 yards of me (Units \ Players) - OK
2. distinguish them from enemies -
3. check on dead - OK
4. Check Availability my debuffs - OK
there was only a 2 point
-
Legendary
-
Post Thanks / Like - 1 Thanks
BersAcc (1 members gave Thanks to TOM_RUS for this useful post)