SRL Archive - SRL Suggestions

Some lobby functions - LobbyTab, GetLobbyTab, JoinLobbyClan, LeaveLobbyClan


Bionicle

2010-03-03 18:08:03

{*******************************************************************************
function GetLobbyTab: Integer;
By: Bionicle1800
Description: Gets current lobby tab.
*******************************************************************************}
function GetLobbyTab: Integer;
var
T: Integer;

begin
for T := 0 to 4 do
begin
if GetColor(97 + T*123, 31) = 7375258 then
begin
result := T + 1;
exit;
end;
end;
end;

{*******************************************************************************
function LobbyTab(Tab: Integer): Boolean;
By: Bionicle1800
Description: Goes to the lobby tab specified by the integer 'Tab'.
Valid arguments are 1 through 5.
*******************************************************************************}
function LobbyTab(Tab: Integer): Boolean;
begin
if not InRange(Tab, 1, 5) then
begin
Srl_Warn('LobbyTab', 'Tab ' + IntToStr(Tab) + ' is not valid.', warn_AllVersions);
exit;
end;
result := GetLobbyTab = Tab;
if result then
exit;
Mouse(97 + (Tab-1)*123, 31, 6, 6, true);
Wait(30);
result := GetLobbyTab = Tab;
end;

{*******************************************************************************
function JoinLobbyClan(Clan: String): Boolean;
By: Bionicle1800
Description: Joins a clan chat in the lobby specified by the string 'Clan'.
*******************************************************************************}
function JoinLobbyClan(Clan: String): Boolean;
begin
if LobbyTab(4)then
begin
if GetColor(308, 273) = 7838847 then
begin
Mouse(RandomRange(233, 533), RandomRange(269, 292), 0, 0, true);
Wait(100+Random(50));
TypeSend(Clan);
if GetColor(294, 290) = 7838847 then
begin
Mouse(RandomRange(265, 377), RandomRange(287, 307), 0, 0, true);
Wait(1000+Random(500));
result := true;
end;
end;
end;
end;

{*******************************************************************************
function LeaveLobbyClan: Boolean;
By: Bionicle1800
Description: Leaves a clan chat in the lobby.
*******************************************************************************}
function LeaveLobbyClan: Boolean;
begin
LobbyTab(4);
if GetColor(308, 273) = 6842472 then
begin
Mouse(233+random(300), 269+random(21), 0, 0, true);
result := true;
end;
end;

Comments, additions, corrections, fixes, commits are all welcome and appreciated :p

i luffs yeww

2010-03-03 18:18:37

What's a Lobby? .-.

lordsaturn

2010-03-03 18:38:43

And how would this help us auto?

Edit: this?

YoHoJo

2010-03-03 18:41:37

New LoginScreen/Lobby:
http://villavu.com/forum/showthread.php?t=55356

Bionicle

2010-03-04 15:50:10

From: lordsaturn
And how would this help us auto?

Edit: this?


Going into clans for AntiBan…setting up graphics, choosing worlds..
I like joining clans for AntiBan :p

E: So, good idea, bad idea, totally horrible idea..?

Blumblebee

2010-03-04 16:05:40

seems a tad useless tbh :/ Well not useless, but not useful enough to be put in the include persay.

Awkwardsaw

2010-03-04 16:51:08

From: Blumblebee
seems a tad useless tbh :/ Well not useless, but not useful enough to be put in the include persay.


nor is friends.scar, or findxp :p

Blumblebee

2010-03-04 16:52:00

From: Awkwardsaw
nor is friends.scar, or findxp :p


I can agree with friends.scar but findXP can be useful :)

Awkwardsaw

2010-03-04 16:53:49

it is sort of usefull, but all it is is a giant case, and 2 algorithims :)

Bionicle

2010-03-04 17:00:19

From: Blumblebee
seems a tad useless tbh :/ Well not useless, but not useful enough to be put in the include persay.


From: Awkwardsaw
nor is friends.scar, or findxp :p


From: Blumblebee
I can agree with friends.scar but findXP can be useful :)


From: Awkwardsaw
it is sort of usefull, but all it is is a giant case, and 2 algorithims :)


This is more useful then friends.scar imo :p

Sir R. M8gic1an

2010-03-05 14:35:58

of course it's useful. Setting Graphics, Switching worlds.

~RM

Bionicle

2010-03-05 15:25:04

From: Rasta Magician
of course it's useful. Setting Graphics, Switching worlds.

~RM


I actually fixed most of WorldSwitcher.scar, as it broke during the lobby update, and used two of these functions to fix it if you want to take a look at it.
http://villavu.com/forum/showthread.php?t=55393