Full Version : Regions .....can XMl help?
xmlspawner >>Scripting Support >>Regions .....can XMl help?
<< Prev | Next >>
Sunshine- 09-02-2006
We have a non pvp shard..all facets set to tram...well we have had alot of rp and decided to add a custom town where players can pvp...We have built a cutom town on malas map...
We tried using region in a box to alter it to allow PVP...will not work
Somone said XML might be help....can they? of so can someone tell me sssssssslowly and simple terms how?
If not is there anyone who knows Regions well enough who can help me and my husband? please
Please and thank you
ArteGordon- 09-02-2006
The xmlpoints system does have its own region controller that allows you to define pvp regions as well, but those are regions that allow consensual dueling and pvp games within the points system, they dont enable open pvp.
Region in a box should allow you to enable open pvp in a region.
Sunshine- 09-02-2006
no we tried region in a box..and would not work..I asked around and was told they will not override the facet settings...so since it is set to tram rules...even with allow harm player..ect..it will not let them..
thanks anyway hun...I knew if any would know if xml could it would be you ...
We run run UO 1 ....till the final release of 2 is avaiable
ArteGordon- 09-02-2006
I am currently working on a region control system that would give you the ability to override those settings, but it isnt ready yet I'm afraid.
You could also just create a new PvPRegion and then define the area in tram that you want to be pvp in Regions.xml
make a script called PvPRegion.cs and put this into it

CODE
using System; using System.Xml; using Server; namespace Server.Regions {
public class PvPRegion : BaseRegion
{
public PvPRegion(XmlElement xml, Map map, Region parent)
: base(xml, map, parent)
{
}
public override bool AllowHarmful(Mobile from, Mobile target)
{
return true;
}
public override bool AllowBeneficial(Mobile from, Mobile target)
{
return true;
}
}
}

Then in Regions.xml, add a region entry into the Trammel section for the area you want, like

QUOTE
<Facet name="Trammel"> <region type="GuardedRegion" priority="50" name="Moongates"> <!-- britain --> <rect x="1330" y="1991" width="13" height="13" /> <!-- jhelom -->
<rect x="1494" y="3767" width="12" height="11" />
<!-- minoc -->
<rect x="2694" y="685" width="15" height="16" />
<!-- haven -->
<rect x="3759" y="2767" width="10" height="10" />
<!-- trinsic -->
<rect x="1823" y="2943" width="11" height="11" />
<!-- yew -->
<rect x="761" y="741" width="19" height="21" />
<!-- skara brae -->
<rect x="638" y="2062" width="12" height="11" />
<!-- moonglow -->
<rect x="4459" y="1276" width="16" height="16" />
<!-- magincia -->
<rect x="3554" y="2132" width="18" height="18" />
</region>
<region type="TownRegion" priority="50" name="Cove">
<rect x="2200" y="1110" width="50" height="50" />
<rect x="2200" y="1160" width="86" height="86" />
<go x="2275" y="1210" z="0" />
<music name="Cove" />
<zrange min="0" />
<region type="PvPRegion" priority="51" name="CovePvP">
<rect x="2200" y="1110" width="50" height="50" />
<rect x="2200" y="1160" width="86" height="86" />
<go x="2275" y="1210" z="0" />
<music name="Cove" />
<zrange min="0" />
</region>
</region>

that example basically makes cove a free pvp area.
Notice how I made the PvPRegion a child of the existing Cove region. That means that all the normal rules of the Cove region will apply, but I made the priority of the CovePvP region (51) higher that then priority of the parent Cove region (50), so any rules that are overridden in the CovePvP region will apply.
Those rules (as defined in the PvPRegion script) are the AllowBeneficial and AllowHarmful, so those pvp rules will take priority in that region, but all of the other rules will be those for Cove (like the guarded settings).
When you go into Cove with that regions.xml definition, and do a [where, it will tell you that you are in "CovePvP<-Cove", which means you are in the CovePvP child of the Cove region.
Karmageddon- 09-02-2006
Arte I actually have made it possible to do this. By using a very heavily modified version of Zippy's GameRegion.cs(CTF script) it will allow them to define the specific area that they want used for open PvP.
koluch- 12-03-2006
This is something we have been looking for :]
I do have a question, though :
Would it be possible to override the CheckShove, er OnShove, to have players unable to move freely through others( like on Felucca ) ???
I have looked though the core for the correct terminology to use to try to set this and came up dazed and confused as always
Would it be an override bool FreeMovement, return false???
*sigh*
In over my head again, any thoughts on this are appreciated,
Koluch