JaJaBinks
2012-10-11 07:37:43
Greetings SRL community, my name is JaJaBinks. I started this script for my first pascal/simba script approximately two hours ago. With an incomplete reference sheet, a few functions were a complete and utter pain to find. Instead of searching entire predefined areas, I wish I could have figured out how to retrieve specific coordinates that were consistent every time. Spent nearly 30 minutes trying to achieve this, but to my dismay, I was not able to.
The story behind this script is quite simple, really. I was down in Botany Bay obtaining my Pitchfork of Justice. I pondered the thought for a moment, and asked some guy if it'd be ironic if a bot was automating the process of throwing rotten tomatoes at banned bots.
Awhile back I came across SLR as I wanted to create a script to achieve a task that's abnormally tedious. Roughly 2 hours ago I began development on this script with absolutely no pascal knowledge.
I will not continue further development on this script as I have achieved what I wanted from it; that being a script to introduce me into the pascal/Simba scripting language.
Currently it
- Locates the bot on the pedestal
- Retrieves rotten tomatoes and keeps track of how many it has
- Closes the vote dialog - as I feel bots shouldn't interfere with playing players
What it lacks
- Antiban, antirandom, and failsafes
- If there are no bots for an extended period of time, it'll logout
At times it
- If you're on the side of Botany Bay where the bot is on the right side it has issues detecting the bot. Unfortunately, I was unable to get back on the side that needs updating.
Video demonstration: http://www.youtube.com/watch?v=G0sbAChPA7g&feature=youtu.be
Constructive criticism is appreciated.
The story behind this script is quite simple, really. I was down in Botany Bay obtaining my Pitchfork of Justice. I pondered the thought for a moment, and asked some guy if it'd be ironic if a bot was automating the process of throwing rotten tomatoes at banned bots.
Awhile back I came across SLR as I wanted to create a script to achieve a task that's abnormally tedious. Roughly 2 hours ago I began development on this script with absolutely no pascal knowledge.
I will not continue further development on this script as I have achieved what I wanted from it; that being a script to introduce me into the pascal/Simba scripting language.
Currently it
- Locates the bot on the pedestal
- Retrieves rotten tomatoes and keeps track of how many it has
- Closes the vote dialog - as I feel bots shouldn't interfere with playing players
What it lacks
- Antiban, antirandom, and failsafes
- If there are no bots for an extended period of time, it'll logout
At times it
- If you're on the side of Botany Bay where the bot is on the right side it has issues detecting the bot. Unfortunately, I was unable to get back on the side that needs updating.
Video demonstration: http://www.youtube.com/watch?v=G0sbAChPA7g&feature=youtu.be
Constructive criticism is appreciated.
program ThrowMaters;
{$DEFINE SMART}
{$i srl/srl.simba}
var
total, votes, matersl, materst: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
(* procedure NoVote
Check for votes, don't vote *)
procedure NoVote;
var
vote, x, y: integer;
begin
vote := DTMFromString('mbQAAAHicY2VgYBAEYiEglgViXiDmAmI+IGaG0qJQ+u9GXQZubm4GHh4ehqKiIoaUhAQGbIARCwYDADsvBT4=');
if(FindDTM(vote, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Writeln('Closing the vote box');
Mouse(x, y, 2, 2, 1);
votes := votes + 1;
end;
FreeDtm(vote);
end;
(* procedure AntiRandoms
Intended to look for randoms *)
procedure AntiRandoms;
begin
end;
(* procedure AntiBan
Intended to create human like movements *)
procedure Antiban;
begin
end;
(* procedure CollectMaters
Finds and retrieves 20 maters *)
procedure CollectMaters;
var
i, x, y: integer;
begin
NoVote;
if matersl <= 18 then
begin
for i := 0 to 1 do
begin
if(FindColorTolerance(x, y, 4680833, MSX1, MSY1, MSX2, MSY2, 0)) then
begin
NoVote;
Writeln('Found maters to collect');
Mouse(x, y, 5, 5, 0);
if total < 1 then begin Wait(2000); end; // Need time for my homie to walk over there
if OptionsExist(['Take-10'],True) then
begin
ChooseOption('Take-10')
matersl := matersl + 10;
Writeln('Collected 10 maters');
Wait(2000);
end;
end;
end;
end;
end;
(* procedure ThrowMaters
Throws the maters at the bot *)
procedure ThrowMaters;
var
i, botx, boty, bot, bot2, materx, matery, maters: integer;
begin
maters := DTMFromString('mlwAAAHicY2dgYOACYj4oFgViXiBmZIAAHijNDMScQCwCxAJAzArE2bYKQJIJB8YNGPFgKAAAkZYBbQ==');
bot := DTMFromString('mbQAAAHicY2VgYBBhYmDgAWJeIJaGYgZGBoZfQIoVSHMA8T8g283ZmSGnpBYFYwOMWDAYAAAdSAjA');
bot2 := DTMFromString('mggAAAHicY2NgYEgC4mwgzgfiGCCOAOJkIF7MyMCwCohnAfFcIF4LxGuAOLesHivGBRhxYAgAAKMADo8=');
for i := 0 to 19 do
begin
NoVote;
if(FindDTM(bot, botx, boty, MSX1, MSY1, MSX2, MSY2) OR FindDTM(bot2, botx, boty, MSX1, MSY1, MSX2, MSY2)) then
begin
if FindDTM(maters, materx, matery, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('Found the bot and maters in our inv');
Mouse(materx, matery, 2, 2, 1);
Wait(250);
end;
Mouse(botx, boty, 5, 5, 1);
matersl := matersl - 1;
if matersl <= 0 then CollectMaters;
materst := materst + 1;
end;
Wait(4850); // Approx. 6 seconds per throw, as my arm is 'tired'
end;
FreeDtm(maters);
FreeDtm(bot);
FreeDtm(bot2);
end;
(* procedure ReportBack
Reports data back to use in the console *)
procedure ReportBack;
begin
Writeln('-----------------------------------------------');
Writeln('Iterations: ' + IntToStr(total) + '.');
Writeln('Maters thrown: ' + IntToStr(materst) + '.');
Writeln('Votes closed: ' + IntToStr(votes) + '.');
Writeln('-----------------------------------------------');
end;
(* procedure MainLoop
The main loop to execute *)
procedure MainLoop;
var
bot, bot2, botx, boty: integer;
begin
NoVote;
Writeln('Searching for the bot.');
bot := DTMFromString('mbQAAAHicY2VgYBBhYmDgAWJeIJaGYgZGBoZfQIoVSHMA8T8g283ZmSGnpBYFYwOMWDAYAAAdSAjA');
bot2 := DTMFromString('mggAAAHicY2NgYEgC4mwgzgfiGCCOAOJkIF7MyMCwCohnAfFcIF4LxGuAOLesHivGBRhxYAgAAKMADo8=');
if(FindDTM(bot, botx, boty, MSX1, MSY1, MSX2, MSY2) OR FindDTM(bot2, botx, boty, MSX1, MSY1, MSX2, MSY2)) then
begin
FreeDtm(bot);
FreeDtm(bot2);
Writeln('Bot found. Begin the process.');
Antiban;
AntiRandoms;
CollectMaters;
Writeln('Maters collected.');
Wait(RandomRange(750, 1850));
ThrowMaters;
Writeln('Maters thrown.');
total := total + 1;
ReportBack;
end;
Wait(RandomRange(3000,8000));
MainLoop;
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
MakeCompass('N');
MainLoop;
end.
-----------------------------------------------
Iterations: 14.
Maters thrown: 246.
Votes closed: 12.
-----------------------------------------------
-----------------------------------------------
Iterations: 25.
Maters thrown: 423.
Votes closed: 21.
-----------------------------------------------