This is a Procedure I'm using in my Hill Giant script... but I have no idea why
Is being highlighted... to be more convenient I have added the whole procedure, but because I am going to apply this for Putonajonny's Scripting Compertition I cannot post the whole script. If you NEED the whole script PM me (Please no 3 post count Registered Users...)
Simba Code:
procedure SwagPicker; // Picks Up: Runes (all of them) and Coins (all stacks) -> Working on more
var
Col, Hue, Sat, Tol, a, tmpCTS: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if (WerePoor = True) then // If you selected True up in the Const, then you will be Picking Up Items off of the Ground
begin // All of this is from ACA Color Finder by Nielsie95 and Sumulion
case Swag of
'Runes' : begin // Sorry, but it's just more convenient (linewise) to pick them all up
Col := 11711143; // Color
Hue := 5.35; // Hue
Sat := 0.32; // Saturation
Tol := 9; // Tolerance
end;
'Coins' : begin // Whether it be 2GP or 3M it should pick it up...
Col := 4905207; // Color
Hue := 0.72; // Hue
Sat := 4.24; // Saturation
Tol := 2; // Tolerance
end;
end; // Until I can get around the finicky Colors of these other Items
{ 'Iron Kite' : begin
Col :=
Hue :=
Sat :=
Tol :=
end;
'Stell Helm' : begin
Col :=
Hue :=
Sat :=
Tol :=
end;
'Limpwurt Root' : begin
Col :=
Hue :=
Sat :=
Tol :=
end;
IN DEVELOPEMENT
}
end;
begin
if(not(LoggedIn))then Exit; // If you aren't Logged In it Exits (To get to a Multiplayer Change)
if (invfull) then Exit; // If your Inventory is Full then it Exits (To get to a Banking Loop)
tmpCTS := GetColorToleranceSpeed; // Gets the CTS
ColorToleranceSpeed(2); // We click 2 in the ACA Color Finder
SetColorSpeed2Modifiers(6.91, 6.67); // Hue then Saturation Modifiers
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol); // Finds the Swag in the Runescape Mainscreen (Varied Tolerance)
SortTPAFrom(TPA, Point(MSCX, MSCY)); // Sorts the TPA
ATPA := TPAtoATPAEx(TPA, 2, 2); // Finds the Swag using a Box of 2x2 Pixels of the same Color
for a := 0 to High(ATPA) do
begin
if (IsUpTextMultiCustom(['ake', 'oins', 'unes'])) then // Multiple possibilities of Uptext for the Swag
begin
result := True; // If it finds the Swag then...
ClickMouse2(False) // Right Clicks rather than Left Clicks
ChooseOption('ake'); // Chooses the Option 'Take'
Break; // Straightforward...
WriteLn('We picked up some Swag!'); // If it doesn't say this, something went wrong
end;
end;
ColorToleranceSpeed(tmpCTS); // Defaults the CTS
SetColorSpeed2Modifiers(0.22, 0.22); // Resets the Hue and Saturation Modifiers
end;
end;
Thanks for your time!