NeoQuest II Remote Control

Automatically moves character based on user defined path. (1=north, 2=south, 3=west, 4=east, 5=northwest, 6=southwest, 7=northeast, 8=southeast

  1. // ==UserScript==
  2. // @name NeoQuest II Remote Control
  3. // @namespace http://nq2guy.tz/
  4. // @description Automatically moves character based on user defined path. (1=north, 2=south, 3=west, 4=east, 5=northwest, 6=southwest, 7=northeast, 8=southeast
  5. // @include http://www.neopets.com/games/nq2/nq2*
  6. // @version 0.0.1.20150906031709
  7. // ==/UserScript==
  8.  
  9. //Copyright nq2guy 2008
  10. //script licensed under, GNU GPL V3 , see http://www.gnu.org/licenses/gpl.txt for details
  11.  
  12. // Uncomment the below two lines to initialize your variables, but please edit them from about:config , filter:greasmonkey.scriptvals
  13. //path = GM_setValue("Path","3");
  14. //pathIndex = GM_setValue("pathIndex",0);
  15.  
  16. path = GM_setValue("Path","**********************PUT YOUR NUMBERS BETWEEN THESE QUOTATION MARKS*************************");
  17. pathIndex = GM_getValue("pathIndex",0);
  18.  
  19. /*
  20. Notes on coordinates
  21.  
  22. javascript: dosub(int)
  23.  
  24. 1=north
  25. 2=south
  26. 3=west
  27. 4=east
  28. 5=northwest
  29. 6=southwest
  30. 7=northeast
  31. 8= southeast
  32.  
  33. */
  34. var i = 0;
  35. var hiccup=1;
  36. var divs = document.getElementsByTagName('div');
  37. for(i=0;i<divs.length;i++)
  38. {
  39. if (divs[i].className=="contentModuleHeader")
  40. {
  41. hiccup=0;
  42. }
  43. }
  44.  
  45. if(hiccup)
  46. {
  47. document.location.href="http://www.neopets.com/games/nq2/nq2.phtml";
  48. }
  49. else
  50. {
  51. var elements = document.getElementsByTagName('img');
  52. var i = 0;
  53. for(i=0;i<elements.length;i++)
  54. {
  55. switch(elements[i].src)
  56. {
  57. case "http://images.neopets.com/nq2/x/com_begin.gif":
  58. document.location.href="http://www.neopets.com/games/nq2/nq2.phtml?start=1";
  59. break;
  60. case "http://images.neopets.com/nq2/x/com_atk.gif":
  61. document.location.href="javascript:setaction(4); document.ff.submit()";
  62. break;
  63. case "http://images.neopets.com/nq2/x/com_end.gif":
  64. document.location.href="javascript:setaction(2); document.ff.submit()";
  65. break;
  66. case "http://images.neopets.com/nq2/x/tomap.gif":
  67. document.location.href="http://www.neopets.com/games/nq2/nq2.phtml?finish=1";
  68. break;
  69. case "http://images.neopets.com/nq2/x/com_next.gif":
  70. document.location.href="javascript:setaction(1); document.ff.submit();";
  71. break;
  72. case "http://images.neopets.com/nq2/x/nav.gif":
  73. if((GM_getValue("Path").length) != pathIndex)
  74. {
  75. //alert("javascript:dosub(" + GM_getValue("Path")[pathIndex] + ");");
  76. document.location.href="http://www.neopets.com/games/nq2/nq2.phtml?act=move&dir=" + GM_getValue("Path")[pathIndex];
  77. GM_setValue("pathIndex",pathIndex+1);
  78. }
  79. else
  80. {
  81. alert("You have arrived at your destination. Please disable this script to take control.");
  82. GM_setValue("pathIndex",0)
  83. }
  84. break;
  85. }
  86. }
  87. }
  88. //window.setTimeout(function() { document.location.href="http://www.neopets.com/games/nq2/nq2.phtml" }, 20000);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址