SRL Archive - OSR Help

Mouse Speed Weirdness? (w/ Virtual Machine)


ForgotMyName

2010-05-11 01:17:08

I use default mouse speed settings and it works fine. I copy the same SCAR + SRL folder over to a virtual machine (still presumably under default mouse speed settings) and the mouse inside moves quite a lot slower. Can someone explain what's happening and what I should do? Thanks.

YoHoJo

2010-05-11 01:26:35

Make 100% sure you setup scar/SRL correctly in the VM.
Also, check the mouse settings of the VM itself maybe, and make the mouse speed higher on whatever OS you are using.

Also, why use a VM? Why not just use SCAR/SMART (you can minimize SMART while SCAR autos)

ForgotMyName

2010-05-11 01:33:17

Uh, I copy pasted the SCAR folder from my Windows install.
The VM was installed off the same disc in the same way and I don't think I changed any configurations.
Does the OS's settings for mouse speed affect the mouse speed SCAR?
I'm using a VM to auto while working in Linux without touching Wine because I'm familiar with them and not Wine.
The only difference I can think of is that the VM runs at a slightly different resolution. But RS is fixed size on each.

Dgby714

2010-05-11 02:53:48

From: ForgotMyName
Uh, I copy pasted the SCAR folder from my Windows install.
The VM was installed off the same disc in the same way and I don't think I changed any configurations.
Does the OS's settings for mouse speed affect the mouse speed SCAR?
I'm using a VM to auto while working in Linux without touching Wine because I'm familiar with them and not Wine.
The only difference I can think of is that the VM runs at a slightly different resolution. But RS is fixed size on each.


Does the script SetupSRL;?

Home

2010-05-11 06:43:12

Yeah, it it doesn't have SetupSRL; in it it will affect the Mousespeed, please post script, if you still get problems :)

~Home

YoHoJo

2010-05-11 19:06:36

Yeah, I was also going to say that. I was just assuming you were using the same script that you used on your normal OS on the VM too, but not having SetupSRL called in the script makes the mouse move slow.

Edit:
Why not just take a few minutes to learn how to setup SCAR/SRL on WINE in linx, it would take up a lot less ram and allow you to run more (if you want to run multiple SMARTs), but if you have enough computing power to run linux/VM/SMART then go right on ahead! :D

ForgotMyName

2010-05-11 20:12:10

The script isn't even SMART enabled. Right now I'm going through a busy time, so I'll stick with what I know, and save learning SMART / Wine / whatever for summer vacation.

The script is a draft of a Soul Wars herblore thing. In case it matters, here's a copy. I should reemphasize, the difference comes from the exact same script being run in two different environments.

Oh, and it's buggy. But that's a different story.

program SWHerby;
{.include SRL\SRL.scar}

var
LoadsDone, WaitTimer: Integer;

const
LoadsToDo = 1000;

function sFindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;
var
I, tCTS: Integer;
myPoint: TPoint;
Points: TPointArray;
aPoints: T2DPointArray;
begin
Result := False;
if not LoggedIn then exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.44);
FindColorsSpiralTolerance(X, Y, Points, Color, MSX1, MSY1, MSX2, MSY2, Tol);
if Length(Points) = 0 then
begin
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
Exit;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SetLength(Points, 0);
for I := 0 to High(aPoints) do
begin
if Length(aPoints) < minCount then
Continue;
myPoint := MiddleTPA(aPoints);
MMouse(myPoint.X, myPoint.Y, 4, 6);
if WaitUpTextMulti(UpText, 300) then
begin
GetMousePos(X, Y);
Result := True;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
Exit;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
end;

function FindBankChest: boolean;
var
x, y: integer;
begin
if BankScreen then
begin
result := true;
Exit;
end;

if IsUpTextMultiCustom(['chest', 'ank']) then
begin
result := true;
wait(100 + random(100));
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
exit;
end;

Wait(100 + Random(100));
if not IsUpTextMultiCustom(['chest', 'ank']) then
begin
x := MSCX;
y := MSCY - 100;

if sFindObjTPA(x, y, 11053497, 21, 2, 32, 35, 3, ['chest', 'ank']) then
begin
Result := true;
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
end;
end;
end;

procedure WaitRandomAntiban(time: Integer);
begin
MarkTime(WaitTimer);
repeat
case Random(50) of
1: SleepAndMoveMouse(500 + Random(1000));
2: HoverSkill('herblore', false);
3: SleepAndMoveMouse(1000 + Random(1000));
4: GameTab(tab_Friends);
5: GameTab(tab_Stats);
6: SleepAndMoveMouse(1500 + Random(1000));
7: SleepAndMoveMouse(2000 + Random(1000));
8: SleepAndMoveMouse(1000 + Random(1000));
9: SleepAndMoveMouse(1000 + Random(1000));
else
Wait(1000 + Random(1000));
end;
until TimeFromMark(WaitTimer) > time;
end;

procedure UnfToPots;
begin
GameTab(tab_Inv);
Wait(500 + Random(100));
MouseItem(1 + Random(13), true);
Wait(500 + Random(100));
MouseItem(28 - Random(13), true);
Wait(1000 + Random(100));
Mouse(255, 420, 5, 5, false);
Wait(1000 + Random(100));
ChooseOption('Make All');
WaitRandomAntiban(18000 + Random(1000));
ClickContinue(true, true);
Wait(500 + Random(100));
end;

