• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Zombie event!

have you installed the onenter file in movements? and movements.xml
If you havnt, movements/scripts/zombie create onenter

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if(not isPlayer(cid)) then
return true
end
if(getPlayerAccess(cid) >= ZE_ACCESS_TO_IGNORE_ARENA) then
addPlayerToZombiesArea(cid)
elseif(#getZombiesEventPlayers() < getZombiesEventPlayersLimit() and getStorage(ZE_STATUS) == 1) then
addPlayerToZombiesArea(cid)
local players_on_arena_count = #getZombiesEventPlayers()
if(players_on_arena_count == getZombiesEventPlayersLimit()) then
addZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 2)
doBroadcastMessage("Zombie Arena Event started.")
else
doBroadcastMessage(getCreatureName(cid) .. " has entered a Zombie Arena. We still need " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players.")
end
else
doTeleportThing(cid, fromPosition, true)
addZombiesEventBlockEnterPosition()
end
return true
end

Movements.xml

Code:
<movevent type="StepIn" actionid="5555" event="script" value="zombie/onenter.lua"/>
if you have,have you added the actionID 5555 to your teleport,or maybe that action id is used,then you have to change that

JUST A THEORY
 
Last edited:
have you installed the onenter file in movements? and movements.xml
If you havnt, movements/scripts/zombie create onenter

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if(not isPlayer(cid)) then
return true
end
if(getPlayerAccess(cid) >= ZE_ACCESS_TO_IGNORE_ARENA) then
addPlayerToZombiesArea(cid)
elseif(#getZombiesEventPlayers() < getZombiesEventPlayersLimit() and getStorage(ZE_STATUS) == 1) then
addPlayerToZombiesArea(cid)
local players_on_arena_count = #getZombiesEventPlayers()
if(players_on_arena_count == getZombiesEventPlayersLimit()) then
addZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 2)
doBroadcastMessage("Zombie Arena Event started.")
else
doBroadcastMessage(getCreatureName(cid) .. " has entered a Zombie Arena. We still need " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players.")
end
else
doTeleportThing(cid, fromPosition, true)
addZombiesEventBlockEnterPosition()
end
return true
end

Movements.xml

Code:
<movevent type="StepIn" actionid="5555" event="script" value="zombie/onenter.lua"/>
if you have,have you added the actionID 5555 to your teleport,or maybe that action id is used,then you have to change that

JUST A THEORY

i did all this but not the id on my teleport will try it thx
 
Test this, worked for me
Code:
function spawnNewZombie()
    local posx = {}
    local posy = {}
    local posz = {}
    local pir = {}
    for i=1, 5 do
        local posx_tmp = math.random(ZE_spawnFromPosition.x ,ZE_spawnToPosition.x)
        local posy_tmp = math.random(ZE_spawnFromPosition.y ,ZE_spawnToPosition.y)
        local posz_tmp = math.random(ZE_spawnFromPosition.z ,ZE_spawnToPosition.z)
        local pir_tmp = 0
        local spec = getSpectators({x=posx_tmp, y=posy_tmp, z=posz_tmp}, 3, 3, false)
        if(spec and #spec > 0) then
            for z, pid in pairs(spec) do
                if(isPlayer(pid)) then
                    pir_tmp = pir_tmp + 1
                end
            end
        end
        posx = posx_tmp
        posy = posy_tmp
        posz = posz_tmp
        pir = pir_tmp
    end
    local lowest_i = 1
    for i=2, 5 do
        if(pir < pir[lowest_i]) then
            lowest_i = i
        end
    end
    local ret = (type(doCreateMonster('Zombie Event', {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i], stackpos = 253})) == 'number')
    if(ret) then
        addZombiesCount()
    end
    return ret
end
 
Back
Top