SRL Archive - OSR Help

curse script


fluffee

2013-07-05 16:24:52

Hello!
I'm making a script for a simple 06-based private server, but i'm having some problems.
It just has to be a simple script without anti-ban,etc but i just can't seem to put it together. :(
The script is suppose to cast curse on the monk in varrock castle, that's all.


program Curse;
var x, y : integer;

Procedure ClickCurse;
begin
Mouse(740, 184, 1, 1);
ClickMouse(740, 184, 1);
wait(1000+random(250));
Mouse(664, 262, 0, 0);
ClickMouse(664, 262, 1);
wait(500+random(100));
end;

Procedure ClickMonk;
var x, y : integer;

begin
FindColorSpiralTolerance(x, y, 2830198, 24, 184, 292, 268, 10);
Mouse(x, y, 5, 5);
if IsUpText('onk of') then
Mouse(x, y, 5, 5);
ClickMouse(x, y, 1);
wait(500+random(250));
end;


begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Setup;
repeat
ClickCurse;
ClickMonk;
FindNormalRandoms;
until(false)
end.


So this is the script, but I keep getting "unknown identifier" errors.
I know it's probably a pretty dumb question/problem but i'm a real noob at this, so my apologies. :p

riwu

2013-07-14 05:54:45

You need to add
{$I SRL/SRL.simba}
below the program name to use SRL library functions.
Also Mouse() has an extra parameter, button, which you can pass 'mouse_Left' as argument for left clicking (hence eliminating the need to call ClickMouse() as well.