SRL Archive - SRL Archives

GameTab.Scar ~~ InClan/JoinClan


Baked0420

2009-10-25 15:42:54

I made a function, InClan, that returns whether or not you are in a clan, previously I had made JoinClan, so whenever I login it would join a clan, but with the new update, if you were in a clan when you logged out, it'd auto-join you back in, so I made a function to determine whether or not you were already in a clan to see if you needed to join a clan. I will also make InClan(ClanName: String);, I just thought of it now, but I'm going to make so it sees if you are in the clan of the string entered, and if the string entered = '', then it'll just see if you are in any clan or not. For now, here's Function InClan: Boolean; and procedure JoinClan(ClanName: String); :



{*******************************************************************************
function InClan;
by: Baked0420
description: Checks if you are in a clan
*******************************************************************************}
function InClan: Boolean;
var
x, y: Integer;
begin
If(GetCurrentTab <> Tab_Clan) then
GameTab(Tab_Clan);
Result:= not(FindBitmapMaskTolerance(CreateBitmapMaskFromText('Not in chat', StatChars), x, y, MIX1, MIY1, MIX2, MIY2, 50, 10));
end;



{*******************************************************************************
procedure JoinClan(CharacterName: String);
by: Baked0420
description: Joins the clan of the character name you put in.
*******************************************************************************}
procedure JoinClan(ClanName: String);
var
x, y: Integer;
begin
if(not(InClan)) then
begin
If(GetCurrentTab <> Tab_Clan) then
GameTab(Tab_Clan);
Wait(200 + random(200));
if(FindBitmapMaskTolerance(CreateBitmapMaskFromText('Join Chat', StatChars), x, y, MIX1, MIY1, MIX2, MIY2, 50, 10)) then
MouseBox(x, y, x+45, y+10, 1);
Wait(100 + random(200));
TypeSend(ClanName);
end;
end;


Awkwardsaw

2009-10-25 15:56:48

iv tried making a whole clanchat.scar a while ago, but it wasnt accepted :(

but i like yours :p

also, i think this belongs in /misc/

e: forgot you said gametab in the titles XD

Baked0420

2009-10-25 16:11:57

thanks :) and yea, it would go in gametab.

any suggestions?

Naike

2009-10-25 16:38:23

I'm sorry to say that this has been suggested before, and denied.
I can only speak for myself, when I say that I won't add it.

Nice work tho :thumbsup:

Baked0420

2009-10-25 17:24:36

thanks, makes me feel good when a Dev says good job :)

but why not add it? there are no clan procedure/functions in gametab, and there is Tab_Clan, and people could use it for auto-talking/anti-ban, well, your the dev, your choice, I think it could be useful, but if people want to use it, they can just copy/paste + credit, doesn't have to be in include.

Naike

2009-10-25 17:33:46

GameTab is getting stuffed up as it is…

I know people hate to hear this, but maybe in the near future.

Sir R. M8gic1an

2009-10-25 17:47:28

I don't see an actual use for this, perhaps antiban, and i see nothing wrong in including it;

~RM

Narcle

2009-10-25 19:08:23

Its more like an "extra" and not really required. I doubt a script is gonna have a conversation in the clan channel. ;)