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

OTClient How to enable Tooltip properly with Otclient and TFS 1.5 7.72

Joined
Feb 11, 2023
Messages
38
Solutions
1
Reaction score
14
Location
Brazil, SP
Hi, I'm implementing a tooltip in my small project, and I strictly followed the implementation done by our friend Matheus. However, the features are related to OtcV8. Is there any advice you can give me where I'm failing to get it to work in OtcClient Redemption? I've already added setFrames and tested with modified code, and the frame appears correctly. However, the code is activated by the tooltip, and when I use it in OtClient, it gives an error!

Commit: Added tooltips for inventory items to display rarity frames · Mateuzkl/TFS-1.5-772@ea04b98 (https://github.com/Mateuzkl/TFS-1.5-772/commit/ea04b98e3430e4ffa54c5bb2e5dd1bd45d722bd6)


LUA:
local function setFrames()
    for _, container in pairs(g_game.getContainers()) do
        local window = container.itemsPanel
        for i, child in pairs(window:getChildren()) do
            local id = child:getItemId()
            local price = 0
            local name = child:getTooltip() <--------------
           
            child:setImageSource("/images/ui/item")
            if (name) then
                if (string.find(name, "legendary")) then
                    child:setImageSource('/images/ui/rarity_gold')
                elseif (string.find(name, "epic")) then
                    child:setImageSource('/images/ui/rarity_purple')
                elseif (string.find(name, "rare")) then
                    child:setImageSource('/images/ui/rarity_blue')
                elseif (string.find(name, "a")) then
                    child:setImageSource('/images/ui/rarity_white')
                end
            end
        end
    end
end

Thanks so far, my friends!
 
Solution
OTC redemption uses CipSoft behavior, specifically the rarity feature was introduced starting from version 12.00.
This information is obtained from the assets.
But you are using version 7.72...

A very quick solution is to enable
Code:
g_game.enableFeature(GameColorizedLootValue)
in 7.72 (game_features),
and populate this array:
otclient/src/client/thingtype.h at main · mehah/otclient (https://github.com/mehah/otclient/blob/main/src/client/thingtype.h#L354-L358)

{ClientId, Price} (could you create a code in python to automate it in a print)

remembers price color :
1752968962080.webp

A slower solution would be to make a modification to handle it via OTML, for example in data/things/772/prices.otml,but that would...
So, you want rarities and frames to work with the OTC MEHAH version, right?


If that's the case, you'll need to follow this specific tutorial for your server:
mehah tooltips ·
(mehah tooltsips · kokekanon/TFS-1.4.2-Compatible-Aura-Effect-Wings-Shader-MEHAH@7764f37 (https://github.com/kokekanon/TFS-1.4.2-Compatible-Aura-Effect-Wings-Shader-MEHAH/commit/7764f3703ffba18c6a21a14bce08ea2ac15b4bee))
Note: This is strictly for MEHAH.


Yes, you can implement a check like isMehah to conditionally send rarity/frame data to the MEHAH client. This will allow the client to display rarities properly without affecting other distributions.


As for OTCv8 features, they are designed to work only with OTCv8, including the commit you were using earlier.
If you're using MEHAH, make sure to use features created specifically for MEHAH, since the internal structures between OTCv8 and MEHAH are completely different and incompatible.
 
Last edited:
OTC redemption uses CipSoft behavior, specifically the rarity feature was introduced starting from version 12.00.
This information is obtained from the assets.
But you are using version 7.72...

A very quick solution is to enable
Code:
g_game.enableFeature(GameColorizedLootValue)
in 7.72 (game_features),
and populate this array:
otclient/src/client/thingtype.h at main · mehah/otclient (https://github.com/mehah/otclient/blob/main/src/client/thingtype.h#L354-L358)

{ClientId, Price} (could you create a code in python to automate it in a print)

remembers price color :
1752968962080.webp

A slower solution would be to make a modification to handle it via OTML, for example in data/things/772/prices.otml,but that would require changes in the C++ code.

Regarding tooltips, I recommend not using Kondra’s system; instead, prefer using Oen’s leak module :rolleyes:.
 
Solution
OTC redemption uses CipSoft behavior, specifically the rarity feature was introduced starting from version 12.00.
This information is obtained from the assets.
But you are using version 7.72...

A very quick solution is to enable
Code:
g_game.enableFeature(GameColorizedLootValue)
in 7.72 (game_features),
and populate this array:
otclient/src/client/thingtype.h at main · mehah/otclient (https://github.com/mehah/otclient/blob/main/src/client/thingtype.h#L354-L358)

{ClientId, Price} (could you create a code in python to automate it in a print)

remembers price color :
View attachment 93803

A slower solution would be to make a modification to handle it via OTML, for example in data/things/772/prices.otml,but that would require changes in the C++ code.

Regarding tooltips, I recommend not using Kondra’s system; instead, prefer using Oen’s leak module :rolleyes:.


Look, it was really challenging! For a while I played around a lot with otcv8, but otc meah attracts a lot in terms of features, but the way it implements features in it is very obscure, like this tooltip, vascular deposit, etc. I found the Oen mod on an open forum, and I'll leave the link for future people who might use it.

Link: Modulo - [Module] TFS Otclient Item Tooltips (https://opengamescommunity.com/index.php?resources/module-tfs-otclient-item-tooltips.922/)

1753014960518.webp

By the way, Matheus, you've already solved the rarity issue. Just tweak a few things and it'll be fixed. It works perfectly with TFS 1.5 7.72... Very happy!
Post automatically merged:

So, you want rarities and frames to work with the OTC MEHAH version, right?


If that's the case, you'll need to follow this specific tutorial for your server:
mehah tooltips ·
(mehah tooltsips · kokekanon/TFS-1.4.2-Compatible-Aura-Effect-Wings-Shader-MEHAH@7764f37 (https://github.com/kokekanon/TFS-1.4.2-Compatible-Aura-Effect-Wings-Shader-MEHAH/commit/7764f3703ffba18c6a21a14bce08ea2ac15b4bee))
Note: This is strictly for MEHAH.


Yes, you can implement a check like isMehah to conditionally send rarity/frame data to the MEHAH client. This will allow the client to display rarities properly without affecting other distributions.


As for OTCv8 features, they are designed to work only with OTCv8, including the commit you were using earlier.
If you're using MEHAH, make sure to use features created specifically for MEHAH, since the internal structures between OTCv8 and MEHAH are completely different and incompatible.

I tested this commit intensively, made adjustments, modified the logic, nothing made the tooltip work, but thanks for the help man, it helped me a lot on github showing me the way, happy ending heheeh
 
Back
Top