Initial upload
Initial upload
This commit is contained in:
79
_module/nss/idcust_modshin.nss
Normal file
79
_module/nss/idcust_modshin.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
int GetNextShinIndex( int iIndex)
|
||||
{
|
||||
|
||||
if( iIndex == 2)
|
||||
iIndex = 3;
|
||||
|
||||
else if( iIndex == 22)
|
||||
iIndex = 63;
|
||||
|
||||
else if( iIndex == 64)
|
||||
iIndex = 80; //CEP2.2
|
||||
|
||||
else if( iIndex == 94)
|
||||
iIndex = 110;
|
||||
|
||||
else if( iIndex == 111)
|
||||
iIndex = 112;
|
||||
|
||||
else if( iIndex == 113)
|
||||
iIndex = 116;
|
||||
|
||||
else if( iIndex == 118)
|
||||
iIndex = 120;
|
||||
|
||||
else if( iIndex == 121)
|
||||
iIndex = 128;
|
||||
|
||||
else if( iIndex == 133)
|
||||
iIndex = 150;
|
||||
|
||||
else if( iIndex == 163)
|
||||
iIndex = 164;
|
||||
|
||||
else if( iIndex == 165)
|
||||
iIndex = 175;
|
||||
|
||||
else if( iIndex == 176)
|
||||
iIndex = 181;
|
||||
|
||||
else if( iIndex == 182)
|
||||
iIndex = 186;
|
||||
|
||||
else if( iIndex >= 187)
|
||||
iIndex = 1;
|
||||
|
||||
|
||||
|
||||
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_LSHIN);
|
||||
|
||||
if( GetIsDM( oPlayer))
|
||||
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
|
||||
|
||||
iIndex++;
|
||||
iIndex = GetNextShinIndex( 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_LSHIN, iIndex, TRUE);
|
||||
object oNewItem2 = CopyItemAndModify( oNewItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_RSHIN, iIndex, TRUE);
|
||||
DestroyObject( oNewItem);
|
||||
|
||||
if( GetIsObjectValid( oNewItem2))
|
||||
{
|
||||
AssignCommand( oPlayer, ActionEquipItem( oNewItem2, iSlot));
|
||||
DestroyObject( oItem);
|
||||
}
|
||||
else
|
||||
DestroyObject( oNewItem2);
|
||||
}
|
Reference in New Issue
Block a user