Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program StewBuyer;
- {$DEFINE SMART}
- {$i srl\srl.scar}
- {$i reflection\reflection.simba}
- const
- {---SMART Setup Constants---}
- WORLD = 32;
- MEMBERS = false;
- SIGNED = true;
- {---------------------------}
- var
- Path: TTileArray;
- StewTime: Integer;
- const
- Bartender = 737;
- Coins = 995;
- procedure Setup;
- begin
- Smart_Members := MEMBERS;
- Smart_Server := WORLD;
- Smart_Signed := SIGNED;
- Path:= [Tile(2726, 3492), Tile(2721, 3486),
- Tile(2709, 3484), Tile(2695, 3486),
- Tile(2690, 3495)];
- SetupSRL;
- SetupReflectionEx(true);
- end;
- function ReverseTiles(TPA: TTileArray): TTileArray;
- var
- x: Integer;
- begin
- SetArrayLength(Result, Length(TPA));
- for x:=0 to High(TPA) do
- Result[x]:= TPA[High(TPA)-x];
- end;
- procedure BankStuff;
- begin
- if R_OpenBankBooth('seers') then
- begin
- R_DepositAllButID(Coins);
- CloseBank;
- end;
- end;
- procedure WalkToPub(ToPub: Boolean);
- var
- ThePath: TTileArray;
- begin
- if ToPub then
- ThePath:= Path
- else
- ThePath:= ReverseTiles(Path);
- WalkPath(ThePath);
- end;
- procedure GoToBartender;
- var
- BartenderPos: TNPC;
- begin
- FindNPC(Bartender, BartenderPos);
- if (not(TileOnMS(BartenderPos.Tile, 10))) then
- if TileOnMM(BartenderPos.Tile) then
- WalkToTile(BartenderPos.Tile, 1, 0);
- end;
- procedure TalkToBartender;
- var
- BartenderPos: TNPC;
- MSPos: TPoint;
- TempBitmap, Trashx, Trashy: Integer;
- begin
- if (TimeFromMark(StewTime)>30000) then Exit;
- GoToBartender;
- FindNPC(Bartender, BartenderPos);
- if TileOnMS(BartenderPos.Tile, 10) then
- begin
- MSPos:= TileToMS(BartenderPos.Tile, 10);
- Mouse(MSPos.x, MSPos.y, 0, 0, False);
- Wait(200+Random(300));
- TempBitmap:= BitmapFromClient(207, 429, 277, 464);
- R_ChooseOptionMulti(['alk', 'arte', 'nder']);
- R_Flag;
- repeat
- if ((not(FindBitmapIn(TempBitmap, Trashx, Trashy, MCX1, MCY1, MCX2, MCY2)))or ClickContinue(False, False)) then
- break;
- if (TimeFromMark(StewTime)>30000) then Exit;
- Wait(500+Random(500));
- Writeln('1');
- until(false);
- FreeBitmap(TempBitmap);
- TempBitmap:= BitmapFromClient(207, 429, 277, 464);
- ClickToContinue;
- repeat
- if ((not(FindBitmapIn(TempBitmap, Trashx, Trashy, MCX1, MCY1, MCX2, MCY2))) or ClickToContinue) then
- break;
- if (TimeFromMark(StewTime)>30000) then Exit;
- Wait(500+Random(500));
- Writeln('2');
- until(false);
- FreeBitmap(TempBitmap);
- end;
- end;
- procedure ClickTheText(Which: Integer);
- var
- TempBitmap, Trashx, Trashy, Tempx, Tempy: Integer;
- begin
- if (TimeFromMark(StewTime)>30000) then Exit;
- Wait(500+Random(500));
- TempBitmap:= BitmapFromClient(207, 429, 277, 464);
- case Which of
- 2, 3, 5, 6: ClickToContinue;
- 1: begin
- if FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, Tempx, Tempy, 'hat do you', CharsNPC, Nothing) then
- Mouse(Tempx, Tempy, 80, 5, True)
- else
- ClickTheText(Which);
- end;
- 4: begin
- if FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, Tempx, Tempy, 'I have some', CharsNPC, Nothing) then
- Mouse(Tempx, Tempy, 80, 5, True)
- else
- ClickTheText(Which);
- end;
- end;
- repeat
- if ((not(FindBitmapIn(TempBitmap, Trashx, Trashy, MCX1, MCY1, MCX2, MCY2))) and (not(PleaseWait))) then
- break;
- if (TimeFromMark(StewTime)>30000) then Exit;
- Wait(500+Random(500));
- Writeln('3');
- until(false);
- FreeBitmap(TempBitmap);
- end;
- procedure DoBartender;
- var
- i: Integer;
- begin
- repeat
- MarkTime(StewTime);
- TalkToBartender;
- for i:=1 to 6 do
- ClickTheText(i);
- R_FindRandoms;
- until(InvFull);
- end;
- begin
- Setup;
- repeat
- R_FindRandoms;
- WalkToPub(true);
- R_FindRandoms;
- DoBartender;
- R_FindRandoms;
- WalkToPub(false);
- R_FindRandoms;
- BankStuff;
- until(false)
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement