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

zombie event

ok, dodałem w globalevents:
XML:
<globalevent name="zombie" time="08:15" event="script" value="zombie.lua"/>
oraz w globalevents\scripts\zombie.lua
Lua:
local Dia = os.date("%A")
function onTime()
if Dia == "Thursday" then
zombie_event_StartEvent()
end
return true
end
i wywala mi takie coś:
 
no bo ten mod musisz miec inaczej nazwany myslalem ze zombie ;p

to nie jest mod...
pliki zombie eventu mam w wielu folderach...globalevents....lib....talkactions....który z plików masz na myśli?
to mam w globalevents w folderze zombie:


Wszystko robilem wg tego poradnika:
http://otland.net/f82/zombie-event-new-version-bug-free-updated-128664/
po to dałem link do niego by ktoś nie myślał jak mam zapisane mods, tylko odrazu na tym przykładzie doradził =/
mam identycznie zrobione jak w poradniku..
 
Wiem jak zrobić że będzie np co 2 godziny itp
Zrób w :
/data/globalevents/scripts/zombie/onstartup_autostart.lua and paste:

function onStartup()
doSetStorage(45267, os.time()+300)
doSetStorage(45268, 0)
return true
end


Potem w :

/data/globalevents/scripts/zombie/onthink_autostart.lua and paste:

local autoStartInterval = 60 -- time between arenas in minutes, default 60 = 1 hour

function onThink(interval, lastExecution, thinkInterval)
if(getStorage(ZE_STATUS) ~= 2) then
if(getStorage(45267)+autoStartInterval*60 <= os.time() and getStorage(45268) ~= 1) then
doSetStorage(45268, 1)
removeZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 1)
doBroadcastMessage("Zombie Arena Event teleport will be opened for 2 minutes. We are waiting for " .. getZombiesEventPlayersLimit() - #getZombiesEventPlayers() .. " players to start.")
elseif(getStorage(45267)+autoStartInterval*60+120 <= os.time() and getStorage(45268) == 1) then
addZombiesEventBlockEnterPosition()
doSetStorage(45268, 0)
doSetStorage(ZE_STATUS, 2)
doSetStorage(45267, os.time())
doBroadcastMessage("Zombie Arena Event started.")
end
end
return true
end

I dodaj w
/data/globalevents/globalevents.xml :
<globalevent name="ZombieGlobalThink_AutoStart" interval="5" event="script" value="zombie/onthink_autostart.lua"/>
<globalevent name="ZombieGlobalStartup_AutoStart" type="start" event="script" value="zombie/onstartup_autostart.lua"/>

// źródło , otland . Gzieś kiedyś ktoś to podał ale teraz nie pamiętam dokładnie gdzie więc linku nie moge podać :(
 
Back
Top