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

[REQUEST] Assign party skull to groups

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,631
Reaction score
33
Location
United States
I'd like if GM+ had a certain color skull, either all the same one or each one different, doesn't matter.

If thats not possible, then how can I add a skull for a specific person? Thanks!
 
I create a table `skull` in groups, and use "onLogin(cid)" to set the skull but.. The gamemasters or higher cannot have skulls, it does not put on them, and to the players only it they lasts approximately 5 seconds :S

Anyways this is the script that i made

Code:
function onLogin(cid)

local result = db.getResult("SELECT `skull` FROM `groups` WHERE `id` = " .. getPlayerGroupId(cid) .. ";")
local getData = result:getDataInt('skull')
local skull = 0

	if getData == 0 then
		skull = SKULL_NONE
	elseif getData == 1 then
		skull = SKULL_YELLOW
	elseif getData == 2 then
		skull = SKULL_GREEN
	elseif getData == 3 then
		skull = SKULL_WHITE
	elseif getData == 4 then
		skull = SKULL_RED
	end


	doCreatureSetSkullType(cid, skull)
	result:free()
	return TRUE
end
 
It would be a great idea if someone made a function like this:
Code:
setPlayerSkullTime(cid, time)
or something :P
Or even better:
Code:
serPlayerSkull(cid, skulltype, time)
 
ok so, getCreatureSkullType uses Player::getSkull(), and you need to remove bold red from player.cpp:
Code:
Skulls_t Player::getSkull() const
{
[B][COLOR="Red"]	if(hasFlag(PlayerFlag_NotGainInFight) || hasCustomFlag(PlayerCustomFlag_NotGainSkull))
		return SKULL_NONE;
[/COLOR][/B]
	return skull;
}
Else it'll always return SKULL_NONE for GM's or higher and thus fail to set skull end for the correct skull type.
 
ok so, getCreatureSkullType uses Player::getSkull(), and you need to remove bold red from player.cpp:
Code:
Skulls_t Player::getSkull() const
{
[B][COLOR="Red"]	if(hasFlag(PlayerFlag_NotGainInFight) || hasCustomFlag(PlayerCustomFlag_NotGainSkull))
		return SKULL_NONE;
[/COLOR][/B]
	return skull;
}
Else it'll always return SKULL_NONE for GM's or higher and thus fail to set skull end for the correct skull type.

I can set my own skull using another character with /attr, database changing it still does not change it in-game. And the skull is re-set when I relog
 
Bump, heres a picture of me on a 7.6 server that has it;

2hp6dyf.jpg
 
Back
Top