Battledale_PRC8/_module/nss/idcust_prvrbicep.nss
Jaysyn904 4dba880acb Added ACP v4.1
Added ACP v4.1. Full compile.  Updated module name.  Updated release archive.
2024-09-08 18:23:43 -04:00

64 lines
1.3 KiB
Plaintext

int GetNextBicepIndex( int iIndex)
{
if( iIndex == 185)
iIndex = 181; //CEP2.2
else if( iIndex == 179)
iIndex = 175;
else if( iIndex == 174)
iIndex = 163;
else if( iIndex == 149)
iIndex = 134;
else if( iIndex == 119)
iIndex = 112;
else if( iIndex == 109)
iIndex = 163;
else if( iIndex == 62)
iIndex = 15;
else if( iIndex == 2)
iIndex = 1;
else if( iIndex == 0)
iIndex = 186;
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_RBICEP);
if( GetIsDM( oPlayer))
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
iIndex--;
iIndex = GetNextBicepIndex( 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_RBICEP, iIndex, TRUE);
if( GetIsObjectValid( oNewItem))
{
AssignCommand( oPlayer, ActionEquipItem( oNewItem, iSlot));
DestroyObject( oItem);
}
else
DestroyObject( oNewItem);
}