Page 4 of 4 FirstFirst ... 234
Results 76 to 95 of 95

Thread: [AeroLib] HoodzCooker - Rogues' den

  1. #76
    Join Date
    Jan 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    I'm 500k away from 99, all botted using this script. I changed a few things to make this run smoothly.
    changed waitOption('Withdraw-All', 300) to
    waitOptionMulti(['Withdraw-All'], 300);
    deleted these lines
    else
    waitOption('Withdraw-All-but-one', 300);
    I also changed the free worlds in worldhandler.simba (wasn't this scripts fault it kept switching to f2p worlds. After these changes the script ran flawlessly for 8 hours straight before I manually stopped it.

  2. #77
    Join Date
    Jan 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by maikelpro99 View Post
    i've tried it again and again but no way, i can't do it. it is cooking monkfishes but then it eats them all.. something is going crazy
    DTM_Monkfish := DTMFromString('mrAAAAHic42BgYMhkYmBIAOJyIM4C4hQgTg TiCiCuAeJnQDWPgfg1lH4AxG+A+B0Q3wHi5kgvhoYgDzCujXYH ijCiYH4giQ8zEsAwAABT2w+m');

  3. #78
    Join Date
    Feb 2017
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Tried using this script to cook karambwan. Everything works fine until it uses the karambwan on the fire. It will mouse over "Thoroughly" and do nothing for about two seconds before it repeats the process.

    Tried different zooms and brightnesses, but I have no idea what i'm doing and it still doesn't work.

  4. #79
    Join Date
    Nov 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    where do i type in what food i want to cook ? cant find it

  5. #80
    Join Date
    Nov 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by niot View Post
    where do i type in what food i want to cook ? cant find it
    anyone?

  6. #81
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by niot View Post
    anyone?
    Press play with any food you want cooking visible in your bank without scrolling.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  7. #82
    Join Date
    Nov 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    thank you!

  8. #83
    Join Date
    Jul 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    very good script, just needed to change some text and dtms to get everything running smoothly

    withdraw text in game is different than in the script,

    I think I made these changes

    waitOption('Withdraw-All ', 300); to
    waitOption('Withdraw-All', 300);

    waitOption('Withdraw-All-but-one', 300); to
    waitOption('Withdraw-All-but-1', 300);

    Karambwan cooking the text is also different, I think it's make instead of cook, just change the text to what's in the game

    Also with karambwan cooking it starts eating the cooked karambwans, I think because they match the dtm of a lower level fish
    I changed the dtm of everything besides karambwan to the raw lobster dtm and it fixed to problem

    still have some problems with my world list but thats not the scripts fault and tbf I haven't put much time into fixing it
    Last edited by impitup; 04-28-2017 at 06:38 AM.

  9. #84
    Join Date
    Feb 2017
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Quote Originally Posted by impitup View Post
    very good script, just needed to change some text and dtms to get everything running smoothly

    withdraw text in game is different than in the script,

    I think I made these changes

    waitOption('Withdraw-All ', 300); to
    waitOption('Withdraw-All', 300);

    waitOption('Withdraw-All-but-one', 300); to
    waitOption('Withdraw-All-but-1', 300);

    Karambwan cooking the text is also different, I think it's make instead of cook, just change the text to what's in the game

    Also with karambwan cooking it starts eating the cooked karambwans, I think because they match the dtm of a lower level fish
    I changed the dtm of everything besides karambwan to the raw lobster dtm and it fixed to problem

    still have some problems with my world list but thats not the scripts fault and tbf I haven't put much time into fixing it
    I'm having the same problems with the world select as well. I believe that's smart related and not this script. Manually selecting the worlds seems to work just fine after.

  10. #85
    Join Date
    May 2017
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Tested the bot for a few hours. Worked good.

    I did not change any of the code.
    Last edited by OSRS BOT; 05-17-2017 at 01:03 PM.

  11. #86
    Join Date
    Aug 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sadly not working for me in combination with sharks. It however did try to cook my feathers...
    Any idea how to solve this?

    edit:
    I made a new DTM for shark which works
    mlwAAAHicY2dgYJjGBMGLgHg+EM8A4i4g7gRib0YGBlcgDgLia CgdD8TBQFyckQHUzYgD4wa4dCDpAgCc4gfG


    Ofcourse set the brightness to full
    Last edited by Hylix; 08-02-2017 at 08:07 AM.

  12. #87
    Join Date
    Mar 2017
    Posts
    32
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Working great for me! Thanks for the DTM

  13. #88
    Join Date
    Jun 2007
    Posts
    310
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    works well, only issue is the banking can be iffy. doesnt always withdraw correctly. CHanging speeds helps. Thanks @Hoodz.
    Last edited by lolskilla; 09-27-2017 at 08:23 PM.

  14. #89
    Join Date
    Apr 2015
    Location
    canada
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    How do you change it to work with the new production screen interface?

  15. #90
    Join Date
    Jul 2017
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by jajo123 View Post
    How do you change it to work with the new production screen interface?
    Code:
    program HoodzCooker;
    {$i AeroLib/AeroLib.Simba}
    
    var
      x, y, cooked, currentFood: Integer;
      DTM_Lobster, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Karambwam, DTM_Shrimp, DTM_Shark,DTM_Swordfish,DTM_MonkFish,DTM_Angler: Integer;
      Raw_Array, xpTable: TIntegerArray;
      breakAfterTime, breakLength: Integer;
    
    const
      P_USERNAME = '';
      P_PASSWORD = '';
      P_PIN = '';
    
      USEBREAKS = true;
      breakAfterHours_MIN = 2;
      breakAfterHours_MAX = 3;
      breakForMinutes_MIN = 30;
      breakForMinutes_MAX = 90;
    
      VERSION = '1';
    
    procedure declarePlayer();
    begin
      Me.Name := P_USERNAME;
      Me.Pass := P_PASSWORD;
      Me.Pin := P_PIN;
      Me.Nick := '';
      Me.Active := True;
      Me.Member := True;
    end;
    
    procedure updater();
    var
      NewFile: integer;
      OnlineVersion, NewScript, NewFileName: string;
    begin
      writeln('Checking for script updates...');
      OnlineVersion := GetPage('http://pastebin.com/raw.php?i=Fnc4CpZp');
      if (trim(OnlineVersion) > VERSION) then
      begin
        writeLn('Script update available!');
        writeLn('Updating script to v' + OnlineVersion);
        NewScript := GetPage('http://pastebin.com/raw.php?i=LJWtzExX');
        NewFileName := 'C:\Simba\Scripts\' + 'HoodzCooker Aero V' + Trim(OnlineVersion) + '.simba';
        NewFile := Rewritefile(NewFileName, true);
        try
          WriteFileString(NewFile, NewScript);
        except
          begin
            writeLn('Fatal error writing to ' + NewFileName + '!!');
            terminatescript;
          end;
        end;
        CloseFile(NewFile);
        writeLn('New script downloaded to ' + NewFileName + '. Please restart Simba.');
        TerminateScript;
      end
      else
        writeLn('You have the latest version of the script!');
    end;
    
    {procedure stats_check;
    begin
      if (STATS_ID = '') then
      begin
        writeln('You MUST have a stats account registered to use this script');
        writeln('You can register for free here: http://stats.grats.pw/reg.php');
        writeln('More information about stats here: https://villavu.com/forum/showthread.php?t=112103&p=1332139');
        TerminateScript;
      end;
    end;     }
    
    procedure randomBreakTime();
    begin
      breakAfterTime := GetTimeRunning + (RandomRange(breakAfterHours_MIN, breakAfterHours_MAX) * 3600000) + RandomRange(2000, 3500000);
      Writeln('breakAfterTime = ' + MsToTime(breakAfterTime, 3));
      breakLength := (RandomRange(breakForMinutes_MIN, breakForMinutes_MAX) * 60000) + RandomRange(2000, 59000);
      Writeln('breakLength = ' + MsToTime(breakLength, 3));
    end;
    
    procedure BreakHandlerCustom();
    begin
    writeln('starting breakhandler');
      while (isLoggedIn) do
        logoutPlayer;
      while not (getTimeRunning >= (breakAfterTime + breakLength)) do
      begin
        Writeln('Break handler active');
        Writeln('TimeRunning: ' + MsToTime(getTimeRunning, 3));
        Writeln('Breaking till: ' + MsToTime((breakAfterTime + breakLength), 3));
        Writeln('Time left until break is done: ' + MsToTime(((breakAfterTime + breakLength) - getTimeRunning), 3));
        Sleep(5000);
        ClearDebug;
      end;
      randomBreakTime;
    end;
    
    procedure free;
    begin
      freeDTM(DTM_Lobster);
      freeDTM(DTM_Trout);
      freeDTM(DTM_Salmon);
      freeDTM(DTM_Tuna);
      freeDTM(DTM_Karambwam);
      freeDTM(DTM_Shrimp);
      freeDTM(DTM_Shark);
      freeDTM(DTM_Swordfish);
      freeDTM(DTM_MonkFish);
      freeDTM(DTM_Angler);
    end;
    
    procedure setupPlayer();
    begin
      writeln('player setup...');
      if (not isLoggedIn()) then
        loginPlayer(false);
      if (isLoggedIn()) then
      begin
        toggleRunning(true);
        setAngle(ANGLE_HIGH);
      end;
    end;
    
    procedure setup();
    begin
      mouseSpeed := Random(18, 25);
      writeln('mouseSpeed set at: ' + intToStr(mouseSpeed));
      DTM_Lobster := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ7IDYHYhMg9gbiJ0C5j0D8GohfAfFTIH4OxBUuckCSEQOzM2AHmCohGAIA83QH9g==');
      DTM_Shark := DTMFromString('mggAAAHicY2NgYGgH4logngZlVwPxFCBOBOIiIC4A4nQgToPi6b09QJIRA7MzYAeYKiEYAgDc0Qdv');
      DTM_Trout := DTMFromString('mbQAAAHicY2VgYHBiYmCwB2I3IDYFYksgfgEUf8cAoV8B8QcgPrJ7F5BkRMHsDJiAEQsGAwBuJwgm');
      DTM_Shrimp := DTMFromString('mggAAAHicY2NgYOBnhmAmIOYEYnEglgJiNUYGBiNGCG0IxFpArALEezuzgboYMTA7A3aAqRKCIQAAFswDOQ==');
      DTM_Salmon := DTMFromString('mggAAAHicY2NgYNBiYWBQA2JZINYHYk0glgNiVUYgH4i1gVgDyjYE4q5wf6AuRgzMzoAdYKqEYAgAADSUA1E=');
      DTM_Tuna := DTMFromString('mwQAAAHic42RgYLjLxMDwGIgvA/EtIL4HxM+A+CYQv4XyIxgZGOKAOBaIE6E4CohDGCFy0UC8b8sWoGmMuLEsAwM7A37Ajt8EOIYDACVbDZE=');
      DTM_Karambwam := DTMFromString('mrAAAAHic42BgYNjIxMCwAYi3A/FyIF4PxLuAeB8QLwbit0A1P4D4CxB/BeLfUP4nIH4HxC4xJkCSESdmZ8APcOuEYBgAAGHHDi0=');;
      DTM_Swordfish := DTMFromString('mAAEAAHiclcuxCoJgAMTxc+8RCyyHgsQHaA7CycElycAhHOTLqGj4JiGhRnHQ5+kfNrR68JvubiKpcAYlrj8JUhyR4YQLcsz4uJjDwxIB1lhhgamG3be326deh0aN6dVWnfLQ6BzddYutbFrJbB7a+5l2bqS6eGtsnJH+8wHxVSSF');
      DTM_MonkFish := DTMFromString('mVAEAAHicE2BgYFjKyMCwAohXA/FmIN4OxeuhYsuBeBEQzwXi2UA8D8peAMRLgDgNaEY2EGcyQNgZUH4KFMcBcTwUJwFxMpIaEG6P8WFId7JiSHGwZMj2tGFw1lJjiLY0YQi3MQDzE53MGSojXBkKfe0ZynycGSYmBzFsra1i2FhVznDu+DEGSgEjhRgdAACuCyLM');
      DTM_Angler := DTMFromString('mVAEAAHicE2BgYFjJyMCwHIgXA/FcIJ4NxHOg7HVAvAmItwHxdigN4q8H4iVAvBCIE4Fm5AFxIRRnA3EGEKcCcRQQxwJxPBAnA3EaEKdA5WKg/J2H9jIomWgw9HcWMtRWJDM01aQxWM5NZ9i9dRpDSIAaQ2C4AUN0uBaDWr4ng4+HEoNVmBODgYc5g09BOMOZYxsZKAWMFGJ0AAAjliQ4');
      Raw_Array := [DTM_Shrimp, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Lobster, DTM_Shark, DTM_Karambwam,DTM_Swordfish,DTM_MonkFish,DTM_Angler];
      xpTable := [30, 70, 90, 100, 120, 210, 190,140,150,230];
      addOnTerminate('free');
      randomBreakTime();
      setupPlayer();
    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 waitForPixelShift(amount, timeOut: Integer; box: TBox): Boolean;
    var
      x1, y1, BMP, BMP2, tempShift: Integer;
      t: Timer;
    begin
      result := false;
      t.start();
      BMP := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
      repeat
        if (t.timeElapsed() >= timeOut) then
          break;
        sleep(250);
        BMP2 := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
        tempShift := calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1)));
        if (calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1))) >= amount) then
          result := true;
        freeBitmap(BMP2);
      until (Result);
      freeBitmap(BMP);
    end;
    
    function getLocations(DTM: Integer): TIntegerArray;
    var
      I: Integer;
      tempArray: TIntegerArray;
    begin
      setLength(tempArray, 0);
      for I := 1 to 28 do
      begin
        if (FindDTM(DTM, x, y, invBox(I).x1, invBox(I).y1, invBox(I).x2, invBox(I).y2)) then
        begin
          SetLength(tempArray, Length(tempArray) + 1);
          tempArray[High(tempArray)] := I;
        end;
      end;
      result := tempArray;
    end;
    
    function textVisible(): Boolean;
    var
      t: Timer;
      numb: Integer;
    begin
      result := false;
      numb := random(2000, 3000);
      t.start();
      repeat
        if (t.timeElapsed() > numb) then
          break;
        sleep(random(320, 600));
        if (countColor(0, 211, 392, 307, 411) = 277) then
          result := true;
      until (result);
    end;
    
    function selectMenu(): Boolean;
    begin
      result := (countColor(128, 129, 359, 379, 382) > 50);
    end;
    
    procedure cookHandler();
    var
      Timer, world, I, rand: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      spot, selectPoint: TPoint;
      aBool: Boolean;
      tCol : TColEx;
    begin
      aBool := false;
      if (not anySlotActivated()) then
      begin
        for I := 0 to high(Raw_Array) do
        begin
          if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
          begin
            customMouse(point(x, y));
            sleep(20 + random(30));
            case random(12) of
              0..10: fastClick(MOUSE_LEFT);
              11:
                begin
                  fastClick(MOUSE_RIGHT);
                  waitOption('Use', 300);
                end;
            end;
            sleep(20 + random(120));
            break;
          end
          else
            if (I = length(Raw_Array)) then
              exit;
        end;
      end;
      tCol.create(2660821, 15, 0.15, 1.42);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      ATPA := FloodFillTPA(TPA);
      sortATPASize(ATPA, true);
      if (length(ATPA[0]) < 20) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      sleep(200 + random(200));
      if (not anySlotActivated()) then
        exit;
      spot := middleTPA(ATPA[0]);
      customMouse(spot);
      sleep(20 + random(150));
      if (waitUpText('ire', 300)) then
      begin
        aBool := true;
        case random(10) of
          0..8: fastClick(MOUSE_LEFT);
          9:
            begin
              fastClick(MOUSE_RIGHT);
              waitOption('-> Fire', 300);
            end;
        end;
      end
      else
      begin
        fastClick(MOUSE_RIGHT);
        if (waitOption('-> Fire', 300)) then
          aBool := true;
      end;
      if (aBool) then
      begin
        //sleep(1000);
        timer := (getTimeRunning() + 6000 + random(1200));
        while (isLoggedIn) and (not selectMenu()) and (getTimeRunning() < timer) do
          sleep(200 + random(150));
       // if (selectMenu()) then
        begin
          if (I = high(RAW_ARRAY)) then
            selectPoint := Point(245, 410)
          else
            selectPoint := Point(260, 424);
          customMouse(point(selectPoint.X + random( - 22, 22), selectPoint.Y + random( - 17, 30)));
          begin
            fastClick(MOUSE_LEFT);
           { if (I = high(RAW_ARRAY)) then
              rand := 0
            else
              rand := random(16);
            case rand of
              0:
                begin
                  waitOption('Cook X', 300);
                  if (textVisible()) then
                    typeSend(toStr(random(28, 99)), true);
                end;
              1..15: waitOption('Cook All', 300);    }
            end;
          end;
        end;
      end;
    
    
    procedure antiban();
    var
      rand: Integer;
      what: String
    begin
      if (random(0, 30) = 0) then
      begin
        rand := random(0, 71);
        case rand of
          0..45:
          begin
            if (pointInBox(getMousePnt(), intToBox(1, 1, 765, 500))) then
              MMouseOffClient('random');
            what := 'mouse off client';
          end;
          46..51:
          begin
            compassMovement(30, 170, false);
            what := 'compass movement';
          end;
          52..57:
          begin
            hoverSkill(SKILL_COOKING, false);
            what := 'hovering skill';
          end;
          58..70:
          begin
            pickUpMouse;
            what := 'pick up mouse';
          end;
        end;
        writeln('last antiban on: ' + mstoTime(getTimeRunning, 3) + '    ' + what);
      end;
    end;
    
    procedure bankHandler();
    var
      slot, I: Integer;
      slots: TIntegerArray;
    begin
      if (Interfaces[PINSCREEN].isVisible()) then
        inPin(P_PIN);
      case random(30) of
        0..28: quickDeposit('inv');
        29:
          begin
            middleBox(invBox(1));
            customMouse(Point(x, y));
            sleep(20 + random(20));
            fastClick(MOUSE_RIGHT);
            waitOption('Deposit-All', 300);
          end;
      end;
      for I := 0 to high(Raw_Array) do
      begin
      if (FindDTM(Raw_Array[I], x, y, MSX1, MSY1, MSX2, MSY2)) then
      begin
        customMouse(Point(x, y));
        sleep(20 + random(30));
        fastClick(MOUSE_RIGHT);
        if (random(0, 1) = 0) then
          waitOption('Withdraw-All ', 300)
        else
          waitOption('Withdraw-All-but-1', 300);
        sleep(100 + random(100));
        closeInterface();
        sleep(500 + random(300));
        cookhandler();
        break;
      end else
      begin
        if (isBankOpen() and (I = length(Raw_Array))) then
        begin
          closeInterface();
          logoutPlayer();
          writeln('out of raws');
          terminateScript();
        end;
      end;
     end;
    end;
    
    procedure openBank();
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      I, world: Integer;
      spot: TPoint;
      t: Timer;
      tCol : TColEx;
    begin
      if (isBankOpen()) then
        exit;
      if (Interfaces[PINSCREEN].isVisible()) then
        inPin(P_PIN);
      tCol.create(1521211, 10, 0.08, 0.91);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      ATPA := FloodFillTPA(TPA);
      SortATPASize(ATPA, true);
      spot := middleTPA(ATPA[0]);
      customMouse(spot);
      sleep(20 + random(30));
      if (waitUptext('ald', 250)) then
      begin
        fastClick(MOUSE_RIGHT);
        waitOption('Bank', 300);
        I := getTimeRunning() + 3000 + random(1000);
        while (not isBankOpen()) and (getTimeRunning < I) do
          sleep(250 + random(200));
      end;
    end;
    
    function findAnyRaw(): Boolean;
    var
      I: Integer;
    begin
      result := false;
      for I := 0 to high(Raw_Array) do
      begin
        if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          currentFood := I;
          exit(true);
        end;
      end;
    end;
    
    procedure incVars();
    var
      xp: Integer;
    begin
      xp := xpTable[currentFood];
      stats_incVariable('78', xp);
    end;
    
    function getState(): Integer;
    begin
      if (getTimeRunning >= breakAfterTime) and (USEBREAKS) then
        exit(7);
      if (not isLoggedIn()) then
        exit(0);
      if ((getCurrentTab <> TAB_INV) and (not isBankOpen())) then
        exit(1);
      if (not findAnyRaw()) and (not isBankOpen()) then
        exit(5);
      if (not findAnyRaw()) and (isBankOpen()) then
        exit(6);
      if (findAnyRaw()) and (isBankOpen()) then
        exit(2);
      if (findAnyRaw()) and (not isBankOpen()) and (not waitForPixelShift(10, 3400, intToBox(MIX1, MIY1, MIX2, MIY2))) then
        exit(3);
      incVars();
      exit(4);
    end;
    
    procedure executeState(State: Integer);
    begin
      case (State) of
        0: setupPlayer();
        1: gameTab(TAB_INV);
        2: closeInterface();
        3: cookHandler();
        4: antiban();
        5: openBank();
        6: bankHandler();
        7: breakHandlerCustom();
      end;
      stats_Commit();
      sleep(Random(100, 200));
    end;
    
    begin
      declarePlayer();
      initAL();
      updater();
      setup();
      stats_setup('40');
      //stats_check;
      stats_initVariable('78', 0);
      repeat
        executeState(getState());
      until (false);
    end.

    This is the code that i used to fix the interface problems. I got 99 cooking recently with this code. Also thanks hoodz

  16. #91
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by underforu View Post
    Code:
    program HoodzCooker;
    {$i AeroLib/AeroLib.Simba}
    
    var
      x, y, cooked, currentFood: Integer;
      DTM_Lobster, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Karambwam, DTM_Shrimp, DTM_Shark,DTM_Swordfish,DTM_MonkFish,DTM_Angler: Integer;
      Raw_Array, xpTable: TIntegerArray;
      breakAfterTime, breakLength: Integer;
    
    const
      P_USERNAME = '';
      P_PASSWORD = '';
      P_PIN = '';
    
      USEBREAKS = true;
      breakAfterHours_MIN = 2;
      breakAfterHours_MAX = 3;
      breakForMinutes_MIN = 30;
      breakForMinutes_MAX = 90;
    
      VERSION = '1';
    
    procedure declarePlayer();
    begin
      Me.Name := P_USERNAME;
      Me.Pass := P_PASSWORD;
      Me.Pin := P_PIN;
      Me.Nick := '';
      Me.Active := True;
      Me.Member := True;
    end;
    
    procedure updater();
    var
      NewFile: integer;
      OnlineVersion, NewScript, NewFileName: string;
    begin
      writeln('Checking for script updates...');
      OnlineVersion := GetPage('http://pastebin.com/raw.php?i=Fnc4CpZp');
      if (trim(OnlineVersion) > VERSION) then
      begin
        writeLn('Script update available!');
        writeLn('Updating script to v' + OnlineVersion);
        NewScript := GetPage('http://pastebin.com/raw.php?i=LJWtzExX');
        NewFileName := 'C:\Simba\Scripts\' + 'HoodzCooker Aero V' + Trim(OnlineVersion) + '.simba';
        NewFile := Rewritefile(NewFileName, true);
        try
          WriteFileString(NewFile, NewScript);
        except
          begin
            writeLn('Fatal error writing to ' + NewFileName + '!!');
            terminatescript;
          end;
        end;
        CloseFile(NewFile);
        writeLn('New script downloaded to ' + NewFileName + '. Please restart Simba.');
        TerminateScript;
      end
      else
        writeLn('You have the latest version of the script!');
    end;
    
    {procedure stats_check;
    begin
      if (STATS_ID = '') then
      begin
        writeln('You MUST have a stats account registered to use this script');
        writeln('You can register for free here: http://stats.grats.pw/reg.php');
        writeln('More information about stats here: https://villavu.com/forum/showthread.php?t=112103&p=1332139');
        TerminateScript;
      end;
    end;     }
    
    procedure randomBreakTime();
    begin
      breakAfterTime := GetTimeRunning + (RandomRange(breakAfterHours_MIN, breakAfterHours_MAX) * 3600000) + RandomRange(2000, 3500000);
      Writeln('breakAfterTime = ' + MsToTime(breakAfterTime, 3));
      breakLength := (RandomRange(breakForMinutes_MIN, breakForMinutes_MAX) * 60000) + RandomRange(2000, 59000);
      Writeln('breakLength = ' + MsToTime(breakLength, 3));
    end;
    
    procedure BreakHandlerCustom();
    begin
    writeln('starting breakhandler');
      while (isLoggedIn) do
        logoutPlayer;
      while not (getTimeRunning >= (breakAfterTime + breakLength)) do
      begin
        Writeln('Break handler active');
        Writeln('TimeRunning: ' + MsToTime(getTimeRunning, 3));
        Writeln('Breaking till: ' + MsToTime((breakAfterTime + breakLength), 3));
        Writeln('Time left until break is done: ' + MsToTime(((breakAfterTime + breakLength) - getTimeRunning), 3));
        Sleep(5000);
        ClearDebug;
      end;
      randomBreakTime;
    end;
    
    procedure free;
    begin
      freeDTM(DTM_Lobster);
      freeDTM(DTM_Trout);
      freeDTM(DTM_Salmon);
      freeDTM(DTM_Tuna);
      freeDTM(DTM_Karambwam);
      freeDTM(DTM_Shrimp);
      freeDTM(DTM_Shark);
      freeDTM(DTM_Swordfish);
      freeDTM(DTM_MonkFish);
      freeDTM(DTM_Angler);
    end;
    
    procedure setupPlayer();
    begin
      writeln('player setup...');
      if (not isLoggedIn()) then
        loginPlayer(false);
      if (isLoggedIn()) then
      begin
        toggleRunning(true);
        setAngle(ANGLE_HIGH);
      end;
    end;
    
    procedure setup();
    begin
      mouseSpeed := Random(18, 25);
      writeln('mouseSpeed set at: ' + intToStr(mouseSpeed));
      DTM_Lobster := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ7IDYHYhMg9gbiJ0C5j0D8GohfAfFTIH4OxBUuckCSEQOzM2AHmCohGAIA83QH9g==');
      DTM_Shark := DTMFromString('mggAAAHicY2NgYGgH4logngZlVwPxFCBOBOIiIC4A4nQgToPi6b09QJIRA7MzYAeYKiEYAgDc0Qdv');
      DTM_Trout := DTMFromString('mbQAAAHicY2VgYHBiYmCwB2I3IDYFYksgfgEUf8cAoV8B8QcgPrJ7F5BkRMHsDJiAEQsGAwBuJwgm');
      DTM_Shrimp := DTMFromString('mggAAAHicY2NgYOBnhmAmIOYEYnEglgJiNUYGBiNGCG0IxFpArALEezuzgboYMTA7A3aAqRKCIQAAFswDOQ==');
      DTM_Salmon := DTMFromString('mggAAAHicY2NgYNBiYWBQA2JZINYHYk0glgNiVUYgH4i1gVgDyjYE4q5wf6AuRgzMzoAdYKqEYAgAADSUA1E=');
      DTM_Tuna := DTMFromString('mwQAAAHic42RgYLjLxMDwGIgvA/EtIL4HxM+A+CYQv4XyIxgZGOKAOBaIE6E4CohDGCFy0UC8b8sWoGmMuLEsAwM7A37Ajt8EOIYDACVbDZE=');
      DTM_Karambwam := DTMFromString('mrAAAAHic42BgYNjIxMCwAYi3A/FyIF4PxLuAeB8QLwbit0A1P4D4CxB/BeLfUP4nIH4HxC4xJkCSESdmZ8APcOuEYBgAAGHHDi0=');;
      DTM_Swordfish := DTMFromString('mAAEAAHiclcuxCoJgAMTxc+8RCyyHgsQHaA7CycElycAhHOTLqGj4JiGhRnHQ5+kfNrR68JvubiKpcAYlrj8JUhyR4YQLcsz4uJjDwxIB1lhhgamG3be326deh0aN6dVWnfLQ6BzddYutbFrJbB7a+5l2bqS6eGtsnJH+8wHxVSSF');
      DTM_MonkFish := DTMFromString('mVAEAAHicE2BgYFjKyMCwAohXA/FmIN4OxeuhYsuBeBEQzwXi2UA8D8peAMRLgDgNaEY2EGcyQNgZUH4KFMcBcTwUJwFxMpIaEG6P8WFId7JiSHGwZMj2tGFw1lJjiLY0YQi3MQDzE53MGSojXBkKfe0ZynycGSYmBzFsra1i2FhVznDu+DEGSgEjhRgdAACuCyLM');
      DTM_Angler := DTMFromString('mVAEAAHicE2BgYFjJyMCwHIgXA/FcIJ4NxHOg7HVAvAmItwHxdigN4q8H4iVAvBCIE4Fm5AFxIRRnA3EGEKcCcRQQxwJxPBAnA3EaEKdA5WKg/J2H9jIomWgw9HcWMtRWJDM01aQxWM5NZ9i9dRpDSIAaQ2C4AUN0uBaDWr4ng4+HEoNVmBODgYc5g09BOMOZYxsZKAWMFGJ0AAAjliQ4');
      Raw_Array := [DTM_Shrimp, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Lobster, DTM_Shark, DTM_Karambwam,DTM_Swordfish,DTM_MonkFish,DTM_Angler];
      xpTable := [30, 70, 90, 100, 120, 210, 190,140,150,230];
      addOnTerminate('free');
      randomBreakTime();
      setupPlayer();
    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 waitForPixelShift(amount, timeOut: Integer; box: TBox): Boolean;
    var
      x1, y1, BMP, BMP2, tempShift: Integer;
      t: Timer;
    begin
      result := false;
      t.start();
      BMP := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
      repeat
        if (t.timeElapsed() >= timeOut) then
          break;
        sleep(250);
        BMP2 := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
        tempShift := calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1)));
        if (calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1))) >= amount) then
          result := true;
        freeBitmap(BMP2);
      until (Result);
      freeBitmap(BMP);
    end;
    
    function getLocations(DTM: Integer): TIntegerArray;
    var
      I: Integer;
      tempArray: TIntegerArray;
    begin
      setLength(tempArray, 0);
      for I := 1 to 28 do
      begin
        if (FindDTM(DTM, x, y, invBox(I).x1, invBox(I).y1, invBox(I).x2, invBox(I).y2)) then
        begin
          SetLength(tempArray, Length(tempArray) + 1);
          tempArray[High(tempArray)] := I;
        end;
      end;
      result := tempArray;
    end;
    
    function textVisible(): Boolean;
    var
      t: Timer;
      numb: Integer;
    begin
      result := false;
      numb := random(2000, 3000);
      t.start();
      repeat
        if (t.timeElapsed() > numb) then
          break;
        sleep(random(320, 600));
        if (countColor(0, 211, 392, 307, 411) = 277) then
          result := true;
      until (result);
    end;
    
    function selectMenu(): Boolean;
    begin
      result := (countColor(128, 129, 359, 379, 382) > 50);
    end;
    
    procedure cookHandler();
    var
      Timer, world, I, rand: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      spot, selectPoint: TPoint;
      aBool: Boolean;
      tCol : TColEx;
    begin
      aBool := false;
      if (not anySlotActivated()) then
      begin
        for I := 0 to high(Raw_Array) do
        begin
          if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
          begin
            customMouse(point(x, y));
            sleep(20 + random(30));
            case random(12) of
              0..10: fastClick(MOUSE_LEFT);
              11:
                begin
                  fastClick(MOUSE_RIGHT);
                  waitOption('Use', 300);
                end;
            end;
            sleep(20 + random(120));
            break;
          end
          else
            if (I = length(Raw_Array)) then
              exit;
        end;
      end;
      tCol.create(2660821, 15, 0.15, 1.42);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      ATPA := FloodFillTPA(TPA);
      sortATPASize(ATPA, true);
      if (length(ATPA[0]) < 20) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      sleep(200 + random(200));
      if (not anySlotActivated()) then
        exit;
      spot := middleTPA(ATPA[0]);
      customMouse(spot);
      sleep(20 + random(150));
      if (waitUpText('ire', 300)) then
      begin
        aBool := true;
        case random(10) of
          0..8: fastClick(MOUSE_LEFT);
          9:
            begin
              fastClick(MOUSE_RIGHT);
              waitOption('-> Fire', 300);
            end;
        end;
      end
      else
      begin
        fastClick(MOUSE_RIGHT);
        if (waitOption('-> Fire', 300)) then
          aBool := true;
      end;
      if (aBool) then
      begin
        //sleep(1000);
        timer := (getTimeRunning() + 6000 + random(1200));
        while (isLoggedIn) and (not selectMenu()) and (getTimeRunning() < timer) do
          sleep(200 + random(150));
       // if (selectMenu()) then
        begin
          if (I = high(RAW_ARRAY)) then
            selectPoint := Point(245, 410)
          else
            selectPoint := Point(260, 424);
          customMouse(point(selectPoint.X + random( - 22, 22), selectPoint.Y + random( - 17, 30)));
          begin
            fastClick(MOUSE_LEFT);
           { if (I = high(RAW_ARRAY)) then
              rand := 0
            else
              rand := random(16);
            case rand of
              0:
                begin
                  waitOption('Cook X', 300);
                  if (textVisible()) then
                    typeSend(toStr(random(28, 99)), true);
                end;
              1..15: waitOption('Cook All', 300);    }
            end;
          end;
        end;
      end;
    
    
    procedure antiban();
    var
      rand: Integer;
      what: String
    begin
      if (random(0, 30) = 0) then
      begin
        rand := random(0, 71);
        case rand of
          0..45:
          begin
            if (pointInBox(getMousePnt(), intToBox(1, 1, 765, 500))) then
              MMouseOffClient('random');
            what := 'mouse off client';
          end;
          46..51:
          begin
            compassMovement(30, 170, false);
            what := 'compass movement';
          end;
          52..57:
          begin
            hoverSkill(SKILL_COOKING, false);
            what := 'hovering skill';
          end;
          58..70:
          begin
            pickUpMouse;
            what := 'pick up mouse';
          end;
        end;
        writeln('last antiban on: ' + mstoTime(getTimeRunning, 3) + '    ' + what);
      end;
    end;
    
    procedure bankHandler();
    var
      slot, I: Integer;
      slots: TIntegerArray;
    begin
      if (Interfaces[PINSCREEN].isVisible()) then
        inPin(P_PIN);
      case random(30) of
        0..28: quickDeposit('inv');
        29:
          begin
            middleBox(invBox(1));
            customMouse(Point(x, y));
            sleep(20 + random(20));
            fastClick(MOUSE_RIGHT);
            waitOption('Deposit-All', 300);
          end;
      end;
      for I := 0 to high(Raw_Array) do
      begin
      if (FindDTM(Raw_Array[I], x, y, MSX1, MSY1, MSX2, MSY2)) then
      begin
        customMouse(Point(x, y));
        sleep(20 + random(30));
        fastClick(MOUSE_RIGHT);
        if (random(0, 1) = 0) then
          waitOption('Withdraw-All ', 300)
        else
          waitOption('Withdraw-All-but-1', 300);
        sleep(100 + random(100));
        closeInterface();
        sleep(500 + random(300));
        cookhandler();
        break;
      end else
      begin
        if (isBankOpen() and (I = length(Raw_Array))) then
        begin
          closeInterface();
          logoutPlayer();
          writeln('out of raws');
          terminateScript();
        end;
      end;
     end;
    end;
    
    procedure openBank();
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      I, world: Integer;
      spot: TPoint;
      t: Timer;
      tCol : TColEx;
    begin
      if (isBankOpen()) then
        exit;
      if (Interfaces[PINSCREEN].isVisible()) then
        inPin(P_PIN);
      tCol.create(1521211, 10, 0.08, 0.91);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
      begin
        if (isBankOpen()) then
        begin
          closeInterface();
          exit;
        end;
        world := randomWorld(true);
        changeWorld(world, false);
        exit;
      end;
      ATPA := FloodFillTPA(TPA);
      SortATPASize(ATPA, true);
      spot := middleTPA(ATPA[0]);
      customMouse(spot);
      sleep(20 + random(30));
      if (waitUptext('ald', 250)) then
      begin
        fastClick(MOUSE_RIGHT);
        waitOption('Bank', 300);
        I := getTimeRunning() + 3000 + random(1000);
        while (not isBankOpen()) and (getTimeRunning < I) do
          sleep(250 + random(200));
      end;
    end;
    
    function findAnyRaw(): Boolean;
    var
      I: Integer;
    begin
      result := false;
      for I := 0 to high(Raw_Array) do
      begin
        if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          currentFood := I;
          exit(true);
        end;
      end;
    end;
    
    procedure incVars();
    var
      xp: Integer;
    begin
      xp := xpTable[currentFood];
      stats_incVariable('78', xp);
    end;
    
    function getState(): Integer;
    begin
      if (getTimeRunning >= breakAfterTime) and (USEBREAKS) then
        exit(7);
      if (not isLoggedIn()) then
        exit(0);
      if ((getCurrentTab <> TAB_INV) and (not isBankOpen())) then
        exit(1);
      if (not findAnyRaw()) and (not isBankOpen()) then
        exit(5);
      if (not findAnyRaw()) and (isBankOpen()) then
        exit(6);
      if (findAnyRaw()) and (isBankOpen()) then
        exit(2);
      if (findAnyRaw()) and (not isBankOpen()) and (not waitForPixelShift(10, 3400, intToBox(MIX1, MIY1, MIX2, MIY2))) then
        exit(3);
      incVars();
      exit(4);
    end;
    
    procedure executeState(State: Integer);
    begin
      case (State) of
        0: setupPlayer();
        1: gameTab(TAB_INV);
        2: closeInterface();
        3: cookHandler();
        4: antiban();
        5: openBank();
        6: bankHandler();
        7: breakHandlerCustom();
      end;
      stats_Commit();
      sleep(Random(100, 200));
    end;
    
    begin
      declarePlayer();
      initAL();
      updater();
      setup();
      stats_setup('40');
      //stats_check;
      stats_initVariable('78', 0);
      repeat
        executeState(getState());
      until (false);
    end.

    This is the code that i used to fix the interface problems. I got 99 cooking recently with this code. Also thanks hoodz
    thanks! yea just use this version above since my version doesnt work anymore

  17. #92
    Join Date
    Dec 2016
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    grats on 99 cooking!!!

  18. #93
    Join Date
    Dec 2016
    Location
    Michigan, USA
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Does this script still work?

  19. #94
    Join Date
    Jul 2014
    Posts
    125
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by kyle12308 View Post
    Does this script still work?
    Read the other posts... or just download it yourself and see if it compiles?

    Quote Originally Posted by Hoodz View Post
    thanks! yea just use this version above since my version doesnt work anymore

  20. #95
    Join Date
    Dec 2016
    Location
    Michigan, USA
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Thx for this

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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