![]() ![]() |
Hey, I am very new to this community as I have just recently discovered userscripts. I play pokemon vortex (Yea... I know) and I came across a script for pokemon vortex mobile. I basically just spams the search button until a pokemon appears. I was wondering how I found go about editing it so it would keep searching until a certain pokemon appear. Bassically I am asking how can I use querySelectors etc... Here is the code
Here is some of the html info
and this is a pic of the website
I really, really need and would appreciate any help that anyone could provide. Thanks in advanced. |
![]() ![]() |
querySelector has lots of good documentation available. For example: https://developer.mozilla.org/en/DOM/Document.q... The general principle is based on how you create CSS selectors (e.g., http://www.css3.info/preview/attribute-selectors/), so something like this might work:
// Get a reference to the first instance of a Dark_Dratini.gif
var wdd = document.querySelector('img[src*="Dark_Dratini.gif"]');
if (wdd) {
// Found one
alert("Attack! Attack!");
}
Alternately you could look for the text. |
![]() ![]() |
Thank you so much, you do not know how happy you have made me :D |


