From Stealth Client

Jump to: navigation, search


G

GA

function GA : Word;

Returns reagent type: Garlic

GACount

function GACount : Word;

Returns Garlic count in backpack.

GS

function GS : Word;

Returns reagent type: Ginsing

GSCount

function GSCount : Word;

Returns Ginsing count in backpack.


GetARStatus

function GetARStatus:Boolean

Returns the mode rekonnektora: 'True - rekonektor included, 'False - off

Example 1: {{page>:examples:connect&nofooter}}

See also


GetActiveAbility

function GetActiveAbility : String


GetAltName

function GetAltName(ObjID : Cardinal) : String;

GetAutoBuyDelay

function GetAutoBuyDelay : Word

GetAutoSellDelay

function GetAutoSellDelay : Word


GetCliloc

function GetCliloc(ObjID : Cardinal) : String;


GetColor

function GetColor(ObjID:Cardinal):Word

object parameter:color

GetContextMenu

procedure GetContextMenu(var list:TStringList)

Returns the last points of the context menu. The format of rows to return the next "tag | clilocID | clilocText | flags | color". All numbers presented in decimal form.

Example:

0 | 6123 | Open Paperdoll | 0 | 0
1 | 6146 | Talk | 0 | 0

ATTENTION! List must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;


GetDex

function GetDex(ObjID:Cardinal):Integer

object parameter:Dex

GetDirection

function GetDirection(ObjID:Cardinal):Byte

parameter object:Direction

  • dirNorth(0)
  • dirNorthEast(1)
  • dirEast(2)
  • dirSouthEast(3)
  • dirSouth(4)
  • dirSouthWest(5)
  • dirWest(6)
  • dirNorthWest(7)

Example1: Will check if you are facing north

   getdirection(self); 
   if dirNorth then Uosay('Facing North');


Example2: Will cast teleport +11 tiles in direction you are facing

Procedure Teleport;
begin
   Cast('Teleport');
   WaitForTarget(2000); 
   case getdirection(self) of 
     dirNorth : TargetToXYZ(GetX(Self()),GetY(Self())-11,GetZ(Self())); 
     dirNorthEast : TargetToXYZ(GetX(Self())+11,GetY(Self())-11,GetZ(Self())); 
     dirEast : TargetToXYZ(GetX(Self())+11,GetY(Self()),GetZ(Self()));   
     dirSouthEast : TargetToXYZ(GetX(Self())+11,GetY(Self())+11,GetZ(Self()));
     dirSouth : TargetToXYZ(GetX(Self()),GetY(Self())+11,GetZ(Self()));
     dirSouthWest : TargetToXYZ(GetX(Self())-11,GetY(Self())+11,GetZ(Self()));
     dirWest : TargetToXYZ(GetX(Self())-11,GetY(Self()),GetZ(Self()));
     dirNorthWest : TargetToXYZ(GetX(Self())-11,GetY(Self())-11,GetZ(Self()));
   end;
end;


GetDistance

function GetDistance(ObjID:Cardinal):Integer

object parameter:the distance

GetEasyUO

function GetEasyUO(num: Integer) : String

Please find detailed information here: Doc:Api/SetEasyUO

GetFindedList

function GetFindedList(var UserList:TStringList):Boolean

Fills a string list UserList the search results.

In UserList entered the list of found objects, found by Doc:Api/FindType or Doc:Api/FindTypeEx

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

ATTENTION! Object ID listed this list, are hex-format!

If nothing is found - return False, and the empty list UserList.

Example:

function GetFoundItemsFromStringList(var Items:Array Of Cardinal):Integer;
var List:TStringList; i:Integer;
begin
  List := TStringList.Create;
  if GetFindedList(List) = False then Result:= 0
  else begin
    SetLength(Items, List.Count);
    for i:= 0 to Length(Items) -1 do Items [i]:= StrToInt('$' + List.Strings [i]);
    Result:= Length(Items);
  end; 
  List.Free;
end;


Note: Starting from version 7.9.0 you can use this:

type TCardinalDynArray = Array of Cardinal;
function GetFoundItems():TCardinalDynArray;


GetGlobal

function GetGlobal(GlobalRegion:String; VarName:String):String

Reads the global variable VarName with the scope GlobalRegion. The scope may be' char' or' stealth'. GlobalRegion and VarName are not case sensitive.

Example 1: {{page>:examples:globals&nofooter}}

See also

GetGumpButtonsDescription

procedure GetGumpButtonsDescription(GumpIndex:Integer; var TL:TStringList)

Writes to a text list of TL short contents of Gump who are listed as number of stealth GumpIndex

In contrast to the Doc:Api/GetGumpShortLines, as a result of this function to the list, in addition to general parameters Gump, get only the buttons(Buttons)

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

If an invalid index Gump(or Gampo not), then the TL will be empty.

Example:

Program takegump; 
 
var 
b:TStringList; 
i:Integer; 
 
Begin 
b := TStringList.Create; 
SetSilentMode(False); 
for i:= 0 to GetGumpsCount - 1 do 
  GetGumpButtonsDescription(i, b); 
b.free; 
End.

GetGumpFullLines

procedure GetGumpFullLines(GumpIndex:Integer; var TL:TStringList)

Writes to a text list of TL the entire contents of Gump who are listed as number of stealth GumpIndex

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

If an invalid index Gump(or Gampo not), then the TL will be empty.

Example:

Program takegump; 
 
var 
b:TStringList; 
i:Integer; 
 
Begin
 
b := TStringList.Create; 
SetSilentMode(False); 
for i:= 0 to GetGumpsCount - 1 do 
  GetGumpFullLines(i, b); 
b.free; 
End.

As a result of an example in a string list will be something like:

Serial: 1A1B9F 
GumpID: 11CC34F 
X: 0000 
Y: 0000 
Pages: 13 
Gump Options: NoDispose NoClose 
 
GumpPics: X Y ID  Page 
GumpPic: 480  367  2443  0 
 
TilePics: X   Y   ID   Page 
0   TilePic: 80  94  5099  2 
1   TilePic: 230  94  5103  2 
... 
47   TilePic: 230  184  5176  12 
48   TilePic: 80  274  5181  12 
 
ResizePics: X   Y   ID   Width   Height   Page 
0   ResizePic: 20  20  5054  540  40  0 
1   ResizePic: 20  60  5054  360  300  0 
2   ResizePic: 380  60  5054  180  300  0 
3   ResizePic: 20  360  5054  540  70  0 
 
 
CheckBoxes: X   Y   Released_ID  Pressed_ID   Status   Return_value   Page 
0   CheckBox: 140  395  210  211  0  1537  0 
 
 
GumpTexts: X   Y   Color   Text_ID   Page 
0   GumpText: 159  30  51  0  0 
1   GumpText: 60  371  900  1  0 
... 
61   GumpText: 223  229  900  62  12 
62   GumpText: 73  319  900  63  12 
 
TextEntries: X   Y   Width   Height   Status   Color   Return_value   Default_text_id   Page 
0   TextEntry: 487  370  100  30  0  513  5  0 
 
Text Lines: 
BLACKSMITH SELECTION MENU 
Make last (ringmail gloves) 
Repair Item 
Hardening 
How Many? 
1 
 
 
... 
 
War Hammer 
Hammer Pick 
 
GumpButtons: X   Y   Released_ID  Pressed_ID   Quit   Page_ID   Return_value   Page 
0   GumpButton: 40  372  208  209  1  0  1025  0 
1   GumpButton: 40  395  208  209  1  0  1026  0 
 
 
... 
50   GumpButton: 200  164  1209  1210  1  0  5176  12 
51   GumpButton: 50  254  1209  1210  1  0  5180  12

GetGumpID

function GetGumpID(GumpIndex:Integer):Cardinal

Returns the Gump - Id. Number(Gump ID).

If there is no connection to the server or UO given the wrong number Gump - returns 0.

Example:

If GetGumpsCount > 0 then
  if GetGumpID(GetGumpsCount-1) = $ 15A7DDF then
    CloseSimpleGump(GetGumpsCount-1);


GetGumpInfo

Fill gumpInfo by gump elements who are listed as number of stealth GumpIndex.

//Pascal Sample
procedure GetGumpInfo(GumpIndex : Word; var gumpInfo : TGumpInfo);


Example PS:

GetGumpInfo(0, gi);
AddToSystemJournal('Gump has ' + IntToStr(Length(gi.GumpButtons)) + ' buttons');

In Python a dictionary will be returned with a nested structure containing all the info according to the Pascal records

Example Python:

import pprint
 
gumpdictDebug = open (r'' + StealthPath() +'gumpDict.log', 'w')
pp = pprint.PrettyPrinter(width=150, indent=1, stream=gumpdictDebug)
pp.pprint(GetGumpInfo(0))
 
# Output dictionary
{'GumpButtons': [{'ElemNum': 3, 'Page': 0, 'page_id': 0, 'pressed_id': 4007, 'quit': 1, 'released_id': 4005, 'return_value': 1, 'x': 60, 'y': 95},
                 {'ElemNum': 5, 'Page': 0, 'page_id': 0, 'pressed_id': 4019, 'quit': 1, 'released_id': 4017, 'return_value': 0, 'x': 285, 'y': 95}],
 'GumpID': -1817877309,
 'NoClose': False,
 'NoDispose': False,
 'NoMove': False,
 'NoResize': False,
 'Pages': 1,
 'ResizePics': [{'ElemNum': 1, 'Page': 0, 'gump_id': 2600, 'height': 135, 'width': 500, 'x': 10, 'y': 10}],
 'Serial': 346764,
 'X': 0,
 'XmfHtmlGump': [{'Cliloc_id': 1006046, 'ElemNum': 2, 'Page': 0, 'background': 1, 'height': 55, 'scrollbar': 1, 'width': 420, 'x': 52, 'y': 35},
                 {'Cliloc_id': 1006044, 'ElemNum': 4, 'Page': 0, 'background': 0, 'height': 35, 'scrollbar': 0, 'width': 150, 'x': 95, 'y': 96},
                 {'Cliloc_id': 1006045, 'ElemNum': 6, 'Page': 0, 'background': 0, 'height': 35, 'scrollbar': 0, 'width': 150, 'x': 320, 'y': 96}],
 'Y': 0}

Records Details:

TGumpInfo = record
    Serial : Cardinal;
    GumpID : Cardinal;
    X : Word;
    Y : Word;
    Pages : Integer;
    NoMove : Boolean;
    NoResize : Boolean;
    NoDispose : Boolean;
    NoClose : Boolean;
 
 
    Groups : array of TGroup;
    EndGroups : array of TEndGroup;
    GumpButtons : array of TGumpButton;
    ButtonTileArts : array of TButtonTileArt;
    CheckBoxes : array of TCheckBox;
    CheckerTrans : array of TCheckerTrans;
    CroppedText : array of TCroppedText;
    GumpPics : array of TGumpPic;
    GumpPicTiled : array of TGumpPicTiled;
    RadioButtons : array of TRadio;
    ResizePics : array of TResizePic;
    GumpText : array of TGumpText;
    TextEntries : array of TTextEntry;
    Text : array of string;
    TextEntriesLimited : array of TTextEntryLimited;
    TilePics : array of TTilePic;
    TilePicHue : array of TTilePicHue;
    Tooltips : array of TTooltip;
    HtmlGump : array of THtmlGump;
    XmfHtmlGump : array of TXmfHtmlGump;
    XmfHTMLGumpColor : array of TXmfHTMLGumpColor;
    XmfHTMLTok : array of TXmfHTMLTok;
    ItemProperties : array of TItemProperty;
end;
  TGroup = record
    groupnumber : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TEndGroup = record
    groupnumber : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TPage =  record
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TMasterGump =  record
    ID : Cardinal;
    ElemNum : Integer;
 end;
 
  TGumpButton =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    quit : Integer;
    page_id : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TButtonTileArt =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    quit : Integer;
    page_id : Integer;
    return_value : Integer;
    art_id : Integer;
    Hue :  Integer;
    art_x, art_y : Integer;
    ElemNum : Integer;
  end;
 
  TCheckBox =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    status : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TCheckerTrans =  record
    x, y : Integer;
    width, height : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TCroppedText =  record
    x, y,width, height,color,text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpPic =  record
    x, y : Integer;
    id : Integer;
    Hue : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpPicTiled =  record
    x, y : Integer;
    width, height : Integer;
    gump_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TRadio =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    status : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TResizePic =  record
    x, y : Integer;
    gump_id : Integer;
    width, height : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpText =  record
    x, y, color : Integer;
    text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTextEntry =  record
    x, y, width, height, color : Integer;
    return_value : Integer;
    default_text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTextEntryLimited =  record
    x, y, width, height, color : Integer;
    return_value : Integer;
    default_text_id : Integer;
    Limit : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTilePic =  record
    x, y : Integer;
    id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTilePichue =  record
    x, y : Integer;
    id : Integer;
    color : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTooltip =  record
    Cliloc_ID : Cardinal;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  THtmlGump =  record
    x, y : Integer;
    width, height : Integer;
    text_id : Integer;
    background : Integer;
    scrollbar : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLGump =  record
    x, y : Integer;
    width, height : Integer;
    Cliloc_id : Cardinal;
    background : Integer;
    scrollbar : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLGumpColor =  record
    x, y : Integer;
    width, height : Integer;
    Cliloc_id : Cardinal;
    background : Integer;
    scrollbar : Integer;
    Hue :  Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLTok =  record
    x, y : Integer;
    width, height : Integer;
    background : Integer;
    scrollbar : Integer;
    Color : Integer;
    Cliloc_id : Cardinal;
    Arguments : String;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TItemProperty = packed record
    Prop : Cardinal;
    ElemNum : Integer;
  end;

