var opl = new ExtendedOPL( list ); // supports up to 65 custom lines by default
if (AccessLevel > AccessLevel.Player)
{
opl.Add("Game Master".WrapUOHtmlColor( Color.Red ));
}
opl.Apply(); // Apply changes, can be called multiple times when needed
// using VitaNex;
// using VitaNex.Network;
// using System.Drawing;
public static void Initialize()
{
ExtendedOPL.OnMobileOPLRequest += GetProperties;
}
private static void GetProperties( Mobile mobile, Mobile viewer, ExtendedOPL list )
{
if ( mobile == null || mobile.Deleted || viewer == null || list == null || World.Loading )
{
return;
}
if( mobile.AccessLevel >= AccessLevel.GameMaster )
{
string value = Clilocs.GetString( viewer.GetLanguage( ), 1018085 );
value = value.WrapUOHtmlColor( Color.Blue );
list.Add( value );
}
}
if (AccessLevel > AccessLevel.Player)
{
string color = "";
switch (AccessLevel)
{
case AccessLevel.VIP:
color = "#1EFF00";
break;
case AccessLevel.Counselor:
color = "#00BFFF";
break; //Deep Sky Blue
case AccessLevel.Decorator:
color = "#FF8000";
break;
case AccessLevel.Spawner:
color = "#E6CC80";
break;
case AccessLevel.GameMaster:
color = "#FF0000";
break; //Red
case AccessLevel.Seer:
color = "#00FF00";
break; //Green
case AccessLevel.Administrator:
color = "#0070FF";
break;
case AccessLevel.Developer:
color = "#A335EE";
break;
case AccessLevel.CoOwner:
color = "#FFD700";
break;
case AccessLevel.Owner:
color = "#FFD700";
break;
}
if (AccessLevel > AccessLevel.Player)
{
string color = "";
switch (AccessLevel)
{
case AccessLevel.VIP:
color = "#1EFF00";
break;
case AccessLevel.Counselor:
color = "#00BFFF";
break; //Deep Sky Blue
case AccessLevel.Decorator:
color = "#FF8000";
break;
case AccessLevel.Spawner:
color = "#E6CC80";
break;
case AccessLevel.GameMaster:
color = "#FF0000";
break; //Red
case AccessLevel.Seer:
color = "#00FF00";
break; //Green
case AccessLevel.Administrator:
color = "#0070FF";
break;
case AccessLevel.Developer:
color = "#A335EE";
break;
case AccessLevel.CoOwner:
color = "#FF0000";
break;
case AccessLevel.Owner:
color = "#FF0000";
break;
}
if (IsStaff())
{
list.Add(
1060658, "{0}\t{1}", "Staff", String.Format("<BASEFONT COLOR={0}>{1}", color, GetAccessLevelName(AccessLevel)));
}
else
{
list.Add(1060658, "VIP");
}
}
if (AccessLevel > AccessLevel.Counselor)
{
list.Add(1018085, String.Format("<BASEFONT COLOR=#FF0000" )); // Game Master
}
if (PlayerProperties != null)
{
PlayerProperties(new PlayerPropertiesEventArgs(this, list));
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.