public
Created

Walk around in the grass

  • Download Gist
shinypokemon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
require "gd"
for i=1,5000 do
savestate.load(0)
for j=1,1000 do
r = math.random(10)
print(r)
if r == 1 then joypad.set(1, {up=1})
elseif r == 2 then joypad.set(1, {up=1, right=1})
elseif r == 3 then joypad.set(1, {right=1})
elseif r == 4 then joypad.set(1, {right=1, down=1})
elseif r == 5 then joypad.set(1, {down=1})
elseif r == 6 then joypad.set(1, {down=1, left=1})
elseif r == 7 then joypad.set(1, {left=1})
elseif r == 8 then joypad.set(1, {left=1, up=1})
else joypad.set(1, {})
end
emu.frameadvance()
end
gdstr = gui.gdscreenshot()
ss = string.format('C:\\Users\\steev\\Desktop\\shiny\\%d.png',i)
gd.createFromGdStr(gdstr):png(ss)
savestate.save(i)
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.