PDA

View Full Version : Function to help Babysit bots! (Even when your AFK!)



Luke L
07-18-2012, 03:45 PM
Hey all. I'm making this small autoing tutorial to help you babysit a bot. If your anything like me (working on a max cape), you don't like to leave bots alone too much. When I first joined I wanted this function, and luckily the SRL member Brandon helped me by writing it!

This tutorial will show you how to put a function into any existing script you may be using. The purpose of the function is to play a loud sound (of your choosing) from your computer speakers when it detects another person talking. That way you can watch movies, cook, play other games, etc. and not have to actually watch your script. It can also be used (for hardcore botters :stirthepot:) overnight. Simply wake up, respond to the person, world hop, and start your bot back up!

This function won't be for everyone nor for all scripts. It is geared towards scripts where you rarely have communication with anyone besides the occasional bot hunter or legit noob. Including Armoured zombies, waterfiends, wood cutting, crafting/alching at empty banks, etc!


Let's get started :spot:!


First, your going to need the function! Thanks to Brandon for letting me use this awesome function he wrote!!


Procedure SomeoneTalked;
var
I: Integer;
begin
FixChat;
OldLine := TheLine;

if(LastChatter(TheName))then
begin
GetLastChatText(TheLine);
if OldLine <> TheLine then
try
For I:= 0 To 5 do
begin
PlaySound('C:\Users\Luke\Downloads\Alarm.wav');
wait(150);
end;
writeln(TheLine);
except end;
end else
begin
GetLastChatText(TheLine);
if OldLine <> TheLine then
try
For I:= 0 To 5 do
begin
PlaySound('C:\Users\Luke\Downloads\Alarm.wav');
wait(150);
end;
writeln(TheLine);
except end;
end;
end;


Secondly, your going to need your .wav file. You can easily google for a .wav file you want. I choose one that makes a loud obnoxious alarm noise :P. This site has many .wav alarm files , and it's safe! I chose the first one (as seen in the pic below):
>>>>>>>>>>.http://soundjax.com/alarm-1.html<<<<<<<<<<<<<<<<
http://i47.tinypic.com/2yp15yh.png

