Ir para conteúdo

Healing [Script Ajuda]


brunoi123

Posts Recomendados

Eae queria saber como faço pra essa "RUNA" invez de encher 50k de hp e de mana encher 25%do meu hp e da minha mana FULL se tenho 200k ao total vai encher 50k...

 

se tiver 200k ao total ai me bataram bastante ai fikei com 50k e usar o runa encher mais 50k.. se alguem me ajduar do muitos reps =p e alem de mto obg 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 = 40000
local mana_maximum =40000
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

Link para o comentário
Compartilhar em outros sites

tenta 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 m = getPlayerMaxMana(cid)*0.25

local h = getCreatureMaxHealth(cid)*0.25

 

 

 

if(item.type >= 1) then

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

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,12)

doPlayerAddMana(cid, m)

doPlayerAddHealth(cid, h)

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, m)

doPlayerAddHealth(cid, h*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

 

Link para o comentário
Compartilhar em outros sites

malz, fui viajar so deu pra responder agr..., vou tentaaar amanha de tarde eu falo se deu certoo ou nao OBG ! lembrando q é versao 8.00 =/ será q pega do msm jeito?

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

×
×
  • Criar Novo...