Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tHandlers = {
- ["B"] = turtle.back,
- ["D"] = turtle.down,
- ["F"] = turtle.forward,
- ["L"] = turtle.turnLeft,
- ["O"] = turtle.placeUp,
- ["P"] = turtle.place,
- ["Q"] = turtle.placeDown,
- ["R"] = turtle.turnRight,
- ["U"] = turtle.up
- }
- local function exec(command)
- if type(command) ~= "string" then return end
- for i = 1, #command do
- local cmd = tHandlers[command:sub(i,i)]
- if cmd then cmd() end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement