Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program AirOrbCrafter; //this 1
- {$DEFINE SMART}
- {$I AEROLIB/AEROLIB.SIMBA}
- {$i Reflection/Reflection.Simba}
- const
- User = 'hijackers_teamyaks@hotmail.com';
- Pass = 'killer12';
- Pin = '1970';
- foodtype = 'Lobster';
- foodtoTake = 1;
- eatPercent = 70;
- OrbPosition := point (254 + random( - 30, 30), 415 + random( - 30, 30));
- var
- x, y, lor, ladder, randomsdismissed, orbs, profit, startXp, CurrentxP, randomEnergy: integer;
- myplayer: treflectlocalplayer;
- tim, tim2: Timer;
- position: TPoint;
- Opened, changeglory: boolean;
- doorbox: Tcheckbox;
- edgetobank, banktotrapdoor, LadderToLadder: tpointarray;
- depleted: boolean;
- function GetWordsEx(text, wordCharacters: string): TStringArray; //thanks Janilabo
- var
- l, i, r: Integer;
- begin
- l := Length(text);
- if ((l > 0) and (wordCharacters <> '')) then
- begin
- SetLength(Result, l);
- for i := 1 to l do
- if (Pos(text[i], wordCharacters) > 0) then
- begin
- Result[r] := text[i];
- for i := (i + 1) to l do
- if (Pos(text[i], wordCharacters) > 0) then
- Result[r] := (Result[r] + text[i])
- else
- Break;
- Inc(r);
- end;
- end;
- SetLength(Result, r);
- end;
- function getPriceGE(id : integer) : integer; //thx hoodz and flight!
- var sellSource, webSource : string;
- i : integer;
- _strings : TStringArray;
- begin
- try
- webSource := getPage('http://services.runescape.com/m=itemdb_oldschool/viewitem?obj='+intToStr(id));
- except
- //daLogger.Warn('Failed to connect to grand exchange database', []);
- exit;
- end;
- sellSource := between('<h3>Current Guide Price <span title=''', '''', webSource);
- _strings := GetWordsEx(sellSource, '0123456789');
- sellSource := '';
- if length(_strings) > 0 then
- for i:=0 to high(_strings) do
- sellSource := sellSource+_strings[i];
- if (Length(sellSource) > 0) then
- result := strToInt(sellSource)
- else
- //daLogger.Warn('Failed to get grand exchange price for item ID: '+intToStr(id), []);
- end;
- procedure CalcOrbsMade();
- begin
- Orbs := round((CurrentXp - StartXp)/76);
- end;
- procedure CalcProfit();
- begin
- profit := (getPriceGE(573)-getPriceGE(567)-(3*getPriceGE(564)));
- end;
- procedure Proggy();
- var
- PlankPH, GPPH, GP, XP, XPPH: Integer;
- begin
- CalcOrbsMade();
- PlankPH := Round((Orbs * 3600) / (GetTimeRunning / 1000));
- GP := Round(Orbs * profit);
- GPPH := Round(((GP) * 3600) / (GetTimeRunning / 1000));
- XP := (CurrentXp - StartXp);
- XPPH := Round(((XP) * 3600) / (GetTimeRunning / 1000));
- OS_Smart.__Graphics.Clear;
- OS_Smart.__Graphics.DrawClippedText('JS Air Orber', 'StatChars', point(440, 325), clwhite);
- OS_Smart.__Graphics.DrawClippedText('Run Time : ' + TimeRunning, 'StatChars', point(10, 30), clWhite);
- OS_Smart.__Graphics.DrawClippedText('Orbs Made : ' + IntToStr(orbs) + ' ('+ IntToStr(PlankPH) + ')', 'StatChars', point(10, 50), clWhite);
- OS_Smart.__Graphics.DrawClippedText('GP Made : ' + IntToStr(GP) + ' ('+ IntToStr(GPPH) + ')' , 'StatChars', point(10, 70), clWhite);
- OS_Smart.__Graphics.DrawClippedText('XP Gained : ' + IntToStr(XP) + ' ('+ IntToStr(XPPH) + ')' , 'StatChars', point(10, 90), clWhite);
- end;
- function randomEnergyGenerate(): Integer;
- begin
- result := random(15, 85);
- end;
- function canRun(): boolean;
- begin
- result := ((myplayer.GetRunEnergy > 0) and (not myplayer.IsRunOn));
- end;
- procedure checkRun();
- begin
- if ((canRun()) and (getRunEnergy() > randomEnergy)) then
- begin
- toggleRunning(true);
- randomEnergyGenerate();
- end;
- end;
- procedure Login();
- begin
- MyPlayer.Login;
- wait(randomRange(1000, 4000));
- checkrun;
- setangle(0);
- end;
- procedure SetUp();
- begin
- MyPlayer.Username := user;
- MyPlayer.Password := pass;
- MyPlayer.Active := True;
- Me.Member := true;
- MyPlayer.Create;
- if (not myplayer.isLoggedIn()) then
- Login();
- setAngle(0);
- CalcProfit();
- StartXp := MyPlayer.GetSkillExp(SKILL_MAGIC);
- randomEnergy := randomEnergyGenerate();
- BankToTrapDoor := [Point(3092 + random( - 1, 1), 3484 + random( - 1, 1)), Point(3094 + random( - 1, 1), 3476 + random( - 1, 1)), Point(3094, 3472)];
- LadderToLadder := [Point(3097 + random( - 1, 1), 9876 + random( - 1, 1)), Point(3095 + random( - 1, 1), 9885 + random( - 1, 1)), Point(3095 + random( - 1, 1), 9895 + random( - 1, 1)), Point(3096 + random( - 1, 1), 9903 + random( - 1, 1)), Point(3102 + random( - 1, 1), 9909 + random( - 1, 1)), Point(3107 + random( - 1, 1), 9909 + random( - 1, 1)), Point(3116 + random( - 1, 1), 9909 + random( - 1, 1)), Point(3124 + random( - 1, 1), 9909 + random( - 1, 1)), Point(3131 + random( - 1, 1), 9915 + random( - 1, 1)), Point(3132 + random( - 1, 1), 9926 + random( - 1, 1)), Point(3133 + random( - 1, 1), 9935 + random( - 1, 1)), Point(3133 + random( - 1, 1), 9943 + random( - 1, 1)), Point(3124 + random( - 1, 1), 9950 + random( - 1, 1)), Point(3116 + random( - 1, 1), 9957 + random( - 1, 1)), Point(3107 + random( - 1, 1), 9954 + random( - 1, 1)), Point(3097 + random( - 1, 1), 9956 + random( - 1, 1)), Point(3089 + random( - 1, 1), 9960 + random( - 1, 1)), Point(3088 + random( - 1, 1), 9970 + random( - 1, 1))];
- end;
- function GotAirOrbs: boolean;
- begin
- result := TReflectionInventory.Contains(['Air orb'])
- end;
- function GotUnpOrbs(): boolean;
- begin
- result := TReflectionInventory.Contains(['Unpowered orb']);
- end;
- function GotCosmics(): Boolean;
- var
- Cosmics: TReflectInvItem;
- foundCosmics: boolean;
- i: integer;
- CosmicID: TIntegerArray;
- begin
- CosmicID := [564];
- for i := 0 to high(CosmicID) do
- begin
- if Cosmics.Find(CosmicID[i]) then
- begin
- foundCosmics := true;
- result := true;
- break;
- end;
- end;
- if ((not foundCosmics) or (Cosmics.getQuantity < 2)) then
- result := false
- end;
- procedure customMouse(point: TPoint);
- begin
- case random(0, 9) of
- 0..2: BrakeMMouse(point, random(5), random(5), true);
- 3: BrakeMMouse(point, random(5), random(5), false);
- 4..7: MissMouse(point, random(5), random(5));
- 8..9: HumanMMouse(point, random(5), random(5));
- end;
- end;
- procedure randomMovementEdit();
- var
- I: Integer;
- Deg: Extended;
- Keys: TIntegerArray;
- begin
- if not isLoggedIn() then
- exit;
- Keys := [VK_RIGHT, VK_LEFT];
- I := Random(2);
- if (Random(2) = I) then
- begin
- Deg := getCompassAngle();
- Wait(100 + random(50));
- KeyDown(Keys[I]);
- Wait(500 + random(1000));
- KeyUp(Keys[I]);
- Wait(500 + random(1000));
- end
- else if (Random(3) = 0) then
- sleepAndMoveMouse(1000 + random(200));
- end;
- procedure randomAngleMM();
- var
- leftSide, rightSide: TBox;
- boxArray: array of TBox;
- endPoint: TPoint;
- I: Integer;
- begin
- leftSide := intToBox(9, 9, 360, 480);
- rightSide := intToBox(361, 9, 720, 480);
- boxArray := [leftSide, rightSide];
- I := random(0, 1);
- mouseBox(boxArray[I], MOUSE_MOVE);
- sleep(random(40, 600));
- getMousePos(x, y);
- if (pointInBox(Point(x, y), leftSide)) then
- endPoint := Point(x + 80 + random(1, 340), y + random(9, 19))
- else
- endPoint := Point(x - 80 - random(1, 340), y + random(9, 19));
- HoldMouse(x, y, MOUSE_MIDDLE);
- customMouse(endPoint);
- sleep(random(1, 30));
- ReleaseMouse(x, y, MOUSE_MIDDLE);
- end;
- procedure RandomWait;
- begin
- case random(1000) of
- 0..700: Wait(RandomRange(800, 1300));
- 701..900: Wait(RandomRange(400, 1600));
- 901..1000: Wait(RandomRange(800, 2800));
- end;
- end;
- function MouseOnScreen: boolean;
- begin
- Result := PointInBox(getMousePnt, IntToBox(0, 0, 760, 500));
- end;
- procedure mouseOffScreen;
- begin
- if MouseOnScreen then
- MMouseOffClient('rand');
- end;
- procedure randomCompass();
- var
- Keys: TIntegerArray;
- I: Integer;
- begin
- if (not MyPlayer.isLoggedIn) then
- Exit;
- Keys := [VK_RIGHT, VK_LEFT];
- I := Random(2);
- Wait(100 + random(50));
- KeyDown(Keys[I]);
- Wait(500 + random(1000));
- KeyUp(Keys[I]);
- Wait(200 + random(350));
- end;
- procedure Antiban();
- begin
- if (random(0, 60) = 0) then
- case random(0, 33) of
- 0: HoverSkill('random', False);
- 1..3: HoverSkill('magic', False);
- 3..6: PickUpMouse();
- 7: RandomCompass();
- 8..10: MMouseOffClient('random');
- 11: examineInv();
- 12..13: randomFKeys(True);
- 14: randomRClick();
- 15: checkMovingObjs(true);
- 16..19: pickUpMouse();
- 20..22: RandomAngleMM();
- 23..25: SleepAndMoveMouse(200 + Random(800));
- 26..30: boredhuman;
- 31..33: randomMovementEdit();
- end;
- end;
- procedure Anticlick();
- begin
- if (random(0, 3) = 0) then
- case random(0, 24) of
- 0..2: randomCompass;
- 3..15: SleepAndMoveMouse(75 + Random(750));
- 16..19: mouseOffScreen;
- 20..24: Antiban();
- end;
- end;
- procedure eatFood;
- var
- Food: TReflectInvItem;
- Point: TPoint;
- begin
- if (not TReflectionInventory.Contains([foodtype])) then
- exit;
- gametab(tab_inv) if food.Find(FOODTYPE) then
- begin
- Point := Food.GetMSPoint;
- reflect.mouse.move(Point, randomrange(2, 4), randomrange(2, 4));
- FastClick(MOUSE_LEFT);
- wait(300);
- end
- end;
- function NearSewer(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3097, 9884), 80);
- end;
- function NearBank(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3094, 3493), 6);
- end;
- function NearEdge(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3087, 3496), 2);
- end;
- function NearGate(): boolean;
- begin
- result := Reflect.Tiles.NearTile(Point(3102, 9910), 4);
- end;
- function neargate2():boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3130, 9916), 2) or Reflect.Tiles.NearTile(Point(3133, 9916), 2);
- end;
- function NearLadder(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3088, 9970), 5);
- end;
- function NearOrbs(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3088, 3570), 10);
- end;
- function NearDemons(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3097, 9956), 14);
- end;
- function NearTrapdoor(): boolean;
- begin
- Result := Reflect.Tiles.NearTile(Point(3094, 3470), 6);
- end;
- procedure randomMouseInput(pnt: Tpoint; ranx, rany: integer);
- begin
- case random(3) of
- 0: humanMMouse(pnt, ranx, rany);
- 1: missMouse(pnt, ranx, rany);
- 2: mouse(pnt, ranx, rany, mouse_move);
- end;
- end;
- function R_TileOnMS(Tile: TPoint; var OutputPoint: TPoint; x: integer = 0; y: integer = 0; z: integer = 0): boolean;
- var
- tempB: TBox;
- begin
- OutputPoint := TReflectionTiles.TileToMS(Tile, x, y, z);
- tempB := intToBox(MSX1, MSY1, MSX2, MSY2);
- result := PointInBox(OutputPoint, tempB);
- end;
- function R_InteractTile(tile: Tpoint; action: string; x: integer = 0; y: integer = 0; z: integer = 0): boolean;
- var
- RSTile: TPoint;
- begin
- case random(2) of
- 0: lor := vk_right;
- 1: lor := vk_left;
- end;
- if not R_TileOnMS(Tile, RSTile, x, y, z) then
- begin
- MyPlayer.WalkToTileMM(Tile);
- Wait(100 + Random(200));
- FFlag(0);
- Exit;
- end;
- if R_TileOnMS(Tile, RSTile, x, y, z) then
- begin
- randomMouseInput(rsTile, 3, 3);
- if (Reflect.Text.IsUpText(action)) then
- begin
- FastClick(mouse_left);
- result := didClick(true, 1000);
- Wait(50 + Random(200));
- end
- else
- begin
- if TReflectionText.OptionExists(action) then
- begin
- FastClick(mouse_right);
- result := TReflectionText.ChooseOption(action);
- Wait(50 + Random(200));
- end;
- if not result then
- begin
- keyDown(lor);
- Wait(randomRange(200, 500));
- keyUp(lor);
- end;
- end;
- end;
- end;
- procedure HandleRandoms;
- var
- i, j, me_indice: integer;
- _npcs: TReflectNPCArray;
- randoms: tstringarray;
- begin
- randoms := ['molly', 'stranger plant', 'niles', 'miles', 'giles', 'sandwich lady', 'drunken dwarf', 'genie', 'highwayman', 'dr jekyll', 'cap' 'n hand', 'security guard', 'rick turpentine', 'mysterious old man', 'frog', 'null', 'mime', 'sergeant damien', 'freaky forester', 'postie pete', 'tilt', 'flippa', 'leo', 'pillory guard', 'evil bob'];
- _npcs.GetAll;
- me_indice := TReflectLocalPlayer.GetPlayerIndex;
- for i := 0 to high(_npcs) do
- begin
- if (_npcs[i].getInteractingIndex = me_indice) then
- begin
- for j := 0 to high(randoms) do
- begin
- if (pos(randoms[j], lowercase(_npcs[i].getName)) > 0) then
- begin
- if R_InteractTile(_npcs[i].getTile, 'Dismiss', 0, 0, 50) then
- begin
- randomsdismissed = randomsdismissed + 1;
- antiClick;
- sleep(2500 + random(1000));
- end;
- end;
- end;
- end;
- end;
- end;
- function findObject(COL, TOL, PIXELS: Integer; HUE, SAT: Extended): Boolean;
- var
- WhatEver: TColEx;
- TPA: TPointArray;
- ATPA: T2DPointArray;
- I: Integer;
- box: TBox;
- x, y: Integer;
- begin
- WhatEver.Create(Col, Tol, Hue, Sat);
- if not WhatEver.FindAllIn(Area_MS, TPA) then
- Exit(False);
- ATPA := ClusterTPA(TPA, 10);
- SortATPAFromMidPoint(ATPA, Point(MSCX, MSCY));
- if (length(ATPA) <= 0) then
- begin
- result := False;
- exit;
- end;
- for I := 0 to high(ATPA) do
- begin
- if (length(ATPA[I]) >= PIXELS) then
- begin
- box := intToBox(ATPA[I].getBounds().X1, ATPA[I].getBounds().Y1 - 25, ATPA[I].getBounds().X2, ATPA[I].getBounds().Y2);
- if (box.x1 < 0) then
- box.x1 := 0;
- if (box.y1 < 0) then
- box.y1 := 0;
- position := MiddleTPA(ATPA[I]);
- result := True;
- exit;
- end;
- end;
- result := False;
- end;
- procedure walkWait();
- var
- I: Integer;
- begin
- repeat
- Wait(200 + Random(200));
- until (not MyPlayer.IsMoving);
- Wait(250 + Random(600));
- end;
- procedure openGate();
- begin
- walkWait();
- if not Myplayer.isloggedin() then
- exit;
- if (not neargate) and (not neargate2) then
- exit;
- if (findObject(7763841, 10, 40, 0.16, 0.12)) then
- begin
- customMouse(position);
- if TReflectionText.IsUpText('Close') then
- exit;
- if TReflectionText.IsUpText('Open') then
- begin
- fastClick(mouse_left);
- Wait(700 + random(300));
- end
- else
- begin
- fastClick(mouse_right);
- Wait(50 + random(100));
- if TReflectionText.ChooseOption('Open') then
- Wait(700 + random(300))
- else begin randomCompass();
- openGate(); end;
- end;
- end
- else
- begin
- randomCompass();
- openGate();
- end;
- AntiClick();
- end;
- function walkPath(Path: TPointArray; reverse: boolean = false): boolean;
- var
- I, H, Tim, D, Fails, lP, z, run: integer;
- P, MM, MMF: TPoint;
- t: Timer;
- begin
- ColorToleranceSpeed(1);
- H := High(Path);
- Tim := GetSystemTime + 10000 + Random(2000);
- Fails := 0;
- lP := 0;
- repeat
- if not MyPlayer.isloggedin() then
- exit;
- Proggy();
- HandleRandoms();
- for I := H downto 0 do
- begin
- MM := TReflectionTiles.TileToMM(path[I]);
- D := Distance(MM.X, MM.Y, MMCX, MMCY);
- if (d < random(60, 67)) then
- begin
- if (d >= 10) then
- begin
- CustomMouse(MM);
- if random(1000) > 34 then
- FastClick(mouse_left)
- else
- begin
- fastclick(mouse_left);
- wait(randomrange(20, 70));
- fastclick(mouse_left);
- end;
- WaitFunc(@ isplayerWalking, 10, 1350);
- if (getHealthPercent <= eatpercent) then
- begin
- eatFood;
- if canRun then
- ToggleRunning(true)
- end;
- if (NearDemons() and canRun()) then
- ToggleRunning(true);
- if (not myplayer.ismoving) and (neargate) then
- openGate();
- if (neargate2) then
- openGate();
- case Random(1800) of
- 4..90: compassMovement(random(5, 15), igaussrange(90, 150), false);
- 92..135: SleepAndMoveMouse(200 + Random(600));
- 136..149: MMouseOffClient('random');
- 150..155: randomRclick();
- 156..170: randomAngleMM();
- 176..185:
- if canRun then
- ToggleRunning(true);
- 186..300: antiClick;
- end;
- end;
- WaitFunc(@ isplayerWalking, 10, 700);
- if (getHealthPercent <= eatPercent) then
- begin
- eatFood;
- if canRun then
- ToggleRunning(true);
- end;
- if (i = h) then
- fflag(8)
- else
- fflag(10 + random(25));
- Result := (I = H);
- if result then
- break(2)
- else
- break();
- end;
- end;
- Result := (I = H);
- until result;
- FFlag(5 + randomrange( - 2, 2));
- wait(randomrange(400, 700));
- end;
- procedure upLadder();
- begin
- repeat
- if not MyPlayer.isloggedin() then
- exit;
- HandleRandoms;
- if R_InteractTile([3088, 9971], 'Ladder', mouse_left) then
- begin
- sleep(1500);
- while myplayer.isMoving do
- sleep(300 + random(800));
- waitfunc(@ nearOrbs, 50, 4000);
- end;
- until (nearOrbs);
- end;
- procedure openDoor();
- begin
- repeat
- if not MyPlayer.isloggedin() then
- exit;
- HandleRandoms;
- if R_InteractTile([3097, 3468], 'Trapdoor', mouse_left) then
- begin
- sleep(1500);
- while myplayer.isMoving do
- sleep(500 + random(1000));
- waitfunc(@ nearSewer, 50, 1500);
- end;
- until (NearSewer);
- end;
- procedure ToTrapDoor;
- begin
- if (not NearTrapdoor) then
- begin
- walkPath(BankToTrapDoor);
- walkWait();
- end;
- end;
- procedure ToLadder;
- begin
- if (not NearLadder) then
- begin
- WalkPath(LadderToLadder);
- walkWait();
- end;
- end;
- function OrbtextVisible(): Boolean;
- var
- t: Timer;
- numb: Integer;
- begin
- result := false;
- numb := random(2000, 3000);
- t.start();
- repeat
- if (t.timeElapsed() > numb) then
- break;
- sleep(random(320, 600));
- if (countColor(128, 256, 359, 289, 379) > 20) then
- result := true;
- until (result);
- end;
- function IsItemEquipped(Name: string): Boolean;
- var
- i: Integer;
- Items: TReflectWornEquipmentArray;
- begin
- Items.GetAll();
- for i := 0 to High(Items) do
- begin
- if Pos(Name, Items[i].GetName()) > 0 then
- Exit(True);
- end
- end;
- procedure checkGlory();
- begin
- if IsItemEquipped('Amulet of glory(') then
- begin
- depleted := false;
- end
- else
- depleted := true;
- end;
- procedure WithdrawItems(item: string; amount: Integer; Result: Boolean);
- var
- BankItem: TReflectBankItem;
- begin
- if (not isBankOpen) then
- Exit;
- if BankItem.Find(item) then
- begin
- wait(randomrange(25, 150));
- BankItem.Withdraw(amount);
- result := true;
- end
- else
- begin
- writeln('Could not find: ' + item);
- logoutPlayer;
- terminatescript;
- result := false;
- end;
- end;
- procedure WearGlory();
- var
- glory: TReflectInvItem;
- begin
- if nearOrbs then exit;
- gametab(tab_inv);
- sleep(random(20, 100));
- if not glory.Find('Amulet of glory(6)') and
- not glory.Find('Amulet of glory(5)') and
- not glory.Find('Amulet of glory(4)') and
- not glory.Find('Amulet of glory(3)') and
- not glory.Find('Amulet of glory(2)') and
- not glory.Find('Amulet of glory(1)') then
- Exit;
- begin
- Reflect.Mouse.Move(glory.GetPoint, 3, 3);
- sleep(random(20, 100));
- Reflect.Mouse.Click(mouse_left);
- end;
- end;
- procedure WearStaff();
- var
- staff: TReflectInvItem;
- begin
- if nearOrbs then exit;
- gametab(tab_inv);
- sleep(random(20, 100));
- if not staff.Find('Staff of air') then
- Exit;
- begin
- Reflect.Mouse.Move(staff.GetPoint, 3, 3);
- sleep(random(20, 100));
- Reflect.Mouse.Click(mouse_left);
- end;
- end;
- function getNewGlory: boolean;
- begin
- if (not isBankOpen) then
- exit;
- WithdrawItems('Amulet of glory(6)', 1, true);
- sleep(random(20, 100));
- closeinterface;
- sleep(random(60, 150));
- wearGlory();
- end;
- procedure OpenBank();
- var
- Bank: TReflectObject;
- t: Timer;
- begin
- checkglory();
- if (Interfaces[PINSCREEN].isVisible()) then
- inPin(Pin);
- if (isBankOpen()) then
- exit;
- if bank.Find(objGame, 'Bank booth', 10) then
- begin
- Reflect.Mouse.Move(bank.GetMSPoint, 10, 10);
- if TReflectionText.IsUpText('Bank booth') then
- begin
- case randomRange(0, 6) of
- 0..5:
- begin
- Reflect.Mouse.Click(mouse_left);
- end;
- 6:
- begin
- Reflect.Mouse.Click(MOUSE_RIGHT);
- TReflectionText.ChooseOption('ank booth');
- end;
- end;
- end
- else
- begin
- Reflect.Mouse.Click(MOUSE_RIGHT);
- if TReflectionText.ChooseOption('ank booth') then waitfunc(@ isbankOpen, 50, 5000) else randomCompass();
- end;
- wait(800);
- end;
- t.start();
- while ((not isBankOpen()) and (not Interfaces[PINSCREEN].isVisible())) and (t.TimeElapsed() < 3000) do
- sleep(random(150, 250));
- end;
- procedure bank();
- var
- BankItem: TReflectBankItem;
- begin
- if (not isBankOpen) then
- Exit;
- if (Interfaces[PINSCREEN].isVisible()) then
- InPin(MyPlayer.Pin);
- if getinvcount > 0 then
- quickDeposit('inventory');
- if (getHealthPercent <= 95) then
- begin
- WithdrawItems(foodtype, 5, true);
- closeInterface;
- repeat
- eatfood();
- wait(randomrange(1200, 1800));
- if (not myplayer.isloggedin) then
- exit
- until ((getHealthPercent >= 95) or (not TReflectionInventory.Contains([foodtype])));
- exit;
- end
- else if (depleted = true) then
- begin
- getNewGlory();
- end
- else
- begin
- if foodtoTake = 1 then
- WithdrawItems(foodtype, foodtoTake, true)
- else if foodtoTake = 2 then
- begin
- WithdrawItems(foodtype, 1, true);
- WithdrawItems(foodtype, 1, true);
- end;
- begin
- WithdrawItems('Cosmic rune', 78, true);
- WithdrawItems('Unpowered orb', 78, true);
- end;
- sleep(random(150, 250));
- end;
- wait(1500);
- end;
- procedure ToBank();
- begin
- if NearBank then
- exit;
- begin
- Wait(RandomRange(200, 600));
- myplayer.blindwalkMM(Point(3093 + random( - 2, 2), 3491 + random( - 2, 2)));
- waitfunc(@ NearBank, 10, 10000);;
- while (myPlayer.ismoving) do
- Randomwait;
- end;
- end;
- procedure EdgeTele();
- begin
- if not Myplayer.isloggedin() then
- exit;
- WearGlory();
- WearStaff();
- gameTab(TAB_EQUIP);
- sleep(20 + random(30));
- customMouse(point(639 + random( - 8, 8), (265 + random( - 8, 8))));
- sleep(20 + random(30));
- fastClick(Mouse_Right);
- sleep(20 + random(30));
- if TReflectionText.ChooseOption('Edgeville') then
- waitfunc(@NearEdge, 50, 6000);
- Wait(200 + random(1000));
- if (getHealthPercent <= 95) then
- eatFood();
- end;
- function CheckIfClickedSpell(): boolean;
- begin
- result := TReflectionText.IsUpText('Cast')
- end;
- procedure OrbDo();
- var
- Obby: TReflectObject;
- begin
- if (checkifclickedspell = false) then
- begin
- gameTab(TAB_MAGIC);
- customMouse(point(569 + random( - 4, 4), (398 + random( - 4, 4))));
- wait(randomrange(10, 170));
- fastclick(mouse_left);
- end;
- begin
- if Obby.Find(objGame, 'Obelisk of Air', 9) then
- begin
- Reflect.Mouse.Move(Obby.GetMSPoint, 5, 5);
- //if TReflectionText.IsUpText('Obelisk') then
- fastclick(mouse_left);
- if not (didClick(true, 1000)) then
- exit;
- if (didClick(true, 1000)) then
- waitfunc(@ OrbTextVisible, 50, 4000);
- if (OrbTextVisible() = true) then
- begin
- Wait(RandomRange(100, 300));
- CustomMouse(OrbPosition);
- if TReflectionText.IsUpText('Make') then
- begin
- Wait(RandomRange(80, 100));
- fastClick(mouse_Right);
- if TReflectionText.ChooseOption('Make All') then
- begin
- Wait(RandomRange(80, 100));
- case random(0, 6) of
- 0..4: mouseOffScreen;
- 4..6: AntiClick;
- end
- Tim.start;
- repeat
- wait(randomrange(250, 800));
- if myplayer.IsUnderAttack then
- begin
- Edgetele();
- if nearEdge then ToBank() else exit;
- OpenBank();
- Bank(); //note to self *** prevents from walking to obby with uncharged glory, if used last charge of glory when teleing from player, and still have unp orbs + cosmics
- switchRandomWorld();
- exit;
- end;
- CurrentXp := myPlayer.GetSkillExp(SKILL_MAGIC);
- Proggy();
- if ((ClickToContinue) and (GotUnpOrbs()) and (GotCosmics())) then
- orbDo();
- until ((not GotCosmics) {or (not MakingOrbs())} or (not gotUnpOrbs) or (not myplayer.isloggedin) or (tim.timeElapsed > 150000));
- end
- else
- exit;
- end
- else
- exit;
- end
- else
- exit;
- end
- else
- exit;
- end;
- wait(randomrange(2000, 6000));
- end;
- procedure loop();
- begin
- proggy();
- if (not myplayer.isLoggedIn()) then
- Login();
- if ((not GotCosmics()) and (not NearEdge()) and (not NearBank())) or ((not GotUnpOrbs()) and (not NearBank())) then
- EdgeTele();
- if ((not GotCosmics()) and (NearEdge()) and (not NearBank() and (not nearSewer()) and (not NearOrbs()) and (not NearTrapdoor()))) or ((not GotUnpOrbs()) and (NearEdge()) and (not NearBank() and (not nearSewer()) and (not NearOrbs()) and (not NearTrapdoor()))) then
- ToBank();
- if ((nearBank()) and (not GotCosmics()) and (not isBankOpen())) or ((nearBank()) and (not GotUnpOrbs()) and (not isBankOpen())) or ((nearBank()) and (GotAirOrbs()) and (not isBankOpen())) then
- OpenBank();
- if (isBankOpen()) then
- bank();
- if ((NearLadder()) and (GotUnpOrbs()) and (GotCosmics())) then
- upLadder();
- if ((NearOrbs()) and (GotUnpOrbs()) and (GotCosmics())) then
- OrbDo();
- if ((GotUnpOrbs()) and (GotCosmics()) and (not nearSewer()) and (not NearOrbs()) and (not NearTrapdoor())) then
- ToTrapDoor();
- if ((GotUnpOrbs()) and (GotCosmics()) and (NearSewer())) then
- ToLadder();
- if ((GotUnpOrbs()) and (GotCosmics()) and (NearTrapdoor())) then
- openDoor();
- Antiban();
- end;
- begin
- InitAL();
- Reflect.Setup();
- MyPlayer.Create();
- SetUp();
- reflect.mouseSpeed := Random(30, 40);
- repeat
- loop();
- until (false);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement