Skip to content

Instantly share code, notes, and snippets.

@rissole
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rissole/9018663 to your computer and use it in GitHub Desktop.
Save rissole/9018663 to your computer and use it in GitHub Desktop.
INPUT RANDOM BUTTONS LOL. VBA RERECORDING
local BUTTONS = {
{'A',1},
{'B',1},
{'start',0.5},
{'select',1},
{'right',1},
{'up',1},
{'left',1},
{'down',1}
}
local function random_choice(t)
return t[math.random(#t)]
end
local function random_input()
local button = random_choice(BUTTONS)
if (math.random() <= button[2]) then
joypad.set(1, {[button[1]] = 1})
print(button[1])
end
end
math.randomseed(os.time())
for _=1,3 do
math.random()
end
while true do
random_input()
vba.frameadvance()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment