Results 1 to 5 of 5

Thread: Error,Walk when not suppose to...

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Error,Walk when not suppose to...

    I am currently having a weird problem. The problem is that when it doesn't find a rock for I think about like 10 seconds, it thinks that the inventory is full and starts to walk to the bank when the inventory isn't full.
    Can someone Please help?
    Thanks
    ~BoBO
    ALL help would be repped
    This is the part of the script:
    SCAR Code:
    function FindOres(var tx, ty: Integer):boolean; //Made by Me :)...
    var
      i: integer;
      IronPoints: TPointArray;
      Iron2D : T2DPointArray;
      IronPoint : TPoint;
    begin
      if not LoggedIn then exit;
      x:= MSCX;
      y:= MSCY;
      begin
        FindColorsSpiralTolerance(tx,ty,IronPoints,2832993,MSX1,MSY1,MSX2,MSY2,7);
        Iron2D:= TPAtoATPAEx(IronPoints,3,3);
        for i:= 0 to length(Iron2D)-1 do
        begin
          if not LoggedIn then exit;
          Ironpoint:= MiddleTPA(Iron2D[i]);
          tx:= IronPoint.X;
          ty:= IronPoint.Y;
          MMouse(tx,ty,2,2);
          wait(90+random(50));
          if isuptext('ine')then
          begin
            GetMousePos(tx,ty);
            result:= true;
            Exit;
          end else Continue;
        end;
      end;
    end;

    procedure MinedaRock;
    var
      i, MiningTime : Integer;
      Blacktext : string;
    begin
      MakeCompass('N');
      SetAngle(True);
      SetRun(True);
      if Pickaxeuse ='rune' then
      begin
        WaitPerRock :=(3000+ random(500));
      end;
      if Pickaxeuse ='addy' then
      begin
        WaitPerRock :=(4000+ random(500));
      end;
      if Pickaxeuse ='mith'then
      begin
        WaitPerRock :=(6000+ random(500));
      end;
      if Pickaxeuse ='steel'then
      begin
        Writeln('Try to use a better pickaxe');
        WaitPerRock :=(8000+ random(500));
      end;
      if Pickaxeuse ='iron'then
      begin
        Writeln('Are you serious? an Iron pickaxe, come back with at least a steel pickaxe');
        Logout;
        NextPlayer(false);
        exit;
      end;
      if Pickaxeuse='bronze'then
      begin
        Logout;
        Writeln('LOL, noob get at LEAST a steel pickaxe');
        Nextplayer(false);
        exit;
      end;
      for i := 0 to 2 do
      repeat
        if Not(LoggedIn) then exit;
        Myrandom;
        FindGas;
        if not FindOres(x, y) then
        begin
        Trys:= 0;
        repeat
          Trys := Trys + 1;
          wait(50+ random(20));
          if Trys > 30 then exit;
        until FindOres(x, y);
        end else
        Mouse(x,y,2,2,True);
        MarkTime(MiningTime);
        Wait(1500+ random(250));
        Myrandom;
        FindGas;
        repeat
          BlackText := GetBlackChatMessage;
          if (getcolor(486, 384) = 0) then
          Wait(250+Random(300));
        until (Pos('anage', BlackText) <> 0) or (Pos('vailable', BlackText) <> 0) or (TimeFromMark(MiningTime) > (WaitperRock +random(250))); // this is not an endless loop because it has mark time used..
      until (InvFull);
      if not(InvFull) then
      begin
        MinedaRock;
      end else
      begin
        writeln( 'Inventory Full walking to bank.' );
      end;
    end;

    Note: I tried to fix the problem as you can see by putting "if not InvFull" but that didn't work so can someone give me a solution?

  2. #2
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    can someone answer please?

  3. #3
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok this is basically what may be happening
    SCAR Code:
    begin
        Trys:= 0;
        repeat
          Trys := Trys + 1;
          wait(50+ random(20));
          if Trys > 30 then exit;

    Maybe if by exiting then it is going to the bank...
    Idk Maybe after trys:=Trys+1; put writeln('Tries = InttoStr(Tries)')
    I am not sure if that inttostr would even work. You could just put Writeln('Missed one'); or something like that.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Try this at the bottom bit:

    SCAR Code:
    if not FindOres(x, y) then
      Repeat
        Wait(2000+Random(3000))
      Until(FindOres(x,y))

    Just a suggestion

  5. #5
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i think
    if not(InvFull) then
    begin
    MinedaRock;
    end else
    get rid of that and put a main loop call minedarock in a main loopi dont htink calling itself will be very healthy lol
    Blank!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. which walk should i use?
    By TheChineseMan in forum OSR Help
    Replies: 4
    Last Post: 05-19-2008, 01:36 PM
  2. How to walk using map
    By nik999389 in forum OSR Help
    Replies: 3
    Last Post: 03-26-2007, 07:34 AM

Posting Permissions

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