0
<a href="javascript:top.attackmob('2263','8491')"> Street Sweeper (19)</a>
<a href="javascript:top.attackmob('2269','8491')"> Gardner (23)</a>

On a page, these are creatures that spawn. To kill them, you just click them and the battle starts. I want to know what kind of script would click them automatically. In this example, there are two things to kill - sometimes there are none, sometimes there are more. I can only click one at a time. just want to know if there is a way I can have them autoclick

user3765752
  • 1
  • 1
  • 5
  • You can call the onclick() function of an HTML element in JS. http://stackoverflow.com/questions/2381572/how-can-i-trigger-a-javascript-event-click – Edge Apr 09 '15 at 08:04
  • Better yet, use unsafeWindow to call top.attackmob('x','y'), and you can use eval and the string replace function to get the numbers. Or regex. – Edge Apr 09 '15 at 08:06

0 Answers0