ML quest system; first SVN release.
Secondary changes: - Region fixes, mainly for New Haven. - Recipe system changes. - Enabled ML craftables. - Dyeing/cutting restrictions for quest items. - Moved IsInvulnerable from BaseVendor to BaseCreature. - Moved RandomBrightHue to Utility. - Items no longer decay when attached to a spawner. - Quest item hue is now faked through packets, instead of overriding Hue. - Re-enabled item drag effects for SA clients. - Fixed AssignRandomFacialHair bug in Utility. - Added random hue comments to Utility.
This commit is contained in:
parent
5c7af18dfb
commit
35fbffdb51
167 changed files with 23218 additions and 234 deletions
|
|
@ -46,7 +46,7 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual NpcGuild NpcGuild { get { return NpcGuild.None; } }
|
||||
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
public override bool IsInvulnerable { get { return true; } }
|
||||
|
||||
public virtual DateTime NextTrickOrTreat { get { return m_NextTrickOrTreat; } set { m_NextTrickOrTreat = value; } }
|
||||
|
||||
|
|
@ -265,9 +265,6 @@ namespace Server.Mobiles
|
|||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
if ( IsInvulnerable && !Core.AOS )
|
||||
NameHue = 0x35;
|
||||
|
||||
if ( Female = GetGender() )
|
||||
{
|
||||
Body = 0x191;
|
||||
|
|
@ -306,14 +303,6 @@ namespace Server.Mobiles
|
|||
get { return VendorShoeType.Shoes; }
|
||||
}
|
||||
|
||||
public virtual int RandomBrightHue()
|
||||
{
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
return Utility.RandomList( 0x62, 0x71 );
|
||||
|
||||
return Utility.RandomList( 0x03, 0x0D, 0x13, 0x1C, 0x21, 0x30, 0x37, 0x3A, 0x44, 0x59 );
|
||||
}
|
||||
|
||||
public virtual void CheckMorph()
|
||||
{
|
||||
if ( CheckGargoyle() )
|
||||
|
|
@ -439,7 +428,7 @@ namespace Server.Mobiles
|
|||
FacialHairItemID = 0;
|
||||
|
||||
Body = 0x2F6;
|
||||
Hue = RandomBrightHue() | 0x8000;
|
||||
Hue = Utility.RandomBrightHue() | 0x8000;
|
||||
Name = NameList.RandomName( "gargoyle vendor" );
|
||||
|
||||
CapitalizeTitle();
|
||||
|
|
@ -1015,7 +1004,7 @@ namespace Server.Mobiles
|
|||
if ( cont.ConsumeTotal( typeof( Gold ), totalCost ) )
|
||||
bought = true;
|
||||
else if ( totalCost < 2000 )
|
||||
SayTo( buyer, 500192 );//Begging thy pardon, but thou casnt afford that.
|
||||
SayTo( buyer, 500192 ); // Begging thy pardon, but thou canst not afford that.
|
||||
}
|
||||
|
||||
if ( !bought && totalCost >= 2000 )
|
||||
|
|
@ -1394,9 +1383,6 @@ namespace Server.Mobiles
|
|||
if ( IsParagon )
|
||||
IsParagon = false;
|
||||
|
||||
if ( Core.AOS && NameHue == 0x35 )
|
||||
NameHue = -1;
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( CheckMorph ) );
|
||||
}
|
||||
|
||||
|
|
@ -1426,11 +1412,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
return (IBuyItemInfo[])m_ArmorBuyInfo.ToArray( typeof( IBuyItemInfo ) );
|
||||
}
|
||||
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return !IsInvulnerable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ namespace Server.Mobiles
|
|||
|
||||
public bool IsSellable( Item item )
|
||||
{
|
||||
if ( item.QuestItem )
|
||||
if ( item.Nontransferable )
|
||||
return false;
|
||||
|
||||
//if ( item.Hue != 0 )
|
||||
|
|
@ -115,7 +115,7 @@ namespace Server.Mobiles
|
|||
|
||||
public bool IsResellable( Item item )
|
||||
{
|
||||
if ( item.QuestItem )
|
||||
if ( item.Nontransferable )
|
||||
return false;
|
||||
|
||||
//if ( item.Hue != 0 )
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem( new HalfApron( RandomBrightHue() ) );
|
||||
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override int GetHairHue()
|
||||
{
|
||||
return RandomBrightHue();
|
||||
return Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override VendorShoeType ShoeType
|
||||
|
|
|
|||
|
|
@ -37,32 +37,32 @@ namespace Server.Mobiles
|
|||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public GypsyAnimalTrainer( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -27,45 +27,45 @@ namespace Server.Mobiles
|
|||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: AddItem( new JesterHat( RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
|
||||
case 0: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shoes );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public GypsyBanker( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -35,28 +35,28 @@ namespace Server.Mobiles
|
|||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: AddItem( new JesterHat( RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
|
||||
case 0: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
AddItem( new HalfApron( RandomBrightHue() ) );
|
||||
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
|
||||
|
||||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public GypsyMaiden( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@ namespace Server.Mobiles
|
|||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0:
|
||||
case 1: AddItem( new JesterHat( RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new Bandana( RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
if ( item == null )
|
||||
AddItem( new FullApron( RandomBrightHue() ) );
|
||||
AddItem( new FullApron( Utility.RandomBrightHue() ) );
|
||||
|
||||
AddItem( new Bascinet() );
|
||||
AddItem( new SmithHammer() );
|
||||
|
|
@ -75,32 +75,32 @@ namespace Server.Mobiles
|
|||
item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = RandomBrightHue();
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public IronWorker( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ namespace Server.Mobiles
|
|||
|
||||
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
|
||||
|
||||
private DateTime m_NextShush;
|
||||
public static readonly TimeSpan ShushDelay = TimeSpan.FromMinutes( 1 );
|
||||
|
||||
[Constructable]
|
||||
public Scribe() : base( "the scribe" )
|
||||
{
|
||||
|
|
@ -35,6 +38,27 @@ namespace Server.Mobiles
|
|||
AddItem( new Server.Items.Robe( Utility.RandomNeutralHue() ) );
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
return from.Player;
|
||||
}
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
base.OnSpeech( e );
|
||||
|
||||
if ( !e.Handled && m_NextShush <= DateTime.Now && InLOS( e.Mobile ) )
|
||||
{
|
||||
Direction = GetDirectionTo( e.Mobile );
|
||||
|
||||
PlaySound( Female ? 0x32F : 0x441 );
|
||||
PublicOverheadMessage( Network.MessageType.Regular, 0x3B2, 1073990 ); // Shhhh!
|
||||
|
||||
m_NextShush = DateTime.Now + ShushDelay;
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Scribe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ namespace Server.Mobiles
|
|||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new FancyShirt( RandomBrightHue() ) );
|
||||
AddItem( new FancyShirt( Utility.RandomBrightHue() ) );
|
||||
AddItem( new Shoes( GetShoeHue() ) );
|
||||
AddItem( new LongPants( GetRandomHue() ) );
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
AddItem( new Cloak( RandomBrightHue() ) );
|
||||
AddItem( new Cloak( Utility.RandomBrightHue() ) );
|
||||
|
||||
switch ( Utility.Random( 2 ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem( new HalfApron( RandomBrightHue() ) );
|
||||
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
|
||||
|
||||
Container pack = this.Backpack;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ namespace Server.Mobiles
|
|||
{
|
||||
public abstract class SBInfo
|
||||
{
|
||||
public static readonly List<SBInfo> Empty = new List<SBInfo>();
|
||||
|
||||
public SBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract IShopSellInfo SellInfo { get; }
|
||||
public abstract List<GenericBuyInfo> BuyInfo { get; }
|
||||
public abstract List<GenericBuyInfo> BuyInfo { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
Scripts/Mobiles/Vendors/SBInfo/SBNinja.cs
Normal file
34
Scripts/Mobiles/Vendors/SBInfo/SBNinja.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBNinja : SBInfo
|
||||
{
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBNinja()
|
||||
{
|
||||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( BookOfNinjitsu ), 335, 20, 0x23A0, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Mobiles/Vendors/SBInfo/SBSamurai.cs
Normal file
34
Scripts/Mobiles/Vendors/SBInfo/SBSamurai.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBSamurai : SBInfo
|
||||
{
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBSamurai()
|
||||
{
|
||||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( BookOfBushido ), 280, 20, 0x238C, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue