Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.36 KB | None | 0 0
  1. program SSPoweThiever; //(gem)
  2.  
  3. {$I srl/srl.simba}
  4.  
  5. var
  6. x, y, scimstall, scimstall1, shark, count: integer;
  7. Status:String;
  8.  
  9. const
  10.  
  11. USERNAME = 'pimd thiever';
  12. PASSWORD = 'G4jtnguit4ujgi';
  13.  
  14. procedure proggy; //idea from rj
  15. begin
  16. cleardebug;
  17. writeln('JStemper ~~ SS3 Thiever');
  18. writeln(' Time Running: '+ MsToTime(GetTimeRunning,3))
  19. Writeln(' Status: ' + Status)
  20. exit;
  21. end;
  22. function IsLoggedIn: boolean; //stole and editted from hoodz ss1
  23. begin
  24. if findcolortolerance(x, y, 1911085, 740, 130, 762, 161, 20) then
  25. begin
  26. result := true
  27. //writeln('we are logged in');
  28. wait(200)
  29. end
  30. else
  31. begin
  32. result := false
  33. //writeln('we are not logged in');
  34. wait(200)
  35. end;
  36. end;
  37.  
  38. procedure Login; //stole and editted from hoodz ss1
  39. begin
  40. wait(3000)
  41. begin
  42. movemouse(484, 338);
  43. Status := 'Entering Username';
  44. proggy;
  45. Wait(200);
  46. clickmouse(x, y, mouse_left);
  47. count := 0;
  48. repeat
  49. Inc(count);
  50. PressKey(VK_Back);
  51. until count > 25;
  52. Wait(250);
  53. sendkeys(USERNAME, 0, 0);
  54. Wait(1000);
  55. Status := ('Entering Password');
  56. proggy;
  57. movemouse(480, 385);
  58. Wait(200);
  59. clickmouse(x, y, Mouse_left);
  60. Wait(200);
  61. count := 0;
  62. repeat
  63. PressKey(VK_Back);
  64. Inc(count);
  65. until count > 25
  66. sendkeys(PASSWORD, 50, 25);
  67. Status := ('logging in');
  68. proggy;
  69. Wait(1000);
  70. movemouse(491, 417);
  71. Wait(1000);
  72. ClickMouse(x, y, mouse_left);
  73. Wait(4000);
  74. writeln('logged in! (?)')
  75. end;
  76. end;
  77.  
  78. procedure setmeup;
  79. begin
  80. writeln('setting up....');
  81. writeln('putting angle right');
  82. sleep(5000)
  83. count := 0
  84. repeat
  85. inc(count);
  86. presskey(38);
  87. until count > 25;
  88. sleep(1000);
  89. writeln('completed');
  90. writeln('open inventory');
  91. movemouse(654, 186);
  92. sleep(200);
  93. clickmouse(x, y, mouse_left);
  94. sleep(1000);
  95. writeln('completed');
  96. writeln('set up completed!');
  97. end;
  98.  
  99. procedure teleport;
  100. var
  101. x, tele, y:integer;
  102. begin
  103. tele := DTMFromString('mbQAAAHicY2VgYLBkYmAwA2JbIDYFYjsgfg8UfwXEbxgg7I9A/O/fP4aqqh9gbGqSB6aVgeLomBELBgMAFesQHQ==');
  104. Status := 'Teleporting home';
  105. proggy;
  106. presskey(115)
  107. wait(400)
  108. presskey(115)
  109. wait(500)
  110. if findDTM(tele, x, y, 552, 221, 590, 252) then
  111. begin
  112. mmouse(x, y, 1, 1);
  113. wait(randomrange(300, 600));
  114. clickmouse2(mouse_Left);
  115. clickmouse(x, y, mouse_left);
  116. freedtm(tele);
  117. end;
  118. terminatescript;
  119. end;
  120. {function DebugTPA(Points: TPointArray; BmpName: string): Boolean;
  121. var
  122. Bmp: integer;
  123. Box : TBox;
  124. TempTPA : TPointArray;
  125. begin
  126. Box := GetTPABounds(Points);
  127. Bmp := BitmapFromClient(Box.x1,Box.y1,Box.x2,Box.y2);
  128. TempTPA := CopyTPA(Points);
  129. OffsetTPA(TempTPA,Point(-box.x1,-box.y1));
  130. DrawTPABitmap(Bmp,TempTPA,clRed);
  131. DisplayDebugImgWindow(box.x2-Box.x1 + 1, box.y2-box.y1 + 1);
  132. DrawBitmapDebugImg(Bmp);
  133. if bmpname <> '' then
  134. SaveBitmap(Bmp, ScriptPath + BmpName +'.bmp');
  135. FreeBitmap(Bmp);
  136. Result := True;
  137. end; }
  138. function rsps_getUpText:string;
  139. var
  140. blueTPA: tpointarray;
  141. blueATPA: t2dpointarray;
  142. begin
  143. FindColorsTolerance(blueTPA, 14080518, 0, 0, 194, 25, 40);
  144. if (length(blueTPA) > 1) then
  145. blueATPA := splitTPAEx(blueTPA, 1, 10);
  146. sortATPAFromFirstPointX(blueATPA, point(0, 0));
  147. result:= getTextATPA(blueATPA, 5, 'UpChars07');
  148. //DebugTPA(blueTPA, 'bmp');
  149. end;
  150.  
  151. Function rspsIsUpTextMultiCustom(Text: TStringArray): Boolean;
  152. Var
  153. TheText: String;
  154. i, n: Integer;
  155. Begin
  156. TheText := rsps_getUpText;
  157. n := High(Text);
  158. For i := 0 to n do
  159. If (Pos(Text[i], TheText) > 0) then
  160. Begin
  161. Result := True;
  162. Exit;
  163. End;
  164. End;
  165. Function InCombat: boolean;
  166. begin
  167. if findcolortolerance(x, y, 45647, 254, 135, 268, 162, 45) or
  168. findcolortolerance(x, y, 330180, 254, 135, 268, 162, 45) then
  169. Begin
  170. Status := ('We are being attacked');
  171. proggy;
  172. Begin
  173. Result:=True
  174. End
  175. End
  176. Else
  177. wait(100);
  178. exit;
  179. End;
  180.  
  181. {procedure thief;
  182. Var
  183. TPAA: T2DPointArray;
  184. TPA: TPointArray;
  185. CTS, I: Integer;
  186. Begin
  187. CTS := GetColorToleranceSpeed;
  188. ColorToleranceSpeed(2);
  189. setcolorspeed2modifiers(0.25, 0.12);
  190. FindColorsSpiralTolerance(348, 177, TPA, 1456985, 220, 79, 268, 150, 6);
  191. ColorToleranceSpeed(CTS);
  192. TPAA := TPAToATPAEx(TPA, 30, 30); //Put the Width and Heigh here
  193. SortATPASize(TPAA, True);
  194. For I := 0 To High(TPAA) Do
  195. If GetArraylength(TPAA[i]) > 100 Then // Set How Much Points you need for your function to take Ation
  196. Begin
  197. MiddleTPAEx(TPAA[i], x, y);
  198. MMouse(X, Y, 3, 3);
  199. Status := 'Thieving';
  200. proggy;
  201. KeyUp(37);
  202. If (rspsIsUpTextMultiCustom(['enera'])) Then
  203. begin
  204. clickmouse(x, y, mouse_left);
  205. wait(randomrange(10, 50))
  206. exit;
  207. end
  208. else
  209. KeyDown(37);
  210. Status := ('Rotating Screen')
  211. proggy;
  212. exit;
  213. end else
  214. begin
  215. KeyDown(37);
  216. Status := ('Rotating Screen')
  217. proggy;
  218. exit;
  219. end;
  220. end; }
  221. procedure thief;
  222. Var
  223. TPAA: T2DPointArray;
  224. TPA: TPointArray;
  225. CTS, I: Integer;
  226. Begin
  227. CTS := GetColorToleranceSpeed;
  228. ColorToleranceSpeed(2);
  229. setcolorspeed2modifiers(0.25, 0.12);
  230. FindColorsSpiralTolerance(348, 177, TPA, 8099495, 229, 197, 261, 261, 6);
  231. ColorToleranceSpeed(CTS);
  232. TPAA := TPAToATPAEx(TPA, 30, 30); //Put the Width and Heigh here
  233. SortATPASize(TPAA, True);
  234. For I := 0 To High(TPAA) Do
  235. If GetArraylength(TPAA[i]) > 100 Then // Set How Much Points you need for your function to take Ation
  236. Begin
  237. MiddleTPAEx(TPAA[i], x, y);
  238. MMouse(X, Y, 3, 3);
  239. Status := 'Thieving';
  240. proggy;
  241. KeyUp(37);
  242. If (rspsIsUpTextMultiCustom(['pic'])) Then
  243. begin
  244. clickmouse(x, y, mouse_left);
  245. wait(randomrange(10, 50))
  246. exit;
  247. end
  248. else
  249. KeyDown(37);
  250. Status := ('Rotating Screen')
  251. proggy;
  252. exit;
  253. end else
  254. begin
  255. KeyDown(37);
  256. Status := ('Rotating Screen')
  257. proggy;
  258. exit;
  259. end;
  260. end;
  261. function Lowish_HP(): Boolean;
  262. var
  263. x, y, i: Integer;
  264. colours: TIntegerArray;
  265. begin
  266. colours := [1912114, 3886164]
  267. for i := 0 to High(colours) do
  268. begin
  269. if FindColorTolerance(x, y, colours[i], 712, 30, 718, 35, 20) then
  270. begin
  271. //WriteLn('Health Point is low');
  272. Result := True
  273. end else
  274. //WriteLn('Health point not low');
  275. end;
  276. end;
  277.  
  278. function VeryLowHp(): Boolean;
  279. var
  280. x, y, i: Integer;
  281. colours: TIntegerArray;
  282. begin
  283. colours := [3426899]
  284.  
  285. for i := 0 to High(colours) do
  286. begin
  287. if FindColorTolerance(x, y, colours[i], 697, 36, 715, 40, 25) then
  288. begin
  289. //WriteLn('Health Point is very low, teleporting');
  290. Result := True
  291. end else
  292. //WriteLn('Health point not low');
  293. end;
  294. end;
  295. function Restore: Boolean;
  296. var
  297. x, y, i: Integer;
  298. potDTMs: TIntegerarray;
  299. begin
  300. potDTMs := [
  301. DTMFromString('mbQAAAHicY2VgYNjPhMDHgHgnEC9iZGCYC8TTGSHsZUC8RieaYb1uDMM2vUSGUFFdhuVaEQySQP3omBELBgMAqUMM4Q=='),
  302. DTMFromString('mggAAAHicY2NgYJjAxMAwFYjnAvFMKHsaEC9ghOCFQDwHiKdA6SVa4WAcKqrL0KHkzlBeUckwVyOYQRJoFjbMiANDAAC3tw46'),
  303. DTMFromString('mggAAAHicY2NgYMhlYmDIBOJCIM4B4gwgTgfiuYwMDAuheDoQzwPiJUC8oKCVYYlWOEOmlDlDWVk5w9GmOWC+JNAsbJgRB4YAAK3KDs4='),
  304. DTMFromString('mggAAAHicY2NgYDjAxMBwBIhPQvE5KP85IwPDHSC+DcQPgPgJFO+pnspQUFDEEB4RwxARGcsQ4RzIML+sg0ESaBY2zIgDQwAAMiMSYw==')
  305.  
  306.  
  307. ];
  308.  
  309. for i := 0 to High(potDTMs) do
  310. if FindDTM(potDTMs[i], x, y, 548, 206, 737, 467) then
  311. begin
  312. Wait(100 + Random(200));
  313. Status := ('Drinking ' + toStr(i + 1) + ' dose restore');
  314. proggy;
  315. MMouse(x, y, 2, 2);
  316. Mouse(x, y, 2, 2, True);
  317. clickmouse(x, y, mouse_left);
  318. Wait(1200);
  319. Result := True;
  320. exit;
  321. end; //else
  322. // WriteLn('Can''t drink Restore');
  323.  
  324. for i := 0 to high(potDTMs) do
  325. FreeDTM(potDTMs[i]);
  326. end;
  327. function Brew: Boolean;
  328. var
  329. x, y, i: Integer;
  330. potDTMs: TIntegerArray;
  331. begin
  332. potDTMs := [
  333. DTMFromString('mggAAAHicY2NgYJjGxMAwFYhnA3E/EM8E4klA/BYo9wSIPwDxZyB+CcTvgPjwQVOG40cCGebP0wTyGBlmzdRgOHrEg0ESyMOGGXFgCAAA4SsR4g=='),
  334. DTMFromString('mbQAAAHicY2VgYMhiguACIM4F4jQgrmNkYCgB4nogrgDiWiA+ctiJoba2jmHjel2GwweNwHxJoH50zIgFgwEAb8YNYQ=='),
  335. DTMFromString('mWAAAAHicY2FgYMhlYmBIZ4LQ2UCsw8jAoAfEhkBsBsQFBUUM5eUVDEVFxQwP7k9jkATqQcaMaBgEANvdCUo='),
  336. DTMFromString('mggAAAHicY2NgYHBkgmB3ILYEYhcgdgLiGkYGhkIgroXiEiBuBOIjh+wZamvrGObP02TYuF6XIS0tk+HIYScGSaBZ2DAjDgwBAEgfDkc=')
  337.  
  338. ];
  339.  
  340. for i := 0 to High(potDTMs) do
  341. if FindDTM(potDTMs[i], x, y, 548, 206, 737, 467) then
  342. begin
  343. Status := ('Drinking ' + toStr(i + 1) + ' dose Brew ');
  344. proggy;
  345. MMouse(x, y, 2, 2);
  346. Mouse(x, y, 2, 2, True);
  347. clickmouse(x, y, mouse_left);
  348. Wait(1200);
  349. Result := True;
  350. if (i >= 2) then
  351. begin
  352. // writeln ('Drank 3 or more brews so restoring');
  353. restore;
  354. break;
  355. end;
  356. end; //else
  357. // WriteLn('Can''t drink brew');
  358. for i := 0 to high(potDTMs) do
  359. FreeDTM(potDTMs[i]);
  360. end;
  361.  
  362.  
  363. begin
  364. setupsrl();
  365. mouseresetclientarea;
  366. imageresetclientarea;
  367. cleardebug;
  368. writeln('JStemper ~~ SS3 Thiever');
  369. repeat
  370. if (not isloggedin) then
  371. begin
  372. login;
  373. SetMeUp;
  374. end;
  375. if (isloggedin) then
  376. begin
  377. if (not incombat) then
  378. begin
  379. repeat
  380. thief;
  381. If VeryLowHp then teleport;
  382. until(not isloggedin) or (incombat)
  383. end;
  384. If (incombat) then
  385. begin
  386. If lowish_Hp then
  387. begin
  388. brew;
  389. end;
  390. If VeryLowHp then teleport;
  391. end;
  392. end;
  393. until(false)
  394. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement