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.