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

Solved Skull!

Ethrex

Member
Joined
Jul 6, 2012
Messages
314
Reaction score
18
Location
Sweden
Hello, Im using TFS 0.3.6pl1, 8.54.
Ubuntu 10.04 LTS, Gesior 2012 1.0.1, apache2.

The problem is, when i Log out with a char the char gets skull 4 in the database. :/

EDIT: Just enabled black skull and it got solved!, Thanks!, lol.
 
Last edited:
I got on my PC 0.3.6pl1 and in it's sources is...

Code that saves players [when logout] - file iologindata.cpp:
(+my comments)
[CPP] if(g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED) // if world is not pvp-enfo [no skulls on e-pvp servers]
{
Skulls_t skull = SKULL_RED;
if(g_config.getBool(ConfigManager::USE_BLACK_SKULL)) // this check value of 'useBlackSkull' in config.lua
skull = player->getSkull(); // this set to REAL skull [not red skull?] ONLY if you got 'useBlackSkull' = 'true' in config.lua

query << "`skull` = " << skull << ", "; // this set values in database
query << "`skulltime` = " << player->getSkullEnd() << ", ";
}[/CPP]
somewhere else:
[CPP]SKULL_RED = 4[/CPP]

so if your server type is not pvp-enforced AND you got black skull disabled in config.lua:
LUA:
useBlackSkull = false
(change to true to make it save real skull [none, red or black])
it saves in database that everyone got red skull (skull id = 4)
so make it in config.lua:
LUA:
useBlackSkull = true
or pay someone who will edit your sources to make red skull work fine and remove black skull
 
I got on my PC 0.3.6pl1 and in it's sources is...

Code that saves players [when logout] - file iologindata.cpp:
(+my comments)
[CPP] if(g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED) // if world is not pvp-enfo [no skulls on e-pvp servers]
{
Skulls_t skull = SKULL_RED;
if(g_config.getBool(ConfigManager::USE_BLACK_SKULL)) // this check value of 'useBlackSkull' in config.lua
skull = player->getSkull(); // this set to REAL skull [not red skull?] ONLY if you got 'useBlackSkull' = 'true' in config.lua

query << "`skull` = " << skull << ", "; // this set values in database
query << "`skulltime` = " << player->getSkullEnd() << ", ";
}[/CPP]
somewhere else:
[CPP]SKULL_RED = 4[/CPP]

so if your server type is not pvp-enforced AND you got black skull disabled in config.lua:
LUA:
useBlackSkull = false
(change to true to make it save real skull [none, red or black])
it saves in database that everyone got red skull (skull id = 4)

So the problem is the blackskull thing in config.lua? lol?

EDIT: Just enabled black skull and it got solved!, Thanks!, lol.
 
Last edited:
My quick fix. Not tested.
CPP code that I posted (from iologindata.cpp) replace with (that are lines 786-984):
[CPP] if(g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
{
Skulls_t skull = SKULL_NONE;
if(g_config.getBool(ConfigManager::USE_BLACK_SKULL) || player->getSkull() == SKULL_RED)
skull = SKULL_RED;

query << "`skull` = " << skull << ", ";
query << "`skulltime` = " << player->getSkullEnd() << ", ";
}[/CPP]
Compile and it should save none skull or red when black skulls are disabled.
 
My quick fix. Not tested.
CPP code that I posted (from iologindata.cpp) replace with (that are lines 786-984):
[CPP] if(g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
{
Skulls_t skull = SKULL_NONE;
if(g_config.getBool(ConfigManager::USE_BLACK_SKULL) || player->getSkull() == SKULL_RED)
skull = SKULL_RED;

query << "`skull` = " << skull << ", ";
query << "`skulltime` = " << player->getSkullEnd() << ", ";
}[/CPP]
Compile and it should save none skull or red when black skulls are disabled.

The less i touch sources the better right?, so just enabling black skull solved it :)
 
Back
Top