Advertisement
Guest User

Untitled

a guest
May 2nd, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. I want to stop the loop at "until robot.durability()" if slot 1 on the robot is empty.
  2. Can I do 'until robot.durability() or if not getStackInInternalSlot()' ?
  3. Also, is there an easier way to select and drop the content of slot 2 to 11 ?
  4. Thank you so much for your help. Almost done with this program.
  5.  
  6. local function checkTool()
  7.         if not robot.durability() then
  8.               robot.select(2)
  9.               robot.drop()
  10.               robot.select(3)
  11.               robot.drop()
  12.               robot.select(4)
  13.               robot.drop()
  14.               robot.select(5)
  15.               robot.drop()
  16.               robot.select(6)
  17.               robot.drop()
  18.               robot.select(7)
  19.               robot.drop()
  20.               robot.select(8)
  21.               robot.drop()
  22.               robot.select(9)
  23.               robot.drop()
  24.               robot.select(10)
  25.               robot.drop()
  26.               robot.select(11)
  27.               robot.drop()
  28.               robot.select(17)
  29.               robot.transferTo(2)
  30.               c.craft(1)
  31.         until robot.durability()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement