Greasy Fork is available in English.

LambLongs: Sexual Identity Locator

Oh, there it is.

  1. // ==UserScript==
  2. // @name LambLongs: Sexual Identity Locator
  3. // @author A Spooky-Assed Ghost
  4. // @description Oh, there it is.
  5. // @version 1.0.1
  6. // @icon http://www.zerge.com/images/portfolio/icon-radar.png
  7. // @namespace http://userscripts.org/users/171410
  8. // @include http://www.goatlings.com/search_for_pets.php*
  9. // @include http://www.goatlings.com/searching_for_pets.php*
  10. // @include http://www.goatlings.com/explore_1p.php*
  11. // @include http://www.goatlings.com/explore_1p_end.php*
  12. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
  13. // ==/UserScript==
  14. var oscPhase = GM_getValue('osc',true);
  15. var urlFile = window.location.href.split('.com/')[1].split('?')[0];
  16. var conditions = [$("a:contains('Click here to enter Misty Meadows')"),$("a:contains('from the Goatling')"),$("a:contains('Battle the Baddie')"),$("a:contains('here')")];
  17. var truths = [];
  18. var initial = true;
  19. for (var j=0; j<conditions.length; j++){
  20. truths[j]=(conditions[j] && conditions[j].length);
  21. }
  22.  
  23. function doMain(){
  24. if(initial){
  25. initial = false;
  26. }else{
  27. if(truths[0]){
  28. window.location.href = conditions[0][0].href;
  29. }else if(truths[1]){
  30. window.location.href = conditions[1][0].href;
  31. }else if(truths[2]){
  32. window.location.href = conditions[2][0].href;
  33. }else if(truths[3]){
  34. window.location.href = conditions[3][0].href;
  35. }else if(urlFile == 'explore_1p.php'){
  36. window.document.forms[1].elements.namedItem("use_attack").selectedIndex = 1;
  37. window.document.getElementsByTagName('form')[1].submit();
  38. }else{
  39. GM_setValue('osc',!oscPhase);
  40. if(oscPhase){
  41. window.location.href = "http://www.goatlings.com/searching_for_pets.pro.php?act=move&move=right&location1=Misty_Meadows";
  42. }else{
  43. window.location.href = "http://www.goatlings.com/searching_for_pets.pro.php?act=move&move=left&location1=Misty_Meadows";
  44. }
  45. }
  46. }
  47. setTimeout(doMain,1000);
  48. }
  49. doMain();