Ir para conteúdo

Featured Replies

Postado

Boa tarde gostaria de saber se uma alma Gentil poderia fazer potion Heal do pokemon heal  Por quantidade de Hp exemplo voce usa Potion Mewtwo Ele da 2540HP

 

 

Base Codigo

Citar

function doHealOverTime(cid, div, turn, effect)                     --alterado v1.6 peguem o script todo!!
if not isCreature(cid) then return true end

if turn <= 0 or (getCreatureHealth(cid) == getCreatureMaxHealth(cid)) or getPlayerStorageValue(cid, 173) <= 0 then 
   setPlayerStorageValue(cid, 173, -1)
   return true 
end

local d = div / 10000
local amount = math.floor(getCreatureMaxHealth(cid) * d)
doCreatureAddHealth(cid, amount)
if math.floor(turn/10) == turn/10 then
   doSendMagicEffect(getThingPos(cid), effect)
end
addEvent(doHealOverTime, 100, cid, div, turn - 1, effect)
end

local potions = {
[12347] = {effect = 13, div = 50}, --super potion
[12348] = {effect = 13, div = 70}, --great potion              
[12346] = {effect = 12, div = 80}, --ultra potion
[12345] = {effect = 14, div = 90}, --hyper potion
[12343] = {effect = 14, div = 110}, --full restore
}

function onUse(cid, item, frompos, item2, topos)
local pid = getThingFromPosWithProtect(topos)

if not isSummon(pid) or getCreatureMaster(pid) ~= cid then
return doPlayerSendCancel(cid, "You can only use potions on your own Pokemons!")
end

if getCreatureHealth(pid) == getCreatureMaxHealth(pid) then
return doPlayerSendCancel(cid, "This pokemon is already at full health.")
end

if getPlayerStorageValue(pid, 173) >= 1 then
return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")
end

if getPlayerStorageValue(cid, 52481) >= 1 then
return doPlayerSendCancel(cid, "You can't do that while a duel.")
end

if getPlayerStorageValue(cid, 990) >= 1 then
   doPlayerSendCancel(cid, "You can't use rpotion during gym battles.")
   return true
end

doCreatureSay(cid, "".. getCreatureName(pid)..", take this potion!", TALKTYPE_MONSTER)
doSendMagicEffect(getThingPos(pid), 0)
setPlayerStorageValue(pid, 173, 1)
doRemoveItem(item.uid, 1)

local a = potions[item.itemid]
doHealOverTime(pid, a.div, 100, a.effect)

return true
end

 

 

 

 

5a510dabc5375_20228663_336082076822153_8453189641140183581_n-Cpia-Cpia.jpg.ae93894455bf828fc6901b29d7395cd9.jpg

https://www.facebook.com/groups/659018184245665/

5a510e4f9a582_20228663_336082076822153_8453189641140183581_n-Cpia-Cpia.jpg.fa86c37be79982f1cc8ff619015ddd1b.jpg

https://www.facebook.com/profile.php?id=133706320308745

 

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.1k
  • Posts 512.5k

Informação Importante

Confirmação de Termo