• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Single Spell Exhaustion (Other Spells Still Useable)

Status
Not open for further replies.

googoo12345

New Member
Joined
Dec 27, 2008
Messages
3
Reaction score
0
is there a way to make a certain spell exhausted and still be able to use the others spells?

thanks
 
Something like that? It's the Protector spell of TFS

Code:
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, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 220)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

local disable = createConditionObject(CONDITION_PACIFIED)
setConditionParam(disable, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, disable)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)

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

Maybe it helps you.
 
I need that too :blink:

You are right Northnorial :thumbup:
Can someone edit my spell?

Add exhaust (10sec), but other spells and potions still useable..

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0, -10, -0, -10)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 24000)
setConditionFormula(condition, 10.7, -156, 10.7, -156)
setCombatCondition(combat, condition)

arr = {
{0, 1, 0},
{1, 3, 1},
{0, 1, 0}
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

local function m(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end

function onCastSpell(cid, var)
	local delay = 1000
	local seconds = 0
	local parameters = { cid = cid, var = var, combat = combat }
	repeat
		addEvent(m, seconds, parameters)
		seconds = seconds + delay
	until seconds == 10000
end
 
its wayy more eaasy on spells.xml theres the exhaustion... 1000 = sec so 10000 = 10 sec
 
Thread closed because another similar link. is available HERE. (Thanks to Syntax for mentioning it)!

Also closed because this is wrong section. (The other link is not).
 
Status
Not open for further replies.
Back
Top