fearlesskiller
2012-01-20 15:57:59
Hold on , ill post it soon, im using ACA v2 to make my attack way better
Edit1: never mind doesnt work properly for pest controls all colors look the same and when it doesnt find the color it just random click. Though with it i got the colors i needed and that only those monsters use so its perfect.
Edit2: Got an other problem, since the dragon scimi is red and the minions r red too , it keeps clicking on my scimitar… maybe i could work this out with uptext
Edit3: Nvm uptext wont work with that, could dtm work with this one ?
Edit1: never mind doesnt work properly for pest controls all colors look the same and when it doesnt find the color it just random click. Though with it i got the colors i needed and that only those monsters use so its perfect.
Edit2: Got an other problem, since the dragon scimi is red and the minions r red too , it keeps clicking on my scimitar… maybe i could work this out with uptext
Edit3: Nvm uptext wont work with that, could dtm work with this one ?
program new;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$i sps/sps.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';// Login name
Players[0].Pass := '';// Password
Players[0].Nick := '';// 3-4 letters of your name (Not the first one)
Players[0].Active:=True;
Players[0].Pin := '';// Bank pin
Players[0].BoxRewards := ['Xp'];// Random event reward
Smart_Server := 53;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
end;
Function FindObjectFX(Colors: TIntegerArray; Uptext: TStringArray; X1, Y1, X2, Y2, Width, Height, tol: integer; Click: Boolean): Boolean;
var
X, Y, I: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
SetLength(TPA, Length(Colors));
For I:= 0 To High(Colors) do
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], X1, Y1, X2, Y2, tol);
ATPA:= TPAToATPAEx(TPA, Width, Height);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if(Length(ATPA) = 0) then
Exit;
MiddleTPAEx(ATPA[0], X, Y);
if Click then
MMouse(x, y, 5, 5);
Wait(randomrange(200, 500));
If(IsUpTextMultiCustom(UpText)) then
begin
if Click then
begin
ClickMouse2(False);
wait(500);
if ChooseOptionMulti(UpText) then
begin
Result := True;
Exit;
end;
end else
Result := True
end else
Result:= (((X <> 0) and (Y <> 0)) and (Click = False)) ;
end;
Function GetInTheBoat: Boolean;
var
Info: String;
x, y:integer;
begin
Repeat
FindNormalRandoms;
if FindObj(x, y, 'ross', 3958665, 5) then
Info:= GetTextAtExWrap(9, 20, 147, 91, 0, 5, 2, 13421772, 3, SmallChars);
Result:= (ExecRegExpr('ext', Info) or ExecRegExpr('eparture', Info));
if Result then
Mouse(x, y, 2, 2, true);
wait (500+random(25));
Mouse(x, y, 3, 3, true);
break;
Until(Result);
writeln('In Boat');
end;
procedure GetToNpc;
Var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['6_15']);
while ((GetTextAtExWrap(6, 24, 75, 58, 0, 5, 2, 63488, 10, UpChars) <> '2000') or (ClickToContinue = False)) do
begin
wait(1);
if ((GetTextAtExWrap(6, 24, 75, 58, 0, 5, 2, 63488, 10, UpChars) = '2000') or (ClickToContinue = true)) then
break;
end;
writeln('In Pest Control');
myPath := [Point(2466, 6244), Point(2466, 6256), Point(2464, 6266),
Point(2462, 6277), Point(2461, 6289), Point(2463, 6298), Point(2462, 6312)];
SPS_WalkPath(myPath);
wait(3000+random(100));
MakeCompass('S')
SetAngle(SRL_ANGLE_HIGH)
end;
procedure FindAndClickColors;
var
colors: TIntegerArray;
b ,x, y: integer;
begin
colors := [1056265, 1195058, 924168, 1316673, 4083823, 1185084, 2898977]; // all colors you want
for b := 0 to (High(colors)) do
begin
if (FindColorTolerance(x, y, colors[b], MSX1, MSY1, MSX2, MSY2, 3)) then
begin
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
if isUpTextMultiCustom(['', '', '']) then
Break;
end;
end;
end;
begin
ClearDebug;
DeclarePlayers;
LoginPlayer;
GetInTheBoat;
GetToNpc;
FindAndClickColors;
end.

The two images used for testing the GetTextAtExWrap.