Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 20:24:01 -04:00
parent 4e16ca63ca
commit 5197ad9a4d
7741 changed files with 5391820 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
int GetNextBeltIndex( int iIndex)
{
if( iIndex == 185)
iIndex = 168;
else if( iIndex == 166)
iIndex = 156;
else if( iIndex == 149)
iIndex = 115;
else if(iIndex == 109)
iIndex == 63;
else if(iIndex == 62)
iIndex == 21;
else if(iIndex == 19)
iIndex == 17;
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_BELT);
if( GetIsDM( oPlayer))
SendMessageToPC( oPlayer, "The index before is: " + IntToString( iIndex));
iIndex--;
iIndex = GetNextBeltIndex( 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_BELT, iIndex, TRUE);
if( GetIsObjectValid( oNewItem))
{
AssignCommand( oPlayer, ActionEquipItem( oNewItem, iSlot));
DestroyObject( oItem);
}
else
DestroyObject( oNewItem);
}