• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Use item (not equip) to increase regen possible? help needed

tozikrulz

New Member
Joined
Jun 10, 2009
Messages
46
Reaction score
1
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:

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
[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
 
Last edited:
Back
Top Bottom