.Qual servidor ou website você utiliza como base? OTX
Qual o motivo deste tópico? ajuda
Está surgindo algum erro? Se sim coloque-o aqui.
Você tem o código disponível? Se tiver publique-o aqui:
local config = {
requiredLevel = 1,
timeToUseAgain = 1, -- time in days
daily = false,
centerOberonRoomPosition = Position(33257, 32051, 8),
playerPositions = {
Position(33261, 32083, 8),
},
newPositions = {
Position(33264, 32064, 8),
},
oberonPositions = {
Position(33266, 32059, 8)
}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 1946 then
local storePlayers, playerTile = {}
for i = 1, #config.playerPositions do
playerTile = Tile(config.playerPositions[i]):getTopCreature()
if not playerTile or not playerTile:isPlayer() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.")
return true
end
if playerTile:getLevel() < config.requiredLevel then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.")
return true
end
if playerTile:getExhaustion(171717) > 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "".. playerTile:getName() .." need to wait for ".. player:getExhaustion(171717)/60 .." minutes.")
return true
end
storePlayers[#storePlayers + 1] = playerTile
end
local specs, spec = Game.getSpectators(config.centerOberonRoomPosition, false, false, 25, 25, 25, 25)
for i = 1, #specs do
spec = specs[i]
if spec:isPlayer() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.")
return true
end
spec:remove()
end
for i = 1, #config.oberonPositions do
Game.createMonster("Grand Master Oberon", config.oberonPositions[i])
end
local players
for i = 1, #storePlayers do
players = storePlayers[i]
config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF)
players:teleportTo(config.newPositions[i])
config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA)
players:setDirection(DIRECTION_EAST)
players:setExhaustion(171717, config.timeToUseAgain*60)
end
elseif item.itemid == 1945 then
if config.daily then
player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
return true
end
end
item:transform(item.itemid == 1946 and 1945 or 1946)
return true
end
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.