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

On look item information doesnt appear on Server Log

SixNine

Active Member
Joined
Dec 12, 2018
Messages
442
Reaction score
40
So yea usually when you press look on your item it shows You see Knight Helmet (Arm:200...) and etc but for some reason it disappeared from my server and not sure why and what i did :D

TFS 1.2
 
So yea usually when you press look on your item it shows You see Knight Helmet (Arm:200...) and etc but for some reason it disappeared from my server and not sure why and what i did :D

TFS 1.2
Probably u changed events\scripts\player.lua.
Send the script to a take a look.
Have erros in console?
 
Probably u changed events\scripts\player.lua.
Send the script to a take a look.
Have erros in console?
No console is clean. Im not sure what i changed because it worked couple days ago and i haven't done anything in player.lua but i might be lying and i dont remember
Lua:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if thing:isPlayer() then
        local pronoun, posess = thing:getSex() == PLAYERSEX_MALE and 'His' or 'Her'
        if thing == self then
            pronoun = 'Your'
        end
 
        -- Rank Name
        local rankName = selectPlayerRankName(thing)
        if rankName ~= nil then
            description = description .. string.format(' %s rank is %s.', pronoun, rankName)
        end        
    end
   
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())
 
            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end
 
            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end
 
            local itemType = thing:getType()
 
            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end
 
            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end
 
        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )
 
        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
 
No console is clean. Im not sure what i changed because it worked couple days ago and i haven't done anything in player.lua but i might be lying and i dont remember
Lua:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if thing:isPlayer() then
        local pronoun, posess = thing:getSex() == PLAYERSEX_MALE and 'His' or 'Her'
        if thing == self then
            pronoun = 'Your'
        end

        -- Rank Name
        local rankName = selectPlayerRankName(thing)
        if rankName ~= nil then
            description = description .. string.format(' %s rank is %s.', pronoun, rankName)
        end       
    end
  
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())

            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end

            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end

            local itemType = thing:getType()

            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end

            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end

        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )

        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
Only happens with GOD? Or normal players too?
 
Add a line under line 16, inside the if statement: if self:getGroup():getAccess() then, and print to console to check if the script enters here.
Also, add a line on top of script (right below onLook) and print to console to check if the function gets called at all.

If it enters the function but not the if statement, maybe you have the wrong group id (if not, you have to backtrace further into the getAccess function)
 
Only happens with GOD? Or normal players too?
Happens with admin and normal player tested with both, first i though it was problem with admin but then i tested with normal player it was same
Add a line under line 16, inside the if statement: if self:getGroup():getAccess() then, and print to console to check if the script enters here.
Also, add a line on top of script (right below onLook) and print to console to check if the function gets called at all.

If it enters the function but not the if statement, maybe you have the wrong group id (if not, you have to backtrace further into the getAccess function)
it prints 2 and 1
36829
 
Replace your onLook with the default one, if it still doesn't execute you've either edited sources related to text messages or something client related.
Lua:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())

            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end

            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end

            local itemType = thing:getType()

            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end

            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:isPlayer() and thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end

        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )

        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
 
Last edited:
Replace your onLook with the default one, if it still doesn't execute you've either edited sources related to text messages or something client related.
Lua:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())

            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end

            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end

            local itemType = thing:getType()

            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end

            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:isPlayer() and thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end

        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )

        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
Same with default
Check what you have changed in your commit history.
I dont have commit history
 
We're not going to keep guessing for you, It's your server and you obviously did something that broke it. Trace your steps to see what could be causing the issue. Sort your files by date and see what you last changed between the last time it worked to the time it broke.
 
We're not going to keep guessing for you, It's your server and you obviously did something that broke it. Trace your steps to see what could be causing the issue. Sort your files by date and see what you last changed between the last time it worked to the time it broke.
So whats the point for you too comment "we're not going to keep guessing" just dont waste my time and your time.
And start using git or any other version-control tool.
Its too late now to use it again whats the point too say that? Its like you have broken leg and dude would say 'next time be more careful' like whats the point of saying that? Jesus christ guys is it new way to free post?
 
You only focused on the first two sentences of my post and disregarded the rest trying to help you find what you last changed, nice! Good luck bumping for weeks/months.
 
Back
Top