Results 1 to 11 of 11

Thread: OSRS NMZ dharok/absorbtion/overload script

  1. #1
    Join Date
    Dec 2015
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default OSRS NMZ dharok/absorbtion/overload script

    Hello boys and girls,
    I ve been working on my kind of first script for a few days now. It is a NMZ Dharoks armor script, which uses absorption, overloads and pray flick to stay at 1 hp. Also you gonna need a rock cake.

    It is by far not organized, it is not perfect, and the code itself is pretty ugly(lol), but it is running until your potions are empty, which takes about ~3h for my lvls. I used it now for about 1- 1 1/2 weeks 12h a day and not banned yet.

    Anyway, any critic or improvment ideas would be awesome.

    (And sorry for my english, im not native )

    EDIT: After the suggestions from Dan, i rewrote my script. It is now 100% color based with stats tracking in debug mode. It still runs flawless the 4 hour for me and only stopps if no supplys left. Simply choose which skill you want to train, stand on the spot you want to stand, make sure you set quickpray to rapid heal and go

    EDIT2: again some minor fixes. Runs even smoother now. removed the function of automatically setting attack style, you got to choose it ingame and add the choose one in script to track exp. I will probably not going to add the function to set dream through script, since Shout said his accounts got banned the same way. I still looking for more stuff to add.

    Simba Code:
    {$DEFINE SMART}
    {$i AeroLib/AeroLib.Simba}

    var
      ab_count, test, noOver, rock_cake,exp_check_rng, xp_p_h, str_begin, str_now, str_gained, over, absorb, pray: Integer;
      exp_timer, total_timer, fail_safe, prayer_timer: Timer;
      input, skill_to_train, skill_tracker, timeRan: string;



     procedure setup;
    begin

     input := 'defence'; // strength, attack, defence

    end;


    /////////////////////////////////////////////////////////////
    //                    INSTRUCTIONS                         //
    //  Start inside NMZ with overload and absorption in inv   //
    //  choose you attack style ingame and add input above     //
    //  Have rockcake in you inventory, too                    //
    //  XP trackin needs some time to get accurate ~ 20min     //
    /////////////////////////////////////////////////////////////

    procedure debug(s : string);
    begin
      clearDebug;
      xp_p_h := Round((str_gained*3600) DIV (GetTimeRunning DIV 1000));
      writeLn('Time running: ' + timeRan);
      //if xp_p_h > 0 then
      //begin
        writeLn('Exp per hour: ' + intToStr(xp_p_h));
     // end else
     //   writeLn('wait a bit for xp per hour.. please note it is only accurate after at least ~20mins');
     // if str_gained > 0 then
     // begin
        writeLn(input + ' exp gained: ' + intToStr(str_gained));
    //  end else
    //    writeLn('wait a bit for first xp check..');
      writeLn('Status: ' + s);
      test := (exp_check_rng - exp_timer.timeElapsed) DIV 1000;
      writeLn('Time till exp check: '+ intToStr(test));
    end;

    procedure checkExp;
    begin
      if exp_timer.timeElapsed > exp_check_rng then
      begin
        debug('Checking exp');
        str_gained := GetSkillXp(input) - str_begin;
     //   exp_timer.start;
        exp_timer.start;
        exp_check_rng := randomRange(600000, 900000);
      end;
    end;

    procedure drinkAbsorb;
    var
      i, xi, yi: Integer;
    begin
      while ab_count < 10 do
      begin
        gameTab(TAB_INV);
        if (fail_safe.timeElapsed > 20000) or (fail_safe.timeElapsed = 0) then
        begin
          if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
          begin
            debug('Drinking Absorb');
            HumanMMouse(Point(xi, yi), 5, 5);
            fastClick(MOUSE_LEFT);
            ab_count := ab_count + 1;
          end else
          begin
            debug('No more absorbs, shutting down script');
            logoutPlayer;
            terminateScript;
          end;
          fail_safe.Reset;
          fail_safe.Pause;
        end;
      end;
    end;

    procedure needDrinkAbsorb;
    var
      x, y: Integer;
    begin
      gameTab(TAB_INV);
      if not findColor(x, y, 16777215, 18, 40, 65, 65) then
      begin
        ab_count := 0;
        drinkAbsorb;
      end;
    end;

    procedure firstAbsorb;
    var
      xi, yi: integer;
    begin
      if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
      begin
        HumanMMouse(Point(xi, yi), 5, 5);
        fastClick(MOUSE_LEFT);
        sleep(100);
      end else
        begin
          debug('Seems you forgot the absorbs bud, sorry have to shut down..');
          logoutPlayer;
          terminateScript;
        end;
    end;

    procedure prayerFlick;
    var
      x, y: integer;
      pray_p: TPoint;
    begin
      if prayer_timer.timeElapsed > 55000 then
      begin
        debug('Prayer flicking');
        HumanMMouse(Point(554, 101), 5, 5);
        FastClick(MOUSE_LEFT);
        sleep(250);
        FastClick(MOUSE_LEFT);
        prayer_timer.start;
      end;
    end;

    procedure needRockCake;
    var
      cake_p: TPoint;
      x, y: integer;
    begin
      gameTab(TAB_INV);
      if (fail_safe.timeElapsed > 25000) or (fail_safe.timeElapsed = 0) then
      begin
        if (getCurrentHealth < 50) or (noOver = 1) then
        begin
          if getCurrentHealth > 1 then
          begin
            begin
              while getCurrentHealth > 1 do
                begin
                  if findDTM(rock_cake, x, y, MIX1, MIY1, MIX2, MIY2) then
                  begin
                    debug('Eating rock cake');
                    HumanMMouse(Point(x, y), 5, 5);
                    fastClick(MOUSE_RIGHT);
                    ChooseOption('Guzzle');
                    sleep(500);
                    fail_safe.start;
                    fail_safe.Pause;
                    needDrinkAbsorb;
                  end;
                end;
            end;
          end;
        end;
      end;
    end;

    procedure stillinNmz;
    var
      x, y: Integer;
    begin
      if findColorTolerance(x, y, 2329461, 566, 15, 709, 130, 27) then
      begin
        debug('Died? if not, something went wrong and you left NMZ... (probably your set broke)');
        logoutPlayer;
        terminateScript;
      end;
    end;

    procedure drinkOverload;
    var
      xi, yi: Integer;
    begin
        gameTab(TAB_INV);
        if getCurrentHealth > 50 then
        begin
          debug('Taking overload');
          if FindDTM(over, xi, yi, 561, 210, 728, 462) then
          begin
            fail_safe.Start;
            HumanMMouse(Point(xi, yi), 5, 5);
            fastClick(MOUSE_LEFT);
            sleep(10000);
          end else
            begin
              debug('no overload');
              noOver := 1;
            end;
        end else
          needDrinkAbsorb;
          needRockCake;
    end;

    procedure isPrayOn;
    var
      count: integer;
    begin
      count := CountColorTolerance(11645867, 538, 84, 568, 115, 126);
      if (count > 250) then
      begin
        HumanMMouse(Point(554, 101), 5, 5);
        fastClick(MOUSE_LEFT);
        sleep(500+randomRange(500,1000));
      end;
    end;

    procedure declare_stuff;
    begin
      debug('declaring stuff...');
      setup;
      prayer_timer.start;
      total_timer.start;
      gameTab(TAB_STATS);
      str_begin := getSkillXp(input);
      gameTab(TAB_INV);
      exp_timer.start;
      exp_check_rng := 10000;
      noOver:= 0;
      absorb := DTMFromString('mggAAAHicY2NgYPBiY2BwBuJAIA4AYg8gDgbiKCagGBD7AbELEDsCcQQQb913GKiLEQMbMWAHmCohGAIARp4GSQ==');
      over := DTMFromString('mggAAAHicY2NgYEhmYWCIBeJ4II4G4lwgzgBiD2YGBnsgNmOGsN2B2BqIhfj4gLoYsWDsAJtKhGoAvFEEQA==');
      pray := DTMFromString('mlwAAAHicY2dgYOAGYn4gFgJiHiBmAWImBggQA2JxqBwDVJwXiEWB2PDQJCDJiBXzM+AG2HVAMBQAAN8AAko=');
      rock_cake := DTMFromString('mrAAAAHic42BgYNjPxMCwGYj3AvERID4NxKeYIOJbQeKMQDYQbwHizUC8D4iPAPEpKJ2X4gU0hREnNmLAD3DrhGAYAAAFRw1t');
      firstAbsorb;
    end;

    begin
      InitAL;
      LoginPlayer(False);
      declare_stuff;
      while isLoggedIn do
      begin
        stillinNmz;
        needDrinkAbsorb;
        drinkOverload;
        prayerFlick;
        isPrayOn;
        sleep(1000);
       timeRan := MSToTime(total_timer.timeElapsed, 1);
        writeLn(timeRan);
        checkExp;
        debug('idling');
      end else
      begin
        writeLn('logging off');
        terminateScript;
      end;
    end.
    Attached Images Attached Images
    Last edited by nenci494; 06-07-2017 at 10:05 AM.

  2. #2
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Looks good for your first release. A few suggestions though:

    Remove reflection and make it color only
    You are very close to having a color only script. From what I can see, you are using reflection to handle timing, to detect when you are no longer in a dream, and other bits and pieces that color can easily handle.

    A major benefit for having a color only script is that it can run on the official OSRS client and OSBuddy 32bit client in addition to SMART. This will lower your chances of being banned as there isn't an unapproved third party client to detect.

    A few things that you can change to make it color only:

    1. Timer - Use Aerolib's built in timer function (Timer). Works almost identically.
    2. Stats - Use Aerolib to update the experience gained in a progress report. The only downside to this is that the client has to open the stats tab and mouse over the skill to track xp, so I would aim to do this every 20-40 minutes, and before it logs off.
    3. Mouse movements - Aerolib has some really awesome mouse functions that are ready to go. HumanMMouse is a personal favorite of mine.
    4. Detect if you are in a dream - I notice you have put a procedure in place to detect if the player is still in the minigame by detecting the rewards chest. This is a good idea but there is a simpler way. A couple of other suggestions to do this in color would be: search for white (player) dots in the minimap, or search for green in the minimap. I used player dots personally, because I was always playing on popular NMZ worlds when hosts were required. You might want to bot this on a quiet world, so trying to find green on the minimap might prove a better method.
    5. Progress report - I used to do progress reports in paint on SMART as well. When using reflection they are great, but if you wanted the ability to use the script outside of SMART, they will prevent your script from running. It might be worth moving to a debug progress report. I will paste what my progress report looks like in my NMZ script.


    Simba Code:
    procedure Proggy;
    var
      TimeTilProggy: integer;

    begin
      if EProggy then
      begin
        ClearDebug;
        WriteLn('#############################');
        WriteLn('##-------------------------##');
        WriteLn('##---Dans Nightmare Zone---##');
        WriteLn('##-------------------------##');
        WriteLn('#############################');
        WriteLn('>Time Running: ' + msToTime(GetTimeRunning, Time_Formal));
        if (CurrentSkillXP > 0) then
        begin
          WriteLn('>Total ' + SkillToTrain + ' experience: ' + IntToStr(CurrentSkillXp));
          WriteLn('>Experience per hour: ' + IntToStr(XPH));
        end else
        begin
          WriteLn('>Total ' + SkillToTrain + ' experience: Pending');
          WriteLn('>Experience per hour: Pending');
        end;
        TimeTilProggy := ProggyUpdateTime - TimeSinceProggy.timeElapsed;
        WriteLn('>Next Progress update: ' + msToTime(TimeTilProggy, Time_Formal));
        WriteLn('>Status: ' + (ProggyStatus));
        if EnableDebug then
        begin
          WriteLn('>Debug: Antiban Triggers: ' +IntToStr(AntiBanTick));
          WriteLn('>Prayer Flicked: ' +IntToStr(Flicked));
          WriteLn('>Rock Caked: ' +IntToStr(Caked));
        end;
        if (HpMethod = 'Flick') then
          if (PrayerFlickTimer.timeElapsed > 20000) then
            Exit;
        if (TimeSinceProggy.timeElapsed > ProggyUpdateTime) then
        begin
          CurrentSkillXp := GetSkillXP(SkilLToTrain) - StartingXP;
          ProggyUpdateTime := RandomRange(900000, 1500000);
          XPH := Round((CurrentSkillXp) / (GetTimeRunning / 3600000.0));
          TimeSinceProggy.start();
        end;
      end;
    end;

    Another bit of feedback is the way you structured the procedure skills. This could be achieved by changing the string requirements in your setup procedure to the skill string 'ATTACK', 'STRENGTH', 'DEFENCE' etc, then then manipulating the text in the procedure skills to include the 'SKILL_' section. See example script below:
    Simba Code:
    program blahblah
    var
      which_skill, skill_tracker:string;

    procedure setup;
    begin
     which_skill:= 'ATTACK'; //Options=['ATTACK', 'STRENGTH', 'DEFENCE', 'RANGED', 'MAGIC']
    end;

    procedure skills;
    begin
      Skill_tracker := 'SKILL_' +which_skill;
    end;

    begin
      Setup;
      Skills;
      writeln(skill_tracker);
    end.

    Feel free to PM me with any questions
    Last edited by Dan the man; 05-30-2017 at 10:28 PM.

  3. #3
    Join Date
    Dec 2015
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Dan you are indeed the man.
    Great ideas you got there, i think i got all of them includded. fully color script now will run it through the night and see the proggy tomorrow. if its solid ill reupload the change, i would be glad to see your oppinion again

  4. #4
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by nenci494 View Post
    Dan you are indeed the man.
    Great ideas you got there, i think i got all of them includded. fully color script now will run it through the night and see the proggy tomorrow. if its solid ill reupload the change, i would be glad to see your oppinion again
    Great to see you taking on feedback. I have some more for you.

    Simba Code:
    procedure checkExp;
    begin
      if exp_timer.timeElapsed > exp_check_rng then
      begin
        debug('Checking exp');
        gameTab(TAB_STATS);
        str_now := GetSkillXp(input);
        str_gained := str_now- str_begin;
        exp_check_rng := randomRange(600000, 900000);
        exp_timer.restart
      end;
    end;

    The gameTab(TAB_STATS) can be removed as the GetSkillXp function will open the tab if it is not already opened (see skills.simba).
    You can also remove the str_now variable as you don't need to store GetSkillXp into it to do the math. A more efficient way of calculating the accumulated exp is:
    Simba Code:
    str_gained := GetSkillXp(input) - str_begin;

    Also, exp_timer.restart causes a compile error. Change Restart to start, as it will start from 0 again. restart isn't part of the Timer's type.

    Now to the next block
    Simba Code:
    procedure checkAttackStyle;
    var
      test, x, y, tol, color: Integer;
      auto_ret, att_p, str_p, def_p: TPoint;
    begin
      color:= 1974405;
      tol:= 28;
      att_p := Point(601, 271);
      str_p := Point(687, 271);
      def_p := Point(684, 324);
      if not gameTab(TAB_COMBAT) then
        gameTab(TAB_COMBAT);
      if input = 'strength' then
        test := 1;
      if input = 'attack' then
        test := 2;
      if input = 'defence' then
        test := 3;

      if not FindColorTolerance(x, y, color, 565, 354, 723, 405, tol) then
        begin
          debug('auto retaliate off');
          auto_ret := Point(x, y);
          HumanMMouse(auto_ret, 5, 5);
          fastClick(MOUSE_LEFT);
          gameTAb(TAB_INV);
        end;

      case test of

      1:
        begin
          if not FindColorTolerance(x, y, color, 647, 247, 725, 297, tol) then
          begin
            Debug('setting combat to strength');
            HumanMMouse(str_p, 5, 5);
            fastClick(MOUSE_LEFT);
            gameTAb(TAB_INV);
          end else
            begin
            debug('Style already stength');
            exit;
            end;
        end;

      2:
        begin
          if not FindColorTolerance(x, y, color, 566, 249, 636, 297, tol) then
          begin
            debug('setting combat to attack');
            HumanMMouse(att_p, 5, 5);
            fastClick(MOUSE_LEFT);
            gameTAb(TAB_INV);
          end else
            begin
            debug('Style already attack');
            exit;
            end;
        end;

      3:
        begin
          if not FindColorTolerance(x, y, color, 650, 303, 721, 352, tol) then
          begin
            debug('setting combat to defence');
            HumanMMouse(def_p, 5, 5);
            fastClick(MOUSE_LEFT);
          end else
            begin
            debug('Style already defence');
            exit;
            end;
        end;
      end;
    end;
    I personally killed this check in my NMZ script because there are loads of different weapons and the points will vary depending on the weapon. For example, a whip will do attack, defence of controlled. There is no strength, so it will click the controlled box. If there are 4 attack styles, defence will be at the bottom right corner, but if there is 3 attack styles on a weapon, it will be at the bottom left (from memory).
    If you are only using this for Dharok then continue.

    This can be shortened quite a bit. You have stored the Tpoints into variables unnecessarily. When using the mouse move function HumanMMouse, you can simple add the values in there straight away.
    Example:
    Simba Code:
    HumanMMouse(Point(687, 271), 5, 5);
    This will save a lot of lines and memory as you are not having to create extra variables to store things.

    Now when you are testing to see which button is highlighted, you really only need to check the attack style that's being used, and if its not highlighted, then press it. Since the color is very obvious (red on grey) we only really need to check a single tpoint and see if its red or not.

    I have gone through and given it an overhaul (Untested). I will explain what I have done under the code.
    Simba Code:
    procedure checkAttackStyle;
    var
      pnt: TPoint;
      RedColor:TColEx;
      ClickStyle: boolean;
    begin
      // Create the red color that you see in the combat tab when an attack style is selected.
      RedColor.create(12345, 12);
      // Opens combat tab if it is not already open.
      if GameTab(TAB_COMBAT) then
        // Checks to see if Auto-retaliate is enabled, and if not, enables it.
        if not RedColor.findIn(ToBox(565, 354, 723, 405), pnt) then
        begin
          Debug('Enabling auto-retaliate.');
          HumanMMouse(pnt, -5, 5);
          fastClick(MOUSE_LEFT);
          gameTAb(TAB_INV);
        end;
      // We are using a case based on the input variable. If our desired combat style isn't selected, the boolean is set to true.
      // The point is saved in the Tpoint: pnt.
      // You would normally have to put the code on seperate lines, but I find this more readable.
      case input of
        'strength': if not RedColor.findIn(ToBox(686, 270, 688, 272), pnt) then ClickStyle := true;
        'attack'  : if not RedColor.findIn(ToBox(600, 270, 602, 272), pnt) then ClickStyle := true;
        'defence' : if not RedColor.findIn(ToBox(683, 323, 685, 325), pnt) then ClickStyle := true;
      end;
      // If the boolean: Clickstyle is true, we proceed to click the desired attack style.
      if ClickStyle then
      begin
        Debug('Switching to correct attack style');
        HumanMMouse(pnt, -5, 5);
      end;
    end;
    The comments on the code is pretty self explanatory.

    The main changes is the fact that I used Aerolib's built in color functions. This is a lot simpler as we are trying to find the same color in multiple places.

    The only thing I want to explain is the case.

    I used a variable that you had already created and made a case out of it, using strings instead of numbers. Its a thing

    Regarding the TBox dimensions of the attack, strength, defence skills, I simply got a TPoint and expanded it. Example:
    Our Tpoint is 100, 200.
    A Tbox requires 4 arguments to work (x1, y1, x2, y2).
    We get x1 and y1 and simply deduct 1 from the Tpoint's x and y arguments, giving us 99, 199.
    We then get x2 and y2 and simply add 1 to the Tpoint's x and y arguments, giving us 101, 201.
    Our finished Tbox is: 99, 199, 101, 201.

    The case will determine if we need to click the attack style or not, and save the button in the pnt variable.

    If the button needed to be clicked, our boolean: Clickstyle is set to true and then the block of code proceeds it. If not, it skips to the end of the block.

    I don't have time to go through the rest right now, but take onboard the feedback above and I will get around to the rest of the script
    Last edited by Dan the man; 06-01-2017 at 01:58 AM.

  5. #5
    Join Date
    Dec 2015
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Thanks again for your feedback. will add it probably tomorrow
    1 last question, is there a function which reloads the client? like with this setup i can run ~3.5 to 4 h... I would like to add a function so it would start its own dream again, which would only be usefull if i could proxy the 6h log out with forcing the client to restart... couldnt find such a function by my self :/

    thanks

  6. #6
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by nenci494 View Post
    Thanks again for your feedback. will add it probably tomorrow
    1 last question, is there a function which reloads the client? like with this setup i can run ~3.5 to 4 h... I would like to add a function so it would start its own dream again, which would only be usefull if i could proxy the 6h log out with forcing the client to restart... couldnt find such a function by my self :/

    thanks
    You should be able to get away with logging out for a bit before the 6 hour timer. If you log out at hour 4 or 5, stay off for an hour or so, then log back it in, it should reset the 6 hour timer no?

  7. #7
    Join Date
    Mar 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    You should be able to get away with logging out for a bit before the 6 hour timer. If you log out at hour 4 or 5, stay off for an hour or so, then log back it in, it should reset the 6 hour timer no?
    That's correct. He could easily add a check looking for "You wake up feeling refreshed" in the chatbox to notify that the dream is over, and then log out / log back in. The more tricky part is making it start its own dream again (I made a script for this about a year ago and it only worked ~75% of the time, lots of finicky objects). Also FWIW, I've maxed combat on almost 4 accounts in NMZ with only one ban, and the one ban was on an account that used my auto-restart dream version of my NMZ script.

  8. #8
    Join Date
    Dec 2015
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    okay guys, got a new update. will probably not add the relog function, dont want to take the risk of geting anyone banned becouse of my script. also if anyone is using this one i would be glad to see some progress reports and if anyone is having issuse, just to make sure it runs flawless for everybody

  9. #9
    Join Date
    Aug 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Looks good, i'm gonna change some random's and try it out. Thanks.

  10. #10
    Join Date
    Jul 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think I may be missing an include because I am getting errors with anything related to fail_safe such as,

    Error: Unknown declaration "Reset" at line 79

    What includes should I be using to run this?

    EDIT: It might actually be from SMART, I wanted to use the OSbuddy client but I am not sure if smart has its own functions.
    Last edited by folks; 11-03-2017 at 10:04 PM.

  11. #11
    Join Date
    Dec 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by nenci494 View Post
    Hello boys and girls,
    I ve been working on my kind of first script for a few days now. It is a NMZ Dharoks armor script, which uses absorption, overloads and pray flick to stay at 1 hp. Also you gonna need a rock cake.

    It is by far not organized, it is not perfect, and the code itself is pretty ugly(lol), but it is running until your potions are empty, which takes about ~3h for my lvls. I used it now for about 1- 1 1/2 weeks 12h a day and not banned yet.

    Anyway, any critic or improvment ideas would be awesome.

    (And sorry for my english, im not native )

    EDIT: After the suggestions from Dan, i rewrote my script. It is now 100% color based with stats tracking in debug mode. It still runs flawless the 4 hour for me and only stopps if no supplys left. Simply choose which skill you want to train, stand on the spot you want to stand, make sure you set quickpray to rapid heal and go

    EDIT2: again some minor fixes. Runs even smoother now. removed the function of automatically setting attack style, you got to choose it ingame and add the choose one in script to track exp. I will probably not going to add the function to set dream through script, since Shout said his accounts got banned the same way. I still looking for more stuff to add.

    Simba Code:
    {$DEFINE SMART}
    {$i AeroLib/AeroLib.Simba}

    var
      ab_count, test, noOver, rock_cake,exp_check_rng, xp_p_h, str_begin, str_now, str_gained, over, absorb, pray: Integer;
      exp_timer, total_timer, fail_safe, prayer_timer: Timer;
      input, skill_to_train, skill_tracker, timeRan: string;



     procedure setup;
    begin

     input := 'defence'; // strength, attack, defence

    end;


    /////////////////////////////////////////////////////////////
    //                    INSTRUCTIONS                         //
    //  Start inside NMZ with overload and absorption in inv   //
    //  choose you attack style ingame and add input above     //
    //  Have rockcake in you inventory, too                    //
    //  XP trackin needs some time to get accurate ~ 20min     //
    /////////////////////////////////////////////////////////////

    procedure debug(s : string);
    begin
      clearDebug;
      xp_p_h := Round((str_gained*3600) DIV (GetTimeRunning DIV 1000));
      writeLn('Time running: ' + timeRan);
      //if xp_p_h > 0 then
      //begin
        writeLn('Exp per hour: ' + intToStr(xp_p_h));
     // end else
     //   writeLn('wait a bit for xp per hour.. please note it is only accurate after at least ~20mins');
     // if str_gained > 0 then
     // begin
        writeLn(input + ' exp gained: ' + intToStr(str_gained));
    //  end else
    //    writeLn('wait a bit for first xp check..');
      writeLn('Status: ' + s);
      test := (exp_check_rng - exp_timer.timeElapsed) DIV 1000;
      writeLn('Time till exp check: '+ intToStr(test));
    end;

    procedure checkExp;
    begin
      if exp_timer.timeElapsed > exp_check_rng then
      begin
        debug('Checking exp');
        str_gained := GetSkillXp(input) - str_begin;
     //   exp_timer.start;
        exp_timer.start;
        exp_check_rng := randomRange(600000, 900000);
      end;
    end;

    procedure drinkAbsorb;
    var
      i, xi, yi: Integer;
    begin
      while ab_count < 10 do
      begin
        gameTab(TAB_INV);
        if (fail_safe.timeElapsed > 20000) or (fail_safe.timeElapsed = 0) then
        begin
          if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
          begin
            debug('Drinking Absorb');
            HumanMMouse(Point(xi, yi), 5, 5);
            fastClick(MOUSE_LEFT);
            ab_count := ab_count + 1;
          end else
          begin
            debug('No more absorbs, shutting down script');
            logoutPlayer;
            terminateScript;
          end;
          fail_safe.Reset;
          fail_safe.Pause;
        end;
      end;
    end;

    procedure needDrinkAbsorb;
    var
      x, y: Integer;
    begin
      gameTab(TAB_INV);
      if not findColor(x, y, 16777215, 18, 40, 65, 65) then
      begin
        ab_count := 0;
        drinkAbsorb;
      end;
    end;

    procedure firstAbsorb;
    var
      xi, yi: integer;
    begin
      if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
      begin
        HumanMMouse(Point(xi, yi), 5, 5);
        fastClick(MOUSE_LEFT);
        sleep(100);
      end else
        begin
          debug('Seems you forgot the absorbs bud, sorry have to shut down..');
          logoutPlayer;
          terminateScript;
        end;
    end;

    procedure prayerFlick;
    var
      x, y: integer;
      pray_p: TPoint;
    begin
      if prayer_timer.timeElapsed > 55000 then
      begin
        debug('Prayer flicking');
        HumanMMouse(Point(554, 101), 5, 5);
        FastClick(MOUSE_LEFT);
        sleep(250);
        FastClick(MOUSE_LEFT);
        prayer_timer.start;
      end;
    end;

    procedure needRockCake;
    var
      cake_p: TPoint;
      x, y: integer;
    begin
      gameTab(TAB_INV);
      if (fail_safe.timeElapsed > 25000) or (fail_safe.timeElapsed = 0) then
      begin
        if (getCurrentHealth < 50) or (noOver = 1) then
        begin
          if getCurrentHealth > 1 then
          begin
            begin
              while getCurrentHealth > 1 do
                begin
                  if findDTM(rock_cake, x, y, MIX1, MIY1, MIX2, MIY2) then
                  begin
                    debug('Eating rock cake');
                    HumanMMouse(Point(x, y), 5, 5);
                    fastClick(MOUSE_RIGHT);
                    ChooseOption('Guzzle');
                    sleep(500);
                    fail_safe.start;
                    fail_safe.Pause;
                    needDrinkAbsorb;
                  end;
                end;
            end;
          end;
        end;
      end;
    end;

    procedure stillinNmz;
    var
      x, y: Integer;
    begin
      if findColorTolerance(x, y, 2329461, 566, 15, 709, 130, 27) then
      begin
        debug('Died? if not, something went wrong and you left NMZ... (probably your set broke)');
        logoutPlayer;
        terminateScript;
      end;
    end;

    procedure drinkOverload;
    var
      xi, yi: Integer;
    begin
        gameTab(TAB_INV);
        if getCurrentHealth > 50 then
        begin
          debug('Taking overload');
          if FindDTM(over, xi, yi, 561, 210, 728, 462) then
          begin
            fail_safe.Start;
            HumanMMouse(Point(xi, yi), 5, 5);
            fastClick(MOUSE_LEFT);
            sleep(10000);
          end else
            begin
              debug('no overload');
              noOver := 1;
            end;
        end else
          needDrinkAbsorb;
          needRockCake;
    end;

    procedure isPrayOn;
    var
      count: integer;
    begin
      count := CountColorTolerance(11645867, 538, 84, 568, 115, 126);
      if (count > 250) then
      begin
        HumanMMouse(Point(554, 101), 5, 5);
        fastClick(MOUSE_LEFT);
        sleep(500+randomRange(500,1000));
      end;
    end;

    procedure declare_stuff;
    begin
      debug('declaring stuff...');
      setup;
      prayer_timer.start;
      total_timer.start;
      gameTab(TAB_STATS);
      str_begin := getSkillXp(input);
      gameTab(TAB_INV);
      exp_timer.start;
      exp_check_rng := 10000;
      noOver:= 0;
      absorb := DTMFromString('mggAAAHicY2NgYPBiY2BwBuJAIA4AYg8gDgbiKCagGBD7AbELEDsCcQQQb913GKiLEQMbMWAHmCohGAIARp4GSQ==');
      over := DTMFromString('mggAAAHicY2NgYEhmYWCIBeJ4II4G4lwgzgBiD2YGBnsgNmOGsN2B2BqIhfj4gLoYsWDsAJtKhGoAvFEEQA==');
      pray := DTMFromString('mlwAAAHicY2dgYOAGYn4gFgJiHiBmAWImBggQA2JxqBwDVJwXiEWB2PDQJCDJiBXzM+AG2HVAMBQAAN8AAko=');
      rock_cake := DTMFromString('mrAAAAHic42BgYNjPxMCwGYj3AvERID4NxKeYIOJbQeKMQDYQbwHizUC8D4iPAPEpKJ2X4gU0hREnNmLAD3DrhGAYAAAFRw1t');
      firstAbsorb;
    end;

    begin
      InitAL;
      LoginPlayer(False);
      declare_stuff;
      while isLoggedIn do
      begin
        stillinNmz;
        needDrinkAbsorb;
        drinkOverload;
        prayerFlick;
        isPrayOn;
        sleep(1000);
       timeRan := MSToTime(total_timer.timeElapsed, 1);
        writeLn(timeRan);
        checkExp;
        debug('idling');
      end else
      begin
        writeLn('logging off');
        terminateScript;
      end;
    end.
    is it usable now you reckon?

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
  •