27 lines
793 B
Plaintext
27 lines
793 B
Plaintext
int HasItem(int iItemNumber);
|
|
void EquipItem(int iItemNumber);
|
|
|
|
int INDEXCOUNT = 10;
|
|
|
|
int HasItem(int iItemNumber)
|
|
{
|
|
int iIndex = GetLocalInt(OBJECT_SELF, "index");
|
|
int iCounter = GetLocalInt(OBJECT_SELF, "clothescount");
|
|
int iClothes = (iIndex * INDEXCOUNT) + iItemNumber;
|
|
if(iClothes < iCounter)
|
|
{
|
|
object oItem = GetLocalObject(OBJECT_SELF, "clothes" + IntToString(iClothes));
|
|
SetCustomToken(20001 + iItemNumber, GetName(oItem));
|
|
return TRUE;
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
void EquipItem(int iItemNumber)
|
|
{
|
|
int iIndex = GetLocalInt(OBJECT_SELF, "index");
|
|
int iClothes = (iIndex * INDEXCOUNT) + iItemNumber;
|
|
object oItem = GetLocalObject(OBJECT_SELF, "clothes" + IntToString(iClothes));
|
|
ActionEquipItem(oItem, INVENTORY_SLOT_CHEST);
|
|
}
|