IanSmellios

Member
IanE submitted a new resource:

Custom Regions in a Box - Cleaned Up and .net 4.0 - Custom Regions in a Box optimized by Tresdni.


I've applied the z-level fix, converted methods to use linq where available, and converted for statements to foreach loops where necessary.

I...

Read more about this resource...
 
Nice to see this released here @IanE :)

In the version I have, which was the last one I had heard about three years ago, if you add a region control and don't get the boundaries set before the shard saved, the shard would crash. I've gotten around this two ways, one, by adding a region control right after a world save and set the boundaries I want before the next world save, or two, by adding a region control and setting a 1x1 region. Was that issue ever addressed?
 
Nice to see this released here @IanE :)

In the version I have, which was the last one I had heard about three years ago, if you add a region control and don't get the boundaries set before the shard saved, the shard would crash. I've gotten around this two ways, one, by adding a region control right after a world save and set the boundaries I want before the next world save, or two, by adding a region control and setting a 1x1 region. Was that issue ever addressed?

Honestly, I have no clue, I just saw that @Tresdni had it over at PlayUO and I put it into ServUO and it loaded right up. Then I asked him if I could add a few off his resources over here to ServUO and he said yes..

Maybe he will see this and be able to fill you in.
 
Okay I just tried it and it seems that it automatically adds a boundary, I deleted the boundary then saved and it crashed....So I am guessing Tresdni did exactly what you suggested already.

Thank You for filling me in, I certainly had no idea that it was doing that.

EDIT

Well it seems that when you remove the boundary and save. You can't start the server again. I am getting this error.
Error:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadInt32()
at Server.World.ReadTypes(BinaryReader tdbReader) in \ServUOTest\Server\World.cs:line 271
at Server.World.Load() in \ServUOTest\Server\World.cs:line 428
at Server.Core.Main(String[] args) in \ServUOTest\Server\Main.cs:line 545
This exception is fatal, press return to exit
 
So it seems You can BLOCK recalling in or gating in GOOD.

However you can BLOCK mark spell but STILL mark.
 
Here, replace regioncontrol.cs with this one:

Posted late, that fix is for the crash, not the Mark issue. I'll look into that one next.
 

Attachments

  • RegionControl.cs
    31.5 KB · Views: 112
@Tasanar

Quick question before I start digging in, your not trying to cast the spells on a staff account are you?

Cause it blocks the spells for me, but not when I'm staff.
 
Yeah, its designed to not block the spells on staff, only on players. If you want it to block staff, you will need to change here in customregion.cs:
publicoverridebool OnBeginSpellCast(Mobile from, ISpell s)

{

if (@from.AccessLevel >=AccessLevel.Counselor)

{

returntrue;

}

bool restricted = m_Controller.IsRestrictedSpell(s);

if (restricted)

{

@from.SendMessage("You cannot cast that spell here.");

returnfalse;

}
 
This is a great script and infinitely valuable to anyone doing any level of customising to the world/map.
I also cannot replicate a crash with blank regions, so seems that maybe a resolved matter in this version. However what would be a great is a way to track where these flags are. As if used for large spaces or simply lots of places, they can get lost. Unless such a feature exists and I am dense?
If not I may play with making one, thanks to the author awesome tool!
 
this maybe a dumb question, but when a region is set up is it intended that you cannot enter the region by any normal means recall,gate,teleport
(player),etc. When i place a region i cannot enter it even on a gm unless i use teleport command.
 
By default, the setting is to not allow the region to be entered. There's a Props setting (AllowEntry or something) you have to set to True.
 
I just commented those lines out and can live without setting custom regions "harmful" or not. There is prob a better solution though.
 
Yeah, I'm getting the same exact error on a clean install of ServUO. I'll comment them out, but if anyone comes up with a solution, that'd be great.
 
Trying changing the error line to this:

public override bool AllowHarmful(Mobile from, IDamageable target)

Guessing syntax changed a little or they messed up a bit - I just did a search in other scripts for an "allowharmful" override and found this one in "ChallengeGameRegion.cs".

It compiles but I haven't tested it to see if it functions, thats up to you :)
 
im porting my server to the newest distro... so i guess I will know soon then.. LOL.. my distro originated from Nov 2016 =p
 
Hello I am having trouble setting up my regioncontrol flag . I understand you have to define the area and can delete the default one provided. But everytime I go to the region that I set up it puts me at 0,0,0 trammel or if I create one in malas puts me in malas corner 0,0,0. I have tried to define the map in props no go .Also Tried to define the MoveNpcTo and MovePlayer to location still nothing. Anybody else have this problem. Maybe I'm doing something wrong?

I type [go regionname (takes me to 0, 0 ,0)
 
Trying changing the error line to this:

public override bool AllowHarmful(Mobile from, IDamageable target)

Guessing syntax changed a little or they messed up a bit - I just did a search in other scripts for an "allowharmful" override and found this one in "ChallengeGameRegion.cs".

It compiles but I haven't tested it to see if it functions, thats up to you :)
This fixed the error
 
I am using current version of ServUO and I just compiled the RegionController.cs file and I receive this message, am I doing something wrong?
amedia.discordapp.net_attachments_110970849628000256_55478685999e555c22d31b21f298f4a6954b3f7df.png
 
I am using current version of ServUO and I just compiled the RegionController.cs file and I receive this message, am I doing something wrong?
View attachment 13081

The error indicates the missing namespace, which in this case belongs to CustomRegion.cs , You need to put all the files from the zip into customs, not just partial .
 
There's like 6 .cs files in the folder when you download it. You put all of them in the Customs folder? If not you need to.
 
Basic download operation, not to be harsh but, its a simple process of download the compressed file, and decompressing it. Basic computer operations. (was half asleep writing this) whew.. lol
 

Attachments

  • pic1.PNG
    pic1.PNG
    30.6 KB · Views: 15
  • pic2.png
    pic2.png
    32.1 KB · Views: 16
Last edited:
I am upgrading to ServUO from RunUO, and I have this error that has been mentioned in previous posts has anyone still found a fix for this?
 

Attachments

  • customregion error.jpg
    customregion error.jpg
    22 KB · Views: 21
I looked at the script I'm using now and I have this section commented, you could try doing the same.

It will let you compile it and try it out and see if there is something in that section of code you need or not( I have been using it and haven't noticed anything awry).
/*public override bool AllowHarmful(Mobile from, IDamageable target) { if ((m_Controller.AllowHarmPlayer || !(target is PlayerMobile)) && (m_Controller.AllowHarmNPC || !(target is BaseCreature))) { return base.AllowHarmful(@from, target); } @from.SendMessage("You cannot perform harmful acts on your target."); return false; }*/

add the slashes and asterisks like in the example.
 
Trying changing the error line to this:

public override bool AllowHarmful(Mobile from, IDamageable target)

Guessing syntax changed a little or they messed up a bit - I just did a search in other scripts for an "allowharmful" override and found this one in "ChallengeGameRegion.cs".

It compiles but I haven't tested it to see if it functions, thats up to you :)
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back