SRL Archive - OSR Help

Asking for help yet again...


Failure

2011-12-07 01:11:03

Hai there, again haha :p

So here we go, sometimes my Script finds his color

But moves next to him so my Script messes up and my loops arn't the best look at this.

//Trading Bob
BobShop;
Begin
Repeat
MMouse(x, y, 0, 0);
Until FindColorTolerance(x, y, 121819, 60, 9, 92, 21, 10) or
FindColorTolerance(x, y, 56539, 60, 9, 92, 21, 10) or
FindColorTolerance(x, y, 909279, 60, 9, 92, 21, 10) or
(TimeFromMark(LoopBegin) >= 300000)

It keeps moving the mouse until it finds some of Bob his colors, until it finds the Yellow UpText sometimes it does find it but it's miss-clicked then and then it messes up, how could I make this accurate? sometimes the same color appears and that isn't Bob's color, and it keeps moving to there is is there a way like let's say, if it moved to the color that isn't Bob so it doesn't find the Yellow UpText it goes for the same color but on another position?

Flight

2011-12-07 01:13:48

What Bob are we talking about? Tell me where this guy is in Runescape and I'll get the colors and use my own object-finding functions to make sure they work.

Failure

2011-12-07 01:20:41

From: Flight
What Bob are we talking about? Tell me where this guy is in Runescape and I'll get the colors and use my own object-finding functions to make sure they work.


Not in real Runescape, still improving myself with methods to do in a Private Server so I do not have to worry about a ban etc, or might I have to but I can't care about it then :p

KingKong

2011-12-07 02:25:16

use findcolorstolerance, then combine all the TPA's and then sort them (10-15 pixels should do?) then use middletpa(or something like that) then mouse there and then check for uptext

Failure

2011-12-07 02:42:54

From: KingKong
use findcolorstolerance, then combine all the TPA's and then sort them (10-15 pixels should do?) then use middletpa(or something like that) then mouse there and then check for uptext


Ehh, never used TPA seems a bit high grabbed for me, could you provide me with a example?

weequ

2011-12-07 13:03:54

From: Failure
Ehh, never used TPA seems a bit high grabbed for me, could you provide me with a example?


program TPAColorFinding;
{.include SRl\SRL.scar}

const
COLOR = 0;
TOLERANCE = 0;

var
X, Y, I: Integer;
TPA: TPointArray;//= Array of TPoint
ATPA: T2DPointArray;//=Array of TPointArray = Array of array of TPoint

begin
WriteLn('TPA Example');
Wait(3000);
FindColorsTolerance(TPA, COLOR, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
ATPA := TPAtoATPA(TPA, 25);//Splits the TPA to multiple TPA's with a given distance.
for I := 0 to Length(ATPA)-1 do
begin
if (Length(ATPA[I]) < 10) then Exit;
MiddleTPAEx(ATPA[I], X, Y);//Calculates average point of the TPointArray.
MMouse(X, Y, 0, 0);
if IsUpText('UPTEXT here') then
begin
Mouse(X, Y, 0, 0, True);
Exit;
end;
end;
end.

Failure

2011-12-07 14:01:22

From: weequ

program TPAColorFinding;
{.include SRl\SRL.scar}

const
COLOR = 0;
TOLERANCE = 0;

var
X, Y, I: Integer;
TPA: TPointArray;//= Array of TPoint
ATPA: T2DPointArray;//=Array of TPointArray = Array of array of TPoint

begin
WriteLn('TPA Example');
Wait(3000);
FindColorsTolerance(TPA, COLOR, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
ATPA := TPAtoATPA(TPA, 25);//Splits the TPA to multiple TPA's with a given distance.
for I := 0 to Length(ATPA)-1 do
begin
if (Length(ATPA[I]) < 10) then Exit;
MiddleTPAEx(ATPA[I], X, Y);//Calculates average point of the TPointArray.
MMouse(X, Y, 0, 0);
if IsUpText('UPTEXT here') then
begin
Mouse(X, Y, 0, 0, True);
Exit;
end;
end;
end.


Thanks, I will domy best to study might you can explain me a few things… Since I do not can use UpText, but I do this

//Trading Bob
BobShop;
Begin
Repeat
MMouse(x, y, 0, 0);
Until FindColorTolerance(x, y, 121819, 60, 9, 92, 21, 10) or
FindColorTolerance(x, y, 56539, 60, 9, 92, 21, 10) or
FindColorTolerance(x, y, 909279, 60, 9, 92, 21, 10) or
(TimeFromMark(LoopBegin) >= 300000)
but then it gets the color from above the yellow text. :p

I willdomy best, whenever I need help I'll shoot you a PM it's time to experiment with this!