procedure DoBank;
begin
Wait(1000 + Random(100));
if not FindBankChest then begin
Wait(1000 + Random(100));
if not FindBankChest then begin
LogOut;
TerminateScript;
end;
end;
Wait(1000 + Random(100));
if not BankScreen then begin
LogOut;
TerminateScript;
end;
Wait(1000 + Random(100));
DepositAll;
Wait(500 + Random(100));
DepositAll;
Wait(500 + Random(100));
Withdraw(0, 0, 14);
Wait(500 + Random(100));
Withdraw(1, 0, 14);
Wait(500 + Random(100));
CloseBank;
Wait(500 + Random(100));
end;

procedure Initialize;
begin
SetupSRL();
ActivateClient();
LoadsDone := 0;
end;

begin
Initialize;
repeat
DoBank;
UnfToPots;
LoadsDone := LoadsDone + 1;
until LoadsDone >= LoadsToDo;
LogOut;
end.

YoHoJo

2010-05-11 21:03:41

Maybe change
SetupSRL();
to
SetupSRL;

Dgby714

2010-05-11 22:26:18

From: YoHoJo
Maybe change
SetupSRL();
to
SetupSRL;


And read a standards guide?

ForgotMyName

2010-05-11 23:05:53

Meh, it's for personal use. I don't really care about what conventions other people use when it comes to something that isn't meant to be publicized. I don't think the choice of syntax has anything to do with this issue.

Dgby714

2010-05-11 23:22:58

Went thru it in gedit didnt notice anything wrong that would change how the mouse acted >.>

ForgotMyName: "
" scripts dont quote.

i did make a few modifications…

program SWHerby;
{.include SRL\SRL.scar}

var
LoadsDone, WaitTimer: Integer;

const
LoadsToDo = 1000;

function sFindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;
var
I, tCTS: Integer;
myPoint: TPoint;
Points: TPointArray;
aPoints: T2DPointArray;
begin
Result := False;
if (not (LoggedIn)) then
Exit;

tCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.44);
try
FindColorsSpiralTolerance(X, Y, Points, Color, MSX1, MSY1, MSX2, MSY2, Tol);

if Length(Points) = 0 then
Exit;

aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SetLength(Points, 0);

for I := 0 to High(aPoints) do
begin
if Length(aPoints[i]) < minCount then
Continue;
myPoint := MiddleTPA(aPoints[i]);
MMouse(myPoint.X, myPoint.Y, 4, 6);
if WaitUpTextMulti(UpText, 300) then
begin
GetMousePos(X, Y);
Result := True;
Exit;
end;
end;
finally
ColorToleranceSpeed(tCTS);
SetColorSpeed2Modifiers(0.02, 0.02);
end;
end;

function FindBankChest: boolean;
var
x, y, Tries: integer;
begin
if BankScreen then
begin
Result := True;
Exit;
end;

if IsUpTextMultiCustom(['chest', 'ank']) then
begin
Wait(100 + Random(100));
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Tries := 0;
repeat
if BankScreen then
Result := True;
Wait(500 + Random(100));
Inc(Tries);
until(Result or (Tries >= 30));
if Result then
Exit;
end;

Wait(100 + Random(100));

if (not (IsUpTextMultiCustom(['chest', 'ank']))) then
begin
x := MSCX;
y := MSCY - 100;

if sFindObjTPA(x, y, 11053497, 21, 2, 32, 35, 3, ['chest', 'ank']) then
begin
Result := true;
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Tries := 0;
repeat
if BankScreen then
Result := True;
Wait(500 + Random(100));
Inc(Tries);
until(Result or (Tries >= 30));
end;
end;
end;

procedure WaitRandomAntiban(time: Integer);
begin
MarkTime(WaitTimer);
repeat
case Random(50) of
1: SleepAndMoveMouse(500 + Random(1000));
2: HoverSkill('herblore', false);
3: SleepAndMoveMouse(1000 + Random(1000));
4: GameTab(tab_Friends);
5: GameTab(tab_Stats);
6: SleepAndMoveMouse(1500 + Random(1000));
7: SleepAndMoveMouse(2000 + Random(1000));
8: SleepAndMoveMouse(1000 + Random(1000));
9: SleepAndMoveMouse(1000 + Random(1000));
else
Wait(1000 + Random(1000));
end;
until(TimeFromMark(WaitTimer) > time);
end;

procedure UnfToPots;
begin
GameTab(tab_Inv);
Wait(500 + Random(100));
MouseItem(1 + Random(13), true);
Wait(500 + Random(100));
MouseItem(28 - Random(13), true);
Wait(1000 + Random(100));
Mouse(255, 420, 5, 5, false);
Wait(1000 + Random(100));
ChooseOption('Make All');
WaitRandomAntiban(18000 + Random(1000));
ClickContinue(true, true);
Wait(500 + Random(100));
end;

procedure DoBank;
begin
Wait(1000 + Random(100));
if (not (FindBankChest)) then
begin
Wait(1000 + Random(100));
if (not (FindBankChest)) then
begin
LogOut;
TerminateScript;
end;
end;
Wait(1000 + Random(100));
if (not (BankScreen)) then
begin
LogOut;
TerminateScript;
end;
Wait(1000 + Random(100));
DepositAll;
Wait(500 + Random(100));
DepositAll;
Wait(500 + Random(100));
Withdraw(0, 0, 14);
Wait(500 + Random(100));
Withdraw(1, 0, 14);
Wait(500 + Random(100));
CloseBank;
Wait(500 + Random(100));
end;

procedure Initialize;
begin
SetupSRL;
ActivateClient;
LoadsDone := 0;
end;

begin
Initialize;
repeat
DoBank;
UnfToPots;
LoadsDone := LoadsDone + 1;
until(LoadsDone >= LoadsToDo);
LogOut;
end.

Blumblebee

2010-05-12 00:29:34

I always do setUpSRL(); lol it works just fine :)