remie92

Untitled

Feb 26th, 2026 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. function contains_item(item_name)
  2. for i=1,16 do
  3. item=turtle.getItemDetail(i)
  4. if item~=nil then
  5. if item.name==item_name then
  6. return true
  7. end
  8. end
  9. end
  10. return false
  11. end
  12.  
  13. function select_item(item_name)
  14. for i=1,16 do
  15. item=turtle.getItemDetail(i)
  16. if item~=nil then
  17. if item.name==item_name then
  18. turtle.select(i)
  19. end
  20. end
  21. end
  22. end
  23.  
  24. if turtle.detect() then
  25. turtle.turnRight()
  26. turtle.turnRight()
  27. end
  28. while true do
  29. print("I'm now running in 1 PB/Fillup")
  30. sleep(2)
  31. print("Anyway, put the patch/PB in my inventory and I will fill it up :3")
  32.  
  33. can_run=false
  34.  
  35. while can_run==false do
  36. can_run=true
  37. if contains_item("estrogen:estrogen_patches")==false then
  38. can_run=false
  39. end
  40. if contains_item("minecraft:golden_nugget")==true then
  41. select_item("minecraft:golden_nugget")
  42. if turtle.getItemCount()~=1 then
  43. can_run=false
  44. end
  45. else
  46. can_run=false
  47. end
  48. sleep(1)
  49. end
  50. print("Okay! I found it! I'm filling it up now!")
  51. sleep(3)
  52. shell.run("fill_patch.lua")
  53. print("There you go, have fun dashing!")
  54. print()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment