|
||
|
|||||||
| Custom Script Releases This forum is where you can release your custom scripts for other users to use. Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
Custom Regions in a Box V4.0 Description: This is a rewrite/update for RunUO 2.0 of Asayre8's extremely popular Custom Regions in a Box script for RunUO 1.0. This is also a compilation of changes made by Rift in his re-release of Custom Regions in a Box. Along with updating this to 2.0 I have included Rift's mods and quite a few changes of my own to improve upon what Asayre started. Please visit the following threads to familiarize yourself with the background of Custom Regions in a Box and a more in-depth description: Asayre's Original CustomRegions in a Box V3.6 Rift's Mod [V3.6a] Installation: Download the Custom Regions in a Box v4.0.zip below. Unzip the Custom Regions folder from the zip into your Scripts folder (preferrably a Custom folder or the Engines folder) Restart your server and you are ready to go. Usage: [add RegionControl in game to add a RegionControl. Visit the links in the Description section above to see the previous features. Read my Changelog below for V4.0 to discover the new features and changes from previous versions. The Changelog is also included in the Zip file. V4.0 Changelog: - Renaming of RegionStone.cs - RegionStone.cs renamed to RegionControl.cs to properly reflect the name of the Class. (functionality is still the same) - New RegionControl Constructors - RegionControl(Rectangle3D rect) to create a RegionControl with an optional area specified by a Rectangle3D. - RegionControl(Rectangle2D[] rects) to create a RegionControl with an optional area specified by a Rectangle2D array. - RegionControl(Rectangle3D[] rects) to create a RegionControl with an optional area specified by a Rectangle3D array. - New "Active" Property for RegionControl - Set RegionControl.Active to TRUE (Default) then the Region is active. - Set RegionControl.Active to FALSE then the Region is inactive. - Changes to Rift's Custom Region Mods - NoPlayerCorpses has been split up into DeletePlayerCorpse and DeleteNPCCorpse, to allow more customization. - NoItemDrop has been split up into NoPlayerItemDrop and NoNPCItemDrop, to allow more customization. - New RegionControl Flags - EmptyNPCCorpse, if set to TRUE all the items from an NPC's corpse, on death, will be placed outside of the corpse on to the ground. - EmptyPlayerCorpse, if set to TRUE all the items from a Player's corpse, on death, will be placed outside of the corpse on to the ground. - DeleteNPCCorpse, if set to TRUE any NPC's corpse, on death, will be deleted. - DeletePlayerCorpse, if set to TRUE any Player's corpse, on death, will be deleted. - ResNPCOnDeath, if set to TRUE any NPC that dies will have a new instance created in the spot that it died. - ResPlayerOnDeath, if set to TRUE any Player that dies will be resurrected in the spot that they died. - MoveNPCOnDeath, if set to TRUE any NPC that dies will be moved to a spot you designate. - Set MoveNPCToLoc to the Point3D that you wish to move the NPC to. - Set MoveNPCToMap to the Map that you wish to move the NPC to. - MovePlayerOnDeath, if set to TRUE any Player that dies will be moved to a spot you designate. - Set MovePlayerToLoc to the Point3D that you wish to move the Player to. - Set MovePlayerToMap to the Map that you wish to move the Player to. - NoPlayerItemDrop, if set to TRUE any Player that dies will not drop their backpack Items to their corpse. - NoNPCItemDrop, if set to TRUE any NPC that dies will not drop their backpack Items to their corpse. - Changes to [RegionBounds command - Targeting a Mobile shows their Region outlined in blue still. - Targeting a RegionControl that has its Active property set to TRUE outlines the region in green. - Targeting a RegionControl that has its Active property set to FALSE outlines the region in red. - Changes to RegionControl Flags - CannotLootOwnCorpse property changed to CanLootOwnCorpse - CannotEnter property changed to CanEnter - Fixed some spelling mistakes - All instances of "AllowBenifit" changed to "AllowBenefit". - Prevention of identical RegionName - On Deserialize, if a region control has the same RegionName as another the region it will have a 1 or 2 etc. added to its name to distinguish it. For eg. If a region is called "Custom Region" and another region is already called "Custom Region" it will get called "Custom Region 1", if "Custom Region 1" already exists too then it will be called "Custom Region 2" etc. This is because of the new way that Regions are registered on to maps in RunUO 2.0. - On creation, a new Region Control will be called "Custom Region" and as before each new "Custom Region" will have a number added after its name. - On setting of RegionName, if a Region Control already exists with the RegionName that the user tries to specify by using [props etc. the RegionName will not be changed and a Warning will be displayed in the Console. Approval Status: - Have PMed Asayre before starting work to ask permission, I receieved no reply . However after reading posts from him saying about his lack of time due to his time being commited to the main RunUO 2.0 release I decided I wanted to do Custom Regions in a Box justice and release it for all the fans for 2.0. - If Asayre himself or a Mod has a problem with this post then please either PM me and I will remove it or remove it yourself but please send me a PM telling me you have done so and your reasons. Thanks Comments/Suggestions/Bugs: Please provide me with any feedback you wish, either in this thread or as a PM. Please also provide me with any Bugs you may find and try to include as much detail in your posts as you can so I can fix them. I have started a list below of possible features that I would personally like to add to this, please reply in this thread with your comments on these features and also with your own ideas that I will also consider. Thanks everyone. Possible Future Updates: - Export/Import command An Export command for RunUO 1.0 to export details about all your pre-existing Region Controls. An Import command for RunUO 2.0 to import your exported 1.0 Region Controls into your RunUO 2.0 Server. - Region Control Profiles - Profiles for each Region Control so that it can be reused for different things according to different profile sets. An example for this is to use a Region Control for an Event Arena that can hold different Events, different profiles for the Region Control would relate to different Events, so the arena can easily be switched from one Event to another. - Overhaul of Gumps Redesigning the Gumps, this would especially be needed if the Region Control Profiles were to be implemented.
__________________
David's Sig is my Sig. He always says it best.
Last edited by tobyjug; 03-01-2007 at 01:57 PM. |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
Update(dd/mm/yy) Update (30/06/06) - Fixed a bug with Music not playing. Update (31/07/06) - Fixed a bug with being unable to set IsGuarded. - Fixed a bug with "Map already contains a Region with that name" Warning when setting IsGuarded on a region (related to above fix). Update (10/02/07) - Fixed a bug with being unable to set NoNPCItemDrop. - Implemented Irian's suggestion of a CustomGoLocation. Update (01/03/07) - Fixed a bug with CustomGoLocation not setting properly/resetting on restart.
__________________
David's Sig is my Sig. He always says it best.
Last edited by tobyjug; 03-01-2007 at 01:58 PM. |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
|
I have some suggestions for you. For using your regions like an arena another two options would be cool:
1) Move corpse after death to specified location (enqueued with customizable timer) 2) Keep criminal status for all players in region to prevent increasing of kills count. |
|
|
|
|
|
#5 (permalink) |
|
Forum Newbie
Join Date: Nov 2003
Posts: 41
|
Is it just me or is there a noticeable problem with the script detecting changes in the z-axis?
It seems in the regioned supp-room I run, on all the stairs (to go upon "gate" platforms(z=5)), the region does not recognize the tiles and thus does not register when people attempt to cast spells that should otherwise be uncastable in said region. |
|
|
|
|
|
#6 (permalink) | |
|
Forum Expert
|
Quote:
![]()
__________________
Dracana |
|
|
|
|
|
|
#7 (permalink) | |
|
Master of the Internet
Join Date: Dec 2005
Age: 20
Posts: 12,927
|
Quote:
. Also not all songs are listed. Walking isnt. It also lists some songs that were only avail when the music was MIDI. |
|
|
|
|
|
|
#9 (permalink) |
|
Forum Expert
Join Date: May 2005
Age: 18
Posts: 270
|
because a house is a region itself... therefore the custom region doesnt apply over it.
__________________
Burning Venganc |
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Location: Florida
Age: 33
Posts: 544
|
The new server uses 3D rectangles instead of 2D so the Z matters for setting the region now and you have to accomodate for that in the script. Hopefully Tobyjug or Asyre will update this properly if you are having these problems.
|
|
|
|
|
|
#12 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Location: Florida
Age: 33
Posts: 544
|
Quote:
|
|
|
|
|
|
|
#14 (permalink) | |
|
Master of the Internet
Join Date: Dec 2005
Age: 20
Posts: 12,927
|
Quote:
|
|
|
|
|
|
|
#15 (permalink) |
|
Forum Expert
Join Date: Jun 2006
Posts: 280
|
problem with this if you make two regions and forget to rename the region it will start throwing a double region error in your consolor and cause server to freeze
like i forgot to change two regions had them both named custom region and it was throwing double region error froze up runuo2.0 |
|
|
|
|
|
#16 (permalink) | |||
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
Quote:
Quote:
Also with the songs looping that could only be either a Core or a Client problem, all my code needs to do is send the selected constant from the MusicName enum to the constructor of the region. So the Region.cs in the core takes care of the Music... If you know which songs should loop try some tests to see if they do and if they don't then I think it might be worthwhile to submit it to the RunUO Bug Tracker, I'm sure the Devs could tell u then if its a Core or Client prob. Quote:
I'm not too sure why there are problems with the Z values, my code should be allowing for it. I would be grateful if people can do some test on places on the normal Map that you have had problems with, then tell me where you have set up the region, how you did it and what problems are occuring. Thanks!
__________________
David's Sig is my Sig. He always says it best.
|
|||
|
|
|
|
|
#17 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
Quote:
I think that when you are drawing out your region you have all been starting on the flat and finishing on the flat so its not counting the variation in Z values. When it asks you to target the first part of the bounding box you personally need to be at the lowest Z value for that area. Then when targeting the second part of the area you need to personally have your character go to the highest Z value for that area.
__________________
David's Sig is my Sig. He always says it best.
|
|
|
|
|
|
|
#18 (permalink) | |
|
Join Date: Mar 2006
Posts: 97
|
Quote:
I guess Im not clear on the reason you made the z of the region only +1. |
|
|
|
|
|
|
#19 (permalink) |
|
Forum Master
|
porblem is that many spots - the corners of the box are not at the lowest and highest points
so what i would do is to temp put in a "tile" at the one corner below ground level and then one at the opposite corner and set it to +30 ground level and target those - then delete them (or make them hidden from players - in case you need to use them again)
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#21 (permalink) |
|
Join Date: Mar 2006
Posts: 97
|
I have a question about this.
I was noticing that there is a region priority property. Does this allow me to place a region within a region and pick which one takes precedence? Or how does this work? What I would like to do is place a large no housing region, then inside that have a smaller guarded region (for a town), then inside that have a region for an arena with different rules. Is this possible with the region priority property? If so, how do I set which takes precedence? |
|
|
|
|
|
#22 (permalink) | |||
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
Quote:
I'm thinking of making the Rectangle3D in the script a CommandProperty so that on the .props menu you can see it and change the Z values manually, as well as being able to target the region like it is now. Good idea!? Quote:
Quote:
__________________
David's Sig is my Sig. He always says it best.
|
|||
|
|
|
|
|
#23 (permalink) |
|
Forum Master
|
i like it where you could have a setting to set the z values, instead of it including all z values
this way if you have different levels of a dungeon above and below each other - can have different region names, settings, etc
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#24 (permalink) | ||
|
Join Date: Mar 2006
Posts: 97
|
Quote:
Quote:
|
||
|
|
|