I understand this, and with just computercraft I'd probably suggest individuals to check their forums, but with all the mods that ftb offers WITH computer craft, I feel it better to have a script thread here. I mean, what if someone wanted to move soul shards around. Since its not a 'super common' mod, those that might be able to help might look at it and appear cluelessIt would actually be a much better idea to go to the ComputerCraft forums if you want computer help, specifically their Ask a Pro subforum. There is also a Programs subforum, as well, for sharing programs.
I understand this, and with just computercraft I'd probably suggest individuals to check their forums, but with all the mods that ftb offers WITH computer craft, I feel it better to have a script thread here. I mean, what if someone wanted to move soul shards around. Since its not a 'super common' mod, those that might be able to help might look at it and appear clueless
bEnd = false
parallel.waitForAny(
function()
while true do
redstone.setOutput("bottom",true)
redstone.setOutput("top",false)
iCounterNeg=60
for iCounter=1,600,1 do
shell.run('clear')
print("Harvesting...")
iCounterNeg=iCounterNeg-0.1
print("Time remaining until WAITING: "..iCounterNeg.." seconds")
print("")
print("Press any key (except ESC) to end")
sleep(0.1)
end
redstone.setOutput("bottom",false)
redstone.setOutput("top",true)
iCounterNeg=180
for iCounter=1,1800,1 do
shell.run('clear')
print("WAITING")
iCounterNeg=iCounterNeg-0.1
print("Time remaining until HARVEST: "..iCounterNeg.." seconds")
print("")
print("Press any key (except ESC) to end")
sleep(0.1)
end
end
end,
function()
while not bEnd do
local event, key = os.pullEvent("key")
if key ~= keys.escape then
bEnd = true
end
end
end
)
shell.run('clear')
redstone.setOutput("bottom",false)
redstone.setOutput("top",true)
print("Farm Turned Off")
The computercraft forums are indeed the best place to go. Don't go to that one site I won't name that is trying to set up a "community" around computercraft with "premium" scripts. The quality of the code (and the people who wrote it) will make your eyes melt.
Saying something like that is just going to make people want to see whatever it is that you are hinting at, as I'm sure the vast majority of people (myself included) have no idea what you are talking about.
@Guswut, stealing the esc to quit right NOA!
Here's a question. If I have a few turtles and I want them all to execute the same program, is there a way for me to have that program stored in a central location, and on startup of the turtles they grab it and execute it?
I have 19 melee turtles all in a line, and as I adjust their startup code, I'd be nice to update it in a single place and all the turtles update
I looked into this earlier but couldn't figure out exactly how to get the code from the control computer to the turtles, then run itOne fun way to do this would be to have one master computer with rednet and each wireless turtle could send out a message to their master on /startup "I am a melee turtle with name X, please give me a program to run." Your master task dispatcher could then give them the code. You could even have a variety of work orders which the master could select, and store your programs on disks, and have the master display the last known status of the various turtles that have asked for job code.
C and javascript guy here. So Lua, thus far, has been pretty easy to pick up. It's just figuring out routines and the such opened up by computercraft[DOUBLEPOST=1360955748][/DOUBLEPOST]
I looked into this earlier but couldn't figure out exactly how to get the code from the control computer to the turtles, then run it
C and javascript guy here. So Lua, thus far, has been pretty easy to pick up. It's just figuring out routines and the such opened up by computercraft[DOUBLEPOST=1360955748][/DOUBLEPOST]
I looked into this earlier but couldn't figure out exactly how to get the code from the control computer to the turtles, then run it
Probably the most trivial: You can write to a file then call shell.run.
Actually, my only question is how to get wireless turtles onto the network?
--Control computer Startup:
f = fs.open("TurtleOrders", "r")
startUpCode = f.readAll()
f.close
rednet.open("right")
while true do
local sender, msg, a = rednet.receive()
if sender and msg == "need orders" then
rednet.send(sender, "command:" .. startUpCode)
end
end
--Turtle's Startup:
rednet.open("right")
while true do
rednet.broadcast("need orders")
local sender, msg, a = rednet.receive(60)
if sender and string.sub(msg,1,8) == "command:" then
assert(loadstring(string.sub(msg,9)))()
break
end
end
Well, there is a similar thread (very similar, infact) with lots of good codes already. A member NosePicker5555 made it and it has a decent amount of codes. It's up to you if you want to go revert everything onto his thread or make your own, but I think it'd be easier if you just used his.