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

color+itens

Mateus Robeerto

Veteran OT User
Joined
Jun 5, 2016
Messages
971
Solutions
42
Reaction score
374
I would like to clear some doubts. I noticed that in Sarah's post, she mentioned something interesting about that color item that was inside the backpack, indicated by a blue frame, the "Demon Helmet". I'm not sure if this only applies to backpacks or if it's possible for item slots as well. Is it possible to add colors to these items?


For example, if I want to create a forge system, whether in a modal window or not, where the common "Demon Helmet" has no color, but when refining to +1 Tier it turns gray, +2 Tier blue , +3 Tier with red color and +4 Tier with yellow color, indicating that it has become legendary...

Is it possible to implement these features? I'm using TFS 1.4.2 and I've already made some updates through the commits that Evil Punker posted. Can I find these functions? I just want to clarify this. Thanks!

 
Last edited:
Of course it is possible if you use OTCv8 for example in the bot module it has a section in the analyzer where it places the rarity frame for the items based on their name and price, and if you experiment with the function and make your own module you can see It is not very difficult to achieve what you want.




With patience you could achieve things like the ones I achieved on my server. And that also exists in many others.
1693573240197.png

1693573170352.png
 
Of course it is possible if you use OTCv8 for example in the bot module it has a section in the analyzer where it places the rarity frame for the items based on their name and price, and if you experiment with the function and make your own module you can see It is not very difficult to achieve what you want.




With patience you could achieve things like the ones I achieved on my server. And that also exists in many others.
View attachment 78090

View attachment 78089

Wow, what you've done is really amazing! It was very beautiful... I loved it. Thanks for sharing the link. I'll try calmly and patiently... Thank you very much!
 
I would like to clear some doubts. I noticed that in Sarah's post, she mentioned something interesting about that color item that was inside the backpack, indicated by a blue frame, the "Demon Helmet". I'm not sure if this only applies to backpacks or if it's possible for item slots as well. Is it possible to add colors to these items?


For example, if I want to create a forge system, whether in a modal window or not, where the common "Demon Helmet" has no color, but when refining to +1 Tier it turns gray, +2 Tier blue , +3 Tier with red color and +4 Tier with yellow color, indicating that it has become legendary...

Is it possible to implement these features? I'm using TFS 1.4.2 and I've already made some updates through the commits that Evil Punker posted. Can I find these functions? I just want to clarify this. Thanks!


Take a look on this guy project: Darkrest.Online - Nostalgia Redefined - Discussion Thread (https://otland.net/threads/darkrest-online-nostalgia-redefined-discussion-thread.285667/#post-2729207)
68777-9ea79497f375dd12468644a8a7e60c98.data
 
Of course it is possible if you use OTCv8 for example in the bot module it has a section in the analyzer where it places the rarity frame for the items based on their name and price, and if you experiment with the function and make your own module you can see It is not very difficult to achieve what you want.




With patience you could achieve things like the ones I achieved on my server. And that also exists in many others.
View attachment 78090

View attachment 78089
Would it be possible to apply this rarity system for the same price in the bot, directly in the inventory module, or would it be necessary to create another module?

I'm new to the subject, I don't know anything about otcv8, but I wanted to add colored items to this system by rarity, id, name, or something that makes it easier, how do you recommend I start?
 
Would it be possible to apply this rarity system for the same price in the bot, directly in the inventory module, or would it be necessary to create another module?

I'm new to the subject, I don't know anything about otcv8, but I wanted to add colored items to this system by rarity, id, name, or something that makes it easier, how do you recommend I start?

When I mentioned the function of the bot module it is so that you can have a clear example of how it works, it is best to use your own module, from scratch with the precise functions to obtain the "thing" of the item in question, in this case, can be the tooltip information which, once obtained, you can create variables to generate things in question, such as your own tooltip or, failing that, the desired colorful box according to its rarity, which can be obtained through the attributes of the item.

The specific function through the client is:

item:getCustomAttribute()







Of course, your server base must also have the CustomAttributes() added. or failing that you can use any other get function.
 
When I mentioned the function of the bot module it is so that you can have a clear example of how it works, it is best to use your own module, from scratch with the precise functions to obtain the "thing" of the item in question, in this case, can be the tooltip information which, once obtained, you can create variables to generate things in question, such as your own tooltip or, failing that, the desired colorful box according to its rarity, which can be obtained through the attributes of the item.

The specific function through the client is:

item:getCustomAttribute()







Of course, your server base must also have the CustomAttributes() added. or failing that you can use any other get function.
but I have a complete module that I received from a guy a few days ago. Will it be necessary to make changes to the font to use it? So, will I need to create a script to send and recognize the opcode on the otclient side?
 
but I have a complete module that I received from a guy a few days ago. Will it be necessary to make changes to the font to use it? So, will I need to create a script to send and recognize the opcode on the otclient side?

I'm not at all good with modules, much less opcodes. In fact, on my part everything is very rudimentary, I use a list of items used as a library in the client. I did not send information from the server at any time other than for the rarity of the items. But I get the information table directly from a file.

At least I could "have" this to test locally. It could further expand its functionalities, even give the information window an attractive appearance. But since I'm not usually one of those who likes to pay for something that is obtained with the same information from the server/client. That's why I don't have a way to fully explain it. In fact, part of what I have is information that I was able to deduce thanks to the fact that I bought some modules from Oen in the past, which did not have directly to do with the topic of the colorful rarity box, much less the Tooltip. But it did help me to be able to analyze this topic a lot.
Post automatically merged:

Without further ado, I think I can give you some information about the module I made for this. The way it works and how I place the colorful frame on the items is as follows:

Lua:
-- Update the frame of an item in the user interface
function updateUIItemFrame(uiItem, item, oldItem)
  local currentItem = uiItem:getItem()

  -- Set the rarity frame image of the current item if applicable
  if currentItem then
    local currentRarityId = currentItem:getCustomAttribute(ATTR_RARITY)
    if currentRarityId and currentRarityId > 1 then
      uiItem:setImageSource("/images/rarity/"..Rarities[currentRarityId].."_rarity")
    else
      uiItem:setImageSource("/images/ui/item") -- No rarity found, set default image
    end
  else
    uiItem:setImageSource("/images/ui/item") -- There is no item, set default image
  end

  -- Remove rarity image from previous item if applicable
  if oldItem then
    local oldRarityId = oldItem:getCustomAttribute(ATTR_RARITY)
    if oldRarityId and oldRarityId > 1 and (not currentItem or oldRarityId ~= currentItem:getCustomAttribute(ATTR_RARITY)) then
      modules.game_interface.getContainerItemWidget(uiItem):setImageSource("/images/ui/item") -- set default image
    end
  end
end

For the other methods and everything else, I already helped you a lot in the whole discussion, you have all the information necessary to build your own module. It is always good to learn a little, if we had everything done we would never strive to achieve it.
 
Last edited:
Wow, what you've done is really amazing! It was very beautiful... I loved it. Thanks for sharing the link. I'll try calmly and patiently... Thank you very much!
Good morning friend, man, I'm trying to do this, I'm not succeeding, I even understand the modules but I'm not able to create one, is there any way you can help me???
 
Of course it is possible if you use OTCv8 for example in the bot module it has a section in the analyzer where it places the rarity frame for the items based on their name and price, and if you experiment with the function and make your own module you can see It is not very difficult to achieve what you want.




With patience you could achieve things like the ones I achieved on my server. And that also exists in many others.
View attachment 78090

View attachment 78089
bro can you help me with this?
 
Back
Top