Dan the man
2012-02-10 21:39:22
Hey all I am very new to scripting SRL (started last night Lol) and I am attempting to make a script that simply clicks ruby bolt tips, clicks addy bolts, waits and clicks the tip all option waits 5 seconds then repeats until all gone.
At the moment it cannot seem to find anything Lol.
Any help is appreciated!
At the moment it cannot seem to find anything Lol.
Any help is appreciated!
program DansRubyBolter;
{$i srl/srl/misc/smart.scar} // This is how we include SMART; it HAS to be included BEFORE SRL!
{.include SRL/SRL.scar}
//{$i SRL\SRL.scar} // Be sure to add this to ALL your scripts!
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
end;
Procedure MakeABolt;
Var
BoltTips, UnTippedBolts, x, y:Integer;
begin
BoltTips:=DTMFromString('78DA636C6161602866644006D9C6FA0CFC401' +
'A26CAD80354D384AA06260B57530A54534D404D2D504D0A013513' +
'806A32F1AB010097DC05D3');
if FindDTM(BoltTips, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('Found Bolt Tips!');
MMouse(x, y, 4, 4);
ClickMouse(x, y, 1);
end else
begin
WriteLn('Cannot Find Bolt Tips!');
End;
UntippedBolts:= DTMFromString('78DA635CC7C2C050C8C8800C6CDC6CC0344C9' +
'4713E504D25AA1A982C5CCD16A09A26026A7601D5E41050B30AA8' +
'2615BF1A00DA200688');
If FindDTM(UnTippedBolts, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('Found Bolt Tips!');
MMouse(x, y, 4, 4);
ClickMouse(x, y, 1);
end else
begin
WriteLn('Cannot Find Addy Bolts!');
End;
begin;
WriteLn('Moving Mouse to make bolts');
MMouse(x, y, 5, 5);
ClickMouse(x, y, 1);
Wait(5000);
end;
end;
// Our main loop
begin
Smart_Server:= 49;
Smart_Members:= True;
Smart_Signed:= True;
Smart_SuperDetail:= False;
ClearDebug;
SetupSRL;
DeclarePlayers;
Repeat
MakeABolt;
until(false);
LoginPlayer;
end.