Changed folder name.
Changed folder name.
This commit is contained in:
28
_module/nss/idcust_modhelmet.nss
Normal file
28
_module/nss/idcust_modhelmet.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
void main()
|
||||
{
|
||||
//First line of the item customization script
|
||||
object oPlayer = GetPCSpeaker();
|
||||
int iSlot = GetLocalInt( OBJECT_SELF, "iSlot");
|
||||
object oItem = GetItemInSlot( iSlot, oPlayer);
|
||||
int iIndex = GetItemAppearance( oItem, ITEM_APPR_TYPE_ARMOR_MODEL, 0);
|
||||
|
||||
if( GetIsDM( oPlayer))
|
||||
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
|
||||
|
||||
iIndex++;
|
||||
if( iIndex > 35)
|
||||
iIndex = 1;
|
||||
|
||||
if( GetIsDM( oPlayer))
|
||||
SendMessageToPC( oPlayer, "The index after is: " + IntToString( iIndex));
|
||||
|
||||
object oNewItem = CopyItemAndModify( oItem, ITEM_APPR_TYPE_ARMOR_MODEL, 0, iIndex, TRUE);
|
||||
|
||||
if( GetIsObjectValid( oNewItem))
|
||||
{
|
||||
AssignCommand( oPlayer, ActionEquipItem( oNewItem, iSlot));
|
||||
DestroyObject( oItem);
|
||||
}
|
||||
else
|
||||
DestroyObject( oNewItem);
|
||||
}
|
Reference in New Issue
Block a user