Go Back   RunUO - Ultima Online Emulation > RunUO > General Discussion

General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT!

Reply
 
Thread Tools Display Modes
Old 10-10-2004, 08:37 PM   #1 (permalink)
Forum Novice
 
Join Date: Feb 2004
Age: 19
Posts: 160
Default new region in moongate

}

public static void Initialize()
{
Server.Commands.Register( "MoonGen", AccessLevel.Administrator, new CommandEventHandler( MoonGen_OnCommand ) );
}

[Usage( "MoonGen" )]
[Description( "Generates public moongates. Removes all old moongates." )]
public static void MoonGen_OnCommand( CommandEventArgs e )
{
DeleteAll();

int count = 0;

count += MoonGen( PMList.News );
count += MoonGen( PMList.Felucca );
count += MoonGen( PMList.Ilshenar );
count += MoonGen( PMList.Malas );

World.Broadcast( 0x35, true, "{0} moongates generated.", count );
}

private static void DeleteAll()
{
ArrayList list = new ArrayList();

foreach ( Item item in World.Items.Values )
{
if ( item is PublicMoongate )
list.Add( item );
}

foreach ( Item item in list )
item.Delete();

if ( list.Count > 0 )
World.Broadcast( 0x35, true, "{0} moongates removed.", list.Count );
}

private static int MoonGen( PMList list )
{
foreach ( PMEntry entry in list.Entries )
{
Item item = new PublicMoongate();

item.MoveToWorld( entry.Location, list.Map );

if ( entry.Number == 1060642 ) // Umbra
item.Hue = 0x497;
}

return list.Entries.Length;
}
}

public class PMEntry
{
private Point3D m_Location;
private int m_Number;

public Point3D Location
{
get
{
return m_Location;
}
}

public int Number
{
get
{
return m_Number;
}
}

public PMEntry( Point3D loc, int number )
{
m_Location = loc;
m_Number = number;
}
}

public class PMList
{
private int m_Number, m_SelNumber;
private Map m_Map;
private PMEntry[] m_Entries;

public int Number
{
get
{
return m_Number;
}
}

public int SelNumber
{
get
{
return m_SelNumber;
}
}

public Map Map
{
get
{
return m_Map;
}
}

public PMEntry[] Entries
{
get
{
return m_Entries;
}
}

public PMList( int number, int selNumber, Map map, PMEntry[] entries )
{
m_Number = number;
m_SelNumber = selNumber;
m_Map = map;
m_Entries = entries;
}


public static readonly PMList Felucca =
new PMList( 1012001, 1012013, Map.Felucca, new PMEntry[]
{
new PMEntry( new Point3D( 4467, 1283, 5 ), 1012003 ), // Moonglow
new PMEntry( new Point3D( 1336, 1997, 5 ), 1012004 ), // Britain
new PMEntry( new Point3D( 1499, 3771, 5 ), 1012005 ), // Jhelom
new PMEntry( new Point3D( 771, 752, 5 ), 1012006 ), // Yew
new PMEntry( new Point3D( 2701, 692, 5 ), 1012007 ), // Minoc
new PMEntry( new Point3D( 1828, 2948,-20), 1012008 ), // Trinsic
new PMEntry( new Point3D( 643, 2067, 5 ), 1012009 ), // Skara Brae
new PMEntry( new Point3D( 3563, 2139, 34), 1012010 ), // Magincia
new PMEntry( new Point3D( 2711, 2234, 0 ), 1019001 ) // Buccaneer's Den
} );

public static readonly PMList Ilshenar =
new PMList( 1012002, 1012014, Map.Ilshenar, new PMEntry[]
{
new PMEntry( new Point3D( 1215, 467, -13 ), 1012015 ), // Compassion
new PMEntry( new Point3D( 722, 1366, -60 ), 1012016 ), // Honesty
new PMEntry( new Point3D( 744, 724, -28 ), 1012017 ), // Honor
new PMEntry( new Point3D( 281, 1016, 0 ), 1012018 ), // Humility
new PMEntry( new Point3D( 987, 1011, -32 ), 1012019 ), // Justice
new PMEntry( new Point3D( 1174, 1286, -30 ), 1012020 ), // Sacrifice
new PMEntry( new Point3D( 1532, 1340, - 3 ), 1012021 ), // Spirituality
new PMEntry( new Point3D( 528, 216, -45 ), 1012022 ), // Valor
new PMEntry( new Point3D( 1721, 218, 96 ), 1019000 ) // Chaos
} );

public static readonly PMList Malas =
new PMList( 99999999, Map.Feluca, new PMEntry[]
{
new PMEntry( new Point3D( 1015, 527, -65 ), 1060641 ), // Luna
new PMEntry( new Point3D( 1997, 1386, -85 ), 1060642 ) // Umbra
} );

public static readonly PMList News =
new PMList( 1012001, 1012013, Map.Felucca, new PMEntry[]
{

new PMEntry( new Point3D( 5389, 1108, 5 ) // New


} );

public static readonly PMList[] UORLists = new PMList[]{ Felucca, Ilshenar, Malas };
public static readonly PMList[] LBRLists = new PMList[]{ Felucca, Ilshenar, Malas };
public static readonly PMList[] AOSLists = new PMList[]{ Felucca, Ilshenar, Malas };
public static readonly PMList[] RedLists = new PMList[]{ Felucca, Ilshenar, Malas };
}

public class MoongateGump : Gump
{
private Mobile m_Mobile;
private Item m_Moongate;
private PMList[] m_Lists;

public MoongateGump( Mobile mobile, Item moongate ) : base( 100, 100 )
{
m_Mobile = mobile;
m_Moongate = moongate;

PMList[] checkLists;

if ( mobile.Player )
{
if ( mobile.Kills >= 500000 )
{
checkLists = PMList.RedLists;
}
else
{
int flags = mobile.NetState == null ? 0 : mobile.NetState.Flags;

if ( Core.AOS && (flags & 0x8) != 0 )
checkLists = PMList.AOSLists;
else if ( (flags & 0x4) != 0 )
checkLists = PMList.LBRLists;
else
checkLists = PMList.UORLists;
}
}
else
{
checkLists = PMList.AOSLists;
}

m_Lists = new PMList[checkLists.Length];

for ( int i = 0; i < m_Lists.Length; ++i )
m_Lists[i] = checkLists[i];

for ( int i = 0; i < m_Lists.Length; ++i )
{
if ( m_Lists[i].Map == mobile.Map )
{
PMList temp = m_Lists[i];

m_Lists[i] = m_Lists[0];
m_Lists[0] = temp;

break;
}
}





How Make That Please Help Me

i need create a new region in moongate (green accres) the name of region is New
WormiS is offline   Reply With Quote
Old 10-10-2004, 08:40 PM   #2 (permalink)
Forum Expert
 
Join Date: Aug 2004
Location: Redmond, WA
Age: 21
Posts: 1,288
Send a message via AIM to Sep102 Send a message via MSN to Sep102
Default

By help do you mean change the script adding in the things you want then reposting it for you?
Sep102 is offline   Reply With Quote
Old 10-10-2004, 09:14 PM   #3 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

By help do you mean you actually trying to do it yourself and posting your real atempt to do this?
Phantom is offline   Reply With Quote
Old 10-10-2004, 09:22 PM   #4 (permalink)
Forum Expert
 
Join Date: Aug 2004
Location: Redmond, WA
Age: 21
Posts: 1,288
Send a message via AIM to Sep102 Send a message via MSN to Sep102
Default

Now, what do you think the chances of that are...? Really be a nice change of pace though.
Sep102 is offline   Reply With Quote
Old 10-10-2004, 09:30 PM   #5 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by Sep102
Now, what do you think the chances of that are...? Really be a nice change of pace though.
About the chances of my the Tampa Bay Bucs going to the super bowl with a 4-1 record

Anyone who can't do math

0-11 are your chances.
Phantom is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5