#include "nw_i0_plot"
#include "nw_i0_2q4luskan"
/*   Script generated by
Lilac Soul's NWN Script Generator, v. 1.6

For download info, please visit:
http://www.lilacsoul.revility.com    */

//Put this OnEnter
void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int nInt;
nInt=GetLocalInt(oPC, "intDragonDisarmed");

if (!(nInt == 0))
   return;

object oTarget;
oTarget = GetObjectByTag("DragonTrapStatue");

DestroyObject(oTarget, 0.0);

oTarget = GetObjectByTag("c40Door");

//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead

//int nInt;
nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FLAME_M), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FLAME_M), GetLocation(oTarget));

oTarget = GetObjectByTag("c40Door");

DestroyObject(oTarget, 0.0);

location lTarget;
oTarget = GetWaypointByTag("Loc_40");

lTarget = GetLocation(oTarget);

CreateObjectVoid(OBJECT_TYPE_PLACEABLE, "sphinxstatue", lTarget);

FloatingTextStringOnCreature("The statue of a dragon rolls throw the door just ahead coming to a rest before you as it breathes a plume of steam.", oPC, TRUE);

//DelayCommand(3.0, FloatingTextStringOnCreature("The statue of a dragon rolls throw the door just ahead coming to a rest before you as it breathes a plume of steam.", oPC));

SetPLocalInt(oPC, "intBreathSteam", 1);

}
