Guest User

Untitled

a guest
Nov 1st, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 13.89 KB | None | 0 0
  1. //////////////////////////////////////////////////////////////////////////
  2. ///////////////////////// MY FIRST RUNESCAPE SCRIPT /////////////////
  3. ///////////////////////// ANY TREE ANYWHERE POWERCUTTER /////////////////
  4. ///////////////////////// SCRIPT BY YOHOJO /////////////////
  5. ///////////////////////// RELEASED NOVEMBER 12,2005 /////////////////
  6. ///////////////////////// QUESTIONS?COMMENTS?ADVICE? /////////////////
  7. ///////////////////////// THEN IM ME ON AIM: YOHOJO88 /////////////////
  8. ///////////////////////////////////////////////////////////////////////////
  9. {History
  10. V1.0 Working with no anti-ent and axe fix
  11. V1.1 Added more randome movements and made less detectable
  12. V1.2 Added crappy ent protection and axe fix
  13. V1.3 Added progress report!
  14. V1.4 Added form!
  15. V1.5 Added very sexy ent protection(hasn't been tested yet) and fixed axe
  16. head finding
  17. V1.6 Added PWENED'S axehead finding procedure which i edited a bunch to
  18. work with Si.Scar
  19. V1.7 S0oper Do0per Axe ehad fixer added. Worked if equiped or not =)!
  20. V1.8 Sharpened up axe fixing procedure even more. Should work perfect now
  21. V1.9 Made script logout after certain ammount of loads were cut.
  22. }
  23. program Powercutter;
  24. {.include si.scar}
  25. var
  26. x,y:integer;
  27. cut,dropped: Integer;
  28. UserName:string;
  29. PassWord:string;
  30. frmDesign : TForm;
  31. Label1 : TLabel;
  32. Label2 : TLabel;
  33. Label3 : TLabel;
  34. Button1 : TButton;
  35. a****sername : TEdit;
  36. asdfPassword : TEdit;
  37. const
  38. ///////////////////////////////////SETUP/////////////////////////////////////////////
  39. TreesColor1=1066044 ;//color of tree in gamescreen
  40. TreesColor2=1452064 ;//color of tree in gamescreen
  41. TreesColor3=1986624 ;//color of tree in gamescreen
  42. Equiped= False;//true for equpied false for not
  43. CutTime=6500;//Take it takes to walk to/cut down a tree(eggagerate it)
  44. LoadsToCut=15;//Number of loads you want to cut untill logging out
  45. LampSkill='WoodCutting';//What you want to use lamps on
  46. ///////////////////////////////END OF SETUP////////////////////////////////
  47.  
  48. procedure Tutorial1(senter: TObject);
  49. begin
  50. writeln('button pressed');
  51. frmDesign.Caption:=(frmDesign.Caption+('.'));
  52. frmDesign.ModalResult:= mrok
  53. end;
  54.  
  55.  
  56. Procedure ClickHumanA(xa, ya : integer; Click : boolean);
  57. begin {A little procedure PWND created to simluate human clicking }
  58. Holdmouse(xa, ya, click);
  59. wait(50 + random (50));
  60. Releasemouse(xa, ya, click);
  61. end;
  62.  
  63. Procedure Getaxecolor;
  64. var A1,A2,A3,H:Integer;
  65. begin
  66. Writeln('Getting axe and handle colors')
  67. Wait(300)
  68. if(Equiped=False)then
  69. begin
  70. Gametab(4);
  71. A1 := (Getcolor(590, 220))
  72. A2 := (Getcolor(590, 218))
  73. A3 := (Getcolor(587, 219))
  74. H := (Getcolor(579, 230))
  75. Writeln('Axe colors ' + inttostr(A1)+ ' ' + inttostr(A2) + ' ' + inttostr(A3))
  76. Writeln('Handle color ' + inttostr(H))
  77. end;
  78. if(Equiped=True)then
  79. begin
  80. Gametab(5);
  81. A1 := (Getcolor(595, 296))
  82. A2 := (Getcolor(597, 296))
  83. A3 := (Getcolor(594, 294))
  84. H := (Getcolor(586, 306))
  85. Writeln('Axe colors ' + inttostr(A1)+ ' ' + inttostr(A2) + ' ' + inttostr(A3))
  86. Writeln('Handle color ' + inttostr(H))
  87. end;
  88. end;
  89.  
  90. Function Axelost : boolean;
  91. var x, y,a1,a2,a3: integer;
  92. begin
  93. if(equiped=true)then
  94. gametab(5)
  95. If(findcolortolerance(x, y, A1, 560, 210, 740, 460, 5)) or
  96. (findcolortolerance(x, y, A2, 560, 210, 740, 460, 5)) or
  97. (findcolortolerance(x, y, A3, 560, 210, 740, 460, 5)) then
  98. result := true
  99. if(equiped=false)then
  100. gametab(4)
  101. If(findcolortolerance(x, y, A1, 560, 210, 740, 460, 5)) or
  102. (findcolortolerance(x, y, A2, 560, 210, 740, 460, 5)) or
  103. (findcolortolerance(x, y, A3, 560, 210, 740, 460, 5)) then
  104. result := true
  105. else
  106. result := false
  107. end;
  108.  
  109. Procedure FixTheAxe;
  110. Var x, y,a1,a2,a3,h : integer;
  111. begin
  112. if(Axelost = false)and
  113. (Equiped=False)then
  114. begin
  115. repeat
  116. if FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)or
  117. FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)or
  118. FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)then
  119. Mouse(x,y,2,2,true)
  120. if(not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)))or
  121. (not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)))or
  122. (not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)))then
  123. If(findcolortolerance(x, y, 1, 1, 5, 725, 160, 5))then
  124. Mouse(x, y,2,2,true)
  125. Flag;
  126. If FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)or
  127. FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)or
  128. FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)then
  129. Mouse(x, y,2,2,true)
  130. until((findcolortolerance(x, y, A1, 1, 1, 740, 460, 5)) or
  131. (findcolortolerance(x, y, A2, 1, 1, 740, 460, 5)) or
  132. (findcolortolerance(x, y, A3, 1, 1, 740, 460, 5)))
  133. begin
  134. if (FindObjEx(x, y,'Axe',560, 210, 740, 460,A1, 5, 300, 300,true))or
  135. FindObjEx(x, y,'Axe',560, 210, 740, 460,A2, 5, 300, 300,true)or
  136. FindObjEx(x, y,'Axe',560, 210, 740, 460,A3, 5, 300, 300,true)then
  137. Mouse(x, y,1,1,true)
  138. wait(500 + random(500))
  139. If(findcolortolerance(x, y, h, 565, 5, 725, 160, 5))then
  140. Mouse(x, y,2,2,true)
  141. end;
  142. end;
  143.  
  144.  
  145. if(Axelost = false)and
  146. (Equiped=True)then
  147. begin
  148. Gametab(5);
  149. if (findcolortolerance(x,y,H,560, 210, 740, 460, 5))then
  150. Mouse(x,y,2,2,true)
  151. Gametab(4);
  152. repeat
  153. if FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)or
  154. FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)or
  155. FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)then
  156. Mouse(x,y,2,2,true)
  157. if(not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)))or
  158. (not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)))or
  159. (not(FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)))then
  160. If(findcolortolerance(x, y, 1, 1, 5, 725, 160, 5))then
  161. Mouse(x, y,2,2,true)
  162. Flag;
  163. If FindObjEx(x, y,'Take A',1, 1, 740, 460,A1, 5, 300, 300,true)or
  164. FindObjEx(x, y,'Take A',1, 1, 740, 460,A2, 5, 300, 300,true)or
  165. FindObjEx(x, y,'Take A',1, 1, 740, 460,A3, 5, 300, 300,true)then
  166. Mouse(x, y,2,2,true)
  167. until((findcolortolerance(x, y, A1, 1, 1, 740, 460, 5)) or
  168. (findcolortolerance(x, y, A2, 1, 1, 740, 460, 5)) or
  169. (findcolortolerance(x, y, A3, 1, 1, 740, 460, 5)))
  170. begin
  171. if (FindObjEx(x, y,'Axe',560, 210, 740, 460,A1, 5, 300, 300,true))or
  172. FindObjEx(x, y,'Axe',560, 210, 740, 460,A2, 5, 300, 300,true)or
  173. FindObjEx(x, y,'Axe',560, 210, 740, 460,A3, 5, 300, 300,true)then
  174. Mouse(x, y,1,1,true)
  175. wait(500 + random(500))
  176. If(findcolortolerance(x, y, h, 565, 5, 725, 160, 10))then
  177. Mouse(x, y,2,2,true)
  178. end;
  179. end;
  180. end;
  181.  
  182. procedure Antirandoms;
  183. begin
  184. CheckRandoms(1,LampSkill,'N',false,false,srtAll)
  185. DropUseless;
  186. writeln('Checking Randoms');
  187. end;
  188.  
  189. Function Antient: boolean;//My own Ent Detection Function
  190. var
  191. ENTCHOP:integer;
  192. begin
  193. ENTCHOP := BitmapFromString(8, 16, 'z78DA3330A0377003025492' +
  194. '1895B844F08B136FF2F0564F6A7892175F431100009E0198F 1');
  195. begin
  196. if FindBitmapToleranceIn(ENTCHOP,x, y, 2, 3,366, 21,25)then
  197. result:=true;
  198. end;
  199. begin
  200. if (not(FindBitmapIn(ENTCHOP,x, y, 2, 3,366, 21)))then
  201. result:=false;
  202. end;
  203. end;
  204.  
  205. Procedure Check4Ent;//My own Ent Detection Procedure
  206. var cx,cy:integer;
  207. begin
  208. if(FindObj(cx, cy, 'Chop', TreesColor1, 5)) or
  209. (FindObj(cx, cy, 'Chop', TreesColor2, 5))or
  210. (FindObj(cx, cy, 'Chop', TreesColor3, 5))then
  211. Mouse(cx,cy,1,1,true)
  212. if (Antient=true) then
  213. begin
  214. writeln('!HOLY ****! Thats an ent!')
  215. Mouse(650, 90,3,3,true);
  216. wait(500+Random(500));
  217. Mouse(643, 74,3,3,True);
  218. wait (25000+Random(5000));
  219. end;
  220. if (Antient=false)then
  221. begin
  222. writeln('Entless Tree')
  223. end;
  224. end;
  225.  
  226.  
  227. procedure choptree1;
  228. var cx,cy:integer;
  229. begin
  230. if (not(FindObj(cx, cy, 'Chop', TreesColor1, 5))) or
  231. (not(FindObj(cx, cy, 'Chop', TreesColor2, 5)))or
  232. (not(FindObj(cx, cy, 'Chop', TreesColor3, 5)))then
  233. writeln('Could not find a tree. Please re-choose colors')
  234.  
  235. if FindObj(cx, cy, 'Chop', TreesColor1, 5) or
  236. FindObj(cx, cy, 'Chop', TreesColor2, 5)or
  237. FindObj(cx, cy, 'Chop', TreesColor3, 5)then
  238. Mouse(cx,cy,3,5,true);
  239. writeln('Tree Found')
  240. writeln('Chopping Tree..')
  241. wait(3000)
  242. if FindObj(cx, cy, 'Chop', TreesColor1, 5) then
  243. Movemousesmooth(cx,cy);
  244. if (not(FindObj(cx, cy, 'Chop', TreesColor1, 5)))then
  245. if FindObj(cx, cy, 'Chop', TreesColor2, 5)then
  246. Movemousesmooth(cx,cy);
  247. if (not(FindObj(cx, cy, 'Chop', TreesColor2, 5)))then
  248. if FindObj(cx, cy, 'Chop', TreesColor3, 5)then
  249. Movemousesmooth(cx,cy);
  250. Check4Ent;
  251. wait(cuttime+Random(500));
  252. Sendarrowsilentwait(3+random(4),500+Random(500));
  253. end;
  254.  
  255. procedure DropLogs;
  256. var x,y,dtmlogs, dropO:integer;
  257. begin
  258. writeln('Dropping Logs')
  259. repeat
  260. dtmLogs:= DTMFromString('78DA633CC4C4C0F090910119B4A4DA323C0 4D' +
  261. '220D1FF40C07800A8E626AA1A882C8C04D29B806A9E1250B3 07A8' +
  262. 'E61D0135E7816A5E10507316A8E6010135A7816AAEE357030 09B0' +
  263. 'B11B0');
  264. dropO := BitmapFromString(7, 14, 'z78DA3330182CC00D07C0A506' +
  265. 'BFF8C0AA24DE47C3090000FE4E7AA1');
  266.  
  267. if(findDTM(dtmlogs,x,y,560, 212, 736, 464))then
  268. mouse(x,y,5,5,false)
  269. Wait(200+Random(500));
  270. if (findbitmap(dropO,x,y))then
  271. Mouse(x,y,5,3,true)
  272. Wait(910+Random(500));
  273. until(not(findDTM(dtmlogs,x,y,560, 212, 736, 464)))
  274. cut:=cut+27
  275. dropped:=dropped+1
  276. writeln('All Logs Dropped')
  277. end;
  278.  
  279.  
  280. procedure off;
  281. begin
  282. SetChat('off', 1);
  283. SetChat('off', 2);
  284. SetChat('off', 3);
  285. end;
  286.  
  287. procedure ProgressReport;
  288. begin
  289. Writeln(' ');
  290. Writeln(' ');
  291. writeln(' Yohojos Any Tree Anywhere Powercutter Progress Report')
  292. writeln(' You have dropped ' +inttostr(cut)+' logs')
  293. writeln(' You have dropped ' +inttostr(dropped)+' load(s)')
  294. writeln(' You have worked for ' +ScriptTime2(2))
  295. Writeln(' You have Ran Away From ' + inttostr(gSiRandoms[4]) + ' Attacks');
  296. Writeln(' You have Solved ' + inttostr(gSiRandoms[7]) + ' Boxes');
  297. Writeln(' You have Talked To ' + inttostr(gSiRandoms[1]) + ' Randoms');
  298. Writeln(' You have Gained ' +inttostr(gSiRandoms[5]) + ' Levels');
  299. Writeln(' You have Completed '+inttostr(gSiRandoms[6]) +' Eye Tests');
  300. end;
  301.  
  302. procedure FinalProgressReport;
  303. begin
  304. Writeln(' ');
  305. Writeln(' ');
  306. writeln(' Yohojos Any Tree Anywhere Powercutter Final Progress Reprot')
  307. writeln(' !Your Autoing Sesion Has Been Completed!')
  308. writeln(' You have dropped ' +inttostr(cut)+' logs')
  309. writeln(' You have dropped ' +inttostr(dropped)+' load(s)')
  310. writeln(' You have worked for ' +ScriptTime2(2))
  311. Writeln(' You have Ran Away From ' + inttostr(gSiRandoms[4]) + ' Attacks');
  312. Writeln(' You have Solved ' + inttostr(gSiRandoms[7]) + ' Boxes');
  313. Writeln(' You have Talked To ' + inttostr(gSiRandoms[1]) + ' Randoms');
  314. Writeln(' You have Gained ' +inttostr(gSiRandoms[5]) + ' Levels');
  315. Writeln(' You have Completed '+inttostr(gSiRandoms[6]) +' Eye Tests');
  316. end;
  317.  
  318. procedure logout1;
  319. var x,y:integer;
  320. begin
  321. if(not(findcolorspiral(x,y,TreesColor1,1, 0,514, 336))
  322. or(findcolorspiral(x,y,TreesColor2,1, 0,514, 336))
  323. or(findcolorspiral(x,y,TreesColor3,1, 0,514, 336)))then
  324. Logout;
  325. end;
  326.  
  327. procedure InitForm;
  328. begin
  329. frmDesign := CreateForm;
  330. frmDesign.Left := 289;
  331. frmDesign.Top := 161;
  332. frmDesign.Width := 589;
  333. frmDesign.Height := 395;
  334. frmDesign.Caption := 'frmDesign';
  335. frmDesign.Color := clBtnFace;
  336. frmDesign.Font.Color := clWindowText;
  337. frmDesign.Font.Height := -11;
  338. frmDesign.Font.Name := 'WP MultinationalB Roman';
  339. frmDesign.Font.Style := [fsBold, fsItalic];
  340. frmDesign.Visible := False;
  341. frmDesign.PixelsPerInch := 96;
  342. Label1 := TLabel.Create(frmDesign);
  343. Label1.Parent := frmDesign;
  344. Label1.Left := 51;
  345. Label1.Top := 30;
  346. Label1.Width := 95;
  347. Label1.Height := 24;
  348. Label1.Alignment := taCenter;
  349. Label1.Caption := 'User Name';
  350. Label1.Font.Color := clWindowText;
  351. Label1.Font.Height := -20;
  352. Label1.Font.Name := 'MS Sans Serif';
  353. Label1.Font.Style := [];
  354. Label1.ParentFont := False;
  355. Label2 := TLabel.Create(frmDesign);
  356. Label2.Parent := frmDesign;
  357. Label2.Left := 450;
  358. Label2.Top := 30;
  359. Label2.Width := 91;
  360. Label2.Height := 24;
  361. Label2.Alignment := taCenter;
  362. Label2.Caption := 'Pass Word';
  363. Label2.Font.Color := clWindowText;
  364. Label2.Font.Height := -20;
  365. Label2.Font.Name := 'Times';
  366. Label2.Font.Style := [];
  367. Label2.ParentFont := False;
  368. Label3 := TLabel.Create(frmDesign);
  369. Label3.Parent := frmDesign;
  370. Label3.Left := 450;
  371. Label3.Top := 47;
  372. Label3.Width := 33;
  373. Label3.Height := 14;
  374. Label3.Caption := '(Its Bleeped Out)';
  375. Label3.Font.Color := clWindowText;
  376. Label3.Font.Height := -11;
  377. Label3.Font.Name := 'Times';
  378. Label3.Font.Style := [fsBold, fsItalic];
  379. Label3.ParentFont := False;
  380. Button1 := TButton.Create(frmDesign);
  381. Button1.Onclick:=@Tutorial1;
  382. Button1.Parent := frmDesign;
  383. Button1.Left := 261;
  384. Button1.Top := 261;
  385. Button1.Width := 78;
  386. Button1.Height := 25;
  387. Button1.Caption := 'Start Chopping';
  388. Button1.TabOrder := 8;
  389. a****sername := TEdit.Create(frmDesign);
  390. a****sername.Parent := frmDesign;
  391. a****sername.Left := 41;
  392. a****sername.Top := 60;
  393. a****sername.Width := 121;
  394. a****sername.Height := 30;
  395. a****sername.Font.Color := clWindowText;
  396. a****sername.Font.Height := -20;
  397. a****sername.Font.Name := 'Times New Roman';
  398. a****sername.Font.Style := [];
  399. a****sername.ParentFont := False;
  400. a****sername.TabOrder := 9;
  401. a****sername.Text := '';
  402. asdfPassword := TEdit.Create(frmDesign);
  403. asdfPassword.Parent := frmDesign;
  404. asdfPassword.Left := 440;
  405. asdfPassword.Top := 60;
  406. asdfPassword.Width := 121;
  407. asdfPassword.Height := 29;
  408. asdfPassword.Font.Color := clWindowText;
  409. asdfPassword.Font.Height := -20;
  410. asdfPassword.Font.Name := 'Wingdings 3';
  411. asdfPassword.Font.Style := [fsBold, fsItalic];
  412. asdfPassword.ParentFont := False;
  413. asdfPassword.TabOrder := 10;
  414. asdfPassword.Text := '';
  415. end;
  416.  
  417. procedure SafeInitForm;
  418. var
  419. v: TVariantArray;
  420. begin
  421. setarraylength(V, 0);
  422. ThreadSafeCall('InitForm', v);
  423. end;
  424.  
  425.  
  426.  
  427. procedure ShowFormModal;
  428. begin
  429. frmDesign.ShowModal;
  430. end;
  431.  
  432. procedure SafeShowFormModal;
  433. var
  434. v: TVariantArray;
  435. begin
  436. setarraylength(V, 0);
  437. ThreadSafeCall('ShowFormModal', v);
  438. end;
  439.  
  440. procedure FormNames;
  441. begin
  442. username:=a****sername.text
  443. password:=asdfpassword.text
  444. end;
  445.  
  446. begin
  447. SafeInitForm;
  448. SafeShowFormModal;
  449. FormNames;
  450. activateclient;
  451. LoadInclude('Windows Media Player');
  452. SetAccount(1,UserName,PassWord);
  453. Login(1)
  454. wait(1000)
  455. off;
  456. Getaxecolor;
  457. repeat
  458. Antirandoms;
  459. Choptree1;
  460. FixTheAxe;
  461. wait(10);
  462. if(InvCount = 28)then
  463. ProgressReport;
  464. if(InvCount = 28)then
  465. DropLogs
  466. until(dropped>=(LoadsToCut));
  467. Logout;
  468. FinalProgressReport;
  469. Terminatescript;
  470. end.
Add Comment
Please, Sign In to add comment