Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program new;
- {$DEFINE SMART}
- {$i AeroLib/AeroLib.Simba}
- {$i Reflection/Reflection.Simba}
- const
- burn_logs : string = 'Logs';
- raw_fish : string = 'Raw trout';
- var
- MyPlayer: TReflectLocalPlayer;
- {procedure Open_bank;
- var
- bank : TReflectNPC;
- location : TPoint;
- x,y : integer;
- begin
- writeln('Atveru banku.');
- repeat
- if bank.Find('Banker') then
- begin
- writeln(getUpText());
- humanMMouse(bank.GetMSPoint,2,2);
- wait(300);
- reflect.Mouse.Click(MOUSE_RIGHT);
- getRealMousePos(x,y);
- MoveMouse(x,y+40);
- wait(500);
- reflect.Mouse.Click(MOUSE_LEFT);
- wait(3000);
- if not Reflect.Bank.IsOpen then Reflect.Interfaces.CloseAll;
- end;
- until Reflect.Bank.IsOpen;
- end;}
- procedure Open_bank;
- var
- bank : TReflectObject;
- location : TPoint;
- x,y : integer;
- begin
- writeln('Atveru banku.');
- repeat
- if bank.Find(objGame,'Bank booth',15) then
- begin
- writeln(bank.Find(objGame,'Bank booth',15));
- accurateMMouse(reflect.Tiles.TileToMS(bank.GetTile),2,2);
- wait(300);
- fastClick(MOUSE_LEFT);
- wait(6500);
- if not Reflect.Bank.IsOpen then Reflect.Interfaces.CloseAll;
- end;
- until Reflect.Bank.IsOpen;
- end;
- Procedure Take_items;
- var
- bankas_itemi : TReflectBankItemArray;
- wood : TReflectBankItem;
- fish : TReflectBankItem;
- begin
- writeln('Paņemu lietas.');
- wood.Find(burn_logs);
- wood.Withdraw(1);
- fish.Find(raw_fish);
- fish.Withdraw(27);
- wait(1000);
- end;
- Procedure Close_bank;
- begin
- writeln('Aizveru banku.');
- Reflect.Bank.Close;
- wait(500);
- end;
- Procedure Fire;
- var
- wood : TReflectInvItem;
- tinderbox : TReflectInvItem;
- begin
- writeln('Taisu uguni.');
- wood.Find(burn_logs);
- tinderbox.Find('Tinderbox');
- MoveMouse(150+random(35)-random(35),214+random(35)-random(35));
- wait(50);
- fastClick(MOUSE_LEFT);
- wait(3000);
- reflect.Mouse.Move(wood.GetMSPoint,2,2);
- wait(50);
- fastClick(MOUSE_LEFT);
- wait(50);
- reflect.Mouse.Move(tinderbox.GetMSPoint,2,2);
- wait(50);
- fastClick(MOUSE_LEFT);
- wait(7000);
- end;
- procedure Cook_fish;
- var
- fish : TReflectInvItem;
- x,y :integer;
- fire : TReflectObject;
- point1 : TPoint;
- begin
- writeln('Cepju zivis.');
- repeat
- writeln('sakums');
- if not fire.Find(objGame, 'Fire', 7)then exit;
- if not fish.Find(raw_fish)then exit;
- accurateMMouse(fish.GetMSPoint,2,2);
- wait(100);
- fastClick(MOUSE_LEFT); //uzpsiez uz zivs
- writeln('debug1');
- wait(200);
- accurateMMouse(reflect.Tiles.TileToMS(fire.GetTile),0,0);
- wait(300);
- fastClick(MOUSE_RIGHT); //uz uguni ar labo
- wait(500);
- writeln('debug2');
- if not fire.Find(objGame, 'Fire', 7) then
- exit;
- if not FindColorSpiralTolerance(x,y,16776960,MSX1,MSY1,MSX2,MSY2,10) then
- exit;
- writeln('debug3');
- point1.Y := y;
- point1.X := x;
- humanMMouse(point1,2,2);
- wait(1000);
- fastClick(MOUSE_LEFT); // iet uz uguni
- wait(5000);
- writeln('debug4');
- point1.Y := 413;
- point1.X := 256;
- humanMMouse(point1,2,2);
- wait(500);
- fastClick(MOUSE_RIGHT);
- wait(500);
- writeln('debug5');
- point1.Y := 480;
- point1.X := 256;
- humanMMouse(point1,2,2);
- wait(500);
- fastClick(MOUSE_LEFT);
- wait(70000+random(3000)-random(3000));
- writeln('beigas');
- until fish.Find(raw_fish) = false or not fire.Find(objGame, 'Fire', 7);
- end;
- procedure Deposit_fish;
- var
- x,y :integer;
- fish : TReflectInvItem;
- burnt_fish : TReflectInvItem;
- wood : TReflectInvItem;
- rawfish : TReflectInvItem;
- ashes : TReflectInvItem;
- begin
- writeln('Nolieku lietas.');
- while fish.Find('Trout') do
- begin
- humanMMouse(fish.GetMSPoint,2,2);
- fastClick(MOUSE_RIGHT);
- wait(300);
- GetMousePos(x,y);
- MoveMouse(x,y+100);
- wait(300);
- fastClick(MOUSE_LEFT);
- wait(1500);
- end;
- while fish.Find('Burnt fish') do
- begin
- humanMMouse(burnt_fish.GetMSPoint,2,2);
- fastClick(MOUSE_RIGHT);
- wait(300);
- GetMousePos(x,y);
- MoveMouse(x,y+100);
- wait(200);
- fastClick(MOUSE_LEFT);
- wait(1500);
- end;
- while wood.Find(burn_logs) do
- begin
- humanMMouse(wood.GetMSPoint,2,2);
- fastClick(MOUSE_RIGHT);
- wait(200);
- GetMousePos(x,y);
- MoveMouse(x,y+100);
- wait(200);
- fastClick(MOUSE_LEFT);
- wait(1500);
- end;
- while rawfish.Find(raw_fish) do
- begin
- humanMMouse(rawfish.GetMSPoint,2,2);
- fastClick(MOUSE_LEFT);
- wait(200);
- //GetMousePos(x,y);
- //MoveMouse(x,y+100);
- wait(1200);
- end;
- while ashes.Find('Ashes') do
- begin
- humanMMouse(ashes.GetMSPoint,2,2);
- fastClick(MOUSE_LEFT);
- wait(200);
- //GetMousePos(x,y);
- //MoveMouse(x,y+100);
- fastClick(MOUSE_LEFT);
- wait(1200);
- end;
- end;
- begin
- InitAL;
- Reflect.Setup;
- Myplayer.Create;
- LoginPlayer(false);
- MyPlayer.Username := 'darkijslv@tvnet.lv';
- MyPlayer.Password := 'Lapinskis123';
- MyPlayer.Pin := '';
- MyPlayer.Active := true;
- MyPlayer.ChangeWorld(382);
- MyPlayer.Login;
- Reflect.Compass.MakePitch(4);
- Reflect.Compass.Make('S');
- Open_bank;
- Deposit_fish;
- Take_items;
- Close_bank;
- Fire;
- Cook_fish;
- repeat
- Open_bank;
- Deposit_fish;
- Take_items;
- Close_bank;
- Fire;
- Cook_fish;
- until false;
- writeln('Programmas beigas');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement