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

[OTClient]colored items prefix name, attributes etc

legadoss

New Member
Joined
Jun 1, 2014
Messages
142
Reaction score
4
hey, how i can achieve someting like this:
Screen_Shot_10-10-17_at_12.59_PM.png

like [upgraded] Fire sword
upgraded with golden color
and next question is attributes like this:
Screen_Shot_10-10-17_at_01.04_PM.png
 
There's no published mod on this and it's not easy to do.
However if you still thinking of it, there's a tooltip in OTC.
It appears after hover mouse on element.

#Down:
Just as I said, it's not easy to do.
C++, Lua, Client, Server
 
Last edited:
There's no published mod on this and it's not easy to do.
However if you still thinking of it, there's a tooltip in OTC.
It appears after hover mouse on element.
just lua code or c++ too?

and one more question. if i want add one more slot to my inventory
i need something
edit on items editor etc?
or just client side and serverside
 
Last edited:
This can be achieved on client side with Lua only, but server side you'd need C++ or else it would be a big, messy hack.
4drik pointed the tooltip thing, that's the right way but it's difficult to work with.
You need something like:
Lua:
function onItemHoverChange(itemWidget, hovered)
  if hovered == true then
    itemWidget:getTooltip().display()
  else
    itemWidget.tooltip.hide()
  end
end

Somewhere in your scripts, and a tooltip on your otui file.
After that, you need to work out a way to not have to ask the server all the item details when you hover an item, or else the server will be bombarded with requests because players are simply moving their mouses around.
 
This can be achieved on client side with Lua only, but server side you'd need C++ or else it would be a big, messy hack.
4drik pointed the tooltip thing, that's the right way but it's difficult to work with.
You need something like:
Lua:
function onItemHoverChange(itemWidget, hovered)
  if hovered == true then
    itemWidget:getTooltip().display()
  else
    itemWidget.tooltip.hide()
  end
end

Somewhere in your scripts, and a tooltip on your otui file.
After that, you need to work out a way to not have to ask the server all the item details when you hover an item, or else the server will be bombarded with requests because players are simply moving their mouses around.

can you tell me how i can colored like Armor: 15 on red and Def:5 on color yellow?
 
Back
Top