Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Jarvis = "off"
- chatbox = peripheral.wrap("right")
- screen = peripheral.wrap("left")
- rColor = 0
- screen.setTextScale(1)
- screen.clear()
- screen.setCursorPos(1,1)
- rednet.open("top")
- a = fs.list("/LOGS")
- FILE = #a
- modem = peripheral.wrap("top")
- modem.open(314)
- term.redirect(screen)
- chatbox.say("Jarvis: Chat is now being Recorded.")
- print("---------------------------------CHAT----------------------------------")
- while true do
- event, player, message,d,e,f,g = os.pullEvent()
- if event == "chat" then
- term.setTextColor(512)
- if player == "leperchuan97" or player == "AmericanTradegy_" or player=="thomas09" or player=="Vexillum_" or player=="ChipWee" or player=="bombitmanbomb" then
- term.setTextColor(32768)
- term.setBackgroundColor(32)
- end
- if player=="bombitmanbomb" or player=="AmericanTradegy_" then
- CMD = string.lower(message)
- if CMD=="!jarvis on" or CMD=="jarvis turn on" or CMD=="jarvis boot up" then
- chatbox.say("Jarvis: Booting Up.")
- sleep(2)
- chatbox.say('Jarvis: Welcome back "'..player..'"')
- Jarvis = "on"
- end
- if Jarvis == "on" then
- if CMD=="!jarvis time" or CMD=="jarvis what time is it" or CMD=="jarvis time" or CMD =="jarvis what is the time" then
- a = os.time()
- chatbox.say("Jarvis: the time is currently "..a)
- end
- if CMD=="jarvis turn off" or CMD == "jarvis power down" or CMD == "!jarvis off" then
- Jarvis = "off"
- chatbox.say("Jarvis: Powering Down.")
- end
- if CMD=="jarvis reset chat" or CMD=="jarvis reset log" or CMD=="jarvis clear chat" or CMD=="!jarvis log clear" then
- term.setBackgroundColor(32768)
- shell.run("clear")
- chatbox.say("Jarvis: Chat Log has been cleared!")
- end
- if CMD=="jarvis list commands" or CMD=="!jarvis commands" then
- chatbox.say("Jarvis: Commands Availible are 'Time','off','Log Clear','Commands','off'")
- end
- if CMD=="jarvis disable ore proccessing" or CMD=="!jarvis ore off" then
- chatbox.say("Jarvis: Ore Proccessing Disabled.")
- rColor = colors.combine(rColor,colors.white)
- rs.setBundledOutput("bottom",rColor)
- end
- if CMD == "jarvis enable ore proccessing" or CMD=="!jarvis ore on" then
- chatbox.say("Jarvis: Ore Proccessing Enabled.")
- rColor = colors.subtract(rColor,colors.white)
- rs.setBundledOutput("bottom",rColor)
- end
- end
- end
- if player == "TheColenater" or player == "drsmiles88"
- then
- term.setTextColor(1)
- term.setBackgroundColor(16384)
- end
- if player == "The_Implant" or player=="b1b1b11" then
- term.setTextColor(2048)
- end
- if player == "Grox18" then
- term.setTextColor(16384)
- write("[ADMIN]")
- end
- if player == "KnightTemplar24" or player=="tjborrelli" then
- term.setTextColor(1024)
- write("[HELPER]")
- term.setTextColor(2)
- end
- if player=="DeSNinja" then
- term.setTextColor(32)
- write("[Merd]")
- term.setTextColor(1024)
- end
- if player=="RandomS9S9"then
- term.setTextColor(8)
- write("[???]")
- end
- write(player)
- term.setTextColor(1)
- write(":")
- term.setTextColor(1)
- write(message)
- term.setBackgroundColor(32768)
- print(" ")
- time = os.time()
- day = os.day()
- tA = file.readLines("chat1.log")
- if #tA >=500 then
- FILE=FILE+1
- end
- chat = fs.open("chat1.log","a")
- chat.writeLine("<"..day..":"..time..">"..player..":"..message)
- chat.close()
- end
- if event == "modem_message" then
- tChat = file.readLines("chat1.log")
- print(textutils.serialize(a))
- tResults = file.Search(tChat,e)
- forsend = textutils.serialize(tResults)
- print(forsend)
- modem.transmit(d,314,forsend)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement