Alangara_PRC8/_module/nss/tlr_setitem.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

32 lines
986 B
Plaintext

//::///////////////////////////////////////////////
//:: Tailoring - Set Item
//:: tlr_setitem.nss
//:: Copyright (c) 2003 Jake E. Fitch
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Jake E. Fitch (Milambus Mandragon)
//:: Created On: March 9, 2004
//:://////////////////////////////////////////////
void main()
{
SetListening(OBJECT_SELF, FALSE);
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF);
int iToModify = GetLocalInt(OBJECT_SELF, "ToModify");
int iNewApp = StringToInt(GetLocalString(OBJECT_SELF, "tlr_Spoken"));
if (iNewApp < 0) iNewApp = 0;
object oNewItem = CopyItemAndModify(oItem, ITEM_APPR_TYPE_ARMOR_MODEL, iToModify, iNewApp, TRUE);
DestroyObject(oItem);
SendMessageToPC(oPC, "New Appearance: " + IntToString(iNewApp));
AssignCommand(OBJECT_SELF, ActionEquipItem(oNewItem, INVENTORY_SLOT_CHEST));
}