Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program AloraGemStallThiever;
- {$I AeroLib/AeroLib.simba}
- const
- User = 'ShugaDadi';
- Pass = 'lotcot101';
- var
- Cash : TItem;
- Trade : Integer;
- Drop : Integer;
- Sell : Integer;
- NumInvs : Integer;
- CurrentStall : Integer;
- N : Integer;
- function lobbyScreen(): boolean;
- begin
- result := findTextTPA(0, 3, IntToBox(270, 37, 401, 55), 'are', SmallChars07, -1);
- end;
- function shopOpen(): boolean;
- begin
- result := findTextTPA(2070783, 3, IntToBox(210, 30, 315, 52), 'ievin', UpChars07, -1);
- end;
- function seeRandom(): boolean;
- var
- col: TColEx;
- begin
- col.create(6758413, 20);
- result := (col.count(IntToBox(171, 356, 337, 390)) > 50);// and findTextTPA(65535, 3, IntToBox(227, 362, 272, 382), 'odd', SmallChars07, -1);;
- end;
- procedure LogOff();
- begin
- Mouse(Point(641, 483), 0, 0, Mouse_LEFT);
- wait(250);
- Mouse(Point(644, 375), 0, 0, Mouse_LEFT);
- end;
- procedure Login();
- var
- i: integer;
- label
- lobby;
- begin
- if (lobbyScreen) then
- goTo lobby;
- Mouse(Point(337, 231), 0, 0, Mouse_LEFT);
- wait(250);
- i := 0;
- repeat
- Inc(i);
- PressKey(VK_Back);
- until (i > 40);
- wait(250);
- typesend(User, false);
- wait(250);
- Presskey(9);
- wait(250);
- i := 0;
- repeat
- Inc(i);
- PressKey(VK_Back);
- until (i > 40);
- wait(250);
- typesend(Pass, false);
- wait(250);
- Mouse(Point(300, 300), 0, 0, Mouse_LEFT);
- waitfunc(@lobbyScreen, 100, 20000);
- lobby:
- while not (lobbyScreen) do
- wait(100);
- Mouse(Point(382, 327), 0, 0, Mouse_LEFT);
- if waitFunc(@isloggedin, 200, 20000) then
- begin
- sleep(500);
- toggleRunning(true);
- setAngle(ANGLE_HIGH);
- typeSend('::THIEVE');
- typeByte(VK_ENTER);
- Mouse(Point(90, 492), 0, 0, Mouse_LEFT);
- end;
- end;
- procedure randomCompass();
- var
- Keys: TIntegerArray;
- I: Integer;
- begin
- Keys := [VK_RIGHT, VK_LEFT];
- I := Random(0, 1);
- Wait(100 + random(50));
- KeyDown(Keys[I]);
- Wait(500 + random(1000));
- KeyUp(Keys[I]);
- Wait(200 + random(350));
- end;
- procedure sellStuff();
- var
- TPA : TPointArray;
- ATPA : T2DPointArray;
- tCol : TColEx;
- I : Integer;
- x, y : Integer;
- xd, yd : Integer;
- begin
- tCol.create(11449257, 26, 0.97, 0.12);
- if (not tCol.findAllIn(AREA_MS, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- ATPA := FloodFillTPA(TPA);
- SortATPASize(ATPA, true);
- HumanMMouse(middleTPA(ATPA[0]), 0, 0);
- if (waitUptext('orrisa', 100)) then
- begin
- fastClick(Mouse_Right);
- //if waitOption('Trade Ali', 300) then
- if FindBitmapToleranceIn(Trade, x, y, 0, 0, 568, 402, 20) then
- begin
- Mouse(Point(x, y), 0, 0, Mouse_Left);
- end;
- if waitFunc(@ShopOpen, 25, 4000) then
- for I := 2 to 28 do
- if ItemInSlot(I) then
- if interactSlot(I, Mouse_Right) then
- waitOption('-250', 250);
- end;
- end;
- procedure clickFifthStall();
- var
- FirstStall : TMSObject;
- TPA : TPoint;
- n : Integer;
- begin
- FirstStall.create('ar St', ['ar Sta'], [createCol(1682886, 5, 0.10, 0.96), createCol(7040116, 5, 0.10, 0.96)], [createCol(2840694, 5, 0.19, 1.07)]);
- if (not FirstStall.find(5, MSCP, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- HumanMMouse(TPA, 0, 0);
- if (waitUptext('ar St', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure clickFourthStall();
- var
- FirstStall : TMSObject;
- TPA : TPoint;
- n : Integer;
- begin
- FirstStall.create('ic St', ['ic Sta'], [createCol(1055613, 5, 0.10, 0.96)], [createCol(2840694, 5, 0.19, 1.07)]);
- if (not FirstStall.find(3, MSCP, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- HumanMMouse(TPA, 0, 0);
- if (waitUptext('ic St', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure clickThirdStall();
- var
- FirstStall : TMSObject;
- TPA : TPoint;
- n : Integer;
- begin
- FirstStall.create('al St', ['al Sta'], [createCol(529986, 5, 0.10, 0.96)], [createCol(2840694, 5, 0.19, 1.07)]);
- if (not FirstStall.find(10, MSCP, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- HumanMMouse(TPA, 0, 0);
- if (waitUptext('al St', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure clickSecondStall();
- var
- FirstStall : TMSObject;
- TP : TPoint;
- n : Integer;
- begin
- FirstStall.create('Crafting Stall', ['ng Sta'], [createCol(1482420, 5, 0.10, 0.96)], [createCol(2840694, 5, 0.19, 1.07)]);
- if (not FirstStall.find(3, MSCP, TP)) then
- begin
- randomCompass();
- exit;
- end;
- HumanMMouse(TP, 0, 0);
- if (waitUptext('ng St', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure clickFirstStall();
- var
- FirstStall : TMSObject;
- TPA : TPoint;
- n : Integer;
- begin
- FirstStall.create('Food Stall', ['od Sta'], [createCol(5298908, 5, 0.10, 0.96)], [createCol(2840694, 5, 0.19, 1.07)]);
- if (not FirstStall.find(10, MSCP, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- HumanMMouse(TPA, 0, 0);
- if (waitUptext('od St', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure clickBigStall();
- var
- TPA : TPointArray;
- ATPA : T2DPointArray;
- tCol : TColEx;
- n : Integer;
- begin
- tCol.create(9150637, 5, 0.06, 0.55);
- if (not tCol.findAllIn(AREA_MS, TPA)) then
- begin
- randomCompass();
- exit;
- end;
- ATPA := FloodFillTPA(TPA);
- SortATPASize(ATPA, true);
- HumanMMouse((ATPA[0].MidPnt), 0, 0);
- if (waitUptext('em stall', 250)) then
- begin
- fastClick(Mouse_Left);
- n := Random(0,30);
- if n = 10 then
- randomCompass();
- end;
- end;
- procedure dropStuff();
- var
- I : Integer;
- x, y : Integer;
- begin
- for I := 2 to 28 do
- if ItemInSlot(I) and not (waitUptext('ushed', 100)) then
- if interactSlot(I, Mouse_Right) then
- if FindBitmapToleranceIn(Drop, x, y, 497, 172, 761, 502, 20) then
- begin
- Mouse(Point(x, y), 0, 0, Mouse_Left);
- end;
- end;
- procedure newCharacter();
- begin
- Login;
- Wait(1000); // Dialogue through Line 326
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(258, 427), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(266, 387), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000); //
- LogOff;
- wait(3000);
- Login;
- sleep(2000);
- Mouse(Point(299, 444), 0, 0, Mouse_Left);
- Wait(1000);
- toggleRunning(true);
- setAngle(ANGLE_HIGH);
- typeSend('::THIEVE');
- typeByte(VK_ENTER);
- wait(5000);
- HumanMMouse(Point(577, 228), 0, 0);
- if waitUptext('Guide book', 250) then
- begin
- fastClick(Mouse_Right);
- waitOption('Drop', 250);
- end;
- Wait(1000);
- Mouse(Point(676, 484), 0, 0, Mouse_Left);
- Wait(1000);
- Mouse(Point(709, 305), 0, 0, Mouse_Left);
- end;
- procedure Logout();
- begin
- mousebox(IntToBox(60, 400, 110, 445), MOUSE_LEFT);
- Wait(5000);
- typeSend('::THIEVE');
- typeByte(VK_ENTER);
- end;
- function getCurrentStall(): Boolean;
- begin
- if NumInvs = 0 then
- begin
- currentStall := 1;
- exit;
- end else
- begin
- if NumInvs >= 1 and NumInvs < 2 then
- begin
- currentStall := 2;
- exit;
- end else
- begin
- if NumInvs >= 2 and NumInvs < 5 then
- begin
- currentStall := 3;
- exit;
- end else
- begin
- if NumInvs >= 5 and NumInvs < 20 then
- begin
- currentStall := 4;
- exit;
- end else
- begin
- if NumInvs >= 20 and NumInvs < 40 then
- begin
- currentStall := 5;
- exit;
- end else
- begin
- if NumInvs >= 40 then
- begin
- currentStall := 6;
- exit;
- end;
- end;
- end;
- end;
- end;
- end;
- end;
- procedure freememory;
- begin
- freeDTM(Cash.DTM);
- FreeBitmap(Drop);
- FreeBitmap(Trade);
- end;
- function getState(): Variant;
- begin
- if (not (IsLoggedIn())) then
- exit(1);
- if ((not (ShopOpen())) and (getCurrentTab() = TAB_INV) and (Cash.getSlot() <> 1) and (Cash.inInventory())) then
- exit(3);
- if (seeRandom) then
- exit(2);
- if (ShopOpen()) then
- exit(6);
- case (IsInvFull) of
- True : exit(5);
- False : exit(4);
- end;
- end;
- procedure progressReportAlora();
- begin
- begin
- write('Current Stall: ');
- writeln(currentStall);
- write('Inventories Thieved: ');
- writeln(NumInvs);
- writeln('Script Runtime: ' +timeRunning);
- writeln('------------------------------------------');
- end;
- end;
- procedure executeState(State: Variant);
- begin
- case (State) of
- 1 : newCharacter();
- 2 : Logout();
- 3 : moveItemTo(Cash.getSlot(), 1);
- 4 : begin
- if NumInvs >= 1 then
- begin
- if NumInvs >= 2 then
- begin
- if NumInvs >= 5 then
- begin
- if NumInvs >= 20 then
- begin
- if NumInvs >= 40 then
- begin
- clickBigStall;
- currentStall := 6;
- progressReportAlora;
- exit;
- end;
- clickFifthStall;
- currentStall := 5;
- progressReportAlora;
- exit;
- end;
- clickFourthStall;
- currentStall := 4;
- progressReportAlora;
- exit;
- end;
- clickThirdStall;
- currentStall := 3;
- progressReportAlora;
- exit;
- end;
- clickSecondStall;
- currentStall := 2;
- progressReportAlora;
- exit;
- end;
- clickFirstStall;
- currentStall := 1;
- progressReportAlora;
- exit;
- end;
- 5 : sellStuff();
- 6 : begin
- mouseBox(IntToBox(481, 38, 488, 43), mouse_left);
- if (not ShopOpen()) then
- dropStuff();
- NumInvs := NumInvs + 1
- end;
- end;
- end;
- procedure takeBreak();
- begin
- writeln('||||||||||||||||||||||||||||||||||||||||||');
- writeln('Taking Break at: ' +timeRunning);
- writeln('||||||||||||||||||||||||||||||||||||||||||');
- LogOff;
- end;
- begin
- initAL();
- MouseSpeed := 50;
- Trade := BitmapFromString(129, 15, 'meJztVlsSwyAI9HZeoL+9/zHsT' +
- 'NKkhMcCOtPaiQ4fhsKqu4itj2ddtuz21sQYhMpmldZ2k85IYjZrTi' +
- 'ul7OyVY4xIkEp/87/tgLJ3+iO5qaxprYO9cZAP/1sKVSEhAUtZEnR' +
- 'JID/lHEjAbViCnzQ0xp76NID3gv6EQXwOhQR1a5WSWNbE6ETiq4ui' +
- 'MLIi2yGAAsFWvCvBuRP6qUpDHxQcr3B4xPXcgj3GRmAPDdX6Eum1R' +
- 'Dqi+BaOdiJVAlZ77I+TRTXzS3CVQ5V29UZY6UEExjb24OrF99ctKn' +
- 'YiSwIZEKRa6jWbBEGcSvoSrurQuuLGdUiQndPL+78S9OGbt0MjxJV' +
- 'ALeyU/8sS8MI7Tp2VAFQvbkTOflRCrtLoreM6uv2RRa05SLcA3aNh' +
- 'DziF+hPYuUvIsmU3tBc3tIpT');
- Drop := BitmapFromString(30, 12, 'meJz7/x8EGBgYwPR/95BYaqH/MJPhbNqZDGHTzuT/SABNMabX8CjGYzIDGCDLokUKQXFcbHjgEFRJBntwmownVHHFFJpKTHEgYkAFcHPQuJiKMWMQqxaqpFvqIlwmAwBllPrH');
- Cash.DTM := DTMFromString('mbQAAAHicY2VgYFjAxMAwE4jXQvF8IF7MyMCwHIjXAfF8KL6+XhKM72yWZDi/Qpzh81EZBkmgfnTMiAWDAQAZvg9H');
- addonterminate('freememory');
- repeat
- begin
- executeState(getState);
- end;
- Until GetTimeRunning > 14400000; //3 hr
- takeBreak;
- end.
Add Comment
Please, Sign In to add comment