Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 04-12-2004, 06:15 PM   #1 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Talking In-game Customizable Regions in a Box [V3.6]

Summary:
These customizable regions allow Staff to be able to add and remove and customize regions without needing a script update. The staff member can allow/disallow Spells/Skills And much more.



Description:
UPDATES:
4/21 [3.6]:
/sigh. I DID have the guarded bug fixed, but, when I uploaded it, I didn't upload the working file with the fix. So. Here it is. Tested and everything. (For once)

Also fixed the priority bugs, Wans't a bug with priority, just the region not updating at the right times... I think I tested it all accordingly and stuff and it all seemed to work.. so, test it out for me & tell me!

Fixed bug where Showbounds didn't have the top-right corner piece.

ShoBounds will now tell you teh region priority of the region if you target a mobile.

4/21 [3.5]:
Fixed the other half of Guard Bug. Should be 100% fixed and bug free now.

Added command [RegionBounds . This command will work for ANY Region. Just target a Mobile to display the bounds for that Mobile, or Target a RegionControl to display the bounding areas for that.

That features uses effects and not an actual item to reduce lag and so it's not permanent. This is intended.

Because of this features, Scripters can use the static methods in there to show bounds of ANY region or ANY rectangle2D that they want. Just use Functions ->

Code:
static void ShowRegionBounds( Region r )
static void ShowRectBounds( Rectangle2D r, Map m )
As always, Please post any more suggestions or Bugs, Yaada yaada!

4/17 [3.2]:
Allowed the Region to just use the default light level... Set LightLevel to a negative number.

Fixed bugs where the Saved Guarded status would, after restart, become the opposite of what it was before.

Please re-download & remember to Post any bugs or Suggestions :-)

4/14 [3.1]:
Allowed these regions to be Guardable! :-) you can either use any of the commands for normal guarded regins as well as setting it via [props. This WILL save :-)

Allowed resticting of Potions

Allowed restricting of Looting your own corpse, Other player corpses, And NPC corpses.

Allowed setting the light level.

Please re-download & remember to Post any bugs or Suggestions :-)



This used to be a Subscriber-only release but I've now released it here for the public, along with some more minor Bug Fixes.

Please post any suggestions and/or Bugs and I'll try to fix or implement it :-)

Installation:
Unzip and place this in your script folder. To add it ingame, type

