PSanf2

Untitled

Jun 26th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. function north(dist)
  2. print("Moving north " .. dist .. "\n")
  3. for i=1,dist do
  4. rs.setBundledOutput("right", 1)
  5. sleep(3)
  6. rs.setBundledOutput("right", 0)
  7. sleep(1)
  8. end
  9. end
  10.  
  11. function south(dist)
  12. print("Moving south " .. dist .. "\n")
  13. for i=1,dist do
  14. rs.setBundledOutput("right", 2)
  15. sleep(3)
  16. rs.setBundledOutput("right", 0)
  17. sleep(1)
  18. end
  19. end
  20.  
  21. function west(dist)
  22. print("Moving west " .. dist .. "\n")
  23. for i=1,dist do
  24. rs.setBundledOutput("right", 4)
  25. sleep(3)
  26. rs.setBundledOutput("right", 0)
  27. sleep(1)
  28. end
  29. end
  30.  
  31. function east(dist)
  32. print("Moving east " .. dist .. "\n")
  33. for i=1,dist do
  34. rs.setBundledOutput("right", 8)
  35. sleep(3)
  36. rs.setBundledOutput("right", 0)
  37. sleep(1)
  38. end
  39. end
  40.  
  41. function up(dist)
  42. print("Moving up " .. dist .. "\n")
  43. for i=1,dist do
  44. rs.setBundledOutput("right", 16)
  45. sleep(3)
  46. rs.setBundledOutput("right", 0)
  47. sleep(1)
  48. endeaw
  49. end
  50.  
  51. function down(dist)
  52. print("Moving down " .. dist .. "\n")
  53. for i=1,dist do
  54. rs.setBundledOutput("right", 32)
  55. sleep(3)
  56. rs.setBundledOutput("right", 0)
  57. sleep(1)
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment