Simba Code:
program ScriptKidIvy;
{.include SRL\SRL.simba}
var
fx, fy: Integer;
Const
Server = 0; // Enter "0" to pick a random server.
Members = True; // Set to true if using an RS-Members account. False if f2p.
BreakEvery = 119; //How Many Minutes To Break After
BreakFor = 11; //How Long To Break For
Version = '1.0';
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start autoing with! (0 means first char)
procedure DeclarePlayers; //This declares the players to be used in the script.
var i:integer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Your Runescape username
Pass := ''; //Your Runescape password
Nick := ''; //3 or 4 lowercase letters from your Runescape username. Used as a Nickname.
Active := True; //Set to true if you want to use this player. Set to False to disable this player.
Pin := ''; //Leave blank if the player doesn't have a Bank PIN.
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(5500 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(4500 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('random', False); GameTab(28); End;
End;
End;
function FindObject(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.15);
if not(FindColorsTolerance(arP, 2967888, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
//Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Chop Ivy')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
//Writeln('FindObject could not find object.');
Exit;
end;
end;
Procedure ChopIvy;
Begin;
FindObject(fx, fy);
GetMousePos(fx, fy);
Mouse(fx, fy, 5, 5, True);
wait(30000);
end;
begin
SetupSRL;
DeclarePlayers;
Antiban;
FindObject(fx, fy);
Repeat
ChopIvy;
Until(false);
end.
After I start it up, clicks first ivy fine. But the script stops and says this..
Quote:
SRL Compiled in 0 msec
Exception: Range check error at line 68
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
//E: So I got rid of the range check error but now my script doesn't do anything and bitmaps aren't freed? Can someone help me fix this please?