ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Question about cooldowns (https://www.esoui.com/forums/showthread.php?t=9671)

IsJustaGhost 04/04/21 12:57 AM

Question about cooldowns
 
Is there a function to get cooldown times for special items such as the jubilee cake cooldown for last time used to get tickets?

Baertram 04/04/21 09:46 AM

Edit: Oh there is an API function:

Code:

* GetCollectibleCooldownAndDuration(*integer* _collectibleId_)
** _Returns:_ *integer* _cooldownRemaining_, *integer* _cooldownDuration_


There is a return value "CollectibleUsageBlockReason" saying it's COLLECTIBLE_USAGE_BLOCK_REASON_ON_COOLDOWN via function:

Code:

* GetCollectibleBlockReason(*integer* _collectibleId_)
** _Returns:_ *[CollectibleUsageBlockReason|#CollectibleUsageBlockReason]* _usageBlockReason_

Other fucntions are:
Code:

* IsCollectibleBlocked(*integer* _collectibleId_)
** _Returns:_ *bool* _isBlocked_

* IsCollectibleValidForPlayer(*integer* _collectibleId_)
** _Returns:_ *bool* _isValidForPlayer_

* IsCollectibleSlottable(*integer* _collectibleId_)
** _Returns:_ *bool* _isSlottable_

* IsCollectibleUsable(*integer* _collectibleId_)
** _Returns:_ *bool* _isUsable_

But non of them seem to return the cooldown time. Guess you could check the collectible type via the collectibel manager and the same types shoudl provide the same coolowns (like the event cake currently will be on cd for e.g. 45s then, and mounts maybe only 10s, others only 5s).

Code:

* GetCollectibleLink(*integer* _collectibleId_, *[LinkStyle|#LinkStyle]* _linkStyle_)
** _Returns:_ *string* _link_

* GetCollectibleCategoryTypeFromLink(*string* _link_)
** _Returns:_ *[CollectibleCategoryType|#CollectibleCategoryType]* _categoryType_

* GetCollectibleIdFromLink(*string* _link_)
** _Returns:_ *integer:nilable* _collectibleId_

* GetActiveCollectibleByType(*[CollectibleCategoryType|#CollectibleCategoryType]* _categoryType_)
** _Returns:_ *integer* _collectibleId_


All of them found in the API txt files linked here, for the most current API version -> "API TXT Documentation"
https://wiki.esoui.com/APIVersion#live_API_version

IsJustaGhost 04/05/21 11:07 PM

Thank you for the reply.
However, not really what I was looking for.

Situation example:
You use the Jubilee cake for the first time after daily reset and a loot container opens up.
Any other time you use it after that, until the next reset, there is no loot container.
Somewhere there must be a time stamp stored telling the client/server you had previously used the cake during this reset.

Baertram 04/06/21 08:58 AM

This is saved and checked at server side and reset by the server at 9am in the morning (or at least it was in the past at that time).


All times are GMT -6. The time now is 11:16 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI