// ==UserScript== // @name [Pokeclicker] Infinite Seasonal Events // @namespace Pokeclicker Scripts // @match https://www.pokeclicker.com/ // @grant none // @version 1.0 // @author Ephenia // @description Adds in toggable options to have seasonal events infinitely run. Events can also run simultaneously with one another. Includes custom events as well. // @downloadURL none // ==/UserScript== var startDate = new Date(new Date().getFullYear(), -1); var endDate = new Date(new Date().getFullYear(), 10000); var getEvents = SpecialEvents.events; var storedEvents = []; var profileDrop = document.getElementById('startMenu').querySelectorAll('ul li')[0]; var profileModal = document.getElementById('profileModal'); SpecialEvents.newEvent('Ephenia\'s Gift', 'Encounter Ribombee that roams across all regions.
A special thanks for using my scripts!', startDate, () => { GameHelper.enumNumbers(GameConstants.Region).filter(i => i != GameConstants.Region.none).forEach(region => { RoamingPokemonList.add(region, new RoamingPokemon('Ribombee')); }); }, startDate, () => { GameHelper.enumNumbers(GameConstants.Region).filter(i => i != GameConstants.Region.none).forEach(region => { RoamingPokemonList.remove(region, new RoamingPokemon('Ribombee')); }); } ); setTimeout(() => { for (var i = 0; i < getEvents.length; i++) { if (localStorage.getItem('specialEvent'+i) == null) { localStorage.setItem('specialEvent'+i, 0); } storedEvents.push(+localStorage.getItem('specialEvent'+i)) } for (var ii = 0; ii < getEvents.length; ii++) { getEvents[ii].startTime = startDate getEvents[ii].endTime = endDate if (getEvents[ii].hasStarted() == false && storedEvents[ii] == 1) { getEvents[ii].start() } } initEvents(); if (getEvents.length != 7) { setTimeout(() => { Notifier.notify({ title: '[Outdated] Infinite Seasonal Events', message: `Please contact Ephenia so that this script can be updated!`, type: NotificationConstants.NotificationOption.danger, timeout: 10000 }); }, 2000); } }, 50); function initEvents() { setTimeout(() => { for (var iii = 0; iii < getEvents.length; iii++) { var eventNotify = document.querySelectorAll('.ml-2'); if (eventNotify.length >= iii + 1) { eventNotify[iii].click() } } var eventLi = document.createElement('li'); eventLi.innerHTML = `Events` profileDrop.before(eventLi); var eventMod = document.createElement('div'); eventMod.setAttribute("class", "modal noselect fade show"); eventMod.setAttribute("id", "eventModal"); eventMod.setAttribute("tabindex", "-1"); eventMod.setAttribute("aria-labelledby", "eventModal"); eventMod.setAttribute("aria-labelledby", "eventModal"); eventMod.setAttribute("aria-modal", "true"); eventMod.setAttribute("role", "dialog"); eventMod.innerHTML = `