Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Esse scritp funciona com vocation, gostaria por gentileza que tirasse por vocation e adicionasse por STORAGE. Caso o player tem a storage ficaraia saindo o efeito TEXT.

desde de ja, muito grato !


 

Citar

local tab = {
    [4] = 10, -- [vocationID] = número da cor do texto animado
    [5] = 30,
    [6] = 50,
    [7] = 70
}

function ariseText(cid)
    if not isPlayer(cid) then -- Verifica se o jogador ainda é válido
        return true
    end
    
    local texts = {"' .    ,", ".    ' ,", "'  .  ,", ",    ' ."}
    local playerVocation = getPlayerVocation(cid)
    
    if playerVocation and tab[playerVocation] then
        doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerVocation])
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efeito mágico adicionado
    end
    
    addEvent(ariseText, 1000, cid)
    
    return true
end

function onLogin(cid)
    if tab[getPlayerVocation(cid)] then
        ariseText(cid)
    end
    
    return true
end

 

  • Respostas 14
  • Visualizações 462
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Seria tipo isso?   data > creaturescripts > creaturescripts.xml   <event type="login" name="playerTextEffect" event="script" value="playerTextEffect.lua"/>    

Postado
local tab = {
    [4] = 10, -- [storageValue] = número da cor do texto animado
    [5] = 30,
    [6] = 50,
    [7] = 70
}

function ariseText(cid)
    if not isPlayer(cid) then
        return true
    end
    
    local texts = {"' .    ,", ".    ' ,", "'  .  ,", ",    ' ."}
    local playerStorage = getPlayerStorageValue(cid, STORAGE)
    
    if playerStorage and tab[playerStorage] then
        doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerStorage])
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
    end
    
    addEvent(ariseText, 1000, cid)
    
    return true
end

function onLogin(cid)
    if tab[getPlayerStorageValue(cid, STORAGE)] then
        ariseText(cid)
    end
    
    return true
end

Basta substituir o valor da variável "storage" pelo número correspondente ao storage do seu servidor.

[4] = 10

4 é o storage

10 é a cor do texto animado.

Deve funcionar, espero ter ajudado.

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

Postado
  • Autor
57 minutos atrás, Vortex disse:

local tab = {
    [4] = 10, -- [storageValue] = número da cor do texto animado
    [5] = 30,
    [6] = 50,
    [7] = 70
}

function ariseText(cid)
    if not isPlayer(cid) then
        return true
    end
    
    local texts = {"' .    ,", ".    ' ,", "'  .  ,", ",    ' ."}
    local playerStorage = getPlayerStorageValue(cid, STORAGE)
    
    if playerStorage and tab[playerStorage] then
        doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerStorage])
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
    end
    
    addEvent(ariseText, 1000, cid)
    
    return true
end

function onLogin(cid)
    if tab[getPlayerStorageValue(cid, STORAGE)] then
        ariseText(cid)
    end
    
    return true
end

Basta substituir o valor da variável "storage" pelo número correspondente ao storage do seu servidor.

[4] = 10

4 é o storage

10 é a cor do texto animado.

Deve funcionar, espero ter ajudado.

Não funcioniu n irmão ! =[

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.7k

Informação Importante

Confirmação de Termo