Battledale_PRC8/_module/nss/jw_altar_dist.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

59 lines
1.2 KiB
Plaintext

void main()
{
object oObject=GetInventoryDisturbItem();
object oPC = GetLastDisturbed();
int nKey1=0;
int nKey2=0;
object oInv;
if (GetInventoryDisturbType()==INVENTORY_DISTURB_TYPE_ADDED)
{
if ((GetTag(oObject)!="jw_key_vlas1")&&(GetTag(oObject)!="jw_key_vlas2"))
{
ActionSpeakString("Fool. That was not the key I wanted! I don't know what this is, but I'm keeping it");
ActionCastSpellAtObject(SPELL_EVARDS_BLACK_TENTACLES,oPC,METAMAGIC_ANY,TRUE);
DestroyObject(oObject);
}
else
{
oInv=GetFirstItemInInventory();
while (GetIsObjectValid(oInv))
{
if (GetTag(oInv)=="jw_key_vlas1")
{ nKey1=1;}
if (GetTag(oInv)=="jw_key_vlas2")
{ nKey2=1;}
oInv=GetNextItemInInventory();
}
if (nKey1==1&&nKey2==1)
{
ActionSpeakString("Ahh . . . thank you . . .");
oInv=GetFirstItemInInventory();
while (GetIsObjectValid(oInv))
{
DestroyObject(oInv);
oInv=GetNextItemInInventory();
}
CreateItemOnObject("jw_key_vlas3",OBJECT_SELF);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SCREEN_SHAKE),GetLocation(OBJECT_SELF));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_KNOCK),GetLocation(OBJECT_SELF));
}
}
}
}