From Stealth Client

Jump to: navigation, search

Character

Armor

function Armor():Word

Returns the char - number of "units" of armor(Armor).

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

Example:

  AddToSystemJournal('Armor rate:' + IntToStr(Armor))

Backpack

function Backpack():Cardinal

Returns the char - ID backpack(Backpack ID).

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

Often used, for example, in the search, index recipient to drag things on and so forth.

Example 1:

if Count(runes) < 10 then
begin
   MoveItem(runestack ,10-Count(runes), Backpack, 0,0,0)
end;

Example 2:

  FindType($ EED, Backpack)


CharName

function CharName():String

Returns the char - name(Name).

If there is no connection to the UO server - returns an empty string().

Example 1:

if(CharName = 'MyChar') then
begin
  '' Do something
end;

Example 2:

AddToSystemJournal('char name:' + CharName);


CharTitle

function CharTitle:string;

Returns the char - title.

Example:

  AddToSystemJournal(CharTitle);


ColdResist

function ColdResist():Word

Returns the char - cold resistance(Cold 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 ColdResist> 0 then
begin
  '' Do something, like go home, or drop, etc.''
end;

Example 2:

  AddToSystemJournal('Current Cold Resist:' + IntToStr(ColdResist))


ConnectedTime

function ConnectedTime():TDateTime

Returns the char - The last time the server connection(ConnectedTime).

returns during the last successful connecting to the server.

If there is no connection to the UO server - return '30 .12.1899 'free time. in the format of the date it is equivalent to zero.

Example:

  AddToSystemJournal('Last Connect Time:' + DateTimeToStr(ConnectedTime))


Dead

function Dead():Boolean

Returns the chara - The Dead(Dead).

If True - dead, if False - alive

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

Example 1:

if Dead then
begin
  '' Do something, like resurrect or something other''
end;

Example 2:

if(not Dead) then
  AddToSystemJournal('Char alive')
else
  AddToSystemJournal('Char is dead');


Dex

function Dex():Integer

Returns the player - agility(DEX).

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

Example 1:

if (Dex > 0) then
begin
  '' Do something
end;

Example 2:

AddToSystemJournal('Dexturity of Chara:' + IntToStr(Dex));


DisconnectedTime

function DisconnectedTime():TDateTime

Returns the char - The last time disconnected from the server(DisconnectedTime).

returns the last time they disconnect from the server(for whatever reason).

In the event that such action did not occur - will return will return '30 .12.1899 'no time. in the format of the date it is equivalent to zero.

Example:

  AddToSystemJournal('Last Disconnect Time:' + DateTimeToStr(DisconnectedTime))


EnergyResist

function EnergyResist():Word

Returns the char - resistance to energy(Energy 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 EnergyResist> 0 then
begin
  '' Do something, like go home, or drop, etc. ''
end;

Example 2:

  AddToSystemJournal('Current Energy Resist:' + IntToStr(EnergyResist))

ExtendedInfo

function ExtendedInfo() : TExtendedInfo
 
TExtendedInfo = packed record
    MaxWeight : Word;
    Race : Byte;
    StatCap : Word;
    PetsCurrent : Byte;
    PetsMax : Byte;
    FireResist : Word;
    ColdResist : Word;
    PoisonResist : Word;
    EnergyResist : Word;
    Luck : Smallint;
    DamageMin : Word;
    DamageMax : Word;
    Tithing_points : Cardinal;
    Hit_Chance_Incr,
    Swing_Speed_Incr,
    Damage_Chance_Incr,
    Lower_Reagent_Cost,
    HP_Regen,
    Stam_Regen,
    Mana_Regen,
    Reflect_Phys_Damage,
    Enhance_Potions,
    Defense_Chance_Incr,
    Spell_Damage_Incr,
    Faster_Cast_Recovery,
    Faster_Casting,
    Lower_Mana_Cost,
    Strength_Incr,
    Dext_Incr,
    Int_Incr,
    HP_Incr,
    Stam_Incr,
    Mana_Incr,
    Max_HP_Incr,
    Max_Stam_Incr,
    Max_Mana_Increase : Word;

Returns extended info of char in KR++ version of UO.


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))


GetAltName

function GetAltName(ObjID : Cardinal) : String;


GetCliloc

function GetCliloc(ObjID : Cardinal) : String;


GetPrice

function GetPrice(ObjID : Cardinal) : Cardinal;


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;


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))

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);


HP

function HP():Integer

Same as Doc:Api/Life. Returns the char - healthy(HITS).

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

Example 1:

if (HP > 0) then
begin
  '' Do something
end;

Example 2:

AddToSystemJournal('Health Chara:' + IntToStr(HP));


Hidden

function Hidden():Boolean

Returns the char - Stealth(Hidden).

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

Example 1:

if(not Hidden) then
begin
  UseSkill('Hiding');
end;

Example 2:

if(not Hidden) then
  AddToSystemJournal('char is visible')
else
  AddToSystemJournal('char is hidden');


Int

function Int():Integer

Returns the player's - intelligence(INT).

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

Example 1:

if (Int > 0) then
begin
  '' Do something
end;

Example 2:

AddToSystemJournal('Intelligence Chara:' + IntToStr(Int));


Life

function Life():Integer

Same as Doc:Api/HP. Returns the char - healthy(HITS).

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

Example 1:

if (Life > 0) then
begin
  ''Do something''
end;

Example 2:

AddToSystemJournal('Health Chara:' + IntToStr(Life));


Luck

function Luck():Word

Returns the char - Luck(Luck).

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:

  AddToSystemJournal('Luck char(Char Luck):' + IntToStr(Luck))


Mana

function Mana():Integer

Returns the char - Man(Mana points).

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

Example 1:

if (Mana < 30) then
begin
  UseSkill('Meditation');
end;

Example 2:

AddToSystemJournal('Number of Mana:' + IntToStr(Mana));


MaxHP

function MaxHP():Integer

Same as Doc:Api/MaxLife. In 99% of cases as well Str. Can differ only if the admin changes the parameters specifically object(char, SPC) and puts his hands MaxHP other than Str(usually in a big way).

Returns the char - the maximum number of health(Max HITS).

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

Example 1:

if (Life < MaxHP) then
begin
  UOSay('Man, some problem with HP here');
end;

Example 2:

AddToSystemJournal('Maximum Health Chara:' + IntToStr(MaxHP));


MaxLife

function MaxLife():Integer

Same as Doc:Api/MaxHP. In 99% of cases as well Str. Can differ only if the admin changes the parameters specifically object(char, SPC) and puts his hands MaxHP other than Str(usually in a big way).

Returns the char -the maximum number of health(Max HITS).

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

Example 1:

if (Life < MaxLife) then
begin
  UOSay('Man, some problem with HP here');
end;

Example 2:

AddToSystemJournal('Maximum Health Chara:' + IntToStr(MaxLife));


MaxMana

function MaxMana():Integer

In 99% of the same Int. Can differ only if the admin changes the parameters specifically object(char, SPC) and puts his hands MaxMana different from Int(usually in a big way).

Returns the char - the maximum amount of mana(Max Mana).

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

Example 1:

if (Mana < MaxMana) then
begin
  UOSay('It's time for meditation');
end;

Example 2:

AddToSystemJournal('Maximum Mana Chara:' + IntToStr(MaxMana));


MaxStam

function MaxStam():Integer

In 99% of the same Dex. Can differ only if the admin changes the parameters specifically object(char, SPC) and puts his hands MaxStam different from Dex(usually in a big way).

Returns the chara - the maximum amount of stamina(Max Stamina).

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

Example 1:

if (Stam < MaxStam) then
begin
  UOSay('Not full stamina');
end;

Example 2:

AddToSystemJournal('Maximum Stamina Chara:' + IntToStr(MaxStam));


MaxWeight

function MaxWeight():Word

Returns the char - Maximum Weight(Weight).

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 Weight > MaxWeight - 20 then
begin
  '' Do something, like go home, or drop, etc.''
end;

Example 2:

  AddToSystemJournal('Maximum Weight(Your Max weight):' + IntToStr(MaxWeight))


Paralyzed

function Paralyzed():Boolean

Returns the char - paralysis(Paralyzed).

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

Example 1:

if Paralyzed then
begin
  '' Do something, like cast Cure or drink cure potion''
end;

Example 2:

if(not Paralyzed) then
  AddToSystemJournal('Char is not paralyzed')
else
  AddToSystemJournal('Char paralyzed');


PetsCurrent

function PetsCurrent():Byte

Returns the char - the number of animals(Pets).

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

Example:

if PetsCurrent > 2 then
  UOSay('I've got more than 2 animals');

PetsMax

function PetsMax() : Byte

Returns the character's maximum number of animals (Pets Maximum).

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

Example:

 if PetsCurrent < PetsMax then
  UOSay('I have room for more pets.');


PoisonResist

function PoisonResist() : Word

Возвращает параметр чара - сопротивление яду (Poison Resist).

Работает только начиная с версии клиента Samurie Empire + на сервере должен быть включен режим расширенных статов,отсылаемых клиенту, иначе вернет 0.


В случае, если отсутствует соединение с UO сервером - вернет 0.

Пример 1:

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

Пример 2:

  AddToSystemJournal('Текущий Poison Resist: ' + IntToStr(PoisonResist))


Poisoned

function Poisoned() : Boolean

Возвращает параметр чара - Отравленность (Poisoned).

В случае, если отсутствует соединение с UO сервером - вернет False.

Пример 1:

if Poisoned then
begin
  ''do something, like cast Cure or drink cure potion
end;

Пример 2:

if (not Poisoned) then
  AddToSystemJournal('Чар не отравлен')
else
  AddToSystemJournal('Чар отравлен');

Race

function Race() : Byte

Returns the character - Race (Race).

Works only from client version Samuri Empire + server must be included race, otherwise return 0.

Value: 0=Human, 1=Elf (on some servers, these default values can be changed or expanded)


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

Example:

  AddToSystemJournal('Char Race: ' + IntToStr(Race))


Self

function Self() : Cardinal

Возвращает параметр чара - ID чара (Char ID).

В случае, если отсутствует соединение с UO сервером - вернет 0.

Пример:

  WaitTargetObject(Self);
  CastSpell('Bless');

Sex

function Sex() : Byte

Returns the character - Gender (Sex).

If 0 is returned - male, if 1 is returned - female

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

Example:

case Sex of
  0: AddToSystemJournal('Male')
  1: AddToSystemJournal('Female')
  else AddToSystemJournal('Undecided :)');


Stam

function Stam() : Integer

Возвращает параметр чара - стамина (Stamina).

В случае, если отсутствует соединение с UO сервером - вернет 0.

Пример 1:

if (Stam > 0) then
begin
  ''Do something
end;

Пример 2:

AddToSystemJournal('Стамина чара: ' + IntToStr(Stam));


Str

function Str() : Integer

Возвращает параметр чара - сила (STR).

В случае, если отсутствует соединение с UO сервером - вернет 0.

Пример 1:

if (Str > 0) then
begin
  ''Do something
end;

Пример 2:

AddToSystemJournal('Сила чара(Char strength): ' + IntToStr(Str));


Weight

function Weight() : Word

Возвращает параметр чара - Вес (Weight).

В случае, если отсутствует соединение с UO сервером - вернет 0.

Пример 1:

if Weight > 190 then
begin
  ''do something, like go home, or drop, etc.
end;

Пример 2:

  AddToSystemJournal('Вес (Your weight): ' + IntToStr(Weight))

WorldNum

function WorldNum() : Byte

Returns the number of the Map of the current character.

This works on servers where there is more than one map.

Default values ​​are:

  • 0 - Felucca (Britannia)
  • 1 - Trammel (Britannia_alt)
  • 2 - Ilshenar
  • 3 - Malas
  • 4 - Tokuno

More values are possible for shards with SA support.

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

Example:

  AddToSystemJournal('WorldNum (Your World number is): ' + IntToStr(WorldNum))


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;

Функция возвращает тултип айтема в виде записей с номером клилока и массива параметров

Пример:

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;