Donio
Banned User
Hello im having some problems with a spell in my server.. when you do utito trans bear you will transfrom to a bear and have 20+ more shielding.. but its not working.. here is the spell:
There isnt any errors in consol either
Code:
--[[
Bear transform
]]--
local time = 120 * 1000 -- 120 * 1000 = 2 min
local addShielding = 20 -- how much shielding should be added
local addMagic = 3 -- how much magic should be added
local bear = {lookType = 16, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding)
setConditionParam(condition, CONDITION_PARAM_SKILL_MAGIC, addMagic)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)
local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, time)
addOutfitCondition(outfit, bear.lookTypeEx, bear.lookType, bear.lookHead, bear.lookBody, bear.lookLegs, bear.lookFeet)
setCombatCondition(combat, outfit)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, time)
setCombatCondition(combat, exhaust)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Code:
<instant name="Bear Transform" words="utito trans bear" lvl="80" mana="800" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" script="bear.lua">
<vocation name="1"/>
<vocation name="5"/>
</instant>
There isnt any errors in consol either