SRL Archive - SRL Bugs

abyss bugs


Awkwardsaw

2009-04-23 02:58:41

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

Nava2

2009-04-23 03:33:31

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

Might be 3.20 though.

Awkwardsaw

2009-04-23 04:09:28

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 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 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;

ian.

2009-04-23 04:15:18

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

Awkwardsaw

2009-04-23 04:19:38

From: 99_
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]

ian.

2009-04-23 04:22:09

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]

Awkwardsaw

2009-04-23 04:39:24

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)

Nava2

2009-04-23 04:41:52

SpiralMouse is in Mouse.scar… Believe me. xD

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

//-----------------------------------------------------------------//
//-- 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.