Postado Fevereiro 1, 2022 3 anos Alguém me ajuda a botar esse script nesse pf ! Gostaria que saísse esse efeito do script [1] no script [2] O efeito local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} Citar script: 1 local tab = { [9] = 10, -- [vocationID] = número da cor do texto animado [10] = 30, [11] = 50, [12] = 70 } function ariseText(cid) local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 600, cid) end return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end Citar Script: 2 -- CONFIGURAÇÕES aurastr = 9987 -- storage da aura estr = 25951 -- storage para o exhaust porcentagem = 1000 -- chance de curar em cada volta da aura, em porcentagem quantheal = 20 -- porcentagem do hp máximo que cada cura irá curar. (No caso, irá curar 10% do hp máximo cada cura) tempo = 10000 -- tempo para dar uma volta no player (este tempo foi o que achei mais agradável visualmente, é recomendável não mudar) tipoaura = 66 -- número do efeito da aura (efeito de distância, pode ser identificado com /x no jogo) efeitocura = 14 -- número do efeito quando a cura chega ao player (efeito de posição fixa, pode ser identificado com /z no jogo) -- Função que chama a aura function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = getCreaturePosition(cid) local posaura = { {x=(atual.x)-1, y=(atual.y)-1, z=atual.z}, {x=atual.x, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=atual.y, z=atual.z}, {x=(atual.x)+1, y=(atual.y)+1, z=atual.z}, {x=atual.x, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=atual.y, z=atual.z}, } local chances = math.random(100) if(chances<=porcentagem/8 and getCreatureHealth(cid)<getCreatureMaxHealth(cid)) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/quantheal) if(i<=8 and i>1) then doSendMagicEffect(atual, tipoaura) else doSendMagicEffect(atual, tipoaura) end doSendMagicEffect(atual, efeitocura) end if(i==8) then doSendMagicEffect(atual, tipoaura) elseif(i<8) then doSendMagicEffect(atual, tipoaura) end if(i<=8 and getPlayerStorageValue(cid, aurastr)==2) then i = i+1 tm = tempo/8 return addEvent(efeitosAura,tm,i,tm,cid) elseif(i>8 and getPlayerStorageValue(cid, aurastr)==2) then return efeitosAura(1,0,cid) else return TRUE end else return TRUE end end function onUse(cid, item, fromPosition, itemEx, toPosition) doRemoveItem(item.uid,1) if(getPlayerStorageValue(cid, aurastr)==2) then setPlayerStorageValue(cid, estr, os.time()+2) setPlayerStorageValue(cid, aurastr, -1) doPlayerSendCancel(cid,"Voce desligou a Aura!") doPlayerSendTextMessage(cid,18,"Voce desligou a Aura!") else doPlayerSendCancel(cid,"Voce ligou a Aura!") doPlayerSendTextMessage(cid,18,"Voce ligou a Aura!") setPlayerStorageValue(cid, aurastr, 2) efeitosAura(1,tempo/8,cid) end return TRUE end
Postado Fevereiro 1, 2022 3 anos O efeito do script 2 deve ser retirado e colocado o efeito do script 1? STYLLER OT 2022
Postado Fevereiro 1, 2022 3 anos Autor 53 minutos atrás, luanluciano93 disse: O efeito do script 2 deve ser retirado e colocado o efeito do script 1? SIM ! Retirar do 1 e colocar no 2 e retirar esse efeito do 2 pra quando ativar a aura ficar saindo esse efeito... local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} Editado Fevereiro 1, 2022 3 anos por deza (veja o histórico de edições)
Postado Fevereiro 2, 2022 3 anos Dentro da função onUse do script 2 tem o "efeitosAura(1,tempo/8,cid)" troca essa função pela função "ariseText(cid)" do script 1 (que por sinal pode ser uma função local) ... Apague toda a função local do efeitosAura do script 2 e substitua pela função ariseText(cid) e pela tabela TAB. STYLLER OT 2022
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.