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!

In-game Customizable Regions in a Box [V3.6]

M0nk3y

Wanderer
Need a little help

I know this post is old so if i dont get a reply i will know why. I added this to the RunUO2 server and got an error in line 19. The type or namespace 'CommandEventArgs' could not be found. Im taking it this doesnt work with RunUO2.
 

iwantmypot

Wanderer
Fantastic script... but there needs to be one more entry in the props list.

MagicEntrance

if this is false it should block people from entering using Recall, Gate, or Sacred Journey.

On the shard I staff we blocked the mark spell in a location, but someone knows an exploit to mark in ANY location, even ilsh and felucca dungeons. Ilshenar and Fel dungeons block people from entering magically though... so they're the only places that we can put spawns and feel safe that nobody will be able to recall directly to the spawn location.
 

Malaperth

Wanderer
As this script is in the Archive, it is most likely no longer supported, so if you want that change, most likely you will have to try to do it yourself.
 

troyboy731

Sorceror
Error

what should i do with these errors
Using V4.0 for Runuo2.0 rc1
+ regionstone.cs
CS0101: Line 13: The Namespace 'Server.Items' already contains a definition for 'RegionFlag'
CS0101: Line 57: The namespace 'Server.Items' already contains a definition for 'RegionControl'
Thanx
 

Setharnas

Sorceror
If you are using V4.0, then why don't you post your error in the thread for that version? I think you'd be more likely to get help there. :)
 

Cawkwellhall

Wanderer
little help

i have an error when trying too run serve

Errors:
+ Custom/custom regions 3.6/RegionBounds.cs:
CS0246: Line 19: The type or namespace name 'ComandEventArgs' could not be
found ( are you missing a using directive or an assembly refrence?)
 

Hammerhand

Knight

Gorn91

Sorceror
Errors:
+ Customs/CustomRegion 3-6/RegionBounds.cs:
CS0246: Line 19: Nie można znaleźć nazwy typu lub obszaru nazw 'CommandEvent
Args' (czy nie brakuje dyrektywy "using" lub odwołania do zestawu?) :confused:
 

Tarn Blackhail

Sorceror
Errors:
+ custom/newscripts/customregions/RegionBounds.cs:
CS0246: Line 19: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)


any idea whats going on?


- im guessing the guy above me had the same problem... a little help?
 
Tarn Blackhail;781574 said:
Errors:
+ custom/newscripts/customregions/RegionBounds.cs:
CS0246: Line 19: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)


any idea whats going on?


- im guessing the guy above me had the same problem... a little help?

ok you need to place at the top of the RegionBounds.cs using Server.Commands;

but then you will get the error

Error:
+ Cutom/Regions/CustomRegion.cs:
cs0115: line 30: 'Server.Regions.CustomRegion.AllowBenificial<Server.Mobile, Server.Mobile>' : no suitable method found to override

can someone help me with these problames
 
this is made for very old versions of RunUO
theRegions in a box has been updated and is in the script release section that works with the newer versions of RunUO
 
Errors...

i think i have the same errors as this guy above me.. but in english lol.. can anyone help?

Here are the errors.. er THE error..

Code:
RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 5 warnings)
Warnings:
 + Custom/Bounty Deeds/Gumps/ChooseHunter.cs:
    CS0105: Line 7: The using directive for 'Server.Items' appeared previously i
n this namespace
 + Custom/Bounty Deeds/Gumps/ChooseTargetGump.cs:
    CS0105: Line 8: The using directive for 'Server.Items' appeared previously i
n this namespace
 + Custom/Bounty Deeds/Gumps/ConfirmTarget.cs:
    CS0105: Line 8: The using directive for 'Server.Items' appeared previously i
n this namespace
 + Custom/Bounty Deeds/Gumps/SetReward.cs:
    CS0105: Line 7: The using directive for 'Server.Items' appeared previously i
n this namespace
 + Custom/Custom Mobs/MyQuestbone.cs:
    CS0105: Line 13: The using directive for 'Server.Gumps' appeared previously
in this namespace
Errors:
 + Custom/Custom Regions/RegionBounds.cs:
    CS0246: Line 19: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

And here is my script...

