Advertisement
TheModerGuy

tele helper

Feb 9th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.     print("Welcome To tele helper 1.2")
  4.     print("Side?: ")
  5.     local side=io.read()
  6.     local t=peripheral.wrap( side )
  7. local x,y,z=t.getTargetCoordinates()
  8. local tx,ty,tz
  9. local input
  10.    
  11. local function status()
  12.     print(" ")
  13.     x,y,z=t.getTargetCoordinates()
  14.     print("Current Status: ")
  15.     print("EU Stored: "..t.getEnergyLevel())
  16.     print("Lock?: "..tostring(t.hasLock()))
  17.     print("Target: "..x.." "..y.." "..z)
  18.     print("Freq: "..t.getFrequency())
  19.     print(" ")
  20. end
  21.  
  22. local function clear()
  23.     term.clear()
  24.     term.setCursorPos(1,1)
  25. end
  26.  
  27.  
  28.     print(" ")
  29.     print("Please Input Position: ")
  30.     print("X: ")
  31.     tx=io.read()
  32.     print("Y: ")
  33.     ty=io.read()
  34.     print("Z: ")
  35.     tz=io.read()
  36.     t.setTargetCoordinates(tx, ty, tz)
  37.     print(" ")
  38.  
  39.  
  40.     print(" ")
  41.     print("Lock?: ")
  42.     input=io.read()
  43.     if input=="yes" then
  44.     t.acquireLock()
  45.     print("Locked?: "..tostring(t.hasLock()))
  46.     print("Strength: "..getLockStrength())
  47.     else
  48.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement