zamaro

Script skeleton

May 27th, 2014
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. program Script;
  2. {$DEFINE SMART8}
  3. {$I SRL-OSR/SRL.Simba}
  4. {$I SRL-OSR/SRL/Reflection/Reflection.simba}
  5. {$i SRL-OSR\SRL\misc\debug.simba}
  6. {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
  7. {$I F_AntiRandoms.simba}
  8.  
  9. procedure playerSetup;
  10. begin
  11. HowManyPlayers := 1;
  12. NumberOfPlayers(HowManyPlayers);
  13. CurrentPlayer := 0;
  14. Players[0].Name := '';
  15. Players[0].Pass := '';
  16. Players[0].Nick := '';
  17. Players[0].LampSkill := SKILL_HERBLORE;
  18. Players[0].Active := True;
  19. end;
  20.  
  21. procedure WaitHumanClick;
  22. begin
  23. case random(600) of
  24. 1..450: Wait(RandomRange(400, 600));
  25. 451..570: Wait(RandomRange(400, 600));
  26. 571..590: Wait(RandomRange(600, 800));
  27. 591..600: Wait(RandomRange(800, 1000));
  28. end;
  29. end;
  30.  
  31. procedure WaitHumanClick2;
  32. begin
  33. case random(600) of
  34. 1..450: Wait(RandomRange(1000, 1500));
  35. 451..570: Wait(RandomRange(1500, 2000));
  36. 571..590: Wait(RandomRange(2000, 2500));
  37. 591..600: Wait(RandomRange(2500, 3000));
  38. end;
  39. end;
  40.  
  41. procedure WaitHumanClick3;
  42. begin
  43. case random(600) of
  44. 1..450: Wait(RandomRange(3000, 5000));
  45. 451..570: Wait(RandomRange(5000, 5500));
  46. 571..590: Wait(RandomRange(6000, 6500));
  47. 591..600: Wait(RandomRange(7000, 7500));
  48. end;
  49. end;
  50.  
  51.  
  52. function OpenWScreen: Boolean;
  53. begin
  54. Result := False;
  55. if WorldScreen then
  56. exit;
  57. if Loggedin then
  58. Exit;
  59. if not WorldScreen then
  60. begin
  61. Mmouse(54, 475, 1, 1);
  62. WaitHumanClick;
  63. ClickMouse2(Mouse_Left);
  64. waithumanclick;
  65. Result := True;
  66. end;
  67. end;
  68.  
  69. function whitecolor: boolean;
  70. var
  71. Monster: TpointArray;
  72. TmpCts: Integer;
  73. begin
  74. tmpcts := GetColorToleranceSpeed;
  75. ColorToleranceSpeed(2);
  76. SetColorSpeed2Modifiers(0.22, 1.69);
  77. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  78. ColorToleranceSpeed(tmpcts);
  79. SetColorSpeed2Modifiers(0.2, 0.2);
  80. end;
  81.  
  82. procedure loginloop;
  83. var
  84. badworlds: TIntegerArray;
  85. OurCurrentworld: Integer;
  86. begin
  87. badworlds := [308, 316, 325, 337, 365];
  88. OpenWorldScreen;
  89. repeat
  90. if whitecolor then
  91. break;
  92. if not whitecolor then
  93. writeln('We have not hovered a world yet');
  94. case random(10) of
  95. 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
  96. 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
  97. 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
  98. 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
  99. end;
  100. until (whitecolor) if whitecolor then
  101. begin
  102. clickmouse2(mouse_left);
  103. waithumanclick;
  104. currentworld;
  105. waithumanclick;
  106. OurCurrentworld := CurrentWorldLS waithumanclick;
  107. if InIntArray(Badworlds, OurCurrentworld) then
  108. exit;
  109. waithumanclick;
  110. loginplayer;
  111. exit;
  112. end;
  113. end;
  114.  
  115. procedure mainloop;
  116. begin
  117. end;
  118.  
  119. begin
  120. playerSetup;
  121. setupsrl;
  122. SetupReflection;
  123. R_CombatRandoms := false;
  124. SRL_CombatRandoms := false;
  125. repeat
  126. wait(400);
  127. if not loggedin then
  128. loginloop;
  129. wait(400);
  130. if loggedin then
  131. mainloop;
  132. until (false);
  133. end.
Advertisement
Add Comment
Please, Sign In to add comment