Lucky Gift Plugin
Automatic collection of Lucky Gifts in chat.
What the plugin does
Detects the "Lucky Gift" icon that appears on screen when an alliance member opens a gift. The bot opens the chat, clicks the most recent link, claims the gift, and closes the popup. Loops if multiple gifts are visible in a row.
Plugin is independent from the Treasure flow (shovels/drones) — no interaction between the two.
Gift counter
The "Gifts collected" counter on the home only increments if the reward popup is actually visible (= server proof of collection). If the popup closes early or the gift was already taken by another player, the counter stays at its previous value.
Thanks message (optional)
If "Send a thanks" is enabled (plugin TaskCard), the bot sends a message in the alliance chat after each collected gift. The message is randomly picked from the shared "Thanks messages" list (common with the Treasure plugin). Empty list or option disabled → no message sent.
Personalize the list with varied phrases to avoid spamming the same one on every gift.
Scan interval
Default: 3s. The bot scans the screen at this frequency to spot the "Lucky Gift" icon. Lower (1-2s) for faster reaction, higher to save resources.
How it works under the hood
When the icon is detected, the bot clicks it → opens chat → looks for the lowest "Lucky Gift" link (= most recent) → click → popup opens → click the "Claim" button if present → wait for reward to appear → click to close. If multiple links are visible, the bot processes them one by one upward.
If a notification popup blocks the chat, the bot auto-dismisses it via the X button before scanning.