Ir para conteúdo

Featured Replies

Postado
Minha DemonOakQuest está com o seguinte erro!

Erro.thumb.png.f24f6a8601b9d1047f84ff988


<!-- Demon Oak Quest -->
    <globalevent name="DemonOakVoices" interval="15000" script="demon oak quest/voices.lua"/>

Arquivo = voices.lua
local demonOak_pos = {x = 32716, y = 32352, z = 7}
local questAreaPosition =
{
    {x = 32706, y = 32345, z = 7, stackpos = 255},
    {x = 32725, y = 32357, z = 7, stackpos = 255}
}

local voices = {
    'Release me and you will be rewarded greatefully!',
    'What is this? Demon Legs lying here? Someone might have lost them!',
    'I\'m trapped, come here and free me fast!!',
    'I can bring your beloved back from the dead, just release me!',
    'What a nice shiny golden armor. Come to me and you can have it!',
    'Find a way in here and release me! Pleeeease hurry!',
    'You can have my demon set, if you help me get out of here!'
}

function onThink(interval, lastExecution)
    local specs = Game.getSpectators(demonOak_pos, false, true, 0, 15, 0, 15)
    for i = 1, specs do
        if isInRange(specs:getPosition(), questAreaPosition[1], questAreaPosition[2]) then
            return true
        end
        specs:say(sounds[math.random(#voices)], TALKTYPE_MONSTER_YELL, false, 0, demonOak_pos)
    end
     return true
end
Irei dar rep+ para quem me ajudar!
Mesmo assim agradeço desde já a todos!

Editado por compp
Acrescentando possíveis informações que possa ajudar alguém a arrumar esse bug (veja o histórico de edições)

Resolvido por vankk

Ir para solução
Postado
  • Solução

Testa o script abaixo, se nao funcionar.. Tenta editar a linha 19 para local specs = getSpectators(demonOak_pos, false, true, 0, 15, 0, 15) .

local demonOak_pos = {x = 32716, y = 32352, z = 7}
local questAreaPosition =
{
    {x = 32706, y = 32345, z = 7, stackpos = 255},
    {x = 32725, y = 32357, z = 7, stackpos = 255}
}

local sounds = {
    'Release me and you will be rewarded greatefully!',
    'What is this? Demon Legs lying here? Someone might have lost them!',
    'I\'m trapped, come here and free me fast!!',
    'I can bring your beloved back from the dead, just release me!',
    'What a nice shiny golden armor. Come to me and you can have it!',
    'Find a way in here and release me! Pleeeease hurry!',
    'You can have my demon set, if you help me get out of here!'
}

function onThink(interval, lastExecution)
    local specs = Game.getSpectators(demonOak_pos, false, true, 0, 15, 0, 15)
    for i = 1, #specs do
        if isInRange(specs[i]:getPosition(), questAreaPosition[1], questAreaPosition[2]) then
            return true
        end
        specs[i]:say(sounds[math.random(#sounds)], TALKTYPE_MONSTER_YELL, false, 0, demonOak_pos)
    end
     return true
end

Editado por vankk (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo