Ir para conteúdo
  • Cadastre-se

(Resolvido)Texto em Piso!


Ir para solução Resolvido por tetheuscunha,

Posts Recomendados

local config = {
    positions = {
        ["Temple"] = { x = 1010, y = 996, z = 7 },
        ["Tps"] = { x = 1011, y = 996, z = 7 },
        ["Depot"] = { x = 1042, y = 1984, z = 7 }

    }
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendAnimatedText(pos, text, math.random(1, 255))
    end
    
    return TRUE
end  
	<globalevent name="texto" interval="1" script="texto.lua"/>

Creio que este funcionara.

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

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
Em 04/10/2016 ás 23:42, tetheuscunha disse:

local config = {
    positions = {
        ["Temple"] = { x = 1010, y = 996, z = 7 },
        ["Tps"] = { x = 1011, y = 996, z = 7 },
        ["Depot"] = { x = 1042, y = 1984, z = 7 }

    }
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendAnimatedText(pos, text, math.random(1, 255))
    end
    
    return TRUE
end  

	<globalevent name="texto" interval="1" script="texto.lua"/>

Creio que este funcionara.

 

R9s1ueb.jpg

Link para o post
Compartilhar em outros sites
  • Solução

Tenta Esse :

Spoiler

local effects = {
    {position = Position(995, 100, 7), text = 'Teleports', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(281, 254, 8), text = 'TP Room'}, -- text only
    {position = Position(307, 254, 1), text = 'Event', effect = CONST_ME_GROUNDSHAKER},
}

function onThink(interval)
    for i = 1, #effects do
        local settings = effects[i]
        local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5)
        if #spectators > 0 then
            if settings.text then
                for i = 1, #spectators do
                    spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position)
                end
            end
            if settings.effect then
                settings.position:sendMagicEffect(settings.effect)
            end
        end
    end
   return true
end

 

 

 

<globalevent name="text" interval="3500" script="text.lua"/>

 

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
13 horas atrás, tetheuscunha disse:

Tenta Esse :

  Ocultar conteúdo


local effects = {
    {position = Position(995, 100, 7), text = 'Teleports', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(281, 254, 8), text = 'TP Room'}, -- text only
    {position = Position(307, 254, 1), text = 'Event', effect = CONST_ME_GROUNDSHAKER},
}

function onThink(interval)
    for i = 1, #effects do
        local settings = effects[i]
        local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5)
        if #spectators > 0 then
            if settings.text then
                for i = 1, #spectators do
                    spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position)
                end
            end
            if settings.effect then
                settings.position:sendMagicEffect(settings.effect)
            end
        end
    end
   return true
end

 

 

 


<globalevent name="text" interval="3500" script="text.lua"/>

 

 

 

PEGOU flw!

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo