Page 1 of 1

help me to attack the nearest monster

Posted: Sat Mar 09, 2024 10:59 pm
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]