Author Sticky: Post Working Scripts Here
VXagent Posted: Wednesday, 03 July 12:17AM
Script Name: rj_stattogolem

What it does: Picture four statues around a column. Three of the statues generate random treasure when inspoected but when the fourth is inspected it destroys all the statues and spawns in a Stone Golem.

Note: The three statues that give treasure must have Statue1, Statue2, and Statue3 tags. The generic NWN random treasure script is placed in the "OnUsed" script prperties area.

NWScript:
void main()

{

  //declare objects and get them

   object oStatue1=GetObjectByTag("Statue1", 0);

   object oStatue2=GetObjectByTag("Statue2", 0);

   object oStatue3=GetObjectByTag("Statue3", 0);

   //setup some visual effects

   ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect( VFX_FNF_SUMMON_MONSTER_3 ), oStatue1, 1.0 );

   ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect( VFX_FNF_SUMMON_MONSTER_3 ), oStatue2, 1.0 );

   ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect( VFX_FNF_SUMMON_MONSTER_3 ), oStatue3, 1.0 );

   ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect( VFX_FNF_SUMMON_MONSTER_3 ), OBJECT_SELF, 1.0 );

   //destroy the statues

   DestroyObject(OBJECT_SELF, 0.1); //Destroys statue

   DestroyObject(oStatue1,0.2);

   DestroyObject(oStatue2,0.3);

   DestroyObject(oStatue3,0.4);

   //create the golem

   object oStoneGolem = CreateObject(OBJECT_TYPE_CREATURE, "NW_GOLSTONE", GetLocation(OBJECT_SELF));

   location lStoneGolem =  GetLocation(OBJECT_SELF);

   ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect( VFX_FNF_SMOKE_PUFF ), oStoneGolem );




This is a simplistic script but maybe it will help a few. Enjoy.