FF7

working wmap

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