Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program WineMaker;
- //{$DEFINE SMART}
- {$I AEROLIB/AEROLIB.SIMBA}
- var
- UNF, EYE, x, y, failed: Integer;
- WinesMade, xp, XPGained, expHour, winesHour: Integer;
- const
- Username = '';
- Password = '';
- Pin = '';
- Procedure DeclarePlayer;
- begin
- Me.Name := Username;
- Me.Pass := Password;
- Me.Pin := Pin;
- Me.Member := True;
- Me.Active := True;
- end;
- Procedure levelCheck();
- begin
- if continueChat(False) then Exit;
- end;
- Procedure DTMz;
- begin
- VIAL := DTMFromString('mlwAAAHicY2dgYChnZGAoAeICIK4B4iYgroOy04DyCUCcD8QFQJwDxClAnAjEK9YcAZKMWDEXA26AXQcEQwEAuUcIZw==');
- IRIT := DTMFromString('mlwAAAHicY2dgYOgC4hYgrgPiaiDuBuIpQDwJiJOBOAqIU4E4D4qTgDgMhGstgSQjVszFgBtg1wHBUAAAf1EHmQ==);
- addOnTerminate('FreeIt');
- end;
- Procedure FreeIt;
- begin
- freeDTM(UNF);
- freeDTM(EYE);
- end;
- Procedure Antiban;
- begin
- case Random(310) of
- 0..150:
- if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
- begin
- MMouseOffClient('random');
- end else
- exit;
- 201..210:
- if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
- begin
- HoverSkill(SKILL_HERBLORE, false);
- FTab(TAB_INV);
- MMouseOffClient('Random');
- end else
- exit;
- 211..300:
- if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
- begin
- Wait(RandomRange(2000, 4000));
- PickUpMouse;
- HumanRandomMouse();
- end else
- exit;
- 301..310:
- if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
- begin
- CheckMovingObjs(True);
- end else
- exit;
- end;
- end;
- Procedure mouseBoxHover(x1, y1, x2, y2: Integer; Dist: Integer);
- var
- PT : TPoint;
- begin
- getMousePos(pt.x,pt.y);
- PT := randomPointBoxEx(pt,inttobox(x1,y1,x2,y2),Dist);
- brakeMMouse(PT, 0, 0, True);
- wait(randomRange(50,150));
- end;
- //Creds to Hoodz
- procedure openBank();
- var
- TPA: TPointArray;
- ATPA: T2DPointArray;
- I: Integer;
- spot: TPoint;
- t: Timer;
- tCol : TColEx;
- begin
- if (isBankOpen()) then
- exit;
- tCol.create(3425887, 21, 0.04, 0.09);
- if (not tCol.findAllIn(AREA_MS, TPA)) then
- exit;
- ATPA := FloodFillTPA(TPA);
- if (length(ATPA) <= 0) then
- exit;
- SortATPAfromFirstPoint(ATPA, Point(275, 155));
- for I := 0 to high(ATPA) do
- begin
- if (length(ATPA[I]) < 36) then
- continue;
- spot := middleTPA(ATPA[I]);
- HumanMMouse(spot, 1,1);
- if (waitUptextMulti(['ank', 'est'], 300)) then
- begin
- fastClick(MOUSE_LEFT);
- break;
- end else
- if WaitUpTextMulti(['Use', '->', ' Bank'], 300) then
- begin
- HumanMMouse(Point(633, 362), 50, 50);
- FastClick(MOUSE_LEFT);
- exit;
- end;
- end;
- t.start();
- while ((not isBankOpen()) and (not Interfaces[PINSCREEN].isVisible())) and (t.TimeElapsed() < 3000) do
- sleep(random(150, 250));
- end;
- Procedure banking;
- var
- g: Timer;
- begin
- if Interfaces[PINSCREEN].isVisible() then
- inPin(Pin);
- if isBankOpen() then
- if getCurrentBankTab() <> 0 then
- SwitchBankTab(0);
- begin
- QuickDeposit('inv');
- if FindDTM(IRIT, x, y, msx1, msy1, msx2, msy2) then
- begin
- HumanMMouse(Point(x, y), 5, 2);
- if WaitUpTextMulti(['Withdraw', 'Eye of', 'newt'], 400) then
- fastClick(Mouse_Right);
- waitOption('Withdraw-14 ', 250);
- end else
- begin
- WriteLn('Ran out of supplies, logging off.');
- CloseInterface();
- LogoutPlayer();
- TerminateScript;
- end;
- if FindDTM(VIAL, x, y, msx1, msy1, msx2, msy2) then
- begin
- HumanMMouse(Point(x, y), 5, 2);
- if WaitUpTextMulti(['Withdraw', 'Guam potion ', '(unf)'], 400) then
- fastClick(Mouse_Right);
- waitOption('Withdraw-14 ', 250);
- end else
- begin
- WriteLn('Ran out of supplies, logging off.');
- CloseInterface();
- LogoutPlayer();
- TerminateScript;
- end;
- end;
- CloseInterface();
- end;
- Procedure MakeWines;
- begin
- if isBankOpen() then
- exit;
- if not GameTab(TAB_INV) then
- fTab(Tab_inv);
- Wait(RandomRange(100, 400));
- if FindDTM(IRIT, x, y, mix1, miy1, mix2, miy2) then
- begin
- HumanMMouse(Point(x, y), 3, 3);
- if waitUpTextMulti(['Use', 'Irit', 'leaf'], 500) then
- FastClick(Mouse_LEFT);
- if FindDTM(UNF, x, y, mix1, miy1, mix2, miy2) then
- begin
- HumanMMouse(Point(x, y), 3, 3);
- If WaitUpTextMulti(['Use', 'Irit leaf', 'Vial of', 'water'], 500) then
- FastClick(Mouse_LEFT);
- end;
- end else
- exit;
- end;
- Procedure doInterface;
- begin
- MouseBoxHover(32, 390, 293, 445, randomrange(5, 10));
- Wait(RandomRange(100, 250));
- if WaitUpText('ake', 400) then
- begin
- FastClick(Mouse_RIGHT);
- WaitOption('Make All', 200);
- end else
- begin
- inc(Failed);
- if (Failed > 5) then
- Failed := 0;
- exit;
- end;
- While (getInvCount > 14) do
- begin
- if ContinueChat(False) then
- begin
- exit;
- end else;
- antiban;
- end;
- WinesMade := WinesMade + 14;
- xp := 200;
- wait(randomrange(250, 500));
- exit;
- end;
- Procedure Progress;
- begin
- XPGained := (xp * WinesMade);
- expHour := Round((XPGained) / (GetTimeRunning / 3600000.0));
- winesHour := Round((WinesMade) / (GetTimeRunning / 3600000.0));
- ClearDebug;
- WriteLn('Running for: ' + MsToTime(GetTimeRunning, 3));
- WriteLn('Wines made: ' + toStr(WinesMade));
- WriteLn('Exp gained: ' + toStr(XPGained));
- WriteLn('Exp p/hr: ' + toStr(expHour));
- WriteLn('Wines p/hr: ' + toStr(winesHour));
- WriteLn('*Note* Exp rates may be inaccurate if you dont have 68 cooking.');
- end;
- Procedure MainLoop;
- begin
- if isLoggedIn then
- setAngle(ANGLE_HIGH);
- repeat
- MouseSpeed := RandomRange(15, 22);
- if getInvCount <= 14 then
- openBank;
- if isBankOpen() then
- Banking;
- if isInvFull then
- MakeWines;
- doInterface;
- Progress;
- until not isLoggedIn;
- end;
- begin
- InitAL();
- DTMz;
- DeclarePlayer;
- LoginPlayer(false);
- while isLoggedIn() do
- MainLoop;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement