Lankhmar_PRC8/_module/nss/save_when_cloak.nss

41 lines
734 B
Plaintext
Raw Permalink Normal View History

2025-04-03 12:54:47 -04:00
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "redcloakofpro")== OBJECT_INVALID)
return;
// Give the speaker some XP
GiveXPToCreature(GetPCSpeaker(), 350);
//object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
DoSinglePlayerAutoSave();
object oTarget;
oTarget = GetObjectByTag("save_when_cloak");
DestroyObject(oTarget, 1.0);
}