-Uses Auto Color Aid to detect Ivy for efficiency and accuracy.
Simba Code:
program Boms_IvyChopperPRO;
{$DEFINE SMART}
{$i srl\srl.simba}
var
XpGained, XpPerH, LVL,Nest, Nests, x, y, x1, y1 : Integer;
Const
FindNest = True; // Set to true for looking for bird's nest.
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
procedure AntiRandoms;
begin
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
if(not LoggedIn)then //It will log you out if you fail a random, so this will end the script
TerminateScript;
LampSkill := 'woodcutting'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the woddcutting skill
LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
end;
Procedure Antiban;
Begin
Case Random(250) Of
10: HoverSkill('Woodcutting', False); //Acts like a real human.. wtf >_<
20: HoverSkill('random', False); //Totally random hover
30: PickUpMouse;
40: Wait(2500 + random(1000)); //Small break
50: HoverSkill('Firemaking', False);
60: BoredHuman; //Acts like a IRL bored human! Very neat
70: RandomMovement; //Does what it says it does
80: RandomRClick;
end;
end;
Procedure MiniBreaker;
Begin
Case Random (500) Of
1: Wait(40000 + random(7400));
2: Wait(25500 + random(8550));
3: Wait(60040 + random(6759));
4: Wait(20400 + random(2549));
end;
end;
function AutoColorIvy: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.06);
If not (FindColorsTolerance(arP, 4091990, MSX1, MSY1, MSX2, MSY2, 9)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 63) and (R <= 110) and (G >= 83) and (G <= 142) and (B >= 45) and (B <= 79) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.76) and (X <= 17.23) and (Y >= 7.61) and (Y <= 22.87) and (Z >= 3.73) and (Z <= 10.73) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function ChopIvy:Boolean;
var
t, y:Integer;
begin;
t:=MSCX;
y:=MSCY;
FindNormalRandoms;
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('N');
begin
Result:=True;
Wait(300 + random(500));
begin
If FindObjTPA(t, Y, AutoColorIvy, 5, 1, 35, 60, 5, ['Ivy']) then
If (IsUpText('Chop')) and (IsUpText('Ivy')) Then
ClickMouse2(true);
Result:=WaitUpText('Walk', 18000+Random(15000));
end
end;
ClearDebug;
end;
procedure TakeNest;
var
i: Integer;
begin
if IsChatBoxTextAnyLine('A bird', 255) and FindNest then
if (FindObjEx(x1, y1, ['ake B', 'Bird', 'nest'], [2767422, 2961972, 3818051], 3, 50, 191, 149, 354, 252)) then
begin
if WaitUptext('Take', 600) then
begin
ClickMouse2(true);
Inc(Nests);
wait(500+random(1000));
for i := 0 to 7 do
begin
wait(200+random(100));
ExamineInv;
end;
wait(500+random(1000));
end;
end;
end;
procedure Progress_Report;
begin
ClearDebug;
XpGained := GetXPBarTotal - Players[CurrentPlayer].Integers[0];
XpPerH := Round(((XpGained) / (GetTimeRunning / 1000.0)) * 3600);
LVL := Players[CurrentPlayer].Level[SKILL_WOODCUTTING];
Writeln('This Script has Ran For: ' + TimeRunning);
Writeln('XP Gained So far: ' + IntToStr(XpGained));
Writeln('XP Per Hour: ' + IntToStr(XpPerH));
Writeln('Current LVL: ' + IntToStr(LVL));
end;
procedure MainLoop;
begin
repeat
ChopIvy;
begin
Progress_Report;
TakeNest;
Antiban;
Minibreaker;
end;
AntiRandoms;
Until not(LoggedIn);
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
MainLoop();
end.