Initial commit. Updated release archive.
This commit is contained in:
26
_module/nss/model_inc.nss
Normal file
26
_module/nss/model_inc.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user