Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Melee Turtle
- --Slot 1 soulSand
- --Slot 2 Wither Skulls
- --Slot 3-6 Loot
- --Slot 7-16 Fuel
- local f = 0
- local function wfc()
- if turtle.getFuelLevel()<20 then
- while f == 0 do
- for i=7,16 do
- if (turtle.getItemCount(i)>0) and (f == 0) then
- f=i
- end
- end
- end
- turtle.select(f)
- turtle.refuel(1)
- end
- end
- local function StarDump()
- for i=3,6 do
- turtle.select(i)
- turtle.dropUp()
- end
- end
- local function WitherKill()
- if (turtle.getItemCount(1)>3) and (turtle.getItemCount(2)>2) then
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.select(1)
- turtle.place()
- turtle.up()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.up()
- turtle.select(2)
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.down()
- sleep(20)
- for i=0, 40 do
- turtle.attack()
- turtle.attack()
- turtle.attack()
- turtle.attack()
- end
- turtle.up()
- turtle.up()
- end
- end
- --program
- rednet.open("right")
- while true do
- -- Communicate Fuel
- if turtle.getItemCount(16) == 0 then
- rednet.broadcast("FuelEmpty")
- end
- if turtle.getItemCount(16) > 0 then
- rednet.broadcast("FuelGood")
- end
- -- Communicate Sand
- if turtle.getItemCount(1) < 4 then
- rednet.broadcast("SoulSandEmpty")
- end
- if turtle.getItemCount(1) > 3 then
- rednet.broadcast("SoulSandGood")
- end
- -- Communicate Skulls
- if turtle.getItemCount(2) < 3 then
- rednet.broadcast("WitherSkullEmpty")
- end
- if turtle.getItemCount(2) > 2 then
- rednet.broadcast("WitherSkullGood")
- end
- if (turtle.getItemCount(1)>3) and (turtle.getItemCount(2)>2) and (turtle.getItemCount(16)>0 then
- rednet.broadcast("BeginTermination")
- wfc()
- WitherKill()
- StarDump()
- rednet.broadcast("CompleteTermination")
- sleep(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement