UW2_PRC8/_module/nss/scribe_descption.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

34 lines
880 B
Plaintext

void main()
{
// Vars
object oPC = GetPCSpeaker(), oListener = OBJECT_SELF;
object o = GetNearestObjectByTag("describer", oListener);
string sNN = GetLocalString(oListener, "NN");
string sID = GetLocalString(oPC, "ONID");
object oItem;
oItem = GetFirstItemInInventory(o);
//Let's find the item and set the description!
while(GetIsObjectValid(oItem))
{
SetDescription(oItem, sNN, TRUE);
//Return the item!
AssignCommand(o, ActionGiveItem(oItem, oPC));
//Reset the chest and the PC.
SetLocalInt(oPC, "DESC_USER", 0);
SetLocalInt(o, "IN_USE", 0);
oItem = GetNextItemInInventory(o);
}
effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP, FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, o, 0.0f);
SetPlotFlag(oListener, FALSE);
DestroyObject(oListener, 0.0f);
//Script End
}