MorganaSacani
Active Member
- Joined
- Sep 20, 2022
- Messages
- 87
- Solutions
- 1
- Reaction score
- 32
I need to create a status bar to show some specific storages.
I don't understand about Otclient and my TFS version is 0.4, so my TFS supports extendedOpCode.
My idea is to create an icon in Otclient, and, when clicking on the icon, a window will open showing the storages that I define.
Show something like:
Life: 46/100
Vigor: 61/100
Capacity: 94/100
And so on...
In my server's library I have already created the functions to check the storages.
So I know that when it comes to lua language, it would be something like this:
I don't understand about Otclient and my TFS version is 0.4, so my TFS supports extendedOpCode.
My idea is to create an icon in Otclient, and, when clicking on the icon, a window will open showing the storages that I define.
Show something like:
Life: 46/100
Vigor: 61/100
Capacity: 94/100
And so on...
In my server's library I have already created the functions to check the storages.
So I know that when it comes to lua language, it would be something like this:
Lua:
ATTR_STAMINA_STORAGE_ID = 556655007
ATTR_MAX_STAMINA_STORAGE_ID = 556655008
function getPlayerAttrMaxStamina(target) return getPlayerStorageValue(target, ATTR_MAX_STAMINA_STORAGE_ID) end
function getPlayerAttrStamina(target) return getPlayerStorageValue(target, ATTR_STAMINA_STORAGE_ID) end
Lua:
showOnOtclient = "Vigor: ".. getPlayerAttrStamina(cid) .." / ".. getPlayerAttrMaxStamina(target) .."."