knighters god
Active Member
- Joined
- Feb 14, 2009
- Messages
- 166
- Solutions
- 1
- Reaction score
- 40
Server version: TFS 1.2
I have a vocation box wich gives knights a storage of
.
And with this storage I want to upgrade the spell blood rage. From a percentage of 125 --> 145.
I have tried doing this which I tought would work. But sadly no ;/
Help would be appreciated!
I have a vocation box wich gives knights a storage of
Code:
setPlayerStorageValue(cid, 17301, 3)
And with this storage I want to upgrade the spell blood rage. From a percentage of 125 --> 145.
I have tried doing this which I tought would work. But sadly no ;/
Code:
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
-- DAMAGE BELOW ME
if getPlayerStorageValue(cid, 17301) == 3 then
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 145) -- I want this when storage 17301 == 3
elseif getPlayerStorageValue(cid, 17301) ~= 3 then
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 125) -- I want this when storage 17301 ~= 3
end
-- DAMAGE ABOVE ME
condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 0)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setCondition(condition)
function onCastSpell(creature, var)
return combat:execute(creature, var)
end
Help would be appreciated!