SRL Archive - Help and Support

Find ShopKeeper if covered


Bobarkinator

2007-03-18 15:45:04

In my eye of newt buyer I am looking for a way to find the shopkeeper even if she is covered. Is there a color on all players(not npc's) that is constant. That way I can move to all the players looking for UpText of 'etty'.

bullzeye95

2007-03-18 16:14:04

I don't believe there is a constant color, but what you could do is move to the round white dot on the minimap and move the mouse to where your player is.

Bobarkinator

2007-03-18 16:16:05

From: bullzeye95
I don't believe there is a constant color, but what you could do is move to the round white dot on the minimap and move the mouse to where your player is.


I'll try it

solemn wishes

2007-03-22 15:00:23

try this, just change the colors and the variable names and ure set, it works well i beleive…..not fully tested



function findbetty:boolean;
var
betty : array[1..4] of Integer;
tol, i : integer;

begin
betty[1]:= 6686823
betty[2]:= 1052692
betty[3]:= 1695199
betty[4]:= 5769305

i:=random(4)+1;
repeat

if FindObj(x, y, 'Betty', betty[i], tol) then
begin

mouse(x,y,5,5,false)
wait(250+random(100+random(100)))
result:= true;
end;
if not result then
tol:= tol+1;

if(tol>50)then tol:=0; if(tol=0)then i:= random(4)+1;
until result;

ChooseOption(x, y, 'Trade');

while(not(GetColor( 83, 304 ) = 2070783))do
Mmouse(Random(MSX2), Random(MSY2), 10, 10);
end;

bullzeye95

2007-03-22 16:06:30

OMFG! Solemn you're here!

Bobarkinator

2007-03-22 16:29:00

I will test that. This is what I had after bullzeye helped me:
function InMageShop: Boolean;
var xx,yy: Integer;
begin
if (FindColorSpiralTolerance(x,y,5066067,155,66,355,266,10)) and
(FindColorSpiralTolerance(x,y,6579307,155,66,355,266,10)) and
(FindSymbol(xx,yy,'magic shop')) and
(FindSymbol(x,y,'water')) and
(FindSymbol(x,y,'Jewelery')) then
begin
WriteLn('I'#39'm in the mage shop');
Result:=True
end else
begin
Result:=False
end;
begin
if (not(Result)) then
Mouse(xx,yy,4,4,True);
Flag;
Result:=True
end;
end;

procedure Betty;
var Tries,Tries2,Trys: Integer;
begin
MouseSpeed:=5
Tries:=0
if (InMageShop) then
begin
repeat
if (FindMsColorTol(x,y,6490468,10))
and (Distance(x,y,MSCX,MSCY)<300) then
MMouse(x,y,4,4);
if (IsUpText('etty')) then
begin
Mouse(x,y,4,4,False)
PopUp('rade');
FTWait(2);
Flag;
If(ShopScreen) then
Exit;
end else
if (not(FindMSColorTol(x,y,6490468,10))) then
begin
if (FindColorTolerance(x,y,195836,618,56,678,116,10)) then
begin
Mouse(x+2,y,0,0,True);
Flag;
Mouse(MSCX,MSCY,4,4,False);
PopUp('rade');
FTWait(2);
Flag;
if (ShopScreen) then
Exit;
end else
begin
repeat
if (FindColorTolerance(x,y,16777215,638,76,658,96,10)) or
(FindColorTolerance(x,y,14869218,638,76,658,96,10)) then
begin
Mouse(x+2,y+1,1,1,True);
Flag;
begin
MMouse(MSCX,MSCY,4,4);
if (IsUpText('etty')) then
begin
GetMousePos(x,y);
Mouse(x,y,4,4,False);
ChooseOption(x,y,'rade');
FTWait(2);
Flag;
if (ShopScreen) then
Exit;
Trys:=Trys+1
end else
begin
if (FindObject(x,y,'etty',6490468,10,True)) then
Mouse(x,y,4,4,False);
ChooseOption(x,y,'rade');
FTWait(2);
Flag;
if (ShopScreen) then
Exit;
Trys:=Trys+1
end;
end;
end;
until(ShopScreen) or (Trys>5)
begin
if (Trys>5) then
begin
WriteLn('I'#39've given up hope. Logging out. I will try later');
NextPlayer(True);
end;
end;
end;
end;
Tries:=Tries+1
until(Tries>4);
if (Tries>4) then
begin
WriteLn('Could not find Betty');
if (FindSymbol(x,y,'magic shop')) then
Mouse(x,y,4,4,true);
Tries2:=Tries2+1
if (Tries2>2) then
begin
NextPlayer(True);
end;
Betty;
end;
end;
end;

Cheesehunk

2007-03-22 18:20:37

This is what I use:
//********************* Based off Phantom's FindGerrant ******************//

function FindSalesMan: Boolean;
var Sx, Sy, C, DownKey: Integer;
begin
if ShopScreen then
begin
Result := True;
DebugScript('Shop Open');
Exit;
end;
if not LoggedIn then Exit;
Sx := 246;
Sy := 163;
FindRandoms;
DebugScript('Finding Shop Keeper');
if (FindColorSpiralTolerance(Sx, Sy, ShopKeeper1, 10, 10, 500, 330, 5) or
FindColorSpiralTolerance(Sx, Sy, ShopKeeper2, 10, 10, 500, 330, 5) or
FindColorSpiralTolerance(Sx, Sy, ShopKeeper3, 10, 10, 500, 330, 5)) then
begin
DebugScript('Found color, searching..');
Sx := Sx + Random(3);
Sy := Sy + Random(2);
MMouse(Sx, Sy, 0, 0);
Wait(100 + Random(50));
C := 0;
if IsUpTextMulti('hop', 'Shop', 'Sho') then
begin
DebugScript('Found ShopKeeper');
if (Random(15) = 1) then
begin
Mouse(Sx, Sy, 0, 0, True);
FindRandoms;
FFlag(0);
Wait(500 + Random(250));
if (not (GetColor(442, 434) = 0)) and ClickToContinue then
begin
Wait(500 + Random(250));
if ClickNpcChatText('Yes please') then
Wait(250 + Random(200))
end;
end else
begin
Mouse(Sx, Sy, 0, 0, False);
Wait(100 + Random(50));
if ClickText3('Trade Shop', Sx - 200, Sy - 300, Sx + 200, Sy + 250, True) then
begin
DebugScript('Opening shop.');
FFlag(0);
WWait(500 + Random(150));
end;
end;
end;
if ShopScreen then
begin
Result := True;
DebugScript('Shop open');
Exit;
end;
end;
//SendArrowSilentWait(Random(4), 100 + Random(700));
DownKey := 37 + Random(4);
Wait(100 + Random(50));
KeyDown(DownKey);
Sleep(100 + Random(700));
KeyUp(DownKey);
FTWait(1);
end;
How to use it:
      MarkTime(BankMark);
repeat
if not LoggedIn or (TimeFromMark(BankMark) > 35000) then
Break;
FTWait(1);
until FindSalesMan;