Ir para conteúdo

Posts Recomendados

HP-UP

 

 

em data\actions\scripts\hpup.lua

criar hpup.lua

coloca isso


---- config by notle ----
local maxhp = 10 --- maximo de hp up pode usa
local v = 1   -- não mude  
---- config by notle ----
function onUse(cid, item, topos, item2, frompos)
if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendCancel(cid, "sorry you can not use hp-up in battle")
return TRUE
end
local myball = getPlayerSlotItem(cid, 8)
local Hp_Up = getItemAttribute(myball.uid, "Hp_Up") or 0
local Hp_Ups = 0
if Hp_Up == maxhp then
return doPlayerSendCancel(cid, "Sorry, is not possible you already have "..maxhp.." Hp Up.")
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerAccess(cid) == 6 then
Hp_Ups = maxhp-v
end
Hp_Ups = Hp_Ups + 1
local pokemon = getItemAttribute(myball.uid, "poke")
local vit = pokes[pokemon].vitality * Hp__Up * Hp_Ups
doSetItemAttribute(myball.uid, "Hp_Up", Hp_Up + Hp_Ups)
local hp_max = getCreatureMaxHealth(getCreatureSummons(cid)[1])	
setCreatureMaxHealth(getCreatureSummons(cid)[1],hp_max+Hp__Up*117)
doCreatureAddHealth(getCreatureSummons(cid)[1],Hp__Up*200)  
doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit)
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem HP UP.")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a Hp Up +"..Hp_Ups + Hp_Up..".")
doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "HP UP", 60)
else
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
end
return	
end		

data\actions\actions.xml

adiciona isso

<action itemid="????" script="hpup.lua"/>

nesses ???? coloca a id do item que vai ser hp up

em

data\lib\configuration.lua

adiciona isso

 

Hp__Up = 2.0

recomendo adiciona de baixo do boost_rate

agora vai em data\lib\level system.lua

adiciona isso no final de baixo do end pula uma linha e adiciona la

function getPokemonHp_Up(poke)
if not isSummon(poke) then return 0 end
return getItemAttribute(getPlayerSlotItem(getCreatureMaster(poke), 8).uid, "Hp_Up") or 0
end

Dream_HP_Up_Sprite.png

 

 

Protein

 

 

em data\actions\scripts\protein.lua

criar protein.lua

---- config by notle ----
local maxhp = 10 --- maximo de Protein UP pode usa
local v = 1   -- não mude
---- config by notle ----
function onUse(cid, item, topos, item2, frompos)
if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendCancel(cid, "sorry you can not use hp-up in battle")
return TRUE
end
local myball = getPlayerSlotItem(cid, 8)
local Pro = getItemAttribute(myball.uid, "Pro") or 0
local Pros = 0
if Pro == maxhp then
return doPlayerSendCancel(cid, "Sorry, is not possible you already have "..maxhp.." Protein UP.")
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerAccess(cid) == 6 then
Pros = maxhp-v
end
Pros = Pros + 1
local pokemon = getItemAttribute(myball.uid, "poke")
local off = pokes[pokemon].offense * vitamin * Pros
doSetItemAttribute(myball.uid, "Pro", Pro + Pros)
doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off)
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem Protein +.")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a Protein UP+"..Pros + Pro..".")
doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "Protein +", TEXTCOLOR_PINK)
else
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
end
return
end

data\actions\actions.xml

adiciona isso

<action itemid="????" script="protein.lua"/>

nesses ???? coloca a id do item que vai ser protein

em

data\lib\configuration.lua

adiciona isso

 

vitamin = 2.0

 

 

espero que gostem :)

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

×
×
  • Criar Novo...