FF7

world map walking battles

FF7
May 2nd, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1.  
  2. local end_frames = pcsx.framecount() + 1728000;
  3. local outfile = assert(io.open("worldmap_walking_rng.txt", "w"));
  4. local start_escapes = memory.readbyte(0x009D2A2);
  5.  
  6. while pcsx.framecount() < end_frames do
  7. while memory.readbyte(0x000F5CF1) == 0 do
  8. joypad.set(1, { ["up"] = true, ["right"] = true });
  9. pcsx.frameadvance();
  10. pcsx.frameadvance();
  11. pcsx.frameadvance();
  12. pcsx.frameadvance();
  13. joypad.set(1, { ["up"] = false, ["right"] = false });
  14. joypad.set(1, { ["down"] = true, ["left"] = true });
  15. pcsx.frameadvance();
  16. pcsx.frameadvance();
  17. pcsx.frameadvance();
  18. pcsx.frameadvance();
  19. joypad.set(1, { ["down"] = false, ["left"] = false });
  20. end
  21. escapes = memory.readbyte(0x009D2A2);
  22. joypad.set(1, { ["l1"] = true, ["r1"] = true });
  23. while memory.readbyte(0x009D2A2) == escapes do
  24. pcsx.frameadvance();
  25. end
  26. joypad.set(1, { ["l1"] = false, ["r1"] = false });
  27. end
  28.  
  29. outfile:write("Start Escapes: ", start_escapes, "\n");
  30. outfile:write("End Escapes: ", memory.readbyte(0x009D2A2), "\n");
  31. outfile:write("Total escapes: ", memory.readbyte(0x009D2A2) - start_escapes, "\n");
  32.  
  33. assert(outfile:close());
  34. gui.text(0, 50, "Done.");
  35. pcsx.pause();
Advertisement
Add Comment
Please, Sign In to add comment