cht = { left = { {right=true, A=true}, {left=true}, {left=true, A=true}, {right=true, A=true}, {left=true}, {left=true} }, right = { {left=true, A=true}, {right=true}, {right=true, A=true}, {left=true, A=true}, {right=true}, {right=true} }, quick = { {B=true}, {}, {}, {}, {}, {}, {}, {}, {up=true, A=true} } } v = 1 pos = "right" emu.message("Ready."); while (true) do local t = joypad.get(1) if (t.up or t.select) then if (t.select) then pos="quick" end joypad.set(1, cht[pos][v]); v = v + 1 if (v>table.getn(cht[pos])) then v=1 end else v = 1 if (t.left) then pos = "left" elseif (t.right) then pos = "right" end end emu.frameadvance() end