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

help issue regarding skulls in my war server

CipsoftStinks

www.relicaria.com
Joined
Oct 1, 2016
Messages
946
Solutions
3
Reaction score
138
Location
Argentina
Hello otland
i followed this to make my otserver to a war otserver
Feature - Every changes you need to a Hardcore/War Server

im using this mods of skulls per certain ammount of players killeds , white , yellow , green , red , black skull mod

LUA:
<?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)
  if not isPlayer(cid) then
      return
  end
  local t = {
      [{1,2}] = SKULL_WHITE,
      [{3,4}] = SKULL_YELLOW,
      [{5,6}] = SKULL_GREEN,
      [{7,math.huge}] = SKULL_RED
  }
  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>

i need to make that player lose their skull when die
but keep the skull if he just log out

any idea ?

help me pls

bump

bump!
 
Last edited by a moderator:
Back
Top