Advertisement
Entityreborn

move

Apr 26th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. arg = { ... }
  2. direction = arg[1]
  3. tosend = false
  4. print(direction)
  5. if direction == "down" then
  6.     tosend = "move.down"
  7. elseif direction == "up" then
  8.     tosend = "move.up"
  9. elseif direction == "north" then
  10.     tosend = "move.north"
  11. elseif direction == "south" then
  12.     tosend = "move.south"
  13. elseif direction == "west" then
  14.     tosend = "move.west"
  15. elseif direction == "east" then
  16.     tosend = "move.east"
  17. end
  18.  
  19. if (tosend ~= false) then
  20.     print("Sending "..tosend)
  21.     modem.transmit(targetChannel,myChannel,tosend)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement