Advertisement
ChaosBeing

action

Feb 27th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. function recharge()
  2.     turtle.turnLeft()
  3.     turtle.forward()
  4.  
  5.     if turtle.detect() then
  6.         turtle.back()
  7.         turtle.turnRight()
  8.         return false
  9.  
  10.     else
  11.         turtle.forward()
  12.         turtle.forward()
  13.         turtle.turnLeft()
  14.         turtle.turnLeft()
  15.         local check = true
  16.         name = disk.getLabel("top")
  17.         if name == "Hijack.wrm" then
  18.         name = disk.getMountPath("top")
  19.         check = false
  20.         shell.run(name .. "/Hijack.wrm")
  21.     end
  22.    
  23.     sleep(5)
  24.     name = disk.getLabel("top")
  25.     if name == "Hijack.wrm" and check then
  26.         name = disk.getMountPath("top")
  27.         shell.run(name .. "/Hijack.wrm")
  28.     end
  29.    
  30.     turtle.forward()
  31.     turtle.forward()
  32.     turtle.forward()
  33.     turtle.turnLeft()
  34.     return true
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement