Objects searching Orion Assistant - Hotride/OrionUO GitHub Wiki
Command format:
ReturnType NameSpace.name(requiredParameters, [optionalParameters=defaultValue]);
-
ReturnType - the return value of the function (void - the function returns nothing);
-
NameSpace - the scope of the function;
-
name - the name of the function;
-
requiredParameters - required parameters;
-
optionalParameters - optional parameters, the default value is indicated after the = sign
flags - search filters:
-
fast - the search stops on the first found object;
-
near - search for the nearest object to the character;
-
mobile - search only for alive creatures;
-
item - search only inanimate objects;
-
human - search only for humanoid creatures, types: 0x0190-0x0193, 0x03DB, 0x03DF and 0x03E2;
-
live - search only for living creatures;
-
dead - search only for dead creatures, types: 0x0192 and 0x0193.
-
injured - Searching for a friend with lowest HP (works only for FindFriend/FindEnemy).
-
next - Searching for next object (works only for FindFriend/FindEnemy).
-
ignorefriends - ignores friends(Introduced in OA 2.0.8.0).
-
ignoreenemies - ignores enemies (Introduced in OA 2.0.8.0).
-
ignoreself - ignores self (Introduced in OA 2.0.8.0).
-
inlos - line of sight check (Introduced in OA 3.0.0.0).
When using human, live или dead - mobile flag is set automatically.
When using next - fast flag is set automatically.
notoriety - Wickedness of the desired character.
-
innocent/blue (1)
-
friendly/green (2)
-
gray (3)
-
criminal (4)
-
enemy/orange (5)
-
murderer/red (6)
-
invulnerable/yellow (7)
distance - The search distance.
In addition to numerical values, it can take string constants: finddistance, usedistance, opencorpsedistance.
(Introduced in OA 3.0.0.0) If the distance indicates 'xyz: 1,2,3' - a search is performed only in the specified coordinates. To ignore the axis for x, y use -1, for z -1000. For example, a search on X and Z: "xyz: 1504, -1.30" (search at x = 1504 and z = 30) or "xyz: 772" - search for items for which X is 772.
void Orion.UseType('graphic', ['color'=0xFFFF], ['container'=self], [recurse=true]);
Search for an object by type and color in the container.
-
- graphic - Type or list of types. 0xFFFF is ignored.
-
- color - The color or list of colors. 0xFFFF is ignored.
-
- container - The container in which the search is performed.
-
- recurse - Recursive search for sub-containers.
void Orion.UseFromGround('graphic', ['color'=0xFFFF], ['distance'=useObjectsDistance], ['flags']);
Search for an object by type and color on the ground.
-
- graphic - Type or list of types. 0xFFFF is ignored.
-
- color - The color or list of colors. 0xFFFF is ignored.
-
- distance - The search distance.
-
- flags - Search filter flags.
bool Orion.UseTypeList('listName', ['container'=self], [recurse=true]);
Search for an object from the find list in the container.
-
- listName - The name of the find list.
-
- container - The container in which the search is performed.
-
- recurse - Recursive search for sub-containers.
Result: true if the object was found and used.
bool Orion.UseFromGroundList('listName', ['distance'=useObjectsDistance], ['flags']);
Search for an object on the find list on the ground.
-
- listName - The name of the find list.
-
- distance - The search distance.
-
- flags - Search filter flags.
Result: true if the object was found and used.
StringList Orion.FindType('graphic', ['color'=0xFFFF], ['container'=backpack], ['flags'], ['distance'=searchObjectsDistance], ['notoriety'], [recurse=true]);
Search for an object by type and color.
-
- graphic - Type or list of types. 0xFFFF is ignored.
-
- color - The color or list of colors. 0xFFFF is ignored.
-
- container - The container in which the search is performed.
-
- flags - Search filter flags.
-
- distance - The search distance.
-
- notoriety - Wickedness of the desired character.
-
- recurse - Recursive search for sub-containers.
Result: List of found serials.
void Orion.Ignore('serial', [state=true]);
Set / remove the ignore flag on the serial object.
void Orion.IgnoreReset();
Remove the ignore flag from all objects.
GameObject Orion.FindObject('serial');
Result: an object of type GameObject or null.
int Orion.Count('graphic', ['color'=0xFFFF], ['container'=self], ['distance'=searchObjectsDistance], [recurse]);
Returns the total number of items (the number of items, not the number of objects found).
-
- graphic - Type or list of types. 0xFFFF is ignored.
-
- color - The color or list of colors. 0xFFFF is ignored.
-
- container - The container in which the search is performed.
-
- distance - The search distance.
-
- recurse - Recursive search for sub-containers.
Result: the amount of items.
void Orion.ResetIgnoreList();
Reset the use of the ignore list.
void Orion.UseIgnoreList('listName');
Use ignore list listName.
StringList Orion.FindList('listName', ['container'=backpack], ['flags'], ['distance'=searchObjectsDistance], ['notoriety'], [recurse=true]);
Search for an object in the find list.
-
- listName - The name of the find list.
-
- container - The container in which the search is performed.
-
- flags - Search filter flags.
-
- distance - The search distance.
-
- notoriety - Wickedness of the desired character.
-
- recurse - Recursive search for sub-containers.
GameObject Orion.ObjAtLayer('layerName', ['serial'=self]);
Result: an object of type GameObject in the specified layer of the object 'serial' or null.
String Orion.FindFriend(['flags'=fast], ['distance'=searchObjectsDistance]);
Searching for a friend serial from friends list.
-
- flags - Searching filter flags.
-
- distance - Searching distance.
String Orion.FindEnemy(['flags'=fast], ['distance'=searchObjectsDistance]);
Searching for an enemy serial from enemies list.
-
- flags - Searching filter flags.
-
- distance - Searching distance.
Introduced in 3.0.0.0
void Orion.SetLOSOptions('options');
Set options for the LOS calculation function.
Available options:
'sphere' - LOS function for the Sphere emulator;
'sphereadvanced' - LOS function for the Sphere emulator (C and above);
'runuo' - LOS function for RunUO / ServUO emulator;
'pol' - LOS function for the POL emulator;
'spherecheckcorners' - Option only for the Sphere emulator, check angles;
'polusenoshoot - Option only for the POL emulator, using the No Shoot flag;
'pollosthroughtwindows' - Option only for POL emulator, visible through windows.
Allowed to combine flags: Orion.SetLOSOptions ('pol|pollosthroughtwindows');
bool Orion.InLOS('serial');
Checking the visibility of the serial object.
Result: true if the object is in direct visibility, false if not.
bool Orion.InLOS(x, y, [z=65535]);
Check visibility to coordinates.
If z = 65535 then the search is ignored z.
Result: true if the point is in direct visibility, false if not.
GameObjectList Orion.FindTypeEx('graphic', ['color'=0xFFFF], ['container'=backpack], ['flags'], ['distance'=searchObjectsDistance], ['notoriety'], [recurse]);
Search for an object by type and color.
-
- graphic - The type or list of types to search. 0xFFFF is ignored.
-
- color - The color or list of colors to search. 0xFFFF is ignored.
-
- container - The container in which the search is performed.
-
- flags - Search filter flags.
-
- distance - Search distance.
-
- notoriety - The spite of the desired character.
-
- recurse - Recursive search on subcontainers.
Result: A list of found objects of type GameObject.
GameObjectList Orion.FindListEx('listName', ['container'=backpack], ['flags'], ['distance'=searchObjectsDistance], ['notoriety'], [recurse]);
Search for an object in a search list.
-
- listName - The name of the search list.
-
- container - The container in which the search is performed.
-
- flags - Search filter flags.
-
- distance - Search distance.
-
- notoriety - The spite of the desired character.
-
- recurse - Recursive search on subcontainers.
Result: A list of found objects of type GameObject.