soccnut
2008-07-28 06:40:52
created this script and took about 8hrs after viewing quite a number of tutorials…currently able to connect to SRL stats.
Works for SCAR 3.15b SRL Rev 17+
pls comment this is my first script.If script is good, i may apply for membership with later versions.Thx
UPDATES: added tons of failsafes and changed symbolfinding to both shops so more accurate
later versions
more failsafes(marktime and so on…)———–ADDED
-change walk mathod from findsymbol to Radial or DDTM(Current one will screw up if Fagex places the symbol to far from actual place.
-proggy reports
SCRIPT HERE
PLEASE RMB TO COMMENT AFTER TRYING OUT!
Works for SCAR 3.15b SRL Rev 17+
pls comment this is my first script.If script is good, i may apply for membership with later versions.Thx
UPDATES: added tons of failsafes and changed symbolfinding to both shops so more accurate
later versions
more failsafes(marktime and so on…)———–ADDED
-change walk mathod from findsymbol to Radial or DDTM(Current one will screw up if Fagex places the symbol to far from actual place.
-proggy reports
SCRIPT HERE
//Instructions: Fill up form and loads to do
// Place players in al kharaid bank top bank slot
// Put whatever u need to cook in the first bank slot
// Hit play and watch the magic
// Update on the my thread the progress of this script
program AKcooker;
{.include SRL/SRL.scar}
{.include srl/srl/misc/users.scar}
const
SRLStatsID = '2913'; // Your SRL Stats ID
SRLStatsPW = 'cvLdx5SPk3'; // Your SRL Stats Password
LoadsToDo = '8'; //no. of loads to do
var
x, y: integer; //map coordinates for walktorange
a, b: integer; //coordinates for colour of range when cooking
Loads: integer; //variable so that script logs out after every 3 loads done(less randoms)
Time: integer; //failsafe for procedures
LoadsDone: integer; //stop script when specfied loads done.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //nickname P.S leave out the first letter of your name.
Players[0].Active := True; //True = Active, False = Inactive
end;
procedure Failsafe;
begin
if (loggedIn) then exit
Writeln('Player false, next player');
Players[CurrentPlayer].Active := False;
end;
procedure Antiban;
begin
Failsafe;
Status('Antiban');
case Random(30) of
0:
begin
HoverSkill('Cooking', False);
Gametab(4);
wait(500 + random(100));
end;
1:
begin
wait(3000 + random(300));
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
wait(500 + random(300));
end;
3:
begin
MouseBox(MSx1, MSy1, MSx2, MSy2, 3);
end;
end;
Gametab(4);
end;
procedure WalkToRange;
begin
failsafe;
MarkTime(Time);
setrun(true);
MakeCompass('N');
SymbolAccuracy := 0.5;
if (FindSymbol(x, y, 'Kebab Shop')) then
mouse(x,y,2,2,true);
if (FindSymbol(x, y, 'Cookery shop')) then
mouse(x,y,2,2,true);
Writeln('Found the range');
FFlag(0);
Writeln('Walking towards it now')
Wait(5000)
if (TimeFromMark(Time) <= 15000) then exit;
end;
procedure Cooking;
begin
if FindColorSpiralTolerance(a, b, 1253790, 5, 5, 600, 600, 20) then
begin
MarkTime(Time);
MouseItem(1, true);
Mouse(a, b, 5, 5, true);
mouse(250, 421, 10, 10, false);
wait(500 + random(400));
ChooseOption('All');
Writeln('Cooking now');
LoadsDone := LoadsDone + 1 ;
if (TimeFromMark(Time) <= 40000) then exit;
end else
begin
failsafe;
end;
end;
procedure WalkToBank;
begin
failsafe;
MarkTime(Time);
repeat
SymbolAccuracy := 0.5;
Wait(50 + random(100))
until (FindSymbol(x, y, 'Bank'))
Writeln('Found the bank')
Mouse(x, y, 5, 5, true)
Flag;
Writeln('Walking towards it now')
Wait(5000)
if (TimeFromMark(Time) <= 15000) then exit;
end;
procedure DepositBank;
begin
failsafe;
MarkTime(Time);
OpenBank('akb', false, false);
Writeln('Banking now')
wait(1000 + random(200));
DepositAll;
wait(1000 + random(200));
Withdraw(1, 1, 28);
wait(1000 + random(200));
Closebank;
wait(1000 + random(200));
MakeCompass('N');
Writeln ('Banked')
if (TimeFromMark(Time) <= 20000) then exit;
end;
procedure MainLoop;
begin
loginplayer;
wait(800 + random(500));
SetAngle(true);
MakeCompass('N');
repeat
FindNormalRandoms;
DepositBank;
WalktoRange;
Antiban;
Cooking;
Antiban;
wait(28000 + random(2000))
WalktoBank;
Antiban;
Loads := Loads + 1
until Loads >= 3;
Logout;
repeat
NextPlayer(Players[CurrentPlayer].Active);
until (false)
end;
begin
SetupSRL;
ScriptID := '938';
SRLId := SRLStatsID;
SRLPassword := SRLStatsPW;
SRLRandomsReport;
ActivateClient;
DeclarePlayers;
MainLoop;
end.
PLEASE RMB TO COMMENT AFTER TRYING OUT!