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

TFS 1.X+ How does the skull system work?

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,474
Solutions
17
Reaction score
194
Location
Sweden
I'm having this odd thing in my config.lua
When timeToDecreaseFrags is set to 24*60*60*1000 the frags is set to normal, however the time to decrease one frag is 23985 hours.
When i lower the timeToDecreaseFrags, the time is lowered but then it higher the frags for the players, so if you had one frags and i set the removal time to 60 * 1000, suddenly the player has 42343~ frags.

Would someone like to explain this without me having to go through the sources?
 
I'm having this odd thing in my config.lua
When timeToDecreaseFrags is set to 24*60*60*1000 the frags is set to normal, however the time to decrease one frag is 23985 hours.
When i lower the timeToDecreaseFrags, the time is lowered but then it higher the frags for the players, so if you had one frags and i set the removal time to 60 * 1000, suddenly the player has 42343~ frags.

Would someone like to explain this without me having to go through the sources?
Because this is a pending minor issue, the time it represents should be in seconds, not ms.
You basically gave yourself shitload of frags - clear your skulltime, change timeToDecreaseFrags to 24*60*60 and test again.

You can see the code responsible for that here.
 
Because this is a pending minor issue, the time it represents should be in seconds, not ms.
You basically gave yourself shitload of frags - clear your skulltime, change timeToDecreaseFrags to 24*60*60 and test again.

You can see the code responsible for that here.
Yeah i did change timeDecreaseFrags to 24*60*60 but then everyone got about 56746~ frags. What do you mean by clearing skulltime? What is the variable?
 
Yeah i did change timeDecreaseFrags to 24*60*60 but then everyone got about 56746~ frags. What do you mean by clearing skulltime? What is the variable?
call setSkullTime(0) on desired player object
just add a Lua file containing this code in your data\scripts\talkactions and name it anyhow you like.
LUA:
local talk = TalkAction("/setMySkullTimeToZero")
function talk.onSay(player)
    player:setSkullTime(0)
end
talk:register()
 
Last edited:
call setSkulltime(0) on desired player object
like that, just add a Lua file containing this code in your data/scripts and name it anyhow you like.
LUA:
local talk = TalkAction("/setMySkullTimeToZero")
function talk.onSay(player)
    player:setSkullTime(0)
end
talk:register()
Oh okay then i understand what you meant, then i can just run it once in a loop in globalevents. Thanks! Much appreciation!
 
Oh okay then i understand what you meant, then i can just run it once in a loop in globalevents. Thanks! Much appreciation!
Most fitting place would be data\scripts\talkactions, but if it's just for debugging you should be fine with just player:setSkullTime(0) anywhere you have access to the player object.

or you could just set skulltime table value to zero
Then you have to relog and stuff, more additional steps - why alter the database when it's the state that matters?
 
Last edited:
Back
Top