MLG Mining: Circular Branch Mining
#341
Posted 07 November 2014 - 08:49 PM
#342
Posted 13 November 2014 - 05:59 AM
JiRB0T, on 07 November 2014 - 08:49 PM, said:
It's an easy fix
Five easy steps to solving invalid side:
1. Type edit api_turtleExt
2. Navigate to ln 208 (you'll know you're there by the indicator at the bottom right)
3. You'll see turtle.Attack(tdir). You need to remove tdir so there is nothing in the parenthesis but leave everything else the same.
4. Save your edits.
5. Profit!
I think the problem is in the way ComputerCraft handles variables to the turtle.Attack() class now vs. when this program was written.
Have fun!
Edited by UkeFox, 14 November 2014 - 08:35 PM.
#343
Posted 30 December 2014 - 08:34 PM
UkeFox, on 13 November 2014 - 05:59 AM, said:
While you are correct with this fixing the crash of the turtle (and that is sufficient for most I guess ), it won't fix the function as giving it back its old behaviour. This will lead to a problem if the turtle should attack up- or downwards since turtle.attack() will only attack mobs/players in front of the turtle. To reachiev this, you also need to implement turtle.attackUp() and turtle.attackDown() direction dependent.
The function with this addition would look like this:
function attack(dir) turnTo(dir) local tDir=turnedDir(dir) local attack if dir==up then attack=turtle.attackUp elseif dir==down then attack=turtle.attackDown else attack=turtle.attack end local success while attack() do success=true sleep(0.3) end turnFrom(dir) return success end
Since editing the code may not be that easy for everyone, I forked the project to make the updating easyer. You can get the modified startup-script at http://pastebin.com/Jyyby90U. If there is enough time, I'll add some other features as persistence for server restarts or centralized coordination between turtles.
Edited by swisszeni, 30 December 2014 - 09:34 PM.
#344
Posted 20 January 2015 - 03:18 PM
#345
Posted 03 February 2015 - 03:54 PM
Deathdrgn, on 20 January 2015 - 03:18 PM, said:
Stick to my post for a real fix.
#346
Posted 11 February 2015 - 02:35 PM
Deathdrgn, on 20 January 2015 - 03:18 PM, said:
Hey Death! I think I've tracked you down! You should join my private server! I miss playing with you! I came back to MC recently and everybody is missing :S Whats the best way to chat? Let me know!
#347
Posted 25 February 2015 - 07:09 PM
#348
Posted 13 April 2015 - 02:24 AM
#349
Posted 28 November 2016 - 01:53 PM
#351
Posted 30 November 2016 - 05:50 AM
Bomb Bloke, on 30 November 2016 - 04:41 AM, said:
api_turtleExt:219: attempt to call nil
or with it written like so:
function attack(dir)
turnTo(dir)
local tDir=turnedDir(dir)
local attack
if dir==up then
attack=turtle.attackUp()
elseif dir==down then
attack=turtle.attackDown()
else
attack=turtle.attack()
end
local success
while attack() do
success=true
sleep(0.3)
end
turnFrom(dir)
return success
end
api_turtleExt:215: attempt to call boolean
was unsure if it was an oversight that the parentheses weren't there so i tried it both ways
Edit: accidently put turnfrom(dir) instead of turnFrom(dir), I now get api_turtleExt:215: attempt to call boolean regardless of parentheses
Edited by voidbreath, 30 November 2016 - 05:59 AM.
#352
Posted 30 November 2016 - 06:03 AM
#354
Posted 30 November 2016 - 06:54 AM
#355
Posted 30 November 2016 - 07:22 AM
Bomb Bloke, on 30 November 2016 - 06:54 AM, said:
Well this is vaguely embarrassing, i suppose it came down to a typo on my part thanks a bunch for your patience and help with this
#356
Posted 30 November 2016 - 08:05 AM
#357
Posted 21 March 2018 - 02:09 PM
i love using this program it works well and with the bug fix that was submitted about api_turtleExt line 208. i still have some problems with grave stopping it from finishing getting it out of the way. thanks again for thew great program. im not a programmer trying to learn from everybody's coding i have read the lua verision 1 on line but this uses lua verision 2 i think.
#358
Posted 21 March 2018 - 03:33 PM
I have a problem with MLG.
In my previous server all were working like a charm now in my new server when i try to make 4 tunnels the turtle stuck without any error in the East side and in the North side.
Have you experience this problem???
#359
Posted 21 March 2018 - 05:01 PM
do you have any clue why is that?
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users