ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Autoaccept daily rewards (https://www.esoui.com/forums/showthread.php?t=7847)

Marazota 06/08/18 02:24 PM

Autoaccept daily rewards
 
is this possible by addons?:confused:

SDPhantom 06/10/18 10:41 PM

I'm testing some code right now, but I need another day to pass since I already claimed my reward for today. Right now, I have it checking on login, but I also have EVENT_DAILY_LOGIN_REWARDS_UPDATED and EVENT_NEW_DAILY_LOGIN_REWARD_AVAILABLE registered. I don't know what conditions cause them to fire exactly, I'm only guessing from the names of the events at this time. I may register EVENT_DAILY_LOGIN_MONTH_CHANGED as well just to be sure the month rollover is covered too.

Marazota 06/14/18 03:56 AM

Quote:

Originally Posted by SDPhantom (Post 35008)
I'm testing some code right now, but I need another day to pass since I already claimed my reward for today. Right now, I have it checking on login, but I also have EVENT_DAILY_LOGIN_REWARDS_UPDATED and EVENT_NEW_DAILY_LOGIN_REWARD_AVAILABLE registered. I don't know what conditions cause them to fire exactly, I'm only guessing from the names of the events at this time. I may register EVENT_DAILY_LOGIN_MONTH_CHANGED as well just to be sure the month rollover is covered too.

ok lmk if you need testers:)

SDPhantom 06/14/18 01:29 PM

I've had mixed results so far. The first day, EVENT_NEW_DAILY_LOGIN_REWARD_AVAILABLE failed to fire, then the next two did. I hooked EVENT_MAIL_NUM_UNREAD_CHANGED as backup since it always seems to send a notification... until I implemented it and the other event started working. :p

I still need to work out the timing for the on login scan. It runs into an issue where it sees a reward available, but the system errors saying there isn't one when running off EVENT_PLAYER_ACTIVATED. That needs a little more attention. I put in more debug code to see if it's either running too early or trying to claim multiple times before the UI has a chance to update.

SDPhantom 06/15/18 06:20 PM

Seems like EVENT_DAILY_LOGIN_REWARDS_UPDATED is firing right before EVENT_PLAYER_ACTIVATED, which is causing it to claim twice on login, but it is working. For some reason, the first event wasn't being shown by my debug code.

SDPhantom 06/15/18 06:40 PM

I think it's done for now. Uploaded it as Auto Daily Rewards.

Edit: Oops. An error in the manifest was marking the addon as out-of-date. This has been fixed now.


All times are GMT -6. The time now is 09:29 AM.

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