Scripting Resources & Utilities > Stealth Snippets\Library
GM detect
Chrisok:
i use this for fs uosa change names if you know them.
--- Code: ---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.
--- End code ---
Crome969:
manwinc:
Phhhh.... This would be Useful IF GM's Existed anymore...
Insideout:
They still exist I have one drop by the house every time the lil razor running punks decided they think I'm scripting lol
Chrisok:
Yea, the one i personally use (has maybe an additional 10 lines) scans for people trying to talk to the bot, with about 10 different catchphrases to scan for.. posted this as something to develop from. Originally found it on a russian shard site not working so i fixed for the freeshards i play
Navigation
[0] Message Index
[#] Next page
Go to full version