Ir para conteúdo

Featured Replies

  • Respostas 20
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Essas são as modificações que você ira precisar, basta alterar sua source, config.lua, creaturescript. Oque as alterações fazem, Black Skull pode soltar magia, ele não leva mais dano por estar Black

  • Esse sistema só funciona corretamente com alterações na source.

  • posta a tag da magia ai, das duas de preferencia da que funciona e da que nao funciona.

Postado
  • Autor
Agora, Ackerzin disse:

Sucesso!

@Ackerzinnem tanto, rsrsrsrsr.. Agora não pega nenhuma skull

 

Eu to usando o seguinte script em mods para o Skull System:

 

Citar

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Skull System" version="1.0" author="Skyforever" contact="tibiaking.com" enabled="yes">

<config name="SkullC_func"><![CDATA[

function setSkullColor(cid)

local t = {

[{1,2}] = 1,

[{3,4}] = 2,

[{5,6}] = 3,

[{7,8}] = 4,

[{9,math.huge}] = 5

}

for var, ret in pairs(t) do

if getPlayerFrags(cid) >= var[1] and getPlayerFrags(cid) <= var[2] then

doCreatureSetSkullType(cid, ret)

end

end

end

function getPlayerFrags(cid)

local time = os.time()

local times = {today = (time - 86400), week = (time - (7 * 86400))}

local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")

if(result:getID() ~= -1) then

repeat

local content = {date = result:getDataInt("date")}

if(content.date > times.today) then

table.insert(contents.day, content)

elseif(content.date > times.week) then

table.insert(contents.week, content)

else

table.insert(contents.month, content)

end

until not result:next()

result:free()

end

local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)}

return size.day + size.week + size.month

end

]]></config>

<event type="login" name="SkullLogin" event="script"><![CDATA[

domodlib('SkullC_func')

function onLogin(cid)

registerCreatureEvent(cid, "ColorKill")

setSkullColor(cid)

return true

end]]></event>

<event type="kill" name="ColorKill" event="script"><![CDATA[

domodlib('SkullC_func')

function onKill(cid, target)

if isPlayer(cid) and isPlayer(target) then

doCreatureSetSkullType(target, 0)

addEvent(setSkullColor, 100, cid)

end

return true

end]]></event>

</mod>
 

 

Postado

OBS = volta para "open" o modo de pvp.

 

player.ccp

Spoiler

player.ccp

trocar isso
void Player::onEndCondition(ConditionType_t type)
{
	Creature::onEndCondition(type);
	if(type == CONDITION_INFIGHT)
	{
		onIdleStatus();
		clearAttacked();

		pzLocked = false;
		if(skull < SKULL_RED)
			setSkull(SKULL_NONE);

		g_game.updateCreatureSkull(this);
	}

	sendIcons();
}

por isso
void Player::onEndCondition(ConditionType_t type)
{
	Creature::onEndCondition(type);
	if(type == CONDITION_INFIGHT)
	{
		onIdleStatus();
		clearAttacked();

		pzLocked = false;

		g_game.updateCreatureSkull(this);
	}

	sendIcons();
}

em
void Player::dropLoot(Container* corpse)

alterar
if(skull > SKULL_WHITE || (item->getContainer() && tmp < loss) || (!item->getContainer() && tmp < itemLoss))

para
if(skull > SKULL_BLACK || (item->getContainer() && tmp < loss) || (!item->getContainer() && tmp < itemLoss))

em
void Player::onTarget(Creature* target)

alterar
if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE)
				{
					setSkull(SKULL_WHITE);
					g_game.updateCreatureSkull(this);
				}

para
if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE)
				{
					setSkull(SKULL_NONE);
					g_game.updateCreatureSkull(this);
				}

 

 

Editado por Ackerzin (veja o histórico de edições)

       112674.gif

 

 

 

Postado
  • Autor
16 horas atrás, Ackerzin disse:

OBS = volta para "open" o modo de pvp.

 

player.ccp

  Mostrar conteúdo oculto


player.ccp

trocar isso
void Player::onEndCondition(ConditionType_t type)
{
	Creature::onEndCondition(type);
	if(type == CONDITION_INFIGHT)
	{
		onIdleStatus();
		clearAttacked();

		pzLocked = false;
		if(skull < SKULL_RED)
			setSkull(SKULL_NONE);

		g_game.updateCreatureSkull(this);
	}

	sendIcons();
}

por isso
void Player::onEndCondition(ConditionType_t type)
{
	Creature::onEndCondition(type);
	if(type == CONDITION_INFIGHT)
	{
		onIdleStatus();
		clearAttacked();

		pzLocked = false;

		g_game.updateCreatureSkull(this);
	}

	sendIcons();
}

em
void Player::dropLoot(Container* corpse)

alterar
if(skull > SKULL_WHITE || (item->getContainer() && tmp < loss) || (!item->getContainer() && tmp < itemLoss))

para
if(skull > SKULL_BLACK || (item->getContainer() && tmp < loss) || (!item->getContainer() && tmp < itemLoss))

em
void Player::onTarget(Creature* target)

alterar
if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE)
				{
					setSkull(SKULL_WHITE);
					g_game.updateCreatureSkull(this);
				}

para
if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE)
				{
					setSkull(SKULL_NONE);
					g_game.updateCreatureSkull(this);
				}

 

 

@Ackerzin deu certo <3  ..  REP ++++++++

 

Editado por Mecianosz (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo