Cigue
2010-01-09 23:28:11
Just wrote this. I don't have high expectations for this basic script, but the basic idea is very sound : a bank procedure for Lumbridge Chest.
In plain text, it searches for lumbridge chest color starting one square east of character, if it finds it it opens chest and enter pin.
In plain text, it searches for lumbridge chest color starting one square east of character, if it finds it it opens chest and enter pin.
function Bank_OpenLumbridgeChest : Boolean;
var
OneSqEast, ChestPoint: TPoint;
ChestPoints: TPointArray;
ChestPointsBox: T2DPointArray;
i, HighChest: Integer;
begin
SetAngle(True);
OneSqEast.x := MSCX + Round(50 * Cos(rs_GetCompassAngleRadians));
OneSqEast.y := MSCY - Round(50 * Sin(rs_GetCompassAngleRadians));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.76);
FindColorsSpiralTolerance(OneSqEast.x, OneSqEast.y, ChestPoints, 6190467, MSX1, MSY1, MSX2, MSY2, 5);
ChestPointsBox := TPAtoATPAEx(ChestPoints, 10, 10);
HighChest:=High(ChestPointsBox);
DebugATPA(ChestPointsBox, '');
for I := 0 to HighChest do
begin
ChestPoint:=MiddleTPA(ChestPointsBox[i]);
MMouse(ChestPoint.x, ChestPoint.y, 5, 5{Tols could be (HighChest-[i]), (HighChest-[i])});
Wait(175+Random(50));
if IsUpText('hest') then
begin
GetMousePos(ChestPoint.x, ChestPoint.y);
Mouse(ChestPoint.x, ChestPoint.y, 0, 0, True);
Wait(150+Random(100));
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if BankScreen then Result := True;
Break;
end;
if (i = HighChest + 1) then
Result := False;
Break;
end;
end;