Results 1 to 13 of 13

Thread: Finding Color and UpText

  1. #1
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Finding Color and UpText

    SCAR Code:
    procedure JumpStile;
    begin
       x := 389;
       y := 323;
       repeat
          FindColorTolerance(x,y,StileMS,6,3,510,337,5);
          MMouse(x,y,4,4);
       until (IsUpText('limb'));
       Mouse(x,y,5,5,true);
    end;

    I intended for it to find the stile (in the cabbage patch) along the fence.
    The whole thing is one color, so what it was supposed to do was:

    Find a color.
    If it's the stile, jump it.
    If not, find the next instance of the color.
    Until the stile is found.
    Loop if not found.

    Instead, it just hovers the mouse around one area (a bit too east of the stile), when I want it to mouse over all the pixels of that color.

    Help please.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Code:
    Function JumpStile :boolean;
    Var x,y :integer;
    begin
       x := 389;
       y := 323;
       repeat
          Wait(1+random(1))
          Until((FindColorTolerance(x,y,StileMS,6,3,510,337,5))
          if(FindColorTolerance(x,y,StileMS,6,3,510,337,5))then
          MMouse(x,y,4,4);
       if(isuptext('limb'))
       then
       begin
       Mouse(x,y,5,5,true);
       Result:=True;
       end
       else begin
       repeat
       JumpStile
       Until(Result)
    
    end;
    end:
    end;

    I am not home atm :S so no scar i use notebad so i am not sure does it compile :S :P

  3. #3
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i tried ur script for my problemm... I mean the ending bit to find text.. But it just doesnt seem to click on it.....

  4. #4
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, what I posted here is something I'm trying to get fixed, something broken. Why you are borrowing broken code is beyond me.

    But in general, what you do is
    Do
    FindColorTolerance
    -es until you get
    IsUpText
    something.

    If you want a more specific answer, I'd need to know what you were doing.

    My question still stands if anyone knows how to make it so I get the stile eventually, and not have FindColorTolerance just go around one area far away from the stile and keep MMouse-ing near there.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

  5. #5
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    After alot of editing this post try this:
    PHP Code:
    var StileMSInteger;
    {.include 
    srl/srl.scar}
    procedure JumpStile;
    begin
       x 
    := 389;
       
    := 323;
       
    StileMS:=3161928;
       
    repeat
          FindColorSpiral
    (x,y,StileMS,6,3,510,337);
          
    MMouse(x,y,4,4);
       
    until (IsUpText('limb'));
       
    Mouse(x,y,1,1,true);
    end;

    begin
    SetupSRL
    ;
    JumpStile;
    End
    It works 95% of the trials. just depends on if it finds the stile or the spot a bit to the right first.

  6. #6
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ironteapot us isuptextmulti('','','') for better finding
    ~jR

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Sorry i didn't get what you meaned :wink:


    EDIT:

    There

    SCAR Code:
    program dd;
    {.include srl/srl.scar}
    const StileMS = 2510442 ; //

    procedure JumpStile;
    begin
       x := 389;
       y := 323;
       repeat
       wait(10+Random(10))
          FindColorSpiral(x,y,StileMS,6,3,510,337);
          MMouse(x,y,0,0);
       if(IsUpTextMulti('C', 'limb', 'imb'))
       Then Mouse(x,y,1,1,false)
       Wait(200+Random(100))
       until(Chooseoption(x,y,'Climb'))
       end;


    begin
    SetupSRL;
    JumpStile;
    End.

  8. #8
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, wait. I left the word Spiral out. That may be it.
    (Just finished homework and going to meddle with the script now.)


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

  9. #9
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool, I hope I helped somewhat. Like you have helped me

  10. #10
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey! this might help me out also..thx guyz..

  11. #11
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Findboj pl0x?
    FindObj(cz,cy,'Text',Color,Toleracne)

  12. #12
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Put a wait between the "mouse" and the UpText.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  13. #13
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I never got FindObj to work, weirdly. It would mouse over the stile, but looked kinda undecided, because it kept moving around over it.

    Wizzup, I'll try that after homework.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. function FightNPCFindMob(Color:TintegerArray; tol: integer;Uptext:TStringArray): int
    By Lee Lok Hin in forum Research & Development Lounge
    Replies: 1
    Last Post: 04-15-2008, 12:02 AM
  2. can't find uptext based on color
    By Economic Advancement in forum OSR Help
    Replies: 1
    Last Post: 10-03-2007, 12:39 AM
  3. need help with finding the yellow uptext
    By RudeBoiAlex in forum OSR Help
    Replies: 4
    Last Post: 06-13-2007, 05:11 PM
  4. help with finding orange uptext
    By RudeBoiAlex in forum OSR Help
    Replies: 6
    Last Post: 05-21-2007, 06:18 PM
  5. Finding color in a box on MM?
    By hlstriker in forum OSR Help
    Replies: 7
    Last Post: 12-20-2006, 05:04 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
  •