n3ss3s
2007-12-03 10:44:46
I noticed that SRL has no function for getting the name of a sender of some message.
I remember I had an attempt for this in my Program Files\SCAR 2.03\ in some script which never ended up released.
Anyways, now it works perfectly, and clears the ' : ' out of the end of the name.
So, returns only the name, and in its original caption.
Behold -
Simple isn't it, but works even better :)
Also, it is SantySafe which means that Santa_Clause has no hope of shortening it =]
I remember I had an attempt for this in my Program Files\SCAR 2.03\ in some script which never ended up released.
Anyways, now it works perfectly, and clears the ' : ' out of the end of the name.
So, returns only the name, and in its original caption.
Behold -
{*************************************************]
[ Function GetMessageChatter(Msg: String): String ]
[ By: n3ss3s ]
[ Description: If finds the message Msg in the ]
[ chatbox, returns who sent it. ]
[*************************************************}
Function GetMessageChatter(Msg: String): String;
Var
X, Y: Integer;
Begin
If (FindText(X, Y, Msg, Smallchars, MCX1, MCY1, MCX2, MCY2)) Then
Result := Replace(GetTextAtEx(10, y, 5, SmallChars, False, False, 0, 0,
0, 50, False, tr_allChars), ':', '');
End;
Simple isn't it, but works even better :)
Also, it is SantySafe which means that Santa_Clause has no hope of shortening it =]