[add RegionControl

Then double click & [props it.
Attached Files
File Type: zip CustomRegion 3-6.zip (8.5 KB, 6216 views)
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-12-2004, 06:54 PM   #2 (permalink)
 
Join Date: Mar 2004
Age: 28
Posts: 54
Talking Sem condicao

I am Brazilian!

Gostei muito do seu scripts é de coisas assim que precisamos e não dos que andam saindo atualmente.

I like very!

Maromba is offline   Reply With Quote
Old 04-12-2004, 09:28 PM   #3 (permalink)
Forum Expert
 
Join Date: Apr 2003
Age: 21
Posts: 503
Default

I just want to say this is a great script and i love it. I like how your able to set the music for a particular region.

One thing that i think would make it better is if you could make it so that the lightlevel of a region could be adjusted. And perhaps a toggle between the region being guardable or not.

Thank you for releaseing this great script.
Wildcard is offline   Reply With Quote
Old 04-13-2004, 12:32 AM   #4 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Quote:
Originally Posted by Wildcard
I just want to say this is a great script and i love it. I like how your able to set the music for a particular region.

One thing that i think would make it better is if you could make it so that the lightlevel of a region could be adjusted. And perhaps a toggle between the region being guardable or not.

Thank you for releaseing this great script.
Okays, I'll prolyl implement a lightlevel that can be changed & stuff, as far as it being guarded....

I've been a bit hesitant with that cause a), It mitgh cause problems, and b) I don't want this script to be a replacement to good ol' scripting your regions.... Just a supplement to it.

Maybe if I get enough people asking to toggle guarded... I'll look into it.
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-13-2004, 08:41 AM   #5 (permalink)
 
Join Date: Oct 2003
Age: 43
Posts: 254
Default

Quote:
Originally Posted by ASayre8
Maybe if I get enough people asking to toggle guarded... I'll look into it.
First off, I would like to thank you for this script. It is going to make my life so much easier. As I have a custom map, editing my regions has been a nightmare.
The guard toggle would be a welcome addition. I have tried to get a new region I had added to become guardable but without success so far.
Once again, my thanks for this script.
__________________
Ancient lands of Lore. A roleplay only shard hosted in the UK.
http://alol.game-host.org/index.htm
Trixie is offline   Reply With Quote
Old 04-13-2004, 08:59 AM   #6 (permalink)
Forum Novice
 
modernschroeder's Avatar
 
Join Date: Apr 2004
Location: Detroit
Age: 22
Posts: 197
Send a message via AIM to modernschroeder
Default Wow!

WOW! Once and a while someone comes up with something really useful and you sure did just that. : ) You probably put alot of work into this. Thank you!
modernschroeder is offline   Reply With Quote
Old 04-13-2004, 11:02 AM   #7 (permalink)
Forum Expert
 
Kennyd's Avatar
 
Join Date: Jan 2003
Location: Belgium
Age: 23
Posts: 421
Send a message via AIM to Kennyd Send a message via MSN to Kennyd
Default

I agree with the other people..
This script will be very useful to alot of people...

That's why I gave you a 5/5
Kennyd is offline   Reply With Quote
Old 04-13-2004, 01:32 PM   #8 (permalink)
Forum Expert
 
Mortis's Avatar
 
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
Default

Quote:
Originally Posted by Wildcard
I just want to say this is a great script and i love it. I like how your able to set the music for a particular region.

One thing that i think would make it better is if you could make it so that the lightlevel of a region could be adjusted. And perhaps a toggle between the region being guardable or not.

Thank you for releaseing this great script.
It is very easy to add the regions as guarded your self. I did it this way.

Change line 13 in Custom Region.cs to

Code:
		public CustomRegion( RegionControl m, Map map ) : base( "", "Custom Region", map, typeof( ArcherGuard ) )
Now when making a region it will automatically be set guarded.

You can use [toggleguarded to change that or replace Region Control gump with this one.

RegionControllGump
Code:
using System;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Regions;

namespace Server.Gumps
{
	public class RegionControlGump : Gump
	{
		RegionControl m_Controller;
		public RegionControlGump( RegionControl r )	: base( 25, 25 )
		{
			m_Controller = r;

			Closable=true;
			Dragable=true;
			Resizable=false;

			AddPage(0);

			AddBackground(23, 32, 612, 256, 9270);
			AddAlphaRegion(19, 29, 618, 263);
			AddButton(55, 46, 5569, 5570, (int)Buttons.SpellButton, GumpButtonType.Reply, 0);
			AddButton(55, 128, 5581, 5582, (int)Buttons.SkillButton, GumpButtonType.Reply, 0);
			AddButton(50, 205, 7006, 7006, (int)Buttons.AreaButton, GumpButtonType.Reply, 0);
			AddButton(355, 46, 5587, 5588, (int)Buttons.GuardOnButton, GumpButtonType.Reply, 0);
			AddButton(355, 128, 5585, 5586, (int)Buttons.GuardOffButton, GumpButtonType.Reply, 0);

			AddLabel(152, 70, 1152, "Edit Restricted Spells");
			AddLabel(152, 153, 1152, "Edit Restricted Skills");
			AddLabel(152, 234, 1152, "Add Region Area");
			AddLabel(452, 70, 1152, "Toggle Guarded Off");
			AddLabel(452, 153, 1152, "Toggle Guarded On");
			AddImage(353, 54, 3953);
			AddImage(353, 180, 3955);
			AddImage(453, 54, 3953);
			AddImage(453, 180, 3955);

		}
		
		public enum Buttons
		{
			SpellButton = 1,
			SkillButton,
			AreaButton,
			GuardOnButton,
			GuardOffButton
		}

		public override void OnResponse( NetState sender, RelayInfo info )
		{
			if( m_Controller == null || m_Controller.Deleted )
				return;

			Mobile m = sender.Mobile;

			switch( info.ButtonID )
			{
				case 1:
				{
					m.CloseGump( typeof( SpellRestrictGump ) );
					m.SendGump( new SpellRestrictGump( m_Controller.RestrictedSpells ) );

					m.CloseGump( typeof( RegionControlGump ) );
					m.SendGump( new RegionControlGump( m_Controller ));
					break;
				}
				case 2:
				{

					m.CloseGump( typeof( SkillRestrictGump ) );
					m.SendGump( new SkillRestrictGump( m_Controller.RestrictedSkills ) );

					m.CloseGump( typeof( RegionControlGump ) );
					m.SendGump( new RegionControlGump( m_Controller ));
					break;
				}
				case 3:
				{
					m.CloseGump( typeof( RegionControlGump ) );
					m.SendGump( new RegionControlGump( m_Controller ) );

					m.CloseGump( typeof( RemoveAreaGump ) );

					m.SendGump( new RemoveAreaGump( m_Controller ) );

					m_Controller.ChooseArea( m );
					break;
			              }
				case 4:
				{

					GuardedRegion reg = m.Region as GuardedRegion;

				if ( reg == null )
				{
						m.SendMessage( 33, "You are not in the guarded area." );
						m.SendMessage( 33, "You will have to go there  to turn the guards off." );
				}
			 	else  if ( reg.Disabled )
                                           	{
						m.SendMessage( 3, "The guards in this region have not changed." );
                                           	}
				else if ( !reg.Disabled )
                                           	{
						reg.Disabled = !reg.Disabled;
			              		m.SendMessage( 3, "The guards in this region have been disabled." );
                                           	}
						m.SendGump( new RegionControlGump( m_Controller ) );
						break;
				}
				case 5:
				{

						GuardedRegion reg = m.Region as GuardedRegion;

				if ( reg == null )
				{
						m.SendMessage( 33, "You are not in a The guarded area." );
						m.SendMessage( 33, "You will have to go there to turn the guards on." );
				}
                                           	else if ( !reg.Disabled )
                                           	{
						m.SendMessage( 3, "The guards in THIS region have not changed." );
                                           	}

                                           	else if ( reg.Disabled )
                                           	{
			              		reg.Disabled = !reg.Disabled;
			              		m.SendMessage( 3, "The guards in THIS region have been enabled." );
                                           	}
						m.SendGump( new RegionControlGump( m_Controller ) );
						break;
				}
			}
		}
	}
}
You have to actually be in the region you made for it to toggle guards.

There is a check in to make sure your in a guardable region so the server does not crash.

This is for any one who would like this feature.
__________________
I'm waiting in my cold cell when the bell begins to chime
Reflecting on my past life and it doesn't have much time.
Mortis is offline   Reply With Quote
Old 04-13-2004, 01:50 PM   #9 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Quote:
Originally Posted by Mortis
It is very easy to add the regions as guarded your self. I did it this way.
You have to actually be in the region you made for it to toggle guards.

There is a check in to make sure your in a guardable region so the server does not crash.

This is for any one who would like this feature.
That works as a temp fix, but, It can cause other problems with soem of the other features of RegionControl that i'd need to change. Hence it not being in.


Edit: Well, sicne all these people DO want it guardable... I'll work on implementing it later today after I get back home.

Features coming in new Version in a few days that I've done but not tested..

Restrict Looting of Corpses, Restrict Potion use, Change lightlevel & prolly Gonnas allow a check for guarded regions and stuff now.
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-13-2004, 02:28 PM   #10 (permalink)
 
Join Date: Oct 2003
Age: 43
Posts: 254
Default

Wonderful!
*smiles*
That is very much appreciated.
__________________
Ancient lands of Lore. A roleplay only shard hosted in the UK.
http://alol.game-host.org/index.htm
Trixie is offline   Reply With Quote
Old 04-13-2004, 03:48 PM   #11 (permalink)
Forum Expert
 
Mortis's Avatar
 
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
Default

Quote:
Originally Posted by ASayre8
That works as a temp fix, but, It can cause other problems with soem of the other features of RegionControl that i'd need to change. Hence it not being in.


Edit: Well, sicne all these people DO want it guardable... I'll work on implementing it later today after I get back home.

Features coming in new Version in a few days that I've done but not tested..

Restrict Looting of Corpses, Restrict Potion use, Change lightlevel & prolly Gonnas allow a check for guarded regions and stuff now.
Ok. It all seemed to work ok for me as the package is right now.

But you know what your going to be doing to it later on better than I do.
__________________
I'm waiting in my cold cell when the bell begins to chime
Reflecting on my past life and it doesn't have much time.
Mortis is offline   Reply With Quote
Old 04-13-2004, 04:41 PM   #12 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Just so I know while I'm working on this & since I know I cna now restrict certain items...

Any other items anyone wants restricted? I have corpses & potions & ethys.... Anything else?
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-13-2004, 05:19 PM   #13 (permalink)
Forum Expert
 
Mortis's Avatar
 
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
Default

Well just athought. As long as you are asking.

Certain weapons? Like artifacts or even base weapons. Like BaseRanged, BaseBashing and BaseSwords.
__________________
I'm waiting in my cold cell when the bell begins to chime
Reflecting on my past life and it doesn't have much time.
Mortis is offline   Reply With Quote
Old 04-14-2004, 03:44 AM   #14 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Quote:
Originally Posted by Mortis
Well just athought. As long as you are asking.

Certain weapons? Like artifacts or even base weapons. Like BaseRanged, BaseBashing and BaseSwords.
Well, right now I only have thing that work by double-clicking... I'll eentually ytry and find a way to restrict weapons.. just... Not yet.
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-14-2004, 06:54 PM   #15 (permalink)
Account Terminated
 
Join Date: Jan 2004
Location: Dartmouth, NS Canada
Age: 26
Posts: 15
Send a message via ICQ to Vini
Default

Man oh man. This stuff is THE BEST!

Oh and yea we do need guarder and lightlevel check...
Vini is offline   Reply With Quote
Old 04-15-2004, 12:37 AM   #16 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default Updated! [V3.1]

Updated it with the features yall wanted!

4/14 [3.1]:
Allowed these regions to be Guardable! :-) you can either use any of the commands for normal guarded regins as well as setting it via [props. This WILL save :-)

Allowed resticting of Potions

Allowed restricting of Looting your own corpse, Other player corpses, And NPC corpses.

Allowed setting the lightlevel

Please re-download & remember to Post any bugs or Suggestions :-)
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-15-2004, 12:44 AM   #17 (permalink)
Forum Expert
 
