XP Turtle Script

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

irishpancake33

New Member
Jul 29, 2019
16
0
0
Anyone got an easy auto enchant xp turtle script, the crafting table is on the right of the turtle and I would like the enchanted books to come out of the bottom(to a wooden pipe). Any preferences on if I just put the books in the xp turtles inventory or can I have them pumped in? Preferably a pastebin but don't mind typing it in:)
 

BlackFire

New Member
Jul 29, 2019
344
0
0
If you want to go a step further. I used enchanting attack turtles for my blaze spawner. Here is the code: http://pastebin.com/Mdcf8Zaq

It would pull book from a chest behind it once it reaches level 30. Then drop the book down. It is in attack mode until it reaches level 30.

Isn't that a waste of enchantment tables sense one turtle collects all the experience in the area? I can understand one attack&enchant turtle but several?
 

Hoff

Tech Support
Oct 30, 2012
2,901
1,502
218
Isn't that a waste of enchantment tables sense one turtle collects all the experience in the area? I can understand one attack&enchant turtle but several?
You could still just do one turtle and have it attack as well.

I was in the process of writing a code for you OP but I hit back by accident and it went away. Still deciding if I wanna re-write it ._.
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
Isn't that a waste of enchantment tables sense one turtle collects all the experience in the area? I can understand one attack&enchant turtle but several?


In my setup I initially only used one attack/enchanting turtle with the rest being normal attack turtles. However, I found that some of XP orbs were building up on sides. So I opted to put two attack/enchanting turtles in with 6 normal attack turtles. That way all of the XP orbs do get picked up.
 

irishpancake33

New Member
Jul 29, 2019
16
0
0
On a meele turtle I have turtle.dropDown but it only drops slot one, how do I make it drop every slot(I have an obsidian pipe sucking it up)
 

Hoff

Tech Support
Oct 30, 2012
2,901
1,502
218
Code:
        for i = 1, 16 do
                if(turtle.getItemCount(i) > 0) then
                        turtle.select(i)
                        turtle.dropDown()
                end
        end

If you want it not to check it's slots remove the if statement.
 

irishpancake33

New Member
Jul 29, 2019
16
0
0
Code:
        for i = 1, 16 do
                if(turtle.getItemCount(i) > 0) then
                        turtle.select(i)
                        turtle.dropDown()
                end
        end

If you want it not to check it's slots remove the if statement.

So would I do
while true do
turtle.attack()
for i = 1, 16 do
if(turtle.getItemCount(i) > 0) then
turtle.select(i)
turtle.dropDown()
end
turtle.sleep(.0)
end

(If its wrong can you do exact so with spaces sorry i just have no idea about coding)