help me to attack the nearest monster

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
amoet123
What is cheating?
What is cheating?
Posts: 1
Joined: Sat Mar 09, 2024 10:41 pm
Reputation: 0

help me to attack the nearest monster

Post by amoet123 »

I tried making a bot and it's worked but my problem was that the monster targets were always random and erratic because I had difficulty creating a script for the distance from the character to the monster and making this script select the closest monster, I tried to make the script it always failed and crashed

Code: Select all

[ENABLE]
unregistersymbol(Add_Target)
{$lua}
errorOnLookupFailure(false)
registerSymbol("Add_Target", getAddress('["robin.exe"+00557653]+0'))
errorOnLookupFailure(true)
{$asm}

//code from here to '[DISABLE]' will be used to enable the cheat
alloc(names,48)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(tutut)
label(target)
names:
db 'Buny'   


newmem:

originalcode:
fld dword ptr [ecx+30]
fstp dword ptr [esp]
push eax
mov eax,[names]
cmp [ecx+10],eax
pop eax
je tutut
jmp returnhere

tutut:
cmp [Add_Target+04],-1
je target
jmp returnhere

target:
mov [Add_Target],1
push eax
mov eax,[ecx+08]
mov [Add_Target+04],eax
pop eax
jmp returnhere

exit:
jmp returnhere

"robin.exe"+8A95B:
jmp newmem
nop

returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
unregistersymbol(Add_Target)
dealloc(newmem)
dealloc(tutut)
"robin.exe"+8A95B:
fld dword ptr [ecx+30]
fstp dword ptr [esp]

Post Reply

Who is online

Users browsing this forum: No registered users