Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- memory.usememorydomain("CARTROM")
- local function chestHitbox()
- cam_x = mainmemory.read_u16_le(0x15DD)
- cam_y = mainmemory.read_u16_le(0x15E1)
- offset = 0x90F
- slots = 0x1F
- for i = 0, slots, 1 do
- asd = mainmemory.read_u16_le(offset)
- asd2 = mainmemory.read_u16_le(offset+4)
- if asd == 0x0101 and asd2 == 0x02B6 then
- type = bit.lshift(mainmemory.readbyte(offset + 0x06), 1)
- x_rad = memory.read_u8(0x5BDE + type)
- y_rad = memory.read_u8(0x5BDE + type + 1)
- x_pos = mainmemory.read_u16_le(offset + 0x1F)
- y_pos = mainmemory.read_u16_le(offset + 0x22)
- gui.drawRectangle(x_pos - cam_x - x_rad, y_pos - cam_y - y_rad, x_rad * 2, y_rad * 2, 0x9900FF00, 0) --hitbox
- chestNumber = mainmemory.read_u8(0x0337)
- gui.drawText(x_pos - cam_x - x_rad, y_pos - cam_y - y_rad, chestNumber + 1, 0xBBFFFFFF, 0, 10)
- end
- offset = offset + 0x41
- end
- end
- while true do
- chestHitbox()
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement