• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Demon form spell not working!

lynx_

New Member
Joined
Sep 15, 2011
Messages
25
Reaction score
0
I have got a problem. Just to say I am a beginner with all these scripts. I had a spell that transforms player into a fire devil and gives him mlvl and shielding. I used it on mystic spirit 0.2.7.0 and it worked... but now I want to use it on TFS 0.3.6, and it is NOT working.

What should be changed? Please, help, any attempts are appreciated.

Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, 0)
 
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 0.5 * 60 * 1000)
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, 0.5 * 60 * 1000)
setConditionParam(condition2, CONDITION_PARAM_STAT_MAGICPOINTS, 3)
setConditionParam(condition2, CONDITION_PARAM_SKILL_SHIELD, 15)
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, 0.5 * 60 * 1000)
addOutfitCondition(condition3, 0, 40, 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
 
Last edited:
Back
Top