Olha, se ele chega a criar, então acredito que na vdd não seja um bug. Deve ser porque ele tenta criar em cima de 1 player, fire ou de outro zombie, dai não cria.
info
Grupo: Visconde
Registrado: 03/02/10
Posts: 322
Reputação: +98
Gênero: Masculino
Char no Tibia: Miguel Absy

5 horas atrás, miguel223 disse:Olha, se ele chega a criar, então acredito que na vdd não seja um bug. Deve ser porque ele tenta criar em cima de 1 player, fire ou de outro zombie, dai não cria.
E não há uma forma de remover este "erro" ?
info
Grupo: Visconde
Registrado: 03/02/10
Posts: 322
Reputação: +98
Gênero: Masculino
Char no Tibia: Miguel Absy

local config = { semana_mes = "semana",
days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento
goblet = 10127, -- Troféu que vai pro vencedor do evento
rewards = {6132, 2152, 2160}, -- Recompensas.
moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar}
points = 1,
playerCount = 2001, -- Storage dos players que entram e sai do evento
zombieCount = 2002, -- Storage do zombie do event
teleportActionId = 2008, -- Action ID do teleport
teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado
teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado
teleportId = 1387, -- ID do teleporte
timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem
timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie
zombieName = "event zombie", -- Nome do zombie sumonado
playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado
-- Area que o zumbi vai spawnar
fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até
toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion
}
function onTime()
local time = os.date("*t")
if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then
local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
doItemSetAttribute(tp, "aid", config.teleportActionId)
doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING)
setGlobalStorageValue(config.playerCount, 0)
setGlobalStorageValue(config.zombieCount, 0)
addEvent(startEvent, config.timeToStartEvent * 1000 * 60)
end
return TRUE
end
function startEvent()
local fromp, top = config.fromPosition, config.toPosition
if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")
pvgaylord()
end
end
end
end
else
doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false)
doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT)
end
end
end
end
end
end
function spawnZombie()
if getGlobalStorageValue(config.playerCount) >= 2 then
pos = {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)}
if getCreaturePosition(getplayers) ~= pos then
doSummonCreature(config.zombieName, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)
doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED)
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
end
else
local fromp, top = config.fromPosition, config.toPosition
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.')
for _,items in ipairs(config.rewards) do
doPlayerAddItem(cid, items, 1)
doPlayerAddPoints(cid, config.points)
end
if config.moneyReward[3] == 1 then
doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2])
end
doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING)
local goblet = doPlayerAddItem(cid, config.goblet, 1)
doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.")
elseif isMonster(cid) then
doRemoveCreature(cid)
end
end
end
end
end
end
function pvgaylord()
local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
local areapos = {x = x, y = y, z = z, stackpos = 253}
local cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
p = p+1
elseif isMonster(cid) then
m = m+1
end
end
end
end
if p ~= getGlobalStorageValue(config.playerCount) then
setGlobalStorageValue(config.playerCount, p)
end
if p < 2 then
return true
end
addEvent(pvgaylord,100,nil)
end
info
Grupo: Visconde
Registrado: 03/02/10
Posts: 322
Reputação: +98
Gênero: Masculino
Char no Tibia: Miguel Absy

Tenta ai.
27 minutos atrás, miguel223 disse:Tenta ai.
O erro é quando sumona o zombie, quando aparece a mensagem que mais 1 zombie foi sumonado a distro constata o erro...
Olha a imagem:

info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

