Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. buttons = { };
  2. buttons["Up"] = null;
  3. buttons["Down"] = null;
  4. buttons["Left"] = null;
  5. buttons["Right"] = null;
  6. buttons["Start"] = null;
  7. buttons["Select"] = null;
  8. buttons["Circle"] = null;
  9. buttons["Triangle"] = null;
  10. buttons["Square"] = null;
  11. buttons["Cross"] = null;
  12.  
  13. framewait = 0
  14.  
  15. repeat
  16. console.writeline(framewait)
  17. savestate.loadslot(1)
  18.  
  19. i = 0
  20.  
  21. repeat
  22. emu.frameadvance();
  23. i = i + 1
  24. gui.text (400,400, i)
  25. gui.text (600,600, "frames waited")
  26. gui.text (800,600, framewait)
  27. until (i > framewait)
  28.  
  29. --press cross
  30. buttons["Cross"] = true;
  31. joypad.set(buttons, 1)
  32. emu.frameadvance();
  33.  
  34.  
  35. --wait for a bit fight animation
  36. i = 0
  37.  
  38. repeat
  39. emu.frameadvance();
  40. i = i + 1
  41. gui.text (400,400, i)
  42. gui.text (600,600, "frames waited")
  43. gui.text (800,600, framewait)
  44. until (i == 250)
  45.  
  46. while true do
  47. emu.frameadvance();
  48. gui.text (600,600, "frames waited")
  49. gui.text (800,600, framewait)
  50.  
  51. miss = mainmemory.read_u32_le(0x074074)
  52. attackerone = mainmemory.read_u32_le(0x073A20)
  53. attackertwo = mainmemory.read_u32_le(0x073A24)
  54. attackerthree = mainmemory.read_u32_le(0x073A28)
  55.  
  56.  
  57. --====enemy miss===--
  58. emu.frameadvance();
  59. emu.frameadvance();
  60. emu.frameadvance();
  61. emu.frameadvance();
  62. if (attackerone > 2) then
  63. emu.frameadvance();
  64. emu.frameadvance();
  65. emu.frameadvance();
  66. emu.frameadvance();
  67. if (miss == 1) then
  68. emu.frameadvance();
  69. emu.frameadvance();
  70. emu.frameadvance();
  71. emu.frameadvance();
  72. break
  73.  
  74. end
  75. end
  76.  
  77. --====own hit====--
  78. emu.frameadvance();
  79. emu.frameadvance();
  80. if (attackerone < 4) then
  81. emu.frameadvance();
  82. emu.frameadvance();
  83. emu.frameadvance();
  84. emu.frameadvance();
  85. if (miss == 0) then
  86. emu.frameadvance();
  87. emu.frameadvance();
  88. emu.frameadvance();
  89. emu.frameadvance();
  90. break
  91. end
  92. end
  93.  
  94. --====done====--
  95. if attackertwo == 4294967295 then
  96. framewait = 99999999
  97. break
  98. end
  99. end
  100.  
  101. framewait = framewait + 1
  102.  
  103. until (framewait > 99999999)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement