It adds a password to get into the OS.
Download: http://www.4shared.com/file/uzbDFJvO/startup.html
The default password is cheese. Changeable once you login by saying edit startup. Supports startup Sounds. Hydrogen's original lock was a base, edited and optomised by me...
by shdwkt84403123123"
print ("Please choose one of the four option: for addition type '+', for abstraction type '-', for multiplication type '*' and for division type '/'.")
calc_q = read()
print("Put your first number here: ")
number1 = read()
print("Put your second number here: ")
number2 = read()
if calc_q == "+" then
etaresult = number1+number2
print("The result is: ")
print(result)
elseif calc_q == "-" then
result = number1-number2
print("The result is: ")
print(result)
elseif calc_q == "*" then
result = number1*number2
print("The result is: ")
print(result)
elseif calc_q == "/" then
result = number1/number2
print("The result is: ")
print(result)
else print("You put the wrong operation!")
end
print("If you want to use the calculator again, press enter. If you want to exit the program, type 'exit'")
continue_q = read()
until (continue_q == "exit")
print("Thank you for usining Pop's calculator!") End of calculator
local num1 = 0
local num2 = 0
function add()
write "Enter your first digit: "
num1 = read()
write "Enter your second digit: "
num2 = read()
print ("Answer: "..(num1+num2))
end
function subtract()
write "Enter the digit you are subtracting from: "
num1 = read()
write "Enter the digit you are subtracting by: "
num2 = read()
print ("Answer: "..(num1-num2))
end
function multiply()
write "Enter your first digit: "
num1 = read()
write "Enter your second digit: "
num2 = read()
print ("Answer: "..(num1*num2))
end
function divide()
write "Enter the quotient: "
num1 = read()
write "Enter the dividend: "
num2 = read()
print ("Answer: "..(num1/num2))
end
print "Microsoft Calculator 1.3 \nPlease choose one of the 4 options: \nAdd: '+', Subtract: '-', \nMultipy: '*' and Divide: '/'\nTo exit, type quit"
while true do
operation = read()
if operation == "+" then
print("ADDITION")
add()
elseif operation == "-" then
print("SUBTRACTION")
subtract()
elseif operation == "*" then
print("MULTIPLICATION")
multiply()
elseif operation == "/" then
print("DIVISION")
divide()
elseif operation == "quit" then
break
else
write (operation.." is not a mathmatical or logicial.\nMath is my only language, \nso speak that!: ")
print("If you want to use the calculator again, press enter. \nIf you want to exit the program, type 'quit'")
end
end
local num1 = 0
local num2 = 0
function add()
write "Enter your first digit: "
num1 = read()
write "Enter your second digit: "
num2 = read()
print ("Answer: "..(num1+num2))
end
function subtract()
write "Enter the digit you are subtracting from: "
num1 = read()
write "Enter the digit you are subtracting by: "
num2 = read()
print ("Answer: "..(num1-num2))
end
function multiply()
write "Enter your first digit: "
num1 = read()
write "Enter your second digit: "
num2 = read()
print ("Answer: "..(num1*num2))
end
function divide()
write "Enter the quotient: "
num1 = read()
write "Enter the dividend: "
num2 = read()
print ("Answer: "..(num1/num2))
end
print "Microsoft Calculator 1.3 \nPlease choose one of the 4 options: \nAdd: '+', Subtract: '-', \nMultipy: '*' and Divide: '/'\nTo exit, type quit"
while true do
operation = read()
if operation == "+" then
print("ADDITION")
add()
elseif operation == "-" then
print("SUBTRACTION")
subtract()
elseif operation == "*" then
print("MULTIPLICATION")
multiply()
elseif operation == "/" then
print("DIVISION")
divide()
elseif operation == "quit" then
break
else
write (operation.." is not logicial.\nMath is my only language, \nso speak that!: ")
print("If you want to use the calculator again, press enter. \nIf you want to exit the program, type 'quit'")
end
end
My security lock --credits to Hydrogen :smile.gif:
--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!
print("Running Windows Firewall \nSystem is now under Protection!")
code = ("fried_chicken")
debug = ("candy_yams")
tries = 5
write ("Password: ")
for triescnt = 1,tries,1 do
password = read ()
if password == debug then
print ("Safe Mode Activated")
break
end
if password == (code) then
print ("Access Granted! My Bad Homie")
redstone.setOutput("back", true)
sleep(5)
redstone.setOutput("back", false)
redstone.setOutput("bottom", true)
os.shutdown()
else
print ("Access Denied! Tries left: ",tries-triescnt)
print ("Hint: Mommy")
write ("Password: ")
end
if triescnt == tries then
print ("You're not FuzzyPurp..\nGet the **** outta here!\nStop wasting my ****ing time!")
sleep(1)
print ("ERROR!!!")
print ("Windows is shutting down...")
sleep(1)
os.shutdown()
else
end
end
Password-protected Terminals --credits to Vertex Beta
pass = 'fried_chicken'
print 'Access Restricted'
write 'Enter Password: '
input = read()
if password == input then
print 'Access Granted!'
if pass ~= input then
print 'Access Denied!'
sleep(1)
os.shutdown()
end
print '\nWelcome.\n'
print("RedWord Word Processor - Alpha v0.01")
x = 1
function takeGive()
input = read()
print(input)
if input == "exit" then leaveProg()
for x = 1, 25, 1 do takeGive()
end
end
Name of program: Kyo's Net/MC-Chat Version 2. Functions: Network over line pair, chat program. Download link/Copy of code:
sClockIn = "left"
sClockOut = "bottom"
sDataIn = "right"
sDataOut = "top"
sUserName = "???"
local bClock = false
local a = {}
local b = {}
local aPorts = {}
local aChat = { [1] = "<SYS> Welcome to MC-Chat! (Pause/Break to exit)" }
local nChatLine = 1
local sMessageOut = ""
local bRunning = true
local nBitCount = 0
local sBits = ""
local bIncoming = false
local sIncoming = ""
for n=1,8 do
table.insert(b, 0)
table.insert(aPorts, 0)
end
for n=0,255 do
table.insert(a, 0)
a[n] = b[1] .. b[2] .. b[3] .. b[4] .. b[5] .. b[6] .. b[7] .. b[8]
b[8] = b[8] + 1
for n2=1,7 do
if b[9-n2] == 2 then
b[9-n2] = 0
b[8-n2] = b[8-n2] + 1
end
end
end
local function Int2Bin(int)
return a[int]
end
local function ClockPulse(bC)
sleep(0.005)
redstone.setOutput(sClockOut, bC)
end
local function chatBox()
term.setCursorPos( 1, 17 )
term.clearLine()
for n=1,49 do
io.write("-")
end
end
local function addChat(str)
if nChatLine < 16 then
table.insert(aChat, str)
nChatLine = nChatLine + 1
else
for n=1,15 do
aChat[n] = aChat[n+1]
end
aChat[16] = str
end
end
local function writeLine()
term.setCursorPos( 1, 18 )
term.clearLine()
io.write("msg> " .. sMessageOut)
end
local function writeChat()
term.setCursorPos( 1, 1 )
for n=1,nChatLine do
term.clearLine()
print(aChat[n])
end
end
local function writeSendLine()
term.setCursorPos( 1, 18 )
term.clearLine()
io.write("<SENDING>" .. sMessageOut)
end
local function writeGetLine()
term.setCursorPos( 1, 18 )
term.clearLine()
io.write("<INCOMIMG DATA>")
end
local function dataOut(str)
bClock = false
local sData = ""
for n=1,string.len(str) do
sData = sData .. Int2Bin(string.byte(string.sub(str,n,n)))
end
sData = sData .. "00000000"
local nCount = string.len(sData)
sleep(0.1)
for n=1,nCount do
if bClock == true then
bClock = false
else
bClock = true
end
if string.sub(sData,n,n) == "1" then
redstone.setOutput(sDataOut, true)
ClockPulse(bClock)
sleep(0.01)
else
redstone.setOutput(sDataOut, false)
ClockPulse(bClock)
sleep(0.01)
end
end
bClock = false
redstone.setOutput(sDataOut, false)
redstone.setOutput(sClockOut, false)
end
term.clear()
term.setCursorPos( 1, 1 )
term.setCursorBlink( true )
chatBox()
writeChat()
writeLine()
while bRunning do
local sEvent, param = os.pullEvent()
if bIncoming == false then
bClock = false
if sEvent == "key" then
if param == 197 then
bRunning = false
elseif param == 28 then
if string.sub(sMessageOut,1,1) == "/" then
if string.sub(sMessageOut,1,6) == "/name " then
if string.len(sMessageOut) > 6 then
if string.len(sMessageOut) < 13 then
sUserName = string.sub(sMessageOut,7,string.len(sMessageOut))
addChat("<SYS> Name changed to '" .. sUserName .. "'.")
else
addChat("<SYS> Name too long.(Limit 6 characters)")
end
end
end
sMessageOut = ""
writeChat()
writeLine()
else
if string.len(sMessageOut) > 0 then
writeSendLine()
sMessageOut = sUserName .. "> " .. sMessageOut
addChat(sMessageOut)
dataOut(sMessageOut)
sMessageOut = ""
writeChat()
writeLine()
end
end
elseif param == 14 then
sMessageOut = string.sub(sMessageOut,1,string.len(sMessageOut)-1)
writeLine()
end
end
if sEvent == "char" then
if string.len(sMessageOut) < 40 then
sMessageOut = sMessageOut .. param
end
writeLine()
end
else
if sEvent == "key" then
if param == 207 then
bIncoming = false
sIncoming = ""
writeChat()
writeLine()
end
end
end
if sEvent == "redstone" then
if redstone.getInput(sClockIn) ~= bClock then
bClock = redstone.getInput(sClockIn)
if bIncoming == false then
bIncoming = true
writeGetLine()
end
if redstone.getInput(sDataIn) then
sBits = sBits .. "1"
nBitCount = nBitCount + 1
else
sBits = sBits .. "0"
nBitCount = nBitCount + 1
end
if nBitCount == 8 then
if sBits == "00000000" then
bIncoming = false
addChat(sIncoming)
sIncoming = ""
writeChat()
writeLine()
else
sIncoming = sIncoming .. string.char(tonumber(sBits,2))
end
sBits = ""
nBitCount = 0
end
end
end
end
term.clear()
term.setCursorPos( 1, 1 )
A description (Optional):
Network and chat. /name ###### to change your name(6 character limit.) Wire up with one line going to top and right, and the other to left and bottom, for input and output.
Wiring example:
Designed to use RedPower wires to carry signal, as seen in the images. To do it without, some creativity may be required.
Redstone powder on the left/right is required as the computer currently does not receive signals from redalloy wire.
Also, please leave code/pics in spoilers, or the OP will be huge.(Might want to put the calc code in a spoiler tag too.)
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.
I programmed transmitter and reciever.
You have 10 options on each side of the transmitter computer
which means 40~ if you dont count the top and button, and 60 if you do.
You can tell the transmitter to send 0-10 pulses and choose the side it will send to.
The reciever counts how many pulses were sended to him in a delay of 0.1 from pulse to pulse and 1.5 seconds total for each set of pulses. And you choose what it will do for each set.
Transmitter
function Check(way)
if way~="left" then
if way~="right" then
if way~="top" then
if way~="button" then
if way~="front" then
if way~="back" then
return true
end
end
end
end
end
end
return false
end
function check(nus)
if nus==nill then
return true
end
return false
end
term.clear()
term.setCursorPos(1,1)
while true do
write ("Enter Which Side To Send The Pulse ")
print(newline)
write ("(left, right, back, top, button) ")
print(newline)
Side = read()
while Check(Side) do
write("Side Doesn't Exitst , Write Again")
print(newline)
Side = read()
end
write ("Enter The Number of Pulses (0 to 10) ")
print(newline)
Num = read()
Num = tonumber(Num)
while check(Num) do
write("Write a number")
print(newline)
Num=read()
Num = tonumber(Num)
end
redstone.setOutput(Side, true)
sleep(0.5)
redstone.setOutput(Side, false)
while Num > 0 do
Num = Num - 1
term.clear()
term.setCursorPos(1,1)
write ("Automate Working Started- Now Executing ")
while true do
sleep(0.01)
if redstone.getInput("front") then
print(newline)
write("--------------------------------------------------")
write("Initialized")
write("--------------------------------------------------")
Counter = 0
i = 0
sleep(0.4)
while i<1 do
sleep(0.05)
i = i + 0.05
if redstone.getInput("front") then
j = 0
while j==0 do
sleep(0.05)
i = i + 0.05
if redstone.getInput("front")==false then
Counter = Counter + 1
a = tostring(Counter)
print("Pulse " .. a .. " ")
j=1
end
end
end
end
write("Sum:")
print(newline)
if Counter == 0 then write("I Got 0 :[") end
if Counter == 1 then write("I Got 1 ") end
if Counter == 2 then write("I Got 2 ") end
if Counter == 3 then write("I Got 3 ") end
if Counter == 4 then write("I Got 4 ") end
if Counter == 5 then write("I Got 5 ") end
if Counter == 6 then write("I Got 6 ") end
if Counter == 7 then write("I Got 7 ") end
if Counter == 8 then write("I Got 8 ") end
if Counter == 9 then write("I Got 9 ") end
if Counter == 10 then write("I Got 10 :] ") end
end
end
How To Use: You will need to edit the reciver reaction for each set of pulses sended to him- in short you tell him "Do this when you get 5 pulses, and this when you get 3 pulses" .
Edit the 'write("I Got * ")' parts in the code
Notes: 1.The reciever only recieve from the front 2.It takes 1.5 (max) sec for the transmitter to send all the pulses
and always 1.5 for the reciever to recieve them and procces them 3.The first pulse you see which lasts half a sec is only telling the reciever to start record how many pulses he get and to respond accordingly.
Edit:
Its working
and will tell you when the side you choose doesnt exist so it wouldnt break the transmitter program
.
Now when you write somthing in the transmitter that is not a number when it asks for how many pulses - it tells you its not a number and it doesnt break the transmitter
I programmed transmitter and reciever
you have 10 options on each side of the transmitter computer
which means 40~ if you dont count the top and button and 60 if you do
the reciever count how many redstone pulses were sended in a delay of 0.1 sec
you can tell the transmitter to send 1-10
and you can edit the "bla bla bla" part to tell to the reciever what to do according to the number of pulses he recieved
Transmitter
write ("Hello Welcome To THe Control Center")
write ("Enter Which Side To Send The Pulse(left, right, back, front, top, button)")
Side = read()
write ("Please Enter The Number of Pulses (1 to 10)")
num = read()
num = tonumber(num)
write ("Write 'Begin' To Start")
if read() == "Begin" then
redstone.setOutput(Side, true)
sleep(1)
redstone.setOutput(Side, false)
i = 0
while i<1 do
if num > 0 then
num = num - 1
i = i + 0.1
sleep(0.05)
redstone.setOutput(Side, true)
sleep(0.05)
redstone.setOutput(Side, false)
else
i = i + 1
sleep(0.1)
end
end
end
Reciever
write ("Automate Working Started- Now Executing")
while true do
sleep(0.01)
if redstone.getInput("front" ,true) then
k = 1
Counter = 0
i = 0
sleep(1)
while i<1.5 do
sleep(0.01)
i = i + 0.01
if redstone.getInput("front", true) then
j = 0
while j == 0 do
sleep(0.01)
i = i + 0.01
if redstone.getInput("front", false) then
Counter = Counter + 1
j=1
end
end
end
end
end
if k == 1 then
k = 0
if Counter == 1 then Bla bla bla end
if Counter == 2 then Bla bla bla end
if Counter == 3 then Bla bla bla end
if Counter == 4 then Bla bla bla end
if Counter == 5 then Bla bla bla end
if Counter == 6 then Bla bla bla end
if Counter == 7 then Bla bla bla end
if Counter == 8 then Bla bla bla end
if Counter == 9 then Bla bla bla end
if Counter == 10 then Bla bla bla end
end
end
I can basicly program the reciever so he will have 60~ options too but i think its unessecary since the transmitter is the your main control computer which can control alot of reciever so 10 options per reciever is above and beyond what you will require
Wow - testing it in my world, but its a bit confusing to setup
Name of program: Fallout 3/NV style 'hackable' terminal Functions: opening doors, with a lot of work. Download link/Copy of code:http://kyoshiku.net/fo3_term.rar A description (Optional):
Terminal to open a single door, in Fallout 3 style.
Top output goes to the door to open it, bottom input for the reset(from a secure room would be good.)
Important! all files must be in the local computer running the program. You can't just dump this one into /roms/programs/. Put them all into the /saves/worldname/computer/#/ for the computer(s) you want it in.
Name of program: Fallout 3/NV style 'hackable' terminal Functions: opening doors, with a lot of work. Download link/Copy of code:http://kyoshiku.net/fo3_term.rar A description (Optional):
Terminal to open a single door, in Fallout 3 style.
Top output goes to the door to open it, bottom input for the reset(from a secure room would be good.)
Important! all files must be in the local computer running the program. You can't just dump this one into /roms/programs/. Put them all into the /saves/worldname/computer/#/ for the computer(s) you want it in.
Cool
just yesterday i thought about the mod wasteland and texture pack last days
and that with this mod you can do a computer that you can hack with fallout 3 style
but then i thought its too difficult for me :[
Cool
just yesterday i thought about the mod wasteland and texture pack last days
and that with this mod you can do a computer that you can hack with fallout 3 style
but then i thought its too difficult for me :[
+1 from me :]
Thanks. As you can likely tell from the screenshot, I'm pretty much always running Last Days.
Edit: nevermind, you can't really see it in the background. You could on my LAN though, but not this one.
Perfect just what I need I'll test this and get back to you with any suggestions i have, can I modify this however I like or do u want your code to be your code only
Im open to suggestions
and you can modifly it however you like lol its not like i can control what you will do with the code
the only thing im against is not giving credit if you are posting it anywhere
My first play with this, a morse code S.O.S. Beacon. I assembled this code after checking out the other programs supplied in the mod.
Just type "edit startup" and put in this code...
os.run( {}, "rom/programs/clear" )
print ( "Running SOS Beacon..." )
-- Put a sticky piston with something bright on top
local sSide = "top"
local nCount = 3
local nPeriod = 1
-- Redstone from the left will halt execution
while redstone.getInput( "left" ) ~= true do
-- S:
os.run( {}, "rom/programs/redpulse",
"top", nCount, nPeriod )
-- O: not a pulse as such
for n=1,nCount do
redstone.setOutput( sSide, true )
sleep( nPeriod*2 )
redstone.setOutput( sSide, false )
sleep( nPeriod )
end
-- S:
os.run( {}, "rom/programs/redpulse",
"top", nCount, nPeriod )
end
print ( "Redstone execution halt signal detected." )
How to use:
1.Choose how many counts you want which will be 'x'
2.Write which side you want the pulse to be made after x counts has been made
3.Choose how much time the pulse will last
Example
lets say i will do it like that
1. 100 counts
2.front
3. 5
After the counter counts 100 pulses from its back it will send a pulse to its front for 5 seconds and it will start to count again as soon as 100 pulses has been counted (It is used with the Item Detector of RP2)
you can use it for other things aswell so its up to you
function Check(way)
if way~="left" then
if way~="right" then
if way~="top" then
if way~="button" then
if way~="front" then
if way~="back" then
return true
end
end
end
end
end
end
return false
end
function check(nus)
if nus==nill then
return true
end
return false
end
term.clear()
term.setCursorPos(1,1)
write("Enter How Many Times To Count")
print(newline)
num=read()
while check(tonumber(num)) do
write("Write a number")
print(newline)
num=read()
end
write("Enter The Side The Pulse Will Be Sended After "..num.." Counts Has been Made")
print(newline)
Side=read()
while Check(Side) do
write("Side Doesn't Exitst , Write Again")
print(newline)
Side = read()
end
write("Enter How Long The Pulse Will Be In Seconds")
print(newline)
delay=tonumber(read())
while check(delay) do
write("Write a number")
print(newline)
delay=read()
delay = tonumber(delay)
end
write ("Automate Counting Started- Now Executing ")
print(newline)
num=tonumber(num)
Counter=0
while true do
while Counter<num do
sleep(0.01)
if redstone.getInput("back") then
j = 0
while j==0 do
sleep(0.05)
if redstone.getInput("back")==false then
Counter = Counter + 1
a = tostring(Counter)
print("Pulse " .. a .. " ")
j=1
end
end
end
end
Counter=0
redstone.setOutput(Side, true)
sleep(delay)
redstone.setOutput(Side, false)
end
If you just want to count pulses without reseting the counter just choose a really high number for the counts like 9999999999 and it will count the pulses
Name of program: Fallout 3/NV style 'hackable' terminal Functions: opening doors, with a lot of work. Download link/Copy of code:http://kyoshiku.net/fo3_term.rar
>cut out to save space<
Is there a way to make it automatically pop up (without having to type the program name) and also not just send out a redstone signal but have sort of the fallout style menu?
ex
Bla bla bla wall of text
Welcome USER
-----------------------------------
-Locks
>when you type Locks it brings up a menu<
-Door1
or maybe
-Safe1
I don't know. I can't find a good place to learn lua or I'd try myself.
Link to ComputerCraft:
http://www.minecraftforum.net/topic/892282-100-computercraft/
MOVED TO THIS FORUM
Link: http://mccraftcpl.proboards.com/
Program Library
Security
OSLock
It adds a password to get into the OS.
Download: http://www.4shared.com/file/uzbDFJvO/startup.html
The default password is cheese. Changeable once you login by saying edit startup. Supports startup Sounds. Hydrogen's original lock was a base, edited and optomised by me...
by shdwkt84403123123"
Password Protected Terminals by streetstar5
Protects terminals
Download: http://www.4shared.com/file/ds-PsIhv/startup_2.html
You will have to rename it when it downloads."
Acts as a door lock.
Download:http://www.4shared.com/file/cUaVK1Oj/startup_3.html
Can't put code until someone tells me how to make spoilers... You will have to rename the file once downloaded."
Games
GameAPI by VertexBeta
Used to create 2D Ascii-Style games.
Download Link/Copy of code: http://pastebin.com/5WX5GjAM
Basic Calculator by PokerPop
Does Maths!
Download: http://www.4shared.com/file/1hU9IFmP/calculator.html
Code:
print("Welcome to the calculator!")
repeat
print ("Please choose one of the four option: for addition type '+', for abstraction type '-', for multiplication type '*' and for division type '/'.")
calc_q = read()
print("Put your first number here: ")
number1 = read()
print("Put your second number here: ")
number2 = read()
if calc_q == "+" then
etaresult = number1+number2
print("The result is: ")
print(result)
elseif calc_q == "-" then
result = number1-number2
print("The result is: ")
print(result)
elseif calc_q == "*" then
result = number1*number2
print("The result is: ")
print(result)
elseif calc_q == "/" then
result = number1/number2
print("The result is: ")
print(result)
else print("You put the wrong operation!")
end
print("If you want to use the calculator again, press enter. If you want to exit the program, type 'exit'")
continue_q = read()
until (continue_q == "exit")
print("Thank you for usining Pop's calculator!")
End of calculator
Does Maths
Download: http://www.4shared.com/file/UHcpxXqg/calculator_2.html
Code:
http://pastebin.com/u/TangentDelta
My calculator
My security lock --credits to Hydrogen :smile.gif:
Password-protected Terminals --credits to Vertex Beta
Functions: Use to create 2D ascii-style games.
Download link/Copy of code: http://pastebin.com/5WX5GjAM
This was a good idea by the way.
Also He made Pong, so that can be added to the Games catergory. Just pm him. I sent him a message incase he's unaware of this Library.
print("RedWord Word Processor - Alpha v0.01")
x = 1
function takeGive()
input = read()
print(input)
if input == "exit" then leaveProg()
for x = 1, 25, 1 do takeGive()
end
end
function leaveProg()
shell.exit()
end
end
takeGive()
Functions: Network over line pair, chat program.
Download link/Copy of code:
Network and chat. /name ###### to change your name(6 character limit.) Wire up with one line going to top and right, and the other to left and bottom, for input and output.
Wiring example:
Redstone powder on the left/right is required as the computer currently does not receive signals from redalloy wire.
Also, please leave code/pics in spoilers, or the OP will be huge.(Might want to put the calc code in a spoiler tag too.)
Hope the Op is changed to use this one under my lock program.
You have 10 options on each side of the transmitter computer
which means 40~ if you dont count the top and button, and 60 if you do.
You can tell the transmitter to send 0-10 pulses and choose the side it will send to.
The reciever counts how many pulses were sended to him in a delay of 0.1 from pulse to pulse and 1.5 seconds total for each set of pulses. And you choose what it will do for each set.
Transmitter
if way~="left" then
if way~="right" then
if way~="top" then
if way~="button" then
if way~="front" then
if way~="back" then
return true
end
end
end
end
end
end
return false
end
function check(nus)
if nus==nill then
return true
end
return false
end
term.clear()
term.setCursorPos(1,1)
while true do
write ("Enter Which Side To Send The Pulse ")
print(newline)
write ("(left, right, back, top, button) ")
print(newline)
Side = read()
while Check(Side) do
write("Side Doesn't Exitst , Write Again")
print(newline)
Side = read()
end
write ("Enter The Number of Pulses (0 to 10) ")
print(newline)
Num = read()
Num = tonumber(Num)
while check(Num) do
write("Write a number")
print(newline)
Num=read()
Num = tonumber(Num)
end
redstone.setOutput(Side, true)
sleep(0.5)
redstone.setOutput(Side, false)
while Num > 0 do
Num = Num - 1
sleep(0.05)
redstone.setOutput(Side, true)
sleep(0.05)
redstone.setOutput(Side, false)
end
term.clear()
term.setCursorPos(1,1)
end
Reciever
term.setCursorPos(1,1)
write ("Automate Working Started- Now Executing ")
while true do
sleep(0.01)
if redstone.getInput("front") then
print(newline)
write("--------------------------------------------------")
write("Initialized")
write("--------------------------------------------------")
Counter = 0
i = 0
sleep(0.4)
while i<1 do
sleep(0.05)
i = i + 0.05
if redstone.getInput("front") then
j = 0
while j==0 do
sleep(0.05)
i = i + 0.05
if redstone.getInput("front")==false then
Counter = Counter + 1
a = tostring(Counter)
print("Pulse " .. a .. " ")
j=1
end
end
end
end
write("Sum:")
print(newline)
if Counter == 0 then write("I Got 0 :[") end
if Counter == 1 then write("I Got 1 ") end
if Counter == 2 then write("I Got 2 ") end
if Counter == 3 then write("I Got 3 ") end
if Counter == 4 then write("I Got 4 ") end
if Counter == 5 then write("I Got 5 ") end
if Counter == 6 then write("I Got 6 ") end
if Counter == 7 then write("I Got 7 ") end
if Counter == 8 then write("I Got 8 ") end
if Counter == 9 then write("I Got 9 ") end
if Counter == 10 then write("I Got 10 :] ") end
end
end
Edit the 'write("I Got * ")' parts in the code
Notes:
1.The reciever only recieve from the front
2.It takes 1.5 (max) sec for the transmitter to send all the pulses
and always 1.5 for the reciever to recieve them and procces them
3.The first pulse you see which lasts half a sec is only telling the reciever to start record how many pulses he get and to respond accordingly.
Edit:
Its working
and will tell you when the side you choose doesnt exist so it wouldnt break the transmitter program
.
Now when you write somthing in the transmitter that is not a number when it asks for how many pulses - it tells you its not a number and it doesnt break the transmitter
Wow - testing it in my world, but its a bit confusing to setup
Actually its really simple
all you need to change in the code is the "bla bla bla" which is what you want the reciever to do
the transmitter asks you what direction you want the pulses and how many pulses
Edit :
im fixing some things in the code right now so if someone want to you use it please wait untill im done :]
Functions: opening doors, with a lot of work.
Download link/Copy of code: http://kyoshiku.net/fo3_term.rar
A description (Optional):
Terminal to open a single door, in Fallout 3 style.
Top output goes to the door to open it, bottom input for the reset(from a secure room would be good.)
Important! all files must be in the local computer running the program. You can't just dump this one into /roms/programs/. Put them all into the /saves/worldname/computer/#/ for the computer(s) you want it in.
Fixed my Transmitter - Reciever program
Cool
just yesterday i thought about the mod wasteland and texture pack last days
and that with this mod you can do a computer that you can hack with fallout 3 style
but then i thought its too difficult for me :[
+1 from me :]
Thanks. As you can likely tell from the screenshot, I'm pretty much always running Last Days.
Edit: nevermind, you can't really see it in the background. You could on my LAN though, but not this one.
Im open to suggestions
and you can modifly it however you like lol its not like i can control what you will do with the code
the only thing im against is not giving credit if you are posting it anywhere
Just type "edit startup" and put in this code...
How to use:
1.Choose how many counts you want which will be 'x'
2.Write which side you want the pulse to be made after x counts has been made
3.Choose how much time the pulse will last
Example
lets say i will do it like that
1. 100 counts
2.front
3. 5
After the counter counts 100 pulses from its back it will send a pulse to its front for 5 seconds and it will start to count again as soon as 100 pulses has been counted (It is used with the Item Detector of RP2)
you can use it for other things aswell so its up to you
if way~="left" then
if way~="right" then
if way~="top" then
if way~="button" then
if way~="front" then
if way~="back" then
return true
end
end
end
end
end
end
return false
end
function check(nus)
if nus==nill then
return true
end
return false
end
term.clear()
term.setCursorPos(1,1)
write("Enter How Many Times To Count")
print(newline)
num=read()
while check(tonumber(num)) do
write("Write a number")
print(newline)
num=read()
end
write("Enter The Side The Pulse Will Be Sended After "..num.." Counts Has been Made")
print(newline)
Side=read()
while Check(Side) do
write("Side Doesn't Exitst , Write Again")
print(newline)
Side = read()
end
write("Enter How Long The Pulse Will Be In Seconds")
print(newline)
delay=tonumber(read())
while check(delay) do
write("Write a number")
print(newline)
delay=read()
delay = tonumber(delay)
end
write ("Automate Counting Started- Now Executing ")
print(newline)
num=tonumber(num)
Counter=0
while true do
while Counter<num do
sleep(0.01)
if redstone.getInput("back") then
j = 0
while j==0 do
sleep(0.05)
if redstone.getInput("back")==false then
Counter = Counter + 1
a = tostring(Counter)
print("Pulse " .. a .. " ")
j=1
end
end
end
end
Counter=0
redstone.setOutput(Side, true)
sleep(delay)
redstone.setOutput(Side, false)
end
If you just want to count pulses without reseting the counter just choose a really high number for the counts like 9999999999 and it will count the pulses
Is there a way to make it automatically pop up (without having to type the program name) and also not just send out a redstone signal but have sort of the fallout style menu?
ex
Bla bla bla wall of text
Welcome USER
-----------------------------------
-Locks
>when you type Locks it brings up a menu<
-Door1
or maybe
-Safe1
I don't know. I can't find a good place to learn lua or I'd try myself.
TG: john is TG: im not