Results 1 to 10 of 10

Thread: Need fail safe help.

  1. #1
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Need fail safe help.

    Ok so ill tell you my problem first.

    In my script im clicking the wilderness ditch using.

    Simba Code:
    if findObjCustom(x, y, ['ilderness wall'], [1843493], 30)then
      begin
        Mouse(x,y,4,4,true);
      end;

    It most of the time finds the wall and clicks it, but a lot of the time it miss clicks on a NPC or a tree, so i need someway of checking if the chracter as jumped over the ditch or is doing something else and then try to click the ditch again.

    Ive tried something like this before but it doesn't seem to work.

    Simba Code:
    if findObjCustom(x, y, ['ilderness wall'], [1843493], 30)then
      begin
        Mouse(x,y,4,4,true);
      end;
      if not findObjCustom(x, y, ['ilderness wall'], [1843493], 30)then
      begin
        MakeCompass('E');
        SetAngle(SRL_ANGLE_HIGH);
        findObjCustom(x, y, ['ilderness wall'], [1843493], 30)
        Mouse(x,y,4,4,true);
      end;

    But that only works as a fail safe if it doesn't find the colour and so then tries again.

    So to sum it up i need something to detect if it has not jumped over the ditch and is instead doing something else (attacking a npc, cutting a tree or is still).

    Thank for the help

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I suggest right-clicking and choosing the 'Jump' option (or whatever it is).

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    There are a few things you should do differently. First, use better up text.
    Simba Code:
    ['ilderness wall']
    to
    Simba Code:
    ['ilder', 'rness', 'ss wa']

    Secondly, do something like

    Simba Code:
    if SomeFunction then
    begin
    end else
    begin
    end;

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Your failsafe wasn't right in the first place.
    Should be like this:
    Simba Code:
    if findObjCustom(x, y, ['ilde', 'wall'], [1843493], 30)then
        Mouse(x,y,4,4,true)
    else
      begin
        MakeCompass('E');
        SetAngle(SRL_ANGLE_HIGH);
        findObjCustom(x, y, ['ilde', 'wall'], [1843493], 30)
        Mouse(x,y,4,4,true);
      end;

  5. #5
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    I suggest right-clicking and choosing the 'Jump' option (or whatever it is).
    Why didnt i think of that its so much simpler and more fail proof :/

    Simba Code:
    if findObjCustom(x, y, ['ilde', 'wall'], [1843493], 30)then    
      Mouse(x,y,4,4,true)
    else
      begin  
        MakeCompass('E');    
        SetAngle(SRL_ANGLE_HIGH);    
        findObjCustom(x, y, ['ilde', 'wall'], [1843493], 30)    
        Mouse(x,y,4,4,true);  
      end;
    Thanks ill try something like this but instead right click and choose jump

  6. #6
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    For checking wether you passed the wall or not, make the compass to north, and do some color checking under the middle in a fix position.

  7. #7
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by hunt3rx3 View Post
    For checking wether you passed the wall or not, make the compass to north, and do some color checking under the middle in a fix position.
    Hmm intriguing, I might experiments and test this out a bit. I could add this as an extra fail safe.

    Oh and how would you do a colour check on a fixed point on a screen to check if its [aaaaaa] and not [bbbbbb]?

  8. #8
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Don't check fixed points, very, very bot like, and unreliable. Just have it check the whole screen, more details, might be able to make a better fix.

  9. #9
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    Don't check fixed points, very, very bot like, and unreliable. Just have it check the whole screen, more details, might be able to make a better fix.
    How is it bot like to check wether u passed the ditch?

  10. #10
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by hunt3rx3 View Post
    How is it bot like to check wether u passed the ditch?
    He means checking in an exact position on the wall, that would be considered bot like. It would be better if you moved afew pixels around a centre point though, but i dont know how to do that yet :/

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
  •