Advertisement
thatparadox

botMove

Dec 14th, 2013
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. --http://www.youtube.com/watch?v=Eq27GOX71TU
  2. mech = peripheral.wrap("right") --attach robot controller
  3.  
  4. mechX, mechY, mechZ = mech.getLocation(1) --assign the mechs coordinates to variables
  5.  
  6. player = mech.getPlayerData(1, "remorsless") --get info on player
  7.  
  8. print("Player at: X "..player.position.x.." Y "..player.position.y.." Z "..player.position.z) --print player location
  9.  
  10. mech.goto(1, player.position.x + mechX, player.position.y + mechY, player.position.z + mechZ) --go to the position of player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement