Kirkq

DQ3 Script 1

Feb 27th, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. local ThisEncounterCounter = 0
  2. local LastEncounterCounter = 0
  3. local EncounterDepletion = 0
  4.  
  5. while true do
  6.  
  7. ThisEncounterCounter = memory.read_u16_le(0xF796)
  8.  
  9. if(LastEncounterCounter ~= ThisEncounterCounter) then
  10. EncounterDepletion = LastEncounterCounter - ThisEncounterCounter
  11. end
  12.  
  13. -- 768 - 11264
  14. gui.text(0,0,"Encounter Counter: " .. memory.read_u16_le(0xF796))
  15. if(EncounterDepletion > 0) then
  16. gui.text(0,15,"Depletion: " .. EncounterDepletion) --Also 0x06B8
  17. end
  18. gui.text(0,60,"RNGA: " .. memory.read_u16_le(0x7F7A))
  19. gui.text(0,75,"RNGB: " .. memory.read_u16_le(0x7F7C))
  20. -- The RNG is cycle based and thus can change based on buttons you press.
  21. -- RNGA is two frames before RNGB. They may or may not affect each other.
  22.  
  23. LastEncounterCounter = ThisEncounterCounter
  24.  
  25. emu.frameadvance()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment