Results 1 to 21 of 21

Thread: Whats wrong

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default Whats wrong

    Wrong version
    SCAR Code:
    Procedure Fm;
    var x, y:integer;

    Begin
      Addtoreport('Finding monsters');
      Wait(1000+random(500));//mol1 is color, same with mol2..mol6
      if (FindColorTolerance(x, y, Mo1, Msx1, Msy1, Msx2, Msy2, 10000))
      or (FindColorTolerance(x, y, Mo2, Msx1, Msy1, Msx2, Msy2, 10000))
      or (FindColorTolerance(x, y, Mo3, Msx1, Msy1, Msx2, Msy2, 10000))
      or (FindColorTolerance(x, y, Mo4, Msx1, Msy1, Msx2, Msy2, 10000))
      or (FindColorTolerance(x, y, Mo5, Msx1, Msy1, Msx2, Msy2, 10000))
      or (FindColorTolerance(x, y, Mo6, Msx1, Msy1, Msx2, Msy2, 10000))
      then
      begin
        Addtoreport('found color');
        MMouse(x,y,0,0);
        if (IsUpTextMultiCustom(['At','Ang'])) and (IsUpTextMultiCustom([Ml1,Ml2,ML3])) then
        begin
          Inc(cfed);
          Mouse(x,y,0,0,False);
          ChooseOption('At');
          Wait(random(3000));
        end;
      end else
      Ranc;
    End;
    Right version
    SCAR Code:
    Procedure Fm;
    var x, y:integer;

    Begin
      Addtoreport('Finding monsters');
      Wait(1000+random(500));//mol1 is color, same with mol2..mol6
      if (FindColorTolerance(x, y, Mo1, Msx1, Msy1, Msx2, Msy2, 10))
      or (FindColorTolerance(x, y, Mo2, Msx1, Msy1, Msx2, Msy2, 10))
      or (FindColorTolerance(x, y, Mo3, Msx1, Msy1, Msx2, Msy2, 10))
      or (FindColorTolerance(x, y, Mo4, Msx1, Msy1, Msx2, Msy2, 10))
      or (FindColorTolerance(x, y, Mo5, Msx1, Msy1, Msx2, Msy2, 10))
      or (FindColorTolerance(x, y, Mo6, Msx1, Msy1, Msx2, Msy2, 10))
      then
      begin
        Addtoreport('found color');
        MMouse(x,y,0,0);
        if (IsUpTextMultiCustom(['At','Ang'])) and (IsUpTextMultiCustom([Ml1,Ml2,ML3])) then
        begin
          Inc(cfed);
          Mouse(x,y,0,0,False);
          ChooseOption('At');
          Wait(random(3000));
        end;
      end else
      Ranc;
    End;
    Last edited by Main; 08-30-2009 at 08:49 PM.
    Oh Hai Dar

  2. #2
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your colors must be set wrong because that means x/y is 0,0.

    Edit: Try reducing the tolerance??

  3. #3
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I've never declared the x and y, when I put x:=MSCX; and y:=MSCY; it goes to the center.
    Sure, I'll reduce tolerance.
    Oh Hai Dar

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Fm;
     Var
      x, y: Integer;
    Begin
      Writeln('Finding monsters');
      Wait(1000 + Random(500));//mol1 is color, same with mol2..mol6
      If (FindColorTolerance(x, y, Mo1, Ms1, 0, Msx2, Msy2, 100000)) Or
        (FindColorTolerance(x, y, Mo2, Msx1, Msy1, Msx2, Msy2, 100000)) Or
        (FindColorTolerance(x, y, Mo3, Msx1, Msy1, Msx2, Msy2, 100000)) Or
        (FindColorTolerance(x, y, Mo4, Msx1, Msy1, Msx2, Msy2, 100000)) Or
        (FindColorTolerance(x, y, Mo5, Msx1, Msy1, Msx2, Msy2, 100000)) Or
        (FindColorTolerance(x, y, Mo6, Msx1, Msy1, Msx2, Msy2, 100000)) Then
      Begin
        Writeln('found color');
        MMouse(x, y, 0, 0);
        Wait(300 + Random(300));
        If (IsUpTextMultiCustom(['At', 'Ang'])) And
          (IsUpTextMultiCustom([Ml1, Ml2, ML3, ML4, ML5, ML6])) Then
        Begin
          Inc(cfed);
          Mouse(x, y, 0, 0, True);
          Wait(3000 + Random(3000));
        End;
      End Else
      Begin
      Writeln('Color not found');
      Ranc;//<- random compass
      End;
    End;

    If it says Color not found then its not that

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

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

    Default

    I don't know if this is right, but how did you declare the colors before that procedure?

    also, there could just be a color at 0,0 that is within 100000 tolerance of the color you're finding.

  6. #6
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    OMGG!!
    its
    FindColorsTolerance not FindColorTolerance...
    Oh Hai Dar

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

    Default

    Quote Originally Posted by Main_Ftw View Post
    OMGG!!
    its
    FindColorsTolerance not FindColorTolerance...
    No... FindColorsTolerance is just for multiple colors. I'm pretty sure there is FindColorTolerance also.

  8. #8
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Hmmm yeah, I got excited when I checked out the other scripts I have and they said "colors".

    The script still clicks on the edge(:

    It finds color, but then move the mouse to the edge.
    Oh Hai Dar

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

    Default

    How did you declare your colors?
    and did you try lowering the tolerance?

  10. #10
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Mo2 :=6514539;
    Mo3 :=6065218;
    Mo4 :=2120022;
    Mo5 :=2453392;
    Mo6 :=3494182;


    and yes..
    Oh Hai Dar

  11. #11
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    If (FindColorTolerance(x, y, Mo1, Ms1, 0, Msx2, Msy2, 100000)) Or

    Try

    SCAR Code:
    If (FindColorTolerance(x, y, Mo1, Msx1, Msy1, Msx2, Msy2, 100000)) or

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  12. #12
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I already fixed that msx1,msy1, unless you meant the captialization of the letter "o".(:
    Oh Hai Dar

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

    Default

    Quote Originally Posted by Main_Ftw View Post
    Mo2 :=6514539;
    Mo3 :=6065218;
    Mo4 :=2120022;
    Mo5 :=2453392;
    Mo6 :=3494182;
    did you declare those in another procedure/function as local variables?

  14. #14
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Update main post then

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  15. #15
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Yes, but they are in global variables
    Oh Hai Dar

  16. #16
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Main_Ftw View Post
    Mo2 :=6514539;
    Mo3 :=6065218;
    Mo4 :=2120022;
    Mo5 :=2453392;
    Mo6 :=3494182;


    and yes..

    You dont have Mo1 in that list?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  17. #17
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Its declared, just didn't past it.
    Oh Hai Dar

  18. #18
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var mo1. mo2. mo3. mo4. mo5. mo6, x, y:integer;

    Whats this??

    SCAR Code:
    var mo1, mo2, mo3, mo4, mo5, mo6, x, y:integer;

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  19. #19
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Nvm, they all work now.
    Oh Hai Dar

  20. #20
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Main_Ftw View Post
    Nvm, they all work now.
    Excuse you?.
    You ask for help but now its nevermind?.

    Post the solution / what fixed the problem

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  21. #21
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rogeruk View Post
    Excuse you?.
    You ask for help but now its nevermind?.

    Post the solution / what fixed the problem
    +1

    You always seems to hide your problem after it getting solved.
    Please don't do it. It's not a shame. Everyone does stupid things, asks about it then it gets solved.
    Someone may have the exact same problem, so he/she can just search, find it, solve it.
    Yeah, not everybody searches first, but lots of us. So give others a chance to find a solution without making the same thread again.

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
  •