- ComputerCraft | Programmable Computers for Minecraft
- → Kadecamz's Content
Kadecamz's Content
There have been 113 items by Kadecamz (Search limited from 10-February 22)
#39943 Lan wires?
Posted by
Kadecamz
on 14 October 2012 - 02:44 AM
in
Suggestions
I would absolutely LOVE this!
I could wire up a whole small town.
But I'm also curious, if the wires would not hook up to a computer, then where would they hook up to?
Also, would it be possible to have a filter computer that would check whats going through the wires, and log it. (and if it comes from an ID blocked in the table, it doesn't allow that to pass)
Would there be something like lan.receive()?
OW ACCIDENTALY POKED MY EYE
I could wire up a whole small town.
But I'm also curious, if the wires would not hook up to a computer, then where would they hook up to?
Also, would it be possible to have a filter computer that would check whats going through the wires, and log it. (and if it comes from an ID blocked in the table, it doesn't allow that to pass)
Would there be something like lan.receive()?
OW ACCIDENTALY POKED MY EYE
#39924 The Music Thread
Posted by
Kadecamz
on 14 October 2012 - 01:47 AM
in
General
Human, on 27 August 2012 - 08:36 PM, said:
I was wondering what all of you guys listen to while doing some coding.
I listen to Metal(Bullet For My Valentine, A7X, Five Finger Death Punch and a few others)
I listen to Metal(Bullet For My Valentine, A7X, Five Finger Death Punch and a few others)
Woah.
almost exactly the same for me (though I've never heard of A7X), with some dubstep thrown in.
EDIT: heh, checked out A7X, pretty good.
#39876 How do I make a GUI with key events?
Posted by
Kadecamz
on 13 October 2012 - 11:39 PM
in
Ask a Pro
Alright, I already know how to do key readings
But I wanna know how to be able to use them to make those awesome GUI menus, where you press the up/down arrow key to move the selector.
Can somebody teach me how?
Also, I'm wondering how you could do rednet.receive() and os.pullEvent("eventhere") at the same time, say if I was making a rednet broadcasting monitor but also wanted to be able to broadcast something if a key was detected.
event, p1 = os.pullEvent() if event == "key" and p1 == "keycode here" then
But I wanna know how to be able to use them to make those awesome GUI menus, where you press the up/down arrow key to move the selector.
Can somebody teach me how?
Also, I'm wondering how you could do rednet.receive() and os.pullEvent("eventhere") at the same time, say if I was making a rednet broadcasting monitor but also wanted to be able to broadcast something if a key was detected.
#39802 Problem with rednet sending
Posted by
Kadecamz
on 13 October 2012 - 06:50 PM
in
Ask a Pro
I fixed that too, but still getting the error rednet:350:string expected
current code
current code
rednet.open("back")
term.clear()
term.setCursorPos(9,2)
print("Would you like to launch a missile?")
term.setCursorPos(23,9)
print("Y/N")
event, p1 = os.pullEvent("key")
if p1 == 21 then
term.setCursorPos(19,10)
write("Printing Codes")
sleep(1)
write(".")
sleep(1)
write(".")
sleep(1)
write(".")
lcode = math.random(100000,999999)
rednet.send(3,lcode)
printer.write(lcode)
printer.setPageTitle("LAUNCH CODE")
printer.endPage()
term.setCursorPos(19,10)
term.clearLine()
term.setCursorPos(19,10)
print("Completed!")
sleep(2)
rednet.broadcast(lcode)
shell.run("startup")
elseif p1 == 49 then
term.setCursorPos(19,18)
print("Aborted!")
sleep(3)
shell.run("startup")
end
#39754 Problem with rednet sending
Posted by
Kadecamz
on 13 October 2012 - 05:10 PM
in
Ask a Pro
rednet.open("back")
term.clear()
term.setCursorPos(9,2)
print("Would you like to launch a missile?")
term.setCursorPos(23,9)
print("Y/N")
event, p1 = os.pullEvent("key")
if p1 == 21 then
term.setCursorPos(19,10)
write("Printing Codes")
sleep(1)
write(".")
sleep(1)
write(".")
sleep(1)
write(".")
lcode = tostring( math.random(100000,999999) )
rednet.send(3,lcode) --attempt to index ? (a nil value)
printer.write(lcode)
printer.setPageTitle("LAUNCH CODE")
printer.endPage()
term.setCursorPos(19,10)
term.clearLine()
term.setCursorPos(19,10)
print("Completed!")
sleep(2)
rednet.broadcast(lcode)
shell.run("startup")
elseif p1 == 49 then
term.setCursorPos(19,18)
print("Aborted!")
sleep(3)
shell.run("startup")
end
Please tell what I did wrong with itAlso, are you able to make the computer text be colored in the console or do you have to use the config?
#39169 Help sleep and while true do
Posted by
Kadecamz
on 11 October 2012 - 08:43 PM
in
Ask a Pro
allowed = false
term.clear()
term.setCursorPos(1,1)
print("PC"..os.getComputerID().."/ROM/ENTRY")
print("DENIED; ENTER ACCESS CODE")
rs.setOutput("top",false)
rs.setOutput("bottom",false)
rs.setOutput("left",false)
rs.setOutput("right",false)
rs.setOutput("front",false)
rs.setOutput("back",false)
sleep(0)
term.setCursorPos(34,1)
print(os.time())
term.setCursorPos(17,10)
write("USERNAME: ")
term.setCursorPos(34,20)
if allowed = false then
print("ACCESS STATE: FALSE")
if allowed = true then -- Problem is here, getting "bios:328: [string "startup"]:18: then expected
print("ACCESS STATE: TRUE")
end
Now this isn't really a problem but its been wasting about 30 minutes of my time
I need a grid to show where the Y and Z cords are for term.setCursorPos(?,?)
Now I need to know why sleep does not work in while true do functions
while true do
print("hi")
sleep(3) -- It always is skipped in while true do.
end
Please tell me how to fix.
- ComputerCraft | Programmable Computers for Minecraft
- → Kadecamz's Content


