From Stealth Client

Jump to: navigation, search


E

EUO2ID

function EUO2ID(EUO : String) : Cardinal

Please check: Doc:Api/EUO2Type

EUO2Type

function EUO2Type(EUO : String) : Word

This function converts EasyUO (SyS26 format) to decimbal: EUO2Type("POF")=3821 # Gold coins

Actually, I have not found any difference between EUO2Type и Doc:Api/EUO2ID. Here is the Python 3.3. example how to convert data back to SyS26:

def DecToEUO(val):
    i,s=(val ^ 69) +7, ""
    while i>0: s,i=s+chr(65+i%26), int(i/26)
    return s


EarLayer

function EarLayer():Byte

Returns the layer number 0x12 -Ear(Earrings).

Example 1:

if ObjAtLayer(EarLayer) > 0 then 
  AddToSystemJournal('Earrings ID:' + IntToStr(ObjAtLayer(EarLayer)));

Example 2:

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


EggsLayer

function EggsLayer():Byte

Returns the layer number 0x17 - Skirt, Kilt(Skirt/Kilt).

Example 1:

if ObjAtLayer(EggsLayer) > 0 then 
  AddToSystemJournal('Skirt ID:' + IntToStr(ObjAtLayer(EggsLayer)));

Example 2:

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

EmptyContainer

function EmptyContainer(Container,DestContainer : Cardinal; delay_ms : Word) : Boolean;


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


Equip

function Equip(Layer:Byte; Obj:Cardinal):Boolean

Wear something Obj to the specified layer Layer.

If successful, dressing returns True.

If there is no connection to the UO server, or did not dress up - will return False.

Example:

if (getquantity(findtype(tweapon,ground)) > 0) 
    and (gettype(ObjAtLayer(RhandLayer)) <> gettype(finditem)) then 
  begin 
    addtosystemjournal('Weapon Change, left' + inttostr(findcount)); 
    UnEquip(RHandLayer); 
    wait(500); 
    Equip(RhandLayer, finditem); 
  end;


EquipDressSet

function EquipDressSet:Boolean

Dress set of clothes that was saved by Doc:Api/SetDress Same as Doc:Api/DressSavedSet.

If successful, dressing returns True.

If there is no connection to the UO server, or did not dress up - will return False.


Equipt

function Equipt(Layer:Byte; ObjType:Word):Boolean

Wear something like ObjType, found in a backpack to a specified layer Layer.

If successful, dressing returns True.

If there is no connection to the UO server or object not found or could not dress up - will return False.

Example:

if (gettype(ObjAtLayer(RhandLayer)) <> gettype(tweapon)) then 
  begin 
    UnEquip(RHandLayer); 
    wait(500); 
    Equipt(RhandLayer, tweapon); 
  end;

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.