Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. local function sleep(n)
  2.     local time = emu.framecount() + n
  3.     repeat emu.frameadvance() until emu.framecount() > time
  4. end
  5.  
  6. function blueR()
  7.     joypad.set(inputsA,1)
  8.     sleep(2)
  9.     joypad.set(inputsR,1)
  10. end
  11. function redR()
  12.         joypad.set(inputsA,1)
  13.         sleep(2)
  14.         joypad.set(inputsA,1)
  15.         sleep(2)
  16.         joypad.set(inputsR,1)
  17.         sleep(2)
  18. end
  19. function blueL()
  20.     joypad.set(inputsA,1)
  21.     sleep(2)
  22.     joypad.set(inputsL,1)
  23. end
  24. function redL()
  25.         joypad.set(inputsA,1)
  26.         sleep(2)
  27.         joypad.set(inputsA,1)
  28.         sleep(2)
  29.         joypad.set(inputsL,1)
  30.         sleep(2)
  31. end
  32.  
  33. inputsA = {}
  34. inputsB = {}
  35. inputsR = {}
  36. inputsL = {}
  37. inputsD = {}
  38. inputsA['A']=0
  39. inputsB['B']=0
  40. inputsR['Right']=0
  41. inputsL['Left']=0
  42. inputsD['Down']=0
  43. for t = 0,10 do
  44.     for i = 0,4 do
  45.         blueR()
  46.         sleep(2)
  47.         redR()
  48.         if i == 4 then
  49.             joypad.set(inputsD,1)
  50.             for o = 0,4 do
  51.                 blueL()
  52.                 sleep(2)
  53.                 redL()
  54.                 --joypad.set(inputsA,1)
  55.                 --sleep(2)
  56.                 --joypad.set(inputsA,1)
  57.                 --sleep(2)
  58.                 --joypad.set(inputsL,1)
  59.                 if o == 4 then
  60.                     joypad.set(inputsD,1)
  61.                 end
  62.             end
  63.         end
  64.     end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement