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

Player doesn't get skull when killing someone.

filipus

Member
Joined
Dec 31, 2010
Messages
229
Reaction score
12
So, i have set my redskull to be = 1 frag.
But what is happening is that when the users that is getting attacked (with no skull) defends himself (attacks the PK), if the PK kills him he doesn't get a redskull, only a white.
If the person getting attacked doesn't defend himself the PK gets a redskull.

I couldn't find anything that modified skulls on my files, does anyone know how to solve this?
Thanks, :D
 
I'll write you some logic that should work as a "red skull" prototype if you'll verify a couple of things for me, and find a code fragment I can copy/modify:

1. Have you verified that script "fraglook" is running ok? That implies that there's a database table available to "remember" frag status between server restarts

2. Is the server set up to save "Storages" to a database? I've never looked at this, but I have this in my config.lua which suggests it's available as a standard TFS capability:
Code:
-- Server save
-- NOTE: serverSaveHour is the hour of the day when the server save will occur,
-- if you would rather save the server with intervals, disable server save and
-- use autoSaveEachMinutes.
serverSaveEnabled = "no"
serverSaveHour = 10
shutdownAtServerSave = "yes"
cleanMapAtServerSave = "yes"
autoSaveEachMinutes = 0
saveGlobalStorage = "no"
If setting the last parameter to "yes" saves all the storages automatically, there will be no need to hijack fraglook.lua's database table :)

3. Find me a script that uses values from config.lua. I though I had one but I seem to have lost it :(
This is necessary so our script reacts correctly to the "red skull" parameters you already have


PS:
I looked at the "skull" API for this thread:
http://otland.net/threads/you-get-white-skull-when-walking-in-your-own-fire-bomb.212620/found
It looks simple enough, and the code can be called via interfaces I know are available: onKill() or onDeath() both have the necessary references. The only interesting parts will be persistence across login/logout and server restarts (hence (1) and (2)) above and reading the config parameters (hence (3)).
 
Last edited:
I'll write you some logic that should work as a "red skull" prototype if you'll verify a couple of things for me, and find a code fragment I can copy/modify:

1. Have you verified that script "fraglook" is running ok? That implies that there's a database table available to "remember" frag status between server restarts

2. Is the server set up to save "Storages" to a database? I've never looked at this, but I have this in my config.lua which suggests it's available as a standard TFS capability:
Code:
-- Server save
-- NOTE: serverSaveHour is the hour of the day when the server save will occur,
-- if you would rather save the server with intervals, disable server save and
-- use autoSaveEachMinutes.
serverSaveEnabled = "no"
serverSaveHour = 10
shutdownAtServerSave = "yes"
cleanMapAtServerSave = "yes"
autoSaveEachMinutes = 0
saveGlobalStorage = "no"
If setting the last parameter to "yes" saves all the storages automatically, there will be no need to hijack fraglook.lua's database table :)

3. Find me a script that uses values from config.lua. I though I had one but I seem to have lost it :(
This is necessary so our script reacts correctly to the "red skull" parameters you already have


PS:
I looked at the "skull" API for this thread:
http://otland.net/threads/you-get-white-skull-when-walking-in-your-own-fire-bomb.212620/found
It looks simple enough, and the code can be called via interfaces I know are available: onKill() or onDeath() both have the necessary references. The only interesting parts will be persistence across login/logout and server restarts (hence (1) and (2)) above and reading the config parameters (hence (3)).


1- Yea, it is running ok. However, I do not use it.

2- Yes it is, I have a table that is only storage values. I have i enabled

3-
Code:
loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

That is how you get things from config.
 
Back
Top