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

DrumOS V1.2 Compatible Mining Program (Feat Camwarp)

Started by Camwarp, 12 April 2013 - 01:19 AM
Camwarp #1
Posted 12 April 2013 - 03:19 AM

os.pullEvent=os.pullEventRaw
turtle.Forward=turtle.forward
term.clear()
print ("DrumOS Version 1.2")

local function openAll()
  for _,side in pairs(rs.getSides()) do
				if peripheral.getType(side) == "modem" then
				  rednet.open(side)
				  return true
				end
  end
  return false
end
openAll()
print ("Connecting To DrumNET")
tArgs = {...}
print ("Connected To DrumNET")
rednet.recive(200)
print ("Please Place Me On Level 12 Or Lower")
turtle.Forward(10)
turtle.turnRight()
turtle.Forward(10)
turtle.turnRight()
turtle.Forward(10)
turtle.turnRight()
turtle.Forward(10)
turtle.turnRight()
turtle.Forward (1)
turtle.turnRight()
turtle.Forward(9)
turtle.turnLeft()
turtle.Forward(9)
turtle.turnLeft()
turtle.Forward(9)
turtle.turnLeft()
turtle.Forward(9)
turtle.turnLeft()
turtle.Forward(1)
turtle.turnRight()
Code Unfinished But Its Workable I Need Someone To Look Over It
theoriginalbit #2
Posted 12 April 2013 - 03:30 AM
Do you ever test any of your programs? there are so many problems with this!
I really think you need to start testing before posting!

EDIT: Also I really suggest that you read the turtle api wiki page!
EDIT #2: Also there is no need for line #1, why does it need termination protection?
To that point, if you are going to override a system function you should ALWAYS back it up and restore it once your program has finished, by that I mean this;
At the start of your code have this

local oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw
and then at the end of your code

os.pullEvent = oldPull

Lastly, how is gathering runtime args "connecting" to DrumNET?
Edited on 12 April 2013 - 01:33 AM
ardera #3
Posted 12 April 2013 - 03:59 AM
turtle.Forward
has to be
turtle.forward

EDIT: It's not mining, it's just going forward, and then it turns right. You have to use turtle.dig that it mines…
[indent=1]If you just clear the screen, the cursor position doesn't get changed, so you have to add a
term.setCursorPos(1, 1)
[/indent]
[indent=1]after term.clear()[/indent]
[indent=1]Also,
targs = {....}
[/indent]
[indent=1]has to be
targs = {...}
[/indent]
[indent=1]I think, but I'm not really sure about this.[/indent]
[indent=1]And for a good program, we need a bit more Details, better text formatting, and "Code Unfinished But Its Workable I Need Someone To Look Over It" looks ugly, because you didn't note the Upper / Lower case…[/indent]
[indent=1](I think it has to be "The code is unfinished but it works, I need someone to look over it.") I'm not good in english, but here I recognize even me that something's wrong.[/indent]
Kingdaro #4
Posted 12 April 2013 - 04:02 AM
Christ, at least try to fix your own scripts.
Camwarp #5
Posted 12 April 2013 - 07:25 AM
Sorry i Wasnt Online And The Program Is MAking A Mining Base To Start With
So Sheesh