Hey guys, some of you may know me from the IRC chat.
Anyway, I'm making this thread cause I'm having trouble adding support for other trees in my script. I have an idea, though.
Here's the script.
Now, that works nicely. All I want to do is add support for Oaks, Willows and Yews. I sort of have an idea on how to do this, but I'm not exactly sure. My guess would be to make a separate procedure for each tree type, then call some if - then statements, but I don't really know. Any help on adding these would be greatly appreciated.Code:program Woodcutter; {$i srl/srl/misc/Smart.scar} {.include SRL/SRL.scar} {.include SRL/SRL/Skill/WoodCutting.scar} var x, y: integer; Loads: Integer; ChopTime: Integer; TreesChopped: Integer; Dropper: Integer; Procedure DeclarePlayers; begin HowManyPlayers := 1; NumberOfPlayers(HowManyPlayers); CurrentPlayer := 0; Players[0].Name := ''; //RS Username Players[0].Pass := ''; //RS Password Players[0].Nick := ''; //4 letters of Username Players[0].Active := True; Players[0].Integers[0] := 30; //Number of loads you want to do end; //*************************************************\\ ///////////////DON'T TOUCH BELOW HERE!\\\\\\\\\\\\\\\\ //***************************************************\\ procedure AntiRandoms; begin if not LoggedIn then Exit; FindNormalRandoms; // find random events end; procedure AntiBan; begin case random(100) of //do a random number so it won't always perform the antiban 0: RandomRClick; 1: BoredHuman; 2: HoverSkill('Woodcutting', False); end; end; Procedure CutWood; begin if not LoggedIn then Exit; MakeCompass('N'); repeat if FindObjCustom(x, y, ['ree'], [3164510, 3690597, 4020077], 25) then begin Mouse(x,y,0,0,false); Wait(40 + (random(20))); ChooseOption('hop'); end; until(InvFull) end; Procedure Report; Begin cleardebug; Writeln(' Lets Cut Wood ') Writeln(' Worked For ' + TimeRunning); Writeln(' Chopped ' + IntToStr(TreesChopped)); Writeln(' Dropped(by loads) ' + IntToStr(Dropper)); Writeln(' By Gooner '); End; //////Thanks to DeSnob for this function\\\\\\ Function IsChopping: Boolean; begin if (PixelShift(PointToBox(Point(MSCX-10, MSCY-10), Point(MSCX+10, MSCY+10)), + RandomRange(100, 200)) > 100) then MarkTime(ChopTime); Result := (TimeFromMark(ChopTime) < RandomRange(750, 1500)); end; begin if not (LoggedIn) then Exit; ActivateClient; SetUpSRL; DeclarePlayers; Report; LoginPlayer; LevelUp; while(Loads <= (Players[CurrentPlayer].Integers[0]))do begin repeat CutWood; while (IsChopping) do Wait(500 + Random(100)); until InvFull; DropAllExcept([1]); Inc(Loads); end; end.
Also, Coh3n, if you happen to see this, I read the tutorial you showed me and followed it correctly, but it just wouldn't compile, no matter what I did.
Also, feel free to post errors/suggestions.
Thanks!



Reply With Quote