local config = { semana_mes = "semana",
days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento
goblet = 10127, -- Troféu que vai pro vencedor do evento
rewards = {6132, 2152, 2160}, -- Recompensas.
moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar}
points = 1,
playerCount = 2001, -- Storage dos players que entram e sai do evento
zombieCount = 2002, -- Storage do zombie do event
teleportActionId = 2008, -- Action ID do teleport
teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado
teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado
teleportId = 1387, -- ID do teleporte
timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem
timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie
zombieName = "event zombie", -- Nome do zombie sumonado
playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado
-- Area que o zumbi vai spawnar
fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até
toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion
}
function onTime()
local time = os.date("*t")
if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then
local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
doItemSetAttribute(tp, "aid", config.teleportActionId)
doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING)
setGlobalStorageValue(config.playerCount, 0)
setGlobalStorageValue(config.zombieCount, 0)
addEvent(startEvent, config.timeToStartEvent * 1000 * 60)
end
return TRUE
end
function startEvent()
local fromp, top = config.fromPosition, config.toPosition
if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")
pvgaylord()
end
end
end
end
else
doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false)
doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT)
end
end
end
end
end
end
function spawnZombie()
if getGlobalStorageValue(config.playerCount) >= 2 then
pos = {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), stackpos = 253}
if getThingFromPos(pos).uid == 0 then
doSummonCreature(config.zombieName, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)
doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED)
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
end
else
local fromp, top = config.fromPosition, config.toPosition
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.')
for _,items in ipairs(config.rewards) do
doPlayerAddItem(cid, items, 1)
doPlayerAddPoints(cid, config.points)
end
if config.moneyReward[3] == 1 then
doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2])
end
doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING)
local goblet = doPlayerAddItem(cid, config.goblet, 1)
doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.")
elseif isMonster(cid) then
doRemoveCreature(cid)
end
end
end
end
end
end
function pvgaylord()
local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
local areapos = {x = x, y = y, z = z, stackpos = 253}
local cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
p = p+1
elseif isMonster(cid) then
m = m+1
end
end
end
end
if p ~= getGlobalStorageValue(config.playerCount) then
setGlobalStorageValue(config.playerCount, p)
end
if p < 2 then
return true
end
addEvent(pvgaylord,100,nil)
end
Editado Abril 13 por Demonbholder
14 horas atrás, Demonbholder disse:local config = { semana_mes = "semana",
days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento
goblet = 10127, -- Troféu que vai pro vencedor do evento
rewards = {6132, 2152, 2160}, -- Recompensas.
moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar}
points = 1,
playerCount = 2001, -- Storage dos players que entram e sai do evento
zombieCount = 2002, -- Storage do zombie do event
teleportActionId = 2008, -- Action ID do teleport
teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado
teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado
teleportId = 1387, -- ID do teleporte
timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem
timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie
zombieName = "event zombie", -- Nome do zombie sumonado
playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado
-- Area que o zumbi vai spawnar
fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até
toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion
}
function onTime()
local time = os.date("*t")
if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then
local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
doItemSetAttribute(tp, "aid", config.teleportActionId)
doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING)
setGlobalStorageValue(config.playerCount, 0)
setGlobalStorageValue(config.zombieCount, 0)
addEvent(startEvent, config.timeToStartEvent * 1000 * 60)
end
return TRUE
end
function startEvent()
local fromp, top = config.fromPosition, config.toPosition
if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")
pvgaylord()
end
end
end
end
else
doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
if isPlayer(getPlayers.uid) then
doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false)
doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT)
end
end
end
end
end
end
function spawnZombie()
if getGlobalStorageValue(config.playerCount) >= 2 then
pos = {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), stackpos = 253}
if getThingFromPos(pos).uid == 0 then
doSummonCreature(config.zombieName, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)
doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED)
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
end
else
local fromp, top = config.fromPosition, config.toPosition
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.')
for _,items in ipairs(config.rewards) do
doPlayerAddItem(cid, items, 1)
doPlayerAddPoints(cid, config.points)
end
if config.moneyReward[3] == 1 then
doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2])
end
doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING)
local goblet = doPlayerAddItem(cid, config.goblet, 1)
doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.")
elseif isMonster(cid) then
doRemoveCreature(cid)
end
end
end
end
end
end
function pvgaylord()
local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
local areapos = {x = x, y = y, z = z, stackpos = 253}
local cid = getThingfromPos(areapos).uid
if isPlayer(cid) then
p = p+1
elseif isMonster(cid) then
m = m+1
end
end
end
end
if p ~= getGlobalStorageValue(config.playerCount) then
setGlobalStorageValue(config.playerCount, p)
end
if p < 2 then
return true
end
addEvent(pvgaylord,100,nil)
end
Mesma coisa...
Veja: 
p
info
Grupo: Campones
Registrado: 04/02/16
Posts: 78
Reputação: +1

local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 10127, -- Troféu que vai pro vencedor do evento rewards = {6132, 2152, 2160}, -- Recompensas. moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} points = 1, playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion } function Time() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUEend function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end endend function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {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)} if getCreaturePosition(getplayers) ~= pos then doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end elselocal fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) thendoTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) doPlayerAddPoints(cid, config.points) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.") elseif isMonster(cid) thendoRemoveCreature(cid) end end end end endend function pvgaylord()local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) thenp = p+1 elseif isMonster(cid) thenm = m+1 end end end endif p ~= getGlobalStorageValue(config.playerCount) thensetGlobalStorageValue(config.playerCount, p)endif p < 2 thenreturn trueendaddEvent(pvgaylord,100,nil)end
Tenta esse.
15 minutos atrás, bernardes22 disse:local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 10127, -- Troféu que vai pro vencedor do evento rewards = {6132, 2152, 2160}, -- Recompensas. moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} points = 1, playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion } function Time() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUEend function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end endend function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {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)} if getCreaturePosition(getplayers) ~= pos then doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end elselocal fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) thendoTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) doPlayerAddPoints(cid, config.points) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.") elseif isMonster(cid) thendoRemoveCreature(cid) end end end end endend function pvgaylord()local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) thenp = p+1 elseif isMonster(cid) thenm = m+1 end end end endif p ~= getGlobalStorageValue(config.playerCount) thensetGlobalStorageValue(config.playerCount, p)endif p < 2 thenreturn trueendaddEvent(pvgaylord,100,nil)end
Tenta esse.
De cara ja deu erro na distro..
...Event onTime not found <data/globalevents/scripts/zombieevent.lua>
info
Grupo: Campones
Registrado: 04/02/16
Posts: 78
Reputação: +1

manda a tag do evento ai amigo
1 hora atrás, bernardes22 disse:manda a tag do evento ai amigo
Citar<globalevent name="zombieevent" time="12:00" event="script" value="zombieevent.lua"/>
Editado Abril 15 por brendoonh
up



info
Grupo: Visconde
Registrado: 04/01/14
Posts: 320
Reputação: +15
Bom galera.. Estou com um evento zombie aqui , tava funfando normal, usei ele bastante tempo e agora n sei pq mais ta dando um erro que o monstro n existe, sendo que ele aparece la na arena, o zombie, e aparece um outro erro e onTime que eu n sei oq é.. sera que alguem consegue me ajudar a concertar? tfs 0.4

GLOBALEVENTS
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 10127, -- Troféu que vai pro vencedor do evento rewards = {6132, 2152, 2160}, -- Recompensas. moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} points = 1, playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUEend function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!")pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end endend function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {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)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) elselocal fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) thendoTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) doPlayerAddPoints(cid, config.points) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.") elseif isMonster(cid) thendoRemoveCreature(cid) end end end end endend function pvgaylord()local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) thenp = p+1 elseif isMonster(cid) thenm = m+1 end end end endif p ~= getGlobalStorageValue(config.playerCount) thensetGlobalStorageValue(config.playerCount, p)endif p < 2 thenreturn trueendaddEvent(pvgaylord,100,nil)end