Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created and Developed by killzoms
- --Some Variable
- set = {}
- line = 220
- filte = {}
- time = {}
- nu = {}
- updat = http.get("https://pastebin.com/raw/LcprcigA")
- upd = updat.readAll()
- cu = fs.open("LapChat", "w")
- cu.write(upd)
- cu.flush()
- cu.close()
- os.run("LapChat")
- --Download LapAPI
- -- updat = http.get("https://pastebin.com/raw/FM10T2EU")
- -- upd = updat.readAll()
- -- cu = fs.open("LapAPI", "w")
- -- cu.write(upd)
- -- cu.flush()
- -- cu.close()
- -- os.loadAPI("LapAPI")
- --Run when the chat runs for the first time
- --glass, mon, ups = LapAPI.runChatFirstTime()
- --Function for finding commands
- --function run(...)
- -- _G.msgArgs = {}
- -- v = 1
- --Check messages for spaces and split when found
- -- for i in string.gmatch(msg, "%S+") do
- -- _G.msgArgs[v] = i
- -- v = v + 1
- -- end
- --Classic Command Prefix
- -- if string.match(arg[1], "/") ~= nil and string.match(arg[1], "./") == nil then
- -- return true
- -- else
- -- return false
- -- end
- --end
- --function fade()
- --Will finish
- --end
- --Load Addons
- --function addons()
- -- installedAddons = {}
- -- if fs.exists("Chat/InstalledAddons") == true then
- -- iAddons = fs.open("Chat/InstalledAddons", "r")
- -- installedAddons = textutils.unserialize(iAddons.readAll())
- -- for i,v in ipairs(installedAddons) do
- -- os.loadAPI("Chat/Addons/"..installedAddons[i])
- -- funct = loadstring(installedAddons[i]..".run()")
- -- funct()
- -- end
- -- iAddons.close()
- -- end
- --end
- --function color()
- --Working on it
- --end
- --If mon present print messages to it
- --function monitor()
- -- if mon then
- -- mon.setCursorPos(1,1)
- -- mon.setTextScale(0.75)
- -- mon.clear()
- -- mon.write(realName.." > "..msg)
- -- end
- --end
- --Main function
- --function main()
- -- while true do
- --Reset variables
- -- _G.realName = ""
- -- _G.facs = ""
- -- _G.rank = ""
- -- _G.commandUser = nil
- --Update Chat
- -- if ups == true then
- -- LapAPI.update("QDGKgTAh", "startup")
- -- end
- --Pull events from the Terminal Glasses
- -- e, side, _G.user, _G.uuid, _G.msg = os.pullEvent("glasses_chat_command")
- --Check for Commands
- -- _G.isCommand = run(_G.msg)
- --If Command set user to command User
- -- if _G.isCommand then
- -- _G.set = {}
- -- _G.commandUser = _G.user
- -- _G.user = ""
- -- end
- --Initialize addons
- -- addons()
- --If Factions installed check for Faction commands
- -- if Factions then
- -- Factions.facCommands(_G.msgArgs, _G.user)
- -- end
- --Load Faction name of user
- -- if not isCommand then
- -- if Factions then
- -- _G.facs = Factions.checkFac(_G.user)
- -- end
- -- end
- -- LapAPI.clearChat(_G.msgArgs)
- -- monitor()
- -- LapAPI.chatSave(_G.facs, _G.rank, _G.hyph, _G.user, _G.msg, _G.isCommand)
- -- if _G.con then
- -- glass.addText(2, 230, "Console > ".._G.con, 0xFFFFFF)
- -- end
- -- fade()
- -- If a command not detected print multiple lines
- -- if not _G.isCommand then
- -- glass.clear()
- -- LapAPI.chatMultiline()
- -- end
- -- glass.sync()
- -- end
- --end
- --Run Multiple functions at once
- --parallel.waitForAll(main, LapAPI.chatConsole, LapAPI.chatSaveToFile, LapAPI.userJoined, LapAPI.userLeft)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement