Initial upload
Initial upload
This commit is contained in:
67
_module/nss/idcust_prvrforar.nss
Normal file
67
_module/nss/idcust_prvrforar.nss
Normal file
@@ -0,0 +1,67 @@
|
||||
int GetNextForeArmIndex( int iIndex)
|
||||
{
|
||||
|
||||
if( iIndex == 185) //CEP2.2
|
||||
iIndex = 181;
|
||||
|
||||
else if( iIndex == 180)
|
||||
iIndex = 175;
|
||||
|
||||
else if( iIndex == 174)
|
||||
iIndex = 167;
|
||||
|
||||
else if( iIndex == 166)
|
||||
iIndex = 165;
|
||||
|
||||
else if( iIndex == 149)
|
||||
iIndex = 128;
|
||||
|
||||
else if( iIndex == 123)
|
||||
iIndex = 122;
|
||||
|
||||
else if( iIndex == 119)
|
||||
iIndex = 112;
|
||||
|
||||
else if( iIndex == 109)
|
||||
iIndex = 63;
|
||||
|
||||
else if( iIndex == 62)
|
||||
iIndex = 23;
|
||||
|
||||
else if( iIndex == 2)
|
||||
iIndex = 1;
|
||||
|
||||
else if( iIndex == 0)
|
||||
iIndex = 186; //Start Over
|
||||
|
||||
|
||||
return iIndex;
|
||||
}
|
||||
|
||||
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, ITEM_APPR_ARMOR_MODEL_RFOREARM);
|
||||
|
||||
if( GetIsDM( oPlayer))
|
||||
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
|
||||
|
||||
iIndex--;
|
||||
iIndex = GetNextForeArmIndex( iIndex);
|
||||
|
||||
if( GetIsDM( oPlayer))
|
||||
SendMessageToPC( oPlayer, "The index after is: " + IntToString( iIndex));
|
||||
|
||||
object oNewItem = CopyItemAndModify( oItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_RFOREARM, iIndex, TRUE);
|
||||
|
||||
if( GetIsObjectValid( oNewItem))
|
||||
{
|
||||
AssignCommand( oPlayer, ActionEquipItem( oNewItem, iSlot));
|
||||
DestroyObject( oItem);
|
||||
}
|
||||
else
|
||||
DestroyObject( oNewItem);
|
||||
}
|
Reference in New Issue
Block a user