|
||
|
|||||||
| RunUO Post Archive The Archvie |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
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 ) 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.
__________________
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. |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
Join Date: Apr 2003
Age: 21
Posts: 503
|
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. |
|
|
|
|
|
#4 (permalink) | |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Quote:
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. |
|
|
|
|
|
|
#5 (permalink) | |
|
Join Date: Oct 2003
Age: 43
Posts: 254
|
Quote:
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 |
|
|
|
|
|
|
#8 (permalink) | |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
Quote:
Change line 13 in Custom Region.cs to Code:
public CustomRegion( RegionControl m, Map map ) : base( "", "Custom Region", map, typeof( ArcherGuard ) ) 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;
}
}
}
}
}
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. |
|
|
|
|
|
|
#9 (permalink) | |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Quote:
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. |
|
|
|
|
|
|
#11 (permalink) | |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
Quote:
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. |
|
|
|
|
|
|
#12 (permalink) |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
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. |
|
|
|
|
|
#13 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
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. |
|
|
|
|
|
#14 (permalink) | |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Quote:
__________________
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. |
|
|
|
|
|
|
#16 (permalink) |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
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. |
|
|
|
|
|
#18 (permalink) |
|
Join Date: Oct 2003
Posts: 3
|
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 |
|
|
|
|
|
#19 (permalink) | |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Quote:
__________________
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. |
|
|
|
|
|
|
#21 (permalink) | |
|
Join Date: Oct 2003
Age: 43
Posts: 254
|
Quote:
*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 |
|
|
|
|
|
|
#23 (permalink) |
|
Forum Novice
Join Date: Oct 2003
Posts: 116
|
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 |
|
|
|
|
|
#24 (permalink) | |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Quote:
__________________
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. |
|
|
|
|
|
|
#25 (permalink) |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
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.
|
|
|
|