Once you pick your sound (making sure it's a .wav) save it somewhere on your computer, just make sure you know where it is!

Now is where a bit of scripting comes in. Don't worry if you have NO experience at all! Neither did I, and I was helped through this. (but feel free to poke around your script some, you might learn something :D).

The first thing we're going to do is place the function in your script by copy and pasting. Make sure you post the procedure in the script decently high up. Also, don't put it in the middle of any procedures lol, just make sure you put it in between some procedures of the script towards the top (see the last example for more reference.)

Next your going to modify the function with your own file destination information. For example, you see it says "C:\Users\Luke\Downloads\Alarm.wav" in blue? All you have to do is change that to where YOUR .wav file is located on YOUR computer. It's not too hard to find :).
tip: make sure you replace it in BOTH spots in the function I gave you - there are two!

Now you will need to post this function in your script,

procedure FindMyRandoms;
begin
FindNormalRandoms;
SomeoneTalked;
end;


just make sure it's BELOW the larger function we just put in!


And Finally, after we have the function corrected to work for you personally, now we need to make the script so that it calls the procedure correctly.

Your script should have (if it doesn't.. Idk if it's safe to use!) a function called "FindNormalRandoms". All you have to do is use Ctrl + R, then type in "FindNormalRandoms", and replace it with "FindMyRandoms". What this is doing is changing every place in the script it checks for randoms, to make it run your new procedure that checks for randoms AND checks for talking!

Here is an example of how the final product should kind of look like.
note: this is for the script I was using, so it shouldn't look EXACTLY like this. But as for the placement of the procedures, etc. - this is what you should aim for.

Procedure InitializeVariables;
begin
if (Length(Food) = 0) then
begin
SetLength(Food, 1);
Food[0]:= 'none';
end;

if (Potion = '') then
Potion:= 'none';

if (Closed = False) then
TerminateScript;
end;
Procedure SomeoneTalked;
var
I: Integer;
begin
FixChat;
OldLine := TheLine;

if(LastChatter(TheName))then
begin
GetLastChatText(TheLine);
if OldLine <> TheLine then
try
For I:= 0 To 5 do
begin
PlaySound('C:\Users\luke\Music\ALARM.wav');
wait(150);
end;
writeln(TheLine);
except end;
end else
begin
GetLastChatText(TheLine);
if OldLine <> TheLine then
try
For I:= 0 To 5 do
begin
PlaySound('C:\Users\luke\Music\ALARM.wav');
wait(150);
end;
writeln(TheLine);
except end;
end;
end;
procedure FindMyRandoms;
begin
FindNormalRandoms;
SomeoneTalked;
end;



And there you have it! Now every time your script checks to see if you are in a random, it will also use the "SomeoneTalked" function to see if anyone has spoken in the chat (most of the time, it's to you), and if so it will then play the loud file you choose to alert you! This is also particularly helpful because a good majority of randoms cause your character to autorespond like "uh-oh!". It will also detect this, so you can manually solve the random if you wish.

Congrats , now you can go do other things - just make sure your speakers are turned up nice and loud ^.^!

Note: I am not a very good scripter, just guide writer. I am learning scripting , and this guide was made possible by the help of the SRL member Brandon, and scripting tips from Sir R. M8gic1an. There may be problems when it comes to replacing the "FindNormalRandoms" if your script doesn't have it.. I will be reworking the guide to try to fix that too. Thanks for your consideration!

Tlachtli
07-18-2012, 03:51 PM
Looks pretty neat :p

I myself play with chat set to friends only (plausible denyability without looking too suspicious), but for those who play with chat on this looks like a great little function. Now you just need to include a link to a WAV of the alert sound from MGS.

Luke L
07-18-2012, 03:54 PM
Looks pretty neat :p

I myself play with chat set to friends only (plausible denyability without looking too suspicious), but for those who play with chat on this looks like a great little function. Now you just need to include a link to a WAV of the alert sound from MGS.

Glad you liked it ^.^ - I intend to evolve this guide to include the Google text thing that can send you texts messages...but that'll be quite a project.

And yeah, I understand the chat set to friends thing, but it's just that ban's are probably 95% from reports, so I figure if I can avoid every report, I'm basically ban proof ^.^!

and what do you mean the link to a WAV of the alert sound form MGS?

(not sure what MGS is , but that link I gave has a choice of several .WAV files to give you guys some choices :D)

Joe
07-18-2012, 03:56 PM
Until you get trolled because two people are having a conversation.

Sin
07-18-2012, 03:57 PM
Nice guide ;P

Luke L
07-18-2012, 03:58 PM
Until you get trolled because two people are having a conversation.

That has only happened ONCE in 3 months of botting for me at AZK. I was like "wtf..? Damn legits :p..."

but that's part of using the function only in places that are either empty, or where other people are most likely botting (ivy's, zombies, etc.).

also edit: That one time was a small price to pay, for the probably once every two days it saved my ass from someone being like "hey.. whats your str level?". =)


Nice guide ;P

<3 sin :)

Joe
07-18-2012, 04:03 PM
It's a great idea... I hate babysitting wc to make sure people are no like "wc lvls all?" and "say qqqttfff if your not a bot =Þ"

Luke L
07-18-2012, 04:12 PM
It's a great idea... I hate babysitting wc to make sure people are no like "wc lvls all?" and "say qqqttfff if your not a bot =Þ"

Exactly! Ivy's are great because the majority of the people are either a bot themselves, or just afking watching tv / clan chatting.

So it's nice because you can like lay in bed and watch a movie, or play COD/BF and after a few hours if a bot hunter come, you can just reply to them and they usually leave, or if they are particularly annoying you can world hop - all while avoiding the report :D!

Tlachtli
07-18-2012, 04:13 PM
(not sure what MGS is , but that link I gave has a choice of several .WAV files to give you guys some choices :D)

It's just a videogame series, Metal Gear Solid. The alert sound when the player is caught is very noticable :P

Luke L
07-18-2012, 04:15 PM
It's just a videogame series, Metal Gear Solid. The alert sound when the player is caught is very noticable :P

Oh, hahahaha =).

I'm sure that wouldn't be hard to find if you really wanted it ^.^

Brandon
07-18-2012, 04:44 PM
Lookin Good! :)

Luke L
07-18-2012, 04:46 PM
Lookin Good! :)

Thanks buddy, it's all due to your help =)!

Hope I get some feedback soon from someone who utilizes it so that I can make anything clear that may be confusing :x

edit: and I see you leachers - you noobs better register and start contributing!
http://i49.tinypic.com/w0p73q.png

Hazzah
07-18-2012, 07:05 PM
Nice little add here Luke, might have to start adding this do scripts that I use!

+1'd you!

Luke L
07-18-2012, 07:09 PM
Nice little add here Luke, might have to start adding this do scripts that I use!

+1'd you!

Thanks buddy :), and yeah it's quite useful. Just make sure you don't put it on anything that might go wacko if your around a lot of people :p.

Hazzah
07-19-2012, 02:07 AM
Thanks buddy :), and yeah it's quite useful. Just make sure you don't put it on anything that might go wacko if your around a lot of people :p.

Haha, probably going to use it for farming + hunter since not many people do those legit.

Luke L
07-19-2012, 02:26 AM
Haha, probably going to use it for farming + hunter since not many people do those legit.

Oooh yeah hunter is a damn good one. My guide + Ashmans salamanders = 99 hunter fast and easy ^.^

Oh and when you actually do implement it, please let me know if any parts were confusing or not. Thanks!

litoris
07-19-2012, 07:55 AM
Nice guide, you should probably talk about the SRL Random Tool, it tells you when you get a random and you only need to paste 1 line of code.

Luke L
07-19-2012, 05:26 PM
Nice guide, you should probably talk about the SRL Random Tool, it tells you when you get a random and you only need to paste 1 line of code.

Well the script usually solves them for you, that way you don't want to be alerted to a random if your sleeping, that could easily be solved on it's own already.

But thanks for the idea, I'll keep that in mind ^.^!

Benny
07-24-2012, 12:46 AM
This looks good well done on this guide :)

Luke L
07-24-2012, 04:58 AM
This looks good well done on this guide :)

Thanks :)!

kazzos
07-24-2012, 05:44 AM
Thanks a lot Luke, I like to have my bots running in the background whilst I am on my computer. Can't wait for the update of SRL to test this out.

Luke L
07-24-2012, 06:57 PM
Thanks a lot Luke, I like to have my bots running in the background whilst I am on my computer. Can't wait for the update of SRL to test this out.

Your welcome =)!

Peanuts
08-18-2012, 06:09 AM
This is awesome man!
No more having to constantly look back at the screen to see if a bot hunters talking to me.

Trying it out now.

Luke L
08-18-2012, 06:58 PM
This is awesome man!
No more having to constantly look back at the screen to see if a bot hunters talking to me.

Trying it out now.

Glad you like it, it is definitely very handy! In a month or so when I'm ready to use ashman's salamander script, I'll definitely be implementing this function into it so that I can play cod and what not while it hunts for me ^.^

Ian
08-19-2012, 09:41 PM
If you get around to making that text function it would be cool if it could text you what the other player said so you'd know if you should respond. Also it would it be cool but probably impossible if it could respond by your text message

Luke L
08-20-2012, 01:11 AM
If you get around to making that text function it would be cool if it could text you what the other player said so you'd know if you should respond. Also it would it be cool but probably impossible if it could respond by your text message

I think that both of those are definitely possible. I'm not currently using simba, but when I get around to using it again - then I'll probably try something like that!