• 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 Spells Exhaust

Quab

Mapper/C++ User
Joined
Jun 22, 2008
Messages
350
Reaction score
0
Location
In Your Dream$
Untitled.jpg

Greetings OTLanders!
I really need help with my spells.
The "spell-exhaust" is working..
But the "White-Cloud" exhaust is not working.
It's able to hold the hotkey and spamming the cloud.
How to change it.. please.. it's make the server crash when many people do it..
REP +!
 
No point lowering the exhaust and im guessing your using an older version of TFS. You can solve this by using specific spell exhausts, this will take time and alot of storage's to fix this so i suggest upgrading TFS or the machine you host on.

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)
local storage = 1337 -- storage to handle cooldown
local cooldown = 1000 -- 1000 = 1 sec 60000 = 60seconds
local mana = 20 -- mana cost of spell
function onCastSpell(cid, var)
        if exhaustion.check(cid, storage) == false and getPlayerMana >= mana then
		exhaustion.set(cid, storage, cooldown)
		return doCombat(cid, combat, var
		
	else
		doPlayerSendChannelMessage(cid, "You are currently on cooldown."

		end
 
Back
Top