DMH-Online

Dungeon Masters Helper · Est. 2005

Creatures Scripts

NWN Script: trolls.htm

Author Sticky: Post Working Scripts Here
Janus-SOK Posted: Wednesday, 10 July 05:02AM
1. AD&D Style Trolls

2. Makes it so the killing blow on trolls must be dealt with fire or acid damage.

3. Add this to the troll's OnDeath event or UserDefinedEvent for OnDeath.

NWScript:
int nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
    int nAcidDamage = GetDamageDealtByType(DAMAGE_TYPE_ACID);
    int nTotalFireAcidDamage = nFireDamage + nAcidDamage;
    effect eHeal = EffectResurrection();
    if (nTotalFireAcidDamage <= 0)
    {
       SetIsDestroyable(FALSE, TRUE, TRUE);
       DelayCommand(6.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF, 0.0f));
       DelayCommand(6.0f, (SetIsDestroyable(TRUE, FALSE, FALSE)));
    }
⌂ All Scripts ← PreviousNext → 👁 Category List

All Creatures Scripts

📄 apply_spell_effect 📄 aurak_draconian 📄 baaz_draconian 📄 boss_spawner 📄 change_light_spawn_pt_on_death 📄 clone_mob 📄 collect_loot 📄 create_unique_objectIDs 📄 creature_proc 📄 explode_ondeath 📄 explode_ondeath_002 📄 explode_ondeath_003 📄 exploding_chickens 📄 fire_death 📄 inverse_mob 📄 iron_statue 📄 lich 📄 lootable_corpse 📄 lootable_corpse_002 📄 lootable_corpse_002a 📄 lootable_corpse_oo2 📄 mob_respawn 📄 mob_respawn_002 📄 multi_creature_spawn 📄 night_time 📄 random_death_effect 📄 random_drops 📄 random_drops_002 📄 random_drops_003 📄 random_enc_onrest 📄 random_hps 📄 sivac_draconian 📄 spawn 📄 spawn_on_hearbeat 📄 summon_last_hostile 📄 summon_mob 📄 trolls 📄 trolls_002 📄 vampire_coffin 📄 werewolf