Advertisement
Guest User

Untitled

a guest
May 28th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. program HyperStunAlch;
  2. {$DEFINE SMART}
  3. {$i AeroLib/AeroLib.Simba}
  4.  
  5. const
  6. SPELLTYPE = 'Camelot Teleport'; //choose spell
  7. ALCH = true; //alch as well - true or false
  8. STODO = 1000; //number of spells to do
  9. ATODO = 1000; //number of alch's to do
  10.  
  11. P_USERNAME = 'tomastoth@gmail.com';
  12. P_PASSWORD = 'Ilovevejka1995';
  13. P_PIN = '';
  14.  
  15. //change for NPC of your choice, don't forget your
  16. //safe spot!
  17. NPC_COL = 2106677;
  18. NPC_TOL = 7;
  19. NPC_HUE = 0.57;
  20. NPC_SAT = 1.95;
  21.  
  22. VERSION = '1.2';
  23.  
  24. var
  25. x, y, cs1, cs2, spellDTM, spellXP, XPGAIN,
  26. NCAST, CASTPH, XPPH : Integer;
  27. position : TPoint;
  28.  
  29. procedure declarePlayer();
  30. begin
  31. Me.Name := P_USERNAME;
  32. Me.Pass := P_PASSWORD;
  33. Me.Pin := P_PIN;
  34. Me.Active := True;
  35. Me.Member := True;
  36. end;
  37.  
  38. procedure customMouse(point: TPoint);
  39. begin
  40. case random(0, 6) of
  41. 0..2: BrakeMMouse(point, random(5), random(5), true);
  42. 3: BrakeMMouse(point, random(5), random(5), false);
  43. 4..5: MissMouse(point, random(5), random(5));
  44. 6: HumanMMouse(point, random(5), random(5));
  45. end;
  46. end;
  47.  
  48. procedure loading();
  49. begin
  50. case lowercase(SPELLTYPE) of
  51. 'confuse':
  52. begin
  53. x := 618 + randomRange(-5, 5);
  54. y := 230 + randomRange(-5, 5);
  55. spellXP := 13;
  56. end;
  57. 'weaken':
  58. begin
  59. x := 570 + randomRange(-5, 5);
  60. y := 253 + randomRange(-5, 5);
  61. spellXP := 20;
  62. end;
  63. 'curse':
  64. begin
  65. x := 666 + randomRange(-5, 5);
  66. y := 253 + randomRange(-5, 5);
  67. spellXP := 29;
  68. end;
  69. 'vulnerability':
  70. begin
  71. x := 598 + randomRange(-5, 5);
  72. y := 400 + randomRange(-5, 5);
  73. spellXP := 76;
  74. end;
  75. 'stun':
  76. begin
  77. x := 618 + randomRange(-5, 5);
  78. y := 420 + randomRange(-5, 5);
  79. spellXP := 90;
  80. end;
  81. end;
  82. end;
  83.  
  84. //Borrowed (and altered slightly) from ghoul script by jstemper - https://villavu.com/forum/showthread.php?t=114297
  85. function findObject(COL, TOL : Integer; HUE, SAT: Extended): Boolean;
  86. var
  87. NPC: TColEx;
  88. TPA: TPointArray;
  89. ATPA: T2DPointArray;
  90. I: Integer;
  91. box: TBox;
  92. begin
  93. NPC.Create(Col, Tol, Hue, Sat);
  94. if not NPC.FindAllIn(Area_MS, TPA) then
  95. Exit(False);
  96. ATPA := ClusterTPA(TPA, 10);
  97. SortATPAFromMidPoint(ATPA, Point(MSCX, MSCY));
  98. if (length(ATPA) <= 0) then
  99. begin
  100. result := False;
  101. exit;
  102. end;
  103. for i := 0 to high(ATPA) do
  104. begin
  105. position:= middleTPA(ATPA[i]);
  106. customMouse(position);
  107. fastClick(MOUSE_LEFT);
  108. break;
  109. end;
  110. end;
  111.  
  112. procedure antiban();
  113. begin
  114. if not isLoggedIn() then Exit;
  115. case random(500) of
  116. 20..25: hoverSkill(SKILL_MAGIC, false);
  117. 60..63: MMouseOffClient('top');
  118. 101..104: MMouseOffClient('right');
  119. 222..228: MMouseOffClient('left');
  120. 444..449: MMouseOffClient('rand');
  121. end;
  122. end;
  123.  
  124. procedure highAlch();
  125. begin
  126. if not isLoggedIn() then Exit;
  127. if not (getCurrentTab() = TAB_MAGIC) then
  128. FTab(TAB_MAGIC);
  129. customMouse(point(724, 321 + randomRange(-5, 5)));
  130. fastClick(MOUSE_LEFT);
  131. wait(randomRange(50, 150));
  132. customMouse(point(714, 326 + randomRange(-5, 5)));
  133. fastClick(MOUSE_LEFT);
  134. wait(randomRange(50, 150));
  135. end;
  136.  
  137. procedure castSpell();
  138. var
  139. SPELLTYPE : Integer;
  140. begin
  141. if not isLoggedIn() then Exit;
  142. if not (getCurrentTab() = TAB_MAGIC) then
  143. FTab(TAB_MAGIC);
  144. customMouse(point(x, y));
  145. fastClick(MOUSE_LEFT);
  146. findObject(NPC_COL, NPC_TOL, NPC_HUE, NPC_SAT);
  147. if ALCH then
  148. begin
  149. highAlch;
  150. inc(cs2);
  151. end else
  152. wait(randomRange(1700, 1850));
  153. inc(cs1);
  154. end;
  155.  
  156. procedure proggy();
  157. begin
  158. XPGAIN := ((spellXP * cs1) + (cs2 * 65));
  159. XPPH := round((XPGAIN * 60) / (getTimeRunning() / 60000));
  160. NCAST := cs1 + cs2;
  161. CASTPH := round((NCAST * 60) / (getTimeRunning() / 60000));
  162. OS_Smart.__Graphics.Clear;
  163. OS_Smart.__Graphics.DrawClippedText('HyperStunAlch V' + VERSION, 'SmallChars', Point(8, 278), clWhite);
  164. OS_Smart.__Graphics.DrawClippedText('Time Running: ' + timeRunning(), 'SmallChars', Point(8, 294), clWhite);
  165. OS_Smart.__Graphics.DrawClippedText('Spells cast: ' + intToStr(NCAST) + ' p/h: ' + intToStr(CASTPH), 'SmallChars', Point(8, 310), clWhite);
  166. OS_Smart.__Graphics.DrawClippedText('XP Gained: ' + intToStr(XPGAIN) + ' p/h: ' + intToStr(XPPH), 'SmallChars', Point(8, 326), clWhite);
  167. end;
  168.  
  169. begin
  170. declarePlayer;
  171. initAL;
  172. loginPlayer(false);
  173. loading;
  174. repeat
  175. castSpell;
  176. proggy;
  177. antiban;
  178. until (not isLoggedIn) or (cs1 = STODO) or (cs2 = ATODO);
  179. writeln('Number of spells requested have been completed');
  180. writeln('Thank you for using the script!');
  181. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement