|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Newbie
Join Date: Jan 2006
Posts: 31
|
They is my trouble... I built a Gate Hall ( PvP server ) and it's in a custom dungeon... But it's so dark that's players can't see a damn thing...
I want to know how to modify the light for this region... but not with the lightlevel on every mobile because i want to keep other dungeon with dark... how can i do this... |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
Did you create a region script for it or specify the type in regions.xml?
__________________
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. |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
First You add something like this to Regions.xml
Code:
<region type="GateHall" priority="50" name="GateHall">
<rect x="1568" y="1381" width="238" height="219" />
<go location="(737,1644,-95)" />
<music name="Dungeon9" />
</region>
Place it under the facet you have your gatehall in. Next open lightcycle.cs and add a custom entry. Code:
namespace Server
{
public class LightCycle
{
public const int DayLevel = 0;
public const int NightLevel = 12;
public const int DungeonLevel = 26;
public const int JailLevel = 9;
public const int CustomLevel = 5;
private static int m_LevelOverride = int.MinValue;
public static int LevelOverride
{
Use what ever number light level you want I used 5 as an example. Next. Well seeing as I allready did it you can just use this and put it in your regions folder. Had I not you would have needed to Copy and Modify DungeonRegions.cs GateHallRegions.cs Code:
using System;
using System.Xml;
using Server;
using Server.Mobiles;
using Server.Gumps;
namespace Server.Regions
{
public class GateHall : BaseRegion
{
private Point3D m_EntranceLocation;
private Map m_EntranceMap;
public Point3D EntranceLocation{ get{ return m_EntranceLocation; } set{ m_EntranceLocation = value; } }
public Map EntranceMap{ get{ return m_EntranceMap; } set{ m_EntranceMap = value; } }
public GateHall( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
{
XmlElement entrEl = xml["entrance"];
Map entrMap = map;
ReadMap( entrEl, "map", ref entrMap, false );
if ( ReadPoint3D( entrEl, entrMap, ref m_EntranceLocation, false ) )
m_EntranceMap = entrMap;
}
public override bool AllowHousing( Mobile from, Point3D p )
{
return false;
}
public override void OnEnter( Mobile m )
{
}
public override void OnExit( Mobile m )
{
//base.OnExit( m );
}
public override void AlterLightLevel( Mobile m, ref int global, ref int personal )
{
global = LightCycle.CustomLevel;
}
public override bool CanUseStuckMenu( Mobile m )
{
if ( this.Map == Map.Felucca )
return false;
return base.CanUseStuckMenu( m );
}
}
}
If you want to test this with the exact code I used in Regions.xml It covers the desert north of the lake in Malas.
__________________
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. Last edited by Mortis; 09-23-2006 at 02:20 PM. |
|
|
|
|
|
#5 (permalink) |
|
GM Hider
Join Date: Oct 2003
Age: 29
Posts: 187
|
This may be a bit of a bump, but thanks alot for taking the time to explain and show this guy in detail how to make a new region in 2.0, Mortis. I used your example there to convert all of my "static" regions to the new system.
It works flawless now, and it nearly drove me insane to try to figure it out on my own. Thanks a bunch! ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|