Need Help

in Script development
Subscribe to Need Help 3 posts, 2 voices



Memory Leak User
ChromeWindows

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
http://pastie.org/4067108

Here is some of the html info
[IMG]http://i.imgur.com/8Zm6g.png[/IMG]

and this is a pic of the website
[IMG]http://i.imgur.com/VPr8p.png[/IMG]

I really, really need and would appreciate any help that anyone could provide.

Thanks in advanced.

 
Jefferson Scher Scriptwright
FirefoxWindows

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.

 
Memory Leak User
ChromeWindows

Thank you so much, you do not know how happy you have made me :D