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

TFS 1.X+ ring doubt tfs 1.3

God Aries

New Member
Joined
Jun 24, 2018
Messages
44
Reaction score
4
Good morning, community, I would like to know how to add a waiting time to use a ring again, as the code would be, I can not find what to put and that works by searching everywhere. šŸ˜µ

Could someone teach me an example? I'm learning by seeing guides and everything, but this time I do need to see an example, and since I don't have many friends to ask for help with my doubts about scripts, that's why I created this topic.

I use tfs 1.3
 
Solution
E
here:
here:
 
Solution
Thank you very much, just one more thing if it is not much trouble

Is it possible to add that if you give the item a look, it will tell you how much time is left to equip it again?
 
Thank you very much, just one more thing if it is not much trouble

Is it possible to add that if you give the item a look, it will tell you how much time is left to equip it again?

yes just add this function to some lib file and add change in events/player.lua:

change:
Lua:
self:sendTextMessage(MESSAGE_INFO_DESCR, description)

to:
Lua:
    if thing:isItem() then
        description = description .. "\n You may use it again in: ".. timeString(storage) .."."
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)

or something like that
 
I do not know if I did not follow the steps that he told me well but when giving a look nothing appears and in the console this error appears

4i66OUO.png
 
yes just add this function to some lib file and add change in events/player.lua:

change:
Lua:
self:sendTextMessage(MESSAGE_INFO_DESCR, description)

to:
Lua:
    if thing:isItem() then
        description = description .. "\n You may use it again in: ".. timeString(storage) .."."
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)

or something like that

This I did not understand but my first comment was another question and that was resolved, so I finished the topic, we already opened the topic another topic for this that I did not understand, thank you very much.
 
Back
Top