DMH-Online

Dungeon Masters Helper · Est. 2005

Items Scripts

NWN Script: helm.htm

Author Sticky: Post Working Scripts Here
Faustt D'Arcaanin Posted: Wednesday, 17 July 01:19AM
This script causes helm called "FD_HelmTelep" to teleport a player wherever he points. . .(he has to be able to see it) just create a helm (any helm) and give it the propertie cast:unique power.

then include these scripts
NWScript:
void main()
{
    object oPlayer = GetItemActivator();
    object oItem = GetItemActivated();
    location lLoc = GetItemActivatedTargetLocation();
    if(GetIsObjectValid(oItem))
    {
        if(GetIsObjectValid(oPlayer))
        {
            if(GetTag(oItem) == "FD_HelmTelep")
            {
                ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), lLoc);
                location lLoc2 = GetLocation(oPlayer);
                ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), lLoc2);
                SetLocalLocation(oItem, "jumploc", lLoc);
                ExecuteScript("fd_jump",oPlayer);
            }
        }
    }
}


this goes in the onItemActivate in your modules scripts

then create a small script called "fd_jump"

NWScript:
void main()
{
    object oItem = GetItemActivated();
    location lLoc3 = GetLocalLocation(oItem,"jumploc");
    JumpToLocation(lLoc3);
}


no need to put this anywhere. . just create it. .

BUGS: because of the limited range of players sight . . makes teleports relatively short distance. . but can be cast over most obstacles. . making it a handy tool for escape. . .

tell me what you think

Faustt D`Arcaanin

⌂ All Scripts ← PreviousNext → 👁 Category List

All Items Scripts

📄 aquire_time 📄 bead_of_force 📄 book_of_inf_spells 📄 clear_inventory 📄 clear_inventory_002 📄 clear_inventory_003 📄 clear_inventory_004 📄 cursed_items 📄 cursed_items_002 📄 cursed_potion 📄 give_xp 📄 glow_when_mob 📄 healing_belt 📄 helm 📄 hurled_weapons 📄 item_weight 📄 key_rental 📄 lore_items 📄 npc_owners 📄 random_magic 📄 retrieve_ammo 📄 scimitar_of_dancing 📄 scroll_creation 📄 spawn_item 📄 spawn_item_002 📄 spawn_item_004 📄 stone_of_recall 📄 stone_of_recall_002 📄 summon_creature 📄 teleport_item 📄 torch 📄 weapon_upgrade