• 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!

Solved Spells how to stack

gremlee

Qumora.com
Joined
Jul 15, 2008
Messages
511
Reaction score
16
Hello i have this buff that give you more health and mana but when u have others buffs like incrennsing skills, when i am in pz, utito tempo it doesnt work :S

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 125)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPERCENT, 125)
setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
condition = nil

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
I think you need to add this
setConditionParam(condition, CONDITION_PARAM_SUBID, 1) under
local condition = createConditionObject(CONDITION_ATTRIBUTES)

and whenever you want another buff to replace this condition, you add the SUBID line to the spell w the same number


EDIT: and im a bit noob what what is

condition = nil doing there? i think you can take that off and itll still work fine
 
I think you need to add this
setConditionParam(condition, CONDITION_PARAM_SUBID, 1) under
local condition = createConditionObject(CONDITION_ATTRIBUTES)

and whenever you want another buff to replace this condition, you add the SUBID line to the spell w the same number


EDIT: and im a bit noob what what is

condition = nil doing there? i think you can take that off and itll still work fine

Okey will try thx
 
What message does it give you in game?

i would say try these 2 things
-try putting aggressive="0" in spells.xml too
-and take off condition=nil from script
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 125)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPERCENT, 125)
setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

<instant name="Buff ek" words="exori buff" lvl="350" mana="450" needweapon="1" exhaustion="1000" needlearn="0" event="script" value="support/ekbuff.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
 
Back
Top