:3
This commit is contained in:
parent
491112768c
commit
68ec37f994
66 changed files with 6591 additions and 10096 deletions
|
@ -1,48 +1,3 @@
|
|||
term.clear()
|
||||
term.setCursorPos(1,1)
|
||||
print("Chaos Gremlin Protection System")
|
||||
local secret = "mrrrp"
|
||||
local input = ""
|
||||
write("log in: ")
|
||||
while true do
|
||||
local event, extra = os.pullEventRaw()
|
||||
if event == "terminate" then
|
||||
print("\nnice try")
|
||||
write("log in: ")
|
||||
input = ""
|
||||
elseif event == "char" then
|
||||
input = input .. extra
|
||||
write("*")
|
||||
elseif event == "key" then
|
||||
if extra == 259 and #input > 0 then
|
||||
x, y = term.getCursorPos()
|
||||
x = x - 1
|
||||
term.setCursorPos(x, y)
|
||||
write(" ")
|
||||
term.setCursorPos(x, y)
|
||||
input = string.sub(input, 1, string.len(input) - 1)
|
||||
elseif extra == 257 then
|
||||
if input == secret then
|
||||
break
|
||||
else
|
||||
print("\nbegone, intruder\n\""..input.."\" is wrong")
|
||||
write("log in: ")
|
||||
input = ""
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--require("multishell")
|
||||
shell.execute("dirt")
|
||||
|
||||
print()
|
||||
-- w = _G.write
|
||||
-- p = _G.print
|
||||
-- _G.write = function(text)
|
||||
-- return w("meow ")
|
||||
-- end
|
||||
-- _G.print = function (...)
|
||||
-- p("meow ")
|
||||
-- end
|
||||
-- b = term.blit
|
||||
-- term.blit = function(text, fg, bg)
|
||||
-- b("meow", fg, bg)
|
||||
-- end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue