Changed folder name.

Changed folder name.
This commit is contained in:
Jaysyn904
2022-10-07 21:08:37 -04:00
parent 1c33c2843e
commit 8d97886c3f
7060 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
int GetNextShieldIndex( object oShield)
{
int iIndex = GetItemAppearance( oShield, ITEM_APPR_TYPE_SIMPLE_MODEL, 0);
iIndex--;
int iItemtype = GetBaseItemType( oShield);
//shields
if( iItemtype == BASE_ITEM_SMALLSHIELD)
{
if( iIndex == 40)
iIndex = 33;
else if( iIndex == 30)
iIndex = 23;
else if( iIndex == 20)
iIndex = 13;
else if( iIndex == 10)
iIndex = 43;
}
else if( iItemtype == BASE_ITEM_LARGESHIELD)
{
if( iIndex == 60) //1.69 indexes
iIndex = 56;
else if( iIndex == 50)
iIndex = 43;
else if( iIndex == 40)
iIndex = 33;
else if( iIndex == 30)
iIndex = 23;
else if( iIndex == 20)
iIndex = 13;
else if( iIndex == 10)
iIndex = 75;
}
else if( iItemtype == BASE_ITEM_TOWERSHIELD)
{
if( iIndex == 50) //1.69 Indexes
iIndex = 43;
else if( iIndex == 40)
iIndex = 33;
else if( iIndex == 30)
iIndex = 23;
else if( iIndex == 20)
iIndex = 13;
else if( iIndex == 10)
iIndex = 54;
}
return iIndex;
}
void main()
{
object oPlayer = GetPCSpeaker();
object oShield = GetItemInSlot( INVENTORY_SLOT_LEFTHAND, oPlayer);
int iIndex = GetNextShieldIndex( oShield);
if( GetIsDM( oPlayer))
SendMessageToPC( oPlayer, "The index is: " + IntToString( iIndex));
object oNewShield = CopyItemAndModify(oShield, ITEM_APPR_TYPE_SIMPLE_MODEL, 0, iIndex, TRUE);
if( GetIsObjectValid( oNewShield))
{
AssignCommand( oPlayer, ActionEquipItem( oNewShield, INVENTORY_SLOT_LEFTHAND));
DestroyObject( oShield);
}
else
DestroyObject( oNewShield);
}