Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Equip

Wear item with ID Obj to the specified layer Layer.

if wearing sucessfull - return True.

If char disconnected, or the movement of the object from hand to the backpack failed - will return False.

Pascal

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

Python

def Equip(Layer, Obj): -> bool

Example Pascal

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;