REO-EE/_module/nss/cloth_copy_side2.nss
Jaysyn904 f82740bbbd Initial commit
Initial commit
2024-02-22 13:22:03 -05:00

104 lines
2.1 KiB
Plaintext

#include "zep_inc_craft2"
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetLocalObject(oPC, "ZEP_CR_ITEM");
object oNew;
int nPart = GetLocalInt(oPC, "ZEP_CR_PART");
int nPart2;
int nCurrApp;
int nSlot;
if (nPart == ITEM_APPR_ARMOR_MODEL_LBICEP)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RBICEP;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RBICEP)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LBICEP;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LFOOT)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RFOOT;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RFOOT)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LFOOT;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LFOREARM)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RFOREARM;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RFOREARM)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LFOREARM;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LHAND)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RHAND;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RHAND)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LHAND;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LSHIN)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RSHIN;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RSHIN)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LSHIN;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LSHOULDER)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RSHOULDER;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RSHOULDER)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LSHOULDER;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_LTHIGH)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_RTHIGH;
}
else
if (nPart == ITEM_APPR_ARMOR_MODEL_RTHIGH)
{
nPart2 = ITEM_APPR_ARMOR_MODEL_LTHIGH;
}
else
{
FloatingTextStringOnCreature("Invalid appearance piece to copy.", oPC, FALSE);
return;
}
SetLocalInt(oPC, "ZEP_CR_CHANGED", TRUE);
nCurrApp = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_MODEL, nPart2);
oNew = CopyItemAndModify(oItem, ITEM_APPR_TYPE_ARMOR_MODEL, nPart, nCurrApp, TRUE);
object oBackup = CopyItem(oItem, ZEP_GetZEPWorkContainer(OBJECT_SELF), TRUE);
SetLocalObject(oPC, "ZEP_CR_BACKUP", oBackup);
DestroyObject(oItem);
SetLocalObject(oPC, "ZEP_CR_ITEM", oNew);
nSlot = INVENTORY_SLOT_CHEST;
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionEquipItem(oNew, nSlot));
}