Player Resource Consortium

 

Author Topic: Need help combining PRC and CRP scripts  (Read 8068 times)

0 Members and 3 Guests are viewing this topic.

August 19, 2011, 01:37:20 AM

Hi all, the module I'm making is using a merge of PRC and the CEP. I'd like to use the CRP stuff, too, but I'm unsure of how to merge the scripts. I'm not much of a scripter, but I know a little. The CRP needs to use the OnClientEnter, OnActivateItem, OnModuleLoad, and OnDeath events. The scripts are listed here: http://cep.veiled-in-mists.org/forums/viewtopic.php?f=5&t=294

What I want to know is, can I use these via an ExecuteScript command, or will that cause conflicts with the PRC scripts?


August 19, 2011, 02:05:39 AM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

I'll check the scripts and get back to you on that.


August 20, 2011, 02:09:16 PM
Reply #2

Thanks, xwarren!  :)

For reference, here's the full code of the crp scripts:

zep_mod_enter:
Code: [Select]
void main()
{

ExecuteScript("x3_mod_def_enter", OBJECT_SELF);//CRAP
ExecuteScript("mod_enter", OBJECT_SELF);//CRAP

}

mod_enter:
Code: [Select]
#include "crp_inc_control"

void main()
{

   object oPC = GetEnteringObject();

    if(!CRP_ALLOW_JUMPING_BY_DEFAULT)
        SetLocalInt(oPC, "JUMP_INVALID", 1);

    if(CRP_CONTROLLED_RESTING_ONLY)
        SetLocalInt(oPC, "NO_REST", 1);

    //ExecuteScript("crpz_racial_mvmt", oPC);
    ExecuteScript("crpz_playerequip", oPC);
}

zep_on_mod_load:
Code: [Select]
//::///////////////////////////////////////////////
//:: Example XP2 OnLoad Script
//:: x2_mod_def_load
//:: zep_on_mod_load (addition CEP CRP 11/07/2008
//:: (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Put into: OnModuleLoad Event

    This example script demonstrates how to tweak the
    behavior of several subsystems in your module.

    For more information, please check x2_inc_switches
    which holds definitions for several variables that
    can be set on modules, creatures, doors or waypoints
    to change the default behavior of Bioware scripts.

    Warning:
    Using some of these switches may change your games
    balancing and may introduce bugs or instabilities. We
    recommend that you only use these switches if you
    know what you are doing. Consider these features
    unsupported!

    Please do NOT report any bugs you experience while
    these switches have been changed from their default
    positions.

    Make sure you visit the forums at nwn.bioware.com
    to find out more about these scripts.

*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-07-16
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////

