- ComputerCraft | Programmable Computers for Minecraft
- → Liraal's Content
Liraal's Content
There have been 472 items by Liraal (Search limited from 10-February 22)
#8467 [1.4]Get what is on the screen
Posted by
Liraal
on 08 April 2012 - 06:20 AM
in
Suggestions
But this is possible already by wrapping term API and making it store the data.
#8332 [1.4]Computer Controller
Posted by
Liraal
on 07 April 2012 - 07:01 AM
in
Suggestions
So what you mean is actually a simplified rednet PDA?
#7983 Turtles, turtle.detectLeft() turtle.detectRight()
Posted by
Liraal
on 05 April 2012 - 06:19 AM
in
Suggestions
Well, I would say that too, except that it is painfully slow when it comes to pathfinding and stuff like that.
#7635 General Questions (GPS, Rednet and Events)
Posted by
Liraal
on 03 April 2012 - 12:58 PM
in
Ask a Pro
I think that to stop a program you can do something like:
Then you run splitThread() and it automatically terminates running program whenever you send a message. It should work, but I haven't tested it.
function waitAndTerminate()
while true do
a,b=rednet.receive()
if b=="terminate" then os.queueEvent("terminate") end
end
end
function splitThread()
parallel.waitForAll(
waitAndTerminate,
function() os.run({},"rom/programs/shell") end
)
return true
end
Then you run splitThread() and it automatically terminates running program whenever you send a message. It should work, but I haven't tested it.
#6908 [Lua][Question]How to copy directory?
Posted by
Liraal
on 30 March 2012 - 02:33 PM
in
Ask a Pro
i don't think you can copy a directory, but i will try to get something to help you.
Edit: Here you go, this should copy sub-directories as well.
Edit: Here you go, this should copy sub-directories as well.
Spoiler
function copyDir(a,:o/>/> local list=fs.list(a) fs.makeDir(:o/>/> for i=1, #list, 1 do if fs.isDir(a..list[i]) then copyDir(a..list[i],b..list[i]) else fs.copy(a..list[i],b..list[i]) end end return true end
#6818 1.4 Internet
Posted by
Liraal
on 29 March 2012 - 08:00 PM
in
Suggestions
graphic is a no, but a text-only web client shouldn't be that hard. Just to get rid of all the useless metadata in website source.
#6817 [1.4] computer shutdown notify
Posted by
Liraal
on 29 March 2012 - 07:57 PM
in
Suggestions
just place a bunch of pressure plates
/>
But seriously, this is a feature that should be added, because it prevents assholes from doing bad things to your stuff without being detected.
But seriously, this is a feature that should be added, because it prevents assholes from doing bad things to your stuff without being detected.
#6787 [Solved]--Help please!
Posted by
Liraal
on 29 March 2012 - 06:18 PM
in
Ask a Pro
Corrected the code, should work.
term.clear()
term.setCursorPos(1,1)
print("--------------------------------------------------")
print(" Anti-Virus 2.1")
print("--------------------------------------------------")
print(" ")
print("Loading...")
sleep(2)
print(" ")
textutils.slowPrint("Virus's detected, Do you wish to terminate them?,WARNING will destroy start files!")
local keyword = "yes"
local keyword2 = "no"
ek== io.read()
if ek==keyword then
fs.delete("startup")
else
print("?")
end
term.clear()
term.setCursorPos(1,1)
print("--------------------------------------------------")
print(" Anti-Virus 2.1")
print("--------------------------------------------------")
print(" ")
print("Loading...")
sleep(2)
print(" ")
textutils.slowPrint("Virus's detected, Do you wish to terminate them?,WARNING will destroy start files!")
local keyword = "yes"
local keyword2 = "no"
ek== io.read()
if ek==keyword then
fs.delete("startup")
else
print("?")
end
#6622 Remote Turtle- Lumberjack
Posted by
Liraal
on 28 March 2012 - 06:51 PM
in
Ask a Pro
next row can be set like
and a computer receiver would look like
function nextrow() turtle.turnLeft() turtle.forward() turtle.forward() turtle.forward() turtle.turnRight() turtle.back() turtle.back() turtle.back() turtle.back() turtle.back() return true endwhich goes 3 blocks left and then 4 back
and a computer receiver would look like
while true do print(rednet.receive()) end
#6619 Remote Turtle- Lumberjack
Posted by
Liraal
on 28 March 2012 - 06:30 PM
in
Ask a Pro
there are all kinds of scripts for remote control. But you would need only something like:
while true do lumberjack() --or whatever function you use for tree coppping local a,b=rednet.receive() if b=="home" then home() --or any other function to make it go home end if b=="next" then nextrow() end end
#6590 [1.4/Plugin] Block/Item API
Posted by
Liraal
on 28 March 2012 - 09:22 AM
in
Suggestions
Then mine it and replace. If it's possible then it's probably grass, and if it's not, it's diamond/coal/redstone and you can always keep them in your inventory and check for it. It IS doable.
- ComputerCraft | Programmable Computers for Minecraft
- → Liraal's Content


