There is indeed a skill specific section.
Simba > Includes > SRL > SRL > Skill > Runecrafting.simba
Not against the idea, just have a few queries about your TPA function I'd like you to clear up
Simba Code:
function Siphon(EsslingUpText:TStringArray; Color, Tol:integer; Hue, Sat:extended): Boolean;
var
Data:TIntegerArray;
TPA: TPointArray;
ATPA: Array of TPointArray;
Box:Tbox;
x,y: Integer;
begin
SetLength(Data, 4); // why u no use Data[2]? :(
Data[3]:=GetColorToleranceSpeed;
ColorToleranceSpeed(2); // changes to 2
ColorToleranceSpeed(Data[3]); // then immediately changed it back?
ATPA:= TPAToATPAEx(TPA, 15, 15); //no finding color anywhere to make TPA?
Data[1]:=High(ATPA);
for Data[0] := 0 to Data[1] do
begin
MiddleTPAEx(ATPA[Data[0]], x, y);
Box.X1:=x; //Lots of code
Box.Y1:=y; // that could be replaced with
Box.X2:=x+2; // MMouse(x,y,2,2);
Box.Y2:=y+2; //
MouseTBox(Box, Move); //
if WaitUpTextMulti(EsslingUptext, 300) then
begin
case Random(2) of
0: begin
ClickMouse2(True);
if(DidRedClick())then
Wait(RandomRange(28000, 32000));
Break;
end;
1: begin
ClickMouse2(False); // right click then just wait 28sec?
Wait(Randomrange(28000, 30000))
else // no if..then?
FindRandoms;
Break;
end;
end;
begin // un-neccessary begin
Result:= True;
end; // and end
end;
end;
end;
Got kind of bored so I filled in what I think the blanks should be.
Simba Code:
function Siphon(UpText: TStringArray; Color, Tol: Integer; HMod, SMod: Extended): Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
CTS, i, x, y: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(HMod, SMod);
if FindColorsSpiralTolerance(x, y, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tol) then
begin
SortTPAFrom(TPA, Point(MSCx, MSCy));
ATPA := TPAToATPAEx(TPA, 15, 15);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, RandomRange( - 2, 2), RandomRange( - 2, 2));
if WaitUpTextMulti(UpText, 1500) then
begin
case Random(2) of
0:
begin
ClickMouse2(True);
if (DidRedClick()) then
begin
Result := True;
Wait(RandomRange(28000, 32000));
Break;
end
else
begin
FindNormalRandoms;
Result := False;
end;
end;
1:
begin
ClickMouse2(False);
if WaitOption('ipho', 1500) then
begin
Result := True;
Wait(Randomrange(28000, 30000));
Break;
end
else
begin
FindNormalRandoms;
Result := False;
end;
end;
end;
end;
end;
end;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;