Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function contains_item(item_name)
- for i=1,16 do
- item=turtle.getItemDetail(i)
- if item~=nil then
- if item.name==item_name then
- return true
- end
- end
- end
- return false
- end
- function select_item(item_name)
- for i=1,16 do
- item=turtle.getItemDetail(i)
- if item~=nil then
- if item.name==item_name then
- turtle.select(i)
- end
- end
- end
- end
- if turtle.detect() then
- turtle.turnRight()
- turtle.turnRight()
- end
- while true do
- print("I'm now running in 1 PB/Fillup")
- sleep(2)
- print("Anyway, put the patch/PB in my inventory and I will fill it up :3")
- can_run=false
- while can_run==false do
- can_run=true
- if contains_item("estrogen:estrogen_patches")==false then
- can_run=false
- end
- if contains_item("minecraft:golden_nugget")==true then
- select_item("minecraft:golden_nugget")
- if turtle.getItemCount()~=1 then
- can_run=false
- end
- else
- can_run=false
- end
- sleep(1)
- end
- print("Okay! I found it! I'm filling it up now!")
- sleep(3)
- shell.run("fill_patch.lua")
- print("There you go, have fun dashing!")
- print()
- end
Advertisement
Add Comment
Please, Sign In to add comment