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

Cooldowns 8.60 and stone of wisdom

wafuboe

Member
Joined
Dec 24, 2010
Messages
881
Solutions
2
Reaction score
22
well i have some, powerful spells on my 8.6 server, but players abuse them because exhaustion, i need like a cooldown system using storages perhaps, which each of these spells can be used each 5 minutes... thats all!


also something like the spirit of wisdom of tibia rl. if u use this item you will get lets say: 5000exp * "your current level" in experience

thats all:) ty
 
I think you can use following :

Lua:
	exhaustion.check(cid, storage)
	exhaustion.get(cid, storage)
	exhaustion.set(cid, storage, time)
	exhaustion.make(cid, storage, time)
 
Try this example, that's ultimate healing spell with cooldown:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12)

function onCastSpell(cid, var)
	local storage = 36421
	local time = 300
	if(exhaustion.make(cid, storage, time) == true) then
		return doCombat(cid, combat, var)
	else
		doPlayerSendCancel(cid, "You cannot use it yet. Cooldown: "..exhaustion.get(cid, storage)+1)
		return false
	end
end
storage is a random number.
 
thanks man:),

how about the stone of wisdom: also something like the stone of wisdom of tibia rl. if u use this item you will get lets say: 5000exp * "your current level" in experience
 
Back
Top