Battledale_PRC8/_module/nss/idcust_modtorso.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

370 lines
5.7 KiB
Plaintext

//NOTE: I don't know who originally created this system, however
//Genisys (Guile) modified this on 9/15/08 for 1.69
int GetNextTorsoIndex( object oItem)
{
int iIndex = GetItemAppearance( oItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_TORSO);
iIndex++;
//****************************CLOTHING INDEX*********************************
if( iIndex == 0)
{
iIndex = 1;
return iIndex;
}
else if( iIndex == 2)
{
iIndex = 3;
return iIndex;
}
else if( iIndex == 4)
{
iIndex = 5;
return iIndex;
}
else if( iIndex == 10)
{
iIndex = 12;
return iIndex;
}
else if( iIndex == 13)
{
iIndex = 19;
return iIndex;
}
else if( iIndex == 20)
{
iIndex = 39;
return iIndex;
}
else if( iIndex == 40)
{
iIndex = 50;
return iIndex;
}
else if( iIndex == 51)
{
iIndex = 110; //CEP2.2
return iIndex;
}
else if( iIndex == 112)
{
iIndex = 113;
return iIndex;
}
else if( iIndex == 115)
{
iIndex = 116;
return iIndex;
}
else if( iIndex == 117)
{
iIndex = 119;
return iIndex;
}
else if( iIndex == 120)
{
iIndex = 150;
return iIndex;
}
else if( iIndex == 160)
{
iIndex = 163;
return iIndex;
}
else if( iIndex == 178)
{
iIndex = 1;
return iIndex; //Start Over On Clothes...
}
//****************************LEATHER INDEX******************************
else if( iIndex == 21)
{
iIndex = 28;
return iIndex;
}
else if( iIndex == 21)
{
iIndex = 28;
return iIndex;
}
else if( iIndex == 29)
{
iIndex = 40;
return iIndex;
}
else if( iIndex == 41)
{
iIndex = 10; //Start Studded Leather Index
return iIndex;
}
//***************STUDDED LEATHER INDEX ************************
else if( iIndex == 11)
{
iIndex = 13;
return iIndex;
}
else if( iIndex == 14)
{
iIndex = 16;
return iIndex;
}
else if( iIndex == 17)
{
iIndex = 27;
return iIndex;
}
else if( iIndex == 28)
{
iIndex = 41;
return iIndex;
}
else if( iIndex == 43)
{
iIndex = 49;
return iIndex;
}
else if( iIndex == 50)
{
iIndex = 20; //Start Over with Leath Index..
return iIndex;
}
//*******************CHAIN MAIL/SHIRT INDEX**********************
//AC 3 - 5
else if( iIndex == 23)
{
iIndex = 29;
return iIndex;
}
else if( iIndex == 30)
{
iIndex = 43;
return iIndex;
}
else if( iIndex == 45)
{
iIndex = 121; //CEP2.2
return iIndex;
}
else if( iIndex == 130)
{
iIndex = 4; //Start with Chain Mail..
return iIndex;
}
else if( iIndex == 5)
{
iIndex = 15;
return iIndex;
}
else if( iIndex == 16)
{
iIndex = 22;
return iIndex;
}
else if( iIndex == 23)
{
iIndex = 29;
return iIndex;
}
else if( iIndex == 30)
{
iIndex = 34;
return iIndex;
}
else if( iIndex == 37)
{
iIndex = 38;
return iIndex;
}
else if( iIndex == 39)
{
iIndex = 54;
return iIndex;
}
else if( iIndex == 57)
{
iIndex = 59;
return iIndex;
}
else if( iIndex == 60)
{
iIndex = 63;
return iIndex;
}
else if( iIndex == 64)
{
iIndex = 112;
return iIndex;
}
else if( iIndex == 113)
{
iIndex = 115;
return iIndex;
}
else if( iIndex == 116)
{
iIndex = 118;
return iIndex;
}
else if( iIndex == 119)
{
iIndex = 210;
return iIndex;
}
else if( iIndex == 211)
{
iIndex = 11; // Start Chain Shirt Index
return iIndex;
}
//********************** BREAST PLATE INDEX *********************
//AC 6
else if( iIndex == 12)
{
iIndex = 17;
return iIndex;
}
else if( iIndex == 18)
{
iIndex = 30;
return iIndex;
}
else if( iIndex == 31)
{
iIndex = 45;
return iIndex;
}
else if( iIndex == 46)
{
iIndex = 48;
return iIndex;
}
else if( iIndex == 49)
{
iIndex = 120;
return iIndex;
}
else if( iIndex == 121)
{
iIndex = 33; //Start Half-Plate Index
return iIndex;
}
//*************************HALF PLATE INDEX*********************
//AC 7
else if( iIndex == 34)
{
iIndex = 46;
return iIndex;
}
else if( iIndex == 48)
{
iIndex = 51;
return iIndex;
}
else if( iIndex == 53)
{
iIndex = 14; //Start Plate Index
return iIndex;
}
//********************** PLATE INDEX **************************
//AC 8
else if( iIndex == 15)
{
iIndex = 21;
return iIndex;
}
else if( iIndex == 22)
{
iIndex = 23;
return iIndex;
}
else if( iIndex == 24)
{
iIndex = 37;
return iIndex;
}
else if( iIndex == 38)
{
iIndex = 53;
return iIndex;
}
else if( iIndex == 54)
{
iIndex = 57;
return iIndex;
}
else if( iIndex == 58)
{
iIndex = 60;
return iIndex;
}
else if( iIndex == 63)
{
iIndex = 186;
return iIndex;
}
else if( iIndex == 187)
{
iIndex = 11; //Start with Breast Plates
return iIndex;
}
return iIndex;
}
void main()
{
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_TORSO);
if( GetIsDM( oPlayer))
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
iIndex = GetNextTorsoIndex( oItem);
if( GetIsDM( oPlayer))
SendMessageToPC( oPlayer, "The index after is: " + IntToString( iIndex));
object oNewItem = CopyItemAndModify( oItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_TORSO, iIndex, TRUE);
if( GetIsObjectValid( oNewItem))
{
AssignCommand( oPlayer, ActionEquipItem( oNewItem, iSlot));
DestroyObject( oItem);
}
else
DestroyObject( oNewItem);
}