From Stealth Client

Jump to: navigation, search

Layers

ArmsLayer

function ArmsLayer():Byte

Returns the layer number 0x13 - Arms(elbows)(Arms)

Example 1:

if ObjAtLayer(ArmsLayer) > 0 then 
  AddToSystemJournal('Arms ID:' + IntToStr(ObjAtLayer(ArmsLayer)));

Example 2:

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


BankLayer

function BankLayer():Byte

Returns the layer number 0x1C - His bank container(PC Bank Box). In the container of this layer:

  • Available information on this layer for a char.
  • Not available.
  • Do not open a Doc:Api/UseObject, and similar functions.

Example 1:

if ObjAtLayer(BankLayer) > 0 then 
  AddToSystemJournal('Bank Box ID:' + IntToStr(ObjAtLayer(BankLayer)));


BeardLayer

function BeardLayer():Byte

Returns the layer number 0x10 - Beard(Facial Hair Beard).

This layer is removed by means of a client can not directly!

Example:

if ObjAtLayer(BeardLayer) > 0 then 
  AddToSystemJournal('Beard ID:' + IntToStr(ObjAtLayer(BeardLayer)));


BpackLayer

function BpackLayer():Byte

Returns the layer number 0x15 - Bag character(Backpack).

The result of the ObjAtLayer(BpackLayer) should be similar to Doc:Api/Backpack

Example:

if ObjAtLayer(BpackLayer) > 0 then 
  AddToSystemJournal('Backpack ID:' + IntToStr(ObjAtLayer(BpackLayer)));


BraceLayer

function BraceLayer():Byte

Returns the layer number 0x0E - bracelet(Bracelet).

Example 1:

if ObjAtLayer(BraceLayer) > 0 then 
  AddToSystemJournal('Bracelet ID:' + IntToStr(ObjAtLayer(BraceLayer)));

Example 2:

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


CloakLayer

function CloakLayer():Byte

Returns the layer number 0x14 - Cloak(Cloak).

Example 1:

if ObjAtLayer(CloakLayer) > 0 then 
  AddToSystemJournal('Cloak ID:' + IntToStr(ObjAtLayer(CloakLayer)));

Example 2:

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


Disarm

function Disarm():Boolean

{Disarms the right and left hand}

Iterates through the layers of both hands, making the Doc:Api/UnEquip Object of these layers.

If there is no connection to the UO server, or the movement of the object layer in the pack could not - return False.

Example:

if ObjAtLayer(RhandLayer)<>0 then
  begin
    disarm;
    wait(1000);
  end;


DressSavedSet

function DressSavedSet:Boolean

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

If successful, dressing returns True.

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


DressSpeed ​​

var DressSpeed:Word

The delay between the removal of every thing

In milliseconds.

Default = 100ms.


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;


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;


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


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;


HairLayer

function HairLayer():Byte

Returns the layer number 0x0B - Hair(Hair).

This layer is removed by means of a client can not directly!

Example:

if ObjAtLayer(HairLayer) > 0 then 
  AddToSystemJournal('Hair ID:' + IntToStr(ObjAtLayer(HairLayer)));


HatLayer

function HatLayer():Byte

Returns the layer number 0x06 - headdress - a helmet, hat, etc.(Hat).

Example 1:

if ObjAtLayer(HatLayer) > 0 then 
  AddToSystemJournal('Hat ID:' + IntToStr(ObjAtLayer(HatLayer)));

Example 2:

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


HorseLayer

function HorseLayer():Byte

Returns the layer number 0x19 - ID seat(if you spell horse)(Mount).

The result of the ObjAtLayer(HorseLayer) does not equal driving NPC ID, which sits on the spell.

Example 1:

if ObjAtLayer(HorseLayer) > 0 then 
  AddToSystemJournal('Mount ID:' + IntToStr(ObjAtLayer(HorseLayer)));


LegsLayer

function LegsLayer():Byte

Returns the layer number 0x18 -Legs Armor).

Example 1:

if ObjAtLayer(LegsLayer) > 0 then 
  AddToSystemJournal('Legs Armor ID:' + IntToStr(ObjAtLayer(LegsLayer)));

Example 2:

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


LhandLayer

function LhandLayer():Byte

Returns the layer number 0x02 - Left Hand(Left Hand).

Look out! ALL-handed an item(axes, etc.) Dress up in your left hand(LhandLayer), despite the image the client paperdola! '

Example 1:

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

Example 2:

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


NRstkLayer

function NRstkLayer():Byte

Returns the layer number 0x1B - Product backpack with two vendor(NPC Buy no restock container).

In conventional game charov container on this layer is absent, ie ObjAtLayer(NRstkLayer) = 0.

Example 1:

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


NeckLayer

function NeckLayer():Byte

Returns the layer number 0x0A - Necklace(Neck).

Example 1:

if ObjAtLayer(NeckLayer) > 0 then 
  AddToSystemJournal('Neck ID:' + IntToStr(ObjAtLayer(NeckLayer)));

Example 2:

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


ObjAtLayer

function ObjAtLayer(LayerType:Byte):Cardinal

Returns Object ID located on your Char to specify the layer LayerType

If there is no connection to the UO server, or in the bed wearing nothing - returns 0.

Example:

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


ObjAtLayerEx

function ObjAtLayerEx(LayerType:Byte; PlayerID:Cardinal):Cardinal

Returns the Object ID to char PlayerID, located on the guidance layer LayerType

If there is no connection to the UO server, or in the bed wearing nothing - returns 0.

Example:

if ObjAtLayerEx(RhandLayer, sparring_partner) = 0 then 
  AddToSystemJournal('Sparring partner has no weapon in hand!');


PantsLayer

function PantsLayer():Byte

Returns the layer number 0x04 - Pants(Pants). Example 1:

if ObjAtLayer(PantsLayer) > 0 then 
  AddToSystemJournal('Pants ID:' + IntToStr(ObjAtLayer(PantsLayer)));

Example 2:

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


RhandLayer

function RhandLayer() : Byte

Возвращает номер слоя 0x01 - Правая рука (Right Hand).

Внимание!!! ВСЕ ДВУРУЧНЫЕ Итемы (топоры и тд) одеваются в левую руку (LhandLayer), несмотря на картинку папердола в клиенте!!!

Пример 1:

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

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(RhandLayer) <> 0 then
  begin
    disarm;
    wait(1000);
  end;


RingLayer

function RingLayer() : Byte

Возвращает номер слоя 0x08 - Кольцо (Ring).

Пример 1:

if ObjAtLayer(RingLayer) > 0 then 
  AddToSystemJournal('Ring ID: '+IntToStr(ObjAtLayer(RingLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(RingLayer) <> 0 then
  begin
    unequip(RingLayer);
    wait(1000);
  end;


RobeLayer

function RobeLayer() : Byte

Возвращает номер слоя 0x16 - Роба (Robe).

Пример 1:

if ObjAtLayer(RobeLayer) > 0 then 
  AddToSystemJournal('Robe ID: '+IntToStr(ObjAtLayer(RobeLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(RobeLayer) <> 0 then
  begin
    unequip(RobeLayer);
    wait(1000);
  end;


RstkLayer

function RstkLayer() : Byte

Возвращает номер слоя 0x1A - Товарный бекпак 1 у вендора (NPC Buy Restock container).

У обычных игровых чаров контейнер на этом слое отсутствует, т.е. ObjAtLayer(RstkLayer) = 0.

Пример 1:

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


SellLayer

function SellLayer() : Byte

Возвращает номер слоя 0x1C - Товарный бекпак 3 у вендора (NPC Sell container).

У обычных игровых чаров контейнер на этом слое отсутствует, т.е. ObjAtLayer(SellLayer) = 0.

Пример 1:

if ObjAtLayer(SellLayer) > 0 then 
  AddToSystemJournal('NPC Sell container ID: '+IntToStr(ObjAtLayer(SellLayer)));


SetDress

procedure SetDress()

Сохранение набора одежды/екипировки


ShirtLayer

function ShirtLayer() : Byte

Возвращает номер слоя 0x05 - Рубашка (Shirt).

Пример 1:

if ObjAtLayer(ShirtLayer) > 0 then 
  AddToSystemJournal('Shirt ID: '+IntToStr(ObjAtLayer(ShirtLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(ShirtLayer) <> 0 then
  begin
    unequip(ShirtLayer);
    wait(1000);
  end;


ShoesLayer

function ShoesLayer() : Byte

Возвращает номер слоя 0x03 - Обувь (Shoes).

Пример 1:

if ObjAtLayer(ShoesLayer) > 0 then 
  AddToSystemJournal('Shoes ID: '+IntToStr(ObjAtLayer(ShoesLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(ShoesLayer) <> 0 then
  begin
    unequip(ShoesLayer);
    wait(1000);
  end;


TalismanLayer

function TalismanLayer() : Byte

Возвращает номер слоя 0x09 - Амулет (Talisman).

Пример 1:

if ObjAtLayer(TalismanLayer) > 0 then 
  AddToSystemJournal('Talisman ID: '+IntToStr(ObjAtLayer(TalismanLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(TalismanLayer) <> 0 then
  begin
    unequip(TalismanLayer);
    wait(1000);
  end;


TorsoHLayer

function TorsoHLayer() : Byte

Возвращает номер слоя 0x11 - Полный передник (Torso middle surcoat, tunic, full apron, sash).

Пример 1:

if ObjAtLayer(TorsoHLayer) > 0 then 
  AddToSystemJournal('surcoat ID: '+IntToStr(ObjAtLayer(TorsoHLayer)));

Пример 2: {Если на слое чтото есть, то снимаем} if ObjAtLayer(TorsoHLayer) <> 0 then

 begin
   unequip(TorsoHLayer);
   wait(1000);
 end;

</source>


TorsoLayer

function TorsoLayer() : Byte

Возвращает номер слоя 0x0D - Нагрудник (Torso (inner) (chest armor)).

Пример 1:

if ObjAtLayer(TorsoLayer) > 0 then 
  AddToSystemJournal('Torso ID: '+IntToStr(ObjAtLayer(TorsoLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(TorsoLayer) <> 0 then
  begin
    unequip(TorsoLayer);
    wait(1000);
  end;


UnDress

function UnDress: Boolean

Снять все вещи.

При удачном раздевании возвращает True.

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

Используется обычно в начале скриптов спраррингов, полностью разделись, потом правильно оделись.


UnEquip

function UnEquip(Layer: Byte): Boolean

Снять вещь с указанного слоя Layer (вещь падает в пак)

При удачном снятии возвращает True.

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

Пример:

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


WaistLayer

function WaistLayer() : Byte

Возвращает номер слоя 0x0C - Малый передник (Half Apron).

Пример 1:

if ObjAtLayer(WaistLayer) > 0 then 
  AddToSystemJournal('Half Apron ID: '+IntToStr(ObjAtLayer(WaistLayer)));

Пример 2:

{Если на слое чтото есть, то снимаем}
if ObjAtLayer(WaistLayer) <> 0 then
  begin
    unequip(WaistLayer);
    wait(1000);
  end;


WearItem

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

Кладет обьект Obj, висящий "на пальце" на слой Layer

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

Применять следует ОЧЕНЬ осторожно. И вообще, в большинстве случаев команда Doc:Api/equip удобнее и универсальнее. Эта же оставлена для совместимости и некоторых кривых шардов.

Потому и примера нет.