Results 1 to 8 of 8

Thread: abyss bugs

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default abyss bugs

    Date: 4-22

    Public/Development: dev
    Revision #: 32

    Debug Text: Line 226: [Error] (14227:4): Unknown identifier 'SpiralMouse' in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/AntiRandoms/Abyss.scar


    File Involved (if known): antirandoms, abyss

    Screen Shots (if applicable):

    scar stopped working atm, so i'll try out more when i can
    Last edited by Awkwardsaw; 04-23-2009 at 07:01 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Hmm, can you paste your SRL.scar? Mouse.scar SHOULD be included before Abyss.scar...

    Might be 3.20 though.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    spiralmouse just isnt in any of my includes, or scar help folder.

    also, mouse is before antirandoms

    one more thing, the antirandoms include was after all the other antirandom things, so thats probobly why the others didnt work(beekeeper)

    SCAR Code:
    //----------------------------------------------------------------------------//
    //--                    Scar Standard Resource Library                      --//
    //----------------------------------------------------------------------------//
    //-- by: Azeroth, Bebe, BenLand100, benleegt, Boreas, c0de,                 --//
    //--   Cheesehunk, dakota, Dankness, driger1592, Flyboy, Freddy1990,        --//
    //--   Hobbit, inferno, Kernel Klink, Knightstreak, Krazy_Meerkat,          --//
    //--   Krichevskoy, Liquid, Lorax, Mad Cow, Markus, masquerader,            --//
    //--   mastaraymond, moparisthebest, Mutant Squirrle, n3ss3s nielsie95,     --//
    //--   phantombmx, pups, Pyro, RAM, realrune, Renax, Ron, RsN,              --//
    //--   SKy Scripter, solemn wishes, Spky, SRL, Starblaster100, S            --//
    //--   tupid3ooo, Sumilion, tarajunky, The Claw, The_Rs_Monkey, Zephyrsfury --//
    //--   Wizzup?, WT-Fakawi, XxKanexX, Yakman, YoHoJo, _ChArMz,               --//
    //--                                                                        --//
    //--                                ....... and the SRL Community.          --//
    //----------------------------------------------------------------------------//


    //----------------------------------------------------------------------------//
    // --                        SRL Level 1 Includes                           --//
    // --                                                                       --//
    // --   Low Level SCAR Math, Mouse Movement and Color Clicking routines.    --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Globals.scar}
    {.include SRL/SRL/Core/Math.scar}
    {.include SRL/SRL/Core/Mouse.scar}
    {.include SRL/SRL/Core/Color.scar}
    {.include SRL/SRL/Core/Players.scar}
    {.include SRL/SRL/Core/Overwrite.scar}

    //----------------------------------------------------------------------------//
    // --                        SRL Level 2 Includes                           --//
    // --                                                                       --//
    // --                 Interface, Object and OCR routines.                   --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Timing.scar}
    {.include SRL/SRL/Core/GameTab.scar}
    {.include SRL/SRL/Core/SRLLog.scar}
    {.include SRL/SRL/Core/Text.scar}
    {.include SRL/SRL/Core/Inventory.scar}
    {.include SRL/SRL/Core/Object.scar}

    //----------------------------------------------------------------------------//
    // --                        SRL Level 3 Includes                           --//
    // --                                                                       --//
    // --      MapWalking, AntiRandoms, Bank, Symbol and many more...           --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Bitmaps.scar}
    {.include SRL/SRL/Core/FlagChat.scar}
    {.include SRL/SRL/Core/Login.scar}
    {.include SRL/SRL/Core/Mapwalk.scar}
    {.include SRL/SRL/Core/Bank.scar}
    {.include SRL/SRL/Core/Symbol.scar}
    {.include SRL/SRL/Core/RC.scar}
    {.include SRL/SRL/Core/AutoColor.scar}
    {.include SRL/SRL/Core/Globalstats.scar}
    {.include SRL/SRL/Core/CAutoRespond.scar}
    {.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
    {.include SRL/SRL/Core/AntiRandoms/Common.scar}
    {.include SRL/SRL/Core/AntiRandoms/Certer.scar}
    {.include SRL/SRL/Core/AntiRandoms/Demon.scar}
    {.include SRL/SRL/Core/AntiRandoms/Forester.scar}
    {.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
    {.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
    {.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
    {.include SRL/SRL/Core/AntiRandoms/Leo.scar}
    {.include SRL/SRL/Core/AntiRandoms/Frog.scar}
    {.include SRL/SRL/Core/AntiRandoms/Molly.scar}
    {.include SRL/SRL/Core/AntiRandoms/Pillory.scar}
    {.include SRL/SRL/Core/Antirandoms/Pinball.scar}
    {.include SRL/SRL/Core/Antirandoms/Maze.scar}
    {.include SRL/SRL/Core/Antirandoms/CapnArnav.scar}
    {.include SRL/SRL/Core/Antirandoms/BeeKeeper.scar}
    {.include SRL/SRL/Core/AntiRandoms/Abyss.scar}
    {.include SRL/SRL/Core/AntiRandoms/Mordaut.scar}
    {.include SRL/SRL/Core/AntiRandoms/PrisonPete.scar}
    {.include SRL/SRL/Core/AntiBan.scar}
    {.include SRL/SRL/Core/Amount.scar}

    {*******************************************************************************
    procedure  SetupSRL;
    by: SRL Dev Team
    Description: Sets up all variables needed to run SRL.
    *******************************************************************************}


    procedure SetupSRL;
    begin
      MouseSpeed := 15;
      CheckHPFirst := True;
      Reincarnate := False;
      TalkAfterRandoms := False;
      RoadColor := 0;
      WaterColor := 0;
      BankColor := 0;
      LampSkill := 'mining';
      SetUpSRLReport;
      LoadCosineArrays;
      SymbolAccuracy:= 0.8;
      LoadSRLBitMaps;
      LoadTeleRandoms;
      SolveSRLRandoms := True;
      SetupSRLAutoResponder;
      UseFindMod := True;
      LogoutOnMod := True;
      UseFindTrade := True;
      UseAutoResponder := True;
      Screenshots := False;
      GraphicsSet := False;
      AllowPVP    := False;
      WarnSensitivity := -2;
      InitializeSRLLogFile;
      Writeln ('SRL Compiled in '+  IntToStr(GetTimeRunning) + ' msec');
    end;

    and my mouse.scar(just incase you need it)

    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               » Mouse Routines                              --//
    //-----------------------------------------------------------------//
    // * procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended) // * by BenLand100
    // * procedure MMouse(x, y, rx, ry: integer);                                                            // * by BenLand100
    // * procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);                                // * by Mutant Squirrle
    // * procedure SleepAndMoveMouse(Time: Integer);                                                         // * by RsN
    // * procedure IdleTime(Time, Rand: integer; Gravity: extended);                                         // * by BenLand100

    var
       MouseSpeed: Integer;

    {*******************************************************************************
    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    By: Benland100
    Description:
    *******************************************************************************}

    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    var
      veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
      lastX, lastY: integer;
      sqrt2, sqrt3, sqrt5: extended;
    begin
      sqrt2:= sqrt(2);
      sqrt3:= sqrt(3);
      sqrt5:= sqrt(5);
      while hypot(xs - xe, ys - ye) > 1 do
      begin
        dist:= hypot(xs - xe, ys - ye);
        wind:= minE(wind, dist);
        if dist >= targetArea then
        begin
          windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
          windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
        end else
        begin
          windX:= windX / sqrt2;
          windY:= windY / sqrt2;
          if (maxStep < 3) then
          begin
            maxStep:= random(3) + 3.0;
          end else
          begin
            maxStep:= maxStep / sqrt5;
          end;
        end;
        veloX:= veloX + windX;
        veloY:= veloY + windY;
        veloX:= veloX + gravity * (xe - xs) / dist;
        veloY:= veloY + gravity * (ye - ys) / dist;
        if hypot(veloX, veloY) > maxStep then
        begin
          randomDist:= maxStep / 2.0 + random(round(maxStep) / 2);
          veloMag:= sqrt(veloX * veloX + veloY * veloY);
          veloX:= (veloX / veloMag) * randomDist;
          veloY:= (veloY / veloMag) * randomDist;
        end;
        lastX:= Round(xs);
        lastY:= Round(ys);
        xs:= xs + veloX;
        ys:= ys + veloY;
        if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
          MoveMouse(Round(xs), Round(ys));
        step:= hypot(xs - lastX, ys - lastY);
        wait(round((maxWait - minWait) * (step / maxStep) + minWait));
        lastdist:= dist;
      end;
      if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
        MoveMouse(Round(xe), Round(ye));
    end;

    {*******************************************************************************
    procedure MMouse(x, y, rx, ry: integer);
    By: Benland100
    Description: Moves the mouse.
    *******************************************************************************}

    //Randomness is just added to the x,y. Might want to change that.
    procedure MMouse(x, y, rx, ry: integer);
    var
      cx, cy: integer;
      randSpeed: extended;
    begin
      randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
      if randSpeed = 0.0 then
        randSpeed := 0.1;
      getMousePos(cx,cy);
      X := x + random(rx);
      Y := y + random(ry);
      WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
    end;
    {*******************************************************************************
    procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
    By: Mutant Squirrle, with a small fix by hy71194
    Description: Moves then clicks mouse.
    *******************************************************************************}


    procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
    var
      a, b, c: Integer;
    begin
      MMouse(mousex, mousey, ranx, rany);
      Wait(60 + Random(30));
      GetMousePos(b, c);
      HoldMouse(b, c, left);
      repeat
        Wait(20 + Random(30));
        a := a + 1;
      until (a > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, left);
      Wait(100 + Random(100));
    end;

    {*******************************************************************************
    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));
        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;

    {*******************************************************************************
    procedure IdleTime(Time, Rand: integer; Gravity: extended);
    By: BenLand100
    Description: Randomly moves the mouse (Rand, and Gravity) for Time milliseconds
    *******************************************************************************}


    procedure IdleTime(Time, Rand: Integer; Gravity: Extended);
    var
      H, W, Cx, Cy, i, n, St: Integer;
      Controls, Path: TPointArray;
      LastC, LastP: TPoint;
    begin
      St := GetSystemTime;
      GetClientDimensions(W, H);
      SetArrayLength(Controls, 4);
      GetMousePos(Cx, Cy);
      LastP.x := Cx;
      LastP.y := Cy;
      LastC.x := LastP.x + (Random(Rand * 2) - Rand)
        LastC.y := LastP.y + (Random(Rand * 2) - Rand)
        repeat
        Controls[0].x := LastP.x;
        Controls[0].y := LastP.y;
        Controls[1].x := LastP.x + -(LastC.x - LastP.x);
        Controls[1].y := LastP.y + -(LastC.y - lastP.y);
        Controls[2].x := Controls[1].x + (Random(Rand * 2) - Rand);
        Controls[2].y := Controls[1].y + (Random(Rand * 2) - Rand);
        Controls[3].x := Controls[2].x + (Random(Rand * 2) - Rand);
        Controls[3].x := Controls[3].x + Round(-(Controls[3].x - (W / 2)) *
          (Gravity));
        Controls[3].y := Controls[2].y + (Random(Rand * 2) - Rand);
        Controls[3].y := Controls[3].y + Round(-(Controls[3].y - (H / 2)) *
          (Gravity));
        LastC.x := Controls[2].x;
        LastC.y := Controls[2].y;
        LastP.x := Controls[3].x;
        LastP.y := Controls[3].y;
        Path := MakeSplinePath(Controls, 0.01);
        Path := MidPoints(Path, 5);
        n := GetArrayLength(Path);
        for i := 0 to n - 1 do
        begin
          MoveMouse(Path[i].x, Path[i].y);
          Wait(Random(2) + 2);
          if (GetSystemTime - St >= Time) then Break
        end;
      until (GetSystemTime - St >= Time)
    end;
    Last edited by Awkwardsaw; 04-23-2009 at 08:13 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't have the actual rev 32 then. This happened to me, and to fix it I just redownloaded SRL.

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by 99_ View Post
    You don't have the actual rev 32 then. This happened to me, and to fix it I just redownloaded SRL.
    beileve me, i tried a few times

    [offtopic]sexy srl-member status 99_[/offtopic]
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  6. #6
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I see. Did you try doing the normal SRL download instead of the SVN method? I think that's what I did.

    [offtopic]Thanks [/offtopic]

  7. #7
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    ohhh, nope, i just moved plugins and checked it out.. i read a guide somewhere that says to never do the normal srl download =p i'll try it out though, once my scar stops being an idiot (not enough memory, i'll fool around with it)
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  8. #8
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    SpiralMouse is in Mouse.scar... Believe me. xD

    Here is the Mouse.scar from the Dev. Repo.:

    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               » Mouse Routines                              --//
    //-----------------------------------------------------------------//
    // * procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended) // * by BenLand100
    // * procedure MMouse(x, y, rx, ry: integer);                                                            // * by BenLand100
    // * procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);                                // * by Mutant Squirrle
    // * procedure SleepAndMoveMouse(Time: Integer);                                                         // * by RsN
    // * procedure IdleTime(Time, Rand: integer; Gravity: extended);                                         // * by BenLand100
    // * function function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: String;
    // *                                       PpC, aInc: Integer): Boolean;                                 // * by Nava2

    var
       MouseSpeed: Integer;

    {*******************************************************************************
    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    By: Benland100
    Description:
    *******************************************************************************}

    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    var
      veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
      lastX, lastY: integer;
      sqrt2, sqrt3, sqrt5: extended;
    begin
      sqrt2:= sqrt(2);
      sqrt3:= sqrt(3);
      sqrt5:= sqrt(5);
      while hypot(xs - xe, ys - ye) > 1 do
      begin
        dist:= hypot(xs - xe, ys - ye);
        wind:= minE(wind, dist);
        if dist >= targetArea then
        begin
          windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
          windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
        end else
        begin
          windX:= windX / sqrt2;
          windY:= windY / sqrt2;
          if (maxStep < 3) then
          begin
            maxStep:= random(3) + 3.0;
          end else
          begin
            maxStep:= maxStep / sqrt5;
          end;
        end;
        veloX:= veloX + windX;
        veloY:= veloY + windY;
        veloX:= veloX + gravity * (xe - xs) / dist;
        veloY:= veloY + gravity * (ye - ys) / dist;
        if hypot(veloX, veloY) > maxStep then
        begin
          randomDist:= maxStep / 2.0 + random(round(maxStep) / 2);
          veloMag:= sqrt(veloX * veloX + veloY * veloY);
          veloX:= (veloX / veloMag) * randomDist;
          veloY:= (veloY / veloMag) * randomDist;
        end;
        lastX:= Round(xs);
        lastY:= Round(ys);
        xs:= xs + veloX;
        ys:= ys + veloY;
        if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
          MoveMouse(Round(xs), Round(ys));
        step:= hypot(xs - lastX, ys - lastY);
        wait(round((maxWait - minWait) * (step / maxStep) + minWait));
        lastdist:= dist;
      end;
      if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
        MoveMouse(Round(xe), Round(ye));
    end;

    {*******************************************************************************
    procedure MMouse(x, y, rx, ry: integer);
    By: Benland100
    Description: Moves the mouse.
    *******************************************************************************}

    //Randomness is just added to the x,y. Might want to change that.
    procedure MMouse(x, y, rx, ry: integer);
    var
      cx, cy: integer;
      randSpeed: extended;
    begin
      randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
      if randSpeed = 0.0 then
        randSpeed := 0.1;
      getMousePos(cx,cy);
      X := x + random(rx);
      Y := y + random(ry);
      WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
    end;
    {*******************************************************************************
    procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
    By: Mutant Squirrle, with a small fix by hy71194
    Description: Moves then clicks mouse.
    *******************************************************************************}


    procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
    var
      a, b, c: Integer;
    begin
      MMouse(mousex, mousey, ranx, rany);
      Wait(60 + Random(30));
      GetMousePos(b, c);
      HoldMouse(b, c, left);
      repeat
        Wait(20 + Random(30));
        a := a + 1;
      until (a > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, left);
      Wait(100 + Random(100));
    end;

    {*******************************************************************************
    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));
        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;

    {*******************************************************************************
    procedure IdleTime(Time, Rand: integer; Gravity: extended);
    By: BenLand100
    Description: Randomly moves the mouse (Rand, and Gravity) for Time milliseconds
    *******************************************************************************}


    procedure IdleTime(Time, Rand: Integer; Gravity: Extended);
    var
      H, W, Cx, Cy, i, n, St: Integer;
      Controls, Path: TPointArray;
      LastC, LastP: TPoint;
    begin
      St := GetSystemTime;
      GetClientDimensions(W, H);
      SetArrayLength(Controls, 4);
      GetMousePos(Cx, Cy);
      LastP.x := Cx;
      LastP.y := Cy;
      LastC.x := LastP.x + (Random(Rand * 2) - Rand)
        LastC.y := LastP.y + (Random(Rand * 2) - Rand)
        repeat
        Controls[0].x := LastP.x;
        Controls[0].y := LastP.y;
        Controls[1].x := LastP.x + -(LastC.x - LastP.x);
        Controls[1].y := LastP.y + -(LastC.y - lastP.y);
        Controls[2].x := Controls[1].x + (Random(Rand * 2) - Rand);
        Controls[2].y := Controls[1].y + (Random(Rand * 2) - Rand);
        Controls[3].x := Controls[2].x + (Random(Rand * 2) - Rand);
        Controls[3].x := Controls[3].x + Round(-(Controls[3].x - (W / 2)) *
          (Gravity));
        Controls[3].y := Controls[2].y + (Random(Rand * 2) - Rand);
        Controls[3].y := Controls[3].y + Round(-(Controls[3].y - (H / 2)) *
          (Gravity));
        LastC.x := Controls[2].x;
        LastC.y := Controls[2].y;
        LastP.x := Controls[3].x;
        LastP.y := Controls[3].y;
        Path := MakeSplinePath(Controls, 0.01);
        Path := MidPoints(Path, 5);
        n := GetArrayLength(Path);
        for i := 0 to n - 1 do
        begin
          MoveMouse(Path[i].x, Path[i].y);
          Wait(Random(2) + 2);
          if (GetSystemTime - St >= Time) then Break
        end;
      until (GetSystemTime - St >= Time)
    end;

    function IsUpText(UpText: String): Boolean; Forward;

    {*******************************************************************************
    function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: String; PpC, aInc: Integer): Boolean;
    By: Nava2
    Description: Spirals the mouse in a circle from the center of the defined box.
                 It will continue to spiral until it finds a spiral completely outside
                 the box, always skipping points outside.
                 Returns the occurance of the UpText into fx, fy.
                 PpC: The number of pixels to increase per spiral.
                 aInc: The number of stops to make around each spiral.
                 Takes some testing to get the right combination of PpC and aInc.
    *******************************************************************************}

    function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: String; PpC, aInc: Integer): Boolean;
    var
      aStep, a, rStep, rV, oB: Extended;
      pX, pY, ms: Integer;
      sP: TPoint;
      L2R: Boolean;
    begin
      Result := False;
      ms := MouseSpeed;
      MouseSpeed := 25 + RandomRange(-3, 3);
      sP := MiddleTPA([Point(x1, y1), Point(x2, y2)]);
      aStep := Pi / (aInc / 2);
      a := 0;
      rStep := (PpC / aInc);
      L2R := Random(2) = 0;
      //Writeln('aStep: ' + FloatToStr(aStep) + ' rStep ' + FloatToStr(rStep));
      repeat
        rV := rV + rStep;
        pX := Round(rV * cos(a)) + sP.x;
        pY := Round(rV * sin(a)) + sP.y;
        if L2R then
          a := a + aStep
        else
          a := a - aStep;
        if InRange(pX, x1, x2) and InRange(pY, y1, y2) then
        begin
          oB := 0;
          MMouse(pX - 2, pY - 2, 5, 5);
          Wait(100 + Random(60));
          if IsUpText(UpText) then
          begin
            GetMousePos(fx, fy);
            Result := True;
          end;
        end else
          oB := oB + aStep;
      until Result or (oB > (2 * Pi));
      MouseSpeed := ms;
    end;

    I suggest you get a SnapShot of SRL by the way, might save you more effort if there are other issues.

    Closed because this is off topic.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

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
  •