Ir para conteúdo

Featured Replies

Postado
  • Autor

Não que vá adiantar de alguma coisa, mas vamos testar sem usar as variaveis e sem usar math.random:

local positions = {
    ["Treiners"] = {x = 409, y = 805, z = 7},
    ["Treiners"] = {x = 344, y = 738, z = 7},
    ["Treiners"] = {x = 650, y = 844, z = 7},
    ["Treiners"] = {x = 757, y = 826, z = 7},
    ["Treiners"] = {x = 1017, y = 709, z = 6},
    ["Treiners"] = {x = 1041, y = 560, z = 6},
    ["Treiners"] = {x = 800, y = 554, z = 6},
    ["Treiners"] = {x = 793, y = 709, z = 7},
    ["Treiners"] = {x = 796, y = 428, z = 6},
    ["Treiners"] = {x = 790, y = 357, z = 6},
    ["Treiners"] = {x = 547, y = 218, z = 7},
    ["Treiners"] = {x = 520, y = 182, z = 7}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(positions) do
        doSendMagicEffect({x = 409, y = 805, z = 7}, CONST_ME_DRAWBLOOD)
        doSendAnimatedText({x = 409, y = 805, z = 7}, "Treiners", 140)
    end
    
    return true
end

Vá para o tp da posição {x = 409, y = 805, z = 7} e veja se o texto está funcionando lá.

pegou man e agora pra eu colocar em todos os sqms

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

1533313_5.png

  • Respostas 15
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Dependendo da sua versão do server, o seu server pode ñ ter a função de mandar esses textos animados.

  • Não que vá adiantar de alguma coisa, mas vamos testar sem usar as variaveis e sem usar math.random: local positions = { ["Treiners"] = {x = 409, y = 805, z = 7}, ["Treiners"] = {x = 344, y =

  • Adiciona essa função no 050-function.lua : function doSendAnimatedText(pos, value, color, player) if not tonumber(value) then return error("arg #2 in doSendAnimatedText is not a number")

Postado

Adiciona essa função no 050-function.lua :

function doSendAnimatedText(pos, value, color, player)
    if not tonumber(value) then
        return error("arg #2 in doSendAnimatedText is not a number")
    end
    
    if isPlayer(player) then
        doPlayerSendTextMessage(player, MESSAGE_EXPERIENCE, "", value, color, pos)
    else
        for _, v in ipairs(getSpectators(pos, 7, 5, true)) do
            if isPlayer(v) then
                doPlayerSendTextMessage(v, MESSAGE_EXPERIENCE, "", value, color, pos)
            end
        end
    end
end

~Escrito por ViitinG

 

 

Pra pegar em todos os sqm, usa o script do suicide:

local positions = {
    ["Treiners"] = {x = 409, y = 805, z = 7},
    ["Treiners"] = {x = 344, y = 738, z = 7},
    ["Treiners"] = {x = 650, y = 844, z = 7},
    ["Treiners"] = {x = 757, y = 826, z = 7},
    ["Treiners"] = {x = 1017, y = 709, z = 6},
    ["Treiners"] = {x = 1041, y = 560, z = 6},
    ["Treiners"] = {x = 800, y = 554, z = 6},
    ["Treiners"] = {x = 793, y = 709, z = 7},
    ["Treiners"] = {x = 796, y = 428, z = 6},
    ["Treiners"] = {x = 790, y = 357, z = 6},
    ["Treiners"] = {x = 547, y = 218, z = 7},
    ["Treiners"] = {x = 520, y = 182, z = 7}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(positions) do
        doSendMagicEffect(pos, math.random(CONST_ME_DRAWBLOOD, CONST_ME_LAST))
        doSendAnimatedText(pos, text, math.random(1, 255))
    end
    
    return true
end

Vê se dá certo.

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

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor

Adiciona essa função no 050-function.lua :

function doSendAnimatedText(pos, value, color, player)
    if not tonumber(value) then
        return error("arg #2 in doSendAnimatedText is not a number")
    end
    
    if isPlayer(player) then
        doPlayerSendTextMessage(player, MESSAGE_EXPERIENCE, "", value, color, pos)
    else
        for _, v in ipairs(getSpectators(pos, 7, 5, true)) do
            if isPlayer(v) then
                doPlayerSendTextMessage(v, MESSAGE_EXPERIENCE, "", value, color, pos)
            end
        end
    end
end

~Escrito por ViitinG

 

 

Pra pegar em todos os sqm, usa o script do suicide:

local positions = {
    ["Treiners"] = {x = 409, y = 805, z = 7},
    ["Treiners"] = {x = 344, y = 738, z = 7},
    ["Treiners"] = {x = 650, y = 844, z = 7},
    ["Treiners"] = {x = 757, y = 826, z = 7},
    ["Treiners"] = {x = 1017, y = 709, z = 6},
    ["Treiners"] = {x = 1041, y = 560, z = 6},
    ["Treiners"] = {x = 800, y = 554, z = 6},
    ["Treiners"] = {x = 793, y = 709, z = 7},
    ["Treiners"] = {x = 796, y = 428, z = 6},
    ["Treiners"] = {x = 790, y = 357, z = 6},
    ["Treiners"] = {x = 547, y = 218, z = 7},
    ["Treiners"] = {x = 520, y = 182, z = 7}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(positions) do
        doSendMagicEffect(pos, math.random(CONST_ME_DRAWBLOOD, CONST_ME_LAST))
        doSendAnimatedText(pos, text, math.random(1, 255))
    end
    
    return true
end

Vê se dá certo.

rapaz.... nao ta aparecendo o nome treiner ta só saindo um efeito nos lugares dos teleports, efeitos aleatorios, que por sinal gostei muito

e começou de novo com aquele erro que postei a imagem

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

1533313_5.png

Postado
local positions = {
    [1] = {x = 409, y = 805, z = 7},
    [2]= {x = 344, y = 738, z = 7},
    [3] = {x = 650, y = 844, z = 7},
    [4] = {x = 757, y = 826, z = 7},
    [5] = {x = 1017, y = 709, z = 6},
    [6]= {x = 1041, y = 560, z = 6},
    [7] = {x = 800, y = 554, z = 6},
    [8] = {x = 793, y = 709, z = 7},
    [9] = {x = 796, y = 428, z = 6},
    [10] = {x = 790, y = 357, z = 6},
    [11] = {x = 547, y = 218, z = 7},
    [12] = {x = 520, y = 182, z = 7}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(positions) do
        doSendMagicEffect(pos, math.random(CONST_ME_DRAWBLOOD, CONST_ME_LAST))
        doSendAnimatedText(pos, "Treiners", math.random(1, 255))
    end
    
    return true
end

Tenta assim.

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor
local positions = {
    [1] = {x = 409, y = 805, z = 7},
    [2]= {x = 344, y = 738, z = 7},
    [3] = {x = 650, y = 844, z = 7},
    [4] = {x = 757, y = 826, z = 7},
    [5] = {x = 1017, y = 709, z = 6},
    [6]= {x = 1041, y = 560, z = 6},
    [7] = {x = 800, y = 554, z = 6},
    [8] = {x = 793, y = 709, z = 7},
    [9] = {x = 796, y = 428, z = 6},
    [10] = {x = 790, y = 357, z = 6},
    [11] = {x = 547, y = 218, z = 7},
    [12] = {x = 520, y = 182, z = 7}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(positions) do
        doSendMagicEffect(pos, math.random(CONST_ME_DRAWBLOOD, CONST_ME_LAST))
        doSendAnimatedText(pos, "Treiners", math.random(1, 255))
    end
    
    return true
end

Tenta assim.

 

2w35q84.jpg

1533313_5.png

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