Advertisement
LDDestroier

Improved Miner CLIENT

Dec 16th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.66 KB | None | 0 0
  1. rednet.open("back")
  2. print("Computercraft Turtle Client")
  3. print("---------------------------")
  4. print("I - Tunnel SLANTED DOWN")
  5. print("O - Tunnel FORWARD")
  6. print("P - Tunnel SLANTED UP")
  7. print("J - Dig DOWN")
  8. print("K - Dig FORWARD")
  9. print("L - Dig UP")
  10. print("B - Place DOWN")
  11. print("N - Place FORWARD")
  12. print("M - Place UP")
  13. print("Z - Attack DOWN")
  14. print("X - Attack FORWARD")
  15. print("C - Attack UP")
  16. while true do
  17.  --Broadcasting
  18.   local event, key = os.pullEvent("char")
  19.  --Basic Movement
  20.   if key == "w" then
  21.     rednet.broadcast("forward")
  22.   end
  23.   if key == "a" then
  24.     rednet.broadcast("left")
  25.   end
  26.   if key == "s" then
  27.     rednet.broadcast("backward")
  28.   end
  29.   if key == "d" then
  30.     rednet.broadcast("right")
  31.   end
  32.   if key == "q" then
  33.     rednet.broadcast("up")
  34.   end
  35.   if key == "e" then
  36.     rednet.broadcast("down")
  37.   end
  38.  --More Actions
  39.   if key == "i" then
  40.     rednet.broadcast("tunnelDown")
  41.   end
  42.   if key == "o" then
  43.     rednet.broadcast("tunnelForward")
  44.   end
  45.   if key == "p" then
  46.     rednet.broadcast("tunnelUp")
  47.   end
  48.   if key == "j" then
  49.     rednet.broadcast("digDown")
  50.   end
  51.   if key == "k" then
  52.     rednet.broadcast("digForward")
  53.   end
  54.   if key == "l" then
  55.     rednet.broadcast("digUp")
  56.   end
  57.   if key == "b" then
  58.     rednet.broadcast("placeDown")
  59.   end
  60.   if key == "n" then
  61.     rednet.broadcast("placeForward")
  62.   end
  63.   if key == "m" then
  64.     rednet.broadcast("placeUp")
  65.   end
  66.   if key == "z" then
  67.     rednet.broadcast("attackDown")
  68.   end
  69.   if key == "x" then
  70.     rednet.broadcast("attackForward")
  71.   end
  72.   if key == "c" then
  73.     rednet.broadcast("attackUp")
  74.   end
  75.   if key == "x" then
  76.     return
  77.   end
  78. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement