
Originally Posted by
zangetsu
You can do it if you loop through all the enemy NPCs in the players FoV.
Thanks for the info! I'll be testing position spoofing today. I have some more ideas now that I have looked into the functions. Hopefully I can make a few interesting things

Find Terraria.Npc - Scan (4 bytes) for an npc's health, hit it, scan for new value and so on. Find what writes to it, dissect the structure and it will contain the co-ordinates of npcs, I guess you could teleport them around with that.
- - - Updated - - -

Originally Posted by
Crumbler
Hey littlerinser. I have a little request to make. Could you make a hack that would butcher all mobs? Like, for example, find a piece of code that always checks their health and then move 0 into their health.
I managed to get it done:
Code:
{ Game : Terraria.exe
Version:
Date : 2016-12-17
Author : Aragon
This script does blah blah blah
}
[ENABLE]
aobscan(npch,8B 80 F8 00 00 00 8B 95 34 B3 FF FF 3B 82 FC 00 00 00 0F 8C) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
//mov eax,[eax+000000F8]
mov [eax+000000F8],0
jmp return
npch:
jmp code
nop
return:
registersymbol(npch)
[DISABLE]
npch:
db 8B 80 F8 00 00 00
unregistersymbol(npch)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: 37FB0192
37FB015A: F3 0F 7E 06 - movq xmm0,[esi]
37FB015E: 66 0F D6 07 - movq [edi],xmm0
37FB0162: F3 0F 7E 46 08 - movq xmm0,[esi+08]
37FB0167: 66 0F D6 47 08 - movq [edi+08],xmm0
37FB016C: 8B 85 34 B3 FF FF - mov eax,[ebp-00004CCC]
37FB0172: C6 80 5B 01 00 00 00 - mov byte ptr [eax+0000015B],00
37FB0179: 8B 85 34 B3 FF FF - mov eax,[ebp-00004CCC]
37FB017F: 83 B8 B8 00 00 00 FF - cmp dword ptr [eax+000000B8],-01
37FB0186: 0F 85 4A 02 00 00 - jne 37FB03D6
37FB018C: 8B 85 34 B3 FF FF - mov eax,[ebp-00004CCC]
// ---------- INJECTING HERE ----------
37FB0192: 8B 80 F8 00 00 00 - mov eax,[eax+000000F8]
// ---------- DONE INJECTING ----------
37FB0198: 8B 95 34 B3 FF FF - mov edx,[ebp-00004CCC]
37FB019E: 3B 82 FC 00 00 00 - cmp eax,[edx+000000FC]
37FB01A4: 0F 8C 2C 02 00 00 - jl 37FB03D6
37FB01AA: 8B 85 34 B3 FF FF - mov eax,[ebp-00004CCC]
37FB01B0: 80 B8 7F 01 00 00 00 - cmp byte ptr [eax+0000017F],00
37FB01B7: 0F 85 19 02 00 00 - jne 37FB03D6
37FB01BD: 8B 85 34 B3 FF FF - mov eax,[ebp-00004CCC]
37FB01C3: 3A 40 24 - cmp al,[eax+24]
37FB01C6: 8D 40 24 - lea eax,[eax+24]
37FB01C9: D9 40 04 - fld dword ptr [eax+04]
}
- - - Updated - - -

Originally Posted by
Crumbler
zangetsu
How about calling the function that deals damage to npcs?
Keep in mind, the script also kills friendly npcs, there is nothing I can do about that with my knowledge. You could find istownnpc and if it's a 1 mov a different value into it but I can't do that.