Join Date: Apr 2003
Age: 21
Posts: 503
Default

Thanks for making the option to make the regions guardable and the option to adjust the lightlevel. Again, Thanks for releasing this script.
Wildcard is offline   Reply With Quote
Old 04-15-2004, 01:09 AM   #18 (permalink)
 
Join Date: Oct 2003
Posts: 3
Default great tool

If you are asking for possible things to restrict........................maybe resources like ore or housing.............allowed or not allowed. those are more possibilities.
__________________
As always,

Lynnewellen

Semper et Sempre
Lynnewellen is offline   Reply With Quote
Old 04-15-2004, 02:01 AM   #19 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Quote:
Originally Posted by Lynnewellen
If you are asking for possible things to restrict........................maybe resources like ore or housing.............allowed or not allowed. those are more possibilities.
Housing restriction is already an option.
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-15-2004, 06:45 AM   #20 (permalink)
 
Join Date: Feb 2003
Posts: 358
Send a message via ICQ to hcker2000
Question

I didn't see this in there (I could have missed it. its very early in the morning). Could you make a way to set the regions priority that way your could make over laping regions. I'm sure you know what I'm talking about but if not just ask hehe
hcker2000 is offline   Reply With Quote
Old 04-15-2004, 07:07 AM   #21 (permalink)
 
Join Date: Oct 2003
Age: 43
Posts: 254
Default

Quote:
Originally Posted by hcker2000
Could you make a way to set the regions priority that way your could make over laping regions. I'm sure you know what I'm talking about but if not just ask hehe
it already does this, it has highest, high, medium, low, town, and inn priorities.
*smiles*
Thanks Asayre8, the update is terrific.
__________________
Ancient lands of Lore. A roleplay only shard hosted in the UK.
http://alol.game-host.org/index.htm
Trixie is offline   Reply With Quote
Old 04-15-2004, 07:19 AM   #22 (permalink)
 
Join Date: Feb 2003
Posts: 358
Send a message via ICQ to hcker2000
Default

Cool stuff where can i find the setings for that?
hcker2000 is offline   Reply With Quote
Old 04-15-2004, 08:36 AM   #23 (permalink)
Forum Novice
 
Join Date: Oct 2003
Posts: 116
Default

wow... what a great work you have done!!!



uhmmmm, maybe a damage modifier cuold be interesting, o resistances modificator, by zone i mean... you culd have a zone where magic is very powerfull, and hardcore zones to battle.. or hunting...

just a thought XD XD
akrondar is offline   Reply With Quote
Old 04-15-2004, 02:13 PM   #24 (permalink)
RunUO Developer/Demise Person
 
ASayre's Avatar
 
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
Default

Quote:
Originally Posted by hcker2000
Cool stuff where can i find the setings for that?
[props ;-) Normally REgions have an int settable as far as priority, but, I wanted it to be an Enum so that way people would know where the priority for it is in relation to the other priorities.
__________________
Andre Sayre, Core Developer
The RunUO Software Team

The day we are born is the day Death inches ever closer...
E-mail: ASayre ( AT ) RunUO ( Dot ) c o m
I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire.
ASayre is offline   Reply With Quote
Old 04-15-2004, 02:27 PM   #25 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

totally awsome system, I've seen a good many systems come and go here but this one rates up there with the harvest, shrink (nice job there btw) and pet bonding (nice job on that one too)

a few questions though,

1 - on the props menu, what is "Allow Spawns" ? I figured it meant spawners but while set to false things still spawn.

2 - I believe I need a region controller for each reagion to edit, is this true?

3 - can this be used to edit existing regions such as Britain and such?

I love the fact that you can set the music, I was never a big fan of the uo music til I started adding my own, so this makes it 10 times easier.

So far I've used this to add guards to my vendor mall, the mall consists of a house though which has a seporate region,

4 - if I set the region priority high enough will it override the house region?

5 - if so, how high does it need to be?
__________________
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
Reply