Amon_PRC8/_module/nss/wrynnspiderhole.nss

49 lines
1.8 KiB
Plaintext
Raw Normal View History

2025-04-03 19:00:46 -04:00
//::///////////////////////////////////////////////
//:: NW_O2_SKELETON.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Turns the placeable into a skeleton
if a player comes near enough.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: January 17, 2002
//:://////////////////////////////////////////////
void ActionCreate(string sCreature, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lLoc);
}
void main()
{
object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 10.0)
{
effect eMind1 = EffectVisualEffect(VFX_FNF_SMOKE_PUFF);
effect eMind2 = EffectVisualEffect(VFX_FNF_SCREEN_SHAKE);
effect eMind3 = EffectVisualEffect(VFX_DUR_SMOKE);
string sCreature = "broodlingwarrio";
string sCreature2 = "broodlingwarrio";
// * 10% chance of kikana instead
if ((Random(100) > 80) && (GetLocalInt(GetModule(),"marngodelay")==0))
{
sCreature = "marngo";
SetLocalInt (GetModule(),"marngodelay",1);
}
location lLoc = GetLocation(OBJECT_SELF);
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lLoc, FALSE);
CreateObject(OBJECT_TYPE_CREATURE, sCreature2, lLoc, FALSE);
CreateObject(OBJECT_TYPE_CREATURE, sCreature2, lLoc, FALSE);
CreateObject(OBJECT_TYPE_CREATURE, sCreature2, lLoc, FALSE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind1, GetLocation(OBJECT_SELF));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind2, GetLocation(OBJECT_SELF));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind3, GetLocation(OBJECT_SELF));
SetPlotFlag(OBJECT_SELF, FALSE);
DestroyObject(OBJECT_SELF, 0.5);
}
}