User File #638432796774641328

Upload All User Files

#638432796774641328 - LEGO Indiana Jones - The Original Adventures DS Lua File

The Original Adventures DS.lua
System: Nintendo DS
26 downloads
Uploaded 2/11/2024 8:21 PM by inconsistent (see all 18)
Displays the position and state for the currently played character in the OSD, has pointers for both US and EU
-- Script for LEGO Indiana Jones DS - The Original Adventures
-- US X POINTER: 0x15BBFC
-- EU X POINTER: 0x15BB1C 

local isUS = true

while true do
    memory.usememorydomain("Main RAM")    
    local xPointerAddress = 0x15BBFC
    local StateAddress = 0x13BE10

    if not isUS then 
          xPointerAddress = 0x15BB1C
          StateAddress = 0x13BD30
    end
    
    xPointer = memory.read_s32_le(xPointerAddress)
    X = memory.read_s32_le(xPointer & 0xFFFFFF)
    Y = memory.read_s32_le(xPointer + 4 & 0xFFFFFF)
    Z = memory.read_s32_le(xPointer + 8 & 0xFFFFFF)
    State = memory.read_u8(StateAddress)

    gui.text(1,120, "X: " .. X, "white")
    gui.text(1,140, "Y: " .. Y, "white")
    gui.text(1,160, "Z: " .. Z, "white")
    gui.text(1,180, "State: " .. State, "white")

    emu.frameadvance()
end