Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Third Party Program Support

Third Party Program Support Misc support forum and advertisment forum for all RunUO related third party Utilities.

Reply
 
Thread Tools Display Modes
Old 10-24-2005, 03:01 AM   #1 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 24
Posts: 1,805
Send a message via MSN to Pyro-Tech
Default Pandora's box and Megaspawner help...

I was wanting to know if anyone has ever set up pandora to use the megaspawner in their spawnerhelper.cs??

and if not, can someone answer a few things for me?? it asks for spawneritem....for megaspawner, would it be "megaspawner" as if doing an [add command??

here is the script...from what it looks like, i just have to do alot of replacing with "megaspawner" correct??

im not meaning to ask someone to do this for me, it is just i don't entirely think i understand what it is asking

Code:
using System;

using Server;
using Server.Mobiles;

using TheBox.Data;

namespace TheBox.BoxServer
{
    /// <summary>
    /// Provides methods that are used to manipulate spawners
    /// 
    /// This version of the class deals with the RunUO standard Spawner
    /// </summary>
    public class SpawnerHelper
    {
        /// <summary>
        /// This defines the type of the spawner object used on the shard
        /// </summary>
        public static Type SpawnerType
        {
            get
            {
                //
                // TODO : Define the type of your spawner object
                //
                // Example:
                // return typeof( Spawner );

                return null;
            }
        }

        /// <summary>
        /// Converts a spawner to a SpawnEntry used in SpawnData.
        /// </summary>
        /// <param name="spawnerItem">The spawner to convert</param>
        /// <returns>The SpawnEntry representing the spawner</returns>
        public static SpawnEntry SpawnerToData( Item spawnerItem )
        {
            //
            // TODO : Convert a spawner object to a SpawnEntry object
            // The code below (commented out) shows the implementation of this method
            // for the default Spawner object
            //

/*            Spawner spawner = spawnerItem as Spawner;

            if ( spawner == null || spawner.Map == Server.Map.Internal )
                return null;

            SpawnEntry entry = new SpawnEntry();

            entry.Map = spawner.Map.MapID;
            entry.X = spawner.X;
            entry.Y = spawner.Y;
            entry.Z = spawner.Z;

            entry.Team = spawner.Team;
            entry.Count = spawner.Count;
            entry.Range = spawner.HomeRange;
            entry.MinDelay = spawner.MinDelay.TotalSeconds;
            entry.MaxDelay = spawner.MaxDelay.TotalSeconds;

            entry.Names.AddRange( spawner.CreaturesName );

            return entry;*/
        }

        /// <summary>
        /// Converts a BoxSpawn to an actual spawner object. This function is used to generate
        /// spawn groups created in Pandora's Box
        /// </summary>
        /// <param name="spawn">The BoxSpawn object describing the spawn that should be created</param>
        /// <returns>A Spawner object - null if not valid</returns>
        public static Item CreateBoxSpawn( BoxSpawn spawn )
        {
            //
            // TODO : Convert the BoxSpawn object to your custom spawner
            // The code below (commented out) shows the implementation of this method
            // for the default Spawner object
            //


/*            if ( spawn == null || spawn.Entries.Count == 0 )
                return null;

            Spawner spawner = new Spawner( spawn.Count, spawn.MinDelay, spawn.MaxDelay, spawn.Team, spawn.HomeRange, null );
            spawner.Running = false;

            spawner.Group = spawn.Group;

            foreach ( BoxSpawnEntry entry in spawn.Entries )
            {
                spawner.CreaturesName.Add( entry.Type );
            }

            return spawner; */
        }

        /// <summary>
        /// Initializes and starts the spawner, spawning all the creatures
        /// </summary>
        /// <param name="spawner">The spawner item</param>
        public static void StartSpawner( Item spawner )
        {
            //
            // TODO : Define the code that will start the spawner and spawn its creatures
            // The code below (commented out) shows the implementation of this method
            // for the default Spawner object
            //

            Spawner s = spawner as Spawner;

            if ( s != null )
            {
                s.Running = true;
                s.Respawn();
            }
        }
    }
}
am i understanding it right, or is there some other stuff it is asking for that i need to look up???

thank you
__________________

Pyro-Tech is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5