DMH-Online

Dungeon Masters Helper · Est. 2005

Placeables Scripts

NWN Script: useable_divining_pool.htm

Author Sticky: Post Working Scripts Here
Thorbone Posted: Monday, 08 July 03:11PM
1. Name: Magical Pool of Wonder

2. What it does: When a PC drinks from the pool (uses it), a random magical effect is applied to him, either negative or positive, and a soft voice whispers in his mind 🙂

3. Notes: Put this in a placeable's
onUsed script. It could be everything, but I used a shaft of light coming out of a pool. When the PC steps into the beam or chooses use from the radial menu the script is activated.

Inspired by a similar script by Weishaar and used in my own module: Caverns of Thunder. The module is available here. Check it out for lots of other funny scripts 👀

NWScript:
//: Magical Pool of Wonder
//: By Thorbone, July 4, 2002.
//: Inspired by a script by NWN Community member Weishaar
#include "nw_i0_tool"
void main()
{
    object oPC = GetLastUsedBy();
    if (GetIsPC(oPC)) {
        effect eObject = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2, FALSE);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eObject, oPC, 1.0f);
        int chanceWheel = Random(20);
        switch(chanceWheel)
        {
       case 1://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Rest, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSleep(), oPC, 14.0f);
            break;
        case 2://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'You gain knowledge, my child!'");
            GiveXPToCreature(oPC, 121);
            break;
        case 3://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Stand still, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectParalyze(), oPC, 14.0f);
            break;
        case 4://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Forget all your woes, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDazed(), oPC, 14.0f);
            break;
        case 5://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Have a scratch, my child!'");
            ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(7, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL), oPC);
            break;
        case 6://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'You are wise, my child!'");
            ActionCastSpellAtObject(SPELL_OWLS_WISDOM, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 7://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Squeal like a pig, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(POLYMORPH_TYPE_BOAR), oPC, 45.0);
            break;
        case 8://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Meet your power animal, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(POLYMORPH_TYPE_PENGUIN), oPC, 45.0);
            break;
        case 9://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'A taste of Power, my child!'");
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(POLYMORPH_TYPE_RED_DRAGON), oPC, 45.0);
            break;
        case 10://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Amazing grace, my child!'");
            ActionCastSpellAtObject(SPELL_CATS_GRACE, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 11://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'The power of the wood, my child!'");
            ActionCastSpellAtObject(SPELL_BARKSKIN, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 12://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Energy of Intelligence, my child!'");
            ActionCastSpellAtObject(SPELL_FOXS_CUNNING, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 13://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Vox Rectum, my child!'");
            ActionCastSpellAtObject(SPELL_STINKING_CLOUD, oPC, METAMAGIC_NONE, TRUE);
            eObject = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_NATURE, FALSE);
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eObject, oPC, 3.0f);
            break;
        case 14://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'A fire in your heart, my child!'");
            ActionCastSpellAtObject(SPELL_BURNING_HANDS, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 15://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Relax, my child!'");
            ActionCastSpellAtObject(SPELL_SLOW, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 16://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind ......... 'BOOH!'");
            ActionCastSpellAtObject(SPELL_FEAR, oPC, METAMAGIC_NONE, TRUE);
            break;
        case 17://Tested
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Give me your power, my child!'");
            ActionCastSpellAtObject(SPELL_ENERGY_DRAIN, oPC, METAMAGIC_NONE, TRUE);
            break;
        default:
            SendMessageToPC(oPC, "A soft voice whispers in your mind: 'Feel refreshed, my child!'");
            ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(7), oPC);
            break;
     }
    }
}



You might want to change the words spoken by the soft voice, in the SendMessageToPC commands. Otherwise your module will be too similar to mine ... But I won't mind if you won't

⌂ 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