DMH-Online

Dungeon Masters Helper · Est. 2005

Placeables Scripts

NWN Script: poly_attacker.htm

Author Sticky: Post Working Scripts Here
Ratmaster2000 Posted: Monday, 01 July 07:45AM
1. Script name: Polydoor
2. what it does: turns a character into a polymorphed character when a door is attacked
3. Notes: place this script in a door's on damaged area

Okay I tried the earlier post about changing an NPC into a penguin when a door was opened, but I wanted the polymorph to happen only when the PC tried the door, as I have many doors that are indesctructible and unopenable (hey, its stupid for an inn to have an open backdoor right? But I didnt want the door to go anywhere), BTW thats a lousy use of plot and I hope Bioware fixes that. Well since I couldn't get it to work that way (or maybe I am just tired) I figured, like me, the PC's would attack the door at least once so I used the on damaged area and came up with this
NWScript:
// -------------------------------------------------
// : NWNscript Poly Penguin
// : filename:sc_polydoor
// : Created 30 jun 02 23:40
// : Created by Darryl Sandell
// -------------------------------------------------
// Script to change PC into a polymorphed character
// in this instance a penguin
// when a door is attacked
void main()
{
 object oPC = GetLastDamager();
  if ( GetIsPC( oPC ) )
  {
  effect epolymorph = EffectPolymorph(POLYMORPH_TYPE_PENGUIN );
  ActionWait(0.5);
  ActionCastSpellAtObject( SPELL_POLYMORPH_SELF , oPC);
  ApplyEffectToObject(DURATION_TYPE_TEMPORARY, epolymorph, oPC, 20.0);
  SendMessageToPC(oPC, "You feel like you need a Bud Ice!");
  }
  }



Basically just a one function change and placement into a different call on an placeable. Thank you to the person who posted the original script and I hope this helps someone out.

⌂ 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