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

Help with my spell

coolashe

New Member
Joined
Oct 4, 2007
Messages
57
Reaction score
1
Hi, I need help with this spell. It's a spell that transform you to a bear for 10minutes and give 100 in fist but it got a problem. When you transform back to normal the fist still stay on 100, and the skills won't go down again so could someone help me? Here is the spell
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 22000)
setConditionFormula(condition, 0.7, -56, 0.7, -56)
setCombatCondition(combat1, condition)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0)

local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 10 * 60 * 1000)
setConditionParam(condition2, CONDITION_PARAM_SKILL_FIST, 100)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, 0)

local condition3 = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition3, CONDITION_PARAM_TICKS, 20000)
addOutfitCondition(condition3, 0, 16, 0, 0, 0, 0)
setCombatCondition(combat3, condition3)

function onCastSpell(cid, var)
	local ret = LUA_ERROR
	if(doCombat(cid, combat1, var) == LUA_NO_ERROR) and (doCombat(cid, combat2, var) == LUA_NO_ERROR) and (doCombat(cid, combat3, var) == LUA_NO_ERROR) then
		ret = LUA_NO_ERROR
	end
	return ret
end
 
Maybe add "infight" for 10 mins also (so they cant log) and add an event that after 10 mins does

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0)

local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition2, CONDITION_PARAM_SKILL_FIST, -100)
setCombatCondition(combat2, condition2)
 
Back
Top