I upgraded my lock code to Hydrogen's v3 code. Just revised it a bit - Thanks Hydro this is a lovely code with anti grief built in
--Title: TangentLock
--Version: Ver. 3
--Last Revised: 12/26/2011
--Last Revised By: Streetstar5 / FuzzyPurp187
--Author: TangentDelta (alias Hydrogen)
--Platform: ComputerCraft LUA Virtual Machine
--Notes: Please don't claim this as your own, give me credit if you use this!
code = "minecraft" --the password to "unlock" it
debug = "debug" --password to enter the terminal
output = "left" --the side that will send out the "unlock" signal
tries = 5 --how many times you can guess before it ends your session
pulsout = 5 --how long you want the redstone to be on for. I think it's in seconds.
hax = true --set to true if you want it to send out a redstone signal if password is wrong
haxout = "right" --side that you want the "incorrect password" signal to be on
print "Norton Security System Initialized"
write "Password: "
for triescnt = 1,tries,1 do
password = read()
if password == debug then
print "Debug Mode Activated"
break
end
if password == (code) then
print "Access Granted!"
redstone.setOutput(output, true)
sleep(pulsout)
redstone.setOutput(output, false)
os.shutdown()
else
if hax then
print "Acces Denied! \nLaunching Anti-Grief Security.."
print "Stand still.. This won't hurt : )"
redstone.setOutput(haxout, true)
sleep(pulsout)
redstone.setOutput(haxout, false)
os.shutdown()
else
print ("Access Denied. Attempts left: ",tries-triescnt)
write "Password: "
end
end
if triescnt == tries then
print "Maximum Attempts Reached. \nJust who the **** are you?"
sleep(2)
print "System is shutting down.."
sleep(1)
os.shutdown()
else
end
end
Hope the Op is changed to use this one under my lock program.
Sorry, I will eventually update it, I'm drowning in programs, I will probably update after friday when my frined gets back from sydney.
My New OS, lots of code: http://www.mediafire.com/download.php?x10ggs8p2an7yru
RedWorks Alpha v0.01 is aimed to be more user-friendly than CraftOS (the default). It also has built in CIM software (CIM is allowing you to connect to a chatroom hosted by Casper75 and communicate with other SSP clients). PM Sledger721 for custom login.
i also have a factory station code, and im revising it now after being handed a source code i wanna strip for graphical reasons. but the logic will be all mine using Casper's circuit API. His API is really is to use, and if someone cant convert their complexed logic to it - just pm me and i will convert it for you....The API supports output/input AND extra
I made a RAM program.
By default, redstone in the front of the computer is the save button.
Redstone in the back stops the program (Not Required).
Redstone on the left is the input and on the right is output.
-- RAM v1
-- Created by: Techzune
rInput = "left" -- Input to the RAM (To Be Saved)
rOutput = "right" -- Output from the RAM (Saved)
rReset = "front" -- Saves the input to the output.
rStop = "back" -- Stops the program. (Optional)
local rRunning = true
print("RAM is now running.")
print("Input: " .. rInput .. ". Output: " .. rOutput .. ". Save: " .. rReset .. ". Stop: " .. rStop)
while rRunning do
sleep(0.5)
local rEvent, param = os.pullEvent()
if rEvent == "redstone" then
if redstone.getInput(rReset) then
if redstone.getInput(rInput) then
redstone.setOutput(rOutput, true)
print("Output ON")
else
redstone.setOutput(rOutput, false)
print("Output OFF")
end
end
if redstone.getInput(rStop) then
rRunning = false
print("RAM has stopped.")
end
end
end
EDIT: v2 is on my PasteBin: http://pastebin.com/u/Techzune
v2 removes the stop function.
Input is the front, Output is the back.
The Save is on the left.
Save Continue is on the right. Save Continue repeats the Save redstone current, so computers running RAM can be put beside each other for more memory! :smile.gif:
shdwkt84403123123 please edit my code for the lock with this extra at the top:
--Title: TangentLock
--Version: Ver. 3
--Last Revised: 12/26/2011
--Last Revised By: TangentDelta (alias Hydrogen)
--Author: TangentDelta (alias Hydrogen)
--Platform: ComputerCraft LUA Virtual Machine
--Notes: Please don't claim this as your own, give me credit if you use this!
ALot of people use his locks and dont give him credit. And he would like for the credit or atleast his name and the version kept inside the code at the top, not cutout. So if anyone else has a "modified" tangent lock - use his credits, it's only right.
Sorry if this sounds like a dumb question, but how do I make a program run upon receiving a redstone signal? I want to make a "ping" tool where one computer sends a redstone pulse to another computer. Then, when the second computer receives the signal, I want it to automatically return a pulse to the first computer. Is that possible?
I would like to get some more content on there as right now I just have a hello world script.
Would any of you be willing to post your scripts on the cc-get website for people to install? Once the scripts are on there you can make any changes and the updates will be available to users immedietly with the cc-get update command.
If you don't want to register or post them on cc-get, will you give me permission to redistribute them on there? I will of course attribute the script to the author.
Name: Button
Function: Turns on a redstone current for the duration of a button
--Button
--Written by Onionnion
write("Which side? ")
op = read()
if op == "back" then
redstone.setOutput("back", true)
sleep(0.9)
redstone.setOutput("back", false)
elseif op == "front" then
redstone.setOutput("front", true)
sleep(0.9)
redstone.setOutput("front", false)
elseif op == "left" then
redstone.setOutput("left", true)
sleep(0.9)
redstone.setOutput("left", false)
elseif op == "right" then
redstone.setOutput("right", true)
sleep(0.9)
redstone.setOutput("right", false)
elseif op == "bottom" then
redstone.setOutput("bottom", true)
sleep(0.9)
redstone.setOutput("bottom", false)
elseif op == "top" then
redstone.setOutput("top", true)
sleep(0.9)
redstone.setOutput("top", false)
else
write("Incorrect input, try again.\n")
end
Description: Here's a basic button pressing program, just enter which side and press enter. A simple program that beginners can take as an example for basic redstone use in Lua.
I would like to get some more content on there as right now I just have a hello world script.
Would any of you be willing to post your scripts on the cc-get website for people to install? Once the scripts are on there you can make any changes and the updates will be available to users immedietly with the cc-get update command.
If you don't want to register or post them on cc-get, will you give me permission to redistribute them on there? I will of course attribute the script to the author.
I'd love to help you with this! Already registered and submitted a small script so I can test the install and update features.
I would like to get some more content on there as right now I just have a hello world script.
Would any of you be willing to post your scripts on the cc-get website for people to install? Once the scripts are on there you can make any changes and the updates will be available to users immedietly with the cc-get update command.
If you don't want to register or post them on cc-get, will you give me permission to redistribute them on there? I will of course attribute the script to the author.
A quick Idea, I get people to post onto this thread and then if you like you can put on your site? First, to update the op...
here is some bitwise operators for computer craft.. this is part of my dev library im using to create a router machine for internet sytle communications between several computers via bundledcables
i didnt write these, found them on some website
function bit(p)
return 2 ^ (p - 1) -- 1-based indexing
end
-- Typical call: if hasbit(x, bit(3)) then ...
function hasbit(x, p)
return x % (p + p) >= p
end
function setbit(x, p)
return hasbit(x, p) and x or x + p
end
function clearbit(x, p)
return hasbit(x, p) and x - p or x
end
function bitor(x,y)
local p = 1; local z = 0; local limit = x > y and x or y
while p <= limit do
if hasbit(x, p) or hasbit(y, p) then
z = z + p
end
p = p + p
end
return z
end
Knock her out, and have her wake up in an endless hallway of minecraft blocks, and the only way she can get out is by finding a pickaxe and digging out. That's the way it's done.
I would like to get some more content on there as right now I just have a hello world script.
Would any of you be willing to post your scripts on the cc-get website for people to install? Once the scripts are on there you can make any changes and the updates will be available to users immedietly with the cc-get update command.
If you don't want to register or post them on cc-get, will you give me permission to redistribute them on there? I will of course attribute the script to the author.
I'd love to help you with this! Already registered and submitted a small script so I can test the install and update features.
Help is always appreciated. Right now the main thing I need help with is getting people to use it. I've gotten a lot of people saying it looks great, but only a few have actually put their scripts on the site.
Once I have a few more things worked out I will probably put the whole website/cc-get program on GitHub. If you're looking to contribute in the way of code it will be best to wait until it's on GitHub. I expect everything to be on there in the next day or two.
A quick Idea, I get people to post onto this thread and then if you like you can put on your site? First, to update the op...
That works for me. I will probably only add scripts that are posted after this so people know what's happening.
I'll also wait a day after people post here to put the script on the website so they have time to add it themselves (if they want). It would be helpful if when people post a script on this thread if they mention whether they have/will add it to cc-get.
Sorry, I will eventually update it, I'm drowning in programs, I will probably update after friday when my frined gets back from sydney.
http://www.mediafire.com/download.php?x10ggs8p2an7yru
RedWorks Alpha v0.01 is aimed to be more user-friendly than CraftOS (the default). It also has built in CIM software (CIM is allowing you to connect to a chatroom hosted by Casper75 and communicate with other SSP clients). PM Sledger721 for custom login.
You mean elseif ?
i also have a factory station code, and im revising it now after being handed a source code i wanna strip for graphical reasons. but the logic will be all mine using Casper's circuit API. His API is really is to use, and if someone cant convert their complexed logic to it - just pm me and i will convert it for you....The API supports output/input AND extra
By default, redstone in the front of the computer is the save button.
Redstone in the back stops the program (Not Required).
Redstone on the left is the input and on the right is output.
EDIT: v2 is on my PasteBin: http://pastebin.com/u/Techzune
v2 removes the stop function.
Input is the front, Output is the back.
The Save is on the left.
Save Continue is on the right. Save Continue repeats the Save redstone current, so computers running RAM can be put beside each other for more memory! :smile.gif:
http://pastebin.com/u/Techzune
I am making gates, clocks, RAM, etc. :biggrin.gif:
Enjoy!
-Techzune
Awesome work
D0han's Bus Network
http://minecraftcomputercraft.wikia.com/wiki/Bus_network
ALot of people use his locks and dont give him credit. And he would like for the credit or atleast his name and the version kept inside the code at the top, not cutout. So if anyone else has a "modified" tangent lock - use his credits, it's only right.
I would like to get some more content on there as right now I just have a hello world script.
Would any of you be willing to post your scripts on the cc-get website for people to install? Once the scripts are on there you can make any changes and the updates will be available to users immedietly with the cc-get update command.
If you don't want to register or post them on cc-get, will you give me permission to redistribute them on there? I will of course attribute the script to the author.
Function: Turns on a redstone current for the duration of a button
I'll add more soon, but the sudden new version release made me stop writing it, just to be safe!
I'd love to help you with this! Already registered and submitted a small script so I can test the install and update features.
A quick Idea, I get people to post onto this thread and then if you like you can put on your site? First, to update the op...
i didnt write these, found them on some website
Knock her out, and have her wake up in an endless hallway of minecraft blocks, and the only way she can get out is by finding a pickaxe and digging out. That's the way it's done.
Cool, im in
Help is always appreciated. Right now the main thing I need help with is getting people to use it. I've gotten a lot of people saying it looks great, but only a few have actually put their scripts on the site.
Once I have a few more things worked out I will probably put the whole website/cc-get program on GitHub. If you're looking to contribute in the way of code it will be best to wait until it's on GitHub. I expect everything to be on there in the next day or two.
That works for me. I will probably only add scripts that are posted after this so people know what's happening.
I'll also wait a day after people post here to put the script on the website so they have time to add it themselves (if they want). It would be helpful if when people post a script on this thread if they mention whether they have/will add it to cc-get.
Great! I'm happy to see more people are starting to use it.