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.
This commit is contained in:
58
_module/nss/jw_altar_dist.nss
Normal file
58
_module/nss/jw_altar_dist.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
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));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user