Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program NightmarezoneV8;
- {$DEFINE WALKER}
- {$DEFINE SMART}
- {$i AeroLib/AeroLib.Simba}
- var
- XpPerHour, cXpPerHour, hpXpPerHour, StartTotalExp, Games: integer;
- AbsorbPotsBarrel, OverloadPotsBarrel, BenefitBox, Item_RockCake, Item_AbsorbPotion, Item_OverloadPotion: TItem;
- RewardChest, OverloadBarrel, AbsorbBarrel, Button, DrinkPotion, DominicOnion: TMSObject;
- ssTimer, MinigameStuckTimer, PrayerF, ProgressReportT: Timer;
- XPStart, MinigameSWalk, GameOne: boolean;
- const
- VERSION := '9';
- OVERLOADPOTIONS := 11;
- USERNAME := '';
- PASSWORD := '';
- ATTACKSTYLE := 'Strength';
- SCREENSHOTTIMER := 600000;
- DEBUG:= FALSE;
- USEDHAROKS:= FALSE;
- USEBREAKS:= true;
- procedure declarePlayer();
- begin
- Me.Name := USERNAME;
- Me.Pass := PASSWORD;
- Me.Member := True;
- Me.Active := True;
- end;
- procedure GlobalFree;
- begin
- freeDTM(Item_RockCake.DTM);
- freeDTM(Item_AbsorbPotion.DTM);
- freeDTM(Item_Overloadpotion.DTM);
- FreeDTM(AbsorbPotsBarrel.DTM);
- FreeDTM(OverloadPotsBarrel.DTM);
- FreeDTM(BenefitBox.DTM);
- end;
- procedure InitializeScript;
- begin
- AbsorbPotsBarrel.DTM := DTMFromString('mrAAAAHic42BgYPgPxAZQfJWRgeE6EHMB8VUgPxRITwbiHiCeCMSdUBrEnw7E04CYUsBIAMMAAMS0CN8=');
- OverloadPotsBarrel.DTM := DTMFromString('mlwAAAHicY2dgYPgCxCZQfJ6RgeECEDMD8WcgfyKQ7gHiCUDcCcRToPxpQEwuYMSDoQAAwIUH9g==');
- Benefitbox.DTM := DTMFromString('m6wAAAHic42ZgYDjFyMCwAoiXA/E7KD4NxGeAeCcQLwbiXUB8D4hTgDgWiLOBOAfKjoSyc6DyCUCcDMT/Z8gz+Ph6gnFcfBSYdvdwZfD0dGOIjAxhKEoJBKsBYVIAIwkYCQAA77EZsg==');
- Item_OverloadPotion.Name := 'Overload';
- Item_OverloadPotion.DTM := DTMFromString('m6wAAAHic42ZgYOAEYl4g5gNiASAWhrJZGSCACYjZgJgdiMWhfB6oWgkgloZiUSAWBGJuqD4RQRCPkSgsyUA8IM5ECEYCAAd/AY0=');
- Item_RockCake.Name := 'Dwarven rock cake';
- Item_RockCake.DTM := DTMFromString('mqAEAAHicE2FgYOAFYmEgFgViCSgWg4oJADEPEHMCMRsQMzNAABMQM0L5bFB5Xqh6LiziolAzxaHmg2gRIBYCYj4g5kYynwVqPhPUrvxUb6ht1MEiDNQF1HMZBGMDAO4EA0c=');
- Item_AbsorbPotion.Name := 'Absorbtion Potion';
- Item_AbsorbPotion.DTM := DTMFromString('mKgEAAHicnc07CoBADIThUXyuuIgriI/738DWxov5y6bQch34isAk8ZIaONQoUSFXTAaPgBGDzT22V+e50VlnxoodCybba1HgOC/bSuP0L+mfom9u6uoDxw==');
- DominicOnion.create('DominicOnion', ['omini', 'nion', 'inic', 'Domi'], [createCol(3831170, 8, 0.05, 1.34)], [createCol(3577466, 2, 0.09, 0.23)]);
- DrinkPotion.create('DrinkPotion', ['rink', 'Dri', 'pot', 'ion'], [CreateCol(2961232, 6, 0.16, 0.15)], [createCol(4680063, 8, 0.12, 0.13)]);
- Button.create('AcceptButton', ['con', 'tin', 'ue'], [createcol(65280, 0)]);
- AbsorbBarrel.create('AbsorbBarrel', ['bsor', 'pti'], [createCol(4421779, 10, 0.03, 0.11)], [createCol(5789791, 15, 0.19, 0.05)]);
- OverloadBarrel.create('OverloadBarrel', ['verloa', 'Over'], [createCol(4421779, 10, 0.03, 0.11)], [createCol(5789791, 15, 0.19, 0.05)]);
- RewardChest.create('RewardChest', ['earch', 'ewards', 'hest', 'ewa'], [createCol(3228506, 20, 0.05, 0.08)], [createCol(1347520, 11, 0.01, 0.34)]);
- end;
- function GoogleDriveStatus: string;
- var
- fileName, Bot_SavePath: string;
- GooglePath: string;
- i,FileHandle: integer;
- begin
- GooglePath := 'C:/Users/Gebruiker/Google Drive/NMZ';
- if (not directoryExists(GooglePath)) then
- exit;
- try
- Filehandle:= OpenFile(GooglePath + '/Running.txt',true);
- ReadFileString(FileHandle,result,5);
- except
- writeln('Error');
- exit;
- end;
- closeFile(FileHandle);
- end;
- procedure TakeScreenCustom();
- var
- i: integer;
- begin
- if not (FileExists('C:\Users\Gebruiker\Google Drive\NMZ' + inttostr(i) + '.png')) then
- begin
- TakeScreen(inttostr(i), 'C:\Users\Gebruiker\Google Drive\NMZ\');
- writeln('C:\Users\Gebruiker\Google Drive\NMZ\' + (inttostr(i)) + '.png');
- inc(i);
- exit;
- end;
- end;
- procedure ScreenShotProgress;
- begin
- if(ssTimer.TimeElapsed > SCREENSHOTTIMER) then
- begin
- TakeScreenCustom;
- ssTimer.start;
- end;
- end;
- procedure cProgressReport;
- begin
- if (ProgressReportT.timeElapsed > 20000) then
- begin
- XpPerHour := Round((getXpBarAmount - StartTotalExp) / (GetTimeRunning / 3600000.0));
- cXpPerHour := (Round((XpPerHour / 5.33) * 4));
- hpXpPerHour := (Round((XpPerHour / 5.33) * 1.33));
- cleardebug;
- writeln(' Eduards NightmareZone V'+(VERSION));
- writeln('- Total XP: ' + inttostr(getXpBarAmount - StartTotalExp));
- writeln('- Total XP/hr: ' + inttostr(XpPerHour));
- writeln('- ' + ATTACKSTYLE + ' XP/hr: ' + FloattoStr(cXpPerHour));
- writeln('- HP XP/hr: ' + FloattoStr(hpXpPerHour));
- writeln('- Time Running: ' + TimeRunning);
- ProgressReportT.start;
- end;
- end;
- procedure customMouse(point: TPoint);
- begin
- case random(0, 6) of
- 0..2: BrakeMMouse(point, random(5), random(5), true);
- 3: BrakeMMouse(point, random(5), random(5), false);
- 4..5: MissMouse(point, random(5), random(5));
- 6: HumanMMouse(point, random(5), random(5));
- end;
- end;
- function OpenReportFile(): integer;
- var
- fileName, Bot_SavePath: string;
- SavePathVersion: string;
- begin
- SavePathVersion := 'NMZV' + (VERSION) + '\';
- Bot_SavePath := ScriptPath + SavePathVersion;
- if (not directoryExists(Bot_SavePath)) then
- forceDirectories(Bot_SavePath);
- fileName := 'NMZAerolibV' + (VERSION) + '.txt';
- fileName := Bot_SavePath + fileName;
- try
- if (fileExists(fileName)) then
- result := appendFile(fileName)
- else
- result := createFile(fileName);
- except
- writeln('Error');
- end;
- end;
- procedure AddReport(s: string);
- var
- tmpFile: integer;
- begin
- tmpFile := OpenReportFile();
- if (tmpFile >= 0) then
- try
- writeFileString(tmpFile, 'Time: '+TheTime+ ' '+s + #13 + #10);
- if(DEBUG) then writeln(s);
- except
- Writeln('Error writing File');
- finally
- closeFile(tmpFile);
- end;
- end;
- procedure CreateDirectoriesForScript;
- begin
- if (not directoryExists(ScriptPath + '/NMZV' + (VERSION) + '/')) then
- if (forceDirectories(ScriptPath + '/NMZV' + (VERSION) + '/')) then
- begin
- AddReport('[CDFC] Succesfully forced NMZ directory');
- end;
- if (not directoryExists(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Errors/')) then
- if (forceDirectories(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Errors/')) then
- begin
- AddReport('[CDFC] Succesfully forced NMZ/Errors/ directory');
- end;
- if (not directoryExists(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Breaks/')) then
- if (forceDirectories(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Breaks/')) then
- begin
- AddReport('[CDFC] Succesfully forced NMZ/Breaks/ directory');
- end;
- if (not directoryExists(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Proggies/')) then
- if (forceDirectories(ScriptPath + '/NMZV' + (VERSION) + '/' + 'Proggies/')) then
- begin
- AddReport('[CDFC] Succesfully forced NMZ/Proggies/ directory');
- end;
- end;
- procedure Updater;
- var
- NewFile: integer;
- OnlineVersion, NewScript, NewFileName: string;
- begin
- OnlineVersion := GetPage('http://pastebin.com/raw/hB5uBFUV');
- if (trim(OnlineVersion) > VERSION) then
- begin
- AddReport('Update Available! ');
- AddReport('Updating script to V' + OnlineVersion);
- NewScript := GetPage('http://pastebin.com/raw/X0t5Vg2e');
- NewFileName := scriptPath + 'NMZAerolib' + Trim(OnlineVersion) + '.simba';
- NewFile := Rewritefile(NewFileName, true);
- try
- WriteFileString(NewFile, NewScript);
- except
- begin
- AddReport('Fatal error writing to ' + NewFileName + '!!');
- terminatescript;
- end;
- end;
- CloseFile(NewFile);
- AddReport('New script downloaded to ' + NewFileName + '. Please restart Simba.');
- TerminateScript;
- end
- else
- AddReport('You have the latest version!');
- end;
- procedure XpTracker;
- begin
- if not (XPStart) then
- begin
- XPStart := True;
- toggleXPBar(True, True);
- StartTotalExp := GetXpBarAmount;
- AddReport('Starting XP is: ' + inttostr(StartTotalExp) + '.');
- end;
- end;
- function MinigameCheck: boolean;
- begin
- if isLoggedIn then
- begin
- if (PercentBlackMM < 5) then
- begin
- AddReport('*MGC -> False');
- exit(false);
- end
- else
- exit(true);
- end
- else
- exit(false);
- end;
- function BreakingCheck: boolean;
- var
- CurrentHour, CurrentMinute: integer;
- begin
- getLocalTime(CurrentHour,CurrentMinute);
- if(CurrentHour > 7) and (CurrentHour < 24) then
- begin
- AddReport('*BC -> False -> H->'+inttostr(CurrentHour));
- exit(false)
- end else
- begin
- AddReport('*BC -> True -> H->'+inttostr(CurrentHour));
- exit(true)
- end;
- end;
- procedure AntiBan;
- var
- ItemBox: Tbox;
- equipPiece: string;
- begin
- if (not (isLoggedIn)) then
- exit;
- case random(15000) of
- 6:
- begin
- AddReport('Antiban 6');
- hoverSkill('random', false);
- MMouseOffClient('rand');
- end;
- 1005:
- if GameTab(TAB_EQUIP) then
- if wearingItem(6) then
- begin
- case random(4) of
- 0: equipPiece := 'chest';
- 1: equipPiece := 'amulet';
- 2: equipPiece := 'weapon';
- 3: equipPiece := 'legs';
- 4: equipPiece := 'boots';
- 5: equipPiece := 'helm';
- end;
- ItemBox := GetEquippedItemBounds(equipPiece);
- GaussMouseBox(ItemBox.X1, ItemBox.Y1, ItemBox.X2, ItemBox.Y2, MOUSE_RIGHT);
- if not ChooseOption('Check') then
- ChooseOption('Examine')
- else
- ChooseOption('Check');
- wait(randomrange(900, 2200));
- MMouseOffClient('Rand');
- end;
- 111:
- begin
- AddReport('Antiban 111');
- examineInv();
- end;
- 115:
- begin
- AddReport('Antiban 115');
- MMouseOffClient('top');
- end;
- 160:
- begin
- AddReport('Antiban 160');
- SleepAndMoveMouse(randomrange(1000, 1200));
- end;
- 170:
- begin
- AddReport('Antiban 170');
- humanRandomMouse;
- end;
- 180:
- begin
- AddReport('Antiban 180');
- randomMovement;
- end;
- 190:
- begin
- AddReport('Antiban 190');
- boredHuman;
- end;
- 200:
- begin
- AddReport('Antiban 200');
- examineInv;
- end;
- 210:
- begin
- AddReport('Antiban 210');
- randomFKeys(true);
- end;
- end;
- end;
- function OutsideCheck: boolean;
- begin
- if isLoggedIn then
- begin
- if not (Me.inCombat) then
- begin
- if (PercentBlackMM < 5) then
- begin
- if (GetHealthPercent > 90) then
- begin
- AddReport('*Outside -> True');
- result := true;
- end
- else
- result := false;
- end;
- end;
- end
- else
- result := false;
- end;
- function FSM: integer;
- begin
- if(USEBREAKS) then
- if (BreakingCheck) then
- exit(1);
- if not isLoggedIn then
- LoginPlayer(false);
- if (OutsideCheck) then
- exit(3);
- if (MinigameCheck) then
- exit(2);
- end;
- procedure Overloading;
- begin
- if(FSM = 2) then
- if (GetCurrentHealth <> 1) then
- begin
- if (GetCurrentHealth >= 51) then
- begin
- AddReport('Overloading');
- case random(9) of
- 0..1: Wait(randomrange(1000, 2000));
- 2..9:
- begin
- if (not (Item_Overloadpotion.InInventory)) then
- begin
- AddReport('Overloading -> Guzzling');
- repeat
- if (GetCurrentHealth >= 51) then
- begin
- Item_RockCake.interact(Mouse_Right);
- if (WaitOption('Guzzle', 200)) then
- begin
- wait(randomrange(1000, 2000));
- PrayerF.start;
- end;
- end;
- until (getCurrentHealth = 1);
- end;
- end;
- end;
- case random(100) of
- 0..99:
- begin
- Item_Overloadpotion.interact(mouse_left);
- wait(randomrange(500, 1000));
- end;
- 100:
- begin
- Item_Overloadpotion.interact('drink');
- end;
- end;
- case random(1) of
- 0: MMouseOffClient('bottom');
- 1: MMouseOffClient('right');
- end;
- Wait(randomrange(4900, 5200));
- end;
- end;
- end;
- procedure RockCake;
- var
- iBox: TBox;
- begin
- if(FSM = 2) then
- repeat
- if(FSM = 2) then
- begin
- if (GetCurrentHealth < 52) then
- exit;
- GameTab(TAB_INV);
- Item_RockCake.interact(Mouse_left);
- wait(randomrange(200, 300));
- if (GetCurrentHealth < 55) then
- begin
- Wait(randomrange(800, 1000));
- end;
- end;
- AddReport('Rockcake');
- until (getCurrentHealth = 51);
- if toggleQP(true) then
- wait(randomrange(150, 250));
- if toggleQP(false) then
- wait(randomrange(150, 300));
- end;
- function AbsorbStatus(): boolean;
- var
- absCol : TColEx;
- begin
- absCol.create(16777215, 0, 0.00, 0.00); // if your hue/sat mod is "0.2" then don't add the last 2 parameters
- result := absCol.findIn(toBox(9,22,76,75));
- end;
- procedure Absorbing;
- var
- z, i: integer;
- begin
- if(FSM = 2) then
- if not (AbsorbStatus) then
- begin
- AddReport('Absorbing');
- GameTab(TAB_INV);
- if (Item_AbsorbPotion.inInventory) then
- begin
- case random(100) of
- 0..1: exit;
- 2..10: Wait(randomrange(1000, 2000));
- 11..19:
- begin
- for i := 0 to 3 do
- begin
- AddReport(' x7');
- Item_absorbpotion.interact(mouse_left);
- Wait(randomrange(1000, 1450));
- end;
- end;
- 20..21:
- begin
- AddReport(' -> drink');
- item_absorbpotion.interact('Drink');
- end;
- 22..100:
- begin
- for i := 0 to 4 do
- begin
- AddReport(' -> left click');
- Item_absorbpotion.interact(mouse_left);
- Wait(randomrange(1000, 1250));
- end;
- end;
- end;
- case random(1) of
- 0: MMouseOffClient('bottom');
- 1: MMouseOffClient('right');
- end;
- wait(randomrange(100, 300));
- end
- else
- begin
- wait(randomrange(1000, 1500));
- end;
- end;
- end;
- function InventoryCheck: boolean;
- var
- OverloadPotionSlots, AbsorbPotionSlots: array of integer;
- begin
- if isLoggedIn then
- begin
- AddReport('Inventory Check');
- if (GameTab(TAB_INV)) then
- begin
- OverloadPotionSlots := Item_OverloadPotion.getSlots;
- AbsorbPotionSlots := Item_AbsorbPotion.getSlots;
- AddReport(' Overloads -> '+inttostr(high(OverloadPotionSlots) + 1));
- AddReport(' Overloads -> '+inttostr(high(AbsorbPotionSlots) + 1));
- if ((high(OverloadPotionSlots) + 1) < OVERLOADPOTIONS) or (((High(AbsorbPotionSlots) + 1) + OVERLOADPOTIONS) < 27) then
- begin
- result := false;
- end
- else
- result := true;
- end;
- end
- else
- result := false;
- end;
- procedure RandomBreaker;
- var
- Hours,Minutes: integer;
- randomminutebreak: integer;
- begin
- if(GameOne) then
- exit;
- GetLocalTime(Hours,Minutes);
- case random(7) of
- 0..7:
- AddReport('RB -> Not breaking');
- 8:
- begin
- AddReport('RB -> Breaking');
- LogoutPlayer;
- if(Minutes < 30) then
- begin
- randomminutebreak:= randomrange(10,29);
- AddReport('RB -> we are randomly breaking' +inttostr(randomminutebreak)+' minutes.');
- WaitUntilTime(Hours,randomminutebreak);
- end;
- if(Minutes >= 30) then
- begin
- randomminutebreak:= randomrange(1,10);
- AddReport('RB -> we are randomly breaking 1 hour and ' +inttostr(randomminutebreak)+' minutes.');
- WaitUntilTime(Hours + 1,randomminutebreak);
- end;
- LoginPlayer(false);
- end;
- end;
- end;
- procedure BreakingExecute;
- var
- BreakingTimer: Timer;
- begin
- if(BreakingCheck) then
- begin
- AddReport('*BE -> True');
- logoutplayer;
- //SetupBreak(5,480,20,60);
- end;
- end;
- function TalkToDominicUnion: boolean;
- var
- DominicOnionTPA: TPoint;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- if (DominicOnion.find(10, MSCP, DominicOnionTPA)) then
- begin
- fastclick(mouse_right);
- if (WaitOption('Dream', 1500)) then
- begin
- AddReport('TTDU -> True');
- exit(true);
- end;
- end
- else
- exit(false);
- end;
- exit(false);
- end;
- function FinishConversation: boolean;
- var
- PreviousBox: TBox;
- Yes: Tbox;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- result := false;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- PreviousBox := inttoBox(137, 441, 384, 450);
- Yes := inttoBox(250, 396, 268, 405);
- while not (GetNPCChatName = ':hchdreamwouldyou:etoexperience?') do
- begin
- waitChatChange;
- if (ClickToContinue) then
- begin
- while not (GetNPCChatNAme = 'Discard:edreamyousetup?') do
- begin
- waitChatChange;
- exit(true);
- end;
- end;
- end;
- GaussMouseBox(PreviousBox.x1, PreviousBox.y1, PreviousBox.x2, PreviousBox.y2, 1);
- while not (GetNPCChatName = 'DominicOnion') do
- waitChatChange;
- while not (ClickToContinue) do
- waitChatChange;
- while not (GetNPCChatName = 'Agreetopay:S,MMMcoins?') do
- waitChatChange;
- GaussMouseBox(Yes.x1, Yes.y1, Yes.x2, Yes.y2, 1);
- waitChatChange;
- if (ClickToContinue) then
- begin
- AddReport('FC -> True');
- exit(true);
- end;
- end;
- exit(false);
- end;
- function DrinkDreamPotion: boolean;
- var
- DrinkPotionTPA: TPoint;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- if (DrinkPotion.find(10, MSCP, DrinkPotionTPA)) then
- begin
- AddReport('DDP -> True');
- case random(10) of
- 0..8:
- begin
- wait(randomrange(500, 1000));
- fastclick(mouse_left);
- while (IsPlayerWalking) do
- wait(1000);
- exit(true);
- end;
- 9..10:
- begin
- fastclick(mouse_right);
- wait(randomrange(500, 1000));
- if (ChooseOption('rink')) then
- while (IsPlayerWalking) do
- wait(1000);
- exit(true);
- end;
- end;
- end;
- end
- else
- exit(false);
- end;
- function StartDream: boolean;
- var
- ButtonTPA: TPoint;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- if (Button.find(10, MSCP, ButtonTPA)) then
- begin
- wait(randomrange(500, 1000));
- fastclick(mouse_left);
- AddReport('SD -> True');
- exit(true);
- wait(randomrange(2000, 3000));
- end;
- end
- else
- exit(false);
- end;
- function BuyPotionsRewardChest: boolean;
- var
- x,y: integer;
- MSBox: TBox;
- RewardChestTPA, OverloadPotionTP, AbsorbPotionTP: TPoint;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- MSBox := inttobox(MSX1, MSY1, MSX2, MSY2);
- if (RewardChest.find(10, MSCP, RewardChestTPA)) then
- begin
- fastclick(mouse_right);
- wait(randomrange(500, 1000));
- if (waitOption('Search', 5000)) then
- begin
- if(waitFindDTM(BenefitBox.DTM, x,y,inttobox(205,57,295,83),200,8000)) then
- wait(randomrange(4000, 4500));
- CustomMouse(Point(x,y));
- wait(randomrange(200,300));
- fastclick(mouse_left);
- wait(randomrange(1500, 2000));
- if (Item_Overloadpotion.findIn(MSBox, OverloadPotionTP)) then
- begin
- CustomMouse(OverloadPotionTP);
- wait(randomrange(500, 1000));
- Fastclick(mouse_right);
- if (WaitOption('Buy-X', 1000)) then
- begin
- wait(randomrange(500, 1000));
- Typesend('255', true);
- end;
- if (Item_Absorbpotion.findIn(MSBox, AbsorbPotionTP)) then
- begin
- CustomMouse(AbsorbPotionTP);
- wait(randomrange(500, 1000));
- Fastclick(mouse_right);
- if (WaitOption('Buy-X', 1000)) then
- begin
- wait(randomrange(500, 1000));
- Typesend('255', true);
- wait(randomrange(200, 500));
- Custommouse(Point(487, 42));
- fastclick(mouse_left);
- AddReport('BPRC -> True');
- Games:= 0;
- exit(true);
- end;
- end;
- end;
- end;
- end
- else
- exit(false);
- end
- else
- exit(false);
- end;
- function WithdrawPotions: boolean;
- var
- x,y: integer;
- AbsorbBarrelTPA: TPoint;
- OverloadBarrelTPA: TPoint;
- AbsorbReq, OverloadReq: integer;
- ErrorTimer: Timer;
- begin
- ErrorTimer.start;
- while (ErrorTimer.timeElapsed < 60000) do
- begin
- SetCompass('N');
- SetAngle(0);
- if not(Inventorycheck) then
- begin
- if (AbsorbBarrel.find(4, Point(17, 49), AbsorbBarrelTPA)) then
- begin
- AbsorbReq := 16 - (high(Item_Absorbpotion.getSlots) + 1);
- fastclick(mouse_right);
- wait(randomrange(750, 1000));
- if (waitOption('Take Absorption', 5000)) then
- begin
- if(WaitFindDTM(AbsorbPotsBarrel.DTM,x,y,inttobox(2,339,518,480),200,8000)) then
- if (AbsorbReq <> 0) then
- TypeSend(inttostr(AbsorbReq * 4), true);
- end;
- end;
- end;
- if not (IsInvFull) then
- begin
- if (OverloadBarrel.find(4, Point(222, 183), OverloadBarrelTPA)) then
- begin
- wait(randomrange(200,300));
- fastclick(mouse_right);
- if (waitOption('Take Overload', 5000)) then
- begin
- if(WaitFindDTM(OverloadPotsBarrel.DTM,x,y,inttobox(2,339,518,480),200,8000)) then
- wait(randomrange(2000, 3000));
- TypeSend('44', true);
- AddReport('WP(o) -> True');
- exit(true);
- end;
- end;
- end else
- exit(true);
- end
- else
- exit(false);
- end;
- function CheckDharok: boolean;
- var
- ItemBox: Tbox;
- equipPiece: string;
- begin
- if not(USEDHAROKS) then
- exit(true);
- if GameTab(TAB_EQUIP) then
- if wearingItem(6) then
- begin
- case random(4) of
- 0: equipPiece := 'chest';
- 1: equipPiece := 'weapon';
- 2: equipPiece := 'legs';
- 3: equipPiece := 'helm';
- end;
- ItemBox := GetEquippedItemBounds(equipPiece);
- CustomMouse(MiddleBox(ItemBox));
- wait(randomrange(900, 2200));
- if(IsUpTextMulti(['25'])) then
- begin
- AddReport(GetUpText);
- writeln('dharoks is 25%. repair first.');
- result:= false;
- TerminateScript;
- end else
- exit(true);
- end;
- GameTab(TAB_INV)
- end;
- procedure OutsideExecute;
- begin
- if (InventoryCheck) then
- begin
- if(CheckDharok) then
- begin
- RandomBreaker;
- if(Games >= 4) then
- BuyPotionsRewardChest;
- AddReport('OutsideExecuteLoop -> Inv Check!');
- if (TalkToDominicUnion) then
- begin
- AddReport('OutsideExecuteLoop -> Talk to Dominic Union!');
- if (FinishConversation) then
- begin
- AddReport('OutsideExecuteLoop -> Finish Conversation!');
- if (DrinkDreamPotion) then
- begin
- AddReport('OutsideExecuteLoop -> Drink Dream Potion!');
- if (StartDream) then
- begin
- GameOne:= false;
- inc(Games)
- end;
- end;
- end;
- end;
- end;
- end
- else
- begin
- if (WithdrawPotions) then
- begin
- OutsideExecute;
- end
- else
- BuyPotionsRewardChest;
- end;
- end;
- procedure CheckPlayerStuck;
- var
- MiniMapYellow: TPointArray;
- Path: TPointArray;
- HPBars: TPointArray;
- begin
- if(FSM = 2) then
- if (Me.incombat) then
- begin
- MinigameStuckTimer.start;
- exit;
- end
- else
- begin
- if (MinigameStuckTimer.TimeElapsed > randomrange(35000, 45000)) then
- begin
- AddReport('CPS -> True');
- MiniMapYellow := getMiniMapDots('yellow');
- Mouse(MiddleTPA(MiniMapYellow), 5, 5, 1);
- MinigameStuckTimer.start;
- case random(1) of
- 0: MMouseOffClient('top');
- 1: MMouseOffClient('right');
- end;
- end;
- end;
- end;
- procedure Prayerflick;
- begin
- if(FSM = 2) then
- if (PrayerF.timeElapsed >= randomrange(45000, 55000)) then
- begin
- AddReport('PF -> True');
- case random(20) of
- 0..19:
- begin
- if toggleQP(true) then
- wait(randomrange(150, 250));
- if toggleQP(false) then
- wait(randomrange(150, 300));
- PrayerF.start;
- end;
- 20: PrayerF.start;
- end;
- case random(1) of
- 0: MMouseOffClient('top');
- 1: MMouseOffClient('right');
- end;
- end;
- end;
- procedure HpDoubleCheck;
- begin
- if(FSM = 2) then
- if (GetCurrentHealth = 2) then
- begin
- Item_RockCake.interact(mouse_right);
- if (WaitOption('Guzzle', 1000)) then
- begin
- AddReport('HPDC -> True');
- wait(randomrange(1000, 2000));
- if toggleQP(true) then
- wait(randomrange(150, 250));
- if toggleQP(false) then
- wait(randomrange(150, 300));
- MMouseOffClient('Rand');
- PrayerF.start;
- end;
- end;
- end;
- procedure MinigameExecute;
- begin
- PrayerFlick;
- RockCake;
- Absorbing;
- PrayerFlick;
- Overloading;
- HpDoubleCheck;
- AntiBan;
- cProgressReport;
- ScreenShotProgress;
- end;
- procedure mainloop;
- begin
- // if(GoogleDriveStatus <> 'false') then
- // begin
- case FSM of
- // 1:BreakingExecute;
- 2:MinigameExecute;
- 3:OutsideExecute;
- end;
- // end else
- // begin
- // while(isLoggedIn) do
- // Logoutplayer;
- // AddReport('Script has been manually stopped by GoogleDrive text!');
- // end;
- end;
- begin
- Updater;
- InitAL;
- declarePlayer;
- AddOnterminate('GlobalFree');
- SetSupressExceptions(True);
- InitializeScript;
- LoginPlayer(false);
- MinigameStuckTimer.start;
- ProgressReportT.start;
- XpTracker;
- MinigameSWalk := false;
- GameOne:= false;
- Games:= 4;
- ssTimer.start;
- repeat
- //
- breakhandler;
- mainloop;
- wait(randomrange(300, 400));
- until (false)
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement