This is a fork from mp-eventwatcher for personal changes and because coding is fun :). Changes / new features:
- (change) using own defined class for events (because I like it ;) )
- (change) only add events with changed spawnpoints (cday / spotlight hour) as MAD events, add no lure duration only events -> otherwise spawnpoint management is a disaster
- (new feature) use of plugin pages to visualize current event data of plugin (madmin -> Systen -> MAD Plugins)
- (new feature) Telegram and Discord notification on quest reset with customizeable messages
- (new feature) delete pokemon on start or end of spawn changing events.
- (new feature) delete quest table in case of quest reset instead of manipulate walker. You have to enable MAD to rescan quests by useful walker setting. Example walker setting:
| Area | Area mode | Walker mode | Setting |
|---|---|---|---|
| quest_all | pokestops | coords | 1:00-6:00 |
| quest_rescan1 | pokestops | coords | 6:00-18:00 |
| pokemon | mon_mitm | period | 1:10-1:00 |
1Area especially for quest rescan with limited devices/pokestops -> MAD will use this Area to rescan with e.g. smaller geofence or limited devices)
Update lure duration for default event in case of not spawn changing event with lure duration != default lure duration-> Currently not possible to realize. MAD ignores lure_duration setting for event 'DEFAULT' (see function _extract_args_single_stop() in DbPogoProtoSubmit.py)
I don't provide a mp file. But you can easily install the plugin by clone this branch into your MAD/plugins/ folder:
- go to MAD/plugins:
cd <home?>/MAD/plugins - clone this branch:
git clone --branch v2refactor https://github.com/hamster007Github/mp-eventwatcher.git - go to new folder MAD/plugins/mp-eventwatcher/ and
cp plugin.ini.example plugin.ini - for custimized locals: go to new folder MAD/plugins/mp-eventwatcher/ and
cp local_default.json local_custom.json - adapt MAD/plugins/mp-eventwatcher/plugin.ini for your needs
- Restart MAD
General:
sleepto define the time to wait in-between checking for new events. By default it's one hour.delete_eventsif you want Event Watcher to delete non-needed events (including basically all you've created yourself) - by default it's set to False.max_event_durationignore events with duration longer than max_event_duration days. Workaround function for original EventWatcher plugin. For this fork, set this to 999 to deactivate workaround ans also handleseasoneventslanguageset language for Telegram and Discord notifications. Must be provided by local_default.json or local_custom.json. If no local_custom.json is provided, local_default.json is used (provides 'de' and 'en'). Default: en
Pokemon reset:
reset_pokemon_enableoption to automatically delete obsolete pokemon from MAD database on start and end of pokemon changing event to enable MAD to rescan pokemon. true: enable function, false: disable function (default)reset_pokemon_strategydefine pokemon delete strategy. ['all'(default) or 'filtered']alldelete all pokemon from databasse by SQL TRUNCATE query. Highly recommended for bigger instancesfiltereddelete only pokemon from database by SQL DELETE query, which are effected by eventchange. Can result in database lock issues (depends on server performance / database size
reset_pokemon_restart_apprestart pokemon go app on all devices on pokemon reset to flush encounter IDs in PD ['true' or 'false' (default)]
Quest reset:
reset_quests_enableoption to automatically delete quests from MAD database on start and/or end of quest changing event to enable MAD to rescan quests. true: enable function, false: disable function (default)reset_quests_event_typedefine event types and if you want quests to reset for their start, end or both. Syntax: ":end/start :end/start". If you don't setstartorend, both will be activated. (default:event). Examples:event community-dayreset quests for start and end of regular and cday eventsevent:startreset quests for start of regular eventscommunity-day event:endreset quests for start and end of cday events + end of regular events- Available event types are
event,community-day,season,spotlight-hourandraid-hour. The last 2 are not relevant for quest reset. Most events are of typeevent.
reset_quests_exclude_eventsdefine event name text phrases, which shall be excluded for quest reset. Plugin checks, if an event name contain matching text. Can be used to ignore Go battle day, which only has special research and no changing pokestop quests. Separate multiple event name text phrases with comma.
Telegram notification:
This feature informs a user, group or channel about quest resets.
tg_info_enableEnable or disable Telegram notification feature. ['true' or 'false' (default)]tg_bot_tokenTelegram bot API token from @godfather.tg_chat_id@username or id. Separate multiple chats with comma. Example: tg_chat_id = -12345678, 87654321quest_rescan_timewindowtimewindow with pattern ##-## (24h time format), in which quests are scanned. Used for inform Telegram users about possible rescan.
Discord notification:
This feature informs by webhook to a discord channel about quest resets.
dc_info_enableEnable or disable Discord notification feature. ['true' or 'false' (default)]dc_webhook_usernameDiscord bot username. ['Pogo Event Notification']dc_webhook_urlDiscord webhook url. Separate multiple webhock urls with comma. [https://discordapp.com/api/webhooks/123456789/XXXXXXXXXXXXXXXXXXXXXXX, ...]
You can provide your own local_custom.json with locals. You can also include new languages. Language type shall match with configuration parameter language.
Telegram:
tg_questreset_tmpltemplate string for quest delete and quest rescan notification. you can use placeholder, which will be replaced by plugin. Available placeholder:${event_trigger}will be replaced by "start" or "end"${event_name}will be replaced by english event name${rescan_str}will be replaced bytg_questrescan_before,tg_questrescan_duringortg_questrescan_after, depending on actual time andquest_rescan_timewindow
tg_questrescan_beforestring which is posted additionally in configuratedtg_chat_id, if quest reset happens beforequest_rescan_timewindow. Will result in regular quest scan later.tg_questrescan_duringstring which is posted additionally in configuratedtg_chat_id, if quest reset happens duringquest_rescan_timewindow. Will result in quest rescan.tg_questrescan_afterstring which is posted additionally in configuratedtg_chat_id, if quest reset happens afterquest_rescan_timewindow. Will result in no quest rescan.
Discord
dc_questreset_tmpltemplate string for quest delete and quest rescan notification. you can use placeholder, which will be replaced by plugin. Available placeholder:${event_trigger}will be replaced by "start" or "end"${event_name}will be replaced by english event name
dc_webhook_embedTitleDiscord webhook title for the embed.
To not put unnecessary load on cool community-made websites, the Plugin pulls data from this file.
The Plugin then grabs that file and checks if an event is missing for you or changed information and then updates your database accordingly.
Please join this discord