Results 1 to 23 of 23

Thread: Need Help WIth Bot actually CLICKING

  1. #1
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default Need Help WIth Bot actually CLICKING

    Hi guys,

    Current Questions: How to get the script to wait until a new ore appears in the inventory before clicking another rock and best method of walking.

    I have tried using findobjcustom and am now using tpas and both have accurately found the object, but for some reason it won't click in either one! Can someone please explain to me what I'm doing wrong? Thanks SO much!

    Simba Code:
    program new;
    {$i SRL/SRL.simba}
    {$i P07Include.simba}   //Thanks Danny!

    procedure Antiban;
    begin
      case random(200) of
      1: P07_HoverSkill('fishing', RandomRange(1000, 2000));
      2: P07_HoverSkill('random', RandomRange(500, 2000));
      3: P07_MakeCompassDegree(RandomRange(97, 107));
      4: P07_MakeCompassDegree(RandomRange(229, 286));
      5: MMouse(random(400), random(300), 0, 0);
      end;
    end;

    procedure MineRock;
    var
      RockTPA: TPointArray;
      MyPoint: TPoint;
      x, y, i, tmpCTS: integer;
    begin
      tmpCTS := GetToleranceSpeed;         //Thanks for the tut Footy!

      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.03, 0.35);
      FindColorsSpiralTolerance(P07_MSCX, P07_MSCY, RockTPA, 2437715, P07_MSX1, P07_MSY1, P07_MSX2, P07_MSY2, 6);     //Dusk's TPA tutorial
      // if Length(RockTPA) = 0 then FindColorsSpiralTolerance(P07_MSCX, P07_MSCY, RockTPA, 2437715, P07_MSX1, P07_MSY1, P07_MSX2, P07_MSY2, 6);  In case I need to add another color
      SetColorToleranceSpeed(tmpCTS);
      SetToleranceSpeed2Modifiers(0.02, 0.02);
      for i :=0 to High(RockTPa) do
      begin
        MyPoint := RockTPA[i]    //not exactly sure what this one does
        MMouse(MyPoint.x, MyPoint.y, 5, 5);
        if (P07_IsUpTextMultiCustom(['ine', 'roc'])) then
        begin
          ClickMouse2(1)
          Wait(1000 + random(2000)); //how do I get it to just wait until the rock is mined?
          Exit;
        end;
      Wait(500 + random(1000));
      end;
    end;




    begin
      SetupSRL;
      SetupP07Include;
      MineRock;
    end.
    Last edited by Xeronate; 03-02-2013 at 09:19 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Don't setupsrl;

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Don't setupsrl;
    That actually worked. Can you please explain to me why I shouldn't setupSRL? I thought I had to do that every script? Don't I have t do that to use any of the SRL includes? Also, someone on irc told me to use "SRL_EnableNavBar;" and that worked too. Any description? Thanks!

  4. #4
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    It's the ocr filter messing up my Include GetUpText (I think?), only happens for some users I think, I'm sorry but I'm not smart enough to change filter settings! Theres a fix coming from someone much smarter soon!

    Edit - the NavBar thing is because of the Menu bar at the top of the official game, it offsets the screen co-ordinates by 50 pixels down, the oldschool game does not have this bar built into the game client, so it's no longer needed, but SetupSRL; still has it, will be fixed soon
    Last edited by DannyRS; 03-02-2013 at 08:15 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  5. #5
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    That actually worked. Can you please explain to me why I shouldn't setupSRL? I thought I had to do that every script? Don't I have t do that to use any of the SRL includes? Also, someone on irc told me to use "SRL_EnableNavBar;" and that worked too. Any description? Thanks!
    I have no idea sorry lol

    edit2: what danny said

    Creds to DannyRS for this wonderful sig!

  6. #6
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    I have no idea sorry lol

    edit: setupsrl; contains functions to load smart and so on. Don't know exactly what.
    I was under the impression Navbar was only called if using {Define Smart} (atleast when I had a look through SetupSRL), maybe I should try calling it in my Include regardless? I have no idea why mine doesn't cause any of this


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  7. #7
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    I was under the impression Navbar was only called if using {Define Smart} (atleast when I had a look through SetupSRL), maybe I should try calling it in my Include regardless? I have no idea why mine doesn't cause any of this
    Seems this gets called SRL_ResetNavBar;
    Is this the troublemaker?

    Creds to DannyRS for this wonderful sig!

  8. #8
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Thanks for the help so far! Now onto improvements. For banking do you guys suggest DTMs, radialwalk, or other?

  9. #9
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Seems this gets called SRL_ResetNavBar;
    Is this the troublemaker?
    Yes thats a problem! Maybe it's not the OCR Filter after all!!

    Edit - Banking I'd look into TPA, because the colors change so badly on the MM in 07, radialwalk is set to official rs atm I think?


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  10. #10
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    Thanks for the help so far! Now onto improvements. For banking do you guys suggest DTMs, radialwalk, or other?
    if u mean walking: DDTM's, tpawalking, colorclicking, coordclicking. There is also an unofficial SPS: check Unofficial Development.

    Creds to DannyRS for this wonderful sig!

  11. #11
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Yeah I mean walking. So no radial walking? Darn that's what I started learning.

  12. #12
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    Yeah I mean walking. So no radial walking? Darn that's what I started learning.
    U gotta modify it I think. Since it uses MMx1 etc...
    Shouldn't be hard though

    Creds to DannyRS for this wonderful sig!

  13. #13
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Well if I use P07_MMX1 it should be ok right? (that is in the include)

  14. #14
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    Well if I use P07_MMX1 it should be ok right? (that is in the include)
    Should be, Idk how it works fully though, worth a shot maybe


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  15. #15
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Should be, Idk how it works fully though, worth a shot maybe
    Well I'm using them in the colorfinder I posted and it seems to be searching pretty well. Off to making this banking function! Even though that means I have to pick a specific spot to mine.

  16. #16
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    Well if I use P07_MMX1 it should be ok right? (that is in the include)
    yosh

    Creds to DannyRS for this wonderful sig!

  17. #17
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Ok, now how about getting the script to wait just until a rock has been mined? Do people usually do that with pixelshift or pbox?
    Last edited by Xeronate; 03-02-2013 at 08:48 AM.

  18. #18
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    U could use pixelshift detection so u know your char Is Mining. That's up to you.

    Simba Code:
    ClickMouse(1)
    InvNow := P07_Invcount + 1;
    TimeFromMark(JustInCase)
    repeat
     Wait(500)
     Antiban;  // Make one of your own, dont wanna get banned :p
    until((P07Invcount = InvNow) or (TimeFromMark(JustInCase) > (10000));
    The Time Marking is a failsafe so it doesn't get in an infinite loop.

    I don't know if P07_InvCount exists lol. I don't play 07

    Creds to DannyRS for this wonderful sig!

  19. #19
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    U could use pixelshift detection so u know your char Is Mining. That's up to you.

    Simba Code:
    ClickMouse(1)
    InvNow := P07_Invcount + 1;
    TimeFromMark(JustInCase)
    repeat
     Wait(500)
     Antiban;  // Make one of your own, dont wanna get banned :p
    until((P07Invcount = InvNow) or (TimeFromMark(JustInCase) > (10000));
    The Time Marking is a failsafe so it doesn't get in an infinite loop.

    I don't know if P07_InvCount exists lol. I don't play 07
    It does, but I think the accuracy of all the inventory functions are a bit questionable haha

    and

    Simba Code:
    procedure Antiban;
    begin
      case random(200) of
      1: P07_HoverSkill('fishing', RandomRange(1000, 2000));
      2: P07_HoverSkill('random', RandomRange(500, 2000));
      3: P07_MakeCompassDegree(RandomRange(97, 107));
      4: P07_MakeCompassDegree(RandomRange(229, 286));
      5: MMouse(random(400), random(300), 0, 0);
      end;
    end;

    zomg at DDTMS: http://villavu.com/forum/showthread.php?t=10008
    Last edited by Xeronate; 03-02-2013 at 08:56 AM.

  20. #20
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    The accuracy of my inv functions should be fine (didn't spend as much time as I should have, but working none the less) maybe the navbar was messing that up too?


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  21. #21
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Could very well be. I'm not trying to slander your include by any means. It is very useful! It will probably take me a while to figure out how to walk though so won't be testing your inventory methods for a while.

  22. #22
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Xeronate View Post
    Could very well be. I'm not trying to slander your include by any means. It is very useful! It will probably take me a while to figure out how to walk though so won't be testing your inventory methods for a while.
    Haha don't worry, people bashing things helps the creators improve them (it actually is a great help) I'm glad I've been able to somewhat give us a quick rough Jump start into 07 scripting

    Let me know how your results turn out with walking, I'm interested to find a good solid method myself
    Last edited by DannyRS; 03-02-2013 at 09:06 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  23. #23
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Haha don't worry, people bashing things helps the creators improve them I'm glad I've been able to somewhat give us a quick rough Jump start into 07 scripting

    Let me know how your results turn out with walking, I'm interested to find a good solid method myself
    xtrapsp says DDTM works very well

    Creds to DannyRS for this wonderful sig!

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
  •