Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 07-04-2005, 10:36 PM   #1 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default Gates

I know how to add a public Moongate, however, is there any way to create a dungeon gate? IE: All the dungeons for a facet from one gate?
sneakabout is offline   Reply With Quote
Old 07-05-2005, 12:47 AM   #2 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,799
Default

Yes. Create a new gate using code similar to the PublicMoongate.cs file, but pointing to the Dungeons instead.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 07-05-2005, 01:05 AM   #3 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

this made me kinda curious, so I opened up publicmoongate.cs and took a look.

havent actually done it, but the awy I would go about it is to create a new script file called dungeonmoongate or something similar, and inherit all the classes fom publicmoongate, so that that becomes the base class for the new type of cate. I'd change the color to something other than blue while your at it (red comes to mind, but whatever).

now, override the PMList class and write your own lists based on whats in the publicmoongate.cs file. for instance, this is the trammel list from publicmoongate.cs:
Code:
		public static readonly PMList Trammel =
			new PMList( 1012000, 1012012, Map.Trammel, new PMEntry[]
				{
					new PMEntry( new Point3D( 4467, 1283, 5 ), 1012003 ), // Moonglow
					new PMEntry( new Point3D( 1336, 1997, 5 ), 1012004 ), // Britain
					new PMEntry( new Point3D( 1499, 3771, 5 ), 1012005 ), // Jhelom
					new PMEntry( new Point3D(  771,  752, 5 ), 1012006 ), // Yew
					new PMEntry( new Point3D( 2701,  692, 5 ), 1012007 ), // Minoc
					new PMEntry( new Point3D( 1828, 2948,-20), 1012008 ), // Trinsic
					new PMEntry( new Point3D(  643, 2067, 5 ), 1012009 ), // Skara Brae
					new PMEntry( new Point3D( 3563, 2139, 34), 1012010 ), // Magincia
					new PMEntry( new Point3D( 3763, 2771, 50), 1046259 )  // Haven
				} );
as you can tell, all you need to do is write a new list of PMEntry's. PMEntry( ) is a constructor from public moongate:
Code:
public PMEntry( Point3D loc, int number )
where the number is a cliloc entry for the destination. that may be the only sticking point. i'm not sure off the top of my head if theres specific entries for Deceit, coveteous, etc... but I can't imagine why there wouldn't be. simply grab one of the cliloc editor programs and do a search.
Point3D is from map.cs. pretty easy to understand, it's simply the X, Y, Z tile location that you want the destination to be at. 101 way's to get that info.

anyway, good luck.
Ohms_Law is offline   Reply With Quote
Old 07-05-2005, 01:06 AM   #4 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default Adding gate

OK ... Let's say I create a file called DungeonGate.cs ...

What do I have to do to add the "DungeonGate to my server?

Thanks for any information.
sneakabout is offline   Reply With Quote
Old 07-05-2005, 01:12 AM   #5 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

well, you can either stick it in the scripts/items/misc directory along side publicmoongate.cs, or stick it in a scripts/custom folder. actually, it really doesn't make much of a difference where you locate the file, as long as its in the scripts folder someplace, but for mantiainability, most people create a custom folder for all non-distro files.

after that's done, simply start (or restart) the server so that it compiles the scripts again. once the server compiles it, it'll be available just like a public moongate is, to [add.
"[add publicmoongate" would add a regular moongate,
"[add dungeonmoongate" would add one of your new gates.
Ohms_Law is offline   Reply With Quote
Old 07-05-2005, 11:32 AM   #6 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default What about names

What part of the code shown above would be the name?

notice it says //Moonglow ... what part of the code changes this? Is it the Numerical value to the right? Where do these numbers come from?

Thanks again for the help and information.
sneakabout is offline   Reply With Quote
Old 07-05-2005, 11:54 AM   #7 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by sneakabout
What part of the code shown above would be the name?

notice it says //Moonglow ... what part of the code changes this? Is it the Numerical value to the right? Where do these numbers come from?

Thanks again for the help and information.
You have to rewrite the code, to accept strings and not integers
Phantom is offline   Reply With Quote
Old 07-05-2005, 12:18 PM   #8 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default I am sorry ...

Oh man ... I am lost.

Is there any way someone can show me exactly what parts of the script would need to be changed?

I am wadding through the code but that last post about changing the function call has me a little nervous.

Newbie jitters ...
sneakabout is offline   Reply With Quote
Old 07-05-2005, 12:21 PM   #9 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by sneakabout
Oh man ... I am lost.

Is there any way someone can show me exactly what parts of the script would need to be changed?

I am wadding through the code but that last post about changing the function call has me a little nervous.

Newbie jitters ...

if you subscribe, you may use mine, its already completed and has all the major dungeons on it already

Help with MysticHat.cs and SpellHelper.cs
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline   Reply With Quote
Old 07-05-2005, 12:24 PM   #10 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by sneakabout
Oh man ... I am lost.

Is there any way someone can show me exactly what parts of the script would need to be changed?

I am wadding through the code but that last post about changing the function call has me a little nervous.

Newbie jitters ...
There is one posted in the submission forum that is modfied.
Phantom is offline   Reply With Quote
Old 07-05-2005, 12:34 PM   #11 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default Are you referrinf to Public Gates by A_Li_N ?

I have looked through this code and not been able to grasp how it works. This system contains a number of files and works completely different from the publicmoongate.cs file.

Is there another script submission out there I am missing?

Thanks.
sneakabout is offline   Reply With Quote
Old 07-05-2005, 12:40 PM   #12 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by sneakabout
I have looked through this code and not been able to grasp how it works. This system contains a number of files and works completely different from the publicmoongate.cs file.

Is there another script submission out there I am missing?

Thanks.
Its a modified version of the script in question, it uses a string to display the locations, vs using the localized message ( integers ).
Phantom is offline   Reply With Quote
Old 07-05-2005, 02:29 PM   #13 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

Quote:
Originally Posted by sneakabout
What part of the code shown above would be the name?

notice it says //Moonglow ... what part of the code changes this? Is it the Numerical value to the right? Where do these numbers come from?

Thanks again for the help and information.

Quote:
Originally Posted by sneakabout
Oh man ... I am lost.

Is there any way someone can show me exactly what parts of the script would need to be changed?

I am wadding through the code but that last post about changing the function call has me a little nervous.

Newbie jitters ...
dude, ok. first off, go back and reread my first post in its entirety. don't skim through it, read it. then, open up publicmoongates.cs for reference.
the name of any class in C# is the first part after the namespace declaration.
"public class yaddayadda"
then, theres a constructor which looks just like a member function but has no return variables and no parameters, with the same name as the class.
you'll notice everything that I talked about in the first post and this one in publicmoongates.cs

if you don't know how to program at all, or are completely new to C#, i would recommend doing some reading and trying a few example programs and tutorials before starting anything like this though. If you need that, I would reccomend www.codeproject.com or a similar site.
Ohms_Law is offline   Reply With Quote
Old 07-05-2005, 02:32 PM   #14 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
Default

At least do a few items or weaps first...
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Old 07-05-2005, 11:30 PM   #15 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default

Ohm ... did you notice my question about the naming?

IE: new PMEntry( new Point3D( 4467, 1283, 5 ), 1012003 ), // Moonglow

How do I specify say ... Deceipt and not Moonglow?
sneakabout is offline   Reply With Quote
Old 07-05-2005, 11:34 PM   #16 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
Default

You can't. There is no cliloc for "Deceit". The way the PMEntry method works is that it takes a cliloc value, not a string, so yu can't just say "Deceit". I tried this, and traced the method all the way into the core without being able to fix it, I think.

You either have to re-write the PMEntry class, or you have to give up.
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Old 07-05-2005, 11:35 PM   #17 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default

OK ... Well that answers many of the questions I had then. Thank you all.
sneakabout is offline   Reply With Quote
Old 07-05-2005, 11:36 PM   #18 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
Default

Actually...there may be (a cliloc for Deceit). Go read the thread "Where" in Script/Server Support, d/l the cliloc finder, and see if there IS a cliloc for Deceit. If there is, pass its number to PMEntry and you're gtg.
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Old 07-05-2005, 11:48 PM   #19 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

from my fisrt reply:
Quote:
Originally Posted by Ohms_Law
as you can tell, all you need to do is write a new list of PMEntry's. PMEntry( ) is a constructor from public moongate:
Code:
public PMEntry( Point3D loc, int number )
where the number is a cliloc entry for the destination. that may be the only sticking point. i'm not sure off the top of my head if theres specific entries for Deceit, coveteous, etc... but I can't imagine why there wouldn't be. simply grab one of the cliloc editor programs and do a search.
Point3D is from map.cs. pretty easy to understand, it's simply the X, Y, Z tile location that you want the destination to be at. 101 way's to get that info.

anyway, good luck.
edit: oops, missed the second page of posts...
hehe
Ohms_Law is offline   Reply With Quote
Old 07-05-2005, 11:55 PM   #20 (permalink)
Forum Expert
 
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,358
Default

Grab the custom moongate script and then just use that to add or edit moongates or moongate categories. Or you could use this modified script. I'd recommend the custom moongates script tho. :>


PublicMoongate.cs - modified to accept strings.
Code:
using System; 
using System.Collections; 
using Server; 
using Server.Gumps; 
using Server.Network; 
using Server.Mobiles; 

namespace Server.Items 
{ 
	public class PublicMoongate : Item 
	{ 
		[Constructable] 
		public PublicMoongate() : base( 0xF6C ) 
		{ 
			Movable = false; 
			Light = LightType.Circle300; 
		} 
		
		public PublicMoongate( Serial serial ) : base( serial ) 
		{
		}

		public override void OnDoubleClick( Mobile from )
		{
			if ( !from.Player )
				return;

			if ( from.InRange( GetWorldLocation(), 1 ) )
				UseGate( from );
			else
		    	from.SendLocalizedMessage( 500446 ); // That is too far away.
		}

		public override bool OnMoveOver( Mobile m )
		{
			return !m.Player || UseGate( m );
		}

		public bool UseGate( Mobile m )
		{
			if ( m.Criminal )
			{
		    	m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
				return false;
			}
			else if ( Server.Spells.SpellHelper.CheckCombat( m ) )
			{
		    	m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
				return false;
			}
			else if ( m.Spell != null )
			{
		    	m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
				return false;
			}
			else 
			{ 
				m.CloseGump( typeof( MoongateGump ) ); 
				m.SendGump( new MoongateGump( m, this ) ); 
				
		    	if ( !m.Hidden || m.AccessLevel == AccessLevel.Player )
		    		Effects.PlaySound( m.Location, m.Map, 0x20E ); 
					
				return true; 
			} 
		} 
		
		public override void Serialize( GenericWriter writer ) 
		{ 
			base.Serialize( writer ); 
			
			writer.Write( (int) 0 ); // version 
		} 
		
		public override void Deserialize( GenericReader reader ) 
		{ 
			base.Deserialize( reader ); 
			
			int version = reader.ReadInt(); 
		} 
		
		public static void Initialize() 
		{ 
		    Server.Commands.Register( "MoonGen", AccessLevel.Administrator, new CommandEventHandler( MoonGen_OnCommand ) ); 
		} 
		
		[Usage( "MoonGen" )] 
		[Description( "Generates public moongates. Removes all old moongates." )] 
		public static void MoonGen_OnCommand( CommandEventArgs e ) 
		{ 
			DeleteAll(); 
			
			int count = 0; 
			
			count += MoonGen( PMList.Trammel ); 
			count += MoonGen( PMList.Felucca ); 
			count += MoonGen( PMList.Ilshenar ); 
			count += MoonGen( PMList.Malas ); 
			count += MoonGen( PMList.Tokuno );
			
			World.Broadcast( 0x35, true, "{0} moongates generated.", count ); 
		} 
		
		private static void DeleteAll() 
		{ 
			ArrayList list = new ArrayList(); 
			
			foreach ( Item item in World.Items.Values ) 
			{ 
				if ( item is PublicMoongate ) 
					list.Add( item ); 
			} 
			
			foreach ( Item item in list ) 
			item.Delete(); 
			
			if ( list.Count > 0 ) 
		    	World.Broadcast( 0x35, true, "{0} moongates removed.", list.Count ); 
		} 
		
		private static int MoonGen( PMList list ) 
		{ 
			foreach ( PMEntry entry in list.Entries ) 
			{ 
				Item item = new PublicMoongate(); 
				
				item.MoveToWorld( entry.Location, list.Map ); 
				
		    	if ( entry.Text == "Umbra" )   // was - if ( entry.Number == 1060642 ) 
					item.Hue = 0x497; 
			} 
			
			return list.Entries.Length; 
		} 
	} 
	
	// ** BEGIN CHANGES DESTINATIONS ** 
	public class PMEntry 
	{ 
		private Point3D m_Location; 
		private string m_Text;		    // was - private int m_Number; 
		
		public Point3D Location 
		{ 
			get 
			{ 
				return m_Location; 
			} 
		} 
		
		public string Text		    // was - public int Number 
		{ 
			get 
			{ 
		    	return m_Text;		 // was - return m_Number; 
			} 
		} 
		
		public PMEntry( Point3D loc, string text )   // was - public PMEntry( Point3D loc, int number ) 
		{ 
			m_Location = loc; 
			m_Text = text;		    // was - m_Number = number; 
		} 
	} 
	// ** END CHANGES DESTINATIONS ** 
	
	// ** BEGIN CHANGES FACETS ** 
	public class PMList 
	{ 
		private string m_Text, m_SelText;		 // was - private int m_Number, m_SelNumber; 
		private Map m_Map; 
		private PMEntry[] m_Entries; 
		
		public string Text		    // was - public int Number 
		{ 
			get 
			{ 
		    	return m_Text;		 // was - return m_Number; 
			} 
		} 
		
		public string SelText		    // was - public int SelNumber 
		{ 
			get 
			{ 
		    	return m_SelText;	  // was - return m_SelNumber; 
			} 
		} 
		
		public Map Map 
		{ 
			get 
			{ 
				return m_Map; 
			} 
		} 
		
		public PMEntry[] Entries 
		{ 
			get 
			{ 
				return m_Entries; 
			} 
		} 
		
		//	  public PMList( int number, int selNumber, Map map, PMEntry[] entries ) 
		public PMList( string text, string selText, Map map, PMEntry[] entries ) 
		{ 
			m_Text = text;		    // was - m_Number = number; 
			m_SelText = selText;		 // was - m_SelNumber = selNumber; 
			m_Map = map; 
			m_Entries = entries; 
		} 
		// ** END CHANGES FACETS 
		
		// ** BEGIN CHANGES DESTINATIONS & FACETS ** Change cliloc number to text. 
		// ** Change PMList lines if changing facets in this script. Do this for all facets. 
		// ** Change PMEntry lines if changing destination names in this script. Do this for all destinations. 
		public static readonly PMList Trammel = 
		new PMList( "Market", "<BASEFONT COLOR=#2DDC1B>Market</BASEFONT>", Map.Trammel, new PMEntry[] 
		{ 
		    //		   new PMEntry( new Point3D( 4467, 1283, 5 ), "Moonglow" ), // Moonglow 
		    //		   new PMEntry( new Point3D( 1336, 1997, 5 ), "Britain" ), // Britain 
		    //		   new PMEntry( new Point3D( 1499, 3771, 5 ), "Jhelom" ), // Jhelom 
		    //		   new PMEntry( new Point3D(  771,  752, 5 ), "Yew" ), // Yew 
		    //		   new PMEntry( new Point3D( 2701,  692, 5 ), "Minoc" ), // Minoc 
		    //		   new PMEntry( new Point3D( 1828, 2948,-20), "Trinsic" ), // Trinsic 
		    //		   new PMEntry( new Point3D(  643, 2067, 5 ), "Skara Brae" ), // Skara Brae 
		    //		   new PMEntry( new Point3D( 3563, 2139, 34), "Magincia" ), // Magincia 
			new PMEntry( new Point3D( 3763, 2771, 50), "Haven (Bazaar)" )  // Haven 
		} ); 
		
		public static readonly PMList Felucca = 
		new PMList( "Britannia", "<BASEFONT COLOR=#2DDC1B>Britannia</BASEFONT>", Map.Felucca, new PMEntry[] 
		{ 
			new PMEntry( new Point3D( 4467, 1283, 5 ), "Moonglow" ), // Moonglow 
			new PMEntry( new Point3D( 1336, 1997, 5 ), "Britain" ), // Britain 
			new PMEntry( new Point3D( 1499, 3771, 5 ), "Jhelom" ), // Jhelom 
			new PMEntry( new Point3D(  771,  752, 5 ), "Yew" ), // Yew 
			new PMEntry( new Point3D( 2701,  692, 5 ), "Minoc" ), // Minoc 
			new PMEntry( new Point3D( 1828, 2948,-20), "Trinsic" ), // Trinsic 
			new PMEntry( new Point3D(  643, 2067, 5 ), "Skara Brae" ), // Skara Brae 
			new PMEntry( new Point3D( 3563, 2139, 34), "Magincia" ), // Magincia 
			new PMEntry( new Point3D( 2711, 2234, 0 ), "Buccaneer's Den" )  // Buccaneer's Den 
		} ); 
		
		public static readonly PMList Ilshenar = 
		new PMList( "Underworld", "<BASEFONT COLOR=#2DDC1B>Underworld</BASEFONT>", Map.Ilshenar, new PMEntry[] 
		{ 
			new PMEntry( new Point3D( 1215,  467, -13 ), "Compassion" ), // Compassion 
			new PMEntry( new Point3D(  722, 1366, -60 ), "Honesty" ), // Honesty 
			new PMEntry( new Point3D(  744,  724, -28 ), "Honor" ), // Honor 
			new PMEntry( new Point3D(  281, 1016,   0 ), "Humility" ), // Humility 
			new PMEntry( new Point3D(  987, 1011, -32 ), "Justice" ), // Justice 
			new PMEntry( new Point3D( 1174, 1286, -30 ), "Sacrifice" ), // Sacrifice 
			new PMEntry( new Point3D( 1532, 1340, - 3 ), "Spirituality" ), // Spirituality 
			new PMEntry( new Point3D(  528,  216, -45 ), "Valor" ), // Valor 
			new PMEntry( new Point3D( 1721,  218,  96 ), "Chaos" )  // Chaos 
		} ); 
		
		public static readonly PMList Malas = 
		new PMList( "Gargoyle Land", "<BASEFONT COLOR=#2DDC1B>Gargoyle Land</BASEFONT>", Map.Malas, new PMEntry[] 
		{ 
			new PMEntry( new Point3D( 1015,  527, -65 ), "Luna" ), // Luna 
			new PMEntry( new Point3D( 1997, 1386, -85 ), "Umbra" )  // Umbra 
		} ); 
		
		public static readonly PMList Tokuno =
			new PMList( "Tokuno", "<BASEFONT COLOR=#2DDC1B>Tokuno</BASEFONT>", Map.Tokuno, new PMEntry[]
				{
		    		new PMEntry( new Point3D( 1169,  998, 41 ), "Isamu-Jima" ), // Isamu-Jima
		    		new PMEntry( new Point3D(  802, 1204, 25 ), "Makoto-Jima" ), // Makoto-Jima
		    		new PMEntry( new Point3D(  270,  628, 15 ), "Homare-Jima" )  // Homare-Jima
				} );
				
		// ** END CHANGES DESTINATIONS & FACETS ** 
		
//		public static readonly PMList[] UORLists = new PMList[]{ Trammel, Felucca }; 
//		public static readonly PMList[] LBRLists = new PMList[]{ Trammel, Felucca, Ilshenar }; 
//		public static readonly PMList[] AOSLists = new PMList[]{ Trammel, Felucca, Ilshenar, Malas }; 
//		public static readonly PMList[] RedLists = new PMList[]{ Felucca }; 

		public static readonly PMList[] UORLists	= new PMList[] { Trammel, Felucca };
		public static readonly PMList[] UORlistsYoung	= new PMList[] { Trammel, Felucca };
		public static readonly PMList[] LBRLists	= new PMList[] { Trammel, Felucca, Ilshenar };
		public static readonly PMList[] LBRListsYoung	= new PMList[] { Trammel, Felucca, Ilshenar };
		public static readonly PMList[] AOSLists	= new PMList[] { Trammel, Felucca, Ilshenar, Malas };
		public static readonly PMList[] AOSListsYoung	= new PMList[] { Trammel, Felucca, Ilshenar, Malas };
		public static readonly PMList[] SELists		= new PMList[] { Trammel, Felucca, Ilshenar, Malas, Tokuno };
		public static readonly PMList[] SEListsYoung	= new PMList[] { Trammel, Felucca, Ilshenar, Malas, Tokuno };
		public static readonly PMList[] RedLists	= new PMList[] { Felucca };
		public static readonly PMList[] SigilLists	= new PMList[] { Felucca };
	}

	public class MoongateGump : Gump
	{
		private Mobile m_Mobile;
		private Item m_Moongate;
		private PMList[] m_Lists;

		public MoongateGump( Mobile mobile, Item moongate ) : base( 100, 100 )
		{
			m_Mobile = mobile;
			m_Moongate = moongate;

			PMList[] checkLists;

			if ( mobile.Player )
			{
				if ( Factions.Sigil.ExistsOn( mobile ) )
				{
					checkLists = PMList.SigilLists;
				}
				else if ( mobile.Kills >= 1 )
				{
					checkLists = PMList.RedLists;
				}
				else
				{
		    		int flags = mobile.NetState == null ? 0 : mobile.NetState.Flags; 
		    		bool young = mobile is PlayerMobile ? ((PlayerMobile)mobile).Young : false;
					
		    		if ( Core.SE && (flags & 0x10) != 0 )
		    			checkLists = young ? PMList.SEListsYoung : PMList.SELists;
		    		else if ( Core.AOS && (flags & 0x8) != 0 )
		    			checkLists = young ? PMList.AOSListsYoung : PMList.AOSLists;
		    		else if ( (flags & 0x4) != 0 )
		    			checkLists = young ? PMList.LBRListsYoung : PMList.LBRLists;
					else
		    			checkLists = young ? PMList.UORlistsYoung : PMList.UORLists;
				} 
			} 
			else 
			{ 
				checkLists = PMList.SELists;
			} 
			
			m_Lists = new PMList[checkLists.Length]; 
			
			for ( int i = 0; i < m_Lists.Length; ++i ) 
				m_Lists[i] = checkLists[i]; 
			
			for ( int i = 0; i < m_Lists.Length; ++i ) 
			{ 
				if ( m_Lists[i].Map == mobile.Map ) 
				{ 
					PMList temp = m_Lists[i]; 
					
					m_Lists[i] = m_Lists[0]; 
					m_Lists[0] = temp; 
					
					break; 
				} 
			} 
			
			AddPage( 0 ); 
			
			AddBackground( 0, 0, 380, 280, 5054 ); 
			
			AddButton( 10, 210, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddHtmlLocalized( 45, 210, 140, 25, 1011036, false, false ); // OKAY 
			
			AddButton( 10, 235, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddHtmlLocalized( 45, 235, 140, 25, 1011012, false, false ); // CANCEL 
			
		    AddHtmlLocalized( 5, 5, 200, 20, 1012011, false, false ); // Pick your destination: 
			
			for ( int i = 0; i < checkLists.Length; ++i ) 
			{ 
		    	AddButton( 10, 35 + (i * 25), 2117, 2118, 0, GumpButtonType.Page, Array.IndexOf( m_Lists, checkLists[i] ) + 1 ); 
				// ** BEGIN CHANGES FACETS ** 
		        //		    AddHtmlLocalized( 30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false ); 
		    	AddHtml( 30, 35 + (i * 25), 150, 20, checkLists[i].Text, false, false ); 
				// ** END CHANGES FACETS ** 
			} 
			
			for ( int i = 0; i < m_Lists.Length; ++i ) 
		    	RenderPage( i, Array.IndexOf( checkLists, m_Lists[i] ) ); 
		} 
		
		private void RenderPage( int index, int offset ) 
		{ 
			PMList list = m_Lists[index]; 
			
			AddPage( index + 1 ); 
			
			AddButton( 10, 35 + (offset * 25), 2117, 2118, 0, GumpButtonType.Page, index + 1 ); 
			// ** BEGIN CHANGES FACETS ** 
		    //		 AddHtmlLocalized( 30, 35 + (offset * 25), 150, 20, list.SelNumber, false, false ); 
			AddHtml( 30, 35 + (offset * 25), 150, 20, list.SelText, false, false ); 
			// ** END CHANGES FACETS ** 
			PMEntry[] entries = list.Entries; 
			
			for ( int i = 0; i < entries.Length; ++i ) 
			{ 
		    	AddRadio( 200, 35 + (i * 25), 210, 211, false, (index * 100) + i ); 
				// ** BEGIN CHANGES DESTINATIONS ** 
		        //		    AddHtmlLocalized( 225, 35 + (i * 25), 150, 20, entries[i].Number, false, false ); 
		    	AddHtml( 225, 35 + (i * 25), 150, 20, entries[i].Text, false, false ); 
				// ** END CHANGES DESTINATIONS ** 
			} 
		} 
		
		public override void OnResponse( NetState state, RelayInfo info ) 
		{ 
			if ( info.ButtonID == 0 ) // Cancel 
				return; 
			else if ( m_Mobile.Deleted || m_Moongate.Deleted || m_Mobile.Map == null ) 
				return; 
			
			int[] switches = info.Switches; 
			
			if ( switches.Length == 0 ) 
				return; 
			
			int switchID = switches[0]; 
			int listIndex = switchID / 100; 
			int listEntry = switchID % 100; 
			
			if ( listIndex < 0 || listIndex >= m_Lists.Length ) 
				return; 
			
			PMList list = m_Lists[listIndex]; 
			
			if ( listEntry < 0 || listEntry >= list.Entries.Length ) 
				return; 
			
			PMEntry entry = list.Entries[listEntry]; 
			
			if ( !m_Mobile.InRange( m_Moongate.GetWorldLocation(), 1 ) || m_Mobile.Map != m_Moongate.Map ) 
			{ 
		    	m_Mobile.SendLocalizedMessage( 1019002 ); // You are too far away to use the gate. 
			} 
			else if ( m_Mobile.Player && m_Mobile.Kills >= 1 && list.Map != Map.Felucca ) 
			{ 
		    	m_Mobile.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. 
			}
			else if ( Factions.Sigil.ExistsOn( m_Mobile ) && list.Map != Factions.Faction.Facet )
			{
		    	m_Mobile.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
			}
			else if ( m_Mobile.Criminal ) 
			{ 
		    	m_Mobile.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily. 
			} 
			else if ( Server.Spells.SpellHelper.CheckCombat( m_Mobile ) ) 
			{ 
		    	m_Mobile.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle?? 
			}
			else if ( m_Mobile.Spell != null )
			{
		    	m_Mobile.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
			}
			else if ( m_Mobile.Map == list.Map && m_Mobile.InRange( entry.Location, 1 ) ) 
			{ 
		    	m_Mobile.SendLocalizedMessage( 1019003 ); // You are already there. 
			} 
			else 
			{ 
		    	BaseCreature.TeleportPets( m_Mobile, entry.Location, list.Map ); 
				
				m_Mobile.Combatant = null; 
				m_Mobile.Warmode = false; 
				m_Mobile.Hidden = true; 
				//m_Mobile.Map = list.Map; 
				//m_Mobile.Location = entry.Location; 
				
				m_Mobile.MoveToWorld( entry.Location, list.Map );
				
		    	Effects.PlaySound( entry.Location, list.Map, 0x1FE ); 
			} 
		} 
	} 
}
__________________
the-retelling.org : scripts and tech demo
Alari is offline   Reply With Quote
Old 07-05-2005, 11:58 PM   #21 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
Default

That would also do it...

But it's cheating!!! :P



<p = 900th!>
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Old 07-06-2005, 12:16 AM   #22 (permalink)
Forum Novice
 
Join Date: Dec 2003
Location: South-Africa
Age: 19
Posts: 165
Default

Hey sneakabout, I searched the old Archives for a script that uses strings, instead of ClilocID's

http://runuo.com/forum/showthread.ph...light=Moongate

I quickly modified Marcus247's script and added the dungeons in Trammel, Felucca and Malas for you, Im sure if you look at how its done, you can add Ilshenar / Your own (Its 5AM here, and Im pooped, so you'll have to do them )
It works with 1.0.0 so you shouldent have any problems.

Click here to Download the one WITH Dungeons already added
(Notice, that link will expire within about 2 hours, download it ASAP)
DaLaw66 is offline   Reply With Quote
Old 07-06-2005, 12:20 AM   #23 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

yea, you Cheaters!
sneakabout seemed like he was workin it out on his own. i'm sure he's a bit frustrated, but i'm also sure that he's learning quite a bit...
jsut hope he doesn't give up on his own script.

btw, congrats TM!
Ohms_Law is offline   Reply With Quote
Old 07-06-2005, 12:49 AM   #24 (permalink)
 
Join Date: Jun 2005
Age: 38
Posts: 38
Default

Thanks DaLaw ...

I have downloaded and will review.

Don't worry all ... I will review to make sure I understand the mods to the script.

I appreciate all the help you gave me.
sneakabout is offline   Reply With Quote
Old 07-06-2005, 12:50 AM   #25 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

Ohms_Law is offline   Reply With Quote