i've been using this to watch the rng:
while true do
gui.text(1,185, string.format("%08X %08X", memory.readdword(0x02216248), memory.readdword(0x02216244)))
emu.frameadvance()
end
lua is using windows' definition of a word when it runs, so you need to define a 32-bit value as a dword. also, for anyone who wants to try this out and isn't aware, the string.format method is really close to printf(), so you can use the variable definitins and other stuff for string.format(). for example, "%08X" is a capital letter hex value 8 digits large. "%08x" is the same thing but with lower case hex values, "%08u" is unsigned decimal, etc