Autoaccept daily rewards
is this possible by addons?:confused:
|
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.
|
Quote:
|
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. |
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.
|
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