Guest User

voiceControl

a guest
Jun 12th, 2013
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. p = peripheral.wrap("right")
  2. function listen()
  3.   local event,player, message = os.pullEvent("chat")
  4.     if player == "hdt80bro" then
  5.     if message == "forward" then
  6.       p = peripheral.wrap("right")
  7.       p.say("Going forward")
  8.       rednet.broadcast("TS Forward")
  9.     elseif message == "back" then
  10.       p = peripheral.wrap("right")
  11.       p.say("Going back")
  12.       rednet.broadcast("TS Backward")
  13.     elseif message == "left" then
  14.       p = peripheral.wrap("right")
  15.       p.say("Turning left")
  16.       rednet.broadcast("TS TurnLeft")
  17.     elseif message == "right" then
  18.       p = peripheral.wrap("right")
  19.       p.say("Turning right")
  20.       rednet.broadcast("TS TurnRight")
  21.     elseif message == "place" then
  22.       p = peripheral.wrap("right")
  23.       p.say("Placed a block")
  24.       rednet.broadcast("TS PlaceBlock")
  25.     elseif message == "attack" then
  26.       p = peripheral.wrap("right")
  27.       p.say("ATTACK!!!!")
  28.       rednet.broadcast("TS Attack")
  29.     elseif message == "dig" then
  30.       p.say("Digging")
  31.       rednet.broadcast("TS Dig")
  32.     elseif message == "up" then
  33.       p.say("Going up")
  34.       rednet.broadcast("TS Up")
  35.     elseif message == "down" then
  36.       p.say("Goind down")
  37.       rednet.broadcast("TS Down")
  38.     end
  39. end
  40. end
  41. listen()
  42. shell.run("voiceControl")
Advertisement
Add Comment
Please, Sign In to add comment