Ir para conteúdo
Entre para seguir isso  
Majesty

[TFS 1.3] Texto - Teleports

Recommended Posts

Majesty    1755
Majesty

[TFS 1.3] Texto - Teleports

Citar

Nome: [TFS 1.3] Texto - Teleports

Versão: [10.98+] // Qualquer uma disponível para TFS 1.3

Tipo do script: Global Event

Créditos: -

data/globalevents/scripts/textotp.lua:

Spoiler

local effects = {
  	{position = Position(32369, 32241, 7), text = 'Bem vindo ao melhor, OTBR!', effect = CONST_ME_GROUNDSHAKER},
   	{position = Position(32365, 32236, 7), text = 'TRAINERS', effect = CONST_ME_GROUNDSHAKER},
	{position = Position(32353, 32223, 7), text = 'ARENA PVP', effect = CONST_ME_GROUNDSHAKER},
	{position = Position(32373, 32236, 7), text = 'EVENTS', effect = CONST_ME_GROUNDSHAKER},	
	{position = Position(1116, 1092, 7), text = 'ENTRAR', effect = CONST_ME_GROUNDSHAKER},
	{position = Position(1114, 1096, 7), text = 'SAIR', 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

 

data/globalevents/globalevents.xml:

Spoiler

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

 

 

Compartilhar este post


Link para o post
Majesty    1755
Majesty

[TFS 1.3][Revscriptsys] Texto - Teleports

Citar

Nome: [TFS 1.3][Revscriptsys] Texto - Teleports

Versão: [10.98+]  // Compatível com TFS 1.3 / OTServBR-Global

Tipo do script: Global Event

Créditos: -

data/scripts/globalevents/textotp.lua:

Spoiler

local effects = {
    {position = Position(32369, 32241, 7), text = 'Bem vindo ao melhor, OTBR!', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(32365, 32236, 7), text = 'TRAINERS', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(32353, 32223, 7), text = 'ARENA PVP', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(32373, 32236, 7), text = 'EVENTS', effect = CONST_ME_GROUNDSHAKER},    
    {position = Position(1116, 1092, 7), text = 'ENTRAR', effect = CONST_ME_GROUNDSHAKER},
    {position = Position(1114, 1096, 7), text = 'SAIR', effect = CONST_ME_GROUNDSHAKER},  
}

local animatedText = GlobalEvent("AnimatedText") 
function animatedText.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

animatedText:interval(4550)
animatedText:register()

 

 

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×