From Stealth Client

Jump to: navigation, search


F

FileExists

function FileExists(FileName : String) : Boolean

FillNewWindow

procedure FillNewWindow(s: String)

The external InfoWindow can be filled by using this method.

Example:

FillNewWindow('Hello World');

Will add Hello World to Info Window.

FindAtCord

function FindAtCoord(X:Word; Y:Word):Cardinal

returns the last point found in the specified object.

Example:

ObjId:= FindAtCoord(GetX(Self), GetY(Self));

FindCount

function FindCount():Integer

Returns the number of aytemov found by using the functions Doc:Api/FindType or Doc:Api/FindTypeEx

In calculating the count should be borne in mind that a stack of several "stekirovannyh" aytemov is considered as one aytem!

If nothing is found - return 0.

Example:

FindType(runes, backpack);
  AddAddToSystemJournal('Runes found:' + IntToStr(FindCount));

FindDistance

var FindDistance:Integer

specifies the range of search functions Doc:Api/FindType or Doc:Api/FindTypeEx on the horizontal cells

For example, 3 - so will look at each other and within a radius of three cells.

The default value is 2(taken as the default on most servers as the maximum distance at which an ordinary player under normal conditions can raise or put the thing)

Example:

FindDistance:= 0;'' to look only under current position
FindType(bandage_type, ground);
  AddAddToSystemJournal('Bandages found:' + IntToStr(FindQuantity));

For Python this function is spreaded into two separate functions: GetFindDistance() and SetFindDistance(integer).

FindFullQuantity

function FindFullQuantity:Integer

Returns the total number of aytemov found by using the functions Doc:Api/FindType or Doc:Api/FindTypeEx

Summ of stacked items!

If the stacks(stacks) in the search results do not, then the function returns a number equal to the value of the returns one of the Doc:Api/FindCount

If nothing is found - return 0.

Example:

FindType(BM, backpack);
  AddAddToSystemJournal('BM total found:' + IntToStr(FindFullQuantity));

FindItem

function FindItem():Cardinal

Returns the last object found using the function Doc:Api/FindType or Doc:Api/FindTypeEx

If nothing is found - return 0.

Example 1:

if FindTypeEx(bottle_type,bottle_color,Ground,false) > 0 then
begin
  UseObject(FindItem);
end;

Example 2:

  IF FindType($190,ground) > 0 THEN
    WaitTargetObject(FindItem);

FindNotoriety

function FindNotoriety(ObjType:Word; Notoriety:Byte):Cardinal

Searches for the specified object type ObjType and said, "color" * Notoriety.

To Land

Search results for:

At the distance of the search depends on:

  • Doc:Api/FindDistance - specifies the search range for the horizontal cells. 3 - then will look at each other and within a radius of three cells. The default value is 2(taken as the default on most servers as the maximum distance at which an ordinary player under normal conditions can raise or put the thing)
  • Doc:Api/FindVertical - specifies the search range for the vertical. The default is 5, so as not to affect adjacent floors in the search.

If nothing is found - return 0.

The parameter Notoriety can be used:

  • 1 - innocent(blue)
  • 2 - guilded/ally(green)
  • 3 - attackable but not criminal(gray)
  • 4 - criminal(gray)
  • 5 - enemy(orange)
  • 6 - murderer(red)

0 and 7, the client can not get

Example:

if FindNotoriety($190,6) > 0 then
begin
  AddAddToSystemJournal('Murderer found!');
  '' Make something ''
end;
  • Actually Notoriety - translated as "infamous." But that translation is somehow not very applicable.

FindQuantity

function FindQuantity():Integer

Returns the number of aytemov the stack of the last object found by the functions Doc:Api/FindType or Doc:Api/FindTypeEx

If the latter is not aytem stack(stack), it returns a

If nothing is found - return 0.

Example:

FindType(BM, backpack);
  AddAddToSystemJournal('BM in last found stack:' + IntToStr(FindQuantity));

FindType

function FindType(ObjType:Word; Container:Cardinal):Cardinal

Searches for the specified object type ObjType in the container, Container.

It will NOT look in pouches (containers within the specified container). For such a search refer to Doc:Api/FindTypeEx; in fact, Findtype = FindTypeEx(ObjType, $FFFF, Container, false); If the object satisfies all the conditions, before adding it to FindedList its presence in the IgnoreList is verified. If the object is ignored - then then it won't be part of the selection. For more details, see Doc:Api/Ignore

