This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
biggest yikes's profile picture

MobDie

Started by biggest yikes, 12 December 2013 - 04:47 PM
biggest yikes #1
Posted 12 December 2013 - 05:47 PM
I've created a simple and cool program for turtles (obviously) called MobDie. Any mob under it will get literally demolished to pieces, as well as preventing the stopping of the system through blocks. Use on a melee turtle for best results. (also, mobs must be below it)

How to install:

Enable HTTP in the config file and type this on a turtle:
pastebin get 2dCEqaHJ startup

NEW:
Fixed inventory bug.

BUGS:
Attacking is slower due to loops…Can't fix it, not an issue I hope?

Now go put a villager near-under it and watch the zombies chase to death XD
Edited on 17 January 2014 - 05:18 PM
biggest yikes #2
Posted 12 December 2013 - 06:02 PM
Surprised by the number of views so far.
Thanks guys :D/>
Buho #3
Posted 13 December 2013 - 08:36 AM
It's a good start. What happens when its inventory fills up?

I've got a melee turtle at the end of my mob farm that, at the core, is basically a loop of turtle.attack(), so nothing special there, but when slot 16 gets an item in it, it turns around and dumps the junk on the ground (determined by samples in the first five slots, such as rotten flesh and bows) and the rest in a chest. That's where I also report the number of hits so I don't spam the display.

I actually use three turtles to triple-team the mobs (left, right, above). In the past I had issues with creepers blowing up if they weren't killed fast enough after the first hit. That issue went away but I find one turtle gets the vast majority of the hits while another gets less and the third barely gets any.

BTW, I don't think you need to turtle.suck() because drops from a killed mob go into the inventory. However, I have seen items occasionally get by my turtle, so….
biggest yikes #4
Posted 13 December 2013 - 03:35 PM
1. Well, I didn't make it do anything but attack mobs under it.
2. I used turtle.suck() to make it "attack" items, for fun.

I'll see if I can use the dump thing to improve it.
biggest yikes #5
Posted 13 December 2013 - 03:56 PM
MOBDIE 0.2:
Added new feature. Items go up if found in turtle.

MOBDIE 0.3:
Fixed the multi-item bug.
DaveyBeer1999 #6
Posted 01 January 2014 - 03:42 PM
Yo man I used the start of your code and to check my code I like that you made is small and not long thank you your code helped me allot thanks again. Keep up the work!
aaronscz #7
Posted 05 January 2014 - 08:57 PM
Very helpful, thank you very much!
biggest yikes #8
Posted 17 January 2014 - 06:17 PM
Very helpful, thank you very much!
Yo man I used the start of your code and to check my code I like that you made is small and not long thank you your code helped me allot thanks again. Keep up the work!
When I make programs, I try to compact them and make them as neat with the intro (like "changing" the intro of when you fire it). Thanks! ;)/>
Isitar #9
Posted 24 January 2014 - 12:25 PM

term.clear()
term.setCursorPos(1,1)
if term.isColor() == true then
term.setTextColor(colors.yellow)
print("MobDie 0.3")
else
print("MobDie 0.3")
end
while true do
turtle.attackDown()
turtle.suckDown()
turtle.digDown()
for i = 1, 16 do
turtle.select(i)
turtle.dropUp(64)
end
end

improved code:


term.clear()
term.setCursorPos(1,1)
if term.isColor() then
  term.setTextColor(colors.yellow)
  print("MobDie 0.3")
else
  print("MobDie 0.3")
end

while true do
  turtle.attackDown()
  turtle.suckDown()
  turtle.digDown()
  for i = 1, 16 do
    turtle.select(i)
    turtle.dropUp()
  end
end


You don't need a == to true ( if (x == true) then ..)
And you don't need to put a parameter in the dropUp since it outputs everything from the slot.
And please use spaces to format your code ;)/>

Cheers