• 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!

Solved Automatic Zombie Event. How to make automatic ?

Daniel Kopeć

Member
Joined
Dec 8, 2018
Messages
125
Solutions
4
Reaction score
12
Location
Poland
I have a Zombie Event on my server, but I don't know how to make it run automatically every day at a given time :(

TFS 0.4 Tibia 8.6

Below I am pasting scripts from data/talkactions:
----------------------------------------------------------

data/talkactions:

XML:
<talkaction log="yes" words="/zombie" access="6" event="script" value="zombie_event/onsay.lua"/>

data/talkactions/zombieevent/onsay.lua

Lua:
function onSay(cid, words, param, channel)
    if(getStorage(ZE_STATUS) ~= 2) then
        local players_on_arena_count = #getZombiesEventPlayers()
        if(param == 'force') then
            if(players_on_arena_count > 0) then
                setZombiesEventPlayersLimit(players_on_arena_count  )
                addZombiesEventBlockEnterPosition()
                doSetStorage(ZE_STATUS, 2)
                doBroadcastMessage("Zombie Arena Event wystartowal! Wejscie zostalo zamkniete!")
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombie Event rozpoczety!")
            else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event nie wystartuje, poniewaz nie ma graczy na arenie.")
            end
        else
            if(param ~= '' and tonumber(param) > 0) then
                setZombiesEventPlayersLimit(tonumber(param))
            end
            removeZombiesEventBlockEnterPosition()
            doSetStorage(ZE_STATUS, 1)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombie Event rozpoczety.")
            doPlayerBroadcastMessage(cid, "Zombie Event wystartowal, teleport zostal odblokowany w depo Thais +1. Czekamy jeszcze na " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " graczy!")
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event juz sie rozpoczal, nie mozesz wejsc.")
    end
    return true
end


Will someone suggest how to do it? for REP++ ??
Post automatically merged:

BUMP !
 
Last edited:
Solution
I have a Zombie Event on my server, but I don't know how to make it run automatically every day at a given time :(

TFS 0.4 Tibia 8.6

Below I am pasting scripts from data/talkactions:
----------------------------------------------------------

data/talkactions:

XML:
<talkaction log="yes" words="/zombie" access="6" event="script" value="zombie_event/onsay.lua"/>

data/talkactions/zombieevent/onsay.lua

Lua:
function onSay(cid, words, param, channel)
    if(getStorage(ZE_STATUS) ~= 2) then
        local players_on_arena_count = #getZombiesEventPlayers()
        if(param == 'force') then
            if(players_on_arena_count > 0) then
                setZombiesEventPlayersLimit(players_on_arena_count  )...
I have a Zombie Event on my server, but I don't know how to make it run automatically every day at a given time :(

TFS 0.4 Tibia 8.6

Below I am pasting scripts from data/talkactions:
----------------------------------------------------------

data/talkactions:

XML:
<talkaction log="yes" words="/zombie" access="6" event="script" value="zombie_event/onsay.lua"/>

data/talkactions/zombieevent/onsay.lua

Lua:
function onSay(cid, words, param, channel)
    if(getStorage(ZE_STATUS) ~= 2) then
        local players_on_arena_count = #getZombiesEventPlayers()
        if(param == 'force') then
            if(players_on_arena_count > 0) then
                setZombiesEventPlayersLimit(players_on_arena_count  )
                addZombiesEventBlockEnterPosition()
                doSetStorage(ZE_STATUS, 2)
                doBroadcastMessage("Zombie Arena Event wystartowal! Wejscie zostalo zamkniete!")
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombie Event rozpoczety!")
            else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event nie wystartuje, poniewaz nie ma graczy na arenie.")
            end
        else
            if(param ~= '' and tonumber(param) > 0) then
                setZombiesEventPlayersLimit(tonumber(param))
            end
            removeZombiesEventBlockEnterPosition()
            doSetStorage(ZE_STATUS, 1)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombie Event rozpoczety.")
            doPlayerBroadcastMessage(cid, "Zombie Event wystartowal, teleport zostal odblokowany w depo Thais +1. Czekamy jeszcze na " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " graczy!")
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event juz sie rozpoczal, nie mozesz wejsc.")
    end
    return true
end


Will someone suggest how to do it? for REP++ ??
Post automatically merged:

BUMP !
Try this one
 
Solution
Back
Top