DMH-Online

Dungeon Masters Helper · Est. 2005

Placeables Scripts

NWN Script: spit_treasure.htm

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.
 

⌂ All Scripts ← PreviousNext → 👁 Category List

All Placeables Scripts

📄 cast_haste 📄 check_fire 📄 chest_puzzle 📄 close_door 📄 close_door_002 📄 close_door_003 📄 close_door_004 📄 create_item_with_delay 📄 darklamp 📄 darklamp_002 📄 day_night_lights 📄 day_night_lights_002 📄 destroy_spawned_items 📄 destroy_spawned_items_002 📄 door_guard 📄 door_lock_item 📄 dragging_placeables 📄 encounter_on_open 📄 encounter_on_open_002 📄 fair_loot 📄 fire_burns 📄 guarded_chest 📄 kill_attacker 📄 kill_nearby 📄 lights_on_off 📄 linked_doors 📄 moveable_placeables 📄 multi_door 📄 open_doors 📄 poly_attacker 📄 polymorph_pc 📄 polymorph_pc_002 📄 random_teleport 📄 refil_chest 📄 refil_chest_002 📄 refil_chest_003 📄 refil_chest_004 📄 refil_chest_005 📄 refil_chest_006 📄 refil_chest_007 📄 remove_with_item 📄 respawner 📄 smart_doors 📄 spit_treasure 📄 talkable_placeables 📄 talking_door 📄 talking_sign 📄 talking_sign_002 📄 talking_sign_003 📄 talking_sign_004 📄 teleporting_chairs 📄 useable_bedroll 📄 useable_birdcage 📄 useable_cannon 📄 useable_catapult 📄 useable_chair 📄 useable_chair_002 📄 useable_chair_003 📄 useable_chair_004 📄 useable_couch 📄 useable_divining_pool 📄 useable_gong 📄 useable_kegs 📄 useable_kegs_002 📄 useable_placeables_002 📄 useable_sign 📄 useable_sign_002 📄 useable_sundial 📄 useable_sundial_002 📄 useable_sundial_003 📄 useable_sundial_004 📄 useable_sundial_005 📄 useable_sundial_006 📄 useable_training_dummy 📄 useable_training_dummy_002 📄 useable_training_dummy_003 📄 useable_training_dummy_004 📄 useable_trapdoor 📄 useable_trapdoor_002 📄 useable_trapdoor_003 📄 useable_trapdoor_004 📄 weapon_spawn_per_class 📄 worth