Jump to content
Forumu Destekleyenlere Katılın ×
Paticik Forumları
2000 lerden beri faal olan, çok şukela bir paylaşım platformuyuz. Hoşgeldiniz.

RunUO - Skill Limit ve Trammel Gump Butonu kapama...


northguard

Öne çıkan mesajlar

Bu Gamers Eastte kullandığım publicmoongate. Trammel ve Ilshenar kapalı(bu arada eski publicmoongate.cs yi bununla değiştiriyorsun yoksa complie etmez

using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;

namespace Server.Items
{
public class PublicMoongate : Item
{
[Constructable]
public PublicMoongate() : base( 0xF6C )
{
Movable = false;
Light = LightType.Circle300;
}

public PublicMoongate( Serial serial ) : base( serial )
{
}

public override void OnDoubleClick( Mobile from )
{
if ( !from.Player )
return;

if ( from.InRange( GetWorldLocation(), 1 ) )
UseGate( from );
else
from.SendLocalizedMessage( 500446 ); // That is too far away.
}

public override bool OnMoveOver( Mobile m )
{
return !m.Player || UseGate( m );
}

public bool UseGate( Mobile m )
{
if ( m.Criminal )
{
m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
return false;
}
else if ( Server.Spells.SpellHelper.CheckCombat( m ) )
{
m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
return false;
}
else if ( m.Spell != null )
{
m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
return false;
}
else
{
m.CloseGump( typeof( MoongateGump ) );
m.SendGump( new MoongateGump( m, this ) );

Effects.PlaySound( m.Location, m.Map, 0x20E );
return true;
}
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );

int version = reader.ReadInt();
}

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.Felucca );
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 Malas =
new PMList( 1060643, 1062039, Map.Malas, new PMEntry[]
{
new PMEntry( new Point3D( 1015, 527, -65 ),
Link to comment
Sosyal ağlarda paylaş

×
×
  • Yeni Oluştur...