Page 5 of 7 FirstFirst ... 34567 LastLast
Results 101 to 125 of 170

Thread: Adieux's Pest Control

  1. #101
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Nice! Haha what noobs are you playing with that let the void knight die so much? Nah jk, its always funny seeing the people rage when the knight dies haha.
    What can you do lol

  2. #102
    Join Date
    Jun 2015
    Posts
    64
    Mentioned
    2 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Seems like you both are using version 2.1 where I accidentally let some code pass where it would cause access violation errors.
    For right now the only fix is to put your continue button over the emote button, like @Grimxxdeath223; showed in the photo.

    Also make sure to update your ogLib, that means download the 2 plugins as well.

    I will fix the issue where it clicks the wrong place as soon as Obscurity updates ogLib, I've been talking to him and he will be doing that soon.
    Just check back in a few days, whenever ogLib gets updated. The whole continue button clicking will be fixed.
    Sorry for the hassle guys, thanks for using the script.

    Edit: Also if you get terrible lag, restart SMART. This is caused due to going into the lobby and rejoining the game.
    it's fine for the time being, just wanted superior void on my alt and full penance (amazing thaler atm) thanks for the script should be great once all the little things are fixed and it can run flawlessly.

  3. #103
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Seems like you both are using version 2.1 where I accidentally let some code pass where it would cause access violation errors.
    For right now the only fix is to put your continue button over the emote button, like @Grimxxdeath223; showed in the photo.

    Also make sure to update your ogLib, that means download the 2 plugins as well.

    I will fix the issue where it clicks the wrong place as soon as Obscurity updates ogLib, I've been talking to him and he will be doing that soon.
    Just check back in a few days, whenever ogLib gets updated. The whole continue button clicking will be fixed.
    Sorry for the hassle guys, thanks for using the script.

    Edit: Also if you get terrible lag, restart SMART. This is caused due to going into the lobby and rejoining the game.
    Im using 2.2 and it has no problem clicking the continue button. It will play a couple of games fine and then randomly give the error.. it has been very inconsistent when the error shows which is why it doesn't make sense to me.

    Just to make sure im doing it right though, you have to update oglib by redownloading it and placing it in the simba folder, correct? There isnt anything else other than that, that needs to be done, right?

  4. #104
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by BuffaloBill View Post
    Im using 2.2 and it has no problem clicking the continue button. It will play a couple of games fine and then randomly give the error.. it has been very inconsistent when the error shows which is why it doesn't make sense to me.

    Just to make sure im doing it right though, you have to update oglib by redownloading it and placing it in the simba folder, correct? There isnt anything else other than that, that needs to be done, right?
    You need to download oglib, delete the old folder, then extract the new and rename it to just ogLib. Also download the 2 plugins on the page. And save them to your plugins folder.
    Make sure they overwrite the ones already in there.

    It's weird because I haven't gotten that error in 2.2 only 2.1

  5. #105
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    You need to download oglib, delete the old folder, then extract the new and rename it to just ogLib. Also download the 2 plugins on the page. And save them to your plugins folder.
    Make sure they overwrite the ones already in there.

    It's weird because I haven't gotten that error in 2.2 only 2.1
    well i did exactly as you said and so far its doing pretty well

    Its funny watching the screen because I can point out the other bots when they are doing the exact same thing as mine XD

  6. #106
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by BuffaloBill View Post
    well i did exactly as you said and so far its doing pretty well

    Its funny watching the screen because I can point out the other bots when they are doing the exact same thing as mine XD
    Haha yeah I'm going to be making a lot of the actions more random. Will have an option to just walk up to the knight and defend, threshold abilities. Recommend some cool ideas and I'll add them
    as soon as I get back from my mini vacation.

  7. #107
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Haha yeah I'm going to be making a lot of the actions more random. Will have an option to just walk up to the knight and defend, threshold abilities. Recommend some cool ideas and I'll add them
    as soon as I get back from my mini vacation.
    Nobody said you can go on vacation! You must keep updating!!! Lol

  8. #108
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Haha yeah I'm going to be making a lot of the actions more random. Will have an option to just walk up to the knight and defend, threshold abilities. Recommend some cool ideas and I'll add them
    as soon as I get back from my mini vacation.
    I think the obvious one is to attack portals and thats all i can think of at the moment lol and I just got the access violation again after an hour run so it is literally super random when it happens to me

  9. #109
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by BuffaloBill View Post
    I think the obvious one is to attack portals and thats all i can think of at the moment lol and I just got the access violation again after an hour run so it is literally super random when it happens to me
    It does attack portals, will actually prioritize them.
    So odd you're still getting that will look over the code later tonight and see if theres anything I missed.

  10. #110
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    It does attack portals, will actually prioritize them.
    So odd you're still getting that will look over the code later tonight and see if theres anything I missed.
    Mine attacks portals over anything as long as they are up. I am also almost capped on pest points, haha

    EDIT: So I wanted to check to see what was in my inventory since I started getting boots... and this is what I found....


  11. #111
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Grimxxdeath223 View Post
    Mine attacks portals over anything as long as they are up. I am also almost capped on pest points, haha

    EDIT: So I wanted to check to see what was in my inventory since I started getting boots... and this is what I found....

    I never noticed it attack portals lol mine always seems to be attacking pests and if it cant find a pest it just stands there O_O

    hahaha yeah i have about 30 of each of the boots at this point -_-

  12. #112
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by BuffaloBill View Post
    I never noticed it attack portals lol mine always seems to be attacking pests and if it cant find a pest it just stands there O_O

    hahaha yeah i have about 30 of each of the boots at this point -_-
    Are you sure you're using 2.2? Could you paste the code to the script here, it might have dowloaded incorrectly or something

  13. #113
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Are you sure you're using 2.2? Could you paste the code to the script here, it might have dowloaded incorrectly or something
    Im using the 2.2 that your updater downloaded for me its driving me nuts cause i have to babysit it almost as much as if i were ACTUALLY playing haha

    Code:
    program AdieuxsPestControl;
    {$i ogLib\lib\core\core.simba}
    {
    
      Pestcontrol Script by: Adieux at Villavu
    
      Please make sure to visit the forum post here: https://villavu.com/forum/showthread.php?t=114186
      if you have any questions or comments.
    
      Set up is simple.
      Step 1: Read the forum post
      Step 2: Change the 2 Constants below to what you desire them to be
      Step 3: Hit run, l
      et SMART load, stop the script, log into account
      Step 4: Start outside the boat near the plank, or inside the boat, or inside Pestcontrol and hit Run again
      Step 5: Enable Debug in SMART if you want to see progress screen/paint
    
      If you get any bugs or errors please report them, also please post any progress reports/give feedback.
    
    
      Shoutouts to Obscurity for being such an awesome and helpful person.
      This script wouldn't be nearly as good without him
    
    
      Thank you for using my script!
    
    
    }
    
    
    
    //Change these to your preference
    
    const
      GAMES_TO_PLAY := 100;    //Change this value to how many games you want to play, will terminate after said amount
      QUICK_PRAYERS := true;  //Do you want to use Quick Prayers?
    
    
    
    
    
    
    
    
      //This scripts version
      LOCAL_VERSION := 2.2;
    
    
    
    
    
    
    
    var
      gamesPlayed, timesResetCamera, deathCounter, timesRotatedCamera, timesCompleted, timesFailed, timesKnightDied, whereDidWeStart, scriptPaintBMP: integer;
      rewardsLady, knightChatModel, damageModel, allModels, allPortals, veteranFlagModel, bootsModel: glModelArray;
      failedChat: glTextureArray;
      distanceFrom: extended;
      paintTimer, canAttack, canRotate: tCountDown;
      clientCenter: TPoint := ogl.getClientMidPoint ();
      x,y: int32;
    {
     Override until Obscurity fixes the ID's
    }
    
    function tDialogue.clickContinue():boolean;
    override;
    var
      funcPointer:pointer;
      funcPointerIndex,
      funcPointerSize:uInt32=0;
      funcX,
      funcY:int32;
    begin
      funcPointer:=glTextures(funcPointerSize)+(36*(funcPointerSize-1));
      if funcPointer<>nil then
      begin
        for funcPointerIndex to funcPointerSize-1 do
        begin
          if funcPointer^= 12240 then
          begin
            clickMouse(normalRandom((funcX:=(funcPointer+12)^)-40,funcX+40),normalRandom((funcY:=(funcPointer+16)^)-10,funcY+10),1);
            result:=true;
            break;
          end;
          funcPointer:=funcPointer-36;
        end;
      end;
      exit(result);
    end;
    
    
    {
    Procedure: waitFlag;
    Description: Waits for the flag on the mini-map to go away, while walking, tweaked some from original.
    Credit: Ross ---> https://villavu.com/forum/member.php?u=148198
    }
    procedure waitFlag;
    var
      timeWalking: tCountDown;
    begin
      timeWalking.setTime(random(20000,30000));
      wait(500);
      while ((not ogl.getTextures(1275).isEmpty()) and (not dialogue.hasDialogue())) do
      begin
        wait(randomRange(500, 700));
      end;
    end;
    {
    Function: tileWalk
    Description: Walks to the tiles sent to the function, has some randomization.
    Credit: Ross ---> https://villavu.com/forum/member.php?u=148198
    }
    function tileWalk(randomization: integer; offSetTiles: TPointArray): boolean;
    var
      rx, ry, i: integer;
    begin
      for i := 0 to high(offSetTiles) do
      begin
        rx := randomrange( - (randomization), randomization);
        ry := randomrange( - (randomization), randomization);
        mouse.click(minimap.getScreenPosition(minimap.getLocalPosition().adjustposition(offsetTiles[i].x + rx, offsetTiles[i].y + ry)), 1);
        if ((offSetTiles[i].y > 20) or (offSetTiles[i].y < - 20)) or ((offSetTiles[i].x > 15) or (offSetTiles[i].x < - 15)) then
          wait(3500)
        else
          wait(1000);
        waitflag;
      end;
    end;
    {
    Function minimap.ClickResetCamera
    Description: overRides ogLibs included function because it tends to miss-click a lot
                 changed randomizations
    }
    function tMinimap.clickResetCamera():boolean;
    override;
      var
        funcPointer:pointer;
        funcPointerIndex,
          funcPointerSize:uInt32=0;
        funcX,
          funcY:int32;
      begin
        funcPointer:=glTextures(funcPointerSize);
        if funcPointer<>nil then
          begin
            for funcPointerIndex to funcPointerSize-1 do
              begin
                if funcPointer^=147885 then
                  begin
                    clickMouse(random((funcX:=(funcPointer+12)^)-5,funcX+5),random((funcY:=(funcPointer+16)^)-5,funcY+5),1);
                    result:=true;
                    break;
                  end;
                funcPointer:=funcPointer+36;
              end;
          end;
        exit(result);
      end;
    {
    Procedure: antiBan
    Description: Will perform antiban, pretty simple anti ban
                Just walks to somewhere on the boat, randomly.
                If anyone has any other suggestions for antiban, let me know
    }
    procedure antiBan(doWePerform: boolean);
    var
      skillTab, backPackTab: glTextureArray;
      skillHover: tPoint;
    begin
      if (doWePerform) then
      begin
        writeLn('Performing anti-ban');
        case random(100) of
          0..25:
            begin
              tileWalk(3, [[ - 2, - 3]]);
            end;
          26..50:
            begin
              tileWalk(3, [[3, - 3]]);
            end;
          51..75:
            begin
              tileWalk(3, [[4, 5]]);
            end;
          76..100:
            begin
              tileWalk(3, [[ - 6, 5]]);
            end;
        end;
      end
      else if (not doWePerform) then
      begin
        writeLn('No antiban right now');
        exit;
      end;
    end;
    {
    Procedure: doWePerformAntiBan
    Description: Desides if we do or do not perform antiban
                 most of the time will decide not to
                 If you prefer more anti ban, change the values below
    }
    procedure doWePerformAntiBan();
    var
      doWe: boolean;
    begin
      case random(100) of
        0..80:
          begin
            doWe := false;
            antiBan(doWe);
          end;
        81..100:
          begin
            doWe := true;
            antiBan(doWe);
          end;
      end;
    end;
    {
    Procedure: convertTheTime
    Description: Converts the time from milliseconds to more formal time
                 receives getTimeRunning
    }
    function convertTheTime(time: uInt32): string;
    var
      seconds, minutes, hours: extended;
    begin
      seconds := (time mod 3600000 mod 60000 div 1000);
      minutes := (time mod 3600000 div 60000);
      hours := (time div 3600000);
      result := (ToStr(hours) + ' hour(s)  ' + toStr(minutes) + ' minutes  ' + ToStr(seconds) + ' seconds');
    end;
    {
    Procedure: progressReport
    Description: Prints out a simple progress report to the use
    }
    procedure progressReport();
    var
      time: string;
      pointsEarned: integer;
    begin
      if (paintTimer.isFinished()) then
      begin
        time := ConvertTheTime(GetTimeRunning());
        pointsEarned := (((timesCompleted) * 4));
        smart.__Graphics.Clear;
        smart.__graphics.drawBitmap(scriptPaintBMP, Point(0, 465));
        smart.__Graphics.DrawText('Time Running: ' + time, 'upCharsEx', point(5, 490), clWhite);
        smart.__Graphics.DrawText('Points Earned: ' + toStr(pointsEarned), 'upCharsEx', point(5, 510), clAqua);
        smart.__Graphics.DrawText('Times Knight Died: ' + toStr(timesKnightDied), 'upCharsEx', point(5, 530), clRed);
        smart.__Graphics.DrawText('Times Failed: ' + toStr(timesFailed), 'upCharsEx', point(5, 550), clRed);
        smart.__Graphics.DrawText('Version: ' + toStr(LOCAL_VERSION), 'smallChars', point(5, 580), clWhite);
        paintTimer.setTime(15000);
      end
      else
        exit;
    end;
    {
    Procedure: terminateTheScript
    Description: Terminates and frees bitmap
    }
    procedure terminateTheScript();
    begin
      FreeBitmap(scriptPaintBMP);
      writeLn('Terminating...');
      TerminateScript;
    end;
    {
    Procedure: rotateCamera
    Description: Rotates the camera, has a random range of rotation
    }
    procedure rotateCamera();
    begin
      wait(randomRange(200,300));
      mainScreen.setDegrees(random(0, 360), random(10,50));
      canRotate.setTime(random(1500,2000));
      timesRotatedCamera := timesRotatedCamera + 1;
    end;
    {
    Procedure: selectBoots
    Description: Selects minigame boots randomly
    Credit: Obscurity ---> https://villavu.com/forum/member.php?u=102053
    }
    procedure selectBoots;
    begin
      writeLN('[procedure] selectBoots');
      if length(bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181]))) then
      begin
        if random(5)=0 then
          mouse.rightClickOption(bootsModel[random(3)].randomizePointEllipse(30),'Select')
        else
          mouse.click(bootsModel[random(3)].randomizePointEllipse(30));
      end;
      wait(randomRange(4000,5000));
      dialogue.clickContinue();
    end;
    {
    Procedure: crossGangplank
    Description: Crosses the gangplank, randomly selects between right clicking
                 and left clicking.
    }
    procedure crossGangplank();
    var
      plankTPA: TPointArray;
    begin
      writeLn('Crossing plank');
      if length(plankTPA := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([1781393848,2892440677,3763942768,4136683396,4168949912])))) then
      begin
        case random(100) of
          0..100:
            begin
              mouse.click(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4))
            end;
           {  disabled for right now due to minigame spotlight causing a lot of people to play
              which causes right click to be
              filled with a bunch of
              player names
          0..:
            begin
              mouse.rightClickOption(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4),['Cross','Gangplank >']);
            end;
           }
        end;
      end
    end;
    {
    Procedure: startGame
    Description: Starts the game, calls crossGangplank and sets the
                 variables needed for the paint.
    }
    procedure startGame();
    var
      plankPosition: tPoint = [67,63];
    begin
    
      wait(RandomRange(2000,2500));
      rewardsLady := ogl.getModels(1538643377);
      knightChatModel := ogl.getModels(3360933869);
      failedChat := ogl.getTextures(714000);
      bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181])).getVisible();
    
      if (not bootsModel.isEmpty()) then
        selectBoots;
    
      if (not rewardsLady.isEmpty()) then
      begin
        writeLn('We won, +4 points');
        timesCompleted := timesCompleted + 1;
        gamesPlayed := gamesPlayed + 1;
      end
      else if (not knightChatModel.isEmpty()) then
      begin
        writeLn('Knight died, RIP.');
        timesKnightDied := timesKnightDied + 1;
        gamesPlayed := gamesPlayed + 1;
      end
      else if (not failedChat.isEmpty()) then
      begin
        writeLn('We failed to get enough damage, will try harder next time');
        timesFailed := timesFailed + 1;
        gamesPlayed := gamesPlayed + 1;
      end;
    
      if (dialogue.hasDialogue()) then
      begin
        writeLn('Clicking continue');
        repeat
          dialogue.clickContinue();
          wait(randomRange(1000,1200));
        until (not dialogue.hasDialogue());
      end;
      wait(RandomRange(1200,1500));
      if (timesResetCamera < 1) then
      begin
        case random(100) of
          0..50: begin
                  minimap.clickResetCamera();
                  timesResetCamera := timesResetCamera + 1;
                 end;
          51..100: begin
                    mainscreen.setDegrees(0,50);
                    timesResetCamera := timesResetCamera + 1;
                   end;
        end;
        writeLn('Reset camera');
      end;
    
      distanceFrom := (minimap.getLocalPosition().distanceFrom(plankPosition));
      if (distanceFrom > 3) and (timesResetCamera <= 1) then
      begin
        writeLn('Distance from plank ' + ToStr(distanceFrom) + ' walking there now');
        mouse.click(minimap.getScreenPosition([67,63]).randomizePointEllipse(12));
        wait(round(distanceFrom * 1000));
      end;
      wait(randomRange(2000,2200));
      bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181])).getVisible();
      if (not bootsModel.isEmpty()) then
        selectBoots;
    
      crossGangplank();
    end;
    {
    Procedure: areWeInBoat
    Description: Checks for the veteran flag minigame model that shows up
                when we get into the boat, if its not there will try to look
                for it again, since sometimes lag causes issues, if it cant find that
                checks to see if were inside pest control because sometimes
                the boat leaves so fast the model doesnt show up
                IF none of those two check out, will terminate.
    }
    
    procedure areWeInBoat();
    begin
      wait(round((2 + distanceFrom) * 500));
      veteranFlagModel := ogl.getModels(3040129356);
      if not veteranFlagModel.isEmpty() then
        writeLn('We made it onto the boat, cool')
      else if veteranFlagModel.isEmpty() then
      begin
        writeLn('WARNING: Did not make it onto the boat, checking one more time');
        wait(randomRange(3000,5000));
        veteranFlagModel := ogl.getModels(3040129356);
        damageModel := ogl.getModels(2263255518);
    
        if (not veteranFlagModel.isEmpty()) then
          writeLn('We actually made it in, never mind...')
        else if (not damageModel.isEmpty()) then
          writeLn('Were inside pest control...LAG?')
        else if (veteranFlagModel.isEmpty()) and (damageModel.isEmpty()) then
          begin
            writeLn('Still not in boat after searching, terminating...');
            TerminateTheScript();
          end;
      end;
      timesRotatedCamera := 0;
    end;
    {
    Procedure: waitForGameToStart
    Description: Waits until it finds the damage icon model from pest control
                (thanks obscurity for the idea to use that model)
    }
    procedure waitForGameToStart();
    var
      timeWaiting: tCountDown;
    begin
      timeWaiting.setTime(random(240000, 270000));
      doWePerformAntiBan();
      writeLn('Waiting for game to start...');
      actionBar.setQuickPrayer(false);
      repeat
        progressReport();
        damageModel := ogl.getModels(2263255518);
        wait(randomRange(500, 700));
      until not damageModel.isEmpty() or timeWaiting.isFinished();
      if (not damageModel.isEmpty()) then
        writeLn('Game started!');
      if timeWaiting.isFinished() then
      begin
        writeLn('Took too long to start game, terminating...');
        TerminateTheScript();
      end
      else
        exit;
    end;
    {
    Procedure: whereDoWeWalkTo
    Description: Decides what side of the game to walk to, favors the south more
                 you can change the values to whatever you want
                 Note: if we died, will just wait longer to start walking because of animation
    }
    procedure whereDoWeWalkTo();
    begin
      begin
        damageModel := ogl.getModels(2263255518);
    
        if damageModel.isEmpty() then
          exit;
    
        wait(RandomRange(900, 1100));
        case random(60) of
          0..30:
            begin
              wait(randomRange(1000, 1500));
              writeLn('Walking to the south');
              tileWalk(2, [[0, 18], [0, 10], [0, 10]]);
            end;
          31..45:
            begin
              wait(randomRange(1000, 1500));
              writeLn('Walking to the west');
              tileWalk(2, [[ - 10, 20], [ - 10, 5]]);
            end;
          46..60:
            begin
              wait(randomRange(1000, 1500));
              writeLn('Walking to the east');
              tileWalk(2, [[15, 15], [10, 10]]);
            end;
        end
      end
    end;
    {
    Procedure: weDied
    Description: Dang we died, will just call whereDoWeWalkTo
    }
    procedure weDied();
    begin
      writeLn('We died.');
      repeat
        wait(randomRange(600,700));
      until (actionbar.getLifePoints > 0) or (dialogue.hasDialogue());
      if (not dialogue.hasDialogue()) then
        whereDoWeWalkTo()
      else
        exit;
      deathCounter := 0;
    end;
    {
    Procedure: attackPest
    Description: Clicks on the sent model, checks after clicking to see if we have
                 a target or not, if we do it waits till we dont, if we dont have one
                 will just exit
    }
    procedure attackPest();
    var
      timeAttacking: tCountDown;
      pestPointArray: TPointArray;
    begin
      if length(pestPointArray := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([1731643360,2547232634,2782989724,2899052740,3489785670,3915285997,547053328,617765920])).getVisible())) then
      begin
        case random(100) of
          0..50:
            begin
              mouse.rightClickOption(pestPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20),['Attack Brawler','Attack Defiler','Attack Shifter','Attack Spinner','Attack Splatter','Attack Torcher']);
            end;
          51..100:
            begin
             mouse.click(pestPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20));
            end;
        end;
      end;
        canAttack.setTime(random(1500,1800));
    end;
    procedure attackPortal();
    var
      timeAttacking: tCountDown;
      portalPointArray: TPointArray;
    begin
      if length(portalPointArray := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([2547232634, 1446295722])).getVisible())) then
      begin
        case random(100) of
          0..50:
            begin
              mouse.rightClickOption(portalPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20),['Attack Portal']);
            end;
          51..100:
            begin
              mouse.click(portalPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20));
            end;
        end;
      end;
        canAttack.setTime(random(3000,3400));
    end;
    {
    Procedure: insidePestControl
    Description: Loop for when inside pest control, will stop looping when it
                 doesnt find the damage model inside of PC
                 (the chat box that says we failed, the lady telling us we did good, and the kngiht)
    }
    procedure insidePestControl();
    var
      timeSpentInGame, timeWaitingForNewGame: tCountDown;
    begin
      timesResetCamera := 0;
      whereDoWeWalkTo();
      mainScreen.setDegrees(random(0,20),random(10,20));
      actionbar.setQuickPrayer(QUICK_PRAYERS);
      timeSpentInGame.setTime(random(360000, 420000));
      repeat
    
        progressReport();
        allModels := ogl.getModels(TCardinalArray([1731643360,2782989724,2899052740,3489785670,3915285997,547053328,617765920])).getVisible();
        allPortals := ogl.getModels(TCardinalArray([2547232634, 1446295722])).getVisible();
        damageModel := ogl.getModels(2263255518);
        if (not allPortals.isEmpty()) and (canAttack.isFinished()) then
            attackPortal()
        else if (combat.hasTarget()) then
        begin
          writeLn('In combat, waiting...');
          repeat
            wait(RandomRange(500,600));
            allPortals := ogl.getModels(TCardinalArray([2547232634, 1446295722])).getVisible();
            damageModel := ogl.getModels(2263255518);
          until (not combat.hasTarget()) or (timeSpentInGame.isFinished()) or (actionbar.getLifePoints <= 0) or (not allPortals.isEmpty()) or (damageModel.isEmpty());
        end
        else if (not combat.hasTarget()) then
        begin
          if (allModels.isEmpty()) and (canRotate.isFinished()) then
          begin
            writeLn('Rotating to find pest');
            rotateCamera();
          end
          else if (not allModels.isEmpty()) and (canAttack.isFinished()) then
            attackPest();
        end;
    
        if (actionbar.getLifePoints <= 0) then
          weDied();
    
        if (timesRotatedCamera = 5) then
        begin
          writeLn('Couldnt find pests...walking south a bit to see if we can find anything');
          tileWalk(2, [[0, 8]]);
          timesRotatedCamera := timesRotatedCamera + 1;
        end;
    
      until (timeSpentInGame.isFinished()) or (dialogue.hasDialogue()) or  (timesRotatedCamera >= 10);
    
      if (timesRotatedCamera >= 10) then
      begin
        writeLn('Couldnt find pests after multiple camera rotates, waiting for new game [area most likely clear]');
        actionbar.setQuickPrayer(false);
        timeWaitingForNewGame.setTime(random(210000,230000));
        repeat
          wait(RandomRange(500,600));
          damageModel := ogl.getModels(2263255518);
        until (timeWaitingForNewGame.isFinished()) or (damageModel.isEmpty());
    
        if (timeWaitingForNewGame.isFinished()) then
        begin
          writeLn('Game took too long to start again');
          terminateTheScript();
        end;
      end;
    
      if (timeSpentInGame.isFinished()) then
      begin
        writeLn('Time in game lasted too long');
        terminateTheScript();
      end;
    end;
    {
    Procedure: whereAreWe();
    Description: Detects where we are based on certain models
                 will call the appropriate procedure or function
                 (only runs once)
    }
    procedure whereAreWe();
    begin
      wait(randomRange(500, 600));
      veteranFlagModel := ogl.getModels(3040129356);
      damageModel := ogl.getModels(2263255518);
      if (veteranFlagModel.isEmpty()) and (damageModel.isEmpty()) then
      begin
        writeLn('Were outside starting script');
        whereDidWeStart := 1;
      end
      else if (not veteranFlagModel.isEmpty()) then
      begin
        writeLn('Were in the boat...starting script');
        whereDidWeStart := 2;
      end
      else if (not damageModel.isEmpty()) then
      begin
        writeLn('Were inside pestcontrol...starting script');
        whereDidWeStart := 3;
      end;
    end;
    {
      Procedure: autoUpdateMe();
      Description: Checks to see if you have the lastest version of the script
      Credit: Fady --> https://villavu.com/forum/member.php?u=152795
    }
    procedure autoUpdateMe();
    var
      newFile: integer;
      newScript, newFilePath: string;
      online_Version: extended;
    begin
      writeLn('Checking for updates...');
      online_Version := strToFloat(getPage('http://static.frement.net/proxy.php?u=https://raw.githubusercontent.com/Introvertt/Adieuxs-Pestcontrol/master/Version.txt'));
      writeLn('Local Version ' + toStr(LOCAL_VERSION) + ', Online Version: ' + toStr(online_Version)+'.');
    
      if online_Version > Local_Version then
      begin
        writeLn('Downloading the latest script version from GitHub');
        newScript := getPage('http://static.frement.net/proxy.php?u=https://raw.githubusercontent.com/Introvertt/Adieuxs-Pestcontrol/master/Adieuxs%20Pestcontrol.simba');
        newFilePath := scriptPath+ 'Adieuxs Pestcontrol v' + toStr(online_Version) +'.simba';
        newFile := rewriteFile(newFilePath, true);
    
        if not writeFileString(newFile, newScript) then
        begin
          writeLn('Could not write to ' + newFilePath);
          terminateTheScript();
        end;
    
        closeFile(newFile);
        writeLn('Latest script downloaded to ' + newFilePath);
        writeLn('Please use the new one to run the latest version!');
        terminateScript();
      end else
        writeLn('Local version is already up to date!');
    end;
    begin
    
      autoUpdateMe();
      ogl.setup();
      GLXViewPort(x,y,x,y);
      ogl.setDebugMode(0);
      scriptPaintBMP := loadBitmap( AppPath + 'scripts\Adieuxs Pestcontrol\AdieuxsPestcontrolPaint.jpg');
      whereAreWe();
      repeat
    
        case (whereDidWeStart) of
          1: begin
              startGame();
              areWeInBoat();
              waitForGameToStart();
              insidePestControl();
              whereDidWeStart := 0
             end;
          2: begin
              waitForGameToStart();
              insidePestControl();
              whereDidWeStart := 0;
             end;
          3: begin
              insidePestControl();
              whereDidWeStart := 0;
             end;
        end;
    
        startGame();
        areWeInBoat();
        waitForGameToStart();
        insidePestControl();
    
      until (gamesPlayed = GAMES_TO_PLAY);
    
      if (gamesPlayed = GAMES_TO_PLAY) then
        begin
          ClearDebug();
          writeLn('We finished playing all our games. Terminating');
          TerminateTheScript();
        end;
    
    end.
    Last edited by BuffaloBill; 08-08-2015 at 11:10 PM.

  14. #114
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    @BuffaloBill; That is so odd cause I have the exact opposite thing going on.

  15. #115
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    @BuffaloBill; thats strange it should be attacking portals and you shouldn't be getting access violation errors.

    But if it does ever terminate from access violation errors your account would just be auto logged out after 5 min.
    So you shouldn't worry about staying logged in, Ive also got a few failsafes and will be adding a lot more soon.

  16. #116
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Oh yeah im not worried staying logged in at all im just babysitting because i talk to my clan while it does its thing and I restart it when it terminates lol

    and strange is an understatement, grim is having no problems and im having all the problems :P I wish I had feedback from other people having this issue so I knew it wasnt just me because i feel like im doing something wrong -_-

    It did tell me the line where the access violation was coming from once but I forgot to copy and paste it soooo im screwed haha

  17. #117
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    @Adieux; The only issue i've seen, which really isn't an issue, is this. Say we go east or west, and now that is the first portal to come up, very rarely will you not get the 5k zeal and then just sit there because everything has died. This is usually when I step in and run somewhere else to just make sure I get my points. This, like I said, happens rarely. I know it will run south to try and find more pests, but sometimes it just doesn't see them. Again, very rare. Also, I am up to 879 commendations and 589 thaler atm

  18. #118
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by Grimxxdeath223 View Post
    @Adieux; The only issue i've seen, which really isn't an issue, is this. Say we go east or west, and now that is the first portal to come up, very rarely will you not get the 5k zeal and then just sit there because everything has died. This is usually when I step in and run somewhere else to just make sure I get my points. This, like I said, happens rarely. I know it will run south to try and find more pests, but sometimes it just doesn't see them. Again, very rare. Also, I am up to 879 commendations and 589 thaler atm
    Damn thats a lot. Im going to work on that issue, as I've noticed it too (why going south is more common in the script)
    I'll probably add it in so that if that portal is dead it will try to go to another one, it will take some time.

    Also, Obscurity just sent me a fix for the continue chat issue. Will test when I get to the hotel and if it works I'll push out a quick update.

  19. #119
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Damn thats a lot. Im going to work on that issue, as I've noticed it too (why going south is more common in the script)
    I'll probably add it in so that if that portal is dead it will try to go to another one, it will take some time.

    Also, Obscurity just sent me a fix for the continue chat issue. Will test when I get to the hotel and if it works I'll push out a quick update.
    Maybe the quick fix will randomly fix my issue too! *hopeful thinking*

  20. #120
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    I am SO pissed. I was going to get a nice screen shot with 1k points but my inventory filled up and it couldn't take the boots so it terminated. At least I got the proggy.


  21. #121
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    No activity today? *GASP* Well, so far I have gotten full superior void and roughly 4.5 million exp along with fully charged silverhawk boots. Too bad this is only in the spotlight for 3 days.

  22. #122
    Join Date
    Aug 2015
    Location
    New York
    Posts
    38
    Mentioned
    5 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Grimxxdeath223 View Post
    No activity today? *GASP* Well, so far I have gotten full superior void and roughly 4.5 million exp along with fully charged silverhawk boots. Too bad this is only in the spotlight for 3 days.
    I just finished full sup on all helmets and im working on getting the last 30 thaler for silver hawks but im playing legit :O

  23. #123
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    Quote Originally Posted by BuffaloBill View Post
    I just finished full sup on all helmets and im working on getting the last 30 thaler for silver hawks but im playing legit :O
    le...leg.....LEGIT!?!? Quick somebody get this guy something to drink! Lol. I am at work so I am just looking at it remotely and it appears to be going fine. Got 1,166 agility xp so far

  24. #124
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by Grimxxdeath223 View Post
    No activity today? *GASP* Well, so far I have gotten full superior void and roughly 4.5 million exp along with fully charged silverhawk boots. Too bad this is only in the spotlight for 3 days.
    Yeah haha I just landed in DR going to get really drunk and push out an update later tonight!

  25. #125
    Join Date
    Mar 2014
    Location
    East Coast, USA
    Posts
    291
    Mentioned
    10 Post(s)
    Quoted
    148 Post(s)

    Default

    Quote Originally Posted by Adieux View Post
    Yeah haha I just landed in DR going to get really drunk and push out an update later tonight!
    Yay working vacation! But seriously, don't work on your vacation over us (unless coding is like vacation then do a bunch of it haha)

Page 5 of 7 FirstFirst ... 34567 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •