SRL Archive - Outdated / Broken

[Bam Bam] Friend Adder


Bam Bam

2007-04-25 12:47:50

Ive tested it and it worked well for me.
Shouldn't have many bugs if any, its a rather simple script.


program FriendScript;
{.include SRL\SRL.SCAR}

const
StartPlayer = 0;

var
i: integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := StartPlayer;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;

end;

function exists(Name: string): boolean;
begin
result := false; //Assumed failure
if(not(GetCurrentTab = 8))then
GameTab(8);
if(FindInventoryText(capitalize(Name)))then
begin
WriteLn('Player ' + Name ' is already on friends list!');
result := true;
end;
end;

procedure AddFriend(Name: string);
begin
if(not(loggedin))then
exit;
if(Exists)then
Exit;
if(not(Capitalize(Players[i].Name) = capitalize(Players[CurrentPlayer].Name)))then
begin
Mouse(590, 435, 20, 10, true);
while(not(FindText(x, y, 'add', UpChars, MCX1, MCY1, MCX2, MCY2)))do
WWait(250 + random(250));
TypeSend(Name);
end;
end;

begin
ActivateClient;
SetupSRL;
DeclarePlayers;
repeat
if(not(loggedin))then
LoginPlayer;
WWait(5000 + random(5000));
FindNormalRandoms;
for i := 0 to howmanyplayers - 1 do
begin
if(not(loggedin))then
break;
Wait(100);
Addfriend(Players[i].Name);
WWait(1000 + random(500));
end;
FindNormalRandoms;
NextPlayer(false);
until(not(loggedin))
end.

c0de

2007-04-25 14:39:34

Nice idea! :)

EDIT:
Ahh one more thing, you don't need Result := False; Every function begins as false :)

Bam Bam

2007-04-25 15:10:38

Thanks code, I never knew that :)

Edit:
And this wasn't really my idea, I got the idea from Fawki who said he had one so I decided I would make my own and release it.

And looking at your location, How can you be in two places? :confused:

c0de

2007-04-25 17:50:27

Erm, the country name is ''Bosnia and Herzegovina". Google it up a bit. ;)

Bam Bam

2007-04-25 18:29:23

Oh, I guess I learn something or more new each day :redface:

rkroxpunk

2007-04-28 04:10:03

Don't mean this in an offensive way at all. It's a pretty nice script, but what's the point of it? I mean it's not like it takes long to add someone to ur friends list. Is it more for adding into another script or something?

Boreas

2007-04-28 21:06:08

From: rkroxpunk
Don't mean this in an offensive way at all. It's a pretty nice script, but what's the point of it? I mean it's not like it takes long to add someone to ur friends list. Is it more for adding into another script or something?


How many do you have in your army?