Hi, i've started a script which removes soul to increase regen 10% of max hp/mp per sec for 1 minute but the regen part isnt working, tfs 0.3, here is the script so far:
[28/05/2016 16:54:19] data/actions/scripts/other/soulpotion.lua:2: attempt to perform arithmetic on a boolean value
ps. If it's possible to increase atk speed by % too i would be grateful
Code:
local duration = 60
local health = getCreatureMaxHealth(cid) / 10
local mana = getCreatureMaxMana(cid) / 10
local regeneration = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regeneration, CONDITION_PARAM_TICKS, duration * 1000)
setConditionParam(regeneration, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(regeneration, CONDITION_PARAM_HEALTHTICKS, 1000)
setConditionParam(regeneration, CONDITION_PARAM_MANAGAIN, mana)
setConditionParam(regeneration, CONDITION_PARAM_MANATICKS, 1000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 7443 then
if getPlayerSoul(cid) >= 100 then
doSetMonsterOutfit(cid,morgaroth,duration*1000)
doPlayerAddSoul(cid, -100)
doAddCondition(cid, regeneration)
doSendMagicEffect(fromPosition,CONST_ME_DEATHAREA)
end
end
return TRUE
end
ps. If it's possible to increase atk speed by % too i would be grateful
Last edited: