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

tooltip OTC V8

Mateus Robeerto

Excellent OT User
Joined
Jun 5, 2016
Messages
1,337
Solutions
71
Reaction score
697
Location
ლ(ಠ益ಠლ)
Does anyone have this system available?
Note: I found this image in OT. I just took the image and put it here (not stolen), I just took the image.
upgrades.png

or here

I tried using the method here, but it only came up with the item id. It didn't show the name, attack, defense, etc. Can someone help me?

Lua:
local item = self:getItem()
    if item and not self:getTooltip() then
      local itemsList = {
          [10842] = {name = "Demon Helmet", attack = 20, defense = 0, protection_all = 20, reflect = 10, drop_chance = 20}
      }
      local data = itemsList[item:getId()]
      if data then
          local description = 'This is ' .. item:getCount() .. 'x ' .. data.name .. ', Raridade ' .. data.raridade
          if data.attack then
              description = description .. ' Attack: ' .. data.attack .. '.'
          end
          if data.defense then
              description = description .. ' Defense: ' .. data.defense .. '.'
          end
          self:setTooltip('Description: ' .. description)
      else
          print(item:getId())
          self:setTooltip('No description')
      end
    end
 
Purely theoretically, I'm also interested in something like this and I'm very curious how much it costs, can you write priv if you don't want to write publicly? I would like to add that I just want to get acquainted with the price and I don't want to buy anything right now, this question is for the future.

oen432

 
I know it's not free... so what's the price for the service?
Purely theoretically, I'm also interested in something like this and I'm very curious how much it costs, can you write priv if you don't want to write publicly? I would like to add that I just want to get acquainted with the price and I don't want to buy anything right now, this question is for the future.

oen432

I wonder if you guys ever heard about private messages or discord 🤔
 
I wonder if you guys ever heard about private messages or discord 🤔
The Office Thank You GIF
 
Does anyone have this system available?
Note: I found this image in OT. I just took the image and put it here (not stolen), I just took the image.
View attachment 77878

or here

I tried using the method here, but it only came up with the item id. It didn't show the name, attack, defense, etc. Can someone help me?

Lua:
local item = self:getItem()
    if item and not self:getTooltip() then
      local itemsList = {
          [10842] = {name = "Demon Helmet", attack = 20, defense = 0, protection_all = 20, reflect = 10, drop_chance = 20}
      }
      local data = itemsList[item:getId()]
      if data then
          local description = 'This is ' .. item:getCount() .. 'x ' .. data.name .. ', Raridade ' .. data.raridade
          if data.attack then
              description = description .. ' Attack: ' .. data.attack .. '.'
          end
          if data.defense then
              description = description .. ' Defense: ' .. data.defense .. '.'
          end
          self:setTooltip('Description: ' .. description)
      else
          print(item:getId())
          self:setTooltip('No description')
      end
    end


Your code is correct, you just need add more if data.protection_all then , description = description .. 'Protection All:' ..data.protection_all.. '.'
The same way for reflect, drop_chance, etc.

Then for people who doesnt know, create a folder inside of data, called items, paste items.xml and items.otbm.
On things, after load() function paste:
g_things.loadOtb ('/items/items.otb') g_things.loadXml('/items/items.xml')

It will show a description, by this way you need add manually each item.
 
Last edited:
Did you get it working?, i've been looking into making my own simple item-tooltip
 
Back
Top