Jump to content


w1zzard's Content

There have been 10 items by w1zzard (Search limited from 30-March 23)


By content type

See this member's

Sort by                Order  

#155965 tunneling program

Posted by w1zzard on 11 December 2013 - 02:58 PM in Turtle Programs

my first ever program, figured other people may have a use for it

http://pastebin.com/8pFp8X4u

this is a tunnel mining program utilising 2 ender chests for supplying and emptying the turtle

tunnels a variable sized area. can be used to dig rooms or even general mining

best used with a chunkloading turtle



#150594 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 26 October 2013 - 06:33 PM in Ask a Pro

managed to find out why it wasnt running the infinite distance line of codes.
it checked if z==0, and z = tArgs[3] so ud expect if the third number on ur command line was a 0 it would run that line of code, or atleast that was my logic. however it turns out it was passing the z variable along as a string so it was checking z==0 and the program was saying nope, z = tArgs[3], solved this by making tArgs[3] always dealt with as a number, also added a little more code in that makes sure u have entered 3 variables for width height and length or it wont run, now ive gotta figure out how ill go about sorting the updown part of the code to make it able to mine odd distances.

still need to go through and do your suggested streamlining of the code now ive got the code running as i wanted it to atleast


latest pastebin http://pastebin.com/fre6Sj1n



#150591 Can someone look over my code and see where i made a mistake?

Posted by w1zzard on 26 October 2013 - 06:25 PM in Ask a Pro

noticed a small error in 2 of your functions, you run ChuckUp() in
function MineRight() and MineLeft() however that function doesnt exist, i assume u meant to type CheckUp() , could cause some problems



#150483 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 26 October 2013 - 04:12 AM in Ask a Pro

yeah i ran it through codepad.org and got rid of the excess ends and i do plan on doing ur bit that decides if it needs to go up or down using a for loop where it goes up if odd and down if even (example not sure how ill actually make it run), also ill do your suggested streamlining of the functions after ive got it running how i want first.
after deleting the ends i ran the program and it works fine for the limited distance but running the infinite distance one just doesnt work at all, it grabs charcoal and then stops. i need to track this down and i think its just not going down the infinite route at all and just doing a limited route with a distance of 0 so its not running the program at all basically, gonna add print lines so it says which function its running to see if im right and then gotta figure out why



#150434 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 25 October 2013 - 05:27 PM in Ask a Pro

i tried to go through it and sort the indentation, also tried moving the main bulk of the code into functions so the main program is tiny now

http://pastebin.com/PHdXmJ8j i just need to give it an ingame test to see if this actually runs how i want it to



#150331 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 25 October 2013 - 08:53 AM in Ask a Pro

line 107 should be evaluating from line 64 not 63 being false
its line 171 that should be working from line 63 being false. any help on trying to fix this problem is appreciated

the program basically checks for a length specified then checks for if the y specified is even or odd and runs the appropriate code, or atleast it should do. this is why the first 2 running codes are both saying if z == 0, they are both the infinite distance ones but odd and even height differences.

ty for the for i = 1, z/2 do that is exactly what i want for the program for now, as i said im new to lua, and coding in general.

you said hopefully ill be able to fix my indentation, to do this id need to know how its meant to be.

and to the guy who posted some premade mining programs... not helpful at all, i didnt ask for a premade program i asked for help with the one im attempting to write which is a variable mining program that can be told to dig a 3 x 3 x 20 tunnel or a 100x100x infinite tunnel all in the same program (100x100 would probably need some sort of calculation for the fueling tbh because of how much it would need but tbh i doubt ill use it for more than a 10x10 quarry tunnel type)



#150299 Simulate and/or Debug (without starting MC)

Posted by w1zzard on 25 October 2013 - 02:41 AM in Ask a Pro

http://codepad.org/ could work too. wont tell u if ur code is doing what u want it to tho, only error msg's that ud get from running it



#150274 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 24 October 2013 - 07:03 PM in Ask a Pro

ok after quite a bit of help from my dad i managed to get this program to work how i wanted it to apart from the fact its going too far on the mining distance, 3 3 2 is mining a 3x3 tunnel 4 blocks long
, i assume this is because the for loop i made isnt halfing the z as i tell it to. how would i go about sorting this?

http://pastebin.com/6cTZgjG4 most recent version of the mining program



#150216 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 24 October 2013 - 09:32 AM in Ask a Pro

managed to get my program to follow refueling i wanted, needed some more ends in places, would appreciate if any1 would explain how i could go about changing the size of the tunnel dug with command line variables and if it is possible to make it so the length of the tunnel is specifiable but when nothing is specified it runs for an infinite distance instead of not running?

also wondering if its possible to add in code to make it calculate how often it would need to refuel for one stack of charcoal (this is with the variable height and width added) and set the mining segment of the loop code to that variable.

as always any help appreciated and if u know of any links i can follow to more info that would help

example of how i want it to run:
mine 3 3 10 would mine out a 3x3 tunnel area 10 blocks long
however
mine 9 9 would mine out an endless tunnel 9x9

i know i can do this by adding in variables but ive only picked up lua about a day ago and am having trouble with understanding how i actually go about this

http://pastebin.com/Ua8u5JFL latest pastebin



#150200 Mining Program Refueling Efficiency Problem

Posted by w1zzard on 24 October 2013 - 03:28 AM in Ask a Pro

hi im new to lua and computer craft but ive tried to make my own mining program however i cant seem to get my program to run my refueling code at correct intervals, i tried to use a for loop to run the main code X amount of times and then it refuels but when i ran the program it still ran the refuel code at the same time as my turtle empty code which meant my turtle is still using excessive amounts of charcoal.
also would like some help or hints on how to make the mining size adjustable (its a tunnel mining type) apologies for the newbiness of my program and any help would be appreciated.

it uses 2 ender chests to refuel and empty, empty into my system chest is in slot 15 and the refuel chest full of charcoal is slot 16

link to my most recent pastebin of the program
http://pastebin.com/Zyvh4yHj