Code:
using System;
using Server;
using System.Collections;
using Server.Regions;
using Server.Targeting;
using Server.Items;

namespace Server.Scripts.Commands
{
	public class RegionBounds
	{
		public static void Initialize() 
		{
			Server.Commands.Register( "RegionBounds", AccessLevel.GameMaster, new CommandEventHandler( RegionBounds_OnCommand ) ); 
		}

		[Usage( "RegionBounds" )]
		[Description( "Displays the bounding area of either a targeted Mobile's region or the Bounding area of a targeted RegionControl." )]
		private static void RegionBounds_OnCommand( CommandEventArgs e ) 
		{
			e.Mobile.Target = new RegionBoundTarget();
			e.Mobile.SendMessage( "Target a Mobile or RegionControl" );
			e.Mobile.SendMessage( "Please note that Players will also be able to see the bounds of the Region." );
		}

		private class RegionBoundTarget : Target
		{
			public RegionBoundTarget() : base( -1, false, TargetFlags.None )
			{
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if( targeted is Mobile )
				{
					Mobile m = (Mobile)targeted;

					Region r = m.Region;			

					if( r == m.Map.DefaultRegion )
					{
						from.SendMessage( "The Region is the Default region for the entire map and as such, cannot have it's bounds displayed." );
						return;
					}

					from.SendMessage( String.Format( "That Mobile's region is of type {0}, with a priority of {1}.", r.GetType().FullName, r.Priority.ToString() ));

					ShowRegionBounds( r );
				}
				else if( targeted is RegionControl )
				{
					Region r = ((RegionControl)targeted).MyRegion;

					if ( r == null || r.Coords == null || r.Coords.Count == 0 )
					{
						from.SendMessage( "Region area not defined for targeted RegionControl." );
						return;
					}

					from.SendMessage( "Displaying targeted RegionControl's Region..." );
					
					ShowRegionBounds( r );
				}
				else
				{
					from.SendMessage( "That is not a Mobile or a RegionControl" );
				}
			}
		}


		public static void ShowRectBounds( Rectangle2D r, Map m )
		{
			if( m == Map.Internal || m == null )
				return;

			Point3D p1 = new Point3D( r.X, r.Y - 1, 0 );	//So we dont' need to create a new one each point
			Point3D p2 = new Point3D( r.X, r.Y + r.Height - 1, 0 );	//So we dont' need to create a new one each point

			Effects.SendLocationEffect( new Point3D( r.X -1, r.Y - 1, m.GetAverageZ( r.X, r.Y -1 ) ) , m, 251, 75, 1, 1151, 3 );	//Top Corner	//Testing color

			for( int x = r.X; x <= ( r.X + r.Width -1 ); x++ )
			{
				p1.X = x;
				p2.X = x;

				p1.Z = m.GetAverageZ( p1.X, p1.Y );
				p2.Z = m.GetAverageZ( p2.X, p2.Y );

				Effects.SendLocationEffect( p1, m, 249, 75, 1, 1151, 3 );	//North bound
				Effects.SendLocationEffect( p2, m, 249, 75, 1, 1151, 3 );	//South bound
			}

			p1 = new Point3D( r.X -1 , r.Y -1 , 0 );
			p2 = new Point3D( r.X + r.Width - 1, r.Y, 0 );

			for( int y = r.Y; y <= ( r.Y + r.Height -1 ); y++ )
			{
				p1.Y = y;
				p2.Y = y;

				p1.Z = m.GetAverageZ( p1.X, p1.Y );
				p2.Z = m.GetAverageZ( p2.X, p2.Y );

				Effects.SendLocationEffect( p1, m, 250, 75, 1, 1151, 3 );	//West Bound
				Effects.SendLocationEffect( p2, m, 250, 75, 1, 1151, 3 );	//East Bound
			}
		}


		public static void ShowRegionBounds( Region r )
		{
			if( r == null || r.Coords == null || r.Coords.Count == 0)
				return;

			ArrayList c = r.Coords;

			for( int i = 0; i < c.Count; i++ )
			{
				if( c[i] is Rectangle2D )
					ShowRectBounds( (Rectangle2D)c[i], r.Map );
			}
		}
	}
}

I know this thread is old but i hope somone takesa look at it. thanks for any help
 
Top