Search results for:

  • A list of found objects is stored in the FindedList, which can be obtained trough the function Doc:Api/GetFindedList
  • The last object was found is recorded and can be obtained using Doc:Api/FindItem
  • The last object found is returned as result of this function
  • The Doc:Api/FindCount function record the count of found items (a pile of several stackable items is considered as one item!)
  • The Doc:Api/FindQuantity returns the ammount of stack if the latter is a pile
  • The Doc:Api/FindFullQuantity records the total number of items in all the found stacks (if there are no results, it will be equal to Doc:Api/FindCount

At the distance of the search depends on:

  • Doc:Api/FindDistance - specifies the search range for the horizontal cells. F.E.: 3 - then Stealth will look within a radius of three tiles. The default value is 2 (taken as the default on most servers as the maximum distance at which an ordinary player under normal conditions can interact with objects)
  • Doc:Api/FindVertical - specifies the search range for the vertical. The default is 5, so to avoid items in adjacent floors.

If nothing is found - return 0.

The parameter Container can be used:

If you specify a nonexistent container ID, the search is performed in the backpack of your character.

If ObjType = -1 - will be returned all objects in container\ground (with considering of FindDistance and FindVertical)

Example 1:

//Pascal Script
if FindType(bottle_type,Ground) > 0 then
begin
  UseObject(FindItem);
end;
#Python
if FindType(bottle_type, Ground()):
  UseObject(FindItem())

Example 2:

  //Pascal Script
  FindType(runes, backpack);
  AddAddToSystemJournal('Runes found:' + IntToStr(FindCount));
  #Python
  FindType(runes, Backpack())
  AddAddToSystemJournal('Runes found: {0}'.format(FindCount()))

FindTypeEx

function FindTypeEx(ObjType:Word; Color:Word; Container:Cardinal; InSub:Boolean):Cardinal

Searches for the specified object type ObjType and color Color in that container, Container.

InSub includes a search mode in the pouches(containers within the specified container).

Search results for:

  • A list of found objects is stored in the FindedList, which can be obtained, ipolzuya function Doc:Api/GetFindedList
  • The last object was found recorded in the Doc:Api/FindItem
  • The last object found is returned rezutatom perform this function
  • The Doc:Api/FindCount recorded count found aytemov(a stack of several "stekirovannyh" aytemov is considered as one aytem!)
  • The Doc:Api/FindQuantity entered aytemov count on the stack(the stack), if the latter is aytem stack(stack)
  • The Doc:Api/FindFullQuantity recorded the total number of aytemov all I found stacks(if such there in the results, it will be equal to Doc:Api/FindCount

At the distance of the search depends on:

  • Doc:Api/FindDistance - specifies the search range for the horizontal cells. 3 - then will look at each other and within a radius of three cells. The default value is 2(taken as the default on most servers as the maximum distance at which an ordinary player under normal conditions can raise or put the thing)
  • Doc:Api/FindVertical - specifies the search range for the vertical. The default is 5, so as not to affect adjacent floors in the search.

If nothing is found - return 0.

The parameter Container can be used:

If you specify a nonexistent container ID, the search is performed in a backpack chara The parameter Color can be used:

  • $ FFFF(-1) - if the color is not considered in the search
  • The color you want aytema

FindTypeEx with parameters Color = $ FFFF and InSub = False still function Doc:Api/FindType

Example 1:

if FindTypeEx(bottle_type,bottle_color,Ground,false) > 0 then
begin
  UseObject(FindItem);
end;

Example 2:

  FindTypeEx(runes, runes_color, backpack, true);
  AddToSystemJournal('Runes found:' + IntToStr(FindCount));

FindTypesArrayEx

FindTypesArrayEx(ObjTypes,Colors : Array of Word; Containers : Array of Cardinal; InSub : Boolean) : Cardinal

Searches for the specified array of types ObjTypes and array of colors Colors in the array of Containers, Containers. If InSub is True nested containers will be deeply searched.

Pass an Array of Itemtypes, an Array of ItemColors and an Array of Locations. The method inside will go through each type\color\location and execute a simple findtypeex command.

Example 1 - looking for the selected types on ground (mobiles etc.):

FindDistance := 20;
FindVertical := 10;
FindTypesArrayEx([$29A, $29B, $190, $191, $25d, $25e, $192, $193, $25f, $260, $2ea, $2ec, $2ed, $84, $f6, $19, $db, $51, $7a, $2ee, $2e8, $2e9, $2eb, $117, $116, $115],[$FFFF],[Ground],false);
AddToSystemJournal('FindCount = ' + IntToStr(FindCount));

FindVertical

var FindVertical:Integer

specifies the range of search functions Doc:Api/FindType or Doc:Api/FindTypeEx vertically

The default is 5, so as not to affect adjacent floors in the search. Example:

FindVertical:= 25;'' look on the floor above and below
FindType(sheep_type, ground);
  AddAddToSystemJournal('On the three floors of the sheep found:' + IntToStr(FindQuantity));


For Python this function is spreaded into two separate functions: GetFindVertical() and SetFindVertical(integer).


FireResist

function FireResist():Word

Returns the char - refractoriness(Fire Resist).

This only works from the client version Samurie Empire + on the server must be enabled advanced stats sent to the client, otherwise returns 0.

If there is no connection to the UO server - returns 0.

Example 1:

if FireResist > 0 then
begin
  '' Do something, like go home, or drop, etc.''
end;

Example 2:

  AddToSystemJournal('Current Fire Resist:' + IntToStr(FireResist))

FloatToStrF

function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): string

FoundedParamId

FoundedParamId

As a result of the functions WaitJournalLine, InJournal, and similar functions when matches are filled with fields of type LineID, LineType, LineTime, etc. Added to them FoundedParamId.

Example given in the search string such as 'create|make|destroy|already'

Found string with the word destroy.

then will FoundedParamId by 2 (due to zero).

there would create - would be zero.