GetGumpSerial

function GetGumpSerial(GumpIndex:Integer):Cardinal

Returns the Gump - serial number(Serial ID). If there is no connection to the server or UO given the wrong number Gump - returns 0.

Example:

If GetGumpsCount > 0 then
  if GetGumpSerial(GetGumpsCount-1) = $ 15A7DDF then
    CloseSimpleGump(GetGumpsCount-1);

GetGumpShortLines

procedure GetGumpShortLines(GumpIndex:Integer; var TL:TStringList)

Writes to a text list of abbreviated TL content Gump who are listed as number of stealth GumpIndex

In contrast to the Doc:Api/GetGumpFullLines, which is in the list of all content Gump, as a result of this function to the list, in addition to general parameters Gump, enter the following elements:

  • TextEntries
  • TextLines
  • Buttons

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

If an invalid index Gump(or Gampo not), then the TL will be empty.

Example:

Program takegump; 
 
var 
b:TStringList; 
i:Integer; 
 
Begin 
b := TStringList.Create; 
SetSilentMode(False); 
for i:= 0 to GetGumpsCount - 1 do 
  GetGumpShortLines(i, b); 
b.free; 
End.

GetGumpTextLines

procedure GetGumpTextLines(GumpIndex:Integer; var TL:TStringList)

Writes to a text list of TL all text strings from Gump who are listed as number of stealth GumpIndex

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

If an invalid index Gump(or Gampo not), then the TL will be empty.

Example:

TempSL := TStringList.Create;
WaitTargetGround($ 1BDD);
UseObject(FindType($ 1EB9, ground));
GetGumpTextLines(GetGumpsCount-1, TempSL);
{Then handle the resulting list}
TempSL.Free;

GetGumpsCount

function GetGumpsCount():Word

Returns the number of hanging on Char gump

If there is no connection to the server or UO Gampo not - returns 0, otherwise returns the number.

In the script is very often used the expression GetGumpsCount-1, which is the parameter GumpIndex to the functions, which means the last Gump in the list.

Example:

If IsGump then
  if IsGumpCanBeClosed(GetGumpsCount-1) then
    CloseSimpleGump(GetGumpsCount-1);


GetHP

function GetHP(ObjID:Cardinal):Integer

object parameter:HP

GetIgnoreList

function GetIgnoreList(var UserList:TStringList):Boolean

Fills a string list object UserList from IgnoreList.

In UserList entered the list of objects located in the IgnoreList

ATTENTION! UserList must be created through the var_list_name:= TStringList.Create and necessarily removed after use by var_list_name.Free;

If IgnoreList empty and there is nothing to fill - returns False, and the empty list UserList.

An example of work with a string list can be found in Doc:Api/GetFindedList


GetInt

function GetInt(ObjID:Cardinal):Integer

object parameter:INT

GetLandTileData

function GetLandTileData(Tile : Word) :TLandTileData
 
TLandTileData = record
Flags : Cardinal;
TextureID : Word;
Name : array[0..19] of Char;
end;

Returns the details of a Tile.

GetLandTilesArray

function GetLandTilesArray(Xmin, Ymin, Xmax, Ymax : Word; WorldNum : byte; TileType : Word; var LandTilesArray : TFoundTilesArray) : Word

Search for a given tile of map

TFoundTilesArray = array[0..999] of TFoundTile;
 
TFoundTile = record 
  X : SmallInt; 
  Y : SmallInt; 
  Z : ShortInt; 
  Tile : Word; 
end;


GetLayer

function GetLayer(ObjID:Cardinal):Byte

Returns on layer in which the object ObjID.

Through all layers of char, comparing Aidi objects that are out there with a given Aidi.

If there is no connection to the UO server or object does not find - returns 0.

Example:

if GetLayer(my_relik_shield_ID ') = 0 then 
  AddToSystemJournal('My mega-shiled not found')
else
  AddToSystemJournal('My mega-shiled found!');

GetLayerCount

function GetLayerCount(x, y:word; WorldNum : byte):byte

Number of layers in static point


GetMana

function GetMana(ObjID:Cardinal):Integer

object parameter:Mana

GetMapCell

function GetMapCell(X,Y : Word; WorldNum : Byte) : TMapCell
 
TMapCell = record
Tile : Word;
Z : ShortInt;
end;

Return information on the ground tile.


GetMaxHP

function GetMaxHP(ObjID:Cardinal):Integer

object parameter:MaxHP


GetMaxMana

function GetMaxMana(ObjID:Cardinal):Integer

object parameter:MaxMana


GetMaxStam

function GetMaxStam(ObjID:Cardinal):Integer

object parameter:MaxStam


GetName

function GetName(ObjID:Cardinal):String

object parameter name

GetNextStepZ

function GetNextStepZ(CurrX,CurrY, DestX, DestY : Word; WorldNum : byte; Z : ShortInt) : ShortInt


GetNotoriety

function GetNotoriety(ObjID:Cardinal):Byte

object parameter:malice(notoriety)


GetParent

function GetParent(ObjID:Cardinal):Cardinal

object parameter:ID container for this object

Example for Python 3.3. Function to define full item "path" in bags:

def FullParentPath(p):
    if type(p)!=list or not p: p=[p]
    if not p[-1]: return p[1:-1]
    return FullParentPath(p+[GetParent(p[-1])])

p-ObjID

Returns list: [BagID1, BagID2, BagIDpreGround], where BagID1 - first parent for ObjID, BagIDpreGround - last bag before ground (so if you were searching in char's layers or Backpack - CharID).

GetPathArray

function GetPathArray(DestX:Word; DestY:Word; Optimized:Boolean; Accuracy:integer; var PathArray:TPathArray):Integer;

This function calculates the route to a point and DestX DestY and fills in a special array TPathArray coordinates of the points through which you can reach the goal.

  • DestX - X coordinate of the goal of
  • DestY - Y coordinate of the goal of
  • Optimized - if True will be more complex ways of rendering, so it is recommended to include only a distance of up to 200 tiles.Optimizd option left for backward compatibility, see Doc:Api/MoveHeuristicMult
  • Accuracy - Accuracy of approximation:0 - straight to the point, 1 - close to the radius of one tile, etc. The length is limited to 1000 tiles.
  • PathArray - an array of type TPathArray.
  • Returns the number of steps to the goal.

mPathArr:TPathArray; an array of type TPathArray that is filled with elements that have two properties X and Y.

Example:

function easyMoveXY(X, Y:integer; Optimized:boolean; Accuracy:Integer; Running:boolean):boolean; 
var 
   StepCnt, i:Integer; 
   mPathArr:TPathArray;
 
Begin 
Result:= false; 
While true do 
   begin 
   '' AddToSystemJournal('pathfinding ...') 
   StepCnt:= GetPathArray(X, Y, Optimized, Accuracy, mPathArr); 
   If StepCnt<0 then Exit; 
   If StepCnt = 0 then 
      begin 
      Result:= true; 
      Exit; 
      end; 
   For i:= 0 to StepCnt do 
      begin 
      If Not IsWorldCellPassable(getX(self), getY(self), mPathArr [i].X, mPathArr [i].Y, WorldNum, getZ(self)) then Break; 
      If Not MoveToPoint(mPathArr [i].X, mPathArr [i].Y, Running) then Break; 
      If Dist(X,Y)<=Accuracy then 
         begin 
    AddToSystemJournal('Location reached!'); 
    Result:= true; 
    Exit; 
    end; 
      end; 
    end; 
End;

GetPathArray3D

function GetPathArray3D(StartX, StartY:Word; StartZ:Shortint; FinishX, FinishY:Word; FinishZ:Shortint; WorldNum:Byte; AccuracyXY, AccuracyZ:Integer; Run:Boolean; var PathArray :TPathArray):Integer

This function calculates the route to a point FinishX, FinishY and FinishZ and fills in a special array TPathArray coordinates of the points through which you can reach the goal.

  • StartX, StartY, StartZ - the coordinates of where the route will begin.
  • FinishX, FinishY, FinishZ - coordinate of the final destination.
  • WorldNum - the number for which the world will compute the route.
  • AccuracyXY, AccuracyZ - precision approach to end point:0 - straight to the point, 1 - close to the radius of one tile, etc. Possible values: AccuracyXY - 0..20, AccuracyZ - 0..255
  • Run - whether the character is running on this route or walk(you need to optimize the turns when driving).
  • PathArray - an array of type TPathArray.
  • Returns the number of steps to the goal.


GetPauseScriptOnDisconnectStatus

function GetPauseScriptOnDisconnectStatus:Boolean

Specifies the behavior of the script for disconnection. if the Value' 'True when you disconnect, all running scripts will embark on a break.

Example 1: {{page>:examples:pausescript&nofooter}}

See also


GetPrice

function GetPrice(ObjID : Cardinal) : Cardinal;


GetQuantity

function GetQuantity(ObjID:Cardinal):Integer

object parameter:number in the stack

GetRunMountTimer

function GetRunMountTimer : Word

Timer to slow\speed up walking\running with Move* functions

GetRunUnMountTimer

function GetRunUnMountTimer : Word

Timer to slow\speed up walking\running with Move* functions

GetShopList

function GetShopList : TStringList

GetSkillLockState

// v7.9.1+
function GetSkillLockState(SkillName : String) : ShortInt;

Returns Lock State of SkillName.

GetSkillValue

function GetSkillValue(SkillName:String):Double;

Get the value of skill. List of chips


GetStam

function GetStam(ObjID:Cardinal):Integer

object parameter:Stamina

GetStatLockState

// v7.9.1+
function GetStatLockState(statNum : Byte) : ShortInt;

Returns Lock State of Stat.

GetStaticTileData

function GetStaticTileData(Tile : Word) :TStaticTileData
 
TStaticTileData = record
Flags : Int64;
Height : Integer;
RadarColorRGBA : array[0..3] of Byte;
Name : Array[0..19] of Char;

Details of tile statics

GetStaticTilesArray

function GetStaticTilesArray(Xmin, Ymin, Xmax, Ymax : Word; WorldNum : byte; TileType : Word;var FoundTilesArray : TFoundTilesArray) : Word
def GetStaticTilesArray( Xmin : Integer, Ymin : Integer, Xmax : Integer, Ymax : Integer, WorldNum : Integer, TileType : Integer) -> List of Tuples

Search by ticker Tile statics


GetStr

function GetStr(ObjID:Cardinal):Integer

object parameter:STR

GetSurfaceZ

function GetSurfaceZ(X,Y : Word;WorldNum : Byte) : ShortInt

Learn Z coordinate in the world.

GetTickCount

function GetTickCount : Cardinal;

GetTileFlags

function GetTileFlags(Group : byte; Tile : Word) : Cardinal

Get flags for a given Tile. Takes two arguments:

  • Group that can be either:
    • 1 for land;
    • 2 for statics;
  • Tile is the ID of the tile to inspect.


GetTitle

function GetTitle(ObjID : Cardinal) : String;


GetTooltip

function GetTooltip(ObjID : Cardinal) : String;


GetTooltipRec

function GetToolTipRec(ObjID : Cardinal) : TClilocRec;
 
TClilocRec = packed record
   Count : Cardinal;
   Items : array of TClilocItemRec;
end;
 
TClilocItemRec = packed record
   ClilocID : Cardinal;
   Params : array of String;
 end;

This function will return the tooltip of an item with the records that composes it.

Example:

Program New;
var
aa : TClilocRec;
bb : TClilocItemRec;
i,k : Integer;
begin
aa := GetToolTipRec(BackPack);
AddToSystemJournal('Total lines in Toolptip: ' + IntToStr(aa.Count));
if aa.count > 0 then
for i := 0 to aa.Count - 1 do
begin
AddToSystemJournal('Line ' + IntToStr(i) + ': ');
bb := aa.Items[i]; 
AddToSystemJournal('Cliloc: $' + IntToHex(bb.ClilocID,8));
AddToSystemJournal('Cliloc text: ' + GetClilocByID(bb.ClilocID));
for k := 0 to Length(bb.Params) - 1 do
AddToSystemJournal('Param-' + IntToStr(k) + ': "'
+ bb.Params[k] + '"');
end;

GetTradeContainer

function GetTradeContainer(TradeNum,Num : Byte) : Cardinal

GetTradeOpponent

function GetTradeOpponent(TradeNum : Byte) : Cardinal

GetTradeOpponentName

function GetTradeOpponentName(TradeNum : Byte) : String


GetType

function GetType(ObjID:Cardinal):Word

object parameter:type

GetWalkMountTimer

function GetWalkMountTimer : Word

Timer to slow\speed up walking\running with Move* functions

GetWalkUnmountTimer

function GetWalkUnmountTimer : Word

Timer to slow\speed up walking\running with Move* functions


GetX

function GetX(ObjID:Cardinal):Integer

object parameter:X coordinate


GetY

function GetY(ObjID:Cardinal):Integer

object parameter:Y coordinate


GetZ

function GetZ(ObjID:Cardinal):Byte

object parameter:Z coordinate of


GlovesLayer

function GlovesLayer():Byte

Returns the layer number 0x07 - gloves(Gloves).

Example 1:

if ObjAtLayer(GlovesLayer) > 0 then 
  AddToSystemJournal('Gloves ID:' + IntToStr(ObjAtLayer(GlovesLayer)));

Example 2:

{If there is something on a layer, then remove}
if ObjAtLayer(GlovesLayer) <> 0 then
  begin
    unequip(GlovesLayer);
    wait(1000);
  end;


Gold

function Gold():Cardinal

Returns the char - count the money in the pack(Gold amount).

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

Example 1:

if Gold < 60000 then
begin
  Grab(FindType($ OEED, ground) ,60000-Gold);
end;

Example 2:

  AddToSystemJournal('Gold in backpack:' + IntToStr(Gold))

Grab

function Grab(ItemID:Cardinal; Count:Integer):Boolean

Move the object with the specified ID(ItemID) and the number(Count) in the backpack of the character. Important:The F-function is based on a bunch of F-functions:DragItem() + DropItem(), so if you want to understand how this will work - examine carefully the work of faculty functions Doc:Api/DragItem and Doc:Api/DropItem.

See also: Doc:Api/DragItem, Doc:Api/DropItem

Ground

function Ground():Cardinal

A pointer to the ground. Often used, for example, in the search.

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

Example 1: Search for gold coins on the ground(you can set the search radius using the FindDistance and FindVertical)

  FindType($ EED, Ground);

GumpAutoCheckBox

procedure GumpAutoCheckBox(CheckBoxID, Value:Integer)

The principle of operation is similar to Doc:Api/WaitGump, with the only difference being that sought not return_value button, return_value "ticks"(CheckBox). If found - the old value of the status of the CheckBox is replaced by the Value.

In response to this server Gump 'NOT' off! This must be done through the Doc:Api/WaitGump or Doc:Api/NumGumpButton

Works as a trap, and how to handle already come Gump.

Example:

  WaitTargetGround($ 1BF5);  
  GumpAutoCheckBox(1537, 1);
  WaitGump('7956 ');
  UseObject(FindType($ 1EB9, backpack));

GumpAutoRadiobutton

procedure GumpAutoRadiobutton(RadiobuttonID , Value : Integer);

GumpAutoTextEntry

procedure GumpAutoTextEntry(TextEntryID:Integer; Value:String)

The principle of operation is similar to Doc:Api/WaitGump, with the only difference being that sought not return_value buttons and input fields return_value(textentry). If found - the old value is replaced by this textentry Value.

In response to this server Gump 'NOT' off! This must be done through the Doc:Api/WaitGump or Doc:Api/NumGumpButton

Works as a trap, and how to handle already come Gump.

Example:

{Krafters piece of script. 
First, put a trap on target for Ingots on the floor, 
then trap the incoming Gump, to replace the value TextEntry, 
Gump then trap on the button 
and then use to call tinker tools Gump.}
  WaitTargetGround($ 1BF5);  
  GumpAutoTextEntry(513, '30 ');
  WaitGump('7956 ');
  UseObject(FindType($ 1EB9, backpack));

The principle is similar to Doc:Api/NumGumpTextEntry.