40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: bigcat.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Turns the placeable into a bigcat
|
|
if a player comes near enough.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Brent
|
|
//:: Created On: January 17, 2002
|
|
//:://////////////////////////////////////////////
|
|
|
|
void CreateGargoyle(object oPC)
|
|
{
|
|
object oGargoyle = CreateObject(OBJECT_TYPE_CREATURE, "enchantedtiger", GetLocation(OBJECT_SELF));
|
|
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
|
|
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 5.0)
|
|
{
|
|
object oGargoyle = CreateObject(OBJECT_TYPE_CREATURE, "enchantedtiger", GetLocation(OBJECT_SELF));
|
|
|
|
object oTarget;
|
|
oTarget = GetObjectByTag("enchantedtiger");
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POLYMORPH), GetLocation(oTarget));
|
|
|
|
effect eDam = EffectDamage(500);
|
|
SetPlotFlag(OBJECT_SELF, FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, OBJECT_SELF);
|
|
//DestroyObject(OBJECT_SELF, 0.5);
|
|
}
|
|
}
|
|
|
|
|