i need to bot!
01-24-2012, 08:07 PM
Yeya everyone :) i have actually been really enjoying Simba, and started on this new script; but i get the error: 'Invalid number of parameters at line 175'.. here is the script
program MehScript;
{$DEFINE Smart}
{$i srl/srl.simba}
{$i SRL/SRL/misc/paintsmart.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Farming';
Active := True;
LoginPlayer
end;
end;
var
x, y: integer;
function BankColour: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.49);
if not (FindColorsTolerance(arP, 4664116, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no result(bankcolour).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
procedure bankbanker;
begin
if findobjcustom(x, y, ['ank'], [BankColour], 2) then
begin
Mouse(x, y, 0, 0, false);
chooseoption ('Bank Banker');
wait (10000+ random (500));
depositall;
if (bankscreen) then
end;
end;
function Vial: boolean;
var
x, y, Vial01: Integer;
begin
Result := (false);
Vial01 := DTMFromString('maQEAAHicrcvLCYBADIThqBXY3B6sUVhfK+ Kqq9iMZfgf5iB41MAXApkpzWxGwIAeLRp43UGZhBMHdmxYsWBE rU6nzoSoXHp0on5BWa+ucxU7/+Qq7PNkP3jNDVIBGo8=');
begin
if FindDTM(Vial01, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln ('found vial in bank!');
Mouse (x, y, 0, 0, false);
ChooseOption ('ithdraw-ll');
freeDTM (Vial01);
Wait(1000+Random(300));
Closebank;
end;
end;
end;
function Vial2: boolean;
var
x, y, Vial02: Integer;
begin
Result := (false);
Vial02 := DTMFromString('maQEAAHicrcvLCYBADIThqBXY3B6sUVhfK+ Kqq9iMZfgf5iB41MAXApkpzWxGwIAeLRp43UGZhBMHdmxYsWBE rU6nzoSoXHp0on5BWa+ucxU7/+Qq7PNkP3jNDVIBGo8=');
begin
if FindDTM(Vial02, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln ('found vial in inventory!');
Mouse (x, y, 0, 0, true);
freeDTM (Vial02);
Wait(1000+Random(300));
end;
end;
end;
function WalkToBank: boolean;
var
x, y, Location1: Integer;
begin
Result := (false);
Location1 := DTMFromString('mlwAAAHicY2dgYGhnYmAwg2I7KC4H4iogdg LKBwBxMBCHAHE4EBtC8Uc2JpzYCCiPCzPiwVAAAH0sDJw=');
begin
if FindDTM(Location1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln ('found location!');
Mouse (x, y, 0, 0, true);
freeDTM (Location1);
Wait(1000+Random(300));
MakeCompass('S');
end;
end;
end;
function FountC(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 3.26);
if not(FindColorsTolerance(arP, 15574402, MSX1, MSY1, MSX2, MSY2, 6)) then
begin
Writeln('Failed to find the color, no object found.(fountain)');
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
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Take')) 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.(fountain)');
Exit;
end;
GetMousePos(fx, fy);
end;
procedure fountainclick;
begin
if findobjcustom (x, y, ['Foun'], [FountC], 2) then
begin
Mouse(x, y, 0, 0, true);
wait (20000+random (1000));
end;
end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
bankbanker;
Vial;
Vial2;
fountainclick;
WalkToBank;
until (invcount > 28);
end.
i don't understand what has gone wrong :( does anyone know how I can fix this xD
thanks! :D
note: would it be possible to say wait until (bankscreen)?
program MehScript;
{$DEFINE Smart}
{$i srl/srl.simba}
{$i SRL/SRL/misc/paintsmart.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Farming';
Active := True;
LoginPlayer
end;
end;
var
x, y: integer;
function BankColour: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.49);
if not (FindColorsTolerance(arP, 4664116, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no result(bankcolour).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
procedure bankbanker;
begin
if findobjcustom(x, y, ['ank'], [BankColour], 2) then
begin
Mouse(x, y, 0, 0, false);
chooseoption ('Bank Banker');
wait (10000+ random (500));
depositall;
if (bankscreen) then
end;
end;
function Vial: boolean;
var
x, y, Vial01: Integer;
begin
Result := (false);
Vial01 := DTMFromString('maQEAAHicrcvLCYBADIThqBXY3B6sUVhfK+ Kqq9iMZfgf5iB41MAXApkpzWxGwIAeLRp43UGZhBMHdmxYsWBE rU6nzoSoXHp0on5BWa+ucxU7/+Qq7PNkP3jNDVIBGo8=');
begin
if FindDTM(Vial01, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln ('found vial in bank!');
Mouse (x, y, 0, 0, false);
ChooseOption ('ithdraw-ll');
freeDTM (Vial01);
Wait(1000+Random(300));
Closebank;
end;
end;
end;
function Vial2: boolean;
var
x, y, Vial02: Integer;
begin
Result := (false);
Vial02 := DTMFromString('maQEAAHicrcvLCYBADIThqBXY3B6sUVhfK+ Kqq9iMZfgf5iB41MAXApkpzWxGwIAeLRp43UGZhBMHdmxYsWBE rU6nzoSoXHp0on5BWa+ucxU7/+Qq7PNkP3jNDVIBGo8=');
begin
if FindDTM(Vial02, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln ('found vial in inventory!');
Mouse (x, y, 0, 0, true);
freeDTM (Vial02);
Wait(1000+Random(300));
end;
end;
end;
function WalkToBank: boolean;
var
x, y, Location1: Integer;
begin
Result := (false);
Location1 := DTMFromString('mlwAAAHicY2dgYGhnYmAwg2I7KC4H4iogdg LKBwBxMBCHAHE4EBtC8Uc2JpzYCCiPCzPiwVAAAH0sDJw=');
begin
if FindDTM(Location1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln ('found location!');
Mouse (x, y, 0, 0, true);
freeDTM (Location1);
Wait(1000+Random(300));
MakeCompass('S');
end;
end;
end;
function FountC(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 3.26);
if not(FindColorsTolerance(arP, 15574402, MSX1, MSY1, MSX2, MSY2, 6)) then
begin
Writeln('Failed to find the color, no object found.(fountain)');
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
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Take')) 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.(fountain)');
Exit;
end;
GetMousePos(fx, fy);
end;
procedure fountainclick;
begin
if findobjcustom (x, y, ['Foun'], [FountC], 2) then
begin
Mouse(x, y, 0, 0, true);
wait (20000+random (1000));
end;
end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
bankbanker;
Vial;
Vial2;
fountainclick;
WalkToBank;
until (invcount > 28);
end.
i don't understand what has gone wrong :( does anyone know how I can fix this xD
thanks! :D
note: would it be possible to say wait until (bankscreen)?