kingob
01-27-2012, 03:57 AM
So I am currently messing around with Simba by going through scripts, looking for things that I dont understand and then trying to figure them out by using the Function, Procedure etc in a different place in runescape so that I am forced to change it. It has been working out well so far and I have learnt a bunch of new stuff, but this has been bugging me.
I have started using the DTM editor to find unique colours in places that seem to be all the same colour e.g. Astral Alter all the rocks are the same colour or in Lumbridge Caves all the stepping stones are the same Colour as the ground. But here I actually managed to find some unique colours up to a tolerance of 5. But when I try them out using a function from one of Flights scripts it is not able to find the unique colours.
Any help would be appreciated as I have been messing around with this one test for about 2 hours!
Thanks!
AColours := [9147026, 8748931, 9278355];
Function FindAltar(Var X,Y: Integer): Boolean;
var
B: TBox;
Loop: Boolean;
TPA: TPointArray;
Hmod,Smod: Extended;
L,i,Tol,CTS,Col,F,MSP: Integer;
ATPA: T2DPointArray;
label
Start;
begin
Result := False;
Loop := False;
CTS := GetColorToleranceSpeed;
Start:
ColorToleranceSpeed(2);
ReturnValues(AColours, Hmod, Smod, Col, Tol);
SetColorSpeed2Modifiers(Hmod, SMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 20, 20);
SortATPAFrom(ATPA, Point(MSCX,MSCY));
L := High(ATPA);
SetArrayLength(ATPA, L+1);
for i := 0 to L do
begin
if (GetArrayLength(ATPA[i]) > 30) then
begin
B := GetTPABounds(ATPA[i]);
MiddleTPAEx(ATPA[i], X, Y);
MSP := MouseSpeed;
MouseSpeed := (RandomRange(26, 33));
HumanMMouse(X, Y, 15, 15);
MouseSpeed := MSP;
if WaitUpTextMulti(['-rune', 'unec', 'rafting'], 555) then
begin
Result := True;
GetMousePos(X, Y);
Exit;
end else
begin
Inc(F);
if (F > 7) then
Exit;
Loop := True;
Break;
end;
end;
end;
if Loop then
goto Start;
end;
I have started using the DTM editor to find unique colours in places that seem to be all the same colour e.g. Astral Alter all the rocks are the same colour or in Lumbridge Caves all the stepping stones are the same Colour as the ground. But here I actually managed to find some unique colours up to a tolerance of 5. But when I try them out using a function from one of Flights scripts it is not able to find the unique colours.
Any help would be appreciated as I have been messing around with this one test for about 2 hours!
Thanks!
AColours := [9147026, 8748931, 9278355];
Function FindAltar(Var X,Y: Integer): Boolean;
var
B: TBox;
Loop: Boolean;
TPA: TPointArray;
Hmod,Smod: Extended;
L,i,Tol,CTS,Col,F,MSP: Integer;
ATPA: T2DPointArray;
label
Start;
begin
Result := False;
Loop := False;
CTS := GetColorToleranceSpeed;
Start:
ColorToleranceSpeed(2);
ReturnValues(AColours, Hmod, Smod, Col, Tol);
SetColorSpeed2Modifiers(Hmod, SMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 20, 20);
SortATPAFrom(ATPA, Point(MSCX,MSCY));
L := High(ATPA);
SetArrayLength(ATPA, L+1);
for i := 0 to L do
begin
if (GetArrayLength(ATPA[i]) > 30) then
begin
B := GetTPABounds(ATPA[i]);
MiddleTPAEx(ATPA[i], X, Y);
MSP := MouseSpeed;
MouseSpeed := (RandomRange(26, 33));
HumanMMouse(X, Y, 15, 15);
MouseSpeed := MSP;
if WaitUpTextMulti(['-rune', 'unec', 'rafting'], 555) then
begin
Result := True;
GetMousePos(X, Y);
Exit;
end else
begin
Inc(F);
if (F > 7) then
Exit;
Loop := True;
Break;
end;
end;
end;
if Loop then
goto Start;
end;