Skip to content

Instantly share code, notes, and snippets.

@Arefu
Created January 23, 2019 04:53
Show Gist options
  • Select an option

  • Save Arefu/4601f6aaaa020b75f54c5be8ff67a027 to your computer and use it in GitHub Desktop.

Select an option

Save Arefu/4601f6aaaa020b75f54c5be8ff67a027 to your computer and use it in GitHub Desktop.
Tested on GreaseMonkey on FireFox.
// ==UserScript==
// @name Pokemon Eclipse RPG AutoFinder
// @version 1
// @grant none
// @description No Wait Times For Portal Roms.
// @include https://pkmneclipse.net/*
// ==/UserScript==
window.onload = function () {
function AutoClick()
{
setInterval(function() {
if(DoSearch == true)
{
var BattleElement = document.getElementsByClassName('inputsubmit');
console.log(BattleElement.length);
var ParentButtonClass = document.getElementsByClassName('la-button-visible');
var Button = ParentButtonClass[0].innerHTML.replace(/\D/g,'');
document.getElementById("LA_".concat(Button)).click();
}
}, 50);
}
}
@aturcara

aturcara commented Aug 6, 2019

Copy link
Copy Markdown

anyone got code for auto battle?

@Arefu

Arefu commented Aug 7, 2019

Copy link
Copy Markdown
Author

Holy damn I forgot I made this, I'll try get some time to figure out how it's done and try make you one.

@apavlici

apavlici commented Jun 9, 2020

Copy link
Copy Markdown

Did you ever end up making the auto battle? Also, I tried this code using Greasemonkey and it didn't do anything for me - what might have changed?

@Arefu

Arefu commented Jun 11, 2020

Copy link
Copy Markdown
Author

I did not, uh, I am not aware of any changes, I don't play the game much. Have you tried using inspect element or your browser's debugger?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment