Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''modificada''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 1 registro

  1. Alguém poderia me ajudar, essa anihi modificada não está teleportando o player para x posição. na hora de dar use na alavanca ela da como se não tivesse players na posição inicial e apresenta o seguinte erro abaixo. [Error - Action interface] data/actions/scripts/anihi.lua:onUse Description: data/actions/scripts/anihi.lua:183: attempt to index field '?' <anil value> stack traceback: data/actions/scripts/anihi.lua:183: in function <data/actions/scripts/anihi.lua:147> local config = { storage = 9721, time = 120, --Tempo para fazer a quest, em minutos. interval = 2, --Tempo para poder usar a alavanca novamente, em minutos. timerPos = { {x = 1127, y = 1152, z = 7}, --Posições onde o tempo restante aparecerá. {x = 1129, y = 1150, z = 8}, {x = 1129, y = 1156, z = 8}, {x = 1121, y = 1150, z = 8}, {x = 1121, y = 1156, z = 8}, }, monster = { name = "Demon", --Nome do monstro. pos = { {x = 1434, y = 822, z = 7}, --Posições onde ele vai nascer. {x = 1434, y = 824, z = 7}, {x = 1434, y = 826, z = 7}, {x = 1442, y = 822, z = 7}, {x = 1442, y = 824, z = 7}, {x = 1442, y = 826, z = 7}, }, }, player = { {{x = 1427, y = 824, z = 7}, {x = 1440, y = 824, z = 7}}, --{{posição onde o player deve ficar}, {para onde será teleportado}}, {{x = 1426, y = 824, z = 7}, {x = 1439, y = 824, z = 7}}, {{x = 1425, y = 824, z = 7}, {x = 1438, y = 824, z = 7}}, {{x = 1424, y = 824, z = 7}, {x = 1437, y = 824, z = 7}}, {{x = 1423, y = 824, z = 7}, {x = 1436, y = 824, z = 7}}, }, area = {{x = 1433, y = 820, z = 7}, {x = 1433, y = 828, z = 7}}, --{{posição superior esquerda da área}, {posição inferior direita da área}}, } local cidPos = {} function clearArea() for x = config.area[1].x, config.area[2].x do for y = config.area[1].y, config.area[2].y do local pos = {x = x, y = y, z = config.area[1].z} local pid = getTopCreature(pos).uid if pid > 0 then if isPlayer(pid) then doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid))) doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, "Você não conseguiu completar a Quest.") else doRemoveCreature(pid) end end end end setGlobalStorageValue(config.storage, os.time() + config.interval * 60) end function checkPlayer() for x = config.area[1].x, config.area[2].x do for y = config.area[1].y, config.area[2].y do local pos = {x = x, y = y, z = config.area[1].z} local pid = getTopCreature(pos).uid if isPlayer(pid) then return true end end end return false end function convert(time) for i = 1, #config.timerPos do doSendAnimatedText(config.timerPos, convert(time).minutes..":"..convert(time).seconds, 215) end end function timer(time) if time < 0 or not checkPlayer() then return true end doSendAnimatedText(config.timerPos, convert(time).minutes..":"..convert(time).seconds, 215) addEvent(timer, 1000, time - 1) end function onUse(cid) if getGlobalStorageValue(config.storage) > os.time() then return doPlayerSendCancel(cid, "Wait "..convert(getGlobalStorageValue(config.storage) - os.time()).minutes.."min and "..convert(getGlobalStorageValue(config.storage) - os.time()).seconds.."secs.") elseif checkPlayer() then return doPlayerSendCancel(cid, "Tem Player fazendo a Quest,Aguarde!.") end local p = {} for _, pos in pairs(config.player) do local pid = getTopCreature(pos[1]).uid if isPlayer(pid) then p[#p + 1] = pid cidPos[pid] = _ end end if #p < #config.player then return doPlayerSendCancel(cid, "Não tem 5 Player necessarios.") end for i = 1, #p do doTeleportThing(p, config.player[cidPos[p]][2]) doPlayerSendTextMessage(p, 27, "Boa sorte!") end for _, pos in pairs(config.monster.pos) do doCreateMonster(config.monster.name, pos) end timer(config.time) addEvent(function() clearArea() end, config.time * 60 * 1000) return true end
×
×
  • Criar Novo...