Melee turtle help pls

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

baw179

New Member
Jul 29, 2019
295
0
0
So I used this from computercraft forums but it doesn't work.

while true do
for i = 1, 9 do
turtle.attack()
sleep(1)
end

for i =1, 16 do
turtle.select(i)
turtle.drop()
end
end

Can anyone tell me why? I have a chest under the turtle but it won't deposit into it. In fact I've no idea where the items are going because they're not going in the chest or staying in the turtle.

Also, how do you stop a program running without breaking the turtle? I've read that you press CTRL-T but it does nothing for me and the only way I can stop the startup prog above is by breaking it and then typing it all in again.

Is there a way to speed them up? How many do you need to keep up with a T5 wither skeleton farm? It seems to be spend a lot of time cycling through the inventory and not enough time killing.

Any help please thanks.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
Can anyone tell me why?

Sure, we can.

I have a chest under the turtle but it won't deposit into it. In fact I've no idea where the items are going because they're not going in the chest or staying in the turtle.

The "turtle.drop()" command drops items out the front of the turtle. If you want to drop items down, you will want to use turtle.dropDown().

Also, how do you stop a program running without breaking the turtle? I've read that you press CTRL-T but it does nothing for me and the only way I can stop the startup prog above is by breaking it and then typing it all in again.

Press down and hold the CTRL button, then press down and hold the T button for two seconds. That is the terminate command.

Is there a way to speed them up?

Yes. Your code is not very efficient.

What you'll first want to do is design the system so you can put the chest for items at the back of the turtle. Then fill the turtle up with stone blocks or something that will never be dropped. Then remove the drop items code. That will cause the turtle to kill something, pick up the loot, and instantly drop it backwards in the chest you placed there.

How many do you need to keep up with a T5 wither skeleton farm? It seems to be spend a lot of time cycling through the inventory and not enough time killing.

I'm able to keep up with a T5 skeleton farm with a single turtle when it does not deal with drops via the full-auto-drop aspect mentioned above.
 
  • Like
Reactions: baw179

baw179

New Member
Jul 29, 2019
295
0
0
Thanks Guswut - I didn't know you had to hold down CTRL T for a few seconds.

Now, another problem. The basic script works and deposits into a chest behind - that is great - but it's nowhere near keeping up with a T5 wither skeleton farm. Rather than use water I have a horizontal crystal portal that sends them to the nether and then another crystal portal that sends them back to the overworld into a 1x1x3 enclosure (the reason for this is that flowing water causes us some really bad FPS issues when moving away from it - no idea why but when we turn game sound off there is no lag). At first I thought sending them via nether (with a spot loader) would cause lag, but in fact it works great with no lag at all. Anyway, 1 turtle can't keep up, so I made another melee turtle and put him on the opposite side of the enclosure, BUT even though the program is running it won't swing his sword when the turtle on the other side is running. If you stop the 1st one, then the 2nd one works, and vice-versa. I've tried stacking the turtles on put of each other with a chest behind each, but same issue. Also tried offsetting them and putting the 2nd turtle one block higher up on the other side, but it still won't work when the other one is active. Any ideas? I need faster killing speed as this is being done for coal generation and will be running all the time.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
Any ideas?

Remove the for loop, and go with this:

Code:
while true do
 turtle.attack()
 sleep(0.5)
end

And see if that makes them fast enough to keep up. Also, can you take a screenshot of the turtle landing area? If possible, you need them all to be as close as possible. A 1x1 area is optimal for two turtles (one turtle is fast enough I've found, but often times enemies get stuck. Conveyor belts can assist with this, though, if you have Ultimate/MineFactoryReloaded).
 
  • Like
Reactions: baw179

Peppe

New Member
Jul 29, 2019
836
0
1
We need sword of zephyr turtles added to misc peripherals :p

to those not using thaumcraft:
sword of zephyr (does area of affect damage)
 
  • Like
Reactions: Guswut

RetroGamer1224

New Member
Jul 29, 2019
716
0
0
No. No special sword turtle when what we have now is fine. The QQing would be horrible.

"OMG tertles so OP. Nurf nao plz. kthxbai!!!one111eleven1!"
 

Memorian

New Member
Jul 29, 2019
119
0
0
turtle attacks can lag out pretty bad if they've got nothing to attack so my favorite attack commad is this

while true do
if not turtle.attack() then
sleep(0.2)
end
end

Basically the turtle will swing max speed if there's anything to hit and if there's not it'll take a breather
 
  • Like
Reactions: baw179 and Guswut

baw179

New Member
Jul 29, 2019
295
0
0
Thanks chaps. I tried both the 0.5 and 0.2 snoozes but to be honest I haven't noticed any increase in performance. Turned it off for now til I figure out what to do about the excess XP orbs that are lagging us out. Any ideas on how to get rid of the excess or are XP turtles the only option? I tried putting some iron bars under the brain and the kill spot with some lava underneath that, in the hope that the orbs would fall through the bars and be burned, but alas, that doesn't work... :(
 

Memorian

New Member
Jul 29, 2019
119
0
0
The XP turtle would eb the way to go, it can suck up xp at a much faster rate than the brain, and it isnt limited to 30 levels like the brains
 

baw179

New Member
Jul 29, 2019
295
0
0
OK I've got an XP turtle as per DW20s video with the pastebin code here : http://pastebin.com/R1jes23i

But I want this to run automatically when the server starts and it currently does not. I tried doing edit startup then typing the code in and saving as startup, but when I run 'startup' nothing happens and it just gives me another command prompt. Any ideas chaps? Thanks. :)
 

Yusunoha

New Member
Jul 29, 2019
6,440
-4
0
OK I've got an XP turtle as per DW20s video with the pastebin code here : http://pastebin.com/R1jes23i

But I want this to run automatically when the server starts and it currently does not. I tried doing edit startup then typing the code in and saving as startup, but when I run 'startup' nothing happens and it just gives me another command prompt. Any ideas chaps? Thanks. :)

for one, for startup to start working you need to replace the turtle, see it as rebooting the computer to run a new starting program.
but to do this you'll ofcourse first need to label the turtle or it'll lose all data
 

baw179

New Member
Jul 29, 2019
295
0
0
Tried breaking it and starting over and also tried restart but neither worked. :( Yusunoha can you direct me to where I need to add a label in the code please.
 

Peppe

New Member
Jul 29, 2019
836
0
1
reboot -- is the command to reboot/restart the turtle instead of break + replace

label set TurtleNameHere -- is the command to label the turtle, replace TurtleNameHere with the name you want.

Once a turtle is labeled it will keep its fuel level and programs when you break and place it in a new location.

startup -- is a special program name. By default it is empty, but if you edit startup, or save a program as startup it will be run when the turtle boots up. If the program is designed to run forever in a loop you can force it to stop its loop by holding control + t on keyboard with the turtle interface up.
 
  • Like
Reactions: Skirty_007

vScourge

New Member
Jul 29, 2019
71
0
0
@baw, did you try labeling the turtle as suggested? Type "label set whatever" on the turtle's console to label it with a name of your choosing. Then it will run its "startup" when the chunk it's in loads.
 

Skirty_007

New Member
Jul 29, 2019
436
0
1
So no-one knows how to make this program work on startup then?:(

You haven't indicated whether you have tried all the options presented. We do know how, my turtles run on startup, I think you might have skipped some of the important steps given to you above, though.