SRL Archive - Test corner

Test this in Port Sarim mage shop


Bobarkinator

2007-03-18 16:53:06

Can someone test this in the Port Sarim mage shop and tell me how well it works. I'm trying to get it to flawlessly find betty so if anybody has any suggestions that would also be appriceated.
program Eye_of_Newt_Buyer;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/amount.scar}
function InMageShop: Boolean;
begin
if (FindColorSpiralTolerance(x,y,5066067,155,66,355,266,10)) and
(FindColorSpiralTolerance(x,y,6579307,155,66,355,266,10)) then
begin
WriteLn('I'#39'm in the mage shop');
Result:=True
end else
Result:=False
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;
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;
MMouse(MSCX,MSCY,4,4);
if (IsUpText('etty')) then
begin
GetMousePos(x,y);
Mouse(x,y,4,4,False);
PopUp('rade');
FTWait(2);
Flag;
Trys:=Trys+1
end;
end;
until(ShopScreen) or (Trys>5)
begin
if (Trys>5) then
begin
WriteLn('I'#39've given up hope. Logging out.');
NextPlayer(False);
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;

begin
SetupSRL;
ActivateClient;
Wait(1000);
Betty;
end.

oliver1205

2007-03-25 12:32:00


function FindGerrant:Boolean;
var a,b:integer;
begin
if(GetColor(342, 44)=2070783)then
begin
Result:=True;
Exit;
end;
a:=246;
b:=163;
if(FindColorSpiralTolerance(a,b,6785945,10,10,500,330,3))or
(FindColorSpiralTolerance(a,b,7708590,10,10,500,330,3))or
(FindColorSpiralTolerance(a,b,7444904,10,10,500,330,3))then
begin
MMouse(a,b,0,0);
Wait(100+random(50));
if(Option2('Talk'))or
(IsUpText('Talk'))then
begin
Mouse(a,b,0,0,false);
IdleWait(100+random(20));
ChooseOption(a,b,'Trade');
Flag;
IdleWait(1000+Random(1000));
end;
if(GetColor(342, 42)=2070783)then
begin
Result:=True;
GerrantFound:=GerrantFound+1
end;
end;
end;

i got that from one of Dub's scripts. its found gerrant everytime perfectly for me. just make sure you edit it, and give him credit