PGCC_PRC8/_module/nss/inc_changearmor.nss
Jaysyn904 e51634d39b Initial upload
Initial upload.
2024-10-09 14:17:22 -04:00

49 lines
1.6 KiB
Plaintext

//::///////////////////////////////////////////////
//:: inc_changearmor
//:://////////////////////////////////////////////
#include "x2_inc_itemprop"
#include "x2_inc_craft"
void armorModelNext(int iItemAppr)
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
oItem = IPGetModifiedArmor(oItem, iItemAppr, X2_IP_ARMORTYPE_NEXT, TRUE);
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
}
void armorModelPrev(int iItemAppr)
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
oItem = IPGetModifiedArmor(oItem, iItemAppr, X2_IP_ARMORTYPE_PREV, TRUE);
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
}
void armorModelRobe(int iRobeType)
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
object oNewItem = IPCreateAndModifyArmorRobe(oItem, iRobeType);
DestroyObject(oItem);
AssignCommand(oPC, ActionEquipItem(oNewItem, INVENTORY_SLOT_CHEST));
}
void weaponModelNext(int iWeaponModel)
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
oItem = IPGetModifiedWeapon(oItem, iWeaponModel, X2_IP_WEAPONTYPE_NEXT, TRUE);
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND));
}
void weaponModelPrev(int iWeaponModel)
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
oItem = IPGetModifiedWeapon(oItem, iWeaponModel, X2_IP_WEAPONTYPE_PREV, TRUE);
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND));
}