Results 1 to 4 of 4

Thread: How do I tell my script to pick a random FindColorSpiralTolerance

  1. #1
    Join Date
    Mar 2013
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default How do I tell my script to pick a random FindColorSpiralTolerance

    How do I tell my Script to pick a random if FindColorSpiralTolerance then from a list

    I got a feeling adding Random or RandomRange somewhere would do the trick.

    Example:

    Simba Code:
    procedure Help;

    var
      x, y : integer;

      Color1, Color2, Color3, Color4, Color5, Color6 : integer;

    begin

    if  FindColorSpiralTolerance( x, y, Color1, 359, 172, 408, 254, 10) or
        FindColorSpiralTolerance( x, y, Color2, 359, 172, 408, 254, 10) or
        FindColorSpiralTolerance( x, y, Color3, 359, 172, 408, 254, 10) or
        FindColorSpiralTolerance( x, y, Color4, 359, 172, 408, 254, 10) or
        FindColorSpiralTolerance( x, y, Color5, 359, 172, 408, 254, 10) or
        FindColorSpiralTolerance( x, y, Color6, 359, 172, 408, 254, 10) then
        begin
        MoveMouse( x, y);
        end;
    end;
    Last edited by rsbots2013; 05-25-2013 at 10:33 AM.

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by rsbots2013 View Post
    How do I tell my Script to pick a random if FindColorSpiralTolerance then from a list
    Could use something like:

    Simba Code:
    procedure Help;

    var
      x, y : integer;

      r, Colour, Color1, Color2, Color3, Color4, Color5, Color6 : integer;

    begin
      r := random(5);

     case r of
        0: Colour := Color1;
        1: Colour := Color2;
        2: Colour := Color3;
        3: Colour := Color4;
        4: Colour := Color5;
        5: Colour := Color6;
     end;

     If FindColorSpiralTolerance(x, y, Colour, 359, 172, 408, 254, 10) then
      MoveMouse( x, y);
    end;

  3. #3
    Join Date
    Mar 2013
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Thank you. Just to update you Mayor on what I been up to. From what I've learnt from you and some others like Sjoe and YOHOJO. I have finally made myself my very own working Gnome Agility bot! It's really newby at how it flows tho. It gets stuck a lot and I got to constantly stop script and start it again. But it's now actually done 3 loops in a row without stopping the script! This is really great for me. MANY MANY thanks!

    Quote Originally Posted by The Mayor View Post
    Could use something like:

    Simba Code:
    procedure Help;

    var
      x, y : integer;

      r, Colour, Color1, Color2, Color3, Color4, Color5, Color6 : integer;

    begin
      r := random(5);

     case r of
        0: Colour := Color1;
        1: Colour := Color2;
        2: Colour := Color3;
        3: Colour := Color4;
        4: Colour := Color5;
        5: Colour := Color6;
     end;

     If FindColorSpiralTolerance(x, y, Colour, 359, 172, 408, 254, 10) then
      MoveMouse( x, y);
    end;

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

    Default

    Quote Originally Posted by rsbots2013 View Post
    Thank you. Just to update you Mayor on what I been up to. From what I've learnt from you and some others like Sjoe and YOHOJO. I have finally made myself my very own working Gnome Agility bot! It's really newby at how it flows tho. It gets stuck a lot and I got to constantly stop script and start it again. But it's now actually done 3 loops in a row without stopping the script! This is really great for me. MANY MANY thanks!
    nice job Scripting takes practice! You pick up new stuff here and there from tutorials/people's script and suggestions.

    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
  •