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

TFS 1.0 - Exhuastion Login/Logout

Giddran

Techical Artist
Joined
Sep 8, 2007
Messages
70
Reaction score
25
Location
Sweden
Hey guys, i'm tinkering abit with some custom spells that have minute to hour cooldown, however when a character relogs the exhuastion reset.

Anyone got any suggestions on the best way to solve this? / Got any examples f.e storage based cooldown

Thanks in advance
 
Code:
if exhaustion.check(cid, storage) then
    doPlayerSendCancel(cid, "You are exhausted.")
    return true
end

exhaustion.set(cid, storage, time)

However you need to add this to your global.lua.
 
Thank you, working perfectly and precicely as i desired, cheers!

I did change true to false to remove the mana cost, made a poof effect and added the exhaust function in seperate lib to keep track. Hopefully i got it right.

Code:
if exhaustion.check(cid, 51100) then
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    doPlayerSendCancel(cid, "You are exhausted.")
    return false
end
 
Yes, this function is already added to 0.3/0.4 datapacks by default (data/lib/034-exhaustion.lua), so you don't need to add it.
 
Back
Top