Results 1 to 3 of 3

Thread: Crafting help

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Crafting help

    Can someone quickly help me? I need to know how many ms are inbetween clicking on the make all Green D'hide bodies button, and whtn the inv is done crafting. I'd do it myself, but I dont have the req'd crafting level.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    If you use something that will wait for a pixel change in your inventory, you don't need a static wait time. For example, I made a function that makes this fairly easy:

    Simba Code:
    function WaitPixelShift(Time, Min, Tol: Integer; Box: TBox): Integer;
    var
      Color: array[0..1] of TIntegerArray;
      hColor, Res, t, i: Integer;
    begin
      Result := 0;
      Color[0] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
      hColor := High(Color[0]);
      MarkTime(t);
      while (TimeFromMark(t) < Time) do
      begin
        Wait(100);
        Color[1] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
        Res := 0;
        for i := 0 to hColor do
        begin
          if SimilarColors(Color[0][i], Color[1][i], Tol) then
            Continue;
          Inc(Res);
        end;
        if (Res > Min) then
        begin
          Result := Res;
          Exit;
        end;
      end;
    end;

    function WaitPixelShiftEx(var Pixels: TIntegerArray; Time, Min, Tol: Integer; Box: TBox): Integer;
    var
      Color: array[0..1] of TIntegerArray;
      hColor, Res, t, i: Integer;
    begin
      Result := 0;
      if (Length(Pixels) = 0) then
      begin
        Color[0] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
        Pixels := Color[0];
      end else
        Color[0] := Pixels;
      hColor := High(Color[0]);
      MarkTime(t);
      while (TimeFromMark(t) < Time) do
      begin
        Wait(100);
        Color[1] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
        Res := 0;
        for i := 0 to hColor do
        begin
          if SimilarColors(Color[0][i], Color[1][i], Tol) then
            Continue;
          Inc(Res);
        end;
        if (Res > Min) then
        begin
          Result := Res;
          Exit;
        end;
      end;
    end;

    After clicking the craft-all option, you can do something like:

    Simba Code:
    CraftAll;
    if (WaitPixelShift(10 * 1000, 20, 1, InvBox(2)) <> 0) then
    begin
      while (WaitPixelShiftEx(Pixels, 1000, 20, 1, InvBox(28) = 0) do
      begin
        Wait(Random(500));
        //Antiban;
        //Whatever;
      end;
      Wait(500+Random(1000));
    end else
      //Failsafe;

    It will wait for more than 25 of the pixels in the second inventory slot to change, and if they do then it will wait until the pixels in the last inventory slot change. Just a suggestion, hope it helps

  3. #3
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    A simpler way would be to wait for the XP counter to change, I utilize that multiple times in my lumbridge script if you're interested.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

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
  •