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

Lua Spell exhaustion

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
Hello, I have few spells that doesnt have exhaustion. How can I add exhaustion to the lua file?

Rep++
 
In spells.xml their is an exhaust and group exhaust.
Code:
	<instant group="attack" spellid="87" name="Death Strike" words="exori mort" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" cooldown="2000" groupcooldown="2000" needlearn="0" script="attack/death strike.lua">
		<vocation name="Sorcerer"/>
		<vocation name="Master Sorcerer"/>
	</instant>
 
I know, im using 0.3.6 and I already have the exhaustion="xx"
but I need the line in the spell file itself
 
Code:
function onCastSpell(cid, var)
	if getPlayerStorageValue(cid, 3200) <= 0 then
		setPlayerStorageValue(cid, 3200, os.time()+[COLOR="#FF0000"]6000[/COLOR]) 
		return doCombat(cid, combat, var)
	else
		doPlayerSendCancel(cid, "You are exhausted.")
	end
end

6000 being 6 seconds.
 
If the spells have no exhaustion at all then they probable don't have return true (above the last end), or you can also post the spells.
 
Back
Top