Ir para conteúdo
  • 0

Ajuda Cura[Runa De Heal]


brunoi123

Pergunta

Ae galera queria saber, como eu faço pra runa encher 50% da minha vida.. exemplo eu tenho 10mil devida.. se eu usar ela enche 5 mil.. msm se eu tiver com 100 de life e usar ela.. ela encher 5mil..

 

quero q ela encha 50% do meu life inteiro..

 

ai o script \/

function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)

local exhausted_seconds = 1
local exhausted_storagevalue = 7480

local mana_minimum = 50000
local mana_maximum =50000
local mana_add = math.random(mana_minimum, mana_maximum)


 if(item.type >= 1) then
  if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
 doPlayerAddMana(cid, mana_add)
									doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid,"I feel the best",1)
 setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
 doChangeTypeItem(item.uid, item.type - 1)
else
 doSendMagicEffect(frompos, CONST_ME_POFF)
 doPlayerSendCancel(cid, "You are exchausted.")
end
  else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
  end
 else
  if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
  else
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
 doPlayerAddMana(cid, mana_add)
									doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"I feel the best",1)
 setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
 doRemoveItem(item.uid, 1)
else
 doSendMagicEffect(frompos, CONST_ME_POFF)
 doPlayerSendCancel(cid, "You are exchausted.")
end
  end
 end

return 1
end

 

se alguem puder me ajuda agradeço desde já =)

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Caro membro, caso não tenha visto está implícito nas regras:

 

Servirá até para um melhor atendimento sobre seu pedido, informe as seguintes informações:

 

Tipo do script:

Protocolo (versão do Tibia):

Servidor utilizado:

Nível de experiência:

Adicionais/Informações:

 

Não sei se vai funcionar mas tente usar:

 

local vida = getCreatureMaxHealth(cid)

doCreatureAddHealth(cid, vida/2)

 

 

function onUse(cid, item, frompos, item2, topos)

local level = getPlayerLevel(cid)

local mlevel = getPlayerMagLevel(cid)

 

local exhausted_seconds = 1

local exhausted_storagevalue = 7480

 

local mana_minimum = 50000

local mana_maximum =50000

local vida = getCreatureMaxHealth(cid)

local mana_add = math.random(mana_minimum, mana_maximum)

 

 

if(item.type >= 1) then

if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,12)

doPlayerAddMana(cid, mana_add)

doCreatureAddHealth(cid, vida/2)

doPlayerSay(cid,"I feel the best",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doChangeTypeItem(item.uid, item.type - 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

end

else

if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

else

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,12)

doPlayerAddMana(cid, mana_add)

doCreatureAddHealth(cid, vida/2)

doPlayerSay(cid,"I feel the best",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doRemoveItem(item.uid, 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

end

end

 

return 1

end

Editado por Newtonnotwen
Link para o comentário
Compartilhar em outros sites

  • 0

SCRIPT DE CURA

VERSAO 8.0 DE WODBO

ARKHAM

 

obg vou testar jaja comento se funcionou =)

 

é nao funcionou corretamente.. .. quando uso a runa a vida enche 50% correta, mais a mana enche toda.. =/

 

so colocar doCreatureAddMana(cid, mana/2) ???

Link para o comentário
Compartilhar em outros sites

  • 0

Não, faça assim:

function onUse(cid, item, frompos, item2, topos)

local level = getPlayerLevel(cid)

local mlevel = getPlayerMagLevel(cid)

 

local exhausted_seconds = 1

local exhausted_storagevalue = 7480

 

local mana = getCreatureMaxMana(cid)

local vida = getCreatureMaxHealth(cid)

 

if(item.type >= 1) then

if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,12)

doPlayerAddMana(cid, mana/2)

doCreatureAddHealth(cid, vida/2)

doPlayerSay(cid,"I feel the best",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doChangeTypeItem(item.uid, item.type - 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

end

else

if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

else

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,12)

doPlayerAddMana(cid, mana/2)

doCreatureAddHealth(cid, vida/2)

doPlayerSay(cid,"I feel the best",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doRemoveItem(item.uid, 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

end

end

 

return 1

end

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...