Postado Julho 5, 2023 1 ano 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
Postado Julho 5, 2023 1 ano 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 Julho 5, 2023 1 ano por Vortex (veja o histórico de edições)
Postado Julho 5, 2023 1 ano 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 ! =[
Postado Julho 5, 2023 1 ano Autor 7 minutos atrás, Vortex disse: Onde você adicionou isso? Foi no arquivo data/creaturescript? Isso amigo !
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.