rs.setBundledOutput("back", colors.white)
sleep(0.5)
rs.setBundledOutput("back", 0)
rs.setBundledOutput("back", colors.red)
sleep(1.0)
rs.setBundledOutput("back", 0)
works in the creative areas, fails in the survival areas, any suggestions?
There have been 9 items by Quinncunx (Search limited from 10-February 22)
Posted by
Quinncunx
on 30 June 2012 - 01:51 AM
in
General
rs.setBundledOutput("back", colors.white)
sleep(0.5)
rs.setBundledOutput("back", 0)
rs.setBundledOutput("back", colors.red)
sleep(1.0)
rs.setBundledOutput("back", 0)
Posted by
Quinncunx
on 29 June 2012 - 05:33 PM
in
Ask a Pro
print("How many computers would you like to build?")
local num = tonumber(read())
if num > 5 then
print("Please input a smaller amount this time")
elseif input == 0 then
print("please enter an amount")
elseif input == 1 then
stonex = tonumber(7)
redstonex = tonumber(1)
glassx = tonumber(1)
print("glassx")
elseif input == 2 then
stonex = (14)
redstonex = tonumber(2)
glassx = tonumber(2)
elseif input == 3 then
stonex = tonumber(21)
redstonex = tonumber(3)
glass = tonumber(3)
elseif input == 4 then
stonex = tonumber(28)
redstonex =tonumber(4)
glass = tonumber(4)
else
stonex = tonumber(35)
redstonex = tonumber(5)
glassx = tonumber(5)
end
for i=1,tonumber(redstonex),1 do
rs.setBundledOutput("back", "color.red")
sleep(0.5)
redstone.setBundledOutput(sSide, 0)
for j=1,glassx,1 do
rs.setBundledOutput("back", "color.white")
sleep(0.5)
redstone.setBundledOutput(sSide, 0)
for k=1,stonex,1 do
rs.setBundledOutput("back", "color.white")
sleep(0.5)
redstone.setBundledOutput(sSide, 0)
end
end
end
Posted by
Quinncunx
on 16 June 2012 - 11:59 PM
in
Ask a Pro
Posted by
Quinncunx
on 16 June 2012 - 04:01 PM
in
Ask a Pro
local pwfile = "pwfile.txt"
local sidefile = "sidefile.txt"
local file = fs.open (pwfile, "r")
local file2 = fs.open(sidefile, "r")
--Checks if the password and side file cfg exists if true then runs phase 1 if false then runs phase 2
print("checks for cfg")
if file and file2 then
-- PHASE 1
local password = file.readAll()
local side = file2.readAll()
file.close()
file2.close()
term.clear()
print("Key Code:")
print("Hit F9 to change your keycode")
--need to move actual check to here
local input = read("*")
-- masks the keycode input
if input == password then
print("Keycode Correct!")
rs.setOutput(side, true)
sleep(5)
rs.setOutput(side, false)
os.reboot()
-- Dim key event
local key, param1 = os.pullEvent(key)
-- checks to see if F9 has been hit
elseif param1 == 67 then
-- changing keycode code
local pw = "pwfile.txt"
local file = fs.open (pwfile "r")
file.close()
print("Please enter your current keycode:")
local input read("*")
--checks the entered password is correct
if input == password then
print("Now enter your new keycode:")
local pwin read ("*")
local npwin = pwin
file = fs.open(pwfile, "w")
file.write(npwin)
file.close()
print("Console will now reboot")
sleep(2)
os.reboot()
else
print("Your keycode was incorrect")
sleep(5)
os.reboot()
end
else
print("Keycode Incorrect")
sleep(2)
os.shutdown()
end
else
--Phase 2
--runs initial cfg
print("Inital Configuration - Please enter your desired keycode:")
local inputpw = read("*")
local pwnew = inputpw
file = fs.open(pwfile, "w")
file.write(pwnew)
file.close()
term.clear()
print("Inital Configuration - Please enter the side of the console that the door is connected ton Right | Left | Back")
local inputside = read()
local sidenew = inputside
file2 = fs.open(sidefile, "w")
file2.write(sidenew)
file2.close()
print("settings configured Console will now reboot")
sleep(5)
os.reboot()
end
--Print("This is the end, Debug line")
Posted by
Quinncunx
on 14 June 2012 - 01:03 AM
in
Ask a Pro
local pwfile ="pwfile.txt"
local sidefile ="sidefile.txt"
local file = fs.open (pwfile, "r")
local file2 = fs.open (sidefile, "r")
-- Checks if the password file and side file cfg exists
if file and file2 then
local password = file.readAll()
local side = file2.readAll()
file.close()
file2.close()
term.clear()
print("Key Code:")
print("Hit F9 to change your keycode")
local event, param1 = os.pullEvent(key)
-- Checks if f9 has been hit and opens change keycode dialogue
if param1 == 67 then
local pw = "pwfile.txt"
local file = fs.open (pwfile, "r")
file.close()
print("Please enter your current keycode:")
local input read("*")
-- checks the entered password is correct
if input == password then
print("Now enter your new keycode:")
local pwin read("*")
-- writes new password to file
local npwin = pwin
file = fs.open(pwfile, "w")
file.write(npwin)
file.close()
os.reboot()
else
print("Your keycode was incorrect")
sleep(5)
os.reboot()
end
-- runs actual password check to open door
local input = read("*")
if input == password then
print("Keycode correct!")
rs.setOutput(side, true)
sleep(5)
rs.setOutput(side, false)
os.reboot()
else
-- if keycode was not correct
print("Keycode incorrect")
sleep(2)
os.shutdown()
end
else
-- runs intial configuration of the system
print("Initial Configuration - Please enter your desired keycode:")
local inputpw = read("*")
local pwnew = inputpw
file = fs.open(pwfile, "w")
file.write(pwnew)
file.close()
term.clear()
print("Initial Configuration - Please enter the side of the console that the door is connected to\n Right | Left | Back")
local inputside = read()
local sidenew = inputside
file2 = fs.open(sidefile, "w")
file2.write(sidenew)
file2.close()
print("Settings configured OS will now reboot")
sleep(5)
os.reboot()
end
end
Posted by
Quinncunx
on 06 June 2012 - 02:31 PM
in
Ask a Pro
