diff --git a/core.lua b/core.lua index fab84ac..b4204dc 100644 --- a/core.lua +++ b/core.lua @@ -114,9 +114,29 @@ function Core:download(file) return true, "Success" end +function Core:tick() + if not self then + error("No instance!") + end + + if not self.ws then + return false, "Not initilized" + end + + self:send({type = "TICK"}); + + local success, data = self:read(); + + if not success then + return false, "Failed to do anything: "..data; + end + + print("Server expects Action: "..textutils.serialiseJSON(data)) +end + function Core:disconnect() if not self then - return "Not instance" + error("No instance!") end if not self.ws then