Results 1 to 19 of 19

Thread: Spiral Mouse

  1. #1
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default Spiral Mouse

    Spiral Mouse

    By: Queso

    The Idea:

    Scar and SRL focus on getting around through color finding and images. It pays off, too; the most functional non-catchable bots are made here at these forums. However, the ability to find objects lies in coloring, and that is where botting can be caught off-guard, and get banned.

    My idea was to find other ways to locate objects without the use of colors. The only way I could think of (besides checking the .jar files like RSBot does) was by randomly moving the mouse around where you think the object is. But how does one go about accomplishing this without getting caught? The answer: the spiral.

    By calculating a spiral around your character, you can select points on the spiral to check. My goal is to offer fellow scripters the ability to use spirals as a mean to functionally find objects around their bots.

    Versions:

    v3.1
    +Procedure SprialMouseAngle: Made mouse smoother, faster, starts a bit away from your character. All-in-all awesome!
    +Procedure SprialMouseOutward: Also made mouse smoother and faster. A bit more practical for a failsafe now!
    +Procedure SpiralMouseRandom: Number of spirals made with mouse even more randomized!

    v3.0
    +Procedure SpiralMouseRandom: crazy new antiban works functionally!

    v2.0
    +Procedure SprialMouseAngle: works functionally
    +Procedure SprialMouseOutward: fixed going offscreen error

    v1.0
    +Procedure SpiralMouseOutward: works functionally
    +Procedure SpiralMouseAngle: in construction

    Reverse Unit Circle SpiralMouse Uses:



    Final Words:

    As always, feedback from testing is always great. Let me know if you use in your scripts, and tell me how well it works for your creations! If you feel that a procedure doesn't function to its potential, if you found a bug, or if you have an idea on how else these spirals can be used, please comment in this thread appropriately!

    Versions downloaded:

    SpiralMouse.scar v3.0 (7.4 KB, 4 views)
    SpiralMouse.scar v2.0 (5.0 KB, 6 views)
    SpiralMouse.scar v1.0 (2.7 KB, 19 views)
    Current Version: v3.1

  2. #2
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    looks nice, better than any of the functions I've ever made

    you might want to take a look at your standards though, they are a bit off in some places.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Nice idea!


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    you might want to take a look at your standards though, they are a bit off in some places.
    standards? mer? and how might they be off?

  5. #5
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure SpiralMouseOutward(UpText, Option: string; Distance: Extended);
    var
     a, b, angle, angleINC, r: extended;
     z, x, y, Pointx, Pointy, Mousex, Mousey: integer;
     WrapUp: boolean;
    begin
      a:= (random(3) * 1.571); //turns spiral randomly
      b:= (5 + (random(2) * 0.4)); //distance btw turnings
      angle:= (a + 0.524); //angle
      angleINC:= 0.785; //angle increment rate
      z:= 43; //number of times it creates a point , goes to 0
      WrapUp:= false; // ends loop
      r:= a + b * angle;
      x:= Round(r * cos(angle));
      y:= Round(r * sin(angle));
      z:= z - 1;
      repeat
        Pointx:= x + 256;
        Pointy:= y + 167;
        MMouse(Pointx,Pointy,5,5);
        wait(250 + random(150));
        if IsUpText(UpText) then
        begin
          GetMousePos(Mousex,Mousey);
          Mouse(Mousex,Mousey,0,0,false);
          wait(250 + random(150));
          ChooseOption(Option);
          WrapUp:= true;
        end;
        angle:= angle + angleINC;
        r:= a + b * angle;
        x:= Round(r * cos(angle));
        y:= Round(r * sin(angle));
        z:= z - 1;
        if InIntArray([28, 16, 0], z) then
        begin
          if z= 0 then
          begin
            WrapUp:= true;
          end;
          if angleINC = 0.524 then
          begin
            angleINC:= 0.393;
            angle:= 19.046;
          end else
          if angleINC = 0.785 then
          begin
            angleINC:= 0.524;
            angle:= 12.828;
          end;
        end;
      until(WrapUp = true);
    end;

  6. #6
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Ah, forgot SCAR programmin's got its own way of organizin. Please keep in mind I'm used to other languages. I'll try to stick to those standards.

  7. #7
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just a general rule of thumb for standards:

    • two spaces after each begin
    • one space after a var
    • don't capitalize bold words
    • capitalize all other words
    • two spaces after a case
    • two spaces after a repeat

  8. #8
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey not a bad idea very good infact ill be testing this see how i like oor not =)

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    just a general rule of thumb for standards:

    • one space after a var
    One space? It was always two
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  10. #10
    Join Date
    Oct 2006
    Location
    I'm also from Michigan!
    Posts
    563
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    I did this idea a while ago! I'll dig it up.

    SCAR Code:
    function findObjFast(var rx,ry:integer;uTs:Array of string;col,x1,y1,x2,y2,tol:integer):boolean;
    var
      i,rad,mx,my,cx,cy:integer;
      p:Array of Tpoint;
      pp:Array of Array of Tpoint;
    begin
      FindColorsSpiralTolerance(mscx,mscy,p,col,x1,y1,x2,y2,tol);
      pp:=TPAtoATPAEx(p,50,50);
      SortATPASize(pp,true);
      if length(pp)>0 then
      begin
        middleTPAex(pp[0],cx,cy);
        rad:=random(90);
        for i:=0 to 25 do
        begin
          mx:=round((i*3)*sine(rad))+cx;
          my:=round(-(i*3)*cose(rad))+cy;
          mmouse(mx,my,2,2);
          if isUptextMultiCustom(uTs) then
          begin
            getMousePos(mx,my);
            rx:=mx;
            ry:=my;
            result:=true;
            exit;
          end;
          rad:=rad+20;
        end;
      end;
      writeln('Object not found!');
      result:=false;
    end;

    yours looks real nice though

  11. #11
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by munk View Post
    I did this idea a while ago! I'll dig it up.

    SCAR Code:
    function findObjFast(var rx,ry:integer;uTs:Array of string;col,x1,y1,x2,y2,tol:integer):boolean;
    var
      i,rad,mx,my,cx,cy:integer;
      p:Array of Tpoint;
      pp:Array of Array of Tpoint;
    begin
      FindColorsSpiralTolerance(mscx,mscy,p,col,x1,y1,x2,y2,tol);
      pp:=TPAtoATPAEx(p,50,50);
      SortATPASize(pp,true);
      if length(pp)>0 then
      begin
        middleTPAex(pp[0],cx,cy);
        rad:=random(90);
        for i:=0 to 25 do
        begin
          mx:=round((i*3)*sine(rad))+cx;
          my:=round(-(i*3)*cose(rad))+cy;
          mmouse(mx,my,2,2);
          if isUptextMultiCustom(uTs) then
          begin
            getMousePos(mx,my);
            rx:=mx;
            ry:=my;
            result:=true;
            exit;
          end;
          rad:=rad+20;
        end;
      end;
      writeln('Object not found!');
      result:=false;
    end;

    yours looks real nice though
    Looks interesting, I'll have to test that out, and possibly use your example to broaden my ideas on using curves.

  12. #12
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Looks interesting, I'll have to test that out, and possibly use your example to broaden my ideas on using curves.
    Queso americano! i love it XD ..

    But i like the idea and its very well written

  13. #13
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Righto, I was workin on my second procedure during work today (I work at Target btw...respect the workers!) and since it was my first time programming on paper at work, I thought I'd share the moment with you:





    I got bored by the end of my last break ... lol.

    EDIT: Oh, aren't my feetsies cute?

  14. #14
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    -=v2.0 complete=-

    Though now that I have knowlege of TPA's and how to use them, and learned that other scripters are learning how to use in-game java variables to find things, these scripts seem really ... outdone?

    I might not continue this experiment much further, though I may make the current procedures more flexible for the users, such as allowing people to increase/decrease number of points on each rotation.

  15. #15
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    We should promote Queso to member
    ~ Metagen

  16. #16
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    -=v3.0 complete=-

    Thought of an amazing antiban idea, and I decided to whip it up real quick. Though it only took 15 minutes to produce, it's ability to make humanlike mouse movements is amazing!

    If you use it in your antiban, lemme know! Not that I want credit, but mostly because I would love to see it in action more!

  17. #17
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok i tried the first function, works nicely except for some reason on the third ring at -45 it skips down 180 degrees.?

    spiralmouseangle just kindof hovers it ove rmy head?
    ~ Metagen

  18. #18
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    Ok i tried the first function, works nicely except for some reason on the third ring at -45 it skips down 180 degrees.?

    spiralmouseangle just kindof hovers it ove rmy head?
    I knew the first error, I kinda just got lazy with the angle increments. I might make the mouse movements more smooth.

    What imputs did you use for SpiralMouseAngle?

  19. #19
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    -=v3.1 complete=-

    I made the mouse movements in SpiralMouseOutward and SpiralMouseAngle more like SpiralMouseRandom's, making it nice and smooth.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find Text Spiral
    By Brett_bs in forum OSR Help
    Replies: 2
    Last Post: 04-12-2008, 05:35 AM
  2. mouse help.
    By Junior in forum OSR Help
    Replies: 9
    Last Post: 02-04-2007, 09:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •