Results 1 to 15 of 15

Thread: not working

  1. #1
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default not working

    Ok, i've narrowed it down so I know that the problem is in the FindAndChop procedure. It compiles, but it doesn't find a tree like it is supposed to look for. I thought that findobj was supposed to make circles with the mouse until it found what it was looking for, but this just makes the mouse go to the top left corner. I've spent a lot of time trying to fiddle with things to get it to work, but I don't know how. Help please.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL\SRL\skill\Woodcutting.scar}

    var
    c,c2,r,t:integer;

    procedure FindAndChop;
    begin
    FindObj(x,y,'Tree',3303512,10)
         mouse(x,y,1,1,false);
      if (FindText(x,y,'Chop',UpChars,0,0,514,336))then
        begin
        ClickText('Chop',0,0,516,335)
        end;
    end;

    begin
    setupSRL;
    LoadChars('');
    activateclient;
    wait(2000+random(1000));
    FindAndChop;
    end.

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

    Default

    This should work
    SCAR Code:
    procedure FindAndChop;
    begin
      if (FindObj(x, y, 'Tree', 3303512, 10)) then
        Mouse(x, y, 1, 1, false);
      if (FindText(x, y, 'Chop', UpChars, 0, 0, 514, 336)) then
        ClickText('Chop', 0, 0, 516, 335);
    end;

  3. #3
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tehre ya go- not sure if it will work but it compiles

    SCAR Code:
    program New;
     {.include SRL/SRL.scar}
      {.include SRL\SRL\skill\Woodcutting.scar}

    var
     c,c2,r,t:integer;

    procedure FindAndChop;
     begin
      if(FindObj(x,y,'Tree',3303512,10)) then// use if(findObj)
       begin
        mouse(x,y,0,0,false);
       wait(300+random(100));
      ChooseOption(x,y,'hop')
     end;
    end;

    begin
     setupSRL;
      LoadChars('');
       activateclient;
      wait(2000+random(1000));
     FindAndChop;
    end.
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  4. #4
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Junior! nooo i wanted to help him =p haha i wouda posted first 2 but i accidently pressed window-c and deleted the whole script in scar -.- so i had to write it again lol
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks!

  6. #6
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  7. #7
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Color change?


  8. #8
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OMG! I just logged on this morning, I have not changed a single thing, and it isn't working again! I reset the colors, and even set the tolerance all the way up to 100 but it isn't doing findobj properly again.
    Someone please explain what is going on!! Please!

  9. #9
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by omgh4x0rz View Post
    I have not changed a single thing
    Why would it work this time if you haven't changed a single thing? So all you've done to try to make it work is change the colors and tolerance?

    the reason it isnt working is because you did
    SCAR Code:
    FindObj(x,y,'Tree',3303512,10)
    instead of
    SCAR Code:
    if(FindObj(x,y,'Tree',3303512,10))then
    however, junior already fixed that for you, so if you just used what he posted, it would work

  10. #10
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Umm, no. I did fix what Junior said, and then it was working last night.
    Then this morning, it isn't.

  11. #11
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry, I completely misunderstood what you said... Now are you having the same problem as before where the mouse goes to the top left corner, or is it doing something different this time?

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

    Default

    Try making an array of new colors, maybe it cant find the color.

  13. #13
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ya arrays tend to work better.. have u tryed what i posted? that should work..
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  14. #14
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, I tried Syberium's and Junior's. I just got it working again, I believe it is something with the colors? Can anyof you explain what I would do for a color array?

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

    Default

    If you want to learn how to make arrays, this tutorial/link taught me everything there is.
    http://www.moparisthebest.com/smf/in...c,10974.0.html

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. is srl working yet.
    By th3ko in forum NOTA
    Replies: 2
    Last Post: 10-20-2008, 08:06 PM
  2. ~~~~Working Edge cooker WORKING~~~
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 10-29-2007, 11:16 PM
  3. [Working on].:Autoseller:.[/Working on]
    By dritar in forum First Scripts
    Replies: 10
    Last Post: 10-07-2007, 06:13 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
  •