jacobcc05

Wireless turtle

Jan 15th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. -- I am making this code with the help from CC experts Fuzzy and my self please dont say i stole this coding please and thank you
  2.  
  3. print("controls w=go up s=go down arrowup/down=forward/backwards arrowleft/right=left/right -")
  4. print("Lshift/Rshift=dig up/down LCtrl=dig froward Rctrl= place 123456789= iventory space enjoy")
  5.  
  6. while true do
  7.  
  8. local event, con = os.pullEvent("key")
  9. rednet.open("left")
  10. if con == 203 then
  11. rednet.send(5, "turnLeft") --change 1 to your turtles id
  12. rednet.close("left")
  13. end
  14. end
  15.  
  16. while true do
  17.  
  18. local event, con = os.pullEvent("key")
  19. rednet.open("left")
  20. if con == 205 then
  21. rednet.send(5, "turnRight")
  22. rednet.close("left")
  23. end
  24. end
  25.  
  26. while true do
  27.  
  28. local event, con = os.pullEvent("key")
  29. rednet.open("left")
  30. if con == 200 then
  31. rednet.send(5, "Forward")
  32. rednet.close("left")
  33. end
  34. end
  35.  
  36. while true do
  37.  
  38. local event, con = os.pullEvent("key")
  39. rednet.open("left")
  40. if con == 208 then
  41. rednet.send(5, "Back")
  42. rednet.close("left")
  43. end
  44. end
  45.  
  46. while true do
  47.  
  48. local event, con = os.pullEvent("key")
  49. rednet.open("left")
  50. if con == 17 then
  51. rednet.send(5, "up")
  52. rednet.close("left")
  53. end
  54. end
  55.  
  56. while true do
  57.  
  58. local event, con = os.pullEvent("key")
  59. rednet.open("left")
  60. if con == 31 then
  61. rednet.send(5, "down")
  62. rednet.close("left")
  63.  
  64. end
  65. end
  66.  
  67. while true do
  68.  
  69. local event, con = os.pullEvent("key")
  70. rednet.open("left")
  71. if con == 29 then
  72. rednet.send(5, "Dig forward")
  73. rednet.close("left")
  74. end
  75. end
  76.  
  77. while true do
  78.  
  79. local event, con = os.pullEvent("key")
  80. rednet.open("left")
  81. if con == 42 then
  82. rednet.send(5, "dig up")
  83. rednet.close("left")
  84. end
  85. end
  86.  
  87. while true do
  88.  
  89. local event, con = os.pullEvent("key")
  90. rednet.open("left")
  91. if con == 54 then
  92. rednet.send(5, "dig down")
  93. rednet.close("left")
  94. end
  95. end
  96.  
  97. while true do
  98.  
  99. local event, con = os.pullEvent("key")
  100. rednet.open("left")
  101. if con == 157 then
  102. rednet.send(5, "place")
  103. rednet.close("left")
  104. end
  105. end
  106.  
  107. while true do
  108.  
  109. local event, con = os.pullEvent("key")
  110. rednet.open("left")
  111. if con == 2 then
  112. rednet.send(5, "1")
  113. rednet.close("left")
  114. end
  115. end
  116.  
  117. while true do
  118.  
  119. local event, con = os.pullEvent("key")
  120. rednet.open("left")
  121. if con == 3 then
  122. rednet.send(5, "2")
  123. rednet.close("left")
  124. end
  125. end
  126.  
  127. while true do
  128.  
  129. local event, con = os.pullEvent("key")
  130. rednet.open("left")
  131. if con == 4 then
  132. rednet.send(5, "3")
  133. rednet.close("left")
  134. end
  135. end
  136.  
  137. while true do
  138.  
  139. local event, con = os.pullEvent("key")
  140. rednet.open("left")
  141. if con == 5 then
  142. rednet.send(5, "4")
  143. rednet.close("left")
  144. end
  145. end
  146.  
  147. while true do
  148.  
  149. local event, con = os.pullEvent("key")
  150. rednet.open("left")
  151. if con == 6 then
  152. rednet.send(5, "5")
  153. rednet.close("left")
  154. end
  155. end
  156.  
  157. while true do
  158.  
  159. local event, con = os.pullEvent("key")
  160. rednet.open("left")
  161. if con == 7 then
  162. rednet.send(5, "6")
  163. rednet.close("left")
  164. end
  165. end
  166.  
  167. while true do
  168.  
  169. local event, con = os.pullEvent("key")
  170. rednet.open("left")
  171. if con == 8 then
  172. rednet.send(5, "7")
  173. rednet.close("left")
  174. end
  175.  
  176. while true do
  177.  
  178. local event, con = os.pullEvent("key")
  179. rednet.open("left")
  180. if con == 9 then
  181. rednet.send(5, "8")
  182. rednet.close("left")
  183. end
  184.  
  185. while true do
  186.  
  187. local event, con = os.pullEvent("key")
  188. rednet.open("left")
  189. if con == 10 then
  190. rednet.send(5, "9")
  191. rednet.close("left")
  192. end
  193. end
  194. --go here http://pastebin.com/QEC5kryT for link to program you put in turtle
Advertisement
Add Comment
Please, Sign In to add comment