.Qual servidor ou website você utiliza como base?
GlobalFox1064
Qual o motivo deste tópico?
Está surgindo algum erro? Se sim coloque-o aqui.
Você tem o código disponível? Se tiver publique-o aqui:
local config = {
centerRoom = Position(33443, 31545, 13),
bossPosition = Position(33443, 31545, 13),
newPosition = Position(33443, 31552, 13)
}
local function ClearZelos()
local spectators = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15)
for i = 1, #spectators do
local spectator = spectators[i]
if spectator:isPlayer() then
spectator:teleportTo(Position(33261, 31986, 8))
spectator:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
spectator:say('Time out! You were teleported out by strange forces.', TALKTYPE_MONSTER_SAY)
elseif spectator:isMonster() then
spectator:remove()
end
end
end
local KingZelos = Action()
function KingZelos.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9825 then
if player:getPosition() ~= Position(33485, 31546, 13) then
item:transform(9826)
return true
end
end
if item.itemid == 9825 then
local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15)
for i = 1, #specs do
spec = specs[i]
if spec:isPlayer() then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with King Zelos.")
return true
end
end
for y = 31544, 31548 do
local playerTile = Tile(Position(33485, y, 13)):getTopCreature()
if playerTile and playerTile:isPlayer() then
if playerTile:getStorageValue(Storage.GraveDanger.MournbringerTimer) < os.time() then
playerTile:getPosition():sendMagicEffect(CONST_ME_POFF)
playerTile:teleportTo(config.newPosition)
playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
playerTile:setStorageValue(Storage.GraveDanger.MournbringerTimer, os.time() + 10 * 3600)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait a while, recently someone challenge King Zelos.")
return true
end
end
end
Game.createMonster("King Zelos", config.bossPosition, true, true)
-- addEvent(ClearZelos, 30 * 60 * 1000)
item:transform(9826)
elseif item.itemid == 9826 then
item:transform(9825)
end
return true
end
KingZelos:uid(12009)
KingZelos:register()
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.