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

Linux Error MOD / Skull System Linux

rodolfo

New Member
Joined
Jul 30, 2008
Messages
60
Reaction score
1
In Skull System/Mod error:

[Error - CreatureScript Interface]
[12:33:45.854] In a timer event called from:
[12:33:45.855] domodlib('SkullC_func')
[12:33:45.855] function onKill(cid, target)
[12:33:45.855] if isPlayer(cid) and isPlayer(target) then
[12:33:45.855] doCreatureSetSkullType(target, 0)
[12:33:45.855] addEvent(setSkullColor, 100, cid)
[12:33:45.855] end
[12:33:45.855] return true
[12:33:45.855] end:eek:nKill
[12:33:45.855] Description:
[12:33:45.855] (internalGetPlayerInfo) Player not found when requesting player info #18

help me? Thanks
 
At the top of setSkullColor, I dont know where or what it is. My answer is based on the error you provided. Find function setSkullColor(cid) and add at the top of it - if(not(isPlayer(cid))then return false end
 
its my script skull system

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)
local t = {
[{50,149}] = 1,
[{150,299}] = 2,
[{300,499}] = 3,
[{500,799}] = 4,
[{800,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>

- - - Updated - - -

What do I add the code at the top that you showed me?
 
Code:
local t = {
	[{50,149}] = 1,
	[{150,299}] = 2,
	[{300,499}] = 3,
	[{500,799}] = 4,
	[{800,math.huge}] = 5
}

function setSkullColor(cid)
	if(not(isPlayer(cid))then return false end

	for var, ret in pairs(t) do
		if getPlayerFrags(cid) >= var[1] and getPlayerFrags(cid) <= var[2] then
			doCreatureSetSkullType(cid, ret)
		end
	end

	return true
end
 
Back
Top