Hi dears.
Anyone know how i fix me problem?
I need,
If some player get X frags then receive some type of skull:
Green Skull - 50 kills,
White Skull - 100 kills,
Yellow Skull - 200 kills,
Red Skull - 400 kills,
Black Skull -500 kills.
I know I have to edit the source
i have remove this from player.cpp:
and remove this:
and add it in CREATURESCRIPTS :
But my problem is that:
When player get 1 frag he get green skull and then he dont receives more skull
Sorry my bad english
Anyone know how i fix me problem?
I need,
If some player get X frags then receive some type of skull:
Green Skull - 50 kills,
White Skull - 100 kills,
Yellow Skull - 200 kills,
Red Skull - 400 kills,
Black Skull -500 kills.
I know I have to edit the source
i have remove this from player.cpp:
Code:
if((player == this || (skull != SKULL_NONE && player->getSkull() < SKULL_RED)) && player->hasAttacked(this))
return SKULL_YELLOW;
and remove this:
Code:
if(skull == SKULL_NONE)
{
if(targetPlayer->getSkull() != SKULL_NONE)
targetPlayer->sendCreatureSkull(this);
else if(!hasCustomFlag(PlayerCustomFlag_NotGainSkull))
{
setSkull(SKULL_WHITE);
g_game.updateCreatureSkull(this);
}
}
Code:
local storage = 9000
function onKill(cid, target, lastHit)
if isPlayer(target) and cid ~= target then
local frags = math.max(0, getCreatureStorage(cid, storage)) + 1
setPlayerStorageValue(cid, storage, frags)
if frags >= 50 then
doCreatureSetSkullType(cid, SKULL_GREEN)
elseif frags >= 100 then
doCreatureSetSkullType(cid, SKULL_WHITE)
elseif frags >= 200 then
doCreatureSetSkullType(cid, SKULL_YELLOW)
elseif frags >= 400 then
doCreatureSetSkullType(cid, SKULL_RED)
elseif frags >= 500 then
doCreatureSetSkullType(cid, SKULL_BLACK)
end
end
return true
end
But my problem is that:
When player get 1 frag he get green skull and then he dont receives more skull
Sorry my bad english
Last edited: