[MC/OpenComputers] Chat Test (listed) 01.09.2019 03:06:53 (24 lines) [Edit] [Raw] [View]

--wget https://files.rurido.de/raw/132 getChat.lua return {

getChat = function (debug)
    local component = require("component");

    if next(component.list("chat_box")) == nil then
        print("No chat_box attached!");
        return nil;
    end

    local chat = component.chat_box;

    chat.setDistance(1000);

    if debug == true then
        print("Chat_box found: " .. chat.address .. " (slot=" .. chat.slot .. ", distance=" .. chat.getDistance() .. ")");
    end

    return chat;

end

}