• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua How to modify to work only in specific days like sunday monday and thursday ?

dervin13

Active Member
Joined
Apr 26, 2008
Messages
458
Solutions
1
Reaction score
28
Hello, I'd like to know if someone can help me to modify this script to work only in specific days like sunday monday and thursday ? thanks

Lua:
function onTime(interval)
    if os.date("%H:%M") == woe.days[os.date("%A")] then
        woe.queueEvent(woe.timeDelay+1)
    end
end
 
Lua:
local days = {
    ["Sunday"] = true,
    ["Monday"] = true,
    ["Tuesday"] = false,
    ["Wednesday"] = false,
    ["Thursday"] = true,
    ["Saturday"] = false
}

function onTime(interval)
    local today = days[os.date("%A")]
    if today then
        if today == true then
            woe.queueEvent(woe.timeDelay + 1)
        end
    end
end
 
Back
Top