Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Nitrodon's 7th Saga encounters script.
- local xcoord
- local ycoord
- local region
- local encmap
- local encgroups
- while true do
- if memory.readbyte(0x7e0722) ~= 2 then
- xcoord = math.floor((memory.readword(0x7e07a8) + memory.readword(0x7e0a91)+16)/32)
- ycoord = math.floor((memory.readword(0x7e07b0) + memory.readword(0x7e0a94)+16)/32)
- region = math.floor(xcoord/8) - 64*math.floor(xcoord/512) + 64*math.floor(ycoord/8) - 4096*math.floor(ycoord/512)
- encmap = memory.readword(0x7e07a3) + 0x10000*memory.readbyte(0x7e07a5)
- if memory.readbyte(0x7e0723) == 0 and AND(memory.readbyte(0x7e4e03), 0x04) ~= 0 then
- encgroups=0xc05f6f
- else
- encgroups=0xc058df
- end
- gui.text(0,210,"Current location: (" .. xcoord .. ", " .. ycoord .. ")")
- if memory.readbyte(0x7e0723) ~= 2 then
- gui.text(0,200,"Encounter region: " .. memory.readbyte(encmap+region))
- end
- else
- gui.text(0,190,"Enemy HP:")
- if AND(memory.readword(0x7e1e9e),0xa000) == 0 then
- gui.text(96,190,memory.readword(0x7e1e84))
- end
- if AND(memory.readword(0x7e1f1e),0xa000) == 0 then
- gui.text(160,190,memory.readword(0x7e1f04))
- end
- if AND(memory.readword(0x7e1f9e),0xa000) == 0 then
- gui.text(224,190,memory.readword(0x7e1f84))
- end
- end
- snes9x.frameadvance();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement