Last active
August 29, 2015 13:56
-
-
Save rissole/9018663 to your computer and use it in GitHub Desktop.
INPUT RANDOM BUTTONS LOL. VBA RERECORDING
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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