I am doing war server, I have fix skulls system exactly as
and I removed some other black skull restrictions, everything is working properly but I don't know how to remove green_skull in party or guild-war
and also green/white/yellow skulls are disappearing as soon as PZ/battle gone then when I relog/kill a player they appear back due to onkill/login script.
Can someone help me removing green skull in party/guild-war and keep green/white/yellow skulls when PZ/battle time is finished?
Feature - Every changes you need to a Hardcore/War Server
First of all, i DIDN'T made this features, most part of then I get in requests. If you did one or more of this features PM me and I will add your credits. These features are working without problem in dev0.4 rev3884. I get uptime of 300+ hours with 150+ players online all time(unfortunately not...
otland.net
and I removed some other black skull restrictions, everything is working properly but I don't know how to remove green_skull in party or guild-war
and also green/white/yellow skulls are disappearing as soon as PZ/battle gone then when I relog/kill a player they appear back due to onkill/login script.
Can someone help me removing green skull in party/guild-war and keep green/white/yellow skulls when PZ/battle time is finished?
XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Skull System" version="1.0" author="Skyforever" contact="" enabled="yes">
<config name="SkullC_func"><![CDATA[
function setSkullColor(cid)
if not isPlayer(cid) then
return
end
local t = {
[{50,100}] = SKULL_YELLOW,
[{100,200}] = SKULL_GREEN,
[{200,400}] = SKULL_WHITE,
[{400,800}] = SKULL_RED,
[{800,math.huge}] = SKULL_BLACK
}
local frags = getPlayerFrags(getPlayerGUID(cid))
for var, ret in pairs(t) do
if frags >= var[1] and frags <= var[2] then
doCreatureSetSkullType(cid, ret)
end
end
end
function getPlayerFrags(guid)
local result = db.getResult("SELECT COUNT(*) as count 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` = " .. guid)
if(result:getID() ~= -1) then
local count = result:getDataInt("count")
result:free()
return count
end
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>
Last edited: