Results 1 to 11 of 11

Thread: mouse over randomly

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default mouse over randomly

    how do you make your mouse hover randomly ?
    Oh Hai Dar

  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    MouseBox(MSX1, MSY1, MSX2, MSY2);

    thats mainscreen

    SCAR Code:
    MouseBox(MiX1, MiY1, MiX2, MiY2);//inventory
    MouseBox(McX1, McY1, McX2, McY2);//chat
    Project: Welcome To Rainbow

  3. #3
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    SleepAndMoveMouse(TimeInMs: integer);

    This will move your mouse random in the time you set. I love it

  4. #4
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    how do I use them thou? do I just call them as a procedure? (not sure what to do with the last one too)
    MouseBox(MiX1, MiY1, MiX2, MiY2);
    MouseBox(McX1, McY1, McX2, McY2);
    MouseBox(MSX1, MSY1, MSX2, MSY2);
    SleepAndMoveMouse(TimeInMs: integer);
    Oh Hai Dar

  5. #5
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    woah, masterkill

    never seen that one before, thx!


    SCAR Code:
    case(Random(3))of
      0: MouseBox(MiX1, MiY1, MiX2, MiY2);
      1: MouseBox(McX1, McY1, McX2, McY2);
      2:  MouseBox(MSX1, MSY1, MSX2, MSY2);
    end;

    im not sure of last either
    Project: Welcome To Rainbow

  6. #6
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    That didn't work thou...
    Oh Hai Dar

  7. #7
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {.include srl/srl.scar}

    Begin
      SetupSrl;
      SleepAndMoveMouse(10000);
    End.

  8. #8
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    SCAR Code:
    case(Random(3))of
      0: MMouse(MIX1, MIY1, MIX2, MIY2);
      1: MMouse(MCX1, MCY1, MCX2, MCY2);
      2: MMouse(MSX1, MSY1, MSX2, MSY2);
    end;

    I think withg MouseBox you need to do (x1, y1, x2, y2, 1) or 2 (where the one is) becuase it is used to click.

  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    We should make SleepAndMoveMouseIn ^^
    Ce ne sont que des gueux


  10. #10
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    procedure SleepAndMoveMouse(Time: Integer);
    By: RSN
    Description: Waits for specified time and moves mouse around like bored human would.
    *******************************************************************************}


    procedure SleepAndMoveMouse(Time: Integer);
    var
      Moving: Boolean;
      mx, my: Integer;
      x, y, xv, yv: Extended;
      gx, gy: Extended;
      T: Integer;
    begin
      GetMousePos(mx, my);
      x := mx;
      y := my;
      if (Random(2) = 0) then
        Moving := False
      else
        Moving := True;
      gx := 130 + Random(500);
      gy := 130 + Random(300);
      T := GetTickCount;
      repeat
        Sleep(10);
        if (Moving) then
        begin
          if (gx > x) then
            xv := xv + 0.1
          else
            xv := xv - 0.1;
          if (gy > y) then
            yv := yv + 0.1
          else
            yv := yv - 0.1;
          x := x + xv;
          y := y + yv;
          MoveMouse(Round(x), Round(y));   //this line
        end;
        if (Random(100) = 0) then
          Moving := not Moving;
        if (Random(30) = 0) then
        begin
          gx := 130 + Random(500);
          gy := 130 + Random(300);
        end;
      until (Abs(GetTickCount - T) >= Time);
    end;


    woudln't be hard, would just have to change the line I highlighted, and add var's to the function for where you want to mouse in. It would be the tiniest amount of edits, I could probably do it, I don't see why not. Looks simple enough.

    EDIT: procedure SleepAndMoveMouseIn(Time, x1, y1, x2, y2: Integer);

    then on the highlighted line:

    SCAR Code:
    x3 := x2-x1    //takes where you want to mouse in for the random to add onto x
    y3 := y2-y1   //same but with y-coord
    MMouse(x1, y1, x3, y3);  //mmouse's in the box

    should work, but you'll probably have lots of extra uneeded stuff for the MoveMouse.

    EDIT: I made this just for you Floor66 . Anyone wanna test this out?

    SCAR Code:
    {*******************************************************************************
    procedure SleepAndMMouseIn(Time, x1, y1, x2, y2: Integer);
    By: RSN and Baked0420
    Description: Waits for specified time and moves mouse in coords you give originally
                 from RSN's SleepAndMoveMouse.
    *******************************************************************************}


    procedure SleepAndMMouseIn(Time, x1, y1, x2, y2: Integer);
    var
      Moving: Boolean;
      x3, y3: Integer;
      T: Integer;
    begin
      if (Random(2) = 0) then
        Moving := False
      else
        Moving := True;
      T := GetTickCount;
      repeat
        Sleep(10);
        if (Moving) then
        begin
          x3 := x2 - x1;
          y3 := y2 - y1;
          MMouse(x1, y1, x3, y3);
        end;
        if (Random(100) = 0) then
          Moving := not Moving;
      until (Abs(GetTickCount - T) >= Time);
    end;

  11. #11
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    is there a way to check if a prayer exisit without using some of the other prayer function? because..
    SCAR Code:
    {*******************************************************************************
    function PrayerActivated(Name: string): Boolean;
    By: Nielsie95
    Description: Returns true if the prayer is activated.
    *******************************************************************************}

    function PrayerActivated(Name: string): Boolean;
    var
      p: TBox;
      c, x, y: Integer;
    begin
      if (not GetPrayerCoords(Name, p, c)) or (not PrayerExists(Name)) or (not LoggedIn) then
        Exit;
      Result := FindColorTolerance(x, y, 7451338, p.x1 -10, p.y1 -5, p.x2 +7, p.y2 +5, 10);
    end;
    Oh Hai Dar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Scar Randomly closes
    By Rizowski in forum OSR Help
    Replies: 4
    Last Post: 06-10-2008, 08:02 PM
  2. randomly choose, help me.
    By OpenHearts in forum OSR Help
    Replies: 4
    Last Post: 01-03-2008, 10:20 PM
  3. Randomly Royal..
    By The Prince of Randomness? in forum Who Are You ? Who ? Who ?
    Replies: 2
    Last Post: 02-23-2006, 07:46 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
  •