SRL Archive - First Scripts

Botany Bay rotten tomatoe thrower


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.


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.
-----------------------------------------------

Leonardo Da Vinci

2012-10-11 07:40:32

Botception!
Pretty funny idea, nice one!

WT-Fakawi

2012-10-11 07:45:13

Hahaha, nice one. I removed whatever info was in the player[] :)

Mr[S]

2012-10-11 07:45:24

Botting against the bots…genius

Runescape Pro

2012-10-11 07:47:18

Neat dude. Good idea. Pascal is fun to play with.

xtrapsp

2012-10-11 07:48:47

From: WT-Fakawi
Hahaha, nice one. I removed whatever info was in the player[] :)


I just reported this thread for that XD haha ignore it. I was going to change the pw and send him it for safety.

+ Repped for making an awesome script.


Try improving on detection of stuff though :) Look into TPA's

JaJaBinks

2012-10-11 07:49:49

From: WT-Fakawi
Hahaha, nice one. I removed whatever info was in the player[] :)

Haha, I noticed that shortly after and kept pressing edit trying to remove it. Thanks, greatly appreciated.

Thanks for the feedback. Felt like doing something out of usual ;).

Footy

2012-10-11 07:54:56

From: xtrapsp
I just reported this thread for that XD haha ignore it. I was going to change the pw and send him it for safety.


I don't think you can do this anymore, password changes first send an email to your email that you have to click on, or something like that. Nice first script though, keep it up, and try to learn a bit about antiban! :)

xtrapsp

2012-10-11 07:56:39

From: Footy
I don't think you can do this anymore, password changes first send an email to your email that you have to click on, or something like that. Nice first script though, keep it up, and try to learn a bit about antiban! :)


Really? Haha I got to the account settings page and refreshed here to find it solved :P

JaJaBinks

2012-10-11 08:17:52

From: Footy
Nice first script though, keep it up, and try to learn a bit about antiban! :)

Antiban features, to me, will be beyond simple. It's getting the initial grasp of the syntax. I'm quite familiar with C++, Java, and common web development languages.

I'm not positive, but none of the tutorials that mention anti-ban have anything to do with what they use to do back in 06. Moderator's would go to common botting locations and simply pick off bots. Bots are known to have their public chat off.

Now let's say we detect their crown in the chat and simply state "I'm trying to focus right now", or something along those lines.

Pairing that up with human like behavior, the script itself should be pretty hard to detect.

For as little effort as it would take to implement that, it surely could save your account. Whether or not moderator's go about checking locations, I do not know. However it is something I could see being done with the implementation of Botany Bay. Give you something to think about :P.

Just picked RS back up since the removal of the wilderness, so my common practices within RS may be off.

Source: http://runescape.wikia.com/wiki/Player_Moderator
The messages written by a Player Moderator can be seen even by players who have turned their public chat off. Private messages sent by a Player Moderator are also visible when private chat is turned off


From: xtrapsp

Try improving on detection of stuff though :) Look into TPA's

Haha, alright. I'll look into those. I originally stumbled across them, but I wasn't sure what's considered deprecated or inefficient. The tutorials contain a lot of great, useful knowledge, but lack an actual explanation. I'd like to know why things work the way they do, then how to, if you catch my drift.

Thanks for the feedback man.

xtrapsp

2012-10-11 08:41:03

From: JaJaBinks
Antiban features, to me, will be beyond simple. It's getting the initial grasp of the syntax. I'm quite familiar with C++, Java, and common web development languages.

I'm not positive, but none of the tutorials that mention anti-ban have anything to do with what they use to do back in 06. Moderator's would go to common botting locations and simply pick off bots. Bots are known to have their public chat off.

Now let's say we detect their crown in the chat and simply state "I'm trying to focus right now", or something along those lines.

Pairing that up with human like behavior, the script itself should be pretty hard to detect.

For as little effort as it would take to implement that, it surely could save your account. Whether or not moderator's go about checking locations, I do not know. However it is something I could see being done with the implementation of Botany Bay. Give you something to think about :P.

Just picked RS back up since the removal of the wilderness, so my common practices within RS may be off.



Haha, alright. I'll look into those. I originally stumbled across them, but I wasn't sure what's considered deprecated or inefficient. The tutorials contain a lot of great, useful knowledge, but lack an actual explanation. I'd like to know why things work the way they do, then how to, if you catch my drift.

Thanks for the feedback man.



A good place to start with the main antiban is to create a randomised case. Also experiment with making your own functions to call from inside SRL Core.

The best Anti-Ban is your own anti ban ;)

If you want tutorials on TPA's I have a few I can recommend:

http://villavu.com/forum/showthread.php?t=21786
http://villavu.com/forum/showthread.php?t=42428

riwu

2012-10-11 08:46:33

From: JaJaBinks
Antiban features, to me, will be beyond simple. It's getting the initial grasp of the syntax. I'm quite familiar with C++, Java, and common web development languages.

I'm not positive, but none of the tutorials that mention anti-ban have anything to do with what they use to do back in 06. Moderator's would go to common botting locations and simply pick off bots. Bots are known to have their public chat off.

Now let's say we detect their crown in the chat and simply state "I'm trying to focus right now", or something along those lines.

Pairing that up with human like behavior, the script itself should be pretty hard to detect.

For as little effort as it would take to implement that, it surely could save your account. Whether or not moderator's go about checking locations, I do not know. However it is something I could see being done with the implementation of Botany Bay. Give you something to think about :P.

Just picked RS back up since the removal of the wilderness, so my common practices within RS may be off.



Haha, alright. I'll look into those. I originally stumbled across them, but I wasn't sure what's considered deprecated or inefficient. The tutorials contain a lot of great, useful knowledge, but lack an actual explanation. I'd like to know why things work the way they do, then how to, if you catch my drift.

Thanks for the feedback man.

There is already a FindMod function in SRL which will log you out if a mod is found (if you didn't edit SetupSRL). FindNormalRandoms contains the function, and it solves many other stuffs (randoms, spin tickets) as well. I'd say the mods are not the greatest threat nowadays (guess they get bored with reporting bots too), and the bot watch has yet to show any effect (other than autotalkers).

J J

2012-10-11 08:49:13

Nice first script :) As you are mainly here for the syntax; unlike Java you don't need to put statements like this:
 if(FindColorTolerance(x, y, 4680833, MSX1, MSY1, MSX2, MSY2, 0)) then

You can simply put them like this
 if FindColorTolerance(x, y, 4680833, MSX1, MSY1, MSX2, MSY2, 0) then

I see you are using both options in the script :P I personally mix them aswell, I'm not sure why but in certain cases putting the statement in brackets can make it easier to read :)

Other than that for the script, nice to see you are also freeing DTM's. Quite a lot people forget to free them :P Good luck learning :)

The Killer

2012-10-11 10:44:18

From: Footy
I don't think you can do this anymore, password changes first send an email to your email that you have to click on, or something like that. Nice first script though, keep it up, and try to learn a bit about antiban! :)


^this, if u don't have email then u got to reg one to change the pass…