ive been wanting to learn how to script for awhile now, and i decided to give it a shot. i want to start out by doing something as simple as cutting down a tree, ive been looking at (Surajd's willow smasher banker) to base my 1st script off of.. but im having problems, i cant seem to get the mouse to move over a tree, instead all it does is click every few seconds without moving the mouse.
eventualy i want to edit and build on this to turn it into a log cutter and burner.
Code:program CutAndBurn; {.include SRL/SRL.scar} {.include SRL/SRL/Skill/Woodcutting.scar} var Loads: Integer; const Times = 2; WaitTime = 5000; TreeColor = 622696; procedure SetupScript; begin SetChat('Hide', 1); SetChat('Off', 2); SetChat('Off', 3); SetRun(true); GameTab(4); end; procedure CutTrees; begin if (FindMainColor(x, y, TreeColor, 3, true)) then begin repeat wait(1023 + random(323 * 5 / 2)); if (IsUpText('Chop down')) then MMouse(x, y, 1, 2); GetMousePos(x, y); Mouse(x, y, 1, 2, true); wait(WaitTime + Random(427 * 8 / 2 + 3 - 1)); until (InvFull); Loads := Loads +1 end; end; procedure MainLoop; begin repeat SetupScript; CutTrees; until (Times = Loads); Logout; Writeln('CutAndBurn Complete!'); end; begin Loads := 0 Writeln('CutAndBurn Scrapys TEST script'); SetupSRL; DisguiseScar('Notepad'); MainLoop; end.












