Advertisement
Punio

RIM_lift_move

Nov 20th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. -- #################################
  2. -- vars
  3. -- #################################
  4. args     = { ... }
  5. motor    = peripheral.wrap("bottom")
  6.  
  7. -- #################################
  8. -- main
  9. -- #################################
  10.  
  11. if args[1] ~= nil then
  12.    if args[2] ~= nil and tonumber(args[2]) > 0 then
  13.       if args[1] == "down" then
  14.          motor.move(0, false, false)
  15.       elseif args[1] == "up" then
  16.          motor.move(1, false, false)
  17.       end
  18.    else
  19.       print("no Cycles defined or <= 0 !")
  20.    end
  21. else
  22.    print("no dir defined !")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement