80 lines
1.6 KiB
Plaintext
80 lines
1.6 KiB
Plaintext
int GetNextFootIndex( int iIndex)
|
|
{
|
|
|
|
if( iIndex == 185)
|
|
iIndex = 181; //CEP2.2
|
|
|
|
else if( iIndex == 179)
|
|
iIndex = 175;
|
|
|
|
else if( iIndex == 174)
|
|
iIndex = 160;
|
|
|
|
else if( iIndex == 159)
|
|
iIndex = 158;
|
|
|
|
else if( iIndex == 149)
|
|
iIndex = 122;
|
|
|
|
else if( iIndex == 121)
|
|
iIndex = 120;
|
|
|
|
else if( iIndex == 119)
|
|
iIndex = 118;
|
|
|
|
else if( iIndex == 115)
|
|
iIndex = 112;
|
|
|
|
else if( iIndex == 111)
|
|
iIndex = 110;
|
|
|
|
else if( iIndex == 109)
|
|
iIndex = 83;
|
|
|
|
else if( iIndex == 79)
|
|
iIndex = 63;
|
|
|
|
else if( iIndex == 62)
|
|
iIndex = 16;
|
|
|
|
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_LFOOT);
|
|
|
|
if( GetIsDM( oPlayer))
|
|
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
|
|
|
|
iIndex--;
|
|
iIndex = GetNextFootIndex( 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_LFOOT, iIndex, TRUE);
|
|
object oNewItem2 = CopyItemAndModify( oNewItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_RFOOT, iIndex, TRUE);
|
|
DestroyObject( oNewItem);
|
|
|
|
if( GetIsObjectValid( oNewItem2))
|
|
{
|
|
AssignCommand( oPlayer, ActionEquipItem( oNewItem2, iSlot));
|
|
DestroyObject( oItem);
|
|
}
|
|
else
|
|
DestroyObject( oNewItem2);
|
|
}
|