• 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 Zombile event

You also don't get the broadcast? This means you are editing the wrong script or don't save ir or restart the server.
You can add the print and broadcast to be sure under function onThink, if you don't get the messages, it means the server is not loading the script.
 
i got this in game
01:21 Zombie event starting in 5 minutes! The teleport will be closed when the event start!
and when cancel
01:26 The Zombie event could not start because of to few players participating.
At least 2 players is needed!
and in exe .
the image up
 
Your server loads a script, but if you don't get the print message and broadcast you added under function onThink then your server is not loading the script you edited (or you forgot to save it or restart the server).
 
yea yea its was my fault its work fine now thx bro but i want it brodcast every min and when play die in event look
02:20 You see a dead human (Vol:10).
You recognize Zero. He was killed by a event zombie.
but don't loss anything and he tp to temple i need when player die in event don't make human
 
i removed this line from script
local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))
but not tested i will test now
and what about brodcast every min like
:21 Zombie event starting in 5 minutes! The teleport will be closed when the event start!
after minute
:21 Zombie event starting in 4 minutes! The teleport will be closed when the event start!
 
Add this under doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
Code:
for x = 1, config.timeToStartEvent - 1 do
     addEvent(doBroadcastMessage, x * 60 * 1000, "Zombie event starting in " .. (config.timeToStartEvent - x) .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
end
 
its work fine now but i have temple teleport and player can use in event i need player can't use any items in event and the winner need to get hit from mobs to teleport to temple to get reward i need the winner tp auto for temple "last man standing tp auto to temple"
 
Code:
local cfg = {
    time = 11, -- Time the teleport is open.
    exhausted = 60, -- Time you are exhausted.
    storage = 1337, -- Storage used for "exhaust."
    to = { x = 1000, y = 1000, z = 7 } -- Where the teleport takes you.
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(getPlayerStorageValue(cid, cfg.storage) > os.time()) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. getPlayerStorageValue(cid, cfg.storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, cfg.storage) - os.time()) == 1 and "" or "s") .. " to create another teleport.")
    elseif(getTilePzInfo(getCreaturePosition(cid)) == true) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You cannot create a teleport in a protection zone.")
    elseif(getCreatureCondition(cid, CONDITION_INFIGHT) == true) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You may not create a teleport while you have ~PZ~.")
    elseif(hasProperty(getThingFromPos(toPosition).uid, CONST_PROP_BLOCKSOLID) == true) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You cannot create a teleport here.")
    else
        local function deleteTeleport()
            local teleport = getTileItemById(toPosition, 1387).uid
            if(teleport > 0) then
                doRemoveItem(teleport)
                doSendMagicEffect(toPosition, CONST_ME_POFF)
                doSendAnimatedText(toPosition, "Closed.", TEXTCOLOR_RED)
            end
            return true
        end
        for x = 1, cfg.time do
        local n = cfg.time - x
            addEvent(doSendAnimatedText, x * 1000, toPosition, n > 0 and tostring(n), TEXTCOLOR_TEAL)
        end
        doCreateTeleport(1387, cfg.to, toPosition)
        doSendMagicEffect(toPosition, 55)
        addEvent(deleteTeleport, cfg.time * 1000)
        doSendMagicEffect(toPosition, 56)
        setPlayerStorageValue(cid, cfg.storage, os.time() + cfg.exhausted)
    end
    return true
end
 
Add this under local cfg = {
Code:
     fromPosition = {x = 1186, y = 1072, z = 7}, -- top left cornor of the playground
     toPosition = {x = 1195, y = 1081, z = 7}, -- bottom right cornor of the playground

Then under function onUse(cid, item, fromPosition, itemEx, toPosition)
Code:
if isInRange(getPlayerPosition(cid), cfg.fromPosition, cfg.toPosition) then
     return doPlayerSendCancel(cid, "You can't use this is the zombie event.")
end
 
What is the position of the player? You can add a print or broadcast under function onUse to check if the server is loading the edits.
 
Do you mean you want the player to be teleported somewhere else instead of the temple?
Then you can change the position here
Code:
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
For example instead of getTownTemplePosition(getPlayerTown(cid))
Code:
{x = 1000, y = 1000, z = 7}

When I have enough time I can start with the other script.
 
i need player when enter tp event don't tp to same place "now when event start and player join event all player will join tp to same place
Code:
x = 1050, y = 1919, z = 7
i don't need this i need evryone take his random place
 
Change the position to this
Code:
{x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)}
 
Back
Top