You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
520 B

--[[
Created by Fxz_y
]]
tArgs = {...} -- Arguments(please always use "..." for strings
sender = tArgs[1] -- Name of Sender
message = tArgs[2] -- Message
receiver = tArgs[3] -- Name of receiver(only for private messages)
p = peripheral.find("chatBox") -- Wrapping of the chatbox
message = sender..": "..message -- Adding the sender's name to the message
if receiver then -- Checking for a receiver
p.tell(receiver, message) -- Sending private message
else -- No Receiver
p.say(message) -- Sending public message
end