• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Backpack cooldown

empasor123

Member
Joined
Jul 17, 2024
Messages
34
Reaction score
6
GitHub
empasor123
Hello!
Is there anyway i can still have 2sec cooldown on using pots/runes

And still equip eq / Throw out stuff on the ground etc?

(WHILE POTTING)

Using 1.4.2 TFS 10.98
 
Solution
X
Yeah, you could make the potions have their own cooldown system.

up at the top put
LUA:
local potionUsers = {}

local function resetPotionUsage(playerId)
    potionUsers[playerId] = nil
end
inside the function directly under onUse
LUA:
local playerId = player:getId()
if potionUsers[playerId] then
    -- put a cooldown message
    return false
end
and where the potion was used successfully put
LUA:
potionUsers[playerId] = true
addEvent(resetPotionUsage, 2000, playerId)
Yeah, you could make the potions have their own cooldown system.

up at the top put
LUA:
local potionUsers = {}

local function resetPotionUsage(playerId)
    potionUsers[playerId] = nil
end
inside the function directly under onUse
LUA:
local playerId = player:getId()
if potionUsers[playerId] then
    -- put a cooldown message
    return false
end
and where the potion was used successfully put
LUA:
potionUsers[playerId] = true
addEvent(resetPotionUsage, 2000, playerId)
 
Solution
Yeah, you could make the potions have their own cooldown system.

up at the top put
LUA:
local potionUsers = {}

local function resetPotionUsage(playerId)
    potionUsers[playerId] = nil
end
inside the function directly under onUse
LUA:
local playerId = player:getId()
if potionUsers[playerId] then
    -- put a cooldown message
    return false
end
and where the potion was used successfully put
LUA:
potionUsers[playerId] = true
addEvent(resetPotionUsage, 2000, playerId)
This dude is legend, How do i put solution on this?
 
Yeah, you could make the potions have their own cooldown system.

up at the top put
LUA:
local potionUsers = {}

local function resetPotionUsage(playerId)
    potionUsers[playerId] = nil
end
inside the function directly under onUse
LUA:
local playerId = player:getId()
if potionUsers[playerId] then
    -- put a cooldown message
    return false
end
and where the potion was used successfully put
LUA:
potionUsers[playerId] = true
addEvent(resetPotionUsage, 2000, playerId)
solution
 
Back
Top