-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 871 visualizações
-
- 3 respostas
- 3857 visualizações
-
- 0 respostas
- 1892 visualizações
-
- 2 respostas
- 1716 visualizações
-
- 1 resposta
- 1506 visualizações
-
Pergunta
Klauguns 2
Galera to com um problema ao iniciar meu evento no servidor pois da esse seguinte erro :
EVENT ONTIMER NOT FOUND < data/globalevent/script/zombievent.lua >
Script zombieevent.lua :
local config = {
playerCount = 2001, -- Global storage for counting the players left/entered in the event
zombieCount = 2002, -- Global storage for counting the zombies in the event
teleportActionId = 2008, -- Action id of the teleport needed for the movement script
teleportPosition = {x = 160, y = 54, z = 7, stackpos = 1}, -- Where the teleport will be created
teleportToPosition = {x = 851, y = 969, z = 7}, -- Where the teleport will take you
teleportId = 1387, -- Id of the teleport
timeToStartEvent = 5, -- Minutes, after these minutes the teleport will be removed and the event will be declared started
timeBetweenSpawns = 20, -- Seconds between each spawn of zombie
zombieName = "event zombie", -- Name of the zombie that should be summoned
playersNeededToStartEvent = 15, -- Players needed before the zombies can spawn.
-- Should be the same as in the creaturescript!
-- The zombies will spawn randomly inside this area
fromPosition = {x = 836, y = 949, z = 15}, -- top left cornor of the playground
toPosition = {x = 866, y = 968, z = 15}, -- bottom right cornor of the playground
}
function onTime()
local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
doItemSetAttribute(tp, "aid", config.teleportActionId)
doBroadcastMessage("Zombie event sera iniciado em " .. config.timeToStartEvent .. " minutos! O teleport foi removido para o evento comecar!", MESSAGE_STATUS_WARNING)
setGlobalStorageValue(config.playerCount, 0)
setGlobalStorageValue(config.zombieCount, 0)
addEvent(startEvent, config.timeToStartEvent * 1000 * 60)
print(getGlobalStorageValue(2001))
end
function startEvent()
local get = getThingfromPos(config.teleportPosition)
if get.itemid == config.teleportId then
doRemoveItem(get.uid, 1)
end
local fromp, top = config.fromPosition, config.toPosition
if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
doBroadcastMessage("Boa sorte no evento todos os players que entraram no evento de zumbis! O teleport fechou!", 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, "Primeiro zumbi irá nascer em " .. config.timeBetweenSpawns .. " segundos! Boa sorte!")
end
end
end
end
else
doBroadcastMessage("O evento Zombie não pode iniciar devido a pouca quantidade de jogadores participantes.\n Pelo menos " .. config.playersNeededToStartEvent .. " players é necessário!", 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)}
doSummonCreature(config.zombieName, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)
doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
end
end
zombieevent.xml:
<globalevent name="zombieevent" time="15:00" event="script" value="zombievent.lua"/>
Lembrando que eu estou usando um Distro da TFS 0.3.6 se puder me ajudar fico grato.
Link para o comentário
https://xtibia.com/forum/topic/188902-zombie-evente-n%C3%A3o-funciona-uso-tfs-036/Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados