RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Problem with Maps

Ventania

Wanderer
Problem with Maps

Heres what i got. Trammel is the "old" map. Felluca is the attackable map. I with i had only one map, Trammel, but i want to ppl can atack, steal, or do everything they want on the map, and remove all the others maps, but i have no idea on how doing it. Im messin in the Regions folder, but i came in with nothing. Can someone help me ?
 

Greystar

Wanderer
Ventania;742948 said:
thats 13 views with no answer. If i havent described correctly whats happening, pleast let me know.

Let me get this straight...

What you are trying to do is make it so that You only have Felucca and Trammel. You want to leave Fel & Tram rules the same? But want to remove all the other maps so players can't get their (kinda like way back in the day).


Only thing you need to do is edit Public Moongates and "Comment Out" access to any other facet. Then there is no way for players to get there. You'd also have to make sure that when and if you use Decorate that there are no teleporters that send you to other maps (for dungeons and what not). It really has nothing to do with the Regions. Since I've never looked to try to remove/restrict facets (Maps) I don't know of any other files that need to be edited. I know for sure the PublicMoonGates (I think just the gump) needs to be edited.


I just noticed you said you wish you only had one map... Just change the RulesSet in MapDefinitions.cs (Misc Folder)

Code:
			RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca",		MapRules.FeluccaRules );
			RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel",		MapRules.TrammelRules );//<< change that to FeluccaRules instead of TrammelRules
			RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar",	MapRules.TrammelRules );
			RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas",		MapRules.TrammelRules );
			RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno",		MapRules.TrammelRules );

Then in TreasureMap.cs (Scripts\Items\Maps\TreasureMap.cs)
Code:
		public TreasureMap( int level, Map map )
		{
			m_Level = level;
			m_Map = map;//<< Change this so it Reads m_Map = Map.Trammel; if you only want to use trammel. otherwise ignore this file if you are using Tram and Fel.

			if ( level == 0 )
				m_Location = GetRandomHavenLocation();
			else
				m_Location = GetRandomLocation();

			Width = 300;
			Height = 300;

			int width = 600;
			int height = 600;

			int x1 = m_Location.X - Utility.RandomMinMax( width / 4, (width / 4) * 3 );
			int y1 = m_Location.Y - Utility.RandomMinMax( height / 4, (height / 4) * 3 );

			if ( x1 < 0 )
				x1 = 0;

			if ( y1 < 0 )
				y1 = 0;

			int x2 = x1 + width;
			int y2 = y1 + height;

			if ( x2 >= 5120 )
				x2 = 5119;

			if ( y2 >= 4096 )
				y2 = 4095;

			x1 = x2 - width;
			y1 = y2 - height;

			Bounds = new Rectangle2D( x1, y1, width, height );
			Protected = true;

			AddWorldPin( m_Location.X, m_Location.Y );
		}

In the moongates I mentioned earlier
Code:
		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 >= 5 )
				{
					checkLists = PMList.RedLists;
				}
				else
				{
					int flags = mobile.NetState == null ? 0 : mobile.NetState.Flags;
					bool young = mobile is PlayerMobile ? ((PlayerMobile)mobile).Young : false;
					//Do the following below here
					/*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 );
				AddHtmlLocalized( 30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false );
			}

			for ( int i = 0; i < m_Lists.Length; ++i )
				RenderPage( i, Array.IndexOf( checkLists, m_Lists[i] ) );
		}

I THINK that should limit things to Tram/Fel only.

PS) Being snotty in a second post about how many views isn't helpful to get your question resolved.
 

Ventania

Wanderer
Ill try to make it simple. I wanna disable AOS, ML and SE from the RunUO. Is there an easy way to do it, or shall i edit almost everything to make this ? No insurance, no 4 maps, no artifacts.

EDIT: I wish to have the Trammel map (felluca has devastated trees n stuff) but atackable, stealable just like the old ultima online.
 

Greystar

Wanderer
Ventania;742951 said:
Ill try to make it simple. I wanna disable AOS, ML and SE from the RunUO. Is there an easy way to do it, or shall i edit almost everything to make this ? No insurance, no 4 maps, no artifacts.

EDIT: I wish to have the Trammel map (felluca has devastated trees n stuff) but atackable, stealable just like the old ultima online.

Okay then the map settings you need to adjust to look like the following

Code:
			RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca",		MapRules.FeluccaRules );
			RegisterMap( 1, 1, 1, 7168, 4096, 4, "Trammel",		MapRules.FeluccaRules );//<< Changed to Fel Rules and Changed the 0 to 4 (that is Called seasons on RunUO since it makes the facets look dif based on seasons
			RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar",	MapRules.TrammelRules );
			RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas",		MapRules.TrammelRules );
			RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno",		MapRules.TrammelRules );

also the moongate code needs to be adjusted
Code:
		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 >= 5 )
				{
					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 );
				AddHtmlLocalized( 30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false );
			}

			for ( int i = 0; i < m_Lists.Length; ++i )
				RenderPage( i, Array.IndexOf( checkLists, m_Lists[i] ) );
		}

You will also have to go through and change it so Murderers (people with kills >= 5 can use all gates; The rest you can do on your own.

PS) you are still typing in a condesending way so this will be the last help on this topic you get from me.
 

Spookyrobert

Sorceror
Greystar;742958 said:
Okay then the map settings you need to adjust to look like the following

Code:
			RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca",		MapRules.FeluccaRules );
			RegisterMap( 1, 1, 1, 7168, 4096, 4, "Trammel",		MapRules.FeluccaRules );//<< Changed to Fel Rules and Changed the 0 to 4 (that is Called seasons on RunUO since it makes the facets look dif based on seasons
			RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar",	MapRules.TrammelRules );
			RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas",		MapRules.TrammelRules );
			RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno",		MapRules.TrammelRules );

also the moongate code needs to be adjusted
Code:
		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 >= 5 )
				{
					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 );
				AddHtmlLocalized( 30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false );
			}

			for ( int i = 0; i < m_Lists.Length; ++i )
				RenderPage( i, Array.IndexOf( checkLists, m_Lists[i] ) );
		}

You will also have to go through and change it so Murderers (people with kills >= 5 can use all gates; The rest you can do on your own.

PS) you are still typing in a condesending way so this will be the last help on this topic you get from me.

I think you're being too nice, since all this stuff could be found and changed in 5-15 minutes if he would have SEARCHED for it and done his own work. In fact I think there is even a sticky about this stuff.
 

Ventania

Wanderer
Dear dude, ive searched far away, not only at this forum tho for those informations but i havent found anything that would please me. Thanx for ur posts, i cant look this information now but ill check this later and post the results. Thanx alot.

[]´s Ventania.
 

Greystar

Wanderer
Ventania;742978 said:
Dear dude, ive searched far away, not only at this forum tho for those informations but i havent found anything that would please me. Thanx for ur posts, i cant look this information now but ill check this later and post the results. Thanx alot.

[]´s Ventania.

Since you said thanks...

There is one more thing you can do to change things, but I'm not entirely sure what it doesn... there is a line somewhere that says what expansion you are using.... Expansion = Expansion.ML (or whatever); change that to Expansion.None.

Yes using a search would get you some of the information you are probably looking for, however I've found unless you know exactly what you are looking for and how it was worded by others it's either not going to find you anything or going to find you a ton of irrelavant posts and maybe 1 or 2 in a thousand that finds what you are looking for.
 

Ventania

Wanderer
I changed exaclty what u have told me to, but this erros have pisst me off, since theyr different files that i have edited.



Do you know whats going on ?
Thanx again,

[]´Ventania.
 

Greystar

Wanderer
Ventania;743097 said:
I changed exaclty what u have told me to, but this erros have pisst me off, since theyr different files that i have edited.



Do you know whats going on ?
Thanx again,

[]´Ventania.

The problem is you are using SunUO and those things I posted are specifically for RunUO 2.0 RC2. There are several differences and most things we post here are going to be of no help to you.
 

Ventania

Wanderer
Damn...i wanted to run RunUO in linux, but ppl told me its impossible, and told me SunUO is just like RunUO but for linux, so i tought in tryng it out. Isnt there a connection in this erros to RunUO ??
 

Greystar

Wanderer
Ventania;743101 said:
Damn...i wanted to run RunUO in linux, but ppl told me its impossible, and told me SunUO is just like RunUO but for linux, so i tought in tryng it out. Isnt there a connection in this erros to RunUO ??

Try fixing TreasureMap.cs so that it says Map.Trammel not trammel it IS case sensitive for one thing. I just saw ALL those warnings and kind went What the Hell!!! but thats the actual error I can see from what you posted.

I don't know who said SunUO is just like RunUO, what version is their source based on. Last I heard it was a Branch from 1.0 not from 2.0.

PS) RunUO is in the process of being able to run on Linux... it may already be able to as long as you have Mono Installed for one thing. It's alot of the code in the Source that allows it to detect if it's being run on a Unix based OS. Look in the mono support forum and maybe you'll be able to get some extra help there or see if they have updates on RunUO support running under Mono.
 

Ventania

Wanderer
I Decided to start on RunUO 2.0 then, i did everything u told me to and changed this in the moongate script.

Code:
			count += MoonGen( PMList.Trammel );
			//count += MoonGen( PMList.Felucca );
			//count += MoonGen( PMList.Ilshenar );
			//count += MoonGen( PMList.Malas );
			//count += MoonGen( PMList.Tokuno );

The problem is, when i enter the moongate, there is Trammel, and Felluca. Still gotta remove one but i have no clue on how doing that.

PS: I Noticed that u cannot cast while walking, in my old shard , players were used to do it, so i would ask you guys where can i change to players cast walking, and where is the spell damage and spell bonus (from eval etc) calculate ? So i can re-calc spells and resist (wich i need to recalc as well). If some of u know any good and complete tutorial do RunUO C# scripting, i would apreciate as well..

Thanx alot []´s
Ventania
 

Greystar

Wanderer
Ventania;743203 said:
I Decided to start on RunUO 2.0 then, i did everything u told me to and changed this in the moongate script.

Code:
			count += MoonGen( PMList.Trammel );
			//count += MoonGen( PMList.Felucca );
			//count += MoonGen( PMList.Ilshenar );
			//count += MoonGen( PMList.Malas );
			//count += MoonGen( PMList.Tokuno );

The problem is, when i enter the moongate, there is Trammel, and Felluca. Still gotta remove one but i have no clue on how doing that.

PS: I Noticed that u cannot cast while walking, in my old shard , players were used to do it, so i would ask you guys where can i change to players cast walking, and where is the spell damage and spell bonus (from eval etc) calculate ? So i can re-calc spells and resist (wich i need to recalc as well). If some of u know any good and complete tutorial do RunUO C# scripting, i would apreciate as well..

Thanx alot []´s
Ventania

I'm not sure where but I'm pretty sure it's a gump display thing for the Trammel/Felucca thing... AS for the rest... I have no idea. I had a programming background before I came to RunUO although RunUO was my first experience with C#. It's just trial and error also the docs on Microsoft's site can be helpful and there is information in the Docs folder for RUO as well that can be useful. Otherwise make sure you have some kind of Merge/Compare utility (which I think Linux has some that are optional installs), I use winmerge personally. Also make sure you have some program that will help you with "Viewing" the .cs files in a way that won't loose tabs/spaces (ie formating) otherwise it's gets difficult to line things up properly. Google can be a vary useful tool for finding help with C# and other coding(scripting).
 

TMSTKSBK

Lord
One more note, if you haven't gotten Visual C# Express Edition yet...do so. Save yourself a lot of annoyance. Please.
 

Greystar

Wanderer
TMSTKSBK;743219 said:
One more note, if you haven't gotten Visual C# Express Edition yet...do so. Save yourself a lot of annoyance. Please.

He might be using Linux that's why I didn't mention it.
 

Ventania

Wanderer
I use windows, the host of my shard is Linux, we are currencly at POL emulator, is supports linux. Ill first try to set the basic stuff of shard shard so ill try to put him online, or players would get a little frustracted for getting theyr shard down for a while for maintence. Im not a big fan of 500 players cryng on the forum cause shard is down, so ill prepare everything first, so pass the RunUO to linux would be one of the lastest step.

Im downloading Visual C# btw, and ill start reading the spells documents. I dont understand pretty clearly the C# sintax, is there any good tutorial well known here in this forum for it ?

Thanx

[]´s Ventania

EDIT and PS: Is there an easy way to disable insurance, artys, magic items such as LRC and AOS stuff, only lefting the old magic items , like Vansquish or something like that ?
 

TMSTKSBK

Lord
Don't expect everything that works one way on Windows to work the same way on Linux...just a warning.

Best tutorial for C#: Visual C#

Last question: Short answer is no. Long answer is more no.
 
Top