Yeah, that's what I was addressing with my pastebin comment.I've stayed away from Computer Craft Due to being able to only really edit scripts, i can't write those things from scratch, therefore i just kinda ignore them.
It's shouldn't be difficult to make computercraft scripts that emulate the various redpower gates and toss them up on pastebin for people to download.
Something like this, except for every gate.
Code:
local tArgs = {...}
--
if #tArgs ~= 1 then
print("Usage: andGate <sides>")
print(" -- the left of the screen is A, the screen is B")
print(" -- the right of the screen is C, the back is output")
print(" -- if sides is 1, the system will check A and B")
print(" -- if sides is 2, the system will check B and C")
print(" -- if sides is 3, the system will check A and C")
print(" -- if sides is 4, the system will check A, B, and C")
print(" -- all inputs must be true(active) for the output to be true")
return
end
local sides = toNumber(tArgs[1])
if sides < 1 then
sides = 1
elseif sides > 4 then
sides = 4
end
while true do
if sides = 1 then
if ((redstone.getInput("left") == true) and (redstone.getInput("front") == true)) then
redstone.setOutput("back",true)
else redstone.setOutput("back",false)
end
end
if sides = 2 then
if ((redstone.getInput("right") == true) and (redstone.getInput("front") == true)) then
redstone.setOutput("back",true)
else redstone.setOutput("back",false)
end
end
if sides = 3 then
if ((redstone.getInput("right") == true) and (redstone.getInput("left") == true)) then
redstone.setOutput("back",true)
else redstone.setOutput("back",false)
end
end
if sides = 4 then
if ((redstone.getInput("right") == true) and (redstone.getInput("left") == true)
and (redstone.getInput("front") == true )) then
redstone.setOutput("back",true)
else redstone.setOutput("back",false)
end
end
sleep(0.5)
end