Results 1 to 5 of 5

Thread: problem...

  1. #1
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default problem...

    ok so ive got a problem, im having trouble consistently walking to the centre of this point.



    for some reason, i get it working, but only for about a day or so, ive added a large tolerance, and its not working, so sadly, im resorting for help.

    here`s what i have, and tell me how i can fix it to make it work consistently (and by me saying its not consistent, means that it wont find the ddtm all the time).

    SCAR Code:
    function TreeAC: Integer;
    var
      TPA: TPointArray;
      B: TIntegerArray;
      CTS, i, L: Integer;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MMCX, MMCY, TPA, 2249277, MMX1, MMY1, MMX2, MMY2, 45);
      B := GetColors(TPA);
      ClearSameIntegers(B);
      L := High(B);
      for i := 0 to L do
      begin
        Result := B[i];
        Break;
      end;
      ColorToleranceSpeed(CTS);
    end;

    function Altar: Integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [1..5] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 592;
      dtmMainPoint.y := 47;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 0;
      dtmMainPoint.Tolerance := 255;

      dtmSubPoints[1].x := 604;
      dtmSubPoints[1].y := 24;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := TreeAC;
      dtmSubPoints[1].Tolerance := 15;

      dtmSubPoints[2].x := 616;
      dtmSubPoints[2].y := 54;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := TreeAC;
      dtmSubPoints[2].Tolerance := 15;

      dtmSubPoints[3].x := 566;
      dtmSubPoints[3].y := 55;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := TreeAC;
      dtmSubPoints[3].Tolerance := 15;

      dtmSubPoints[4].x := 598;
      dtmSubPoints[4].y := 62;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := TreeAC;
      dtmSubPoints[4].Tolerance := 15;

      dtmSubPoints[5].x := 573;
      dtmSubPoints[5].y := 36;
      dtmSubPoints[5].AreaSize := 0;
      dtmSubPoints[5].AreaShape := 0;
      dtmSubPoints[5].Color := TreeAC;
      dtmSubPoints[5].Tolerance := 15;


      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;

    procedure Walk(var PathWalk: Integer);
    var
      I, X, Y: integer;
    begin
      RoadColor := FindFallyRoadColor;
      try
        Case PathWalk of
          0:
          begin
            if not WalkPath(0) then
              if not RadialWalk(FindWaterColor, 157, 218, 63, 5, 5) then
            begin
              LogOut;
              NextPlayer(False);
              WriteLn('Walking P.1 Failed');
            end;
          end;
          1:
          begin
            if not WalkPath(0) then
              if not RadialWalk(FindFallyRoadColor, 169, 212, 61, 5, 5) then
            begin
              LogOut;
              NextPlayer(False);
              WriteLn('Walking P.2 Failed');
            end;
          end;
          2:
          begin
            RoadColor := FindRoadColor;
            repeat
              RadialPath(False, FindRoadColor);
              Inc(I)
            until (I = 3);
          end;
          3: RadialWalk(FindRoadColor, 220, 290, 60, 5, 5);
          4:
          begin
            if not DTMRotated(Altar, X, Y, MMX1, MMY1, MMX2, MMY2) then //this is where it searches for the ddtm (duh)
            begin
              NextPlayer(False);
              WriteLn('Walking P.5 Failed');
            end else
            Mouse(X, Y, 5, 5, True);
            WriteLn('Walked To Altar');
          end;
      end;
      except end;
    end;

    help is appreciated, spam is not. and dont tell me obvious shit like "maybe try making the tolerance higher".

    and thanks to anyone who helps
    “Ignorance, the root and the stem of every evil.”

  2. #2
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    whats up with ur Tree AutoColor?

    SCAR Code:
    for i := 0 to L do
      begin
        Result := B[i];
        Break;
      end;

    Ur getting B[0] and then breaking... umm could that be the problem?
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  3. #3
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    B[0] is an array holding an integer. so B[0] could be 160394 or something, and it uses that color. I added a writeln, and it seems to get all the autocolors, then it just wont walk :/

    [offtopic] nice to talk to you again you need to go on irc more again[/offtopic]

    edit: woot im a KBD

    Edit2: Resolved thanks to mixster (and myles too i guess )
    “Ignorance, the root and the stem of every evil.”

  4. #4
    Join Date
    Oct 2008
    Posts
    500
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    what was the problem, Im having trouble implementing some ddtms in my scripts and I think this will help.

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well my auto color worked, but it was a tad shaky (mizster made me a better one ) and because i was using radial walk, and it wasnt walking to the same place everytime, i needed to add more to the area size, aswell as the tolerance of the first point. (area size 5, and tol 422 of the mainpoint).
    “Ignorance, the root and the stem of every evil.”

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Little Problem
    By 006786 in forum OSR Help
    Replies: 1
    Last Post: 12-23-2008, 08:02 PM
  2. help big problem
    By goblanca in forum OSR Help
    Replies: 3
    Last Post: 05-19-2007, 10:41 PM

Posting Permissions

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