Wireless Melee Turtle Program

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Toadzilla

New Member
Jul 29, 2019
46
0
0
Could anyone help me out with writing a program for a wireless melee turtle? I have a t5 wither skeleton spawn set up which will drop them without killing them. I just want it so that the turtle finishes them off (the area is about 6x6). It doesn't need to pick up the items because of some transposers on the floor. Also, I would like it so I can access the turtle from a computer (via modem), but again, I don't know how to program for my life.

Any help is appreciated

Thanks
 

slay_mithos

New Member
Jul 29, 2019
1,288
0
0
You definitely should make them all go to a central spot (pistons?), because if the turtle needs to move, there is potential for major derping with the unload/reload.

Apart from that, what you need is a program that does an infinite loop (or similar) of turtle.attack, and that checks if the inventory is filling with "turtle.getItemCount(16)>0". When the condition triggers, make it deposit the loot, in a chest bellow, for example.

The second program you need is to read the incoming messages on rednet and start your loop upon receiving the correct message.

You said you want help in writing, so I won't write it for you, but if you don't know how to program, then this might help you a bit:
http://computercraft.info/wiki/Category:Tutorials

What you are asking is not really complicated, even less if you make it so that the turtle doesn't have to move, but do try to follow the various tutorials before trying to get too in-depth, rednet and moving can both get rapidly out of hand if you don't understand what you are doing.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
You could use water if you're using the t5 spawner in the overworld to bring the skellies in their proper place. Try oil if you're in the nether.

I'm with mithos, for two reasons:
1) moving the turtle around costs fuel, that's an extra bother with logistics to have it refueled
2) the mobs move themselves, the efficiency is thus lowered
3) turtles pick the drops, automagically after attacking, dropping them again and picking them up again with the transposers is just an extra bother

You can move the skellies with water on the upper floor and make the drop-pad 1x1 to avoid fall damage reduction.
 

Saice

New Member
Jul 29, 2019
4,020
0
1
as others have pointed out. Don't move he turtle move the mob.

But with that why even bother checking inventory. Just funnel all your mobs to one point with one turtle Loop his murder script. Fill his inventory with junk (no needed since hes not moving) if you box him in any drops will shot out the back of him. Collect with a obsidian pipe and move to your processing/sorter of choice.
 

ATYPICAL

New Member
Jul 29, 2019
43
0
0
Here is a video of my Wither Skeleton + Melee Turtle farm, the wither skeleton part is near the end:


As everyone has said, you do not want to the turtle to move if you can avoid it. Secondly, if you can avoid using wireless turtles/modems, that will save you a lot of work and simplify the coding (using Rednet is a little bit more advanced, and not recommended if you are just starting to learn how Turtles work). Do not use pistons as they are completely unnecessary and a waste of resources. If you have any questions you are welcome to reply here or PM me.
 

Toadzilla

New Member
Jul 29, 2019
46
0
0
Purpose of all of this was to farm wither heads. I got like 2...and haven't gotten any since (ended up just using iron golems). I'm at 600 stacks of bones and only 2 heads. Still normal?
 

Saice

New Member
Jul 29, 2019
4,020
0
1
ATYPICAL

Why so many turtles? I get by with literly 1 melee guy and he kills my mobs fater then my dual Teir 5 spawners can crank out.
 

ATYPICAL

New Member
Jul 29, 2019
43
0
0
ATYPICAL

Why so many turtles? I get by with literly 1 melee guy and he kills my mobs fater then my dual Teir 5 spawners can crank out.

I have 7 tier 5 spawners, and the turtles aren't killing things fast enough. What is your melee turtle code like? Mine is just a "while true do" loop with attack and a short sleep().

@toadzilla no, unless they patched it somehow, T5 wither skelly spawner should drop heads like crraaaaazy. at the beginning of the video you can see I have more than a chest full, and that's from leaving it on for like a day.
 

Saice

New Member
Jul 29, 2019
4,020
0
1
Mine it just a while loop with no puase.

7 spawners is a bit much so I can see the need for the extra turtles.
 

slay_mithos

New Member
Jul 29, 2019
1,288
0
0
Without the pause, it will just not always attack.

I wanted to automate a normal spawner like that, making use of the return value to make it wait for more zombies to store up.
Basically, it's the same as when you attack yourself at a pack of mobs on a single square, you won't always hit if you just bash your mouse.

Well, if it's just continuous attacks without wanting to do anything when there is no mobs, it's viable to just loop the attack, I guess, as you will slightly improve the kill rate.
 

Saice

New Member
Jul 29, 2019
4,020
0
1
Without the pause, it will just not always attack.

I wanted to automate a normal spawner like that, making use of the return value to make it wait for more zombies to store up.
Basically, it's the same as when you attack yourself at a pack of mobs on a single square, you won't always hit if you just bash your mouse.

Well, if it's just continuous attacks without wanting to do anything when there is no mobs, it's viable to just loop the attack, I guess, as you will slightly improve the kill rate.

Pretty much. But just so you know he does not sit there swinging. He actually only attacks when there is something to attack. I'm no pro at this but I believe it is because the Turtle.Attack() command checks to see if there is something there before it runs and returns True/False based on this not that it hit anything.

The only down side is you have to restart the script if you log or turn off the spawner for more then a minute.
 

bigtwisty

New Member
Jul 29, 2019
164
0
0
while true do
turtle.attack()
end


---------------------------------------------------------
A reasonable facsimile of intelligence...
 

Korenn

New Member
Jul 29, 2019
149
0
0
Pretty much. But just so you know he does not sit there swinging. He actually only attacks when there is something to attack. I'm no pro at this but I believe it is because the Turtle.Attack() command checks to see if there is something there before it runs and returns True/False based on this not that it hit anything.

The only down side is you have to restart the script if you log or turn off the spawner for more then a minute.
you can make the script the startup script for the turtle, that fixes the log problem.
For the second you'd need a rednet message check which orders it to reboot.
 
  • Like
Reactions: Saice

Saice

New Member
Jul 29, 2019
4,020
0
1
you can make the script the startup script for the turtle, that fixes the log problem.
For the second you'd need a rednet message check which orders it to reboot.

Thanks Im still slowly learning turtles have not touched rednet yet.