SRL Archive - OSR Help

Need help with Mouse command


Erke

2011-12-29 07:43:25

Hello
I tried to use TomTuff's Superglass Maker earlier today but i couldnt get it work cuz of

[Hint] C:\Simba\Simba\Includes\SRL/SRL/core/gametab.scar(1607:3): Variable 'PREVIOUS' never used at line 1606
[Error] (188:5): Unknown identifier 'FindColorsToleranceOptimised' at line 187
Compiling failed

So i tried to make my own (VERY) simple glassmaker at SW lobby ! :D:D
However when i do a Mouse command like this
Mouse(x, y, 7, 7, true);
it like moves the mouse pixel by pixel to the destination, and thats very slowly and not human like at all, i watched YoHoJo's Youtube vids about scripting and he made the same command but the mouse moved smoothly and nice.
Help would be nice! :p

heres how he script looks so far

program SuperGlassMaker;

{$i SRL/SRL.scar}

procedure ClicktheBank;
var
x, y:integer;
begin
if FindColorSpiralTolerance(x, y, 5924981, 243, 122, 273, 134, 10)then
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
wait(1200 + random(200));
end;
end;

procedure WithdrawMaterials;
begin
Mouse(145, 106, 7, 7, false);
Mouse(140, 182, 1, 1, true);
Wait(500 + random(200));
Mouse(186, 108, 7, 7, false);
Mouse(183, 184, 1, 1, true);
end;

procedure MaketheGlass;
begin
Mouse(488, 35, 3, 3, true);
Mouse(634, 372, 3, 3, true);
Wait(3000 + random(200));
end;

procedure BanktheGlass;
var
x, y:integer;
begin
if FindColorSpiralTolerance(x, y, 5924981, 243, 122, 273, 134, 10)then
begin
Mouse(x, y, 15, 15, true);
wait(1200 + random(200));
Mouse(580, 267, 7, 7, false);
Mouse(581, 372, 4, 4, true);
Wait(700 + random(200));
end;
end;


begin
ClicktheBank
repeat
WithdrawMaterials
MaketheGlass
BanktheGlass
until(false)
end.

Erke

2011-12-29 08:22:39

bump!!

Kyle Undefined

2011-12-29 08:34:02

Yo, you have to give more than an hour for someone to respond :p Please don't double post.

Anyway, to answer your question, you need "SetupSRL;" as the first line in your main loop.

Erke

2011-12-29 09:53:20

From: Kyle Undefined
Yo, you have to give more than an hour for someone to respond :p Please don't double post.

Anyway, to answer your question, you need "SetupSRL;" as the first line in your main loop.


thanks alot mate!!

im used to mmo-champs forums where u have to bump like once every 20mins so sorry :(