
Draw a wizard (Magical or installation)
There have been 112 items by Quintuple Agent (Search limited from 10-February 22)
Posted by
Quintuple Agent
on 13 August 2015 - 07:46 AM
in
Forum Games


Posted by
Quintuple Agent
on 30 June 2015 - 05:54 AM
in
Ask a Pro
local test="testing" test2="Terst'n" oldUp = string.upper print(string.upper(test)) print(test:upper()) print(string.upper(test2)) print(test2:upper()) function string.upper() return "Ya done messed up" end print(string.upper(test)) print(test:upper()) print(string.upper(test2)) print(test2:upper()) string.upper = function () return "Still messed up" end print(string.upper(test)) print(test:upper()) print(string.upper(test2)) print(test2:upper())
TESTING TESTING TERST'N TERST'N Ya done messed up Ya done messed up Ya done messed up Ya done messed up Sill messed up Sill messed up Sill messed up Sill messed up
TESTING Sill messed up TERST'N Sill messed up Ya done messed up Sill messed up Ya done messed up Sill messed up Sill messed up Sill messed up Sill messed up Sill messed up
Posted by
Quintuple Agent
on 22 June 2015 - 12:37 AM
in
Ask a Pro
function checkData()
for i,d in pairs(data) do
print("Indx:"..i..":"..type(d).." "..tostring(d))
end
end
and if for some reason the directories are not being created by fs.open, you can use thisfunction mkDirTree(tempDir)
local full=""
for cd in string.gmatch(tempDir,"%w+/") do
full=full..cd
if not fs.exists(full) then
fs.makeDir(full)
print("Made "..full)
else
print(full.." Exists")
end
end
return
end
Just make sure when you call it you domkDirTree("UserInfo/"..dir)
instead ofmkDirTree(dir)(I forgot about that for like 3 minutes and was wondering why it was just creating client and not the UserInfo
Posted by
Quintuple Agent
on 21 June 2015 - 11:38 PM
in
Ask a Pro
bbaayyeerr, on 21 June 2015 - 11:35 PM, said:
Posted by
Quintuple Agent
on 21 June 2015 - 11:29 PM
in
Ask a Pro
data={"this","is","a","test"}
dir = "client/"..data[4]
function saveUserInfo(dir)
local username = {"user1", "user2", "user3"} -- Here you need to define all default usernames
local password = {"password1", "password2", "password3"} -- Here you define what password each default user has
local file = fs.open("UserInfo/"..dir, "w")
print("Successfully opened file...") --debugging
file.write(textutils.serialize(username).."\n"..textutils.serialize(password))
file.close()
end
saveUserInfo(dir)
and it worked, created the correct directories UserInfo/client with the file inside and appeared as{
"user1",
"user2",
"user3",
}
{
"password1",
"password2",
"password3",
}
TheOddByte, on 21 June 2015 - 11:23 PM, said:
Posted by
Quintuple Agent
on 21 June 2015 - 11:13 PM
in
Ask a Pro
Posted by
Quintuple Agent
on 19 June 2015 - 01:15 AM
in
Ask a Pro
local exeTab = loadstring("print('hello')")
exeTab()
I would suggest reading the lua tutorial page for thisQuote
Posted by
Quintuple Agent
on 18 June 2015 - 01:46 AM
in
Ask a Pro
Posted by
Quintuple Agent
on 17 June 2015 - 11:09 PM
in
Ask a Pro
local oldEve = os.pullEvent os.pullEvent = os.pullEventRaw
os.pullEvent = oldEveto change it back to normal
while true do
shell.run("doorlock")
end
toshell.run("doorlock")
andif input == "123" then
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("The password entered was correct!")
sleep(1)
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("Opening Gate...")
rs.setOutput("back",true)
sleep(5)
rs.setOutput("back",false)
else if input == "1234" then
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("Admin password has been entered.")
sleep(1)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("One moment...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
error()
toif input == "123" then
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("The password entered was correct!")
sleep(1)
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("Opening Gate...")
rs.setOutput("back",true)
sleep(5)
rs.setOutput("back",false)
x = 1 --Added so when the correct password is entered the incorrect counter resets
else if input == "1234" then
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("Admin password has been entered.")
sleep(1)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("One moment...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
os.pullEvent = oldEve --Change the pullEvent back to normal
return --You can use return instead of error() (Just better practice since there is no real error
Posted by
Quintuple Agent
on 13 June 2015 - 02:32 AM
in
Ask a Pro
txtTab={
"this",
"is a test",
"On storing",
"Text"
}
So each index is a new line, or do you have some other way of storing it?
Posted by
Quintuple Agent
on 10 June 2015 - 01:01 AM
in
Ask a Pro
Posted by
Quintuple Agent
on 04 June 2015 - 12:31 AM
in
Forum Games
Posted by
Quintuple Agent
on 04 June 2015 - 12:01 AM
in
Forum Games

Posted by
Quintuple Agent
on 29 May 2015 - 09:51 PM
in
Forum Games

Posted by
Quintuple Agent
on 15 May 2015 - 05:57 PM
in
Ask a Pro
flaghacker, on 15 May 2015 - 05:54 PM, said:
Posted by
Quintuple Agent
on 15 May 2015 - 05:54 PM
in
Ask a Pro
Posted by
Quintuple Agent
on 14 May 2015 - 02:51 AM
in
Ask a Pro
write("Type: "..(alias[list[num].label] or list[num].label))
print("Hello ".. nil or "world")
print("Hello ".. (nil or "world"))
print("Hello ".. (nil) or "world")
Only the one that has the whole OR statement in brackets worked
Posted by
Quintuple Agent
on 22 April 2015 - 07:04 PM
in
Ask a Pro
> message Hello Worldwould have tArgs[1] be "Hello" and tArgs[2] be "World" you can recombine these by doing
newMsg = table.concat(tArgs," ")What this does is take the table tArgs and adds a space in between each argument. The " " is what it will add, so "," would return Hello,World and "-.-" would return Hello-.-World as an example.
Posted by
Quintuple Agent
on 21 April 2015 - 03:33 PM
in
Ask a Pro
Posted by
Quintuple Agent
on 03 April 2015 - 09:46 PM
in
Ask a Pro
userString=tostring(userString)That way it will still work in case you give the function a number
monitor.write(UserString)change that to
monitor.write(userString)3. While not really needed, make your x and y variables local, this is a good thing to practice.
Posted by
Quintuple Agent
on 16 March 2015 - 05:15 PM
in
Ask a Pro
if term then write=term.write endthe reason they would not simply do write=term.write is because if term is not a table then trying to access term.write would throw back an error.(however it should be write = type(term)=="table" and term.write, however if term does exist it should be a table, unless someone redefined it.
Posted by
Quintuple Agent
on 14 March 2015 - 11:14 PM
in
Ask a Pro
Posted by
Quintuple Agent
on 12 March 2015 - 12:03 AM
in
Programs
Geforce Fan, on 11 March 2015 - 11:30 PM, said:
osStuff.dirColorThis crashes.
Posted by
Quintuple Agent
on 11 March 2015 - 11:29 PM
in
Ask a Pro
os.pullEvent = os.pullEventRawnear the start of your code, it will change os.pullEvent to os.pullEventRaw for all programs (until you change it back or restart the computer)
local oldPull = os.pullEvent os.pullEvent = os.pullEventRawThat way you can do
os.pullEvent = oldPullto change it back.
Posted by
Quintuple Agent
on 11 March 2015 - 12:34 AM
in
Ask a Pro
local eve,key=os.pullEvent("key")
if key==keys.backspace then --Would trigger if the user hit the backspace key
doBackspaceStuff()
end
I would recommend looking at the keyAPI for the available key variables, or the key Event for a list of which keys return which numbers.local eve,key=os.pullEvent()
if eve=="key" then --Will trigger everytime the user presses a key
if key==keys.backspace then
doBackspaceStuff()
else
otherKeystuff()
end
elseif eve=="char" then --Will trigger whenever the user presses a key that is printable (a-z,0-9,!@#$%,etc.)
print("I just pressed "..key)
end
They char event is thrown if you press a key that is printable, however the key event is always thrown.