i use this for fs uosa change names if you know them.
Unit GM_detect;
interface
function is_GM_around():boolean;
function does_GM_name_match(ID:cardinal):boolean;
implementation
Var
GM_name_contains :array of string; // general prefixes+official uosa staff
function does_GM_name_match(ID:cardinal):boolean;
var
HisName:String;
i:integer;
begin
HisName := GetName(ID);
GM_name_contains := ['GM','Seer', 'Counselor', 'Helper', 'Administrator', 'Admin','GM_name1', 'GM_name2', 'GM_name3', 'GM_name4', 'Derrick', 'Kaivan'];
For i:= Low(GM_name_contains) to High(GM_name_contains) do
begin
if (BMSearch(1,HisName,GM_name_contains[i])>0) then
begin
// the name of the character mached with one of known GM names
AddToSystemJournal('Found by a GM, CARE');
Result := true;
Exit;
end;
end;
Result := false;
end;
function is_GM_around():boolean;
var
GM_ID :Cardinal;
begin
FindDistance := 30;
GM_ID := FindType($0190, Ground); // looking for a male GM
if (GM_ID >0) then
if (does_GM_name_match(GM_ID)) then
begin
Result := true;
Exit;
end;
GM_ID := FindType($0191, Ground); // looking for a female GM
if (GM_ID >0) then
if (does_GM_name_match(GM_ID)) then
begin
Result := true;
Exit;
end;
// Found no Staff
Result := false;
end;
begin
AddToSystemJournal('Found Nothing, Keep Macroing');
end.