Posted 20 February 2013 - 03:30 AM
Title: Fallout style Hacking terminal
Hello i was just wondering if anyone has the Hacking terminal that was apparently at http://kyoshiku.net/fo3_term.rar I get a 404 error…
Overwise would someone be able to help me with designing my own, i already got a way of making it spit out random strings
But i cant seem to get a couple of things to work,
External file loading (For a Dictionary.txt) so the words are not based in the code
Random password from generated words (i havent got a clue how to do this i only started learning lua this morning)
Hello i was just wondering if anyone has the Hacking terminal that was apparently at http://kyoshiku.net/fo3_term.rar I get a 404 error…
Overwise would someone be able to help me with designing my own, i already got a way of making it spit out random strings
local words = {"Hello", "World", "Random", "Word", "Gangnam", "wanker", "tosser", "", ""} -- A table containing all of the words that could get randomly put in to a line
local chars = "!#£$%&'[]{}()/><~"..'"' --string containing all possible random character
local cols = {colours.green}
local word_col = colors.white
local l = 12 --length of each line
local Monitor = peripheral.call("top", "write", "Security: Online")
local h = 17 --amount of lines
local offset = {1,1} --offset of x,y cursor pos
for y=1,17 do
local line = ""
for i=1,l do
local n = math.random(string.len(chars)) --get a random character index from the string "chars"
line = line..chars:sub(n,n) -- put the random character on the end of the line
end
local n = math.random(string.len(line)) --get a random index of the string "line"
local str = {line:sub(1, n-1), line:sub(n, -1)} --split the string "line" before and after this index
local word = words[math.random(#words)]
line = str[1]..word..str[2] --put a random word either side of this n
for x=1,string.len(line) do
term.setCursorPos(offset[1]+(x-1), offset[2]+(y-1))
local col = cols[math.random(#cols)]
if x >= n and x <= (n+string.len(word)) then col = word_col end
term.setTextColor(col)
term.write(line:sub(x,x))
end
end
But i cant seem to get a couple of things to work,
External file loading (For a Dictionary.txt) so the words are not based in the code
Random password from generated words (i havent got a clue how to do this i only started learning lua this morning)