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

Fix a cooldown script

andii95

New Member
Joined
Aug 21, 2009
Messages
413
Reaction score
2
Location
Sweden
Got a script and the cooldown doesnt work

Code:
                                                                if exhaustion.check(cid, 23000) == true then 
                                                                exhaustion.set(cid, 23000, 100) 
                                        return doCombat(parameters.cid, parameters.combat, parameters.var) 
                                                                else 
                                                                        return doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23000).."]") 
                                                                end 
                        end 
                end 
        else 
                return doPlayerSendCancel(cid, "Sosrry. You must have an pokemon to cast.") 
        end 
return true 
end

Can anyone repair it fast to me? Its just a piece of the script, i dont think more from the script is nessecary
 
not ur bug but

Code:
return doPlayerSendCancel(cid, "Sosrry. You must have an pokemon to cast.")

should be "Sorry" ;D
 
LUA:
if getPlayerStorageValue(cid, 23000) > os.time() then
	return doPlayerSendCancel(cid, "Cooldown["..(getPlayerStorageValue(cid, 23000)-os.time()).."]")  
else 
	doPlayerSetStorageValue(cid, 23000, os.time()+100)  -- 100 is exhaustion
	return doCombat(parameters.cid, parameters.combat, parameters.var) 
end
 
This part:
LUA:
if exhaustion.check(cid, 23000) == true then 
	exhaustion.set(cid, 23000, 100) 
	return doCombat(parameters.cid, parameters.combat, parameters.var) 
else 
	return doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23000).."]") 
end
 
Maybe you could tell what doesnt work instead of 'doesn't work'
You are always exhausted? You can use it all time? Whole spell doesn't work?

Post your current script.
 
Last edited:
It doesnt have any cooldown, everything else works. But i added exhuast time in spells.xml. But it would still be better if the cooldown would work cuz that counts down the time untill you can use it again.
 
Back
Top