SHARE
TWEET

SMRPG-EnemyMiss-snes9x

cleartonic Mar 13th, 2017 (edited) 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --  174 frames. If 7EFC11 is [check value] when 150 frames from confirming attack, miss.
  2.  
  3. -- Geno : 100 frames
  4. -- Bowser : 72 frames
  5. -- Mario : 100 frames (to be safe)
  6.  
  7. --
  8. -- TO TEST: from pidge
  9. -- Hammer Bro: 10%
  10. -- Croco: 20%  
  11. -- Valentina: 10%
  12. -- Czar Dragon: 20%
  13. -- Axem Red: 10%
  14.  
  15. -- MAGIKOOPA : "Millnium: Unarmed bowser attack missing magikoopa"
  16. --
  17.  
  18. -- Snes9x 1.51 v7 (provided with SMRPG RTA savestates)
  19.  
  20.  
  21. hit = 0
  22. miss = 0
  23. error1 = 0
  24. counter1 = 150
  25. total = 1000
  26. byteread = 0x7EFC11
  27. -- 00FC11 for Czar  |  00FC91 for Zombone
  28. -- 7EFDC5 for Axem Red
  29. bytevalue = 64
  30. -- 120 for Czar | Variable (8) for Zombone
  31. state1 = savestate.create(1)
  32.  
  33. function advance()
  34.     counter2 = counter1
  35.     while counter2 > 0 do
  36.         emu.frameadvance()
  37.         counter2 = counter2 - 1
  38.         gui.text(0,0,'Hit:'..hit)
  39.         gui.text(0,10,'Miss:'..miss)
  40.         gui.text(0,20,'Percentage:'..(hit/(hit+miss)))
  41.         gui.text(0,30,memory.readbyte(byteread))
  42.     end
  43.     emu.frameadvance()
  44.    
  45. end
  46.  
  47.  
  48. while total > 0 do
  49.     savestate.load(state1)
  50.     emu.frameadvance();
  51.     emu.frameadvance();
  52.     joypad.set({A=true},1) 
  53.     savestate.save(state1);
  54.     gui.text(0,0,'Hit:'..hit)
  55.     gui.text(0,10,'Miss:'..miss)
  56.     gui.text(0,20,'Percentage:'..(hit/(hit+miss)))
  57.     gui.text(0,30,memory.readbyte(byteread))
  58.     advance()
  59.     if memory.readbyte(byteread) == bytevalue then
  60.         miss = miss + 1
  61.         gui.text(0,0,'MISS')
  62.         gui.text(0,10,memory.readbyte(byteread))
  63.     else
  64.         hit = hit + 1
  65.         gui.text(0,10,memory.readbyte(byteread))
  66.         gui.text(0,20,'HIT')
  67.     end
  68.  
  69.     emu.frameadvance();
  70.     emu.frameadvance();
  71.     emu.frameadvance();
  72.     emu.frameadvance();
  73.     emu.frameadvance();
  74.     emu.frameadvance();
  75.     emu.frameadvance();
  76.    
  77.    
  78.     total = total - 1
  79. end
  80.  
  81. while true do
  82.     emu.frameadvance();
  83.     gui.text(0,0,'Hit:'..hit)
  84.     gui.text(0,20,'Miss:'..miss)
  85.     gui.text(0,40,'Percentage:'..(hit/(hit+miss)))
  86.  
  87. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top