BioWare Forums: View Post For Code Display


You are viewing a single post. Please do not take this post out of context.
Read the full topic: Post Working Scripts Here

Author Sticky: Post Working Scripts Here
Eoweth Posted: Sunday, 23 June 12:22AM
Summon a creature for 10 turns, activated from an item.

NWScript:
//::/// /// /// /// /// /// /// /// /// /// /// ///
//:: Summon Creature From Item
//:: SUM_MOB_FROM_ITEM
//:: Copyright (c) 2002
//::/// /// /// /// /// /// /// /// /// /// /// ///
/*
    Summons a creature after using the summoning
    amulet.  The summoning lasts for 10 turns.
*/
//::/// /// /// /// /// /// /// /// /// /// /// ///
//:: Created By:  Eoweth (eoweth@cox.net)
//:: Created On:  June 22, 2002
//::/// /// /// /// /// /// /// /// /// /// /// ///
/*
    Called from onActivateItem under Module Properties
*/
//::/// /// /// /// /// /// /// /// /// /// /// ///
void main()
{
    // Declare major variables
    object oMaster = GetItemActivator();
    // Replace "CREATURERESREF" with the sCreatureResref of whichever monster you wish to summon.
    // Note that sCreatureResref is *not* the same as it's Tag.
    //  You can also replace the _3 with 1-3 for different summon effects.
    effect eSummon = EffectSummonCreature ("CREATURERESREF", VFX_FNF_SUMMON_MONSTER_3 );
    // Apply the VFX impact and summon effect
    // Adjust the TurnsToSections(10) to reflect how long you want it to last.
    // You can use HoursToSeconds(), RoundsToSeconds() or TurnsToSeconds().
    ApplyEffectToObject (DURATION_TYPE_TEMPORARY, eSummon, oMaster, TurnsToSeconds(10));
}

This post taken from the BioWare Forums
Powered by BioBoards Version 2.05.006
Please read our Copyright and Trademark Information