#include "x2_inc_switches"
#include "x2_inc_restsys"
#include "nw_i0_generic"
void main()
{
///////////////////crap/////////////////////
    // Variable declarations
    int nNth, nDC, nReset;
    string sTag, sResRef, sDestination, sMSG1, sMSG2, sMSG3;
    object oMarker, oItem, oHolder;
    location lLoc;

    // Hide and mark all the hidden objects
    location lSavedObjects = GetLocation(GetObjectByTag("CRP_HIDDEN_OBJECTS"));
    object oHidden = GetObjectByTag("secret", nNth);
    while(GetIsObjectValid(oHidden))
    {
        lLoc = GetLocation(oHidden);
        sTag = GetLocalString(oHidden, "TAG");
        sResRef = GetResRef(oHidden);
        sDestination = GetLocalString(oHidden, "DESTINATION");
        nDC = GetLocalInt(oHidden, "DC");
        nReset = GetLocalInt(oHidden, "RESET");
        sMSG1 = GetLocalString(oHidden, "MSG1");
        sMSG2 = GetLocalString(oHidden, "MSG2");
        sMSG3 = GetLocalString(oHidden, "MSG3");
        oMarker = CreateObject(OBJECT_TYPE_WAYPOINT, "crpw_hidden_obj", lLoc, FALSE, "SC"+sTag);

        //store a hidden item
        if(GetObjectType(oHidden) == OBJECT_TYPE_ITEM)
        {
            oItem = CopyObject(oHidden, lSavedObjects, OBJECT_INVALID, "hidden_item");
            SetLocalObject(oMarker, "ITEM", oItem);
        }

        //store a placeable and all its inventory items
        else if(GetHasInventory(oHidden))
        {
            oHolder = CreateObject(OBJECT_TYPE_PLACEABLE, "crpp_holdbag", lSavedObjects);
            SetLocalObject(oMarker, "HOLDER", oHolder);
            oItem = GetFirstItemInInventory(oHidden);
            while(GetIsObjectValid(oItem))
            {
                AssignCommand(oHolder, ActionTakeItem(oItem, oHidden));
                oItem = GetNextItemInInventory(oHidden);
            }
        }

        SetLocalString(oMarker, "TAG", sTag);
        SetLocalString(oMarker, "RESREF", sResRef);
        SetLocalString(oMarker, "DESTINATION", sDestination);
        SetLocalInt(oMarker, "DC", nDC);
        SetLocalInt(oMarker, "RESET", nReset);
        SetLocalString(oMarker, "MSG1", sMSG1);
        SetLocalString(oMarker, "MSG2", sMSG2);
        SetLocalString(oMarker, "MSG3", sMSG3);
        DelayCommand(1.0, DestroyObject(oHidden));

        nNth++;
        oHidden = GetObjectByTag("secret", nNth);
    }

///////////////////crap////////////////////
//ExecuteScript("crpz_hide_sobjs", OBJECT_SELF);//CRAP

SetMaxHenchmen(2);

    //ExecuteScript("your_script_here", OBJECT_SELF);

//:://////////////////////////////////////////////
   if (GetGameDifficulty() ==  GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() ==  GAME_DIFFICULTY_DIFFICULT)
   {
        // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for
        // * rogues when playing on Hardcore+ difficulty. This only applies to scrolls
        SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE);

       // * Activating the switch below will make AOE spells hurt neutral NPCS by default
       // SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE);
   }

   // * AI: Activating the switch below will make the creaures using the WalkWaypoint function
   // * able to walk across areas
   // SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE);

   // * Spells: Activating the switch below will make the Glyph of Warding spell behave differently:
   // * The visual glyph will disappear after 6 seconds, making them impossible to spot
   // SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE);

   // * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing,
   // * but since it is described this way in the book, here is the switch to get it back...
   // SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE);

   // * Craft Feats: Use this to disable Item Creation Feats if you do not want
   // * them in your module
   // SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE);

   // * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size.
   // * We do not support this check for balancing reasons, but you can still activate it...
   // SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE);

   // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this
   // * did not fit into NWNs spell system and was confusing, so we took it out...
   // SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE);

   // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this
   // * did not fit into NWNs spell system and was confusing, so we took it out...
   // SetModuleSwitch (MODULE_SWITCH_RESTRICT_USE_POISON_TO_FEAT, TRUE);

    // * Spellcasting: Some people don't like caster's abusing expertise to raise their AC
    // * Uncommenting this line will drop expertise mode whenever a spell is cast by a player
    // SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE);


    // * Item Event Scripts: The game's default event scripts allow routing of all item related events
    // * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a
    // * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...)
    // * is triggered. Check "x2_it_example.nss" for an example.
    // * This feature is disabled by default.
   SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);

   if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
   {
        // * If Tagbased scripts are enabled, and you are running a Local Vault Server
        // * you should use the line below to add a layer of security to your server, preventing
        // * people to execute script you don't want them to. If you use the feature below,
        // * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a
        // * maximum of 16 chars, instead of the pure tag of the object.
        // * i.e. without the line below a user activating an item with the tag "test",
        // * will result in the execution of a script called "test". If you uncomment the line below
        // * the script called will be "1_test.nss"
        // SetUserDefinedItemEventPrefix("1_");

   }

   // * This initializes Bioware's wandering monster system as used in Hordes of the Underdark
   // * You can deactivate it, making your module load faster if you do not use it.
   // * If you want to use it, make sure you set "x2_mod_def_rest" as your module's OnRest Script
   // SetModuleSwitch (MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE);

   if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE)
   {

       // * This allows you to specify a different 2da for the wandering monster system.
       // SetWanderingMonster2DAFile("des_restsystem");

       //* Do not change this line.
       WMBuild2DACache();
   }

}

zep_on_activate2:
Code: [Select]
// Script: zep_on_activate
// by Barry_1066
// Feb. 12 2008 for CEP/DLA horse systems
// Integrates BOTH old and Tag based systems

#include "x3_inc_horse"
#include "zep_inc_phenos"
#include "x2_inc_switches"
#include "nw_i0_generic"
void main()
{
    object oItem = GetItemActivated();
    object oActivator = GetItemActivator();
    object oPC = GetItemActivator();
    object oTarget = GetItemActivatedTarget();
    string sTag = GetTag(oTarget);
    string sItem = GetTag(oItem);
    object oArea = GetArea(oTarget);
    location lActivator = GetLocation(oActivator);
    string sItemTag = GetTag(oItem);
    location lTarget = GetItemActivatedTargetLocation();

//---------------------------------START C.R.A.P. WIDGETS---------------------------------

    if (sItemTag == "crpi_paw")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_rope")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_graprope")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_graphook")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_bandages")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_bedroll")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_adv_tent02")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_adv_tent01")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }

         if (sItemTag == "crpi_tinderbox")
    {
        ExecuteScript("mod_activate",OBJECT_SELF); //CRAP_PAW
        return;
     }


//---------------------------------START DLA DM HORSE WIDGETS-----------------------------

    if (GetTag(oItem) == "horse_dismt2")
    {
        AssignCommand(oActivator, ActionStartConversation(oActivator, "horse_dismnt_dla", TRUE));
        return;
    }
// Paladin Unsummon//
      if (GetTag(oItem) == "horse_unsummon")
    {
        object oPaladin = GetItemActivator();
        AssignCommand(oPaladin, HorseUnsummonPaladinMount());
        return;
    }

//---------------------------------START CEP HORSE WIDGETS-------------------------------

///////////////////////////////////////////////////////////////////////////////
    // Summon White Pony
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_pony", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Pony");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Pony"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Spotted  Pony
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse2")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_ponysp", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Pony");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Pony"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Brown  Pony
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse3")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_ponybn", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Pony");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Pony"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Black Horse
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse4")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_horsebk", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Brown Horse
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse5")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_horse2", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Nightmare
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse6")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_horsenm", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon White Horse
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse7")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_horsewt", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Aurenthil Horse
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonHorse8")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_horseau", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Dragon (riding)
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonDragon")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_dragon_ride", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Dragon");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // CEP widget dismount
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "horse_dismt")
    {
        object oPC = GetItemActivator();
        //if (GetTag (GetItemActivated ()) == "horse_dismt") {zep_Dismount (oPC, "horse_dismt");}
        string sResRef = GetLocalString(oPC,"PONY_ID");
        zep_Dismount (oPC, "horse_dismt");
        SetLocalInt(oPC,"bX3_IS_MOUNTED",FALSE);
        DeleteLocalString(oPC,"X3_HORSE_SCRIPT_DISMOUNT");
        SetLocalInt(oPC, "VAR_HORSEMOUNT", 0);//horselord class variable


    //remove horse support DLA Style
    object oRider=GetItemActivator();
    DelayCommand(1.0, HORSE_SupportOriginalSpeed(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveMountedSkillDecreases(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveACBonus(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveHPBonus(oRider));

    object oTarget;
    location lPc = GetLocation(oPC);
    location lWyrmling = GetItemActivatedTargetLocation();

    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, sResRef, lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPC, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPC, ActionSpeakString("Invalid Horse/Pony"));
    }/* end else (valid owyrmling) */


        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon CEP/DLA Horse Managemet to dismiss a Horse
///////////////////////////////////////////////////////////////////////////////
        if (GetTag(oItem) == "Horse_Management")
    {
        AssignCommand(oActivator, ActionStartConversation(oActivator, "horse_magmt", TRUE));
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Pack Camel
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonCamel")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_pkcamel", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Camel");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Camel"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Pack Horse
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonpkHorse")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_pkhorse", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Pack Ox
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "SummonpkOx")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_pkox", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Ox");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Ox"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Pack Pony
///////////////////////////////////////////////////////////////////////////////
        if (sItemTag == "Summonpkpony")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "henchman_pkpony", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Pony");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Pony"));
    }/* end else (valid owyrmling) */
        return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon CEP Flying System
///////////////////////////////////////////////////////////////////////////////
       if (GetTag(oItem) == "fly_widget")
    {
        AssignCommand(oActivator, ActionStartConversation(oActivator, "fly_control", TRUE));
        return;
    }

//---------------------------------START DLA HORSE WIDGETS-------------------------------
///////////////////////////////////////////////////////////////////////////////
    // Summon Walnut Horse Scale Barding
///////////////////////////////////////////////////////////////////////////////
    if (sItemTag == "Horse_1")
    {
    object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_hvywarhorse2", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Walnut Horse Leather Barding
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_2")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_hvywarhorse3", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Walnut Horse Red Barding
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_3")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_hvywarhorse4", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Walnut Horse Chain Barding
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_4")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_hvywarhorse", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Walnut Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_5")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_horse001", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Purple Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_6")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_jousthorse1", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Blue & Gold Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_7")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_jousthorse2", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Black & White Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_8")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_jousthorse3", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Red & Gold Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_9")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_jousthorse4", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Red & Black  Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_10")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_jousthorse5", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Gunpowder Grey Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_11")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "horse002", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Green Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_12")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "jousthorse002", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon White Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_13")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "jousthorse003", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon pink & Blue Jousting Horse
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_14")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "jousthorse004", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Horse"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon White Unicorn
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_15")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "cep_unicorn", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Unicorn");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Nightmare with Barding
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_16")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_nightmare001", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Nightmare");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Nightmare"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Nightmare Saddled
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_17")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "dla_nightmare003", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Nightmare");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Nightmare"));
    }/* end else (valid owyrmling) */
      return;
    }
///////////////////////////////////////////////////////////////////////////////
    // Summon Dark Unicorn
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "Horse_18")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "cep_unicorn001", lPc, TRUE);

/////////////////////////////////////// name the horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Unicorn");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
/////////////////////END DLA HORSE WIDGETS////////////////////
///////////////////////////////////////////////////////////////////////////////
/////////////////////START DLA CREATURE Mount WIDGETS//////////////////////////
//////////////////////////////////////////////////////////////////////////////
    // Summon Bear
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_1")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_bear_mt", lPc, TRUE);

/////////////////////////////////////// name the Bear //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Bear");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Boar (grey)
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_2")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_boar_mt1", lPc, TRUE);

/////////////////////////////////////// name the Boar //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Boar");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Boar (Red)
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_3")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_boar_mt2", lPc, TRUE);

/////////////////////////////////////// name the Boar //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Boar");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Boar (black)
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_4")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_boar_mt3", lPc, TRUE);

/////////////////////////////////////// name the Boar //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Boar");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Camel Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_5")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_camel_mt", lPc, TRUE);

/////////////////////////////////////// name the Camel //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Camel");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Deer Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_6")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_deer_mt", lPc, TRUE);

/////////////////////////////////////// name the Deer //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Deer");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Diatryma Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_7")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_diatryma_mt", lPc, TRUE);

/////////////////////////////////////// name the Diatryma //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Diatryma");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Dog Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_8")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_dog_mt", lPc, TRUE);

/////////////////////////////////////// name the Dog //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Dog");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Elephant Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_9")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_elephant_mt", lPc, TRUE);

/////////////////////////////////////// name the Elephant //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Elephant");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Emu Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_10")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_emu_mt", lPc, TRUE);

/////////////////////////////////////// name the Emu //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Emu");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Gorgon Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_11")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_gorgon_mt", lPc, TRUE);

/////////////////////////////////////// name the Gorgon //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Gorgon");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Green Drake Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_12")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_greendrak_mt", lPc, TRUE);

/////////////////////////////////////// name the Drake //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Drake");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Gryphon Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_13")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "ZEP_Gryphon", lPc, TRUE);

/////////////////////////////////////// name the Gryphon //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Gryphon");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Gryphon, Imperial Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_14")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_gryphon_mtim", lPc, TRUE);

/////////////////////////////////////// name the Gryphon //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Gryphon");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Gryphon, Winged Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_15")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_gryphon_mtw", lPc, TRUE);

/////////////////////////////////////// name the Gryphon //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Gryphon");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Hippogriff Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_16")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_hippog_mt", lPc, TRUE);

/////////////////////////////////////// name the Hippogriff //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Hippogriff");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Hippogriff, Winged Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_17")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_hippog_mtw", lPc, TRUE);

/////////////////////////////////////// name the Hippogriff //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Hippogriff");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Jaguar Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_18")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_jaguar_mt", lPc, TRUE);

/////////////////////////////////////// name the Jaguar //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Jaguar");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Jarilith Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_19")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_jarilith_mt", lPc, TRUE);

/////////////////////////////////////// name the Jarilith //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Jarilith");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Jarilith, Winged Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_20")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_jarilit_mtbw", lPc, TRUE);

/////////////////////////////////////// name the Jarilith //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Jarilith");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Lion Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_21")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_lion_mtm", lPc, TRUE);

/////////////////////////////////////// name the Lion //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Lion");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Lioness Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_22")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_lion_mtf", lPc, TRUE);

/////////////////////////////////////// name the Lioness //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Lioness");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Pegasus Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_23")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_pegasus", lPc, TRUE);

/////////////////////////////////////// name the Pegasus //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Pegasus");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Raptor (green) Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_24")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_raptor_mtg", lPc, TRUE);

/////////////////////////////////////// name the Raptor //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Raptor");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Raptor (orange) Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_25")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_raptor_mto", lPc, TRUE);

/////////////////////////////////////// name the Raptor //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Raptor");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Red Drake Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_26")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_reddrake_mt", lPc, TRUE);

/////////////////////////////////////// name the Drake //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Drake");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Rhino Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_27")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_rhino_mt", lPc, TRUE);

/////////////////////////////////////// name the Rhino //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Rhino");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Shark Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_28")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_shark_mt", lPc, TRUE);

/////////////////////////////////////// name the Shark //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Shark");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Skeletal Horse, Armored Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_29")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_skelhorse_mt", lPc, TRUE);

/////////////////////////////////////// name the Horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Skeletal Horse Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_30")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_skelhorse2", lPc, TRUE);

/////////////////////////////////////// name the Horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Skeletal Horse, Hell Armored Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_31")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_skelhorse3", lPc, TRUE);

/////////////////////////////////////// name the Horse //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Horse");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Wolf, Grey Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_32")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_wolf_mt1", lPc, TRUE);

/////////////////////////////////////// name the Wolf //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Wolf");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Wolf, Timber Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_33")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_wolf_mt2", lPc, TRUE);

/////////////////////////////////////// name the Wolf //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Wolf");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
//////////////////////////////////////////////////////////////////////////////
    // Summon Wolf, Black Mount
///////////////////////////////////////////////////////////////////////////////
    else if (sItemTag == "cepmount_34")
    {
        object oPc = GetItemActivator();
    location lPc = GetLocation(oPc);
    location lWyrmling = GetItemActivatedTargetLocation();
    object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, "zep_wolf_mt3", lPc, TRUE);

/////////////////////////////////////// name the Wolf //////////////
         SetName (oWyrmling, GetName(GetItemActivator()) + "'s " + " Wolf");
/////////////////////////////////////////////////////////////////////

    if (GetIsObjectValid(oWyrmling))
    {
        AddHenchman(oPc, oWyrmling);
    }/* end then (valid owyrmling) */
    else
    {
        AssignCommand(oPc, ActionSpeakString("Invalid Unicorn"));
    }/* end else (valid owyrmling) */
      return;
    }
/////////////////////END DLA CREATURE Mount WIDGETS////////////////////
     //X2 Tag based system code

    //ExecuteScript(sItemTag, OBJECT_SELF);

     //object oItem = GetItemActivated();

     // * Generic Item Script Execution Code
     // * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
     // * it will execute a script that has the same name as the item's tag
     // * inside this script you can manage scripts for all events by checking against
     // * GetUserDefinedItemEventNumber(). See x2_it_example.nss
     if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
     {
        SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACTIVATE);
        int nRet =   ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
        if (nRet == X2_EXECUTE_SCRIPT_END)
        {
           return;
        }
     }
}


and finally, zep_o0_death:
Code: [Select]
//::///////////////////////////////////////////////
//:: Death Script
//:: NW_O0_DEATH.NSS
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    This script handles the default behavior
    that occurs when a player dies.

    BK: October 8 2002: Overriden for Expansion

    Deva Winblood:  Feb 9th, 2008: Modified to
    handle dismounts when PC dies while mounted.

*/
//:://////////////////////////////////////////////
//:: Created By: Brent Knowles
//:: Created On: November 6, 2001
//:://////////////////////////////////////////////

#include "x3_inc_horse"
#include "zep_inc_phenos"
#include "x2_inc_switches"

 /*
void ClearAllFactionMembers(object oMember, object oPlayer)
{
//    AssignCommand(oMember, SpeakString("here"));
    AdjustReputation(oPlayer, oMember, 100);
    SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
    object oClear = GetFirstFactionMember(oMember, FALSE);
    while (GetIsObjectValid(oClear) == TRUE)
    {
        ClearPersonalReputation(oPlayer, oClear);
        oClear = GetNextFactionMember(oMember, FALSE);
    }
}   */
void Raise(object oPlayer)
{
        effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);

        effect eBad = GetFirstEffect(oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer);

        //Search for negative effects
        while(GetIsEffectValid(eBad))
        {
            if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
                GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
                {
                    //Remove effect if it is negative.
                    RemoveEffect(oPlayer, eBad);
                }
            eBad = GetNextEffect(oPlayer);
        }
        //Fire cast spell at event for the specified target
        SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer);
}



///////////////////////////////////////////////////////////////[ MAIN ]/////////
void main()
{
    object oPlayer = GetLastPlayerDied();
//////////////////////////////////////////////////////////////////////////////
    //zep_Dismount (oPlayer, "horse_dismt");//DISMOUNT the dead player
    //SetLocalInt(oPlayer, "VAR_HORSEMOUNT", 0);//horselord class variable
    //string sResRef = GetLocalString(oPlayer,"PONY_ID");
    if (GetLocalInt(oPlayer, "VAR_HORSEMOUNT")== 1)
   {
        zep_Dismount (oPlayer, "horse_dismt");
        SetLocalInt(oPlayer,"bX3_IS_MOUNTED",FALSE);
        DeleteLocalString(oPlayer,"X3_HORSE_SCRIPT_DISMOUNT");
        SetLocalInt(oPlayer, "VAR_HORSEMOUNT", 0);//horselord class variable
     //remove horse support DLA Style
    object oRider=GetLastPlayerDied();

    DelayCommand(1.0, HORSE_SupportOriginalSpeed(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveMountedSkillDecreases(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveACBonus(oRider));
    DelayCommand(1.0, HORSE_SupportRemoveHPBonus(oRider));

    object oTarget;
    location lPc = GetLocation(oPlayer);
    location lWyrmling = GetItemActivatedTargetLocation();

    //object oWyrmling = CreateObject(OBJECT_TYPE_CREATURE, sResRef, lPc, TRUE);
    }
/////////////////////////////////////////////////////////////////////////////////
    //object oPlayer = GetLastPlayerDied();
    object oHorse;
    object oInventory;
    string sID;
    int nC;
    string sT;
    string sR;
    int nCH;
    int nST;
    object oItem;
    effect eEffect;
    string sDB="X3SADDLEBAG"+GetTag(GetModule());
    if (GetStringLength(GetLocalString(GetModule(),"X3_SADDLEBAG_DATABASE"))>0) sDB=GetLocalString(GetModule(),"X3_SADDLEBAG_DATABASE");
    if (HorseGetIsMounted(oPlayer))
    { // Dismount and then die
        //SetCommandable(FALSE,oPlayer);
        //ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer);
        DelayCommand(0.5,HORSE_SupportResetUnmountedAppearance(oPlayer));
        DelayCommand(1.0,HORSE_SupportCleanVariables(oPlayer));
        DelayCommand(1.1,HORSE_SupportRemoveACBonus(oPlayer));
        DelayCommand(1.2,HORSE_SupportRemoveHPBonus(oPlayer));
        DelayCommand(1.3,HORSE_SupportRemoveMountedSkillDecreases(oPlayer));
        DelayCommand(1.4,HORSE_SupportAdjustMountedArcheryPenalty(oPlayer));
        DelayCommand(1.5,HORSE_SupportOriginalSpeed(oPlayer));
        if (!GetLocalInt(GetModule(),"X3_HORSE_NO_CORPSES"))
        { // okay to create lootable horse corpses
            sR=GetLocalString(oPlayer,"sX3_HorseResRef");
            sT=GetLocalString(oPlayer,"sX3_HorseTag");
            nCH=GetLocalInt(oPlayer,"nX3_HorseAppearance");
            nST=GetLocalInt(oPlayer,"nX3_HorseTail");
            nC=GetLocalInt(oPlayer,"nX3_HorsePortrait");
            if (GetStringLength(sR)>0&&GetStringLeft(sR,GetStringLength(HORSE_PALADIN_PREFIX))!=HORSE_PALADIN_PREFIX)
            { // create horse
                oHorse=HorseCreateHorse(sR,GetLocation(oPlayer),oPlayer,sT,nCH,nST);
                SetLootable(oHorse,TRUE);
                SetPortraitId(oHorse,nC);
                SetLocalInt(oHorse,"bDie",TRUE);
                AssignCommand(oHorse,SetIsDestroyable(FALSE,TRUE,TRUE));
            } // create horse
        } // okay to create lootable horse corpses
        oInventory=GetLocalObject(oPlayer,"oX3_Saddlebags");
        sID=GetLocalString(oPlayer,"sDB_Inv");
        if (GetIsObjectValid(oInventory))
        { // drop horse saddlebags
            if (!GetIsObjectValid(oHorse))
            { // no horse created
                HORSE_SupportTransferInventory(oInventory,OBJECT_INVALID,GetLocation(oPlayer),TRUE);
            } // no horse created
            else
            { // transfer to horse
                HORSE_SupportTransferInventory(oInventory,oHorse,GetLocation(oHorse),TRUE);
            } // transfer to horse
        } // drop horse saddlebags
        else if (GetStringLength(sID)>0)
        { // database based inventory
            nC=GetCampaignInt(sDB,"nCO_"+sID);
            while(nC>0)
            { // restore inventory
                sR=GetCampaignString(sDB,"sR"+sID+IntToString(nC));
                sT=GetCampaignString(sDB,"sT"+sID+IntToString(nC));
                nST=GetCampaignInt(sDB,"nS"+sID+IntToString(nC));
                nCH=GetCampaignInt(sDB,"nC"+sID+IntToString(nC));
                DeleteCampaignVariable(sDB,"sR"+sID+IntToString(nC));
                DeleteCampaignVariable(sDB,"sT"+sID+IntToString(nC));
                DeleteCampaignVariable(sDB,"nS"+sID+IntToString(nC));
                DeleteCampaignVariable(sDB,"nC"+sID+IntToString(nC));
                if (!GetIsObjectValid(oHorse))
                { // no lootable corpse
                    oItem=CreateObject(OBJECT_TYPE_ITEM,sR,GetLocation(oPlayer),FALSE,sT);
                } // no lootable corpse
                else
                { // lootable corpse
                    oItem=CreateItemOnObject(sR,oHorse,nST,sT);
                } // lootable corpse
                if (GetItemStackSize(oItem)!=nST) SetItemStackSize(oItem,nST);
                if (nCH>0) SetItemCharges(oItem,nCH);
                nC--;
            } // restore inventory
            DeleteCampaignVariable(sDB,"nCO_"+sID);
            if (GetIsObjectValid(oHorse)&&GetLocalInt(oHorse,"bDie")) DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(),oHorse));
        } // database based inventory
        if (GetIsObjectValid(oHorse))
        { // no inventory
            DelayCommand(0.3,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(),oHorse));
        } // no inventory
        //eEffect=EffectDeath();
        //DelayCommand(1.6,ApplyEffectToObject(DURATION_TYPE_INSTANT,eEffect,oPlayer));
        //DelayCommand(1.7,SetCommandable(TRUE,oPlayer));
        //return;
    } // Dismount and then die
    // * increment global tracking number of times that I died
    SetLocalInt(oPlayer, "NW_L_PLAYER_DIED", GetLocalInt(oPlayer, "NW_L_PLAYER_DIED") + 1);

    // * BK: Automation Control. Autopcs ignore death
    if (GetLocalInt(oPlayer, "NW_L_AUTOMATION") == 10)
    {
        Raise(oPlayer);
        DelayCommand(1.0, ExecuteScript("crawl", OBJECT_SELF));
        return; // Raise and return
    }


    // * Handle Spirit of the Wood Death
     string sArea = GetTag(GetArea(oPlayer));
/*
    if (sArea == "MAP_M2Q2F2" && GetDistanceBetweenLocations(GetLocation(GetObjectByTag("M2Q2F2_M2Q2G")), GetLocation(oPlayer)) < 5.0 && GetLocalInt(GetModule(),"NW_M2Q2E_WoodsFreed") == 0)
    {
        int bValid;

        Raise(oPlayer);
        string sDestTag = "WP_M2Q2GtoM2Q2F";
        object oSpawnPoint = GetObjectByTag(sDestTag);
        AssignCommand(oPlayer,JumpToLocation(GetLocation(oSpawnPoint)));
        return;

    }
*/
    // * in last level of the Sourcestone, move the player to the beginning of the area
    // * May 16 2002: or the main area of the Snowglobe (to prevent plot logic problems).
    // * May 21 2002: or Castle Never
    if (sArea == "M4Q1D2" || sArea == "M3Q3C" || sArea == "MAP_M1Q6A")
    {

        //Raise(oPlayer);
        //string sDestTag = "M4QD07_ENTER";
        //object oSpawnPoint = GetObjectByTag(sDestTag);
//        AssignCommand(oPlayer, DelayCommand(1.0, JumpToLocation(GetLocation(oSpawnPoint))));
// * MAY 2002: Just popup the YOU ARE DEAD panel at this point
        DelayCommand(2.5, PopUpDeathGUIPanel(oPlayer,FALSE, TRUE, 66487));
        return;
    }

    // * make friendly to Each of the 3 common factions
    AssignCommand(oPlayer, ClearAllActions());
    // * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation
    if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10)
    {   SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
        SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer);
    }
    if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10)
    {   SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
        SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer);
    }
    if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10)
    {   SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
        SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer);
    }

    DelayCommand(2.5, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH));

}
///////////////////////////////////////////////////////////////[ MAIN ]/////////

I know the PRC isn't compatible with the CEP phenotype horse system and don't plan on using that one--I do plan on using the DLA tail horse system, though.


August 21, 2011, 04:06:42 AM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

How I see this:
1. zep_mod_enter - don't need to change this script. If you use PRCModuleUpadter to install PRC it should create a merge script that will execute both prc_onenter and zep_mod_enter (with current settings module will use PRC jump system)
2. zep_on_mod_load - i would suggest using modified x3_mod_def_load.nss instead - just copy the code marked as 'crap' and SetMaxHenchmen(2) function (don't know how important that is, so better leave it there)
3. zep_o0_death - CEP horses - use nw_o0_death for x3 horses support instead
4. zep_on_activate2 - what a mess... should work with ExecuteScritp(), but it's possible that some tag-based scripts will be executed twice


August 21, 2011, 07:08:43 PM
Reply #4

Great it works, thanks xwarren!

Only thing that I can't figure out is how to give the horse feats to pre-existing characters (it gives them to newly made characters).


August 21, 2011, 11:39:46 PM
Reply #5

To expand on this, pre-existing characters with the horse feats will lose them when entering the module.  ???


August 22, 2011, 04:02:47 AM
Reply #6
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

To expand on this, pre-existing characters with the horse feats will lose them when entering the module.  ???

Yes, that's probably because PRC cleans PCs hide every rest (but also on enter and levelup). You would have to modify ScrubPCSkin() function to exclude this feat and recompile all scripts that use this function.


August 22, 2011, 09:57:59 PM
Reply #7

Oof. I was hoping to avoid something like that, but I'll try.

I take it this part from prc_inc_function is what I need to change:
Code: [Select]
void ScrubPCSkin(object oPC, object oSkin)
{
    int nGeneration = PRC_NextGeneration(GetLocalInt(oPC, PRC_ScrubPCSkin_Generation));
    if (DEBUG > 1) DoDebug("ScrubPCSkin Generation: " + IntToString(nGeneration));
    SetLocalInt(oPC, PRC_ScrubPCSkin_Generation, nGeneration);

    int iCode = GetHasFeat(FEAT_SF_CODE,oPC);
    int st;
    if(!(/*GetIsPolyMorphedOrShifted(oPC) || */GetIsObjectValid(GetMaster(oPC))))
    {
        itemproperty ip = GetFirstItemProperty(oSkin);
        while(GetIsItemPropertyValid(ip))
        {
            // Insert Logic here to determine if we spare a property
            if(GetItemPropertyType(ip) == ITEM_PROPERTY_BONUS_FEAT)
            {
                // Check for specific Bonus Feats
                // Reference iprp_feats.2da
                st = GetItemPropertySubType(ip);

                // Spare 400 through 570 and 398 -- epic spells & spell effects
                //also spare the new spellbook feats (1000-12000 & 17701-24704
                //also spare the psionic, trunaming, tob, invocation feats (12000-16000)
                // spare template, tob stuff (16300-17700)
                // also spare Pnp spellschool feats and PRC options feat (231-249 & 229)
                // changed by fluffyamoeba so that iprp weapon specialization, dev crit, epic weapon focus, epic weapon spec
                // overwhelming crit and weapon of choice are no longer skipped.
                // 259 - psionic focus
                // 141 - shadowmaster shades, 142-151 bonus domains casting feats
                if ((st < 400 || st > 570)
                && st != 398
                && (st < 1000 || st > 15999)
                //&& (st < 1000 || st > 13999)
                //&& (st < 14501 || st > 15999)
                && (st < 16300 || st > 24704)
                && (st < 223 || st > 226) //draconic feats
                && (st < 229 || st > 249)
                && st != 259
                && (st < 141 || st > 151)
                && ( (st == IP_CONST_FEAT_PRC_POWER_ATTACK_QUICKS_RADIAL ||
                      st == IP_CONST_FEAT_POWER_ATTACK_SINGLE_RADIAL ||
                      st == IP_CONST_FEAT_POWER_ATTACK_FIVES_RADIAL) ? // Remove the PRC Power Attack radials if the character no longer has Power Attack
                     !GetHasFeat(FEAT_POWER_ATTACK, oPC) :
                     TRUE // If the feat is not relevant to this clause, always pass
                    )
                )
                    RemoveItemProperty(oSkin, ip);
            }
            else
                RemoveItemProperty(oSkin, ip);

            // Get the next property
            ip = GetNextItemProperty(oSkin);
        }
    }
If I un-comment this part: //&& (st < 1000 || st > 13999) and change the numbers in parenthesis to 1087 and 1095 (the range of the horse-related feats on the feats.2da), will that work? And which scripts besides prc_rest, prc_onenter, and prc_levelup call the ScrubPCSkin function?


August 23, 2011, 01:14:58 AM
Reply #8
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Found another way to fix this. Modify code in prc_inc_function.nss:
Code: [Select]
void DelayedAddIPFeats(int nExpectedGeneration, object oPC)
{
    if (nExpectedGeneration != GetLocalInt(oPC, PRC_EvalPRCFeats_Generation))
    {
        //Generation has changed, so don't apply the effect
        return;
    }

    object oSkin = GetPCSkin(oPC);

    //Horse menu
    AddSkinFeat(FEAT_HORSE_MENU, 40, oSkin, oPC);

    // Switch convo feat
    //Now everyone gets it at level 1, but just to be on the safe side
    AddSkinFeat(FEAT_OPTIONS_CONVERSATION, 229, oSkin, oPC);

    //PnP familiars
    if(GetHasFeat(FEAT_SUMMON_FAMILIAR, oPC) && GetPRCSwitch(PRC_PNP_FAMILIARS))
        IPSafeAddItemProperty(oSkin, PRCItemPropertyBonusFeat(IP_CONST_PNP_FAMILIAR), 0.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
    else if(!GetHasFeat(FEAT_SUMMON_FAMILIAR, oPC) || !GetPRCSwitch(PRC_PNP_FAMILIARS))
        RemoveItemProperty(oSkin, ItemPropertyBonusFeat(IP_CONST_PNP_FAMILIAR));

Than recompile scripts I mentioned before (+prc_equip.nss, prc_unequip.nss). This way if character doesn't have horse menu feat, it will be added to the skin.


August 23, 2011, 03:33:54 AM
Reply #9

Yay, that worked! Thanks so much xwarren!  ;D