Ir para conteúdo

Featured Replies

Postado
  • Este é um post popular.

Oiie :)   

 

Trazendo um Tutorial Hoje Bem simples, mais que uns Membros estão precisando 

Ele vai ensinar Para quando você soltar seu Pokemon o "HP" do Pokemon aparecer Logo abaixo do "HP" do Player..

Tipo assim como na imagem::

 

zn0o.png

 

Você esta com essa Mesma Dúvida?   

Segue tutorial ae:: 

 

1* vá no Seu  data\lib  e abra o some functions.lua

Logo no começo do arquivo dê 2 vezes enter para pular 2 Linha, e coloque isso no começo do Arquivo:: 

function getVitalityByMaster(cid)


if not isCreature(cid) then return 0 end
local ball = getPlayerSlotItem(cid, 8).uid
if not ball or ball <= 1 or not pokes[getItemAttribute(ball, 'poke')] then return true end
return pokes[getItemAttribute(ball, 'poke')].vitality * (getPlayerLevel(cid) + (getItemAttribute(ball, 'boost') or 0))
end

function onPokeHealthChange(cid, zerar)
if not isCreature(cid) then return true end
if zerar then doPlayerSendCancel(cid, '#ph#,0,0') end
local ball = getPlayerSlotItem(cid, 8).uid
if not ball or ball <= 1 or not pokes[getItemAttribute(ball, 'poke')] then return true end

if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6
local pokemon = getCreatureSummons(cid)[1]
local pokelife = (getCreatureHealth(pokemon) / getCreatureMaxHealth(pokemon))
doItemSetAttribute(ball, "hp", pokelife)
end

local rd = 1 - (tonumber(getItemAttribute(ball, "hp")))
local maxHp = HPperVITsummon * getVitalityByMaster(cid)
local hp = maxHp -(maxHp * rd)
doPlayerSendCancel(cid, '#ph#,'.. math.floor(hp) ..','.. math.floor(maxHp))
end

 

2* vá no   data\movements\scripts  e abra o arquivo portrait.lua 

Procure por:: 

if not getItemAttribute(item.uid, "poke") then

e depois do end Adicione isso AQ:: 

onPokeHealthChange(cid)

 

ai procure por if not getItemAttribute(item.uid, "poke") then  De novo,
e depois do end adicione isso::    

 onPokeHealthChange(cid, true)

 
3* vá em   data\creaturescripts\scripts e  abra o arquivo  exp2.0.lua
e procure por::      
valor = math.abs(valor)    --alterado v1.9
    if isSummon(attacker) then
 
e Substitua por esse:: 

valor = math.abs(valor) --alterado v1.9


if isSummon(cid) and valor >= getCreatureHealth(cid) then
onPokeHealthChange(getCreatureMaster(cid), true)
elseif isSummon(cid) then
onPokeHealthChange(getCreatureMaster(cid))
end
if isSummon(attacker) then

 
4* vá em   data\actions\scripts e abra o revive.lua
Procure por:: 
doCureStatus(cid, "all", true)
 
e substitua por esse::

doCureStatus(cid, "all", true)


cleanBuffs2(item2.uid) --alterado v1.5
if useOTClient then
onPokeHealthChange(cid) --alterei aki
end

 
5* vá em  data\actions\scripts e abra o potion.lua
procure por::
if math.floor(turn/10) == turn/10 then
   doSendMagicEffect(getThingPos(cid), effect)
end

e substitua por esse;:

if math.floor(turn/10) == turn/10 then


doSendMagicEffect(getThingPos(cid), effect)
end
if useOTClient then
onPokeHealthChange(getCreatureMaster(cid)) --alterei aki
end

 

6* vá em      data\npc\scripts  e abra o arquivo heal.lua
e adicione isso lá no final do arquivo:: obs: antes dos "end"

if useOTClient then


onPokeHealthChange(cid) --alterei aki
end

 
 
Autor::
AnnaFeeh 
Stilo Maldoso

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

  • Respostas 37
  • Visualizações 8.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 2 weeks later...

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

Informação Importante

Confirmação de Termo