Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. Goes before the "Snow! :D" step in the "Daily Prep" sequence.
  2.  
  3. //------------------------------------------
  4. //@NewTask
  5. //@TaskName: Summon?
  6.  
  7. GoPage("village");
  8. if (!FormTest("kat")) IncrementTask();
  9. else ChangeSequence("Daily Prep","Snow! :D");
  10.  
  11.  
  12. //------------------------------------------
  13. //@NewTask
  14. //@TaskName: Summon.
  15.  
  16. FlagTeamChange("Summoning Team","Triple H", "K-Dog", "Doughman");
  17. GoPage("village");
  18. IncrementTaskIf(!FormTest("newmon"));
  19.  
  20. var res = /<li>Brilliant Crystals: (\d+)\D+(\d+)\D+(\d+)\D+(\d+)\D+(\d+)<\/li>/.exec(document.body.innerHTML).shift();
  21.  
  22. var fwd = 0;
  23.  
  24. if (parseInt(res[3]) >= parseInt(res[4])&&parseInt(res[4])>=3) fwd = 4;
  25. else if (parseInt(res[4]) >= parseInt(res[3])&&parseInt(res[3])>=3) fwd = 3;
  26. else {
  27. var lowest = 999999;
  28. var missmod = 0;
  29. for (var a=0;a<3;a++){
  30. var resno = parseInt(res[a]);
  31. if (resno>=8&&resno<=lowest){
  32. var lowest = resno;
  33. fwd = a - missmod;
  34. } else if (resno<8) missmod ++;
  35. }
  36. }
  37.  
  38. for (var a=1;a<=fwd;a++){
  39. if (DocTest("<option name=\"Brilliant Crystals\">")&&a==1)
  40. document.getElementsByTagName("Option")[4].remove();
  41. else if (DocTest("<option name=\"Medicinal Water\">")&&a==2)
  42. document.getElementsByTagName("Option")[4].remove();
  43. else if (DocTest("<option name=\"Precious Metals\">")&&a==3)
  44. document.getElementsByTagName("Option")[4].remove();
  45. else if (DocTest("<option name=\"Solid Fire\">")&&a==4)
  46. document.getElementsByTagName("Option")[4].remove();
  47. }
  48.  
  49. FormSetValue(null, 'attractmonster', 'Monster');
  50. FormSubmit("newmon");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement