Morlad
Mega USER
When pressed on the subject (which will be made in the temple) will be loaded full of life, and just another one that will add a full mane
Actions.xml
Actions/scripts/ -create new file
temple.lua
Add to :
Actions.xml
PHP:
<action itemid="2523" event="script" value="temple.lua"/>
<action itemid="2524" event="script" value="temple.lua"/>
Actions/scripts/ -create new file
temple.lua
Add to :
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 2523) then
print(1)
if(getCreatureMaxMana(cid) == getCreatureMana(cid)) then
doPlayerSendCancel(cid, "Masz pelna mane!")
return false
end
doCreatureAddMana(cid, getCreatureMaxMana(cid)-getCreatureMana(cid))
elseif(item.itemid == 2524) then
if(getCreatureMaxHealth(cid) == getCreatureHealth(cid)) then
doPlayerSendCancel(cid, "Masz pelne hp!")
return false
end
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
end
return true
end