Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
20
Projects/Scripts/Mobiles/Vendors/AnimalBuy.cs
Normal file
20
Projects/Scripts/Mobiles/Vendors/AnimalBuy.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class AnimalBuyInfo : GenericBuyInfo
|
||||
{
|
||||
public AnimalBuyInfo(int controlSlots, Type type, int price, int amount, int itemID, int hue) : this(controlSlots,
|
||||
null, type, price, amount, itemID, hue)
|
||||
{
|
||||
}
|
||||
|
||||
public AnimalBuyInfo(int controlSlots, string name, Type type, int price, int amount, int itemID, int hue) : base(
|
||||
name, type, price, amount, itemID, hue)
|
||||
{
|
||||
ControlSlots = controlSlots;
|
||||
}
|
||||
|
||||
public override int ControlSlots{ get; }
|
||||
}
|
||||
}
|
||||
1447
Projects/Scripts/Mobiles/Vendors/BaseVendor.cs
Normal file
1447
Projects/Scripts/Mobiles/Vendors/BaseVendor.cs
Normal file
File diff suppressed because it is too large
Load diff
35
Projects/Scripts/Mobiles/Vendors/BeverageBuy.cs
Normal file
35
Projects/Scripts/Mobiles/Vendors/BeverageBuy.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BeverageBuyInfo : GenericBuyInfo
|
||||
{
|
||||
private BeverageType m_Content;
|
||||
|
||||
public BeverageBuyInfo(Type type, BeverageType content, int price, int amount, int itemID, int hue) : this(null,
|
||||
type, content, price, amount, itemID, hue)
|
||||
{
|
||||
}
|
||||
|
||||
public BeverageBuyInfo(string name, Type type, BeverageType content, int price, int amount, int itemID, int hue) :
|
||||
base(name, type, price, amount, itemID, hue)
|
||||
{
|
||||
m_Content = content;
|
||||
|
||||
if (type == typeof(Pitcher))
|
||||
Name = (1048128 + (int)content).ToString();
|
||||
else if (type == typeof(BeverageBottle))
|
||||
Name = (1042959 + (int)content).ToString();
|
||||
else if (type == typeof(Jug))
|
||||
Name = (1042965 + (int)content).ToString();
|
||||
}
|
||||
|
||||
public override bool CanCacheDisplay => false;
|
||||
|
||||
public override IEntity GetEntity()
|
||||
{
|
||||
return (IEntity)Activator.CreateInstance(Type, m_Content);
|
||||
}
|
||||
}
|
||||
}
|
||||
304
Projects/Scripts/Mobiles/Vendors/GenericBuy.cs
Normal file
304
Projects/Scripts/Mobiles/Vendors/GenericBuy.cs
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GenericBuyInfo : IBuyItemInfo
|
||||
{
|
||||
private int m_Amount;
|
||||
private IEntity m_DisplayEntity;
|
||||
|
||||
private int m_Price;
|
||||
|
||||
public GenericBuyInfo(Type type, int price, int amount, int itemID, int hue, object[] args = null) : this(null, type, price,
|
||||
amount, itemID, hue, args)
|
||||
{
|
||||
}
|
||||
|
||||
public GenericBuyInfo(string name, Type type, int price, int amount, int itemID, int hue, object[] args = null)
|
||||
{
|
||||
Type = type;
|
||||
m_Price = price;
|
||||
MaxAmount = m_Amount = amount;
|
||||
ItemID = itemID;
|
||||
Hue = hue;
|
||||
Args = args;
|
||||
|
||||
Name = name ?? (itemID < 0x4000 ? (1020000 + itemID).ToString() : (1078872 + itemID).ToString());
|
||||
}
|
||||
|
||||
public virtual bool CanCacheDisplay => false;
|
||||
|
||||
public Type Type{ get; set; }
|
||||
|
||||
public int DefaultPrice{ get; private set; }
|
||||
|
||||
public object[] Args{ get; set; }
|
||||
|
||||
public virtual int ControlSlots => 0;
|
||||
|
||||
public string Name{ get; set; }
|
||||
|
||||
public int PriceScalar
|
||||
{
|
||||
get => DefaultPrice;
|
||||
set => DefaultPrice = value;
|
||||
}
|
||||
|
||||
public int Price
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DefaultPrice != 0)
|
||||
{
|
||||
if (m_Price > 5000000)
|
||||
{
|
||||
long price = m_Price;
|
||||
|
||||
price *= DefaultPrice;
|
||||
price += 50;
|
||||
price /= 100;
|
||||
|
||||
if (price > int.MaxValue)
|
||||
price = int.MaxValue;
|
||||
|
||||
return (int)price;
|
||||
}
|
||||
|
||||
return (m_Price * DefaultPrice + 50) / 100;
|
||||
}
|
||||
|
||||
return m_Price;
|
||||
}
|
||||
set => m_Price = value;
|
||||
}
|
||||
|
||||
public int ItemID{ get; set; }
|
||||
|
||||
public int Hue{ get; set; }
|
||||
|
||||
public int Amount
|
||||
{
|
||||
get => m_Amount;
|
||||
set
|
||||
{
|
||||
if (value < 0) value = 0;
|
||||
m_Amount = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int MaxAmount{ get; set; }
|
||||
|
||||
//get a new instance of an object (we just bought it)
|
||||
public virtual IEntity GetEntity()
|
||||
{
|
||||
if (Args == null || Args.Length == 0)
|
||||
return (IEntity)Activator.CreateInstance(Type);
|
||||
|
||||
return (IEntity)Activator.CreateInstance(Type, Args);
|
||||
//return (Item)Activator.CreateInstance( m_Type );
|
||||
}
|
||||
|
||||
//Attempt to restock with item, (return true if restock successful)
|
||||
public bool Restock(Item item, int amount)
|
||||
{
|
||||
return false;
|
||||
/*if ( item.GetType() == m_Type )
|
||||
{
|
||||
if ( item is BaseWeapon )
|
||||
{
|
||||
BaseWeapon weapon = (BaseWeapon)item;
|
||||
|
||||
if ( weapon.Quality == WeaponQuality.Low || weapon.Quality == WeaponQuality.Exceptional || (int)weapon.DurabilityLevel > 0 || (int)weapon.DamageLevel > 0 || (int)weapon.AccuracyLevel > 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( item is BaseArmor )
|
||||
{
|
||||
BaseArmor armor = (BaseArmor)item;
|
||||
|
||||
if ( armor.Quality == ArmorQuality.Low || armor.Quality == ArmorQuality.Exceptional || (int)armor.Durability > 0 || (int)armor.ProtectionLevel > 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
m_Amount += amount;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
|
||||
public void OnRestock()
|
||||
{
|
||||
if (m_Amount <= 0)
|
||||
{
|
||||
/*
|
||||
Core.ML using this vendor system is undefined behavior, so being
|
||||
as it lends itself to an abusable exploit to cause ingame havok
|
||||
and the stackable items are not found to be over 20 items, this is
|
||||
changed until there is a better solution.
|
||||
*/
|
||||
|
||||
object Obj_Disp = GetDisplayEntity();
|
||||
|
||||
if (Core.ML && Obj_Disp is Item item && !item.Stackable)
|
||||
MaxAmount = Math.Min(20, MaxAmount);
|
||||
else
|
||||
MaxAmount = Math.Min(999, MaxAmount * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* NOTE: According to UO.com, the quantity is halved if the item does not reach 0
|
||||
* Here we implement differently: the quantity is halved only if less than half
|
||||
* of the maximum quantity was bought. That is, if more than half is sold, then
|
||||
* there's clearly a demand and we should not cut down on the stock.
|
||||
*/
|
||||
|
||||
int halfQuantity = MaxAmount;
|
||||
|
||||
if (halfQuantity >= 999)
|
||||
halfQuantity = 640;
|
||||
else if (halfQuantity > 20)
|
||||
halfQuantity /= 2;
|
||||
|
||||
if (m_Amount >= halfQuantity)
|
||||
MaxAmount = halfQuantity;
|
||||
}
|
||||
|
||||
m_Amount = MaxAmount;
|
||||
}
|
||||
|
||||
private bool IsDeleted(IEntity obj)
|
||||
{
|
||||
return obj.Deleted;
|
||||
}
|
||||
|
||||
public void DeleteDisplayEntity()
|
||||
{
|
||||
if (m_DisplayEntity == null)
|
||||
return;
|
||||
|
||||
m_DisplayEntity.Delete();
|
||||
m_DisplayEntity = null;
|
||||
}
|
||||
|
||||
public IEntity GetDisplayEntity()
|
||||
{
|
||||
if (m_DisplayEntity != null && !IsDeleted(m_DisplayEntity))
|
||||
return m_DisplayEntity;
|
||||
|
||||
bool canCache = CanCacheDisplay;
|
||||
|
||||
if (canCache)
|
||||
m_DisplayEntity = DisplayCache.Cache.Lookup(Type);
|
||||
|
||||
if (m_DisplayEntity == null || IsDeleted(m_DisplayEntity))
|
||||
m_DisplayEntity = GetEntity();
|
||||
|
||||
DisplayCache.Cache.Store(Type, m_DisplayEntity, canCache);
|
||||
|
||||
return m_DisplayEntity;
|
||||
}
|
||||
|
||||
private class DisplayCache : Container
|
||||
{
|
||||
private static DisplayCache m_Cache;
|
||||
private List<Mobile> m_Mobiles;
|
||||
|
||||
private Dictionary<Type, IEntity> m_Table;
|
||||
|
||||
public DisplayCache() : base(0)
|
||||
{
|
||||
m_Table = new Dictionary<Type, IEntity>();
|
||||
m_Mobiles = new List<Mobile>();
|
||||
}
|
||||
|
||||
public DisplayCache(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public static DisplayCache Cache
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Cache?.Deleted != false)
|
||||
m_Cache = new DisplayCache();
|
||||
|
||||
return m_Cache;
|
||||
}
|
||||
}
|
||||
|
||||
public IEntity Lookup(Type key)
|
||||
{
|
||||
m_Table.TryGetValue(key, out IEntity e);
|
||||
return e;
|
||||
}
|
||||
|
||||
public void Store(Type key, IEntity obj, bool cache)
|
||||
{
|
||||
if (cache)
|
||||
m_Table[key] = obj;
|
||||
|
||||
if (obj is Item item)
|
||||
AddItem(item);
|
||||
else if (obj is Mobile mobile)
|
||||
m_Mobiles.Add(mobile);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
for (int i = 0; i < m_Mobiles.Count; ++i)
|
||||
m_Mobiles[i].Delete();
|
||||
|
||||
m_Mobiles.Clear();
|
||||
|
||||
for (int i = Items.Count - 1; i >= 0; --i)
|
||||
if (i < Items.Count)
|
||||
Items[i].Delete();
|
||||
|
||||
if (m_Cache == this)
|
||||
m_Cache = null;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Mobiles);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Mobiles = reader.ReadStrongMobileList();
|
||||
|
||||
for (int i = 0; i < m_Mobiles.Count; ++i)
|
||||
m_Mobiles[i].Delete();
|
||||
|
||||
m_Mobiles.Clear();
|
||||
|
||||
for (int i = Items.Count - 1; i >= 0; --i)
|
||||
if (i < Items.Count)
|
||||
Items[i].Delete();
|
||||
|
||||
if (m_Cache == null)
|
||||
m_Cache = this;
|
||||
else
|
||||
Delete();
|
||||
|
||||
m_Table = new Dictionary<Type, IEntity>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
Projects/Scripts/Mobiles/Vendors/GenericSell.cs
Normal file
120
Projects/Scripts/Mobiles/Vendors/GenericSell.cs
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GenericSellInfo : IShopSellInfo
|
||||
{
|
||||
private Dictionary<Type, int> m_Table = new Dictionary<Type, int>();
|
||||
private Type[] m_Types;
|
||||
|
||||
public void Add( Type type, int price )
|
||||
{
|
||||
m_Table[type] = price;
|
||||
m_Types = null;
|
||||
}
|
||||
|
||||
public int GetSellPriceFor( Item item )
|
||||
{
|
||||
m_Table.TryGetValue( item.GetType(), out int price );
|
||||
|
||||
if ( item is BaseArmor armor ) {
|
||||
if ( armor.Quality == ArmorQuality.Low )
|
||||
price = (int)( price * 0.60 );
|
||||
else if ( armor.Quality == ArmorQuality.Exceptional )
|
||||
price = (int)( price * 1.25 );
|
||||
|
||||
price += 100 * (int)armor.Durability;
|
||||
|
||||
price += 100 * (int)armor.ProtectionLevel;
|
||||
|
||||
if ( price < 1 )
|
||||
price = 1;
|
||||
}
|
||||
else if ( item is BaseWeapon weapon ) {
|
||||
if ( weapon.Quality == WeaponQuality.Low )
|
||||
price = (int)( price * 0.60 );
|
||||
else if ( weapon.Quality == WeaponQuality.Exceptional )
|
||||
price = (int)( price * 1.25 );
|
||||
|
||||
price += 100 * (int)weapon.DurabilityLevel;
|
||||
|
||||
price += 100 * (int)weapon.DamageLevel;
|
||||
|
||||
if ( price < 1 )
|
||||
price = 1;
|
||||
}
|
||||
else if ( item is BaseBeverage bev ) {
|
||||
int price1 = price, price2 = price;
|
||||
|
||||
if ( bev is Pitcher )
|
||||
{ price1 = 3; price2 = 5; }
|
||||
else if ( bev is BeverageBottle )
|
||||
{ price1 = 3; price2 = 3; }
|
||||
else if ( bev is Jug )
|
||||
{ price1 = 6; price2 = 6; }
|
||||
|
||||
if ( bev.IsEmpty || bev.Content == BeverageType.Milk )
|
||||
price = price1;
|
||||
else
|
||||
price = price2;
|
||||
}
|
||||
|
||||
return price;
|
||||
}
|
||||
|
||||
public int GetBuyPriceFor( Item item )
|
||||
{
|
||||
return (int)( 1.90 * GetSellPriceFor( item ) );
|
||||
}
|
||||
|
||||
public Type[] Types
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Types == null )
|
||||
{
|
||||
m_Types = new Type[m_Table.Keys.Count];
|
||||
m_Table.Keys.CopyTo( m_Types, 0 );
|
||||
}
|
||||
|
||||
return m_Types;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetNameFor( Item item )
|
||||
{
|
||||
if ( item.Name != null )
|
||||
return item.Name;
|
||||
return item.LabelNumber.ToString();
|
||||
}
|
||||
|
||||
public bool IsSellable( Item item )
|
||||
{
|
||||
if ( item.Nontransferable )
|
||||
return false;
|
||||
|
||||
//if ( item.Hue != 0 )
|
||||
//return false;
|
||||
|
||||
return IsInList( item.GetType() );
|
||||
}
|
||||
|
||||
public bool IsResellable( Item item )
|
||||
{
|
||||
if ( item.Nontransferable )
|
||||
return false;
|
||||
|
||||
//if ( item.Hue != 0 )
|
||||
//return false;
|
||||
|
||||
return IsInList( item.GetType() );
|
||||
}
|
||||
|
||||
public bool IsInList( Type type )
|
||||
{
|
||||
return m_Table.ContainsKey( type );
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Projects/Scripts/Mobiles/Vendors/NPC/Alchemist.cs
Normal file
53
Projects/Scripts/Mobiles/Vendors/NPC/Alchemist.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Alchemist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Alchemist() : base("the alchemist")
|
||||
{
|
||||
SetSkill(SkillName.Alchemy, 85.0, 100.0);
|
||||
SetSkill(SkillName.TasteID, 65.0, 88.0);
|
||||
}
|
||||
|
||||
public Alchemist(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBAlchemist());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Robe(Utility.RandomPinkHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
471
Projects/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs
Normal file
471
Projects/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class AnimalTrainer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public AnimalTrainer() : base("the animal trainer")
|
||||
{
|
||||
SetSkill(SkillName.AnimalLore, 64.0, 100.0);
|
||||
SetSkill(SkillName.AnimalTaming, 90.0, 100.0);
|
||||
SetSkill(SkillName.Veterinary, 65.0, 88.0);
|
||||
}
|
||||
|
||||
public AnimalTrainer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBAnimalTrainer());
|
||||
}
|
||||
|
||||
public override int GetShoeHue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(Utility.RandomBool() ? new QuarterStaff() : (Item)new ShepherdsCrook());
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
if (from.Alive)
|
||||
{
|
||||
list.Add(new StableEntry(this, from));
|
||||
|
||||
if (from.Stabled.Count > 0)
|
||||
list.Add(new ClaimAllEntry(this, from));
|
||||
}
|
||||
|
||||
base.AddCustomContextEntries(from, list);
|
||||
}
|
||||
|
||||
public static int GetMaxStabled(Mobile from)
|
||||
{
|
||||
double taming = from.Skills.AnimalTaming.Value;
|
||||
double anlore = from.Skills.AnimalLore.Value;
|
||||
double vetern = from.Skills.Veterinary.Value;
|
||||
double sklsum = taming + anlore + vetern;
|
||||
|
||||
int max;
|
||||
|
||||
if (sklsum >= 240.0)
|
||||
max = 5;
|
||||
else if (sklsum >= 200.0)
|
||||
max = 4;
|
||||
else if (sklsum >= 160.0)
|
||||
max = 3;
|
||||
else
|
||||
max = 2;
|
||||
|
||||
if (taming >= 100.0)
|
||||
max += (int)((taming - 90.0) / 10);
|
||||
|
||||
if (anlore >= 100.0)
|
||||
max += (int)((anlore - 90.0) / 10);
|
||||
|
||||
if (vetern >= 100.0)
|
||||
max += (int)((vetern - 90.0) / 10);
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
private void CloseClaimList(Mobile from)
|
||||
{
|
||||
from.CloseGump<ClaimListGump>();
|
||||
}
|
||||
|
||||
public void BeginClaimList(Mobile from)
|
||||
{
|
||||
if (Deleted || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
List<BaseCreature> list = new List<BaseCreature>();
|
||||
|
||||
for (int i = 0; i < from.Stabled.Count; ++i)
|
||||
{
|
||||
BaseCreature pet = from.Stabled[i] as BaseCreature;
|
||||
|
||||
if (pet?.Deleted != false)
|
||||
{
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
from.Stabled.RemoveAt(i);
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
|
||||
list.Add(pet);
|
||||
}
|
||||
|
||||
if (list.Count > 0)
|
||||
from.SendGump(new ClaimListGump(this, from, list));
|
||||
else
|
||||
SayTo(from, 502671); // But I have no animals stabled with me at the moment!
|
||||
}
|
||||
|
||||
public void EndClaimList(Mobile from, BaseCreature pet)
|
||||
{
|
||||
if (pet?.Deleted != false || from.Map != Map || !from.Stabled.Contains(pet) || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
if (!from.InRange(this, 14))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
if (CanClaim(from, pet))
|
||||
{
|
||||
DoClaim(from, pet);
|
||||
|
||||
from.Stabled.Remove(pet);
|
||||
|
||||
(from as PlayerMobile)?.AutoStabled.Remove(pet);
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049612, pet.Name); // ~1_NAME~ remained in the stables because you have too many followers.
|
||||
}
|
||||
}
|
||||
|
||||
public void BeginStable(Mobile from)
|
||||
{
|
||||
if (Deleted || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if (!(from.Backpack?.GetAmount(typeof(Gold)) >= 30) &&
|
||||
!(bank?.GetAmount(typeof(Gold)) >= 30))
|
||||
{
|
||||
SayTo(from, 1042556); // Thou dost not have enough gold, not even in thy bank account.
|
||||
}
|
||||
else
|
||||
{
|
||||
/* I charge 30 gold per pet for a real week's stable time.
|
||||
* I will withdraw it from thy bank account.
|
||||
* Which animal wouldst thou like to stable here?
|
||||
*/
|
||||
from.SendLocalizedMessage(1042558);
|
||||
|
||||
from.Target = new StableTarget(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndStable(Mobile from, BaseCreature pet)
|
||||
{
|
||||
if (Deleted || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
if (pet.Body.IsHuman)
|
||||
{
|
||||
SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn.
|
||||
}
|
||||
else if (!pet.Controlled)
|
||||
{
|
||||
SayTo(from, 1048053); // You can't stable that!
|
||||
}
|
||||
else if (pet.ControlMaster != from)
|
||||
{
|
||||
SayTo(from, 1042562); // You do not own that pet!
|
||||
}
|
||||
else if (pet.IsDeadPet)
|
||||
{
|
||||
SayTo(from, 1049668); // Living pets only, please.
|
||||
}
|
||||
else if (pet.Summoned)
|
||||
{
|
||||
SayTo(from, 502673); // I can not stable summoned creatures.
|
||||
}
|
||||
/*
|
||||
else if ( pet.Allured )
|
||||
{
|
||||
SayTo( from, 1048053 ); // You can't stable that!
|
||||
}
|
||||
*/
|
||||
else if ((pet is PackLlama || pet is PackHorse || pet is Beetle) && pet.Backpack?.Items.Count > 0)
|
||||
{
|
||||
SayTo(from, 1042563); // You need to unload your pet.
|
||||
}
|
||||
else if (pet.Combatant != null && pet.InRange(pet.Combatant, 12) && pet.Map == pet.Combatant.Map)
|
||||
{
|
||||
SayTo(from, 1042564); // I'm sorry. Your pet seems to be busy.
|
||||
}
|
||||
else if (from.Stabled.Count >= GetMaxStabled(from))
|
||||
{
|
||||
SayTo(from, 1042565); // You have too many pets in the stables!
|
||||
}
|
||||
else
|
||||
{
|
||||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if (from.Backpack?.ConsumeTotal(typeof(Gold), 30) == true ||
|
||||
bank?.ConsumeTotal(typeof(Gold), 30) == true)
|
||||
{
|
||||
pet.ControlTarget = null;
|
||||
pet.ControlOrder = OrderType.Stay;
|
||||
pet.Internalize();
|
||||
|
||||
pet.SetControlMaster(null);
|
||||
pet.SummonMaster = null;
|
||||
|
||||
pet.IsStabled = true;
|
||||
pet.StabledBy = from;
|
||||
|
||||
if (Core.SE)
|
||||
pet.Loyalty = MaxLoyalty; // Wonderfully happy
|
||||
|
||||
from.Stabled.Add(pet);
|
||||
|
||||
SayTo(from,
|
||||
Core.AOS
|
||||
? 1049677
|
||||
: 502679); // [AOS: Your pet has been stabled.] Very well, thy pet is stabled. Thou mayst recover it by saying 'claim' to me. In one real world week, I shall sell it off if it is not claimed!
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 502677); // But thou hast not the funds in thy bank account!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Claim(Mobile from, string petName = null)
|
||||
{
|
||||
if (Deleted || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
bool claimed = false;
|
||||
int stabled = 0;
|
||||
|
||||
bool claimByName = petName != null;
|
||||
|
||||
for (int i = 0; i < from.Stabled.Count; ++i)
|
||||
{
|
||||
BaseCreature pet = from.Stabled[i] as BaseCreature;
|
||||
|
||||
if (pet?.Deleted != false)
|
||||
{
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
from.Stabled.RemoveAt(i);
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
|
||||
++stabled;
|
||||
|
||||
if (claimByName && !Insensitive.Equals(pet.Name, petName))
|
||||
continue;
|
||||
|
||||
if (CanClaim(from, pet))
|
||||
{
|
||||
DoClaim(from, pet);
|
||||
|
||||
from.Stabled.RemoveAt(i);
|
||||
|
||||
(from as PlayerMobile)?.AutoStabled.Remove(pet);
|
||||
|
||||
--i;
|
||||
|
||||
claimed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049612, pet.Name); // ~1_NAME~ remained in the stables because you have too many followers.
|
||||
}
|
||||
}
|
||||
|
||||
if (claimed)
|
||||
SayTo(from, 1042559); // Here you go... and good day to you!
|
||||
else if (stabled == 0)
|
||||
SayTo(from, 502671); // But I have no animals stabled with me at the moment!
|
||||
else if (claimByName)
|
||||
BeginClaimList(from);
|
||||
}
|
||||
|
||||
public bool CanClaim(Mobile from, BaseCreature pet)
|
||||
{
|
||||
return from.Followers + pet.ControlSlots <= from.FollowersMax;
|
||||
}
|
||||
|
||||
private void DoClaim(Mobile from, BaseCreature pet)
|
||||
{
|
||||
pet.SetControlMaster(from);
|
||||
|
||||
if (pet.Summoned)
|
||||
pet.SummonMaster = from;
|
||||
|
||||
pet.ControlTarget = from;
|
||||
pet.ControlOrder = OrderType.Follow;
|
||||
|
||||
pet.MoveToWorld(from.Location, from.Map);
|
||||
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
|
||||
if (Core.SE)
|
||||
pet.Loyalty = MaxLoyalty; // Wonderfully Happy
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
if (!e.Handled && e.HasKeyword(0x0008)) // *stable*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
CloseClaimList(e.Mobile);
|
||||
BeginStable(e.Mobile);
|
||||
}
|
||||
else if (!e.Handled && e.HasKeyword(0x0009)) // *claim*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
CloseClaimList(e.Mobile);
|
||||
|
||||
int index = e.Speech.IndexOf(' ');
|
||||
|
||||
if (index != -1)
|
||||
Claim(e.Mobile, e.Speech.Substring(index).Trim());
|
||||
else
|
||||
Claim(e.Mobile);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class StableEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private AnimalTrainer m_Trainer;
|
||||
|
||||
public StableEntry(AnimalTrainer trainer, Mobile from) : base(6126, 12)
|
||||
{
|
||||
m_Trainer = trainer;
|
||||
m_From = from;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
m_Trainer.BeginStable(m_From);
|
||||
}
|
||||
}
|
||||
|
||||
private class ClaimListGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private List<BaseCreature> m_List;
|
||||
private AnimalTrainer m_Trainer;
|
||||
|
||||
public ClaimListGump(AnimalTrainer trainer, Mobile from, List<BaseCreature> list) : base(50, 50)
|
||||
{
|
||||
m_Trainer = trainer;
|
||||
m_From = from;
|
||||
m_List = list;
|
||||
|
||||
from.CloseGump<ClaimListGump>();
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 325, 50 + list.Count * 20, 9250);
|
||||
AddAlphaRegion(5, 5, 315, 40 + list.Count * 20);
|
||||
|
||||
AddHtml(15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>");
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
BaseCreature pet = list[i];
|
||||
|
||||
if (pet?.Deleted != false)
|
||||
continue;
|
||||
|
||||
AddButton(15, 39 + i * 20, 10006, 10006, i + 1);
|
||||
AddHtml(32, 35 + i * 20, 275, 18, $"<BASEFONT COLOR=#C0C0EE>{pet.Name}</BASEFONT>");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
int index = info.ButtonID - 1;
|
||||
|
||||
if (index >= 0 && index < m_List.Count)
|
||||
m_Trainer.EndClaimList(m_From, m_List[index]);
|
||||
}
|
||||
}
|
||||
|
||||
private class ClaimAllEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private AnimalTrainer m_Trainer;
|
||||
|
||||
public ClaimAllEntry(AnimalTrainer trainer, Mobile from) : base(6127, 12)
|
||||
{
|
||||
m_Trainer = trainer;
|
||||
m_From = from;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
m_Trainer.Claim(m_From);
|
||||
}
|
||||
}
|
||||
|
||||
private class StableTarget : Target
|
||||
{
|
||||
private AnimalTrainer m_Trainer;
|
||||
|
||||
public StableTarget(AnimalTrainer trainer) : base(12, false, TargetFlags.None)
|
||||
{
|
||||
m_Trainer = trainer;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (targeted is BaseCreature creature)
|
||||
m_Trainer.EndStable(from, creature);
|
||||
else if (targeted == from)
|
||||
m_Trainer.SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn.
|
||||
else
|
||||
m_Trainer.SayTo(from, 1048053); // You can't stable that!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Projects/Scripts/Mobiles/Vendors/NPC/Architect.cs
Normal file
44
Projects/Scripts/Mobiles/Vendors/NPC/Architect.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Architect : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Architect() : base("the architect")
|
||||
{
|
||||
}
|
||||
|
||||
public Architect(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TinkersGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
if (!Core.AOS)
|
||||
m_SBInfos.Add(new SBHouseDeed());
|
||||
|
||||
m_SBInfos.Add(new SBArchitect());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
94
Projects/Scripts/Mobiles/Vendors/NPC/Armorer.cs
Normal file
94
Projects/Scripts/Mobiles/Vendors/NPC/Armorer.cs
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Armorer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Armorer() : base("the armorer")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 64.0, 100.0);
|
||||
SetSkill(SkillName.Blacksmith, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Armorer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Boots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_SBInfos.Add(new SBLeatherArmor());
|
||||
m_SBInfos.Add(new SBStuddedArmor());
|
||||
m_SBInfos.Add(new SBMetalShields());
|
||||
m_SBInfos.Add(new SBPlateArmor());
|
||||
m_SBInfos.Add(new SBHelmetArmor());
|
||||
m_SBInfos.Add(new SBChainmailArmor());
|
||||
m_SBInfos.Add(new SBRingmailArmor());
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_SBInfos.Add(new SBStuddedArmor());
|
||||
m_SBInfos.Add(new SBLeatherArmor());
|
||||
m_SBInfos.Add(new SBMetalShields());
|
||||
m_SBInfos.Add(new SBHelmetArmor());
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_SBInfos.Add(new SBMetalShields());
|
||||
m_SBInfos.Add(new SBPlateArmor());
|
||||
m_SBInfos.Add(new SBHelmetArmor());
|
||||
m_SBInfos.Add(new SBChainmailArmor());
|
||||
m_SBInfos.Add(new SBRingmailArmor());
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_SBInfos.Add(new SBMetalShields());
|
||||
m_SBInfos.Add(new SBHelmetArmor());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsTokunoVendor)
|
||||
{
|
||||
m_SBInfos.Add(new SBSELeatherArmor());
|
||||
m_SBInfos.Add(new SBSEArmor());
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron(Utility.RandomYellowHue()));
|
||||
AddItem(new Bascinet());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Projects/Scripts/Mobiles/Vendors/NPC/Baker.cs
Normal file
41
Projects/Scripts/Mobiles/Vendors/NPC/Baker.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Baker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Baker() : base("the baker")
|
||||
{
|
||||
SetSkill(SkillName.Cooking, 75.0, 98.0);
|
||||
SetSkill(SkillName.TasteID, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Baker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBaker());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Projects/Scripts/Mobiles/Vendors/NPC/Bard.cs
Normal file
47
Projects/Scripts/Mobiles/Vendors/NPC/Bard.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Bard : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Bard() : base("the bard")
|
||||
{
|
||||
SetSkill(SkillName.Discordance, 64.0, 100.0);
|
||||
SetSkill(SkillName.Musicianship, 64.0, 100.0);
|
||||
SetSkill(SkillName.Peacemaking, 65.0, 88.0);
|
||||
SetSkill(SkillName.Provocation, 60.0, 83.0);
|
||||
SetSkill(SkillName.Archery, 36.0, 68.0);
|
||||
SetSkill(SkillName.Swords, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Bard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.BardsGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBard());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Projects/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs
Normal file
49
Projects/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Barkeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Barkeeper() : base("the barkeeper")
|
||||
{
|
||||
}
|
||||
|
||||
public Barkeeper(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBarkeeper());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron(Utility.RandomBrightHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Projects/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs
Normal file
41
Projects/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Beekeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Beekeeper() : base("the beekeeper")
|
||||
{
|
||||
}
|
||||
|
||||
public Beekeeper(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Boots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBeekeeper());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
146
Projects/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs
Normal file
146
Projects/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BulkOrders;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Blacksmith : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Blacksmith() : base("the blacksmith")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 36.0, 68.0);
|
||||
SetSkill(SkillName.Blacksmith, 65.0, 88.0);
|
||||
SetSkill(SkillName.Fencing, 60.0, 83.0);
|
||||
SetSkill(SkillName.Macing, 61.0, 93.0);
|
||||
SetSkill(SkillName.Swords, 60.0, 83.0);
|
||||
SetSkill(SkillName.Tactics, 60.0, 83.0);
|
||||
SetSkill(SkillName.Parry, 61.0, 93.0);
|
||||
}
|
||||
|
||||
public Blacksmith(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.BlacksmithsGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.None;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
/*m_SBInfos.Add( new SBSmithTools() );
|
||||
|
||||
m_SBInfos.Add( new SBMetalShields() );
|
||||
m_SBInfos.Add( new SBWoodenShields() );
|
||||
|
||||
m_SBInfos.Add( new SBPlateArmor() );
|
||||
|
||||
m_SBInfos.Add( new SBHelmetArmor() );
|
||||
m_SBInfos.Add( new SBChainmailArmor() );
|
||||
m_SBInfos.Add( new SBRingmailArmor() );
|
||||
m_SBInfos.Add( new SBAxeWeapon() );
|
||||
m_SBInfos.Add( new SBPoleArmWeapon() );
|
||||
m_SBInfos.Add( new SBRangedWeapon() );
|
||||
|
||||
m_SBInfos.Add( new SBKnifeWeapon() );
|
||||
m_SBInfos.Add( new SBMaceWeapon() );
|
||||
m_SBInfos.Add( new SBSpearForkWeapon() );
|
||||
m_SBInfos.Add( new SBSwordWeapon() );*/
|
||||
|
||||
m_SBInfos.Add(new SBBlacksmith());
|
||||
if (IsTokunoVendor)
|
||||
{
|
||||
m_SBInfos.Add(new SBSEArmor());
|
||||
m_SBInfos.Add(new SBSEWeapons());
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
Item item = Utility.RandomBool() ? null : new RingmailChest();
|
||||
|
||||
if (item != null && !EquipItem(item))
|
||||
{
|
||||
item.Delete();
|
||||
item = null;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
AddItem(new FullApron());
|
||||
|
||||
AddItem(new Bascinet());
|
||||
AddItem(new SmithHammer());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Bulk Orders
|
||||
|
||||
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
|
||||
{
|
||||
double theirSkill = pm.Skills.Blacksmith.Base;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
|
||||
else if (theirSkill >= 50.1)
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
|
||||
else
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
|
||||
|
||||
if (theirSkill >= 70.1 && (theirSkill - 40.0) / 300.0 > Utility.RandomDouble())
|
||||
return new LargeSmithBOD();
|
||||
|
||||
return SmallSmithBOD.CreateRandomFor(from);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool IsValidBulkOrder(Item item)
|
||||
{
|
||||
return item is SmallSmithBOD || item is LargeSmithBOD;
|
||||
}
|
||||
|
||||
public override bool SupportsBulkOrders(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile && from.Skills.Blacksmith.Base > 0;
|
||||
}
|
||||
|
||||
public override TimeSpan GetNextBulkOrder(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile mobile)
|
||||
return mobile.NextSmithBulkOrder;
|
||||
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override void OnSuccessfulBulkOrderReceive(Mobile from)
|
||||
{
|
||||
if (Core.SE && from is PlayerMobile mobile)
|
||||
mobile.NextSmithBulkOrder = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
62
Projects/Scripts/Mobiles/Vendors/NPC/Bowyer.cs
Normal file
62
Projects/Scripts/Mobiles/Vendors/NPC/Bowyer.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Bower")]
|
||||
public class Bowyer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Bowyer() : base("the bowyer")
|
||||
{
|
||||
SetSkill(SkillName.Fletching, 80.0, 100.0);
|
||||
SetSkill(SkillName.Archery, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public Bowyer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
|
||||
|
||||
public override int GetShoeHue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Bow());
|
||||
AddItem(new LeatherGorget());
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBowyer());
|
||||
m_SBInfos.Add(new SBRangedWeapon());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSEBowyer());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Projects/Scripts/Mobiles/Vendors/NPC/Butcher.cs
Normal file
49
Projects/Scripts/Mobiles/Vendors/NPC/Butcher.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Butcher : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Butcher() : base("the butcher")
|
||||
{
|
||||
SetSkill(SkillName.Anatomy, 45.0, 68.0);
|
||||
}
|
||||
|
||||
public Butcher(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBButcher());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
AddItem(new Cleaver());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Mobiles/Vendors/NPC/Carpenter.cs
Normal file
56
Projects/Scripts/Mobiles/Vendors/NPC/Carpenter.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Carpenter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Carpenter() : base("the carpenter")
|
||||
{
|
||||
SetSkill(SkillName.Carpentry, 85.0, 100.0);
|
||||
SetSkill(SkillName.Lumberjacking, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Carpenter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TinkersGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBStavesWeapon());
|
||||
m_SBInfos.Add(new SBCarpenter());
|
||||
m_SBInfos.Add(new SBWoodenShields());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSECarpenter());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Projects/Scripts/Mobiles/Vendors/NPC/Cobbler.cs
Normal file
42
Projects/Scripts/Mobiles/Vendors/NPC/Cobbler.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cobbler : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Cobbler() : base("the cobbler")
|
||||
{
|
||||
SetSkill(SkillName.Tailoring, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Cobbler(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBCobbler());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Projects/Scripts/Mobiles/Vendors/NPC/Cook.cs
Normal file
54
Projects/Scripts/Mobiles/Vendors/NPC/Cook.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cook : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Cook() : base("the cook")
|
||||
{
|
||||
SetSkill(SkillName.Cooking, 90.0, 100.0);
|
||||
SetSkill(SkillName.TasteID, 75.0, 98.0);
|
||||
}
|
||||
|
||||
public Cook(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBCook());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSECook());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
574
Projects/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs
Normal file
574
Projects/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs
Normal file
|
|
@ -0,0 +1,574 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class CustomHairstylist : BaseVendor
|
||||
{
|
||||
public static readonly object From = new object();
|
||||
public static readonly object Vendor = new object();
|
||||
public static readonly object Price = new object();
|
||||
|
||||
private static HairstylistBuyInfo[] m_SellList =
|
||||
{
|
||||
new HairstylistBuyInfo(1018357, 50000, false, typeof(ChangeHairstyleGump), new[]
|
||||
{ From, Vendor, Price, false, ChangeHairstyleEntry.HairEntries }),
|
||||
new HairstylistBuyInfo(1018358, 50000, true, typeof(ChangeHairstyleGump), new[]
|
||||
{ From, Vendor, Price, true, ChangeHairstyleEntry.BeardEntries }),
|
||||
new HairstylistBuyInfo(1018359, 50, false, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, true, true, ChangeHairHueEntry.RegularEntries }),
|
||||
new HairstylistBuyInfo(1018360, 500000, false, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, true, true, ChangeHairHueEntry.BrightEntries }),
|
||||
new HairstylistBuyInfo(1018361, 30000, false, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, true, false, ChangeHairHueEntry.RegularEntries }),
|
||||
new HairstylistBuyInfo(1018362, 30000, true, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, false, true, ChangeHairHueEntry.RegularEntries }),
|
||||
new HairstylistBuyInfo(1018363, 500000, false, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, true, false, ChangeHairHueEntry.BrightEntries }),
|
||||
new HairstylistBuyInfo(1018364, 500000, true, typeof(ChangeHairHueGump), new[]
|
||||
{ From, Vendor, Price, false, true, ChangeHairHueEntry.BrightEntries })
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public CustomHairstylist() : base("the hairstylist")
|
||||
{
|
||||
}
|
||||
|
||||
public CustomHairstylist(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos{ get; } = new List<SBInfo>();
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override bool IsActiveBuyer => false;
|
||||
public override bool IsActiveSeller => true;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override bool OnBuyItems(Mobile buyer, List<BuyItemResponse> list)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void VendorBuy(Mobile from)
|
||||
{
|
||||
from.SendGump(new HairstylistBuyGump(from, this, m_SellList));
|
||||
}
|
||||
|
||||
public override int GetHairHue()
|
||||
{
|
||||
return Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Robe(Utility.RandomPinkHue()));
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class HairstylistBuyInfo
|
||||
{
|
||||
public HairstylistBuyInfo(int title, int price, bool facialHair, Type gumpType, object[] args)
|
||||
{
|
||||
Title = title;
|
||||
Price = price;
|
||||
FacialHair = facialHair;
|
||||
GumpType = gumpType;
|
||||
GumpArgs = args;
|
||||
}
|
||||
|
||||
public HairstylistBuyInfo(string title, int price, bool facialHair, Type gumpType, object[] args)
|
||||
{
|
||||
TitleString = title;
|
||||
Price = price;
|
||||
FacialHair = facialHair;
|
||||
GumpType = gumpType;
|
||||
GumpArgs = args;
|
||||
}
|
||||
|
||||
public int Title{ get; }
|
||||
|
||||
public string TitleString{ get; }
|
||||
|
||||
public int Price{ get; }
|
||||
|
||||
public bool FacialHair{ get; }
|
||||
|
||||
public Type GumpType{ get; }
|
||||
|
||||
public object[] GumpArgs{ get; }
|
||||
}
|
||||
|
||||
public class HairstylistBuyGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private HairstylistBuyInfo[] m_SellList;
|
||||
private Mobile m_Vendor;
|
||||
|
||||
public HairstylistBuyGump(Mobile from, Mobile vendor, HairstylistBuyInfo[] sellList) : base(50, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Vendor = vendor;
|
||||
m_SellList = sellList;
|
||||
|
||||
from.CloseGump<HairstylistBuyGump>();
|
||||
from.CloseGump<ChangeHairHueGump>();
|
||||
from.CloseGump<ChangeHairstyleGump>();
|
||||
|
||||
bool isFemale = from.Female || from.Body.IsFemale;
|
||||
|
||||
int balance = Banker.GetBalance(from);
|
||||
int canAfford = 0;
|
||||
|
||||
for (int i = 0; i < sellList.Length; ++i)
|
||||
if (balance >= sellList[i].Price && (!sellList[i].FacialHair || !isFemale))
|
||||
++canAfford;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(50, 10, 450, 100 + canAfford * 25, 2600);
|
||||
|
||||
AddHtmlLocalized(100, 40, 350, 20, 1018356); // Choose your hairstyle change:
|
||||
|
||||
int index = 0;
|
||||
|
||||
for (int i = 0; i < sellList.Length; ++i)
|
||||
if (balance >= sellList[i].Price && (!sellList[i].FacialHair || !isFemale))
|
||||
{
|
||||
if (sellList[i].TitleString != null)
|
||||
AddHtml(140, 75 + index * 25, 300, 20, sellList[i].TitleString);
|
||||
else
|
||||
AddHtmlLocalized(140, 75 + index * 25, 300, 20, sellList[i].Title);
|
||||
|
||||
AddButton(100, 75 + index++ * 25, 4005, 4007, 1 + i);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
int index = info.ButtonID - 1;
|
||||
|
||||
if (index >= 0 && index < m_SellList.Length)
|
||||
{
|
||||
HairstylistBuyInfo buyInfo = m_SellList[index];
|
||||
|
||||
int balance = Banker.GetBalance(m_From);
|
||||
|
||||
bool isFemale = m_From.Female || m_From.Body.IsFemale;
|
||||
|
||||
if (buyInfo.FacialHair && isFemale)
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1010639, m_From.NetState);
|
||||
else if (balance >= buyInfo.Price)
|
||||
try
|
||||
{
|
||||
object[] origArgs = buyInfo.GumpArgs;
|
||||
object[] args = new object[origArgs.Length];
|
||||
|
||||
for (int i = 0; i < args.Length; ++i)
|
||||
if (origArgs[i] == CustomHairstylist.Price)
|
||||
args[i] = m_SellList[index].Price;
|
||||
else if (origArgs[i] == CustomHairstylist.From)
|
||||
args[i] = m_From;
|
||||
else if (origArgs[i] == CustomHairstylist.Vendor)
|
||||
args[i] = m_Vendor;
|
||||
else
|
||||
args[i] = origArgs[i];
|
||||
|
||||
Gump g = Activator.CreateInstance(buyInfo.GumpType, args) as Gump;
|
||||
|
||||
m_From.SendGump(g);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
else
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ChangeHairHueEntry
|
||||
{
|
||||
public static readonly ChangeHairHueEntry[] BrightEntries =
|
||||
{
|
||||
new ChangeHairHueEntry("*****", 12, 10),
|
||||
new ChangeHairHueEntry("*****", 32, 5),
|
||||
new ChangeHairHueEntry("*****", 38, 8),
|
||||
new ChangeHairHueEntry("*****", 54, 3),
|
||||
new ChangeHairHueEntry("*****", 62, 10),
|
||||
new ChangeHairHueEntry("*****", 81, 2),
|
||||
new ChangeHairHueEntry("*****", 89, 2),
|
||||
new ChangeHairHueEntry("*****", 1153, 2)
|
||||
};
|
||||
|
||||
public static readonly ChangeHairHueEntry[] RegularEntries =
|
||||
{
|
||||
new ChangeHairHueEntry("*****", 1602, 26),
|
||||
new ChangeHairHueEntry("*****", 1628, 27),
|
||||
new ChangeHairHueEntry("*****", 1502, 32),
|
||||
new ChangeHairHueEntry("*****", 1302, 32),
|
||||
new ChangeHairHueEntry("*****", 1402, 32),
|
||||
new ChangeHairHueEntry("*****", 1202, 24),
|
||||
new ChangeHairHueEntry("*****", 2402, 29),
|
||||
new ChangeHairHueEntry("*****", 2213, 6),
|
||||
new ChangeHairHueEntry("*****", 1102, 8),
|
||||
new ChangeHairHueEntry("*****", 1110, 8),
|
||||
new ChangeHairHueEntry("*****", 1118, 16),
|
||||
new ChangeHairHueEntry("*****", 1134, 16)
|
||||
};
|
||||
|
||||
public ChangeHairHueEntry(string name, int[] hues)
|
||||
{
|
||||
Name = name;
|
||||
Hues = hues;
|
||||
}
|
||||
|
||||
public ChangeHairHueEntry(string name, int start, int count)
|
||||
{
|
||||
Name = name;
|
||||
|
||||
Hues = new int[count];
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
Hues[i] = start + i;
|
||||
}
|
||||
|
||||
public string Name{ get; }
|
||||
|
||||
public int[] Hues{ get; }
|
||||
}
|
||||
|
||||
public class ChangeHairHueGump : Gump
|
||||
{
|
||||
private ChangeHairHueEntry[] m_Entries;
|
||||
private bool m_FacialHair;
|
||||
private Mobile m_From;
|
||||
private bool m_Hair;
|
||||
private int m_Price;
|
||||
private Mobile m_Vendor;
|
||||
|
||||
public ChangeHairHueGump(Mobile from, Mobile vendor, int price, bool hair, bool facialHair,
|
||||
ChangeHairHueEntry[] entries) : base(50, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Vendor = vendor;
|
||||
m_Price = price;
|
||||
m_Hair = hair;
|
||||
m_FacialHair = facialHair;
|
||||
m_Entries = entries;
|
||||
|
||||
from.CloseGump<HairstylistBuyGump>();
|
||||
from.CloseGump<ChangeHairHueGump>();
|
||||
from.CloseGump<ChangeHairstyleGump>();
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(100, 10, 350, 370, 2600);
|
||||
AddBackground(120, 54, 110, 270, 5100);
|
||||
|
||||
AddHtmlLocalized(155, 25, 240, 30, 1011013); // <center>Hair Color Selection Menu</center>
|
||||
|
||||
AddHtmlLocalized(150, 330, 220, 35, 1011014); // Dye my hair this color!
|
||||
AddButton(380, 330, 4005, 4007, 1);
|
||||
|
||||
for (int i = 0; i < entries.Length; ++i)
|
||||
{
|
||||
ChangeHairHueEntry entry = entries[i];
|
||||
|
||||
AddLabel(130, 59 + i * 22, entry.Hues[0] - 1, entry.Name);
|
||||
AddButton(207, 60 + i * 22, 5224, 5224, 0, GumpButtonType.Page, 1 + i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < entries.Length; ++i)
|
||||
{
|
||||
ChangeHairHueEntry entry = entries[i];
|
||||
int[] hues = entry.Hues;
|
||||
string name = entry.Name;
|
||||
|
||||
AddPage(1 + i);
|
||||
|
||||
for (int j = 0; j < hues.Length; ++j)
|
||||
{
|
||||
AddLabel(278 + j / 16 * 80, 52 + j % 16 * 17, hues[j] - 1, name);
|
||||
AddRadio(260 + j / 16 * 80, 52 + j % 16 * 17, 210, 211, false, j * entries.Length + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
int[] switches = info.Switches;
|
||||
|
||||
if (switches.Length > 0)
|
||||
{
|
||||
int index = switches[0] % m_Entries.Length;
|
||||
int offset = switches[0] / m_Entries.Length;
|
||||
|
||||
if (index >= 0 && index < m_Entries.Length)
|
||||
if (offset >= 0 && offset < m_Entries[index].Hues.Length)
|
||||
{
|
||||
if (m_Hair && m_From.HairItemID > 0 || m_FacialHair && m_From.FacialHairItemID > 0)
|
||||
{
|
||||
if (!Banker.Withdraw(m_From, m_Price))
|
||||
{
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293,
|
||||
m_From.NetState); // You cannot afford my services for that style.
|
||||
return;
|
||||
}
|
||||
|
||||
int hue = m_Entries[index].Hues[offset];
|
||||
|
||||
if (m_Hair)
|
||||
m_From.HairHue = hue;
|
||||
|
||||
if (m_FacialHair)
|
||||
m_From.FacialHairHue = hue;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 502623,
|
||||
m_From.NetState); // You have no hair to dye and you cannot use this.
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// You decide not to change your hairstyle.
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// You decide not to change your hairstyle.
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ChangeHairstyleEntry
|
||||
{
|
||||
public static readonly ChangeHairstyleEntry[] HairEntries =
|
||||
{
|
||||
new ChangeHairstyleEntry(50700, 70 - 137, 20 - 60, 0x203B),
|
||||
new ChangeHairstyleEntry(60710, 193 - 260, 18 - 60, 0x2045),
|
||||
new ChangeHairstyleEntry(50703, 316 - 383, 25 - 60, 0x2044),
|
||||
new ChangeHairstyleEntry(60708, 70 - 137, 75 - 125, 0x203C),
|
||||
new ChangeHairstyleEntry(60900, 193 - 260, 85 - 125, 0x2047),
|
||||
new ChangeHairstyleEntry(60713, 320 - 383, 85 - 125, 0x204A),
|
||||
new ChangeHairstyleEntry(60702, 70 - 137, 140 - 190, 0x203D),
|
||||
new ChangeHairstyleEntry(60707, 193 - 260, 140 - 190, 0x2049),
|
||||
new ChangeHairstyleEntry(60901, 315 - 383, 150 - 190, 0x2048),
|
||||
new ChangeHairstyleEntry(0, 0, 0, 0)
|
||||
};
|
||||
|
||||
public static readonly ChangeHairstyleEntry[] BeardEntries =
|
||||
{
|
||||
new ChangeHairstyleEntry(50800, 120 - 187, 30 - 80, 0x2040),
|
||||
new ChangeHairstyleEntry(50904, 243 - 310, 33 - 80, 0x204B),
|
||||
new ChangeHairstyleEntry(50906, 120 - 187, 100 - 150, 0x204D),
|
||||
new ChangeHairstyleEntry(50801, 243 - 310, 95 - 150, 0x203E),
|
||||
new ChangeHairstyleEntry(50802, 120 - 187, 173 - 220, 0x203F),
|
||||
new ChangeHairstyleEntry(50905, 243 - 310, 165 - 220, 0x204C),
|
||||
new ChangeHairstyleEntry(50808, 120 - 187, 242 - 290, 0x2041),
|
||||
new ChangeHairstyleEntry(0, 0, 0, 0)
|
||||
};
|
||||
|
||||
public ChangeHairstyleEntry(int gumpID, int x, int y, int itemID)
|
||||
{
|
||||
GumpID = gumpID;
|
||||
X = x;
|
||||
Y = y;
|
||||
ItemID = itemID;
|
||||
}
|
||||
|
||||
public int ItemID{ get; }
|
||||
|
||||
public int GumpID{ get; }
|
||||
|
||||
public int X{ get; }
|
||||
|
||||
public int Y{ get; }
|
||||
}
|
||||
|
||||
public class ChangeHairstyleGump : Gump
|
||||
{
|
||||
private ChangeHairstyleEntry[] m_Entries;
|
||||
private bool m_FacialHair;
|
||||
private Mobile m_From;
|
||||
private int m_Price;
|
||||
private Mobile m_Vendor;
|
||||
|
||||
public ChangeHairstyleGump(Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries) :
|
||||
base(50, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Vendor = vendor;
|
||||
m_Price = price;
|
||||
m_FacialHair = facialHair;
|
||||
m_Entries = entries;
|
||||
|
||||
from.CloseGump<HairstylistBuyGump>();
|
||||
from.CloseGump<ChangeHairHueGump>();
|
||||
from.CloseGump<ChangeHairstyleGump>();
|
||||
|
||||
int tableWidth = m_FacialHair ? 2 : 3;
|
||||
int tableHeight = (entries.Length + tableWidth - (m_FacialHair ? 1 : 2)) / tableWidth;
|
||||
int offsetWidth = 123;
|
||||
int offsetHeight = m_FacialHair ? 70 : 65;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 81 + tableWidth * offsetWidth, 105 + tableHeight * offsetHeight, 2600);
|
||||
|
||||
AddButton(45, 45 + tableHeight * offsetHeight, 4005, 4007, 1);
|
||||
AddHtmlLocalized(77, 45 + tableHeight * offsetHeight, 90, 35, 1006044); // Ok
|
||||
|
||||
AddButton(81 + tableWidth * offsetWidth - 180, 45 + tableHeight * offsetHeight, 4005, 4007, 0);
|
||||
AddHtmlLocalized(81 + tableWidth * offsetWidth - 148, 45 + tableHeight * offsetHeight, 90, 35, 1006045); // Cancel
|
||||
|
||||
if (!facialHair)
|
||||
AddHtmlLocalized(50, 15, 350, 20, 1018353); // <center>New Hairstyle</center>
|
||||
else
|
||||
AddHtmlLocalized(55, 15, 200, 20, 1018354); // <center>New Beard</center>
|
||||
|
||||
for (int i = 0; i < entries.Length; ++i)
|
||||
{
|
||||
int xTable = i % tableWidth;
|
||||
int yTable = i / tableWidth;
|
||||
|
||||
if (entries[i].GumpID != 0)
|
||||
{
|
||||
AddRadio(40 + xTable * offsetWidth, 70 + yTable * offsetHeight, 208, 209, false, i);
|
||||
AddBackground(87 + xTable * offsetWidth, 50 + yTable * offsetHeight, 50, 50, 2620);
|
||||
AddImage(87 + xTable * offsetWidth + entries[i].X, 50 + yTable * offsetHeight + entries[i].Y,
|
||||
entries[i].GumpID);
|
||||
}
|
||||
else if (!facialHair)
|
||||
{
|
||||
AddRadio(40 + (xTable + 1) * offsetWidth, 240, 208, 209, false, i);
|
||||
AddHtmlLocalized(60 + (xTable + 1) * offsetWidth, 240, 85, 35, 1011064); // Bald
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRadio(40 + xTable * offsetWidth, 70 + yTable * offsetHeight, 208, 209, false, i);
|
||||
AddHtmlLocalized(60 + xTable * offsetWidth, 70 + yTable * offsetHeight, 85, 35, 1011064); // Bald
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_FacialHair && (m_From.Female || m_From.Body.IsFemale))
|
||||
return;
|
||||
|
||||
if (m_From.Race == Race.Elf)
|
||||
{
|
||||
m_From.SendMessage("This isn't implemented for elves yet. Sorry!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
int[] switches = info.Switches;
|
||||
|
||||
if (switches.Length > 0)
|
||||
{
|
||||
int index = switches[0];
|
||||
|
||||
if (index >= 0 && index < m_Entries.Length)
|
||||
{
|
||||
ChangeHairstyleEntry entry = m_Entries[index];
|
||||
|
||||
(m_From as PlayerMobile)?.SetHairMods(-1, -1);
|
||||
|
||||
int hairID = m_From.HairItemID;
|
||||
int facialHairID = m_From.FacialHairItemID;
|
||||
|
||||
if (entry.ItemID == 0)
|
||||
{
|
||||
if (m_FacialHair ? facialHairID == 0 : hairID == 0)
|
||||
return;
|
||||
|
||||
if (Banker.Withdraw(m_From, m_Price))
|
||||
{
|
||||
if (m_FacialHair)
|
||||
m_From.FacialHairItemID = 0;
|
||||
else
|
||||
m_From.HairItemID = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293,
|
||||
m_From.NetState); // You cannot afford my services for that style.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_FacialHair)
|
||||
{
|
||||
if (facialHairID > 0 && facialHairID == entry.ItemID)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hairID > 0 && hairID == entry.ItemID)
|
||||
return;
|
||||
}
|
||||
|
||||
if (Banker.Withdraw(m_From, m_Price))
|
||||
{
|
||||
if (m_FacialHair)
|
||||
m_From.FacialHairItemID = entry.ItemID;
|
||||
else
|
||||
m_From.HairItemID = entry.ItemID;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293,
|
||||
m_From.NetState); // You cannot afford my services for that style.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// You decide not to change your hairstyle.
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// You decide not to change your hairstyle.
|
||||
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Projects/Scripts/Mobiles/Vendors/NPC/Farmer.cs
Normal file
57
Projects/Scripts/Mobiles/Vendors/NPC/Farmer.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Farmer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Farmer() : base("the farmer")
|
||||
{
|
||||
SetSkill(SkillName.Lumberjacking, 36.0, 68.0);
|
||||
SetSkill(SkillName.TasteID, 36.0, 68.0);
|
||||
SetSkill(SkillName.Cooking, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Farmer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.ThighBoots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBFarmer());
|
||||
}
|
||||
|
||||
public override int GetShoeHue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new WideBrimHat(Utility.RandomNeutralHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Projects/Scripts/Mobiles/Vendors/NPC/Fisherman.cs
Normal file
50
Projects/Scripts/Mobiles/Vendors/NPC/Fisherman.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Fisherman : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Fisherman() : base("the fisher")
|
||||
{
|
||||
SetSkill(SkillName.Fishing, 75.0, 98.0);
|
||||
}
|
||||
|
||||
public Fisherman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.FishermensGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBFisherman());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new FishingPole());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Projects/Scripts/Mobiles/Vendors/NPC/Furtrader.cs
Normal file
44
Projects/Scripts/Mobiles/Vendors/NPC/Furtrader.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Furtrader : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Furtrader() : base("the furtrader")
|
||||
{
|
||||
SetSkill(SkillName.Camping, 55.0, 78.0);
|
||||
//SetSkill( SkillName.Alchemy, 60.0, 83.0 );
|
||||
SetSkill(SkillName.AnimalLore, 85.0, 100.0);
|
||||
SetSkill(SkillName.Cooking, 45.0, 68.0);
|
||||
SetSkill(SkillName.Tracking, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Furtrader(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBFurtrader());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Projects/Scripts/Mobiles/Vendors/NPC/Glassblower.cs
Normal file
48
Projects/Scripts/Mobiles/Vendors/NPC/Glassblower.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.GargoyleAlchemist")]
|
||||
public class Glassblower : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Glassblower() : base("the alchemist")
|
||||
{
|
||||
SetSkill(SkillName.Alchemy, 85.0, 100.0);
|
||||
SetSkill(SkillName.TasteID, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public Glassblower(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBGlassblower());
|
||||
m_SBInfos.Add(new SBAlchemist());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Body == 0x2F2)
|
||||
Body = 0x2F6;
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Projects/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs
Normal file
43
Projects/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GolemCrafter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public GolemCrafter() : base("the golem crafter")
|
||||
{
|
||||
SetSkill(SkillName.Lockpicking, 60.0, 83.0);
|
||||
SetSkill(SkillName.RemoveTrap, 75.0, 98.0);
|
||||
SetSkill(SkillName.Tinkering, 64.0, 100.0);
|
||||
}
|
||||
|
||||
public GolemCrafter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTinker());
|
||||
m_SBInfos.Add(new SBVagabond());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class BardGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public BardGuildmaster() : base("bard")
|
||||
{
|
||||
SetSkill(SkillName.Archery, 80.0, 100.0);
|
||||
SetSkill(SkillName.Discordance, 80.0, 100.0);
|
||||
SetSkill(SkillName.Musicianship, 80.0, 100.0);
|
||||
SetSkill(SkillName.Peacemaking, 80.0, 100.0);
|
||||
SetSkill(SkillName.Provocation, 80.0, 100.0);
|
||||
SetSkill(SkillName.Swords, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public BardGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.BardsGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseGuildmaster : BaseVendor
|
||||
{
|
||||
public BaseGuildmaster(string title) : base(title)
|
||||
{
|
||||
Title = $"the {title} {(Female ? "guildmistress" : "guildmaster")}";
|
||||
}
|
||||
|
||||
public BaseGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos{ get; } = new List<SBInfo>();
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public virtual int JoinCost => 500;
|
||||
|
||||
public virtual TimeSpan JoinAge => TimeSpan.FromDays(0.0);
|
||||
public virtual TimeSpan JoinGameAge => TimeSpan.FromDays(2.0);
|
||||
public virtual TimeSpan QuitAge => TimeSpan.FromDays(7.0);
|
||||
public virtual TimeSpan QuitGameAge => TimeSpan.FromDays(4.0);
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool CheckCustomReqs(PlayerMobile pm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void SayGuildTo(Mobile m)
|
||||
{
|
||||
SayTo(m, 1008055 + (int)NpcGuild);
|
||||
}
|
||||
|
||||
public virtual void SayWelcomeTo(Mobile m)
|
||||
{
|
||||
SayTo(m, 1008054); // Welcome to the guild! Thou shalt find that fellow members shall grant thee lower prices in shops.
|
||||
}
|
||||
|
||||
public virtual void SayPriceTo(Mobile m)
|
||||
{
|
||||
m.Send(new MessageLocalizedAffix(Serial, Body, MessageType.Regular, SpeechHue, 3, 1008052, Name,
|
||||
AffixType.Append, JoinCost.ToString(), ""));
|
||||
}
|
||||
|
||||
public virtual bool WasNamed(string speech)
|
||||
{
|
||||
string name = Name;
|
||||
|
||||
return name != null && Insensitive.StartsWith(speech, name);
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(Location, 2))
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if (!e.Handled && from is PlayerMobile pm && pm.InRange(Location, 2) && WasNamed(e.Speech))
|
||||
{
|
||||
if (e.HasKeyword(0x0004)) // *join* | *member*
|
||||
{
|
||||
if (pm.NpcGuild == NpcGuild)
|
||||
SayTo(pm, 501047); // Thou art already a member of our guild.
|
||||
else if (pm.NpcGuild != NpcGuild.None)
|
||||
SayTo(pm, 501046); // Thou must resign from thy other guild first.
|
||||
else if (pm.GameTime < JoinGameAge || pm.CreationTime + JoinAge > DateTime.UtcNow)
|
||||
SayTo(pm, 501048); // You are too young to join my guild...
|
||||
else if (CheckCustomReqs(pm))
|
||||
SayPriceTo(pm);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.HasKeyword(0x0005)) // *resign* | *quit*
|
||||
{
|
||||
if (pm.NpcGuild != NpcGuild)
|
||||
{
|
||||
SayTo(pm, 501052); // Thou dost not belong to my guild!
|
||||
}
|
||||
else if (pm.NpcGuildJoinTime + QuitAge > DateTime.UtcNow ||
|
||||
pm.NpcGuildGameTime + QuitGameAge > pm.GameTime)
|
||||
{
|
||||
SayTo(pm, 501053); // You just joined my guild! You must wait a week to resign.
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(pm, 501054); // I accept thy resignation.
|
||||
pm.NpcGuild = NpcGuild.None;
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
|
||||
public override bool OnGoldGiven(Mobile from, Gold dropped)
|
||||
{
|
||||
if (from is PlayerMobile pm && dropped.Amount == JoinCost)
|
||||
{
|
||||
if (pm.NpcGuild == NpcGuild)
|
||||
{
|
||||
SayTo(pm, 501047); // Thou art already a member of our guild.
|
||||
}
|
||||
else if (pm.NpcGuild != NpcGuild.None)
|
||||
{
|
||||
SayTo(pm, 501046); // Thou must resign from thy other guild first.
|
||||
}
|
||||
else if (pm.GameTime < JoinGameAge || pm.CreationTime + JoinAge > DateTime.UtcNow)
|
||||
{
|
||||
SayTo(pm, 501048); // You are too young to join my guild...
|
||||
}
|
||||
else if (CheckCustomReqs(pm))
|
||||
{
|
||||
SayWelcomeTo(pm);
|
||||
|
||||
pm.NpcGuild = NpcGuild;
|
||||
pm.NpcGuildJoinTime = DateTime.UtcNow;
|
||||
pm.NpcGuildGameTime = pm.GameTime;
|
||||
|
||||
dropped.Delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnGoldGiven(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BlacksmithGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public BlacksmithGuildmaster() : base("blacksmith")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 65.0, 88.0);
|
||||
SetSkill(SkillName.Blacksmith, 90.0, 100.0);
|
||||
SetSkill(SkillName.Macing, 36.0, 68.0);
|
||||
SetSkill(SkillName.Parry, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public BlacksmithGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.BlacksmithsGuild;
|
||||
|
||||
public override bool IsActiveVendor => true;
|
||||
|
||||
public override bool ClickTitle => true;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.ThighBoots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add(new SBBlacksmith());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
Item item = Utility.RandomBool() ? null : new RingmailChest();
|
||||
|
||||
if (item != null && !EquipItem(item))
|
||||
{
|
||||
item.Delete();
|
||||
item = null;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
AddItem(new FullApron());
|
||||
|
||||
AddItem(new Bascinet());
|
||||
AddItem(new SmithHammer());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class FisherGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public FisherGuildmaster() : base("fisher")
|
||||
{
|
||||
SetSkill(SkillName.Fishing, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public FisherGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.FishermensGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HealerGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public HealerGuildmaster() : base("healer")
|
||||
{
|
||||
SetSkill(SkillName.Anatomy, 85.0, 100.0);
|
||||
SetSkill(SkillName.Healing, 90.0, 100.0);
|
||||
SetSkill(SkillName.Forensics, 75.0, 98.0);
|
||||
SetSkill(SkillName.MagicResist, 75.0, 98.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 65.0, 88.0);
|
||||
}
|
||||
|
||||
public HealerGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.HealersGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Sandals;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Robe(Utility.RandomYellowHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MageGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public MageGuildmaster() : base("mage")
|
||||
{
|
||||
SetSkill(SkillName.EvalInt, 85.0, 100.0);
|
||||
SetSkill(SkillName.Inscribe, 65.0, 88.0);
|
||||
SetSkill(SkillName.MagicResist, 64.0, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.0, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 60.0, 83.0);
|
||||
SetSkill(SkillName.Meditation, 85.0, 100.0);
|
||||
SetSkill(SkillName.Macing, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public MageGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Robe(Utility.RandomBlueHue()));
|
||||
AddItem(new GnarledStaff());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class MerchantGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public MerchantGuildmaster() : base("merchant")
|
||||
{
|
||||
SetSkill(SkillName.ItemID, 85.0, 100.0);
|
||||
SetSkill(SkillName.ArmsLore, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public MerchantGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class MinerGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public MinerGuildmaster() : base("miner")
|
||||
{
|
||||
SetSkill(SkillName.ItemID, 60.0, 83.0);
|
||||
SetSkill(SkillName.Mining, 90.0, 100.0);
|
||||
}
|
||||
|
||||
public MinerGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MinersGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class RangerGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public RangerGuildmaster() : base("ranger")
|
||||
{
|
||||
SetSkill(SkillName.AnimalLore, 64.0, 100.0);
|
||||
SetSkill(SkillName.Camping, 75.0, 98.0);
|
||||
SetSkill(SkillName.Hiding, 75.0, 98.0);
|
||||
SetSkill(SkillName.MagicResist, 75.0, 98.0);
|
||||
SetSkill(SkillName.Tactics, 65.0, 88.0);
|
||||
SetSkill(SkillName.Archery, 90.0, 100.0);
|
||||
SetSkill(SkillName.Tracking, 90.0, 100.0);
|
||||
SetSkill(SkillName.Stealth, 60.0, 83.0);
|
||||
SetSkill(SkillName.Fencing, 36.0, 68.0);
|
||||
SetSkill(SkillName.Herding, 36.0, 68.0);
|
||||
SetSkill(SkillName.Swords, 45.0, 68.0);
|
||||
}
|
||||
|
||||
public RangerGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.RangersGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class TailorGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public TailorGuildmaster() : base("tailor")
|
||||
{
|
||||
SetSkill(SkillName.Tailoring, 90.0, 100.0);
|
||||
}
|
||||
|
||||
public TailorGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TailorsGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ThiefGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public ThiefGuildmaster() : base("thief")
|
||||
{
|
||||
SetSkill(SkillName.DetectHidden, 75.0, 98.0);
|
||||
SetSkill(SkillName.Hiding, 65.0, 88.0);
|
||||
SetSkill(SkillName.Lockpicking, 85.0, 100.0);
|
||||
SetSkill(SkillName.Snooping, 90.0, 100.0);
|
||||
SetSkill(SkillName.Poisoning, 60.0, 83.0);
|
||||
SetSkill(SkillName.Stealing, 90.0, 100.0);
|
||||
SetSkill(SkillName.Fencing, 75.0, 98.0);
|
||||
SetSkill(SkillName.Stealth, 85.0, 100.0);
|
||||
SetSkill(SkillName.RemoveTrap, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public ThiefGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.ThievesGuild;
|
||||
|
||||
public override TimeSpan JoinAge => TimeSpan.FromDays(7.0);
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
if (Utility.RandomBool())
|
||||
AddItem(new Kryss());
|
||||
else
|
||||
AddItem(new Dagger());
|
||||
}
|
||||
|
||||
public override bool CheckCustomReqs(PlayerMobile pm)
|
||||
{
|
||||
if (pm.Young)
|
||||
{
|
||||
SayTo(pm, 502089); // You cannot be a member of the Thieves' Guild while you are Young.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pm.Kills > 0)
|
||||
{
|
||||
SayTo(pm, 501050); // This guild is for cunning thieves, not oafish cutthroats.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pm.Skills.Stealing.Base < 60.0)
|
||||
{
|
||||
SayTo(pm, 501051); // You must be at least a journeyman pickpocket to join this elite organization.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SayWelcomeTo(Mobile m)
|
||||
{
|
||||
SayTo(m, 1008053); // Welcome to the guild! Stay to the shadows, friend.
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(Location, 2))
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if (!e.Handled && from is PlayerMobile pm && pm.InRange(Location, 2) && e.HasKeyword(0x1F)) // *disguise*
|
||||
{
|
||||
if (pm.NpcGuild == NpcGuild.ThievesGuild)
|
||||
SayTo(pm, 501839); // That particular item costs 700 gold pieces.
|
||||
else
|
||||
SayTo(pm, 501838); // I don't know what you're talking about.
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
|
||||
public override bool OnGoldGiven(Mobile from, Gold dropped)
|
||||
{
|
||||
if (from is PlayerMobile pm && dropped.Amount == 700)
|
||||
{
|
||||
if (pm.NpcGuild == NpcGuild.ThievesGuild)
|
||||
{
|
||||
pm.AddToBackpack(new DisguiseKit());
|
||||
|
||||
dropped.Delete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnGoldGiven(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class TinkerGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public TinkerGuildmaster() : base("tinker")
|
||||
{
|
||||
SetSkill(SkillName.Lockpicking, 65.0, 88.0);
|
||||
SetSkill(SkillName.Tinkering, 90.0, 100.0);
|
||||
SetSkill(SkillName.RemoveTrap, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public TinkerGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TinkersGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
if (Core.ML && from.Alive)
|
||||
{
|
||||
RechargeEntry entry = new RechargeEntry(from, this);
|
||||
|
||||
if (WeaponEngravingTool.Find(from) == null)
|
||||
entry.Enabled = false;
|
||||
|
||||
list.Add(entry);
|
||||
}
|
||||
|
||||
base.AddCustomContextEntries(from, list);
|
||||
}
|
||||
|
||||
private class RechargeEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Mobile m_Vendor;
|
||||
|
||||
public RechargeEntry(Mobile from, Mobile vendor) : base(6271, 6)
|
||||
{
|
||||
m_From = from;
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (!Core.ML || m_Vendor?.Deleted != false)
|
||||
return;
|
||||
|
||||
WeaponEngravingTool tool = WeaponEngravingTool.Find(m_From);
|
||||
|
||||
if (tool?.UsesRemaining <= 0)
|
||||
{
|
||||
if (Banker.GetBalance(m_From) >= 100000)
|
||||
m_From.SendGump(new WeaponEngravingTool.ConfirmGump(tool, m_Vendor));
|
||||
else
|
||||
m_Vendor.Say(1076167); // You need a 100,000 gold and a blue diamond to recharge the weapon engraver.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vendor.Say(
|
||||
1076164); // I can only help with this if you are carrying an engraving tool that needs repair.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class WarriorGuildmaster : BaseGuildmaster
|
||||
{
|
||||
[Constructible]
|
||||
public WarriorGuildmaster() : base("warrior")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 75.0, 98.0);
|
||||
SetSkill(SkillName.Parry, 85.0, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 60.0, 83.0);
|
||||
SetSkill(SkillName.Tactics, 85.0, 100.0);
|
||||
SetSkill(SkillName.Swords, 90.0, 100.0);
|
||||
SetSkill(SkillName.Macing, 60.0, 83.0);
|
||||
SetSkill(SkillName.Fencing, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public WarriorGuildmaster(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.WarriorsGuild;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Projects/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs
Normal file
74
Projects/Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class GypsyAnimalTrainer : AnimalTrainer
|
||||
{
|
||||
[Constructible]
|
||||
public GypsyAnimalTrainer()
|
||||
{
|
||||
if (Utility.RandomBool())
|
||||
Title = "the gypsy animal trainer";
|
||||
else
|
||||
Title = "the gypsy animal herder";
|
||||
}
|
||||
|
||||
public GypsyAnimalTrainer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
|
||||
|
||||
public override int GetShoeHue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
Item item = FindItemOnLayer(Layer.Pants);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.Shirt);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
88
Projects/Scripts/Mobiles/Vendors/NPC/GypsyBanker.cs
Normal file
88
Projects/Scripts/Mobiles/Vendors/NPC/GypsyBanker.cs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GypsyBanker : Banker
|
||||
{
|
||||
[Constructible]
|
||||
public GypsyBanker()
|
||||
{
|
||||
Title = "the gypsy banker";
|
||||
}
|
||||
|
||||
public GypsyBanker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
public override NpcGuild NpcGuild => NpcGuild.None;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
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 = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.Shoes);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.Shirt);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Projects/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs
Normal file
81
Projects/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GypsyMaiden : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public GypsyMaiden() : base("the gypsy maiden")
|
||||
{
|
||||
}
|
||||
|
||||
public GypsyMaiden(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override bool GetGender()
|
||||
{
|
||||
return true; // always female
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBProvisioner());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
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(Utility.RandomBrightHue()));
|
||||
|
||||
Item item = FindItemOnLayer(Layer.Pants);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Projects/Scripts/Mobiles/Vendors/NPC/HairStylist.cs
Normal file
42
Projects/Scripts/Mobiles/Vendors/NPC/HairStylist.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HairStylist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public HairStylist() : base("the hair stylist")
|
||||
{
|
||||
SetSkill(SkillName.Alchemy, 80.0, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.0, 110.0);
|
||||
SetSkill(SkillName.TasteID, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public HairStylist(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBHairStylist());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Projects/Scripts/Mobiles/Vendors/NPC/Herbalist.cs
Normal file
46
Projects/Scripts/Mobiles/Vendors/NPC/Herbalist.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Herbalist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Herbalist() : base("the herbalist")
|
||||
{
|
||||
SetSkill(SkillName.Alchemy, 80.0, 100.0);
|
||||
SetSkill(SkillName.Cooking, 80.0, 100.0);
|
||||
SetSkill(SkillName.TasteID, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public Herbalist(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBHerbalist());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
85
Projects/Scripts/Mobiles/Vendors/NPC/HolyMage.cs
Normal file
85
Projects/Scripts/Mobiles/Vendors/NPC/HolyMage.cs
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HolyMage : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public HolyMage() : base("the Holy Mage")
|
||||
{
|
||||
SetSkill(SkillName.EvalInt, 65.0, 88.0);
|
||||
SetSkill(SkillName.Inscribe, 60.0, 83.0);
|
||||
SetSkill(SkillName.Magery, 64.0, 100.0);
|
||||
SetSkill(SkillName.Meditation, 60.0, 83.0);
|
||||
SetSkill(SkillName.MagicResist, 65.0, 88.0);
|
||||
SetSkill(SkillName.Wrestling, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public HolyMage(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBHolyMage());
|
||||
}
|
||||
|
||||
public Item ApplyHue(Item item, int hue)
|
||||
{
|
||||
item.Hue = hue;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(ApplyHue(new Robe(), 0x47E));
|
||||
AddItem(ApplyHue(new ThighBoots(), 0x47E));
|
||||
AddItem(ApplyHue(new BlackStaff(), 0x47E));
|
||||
|
||||
if (Female)
|
||||
{
|
||||
AddItem(ApplyHue(new LeatherGloves(), 0x47E));
|
||||
AddItem(ApplyHue(new GoldNecklace(), 0x47E));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(ApplyHue(new PlateGloves(), 0x47E));
|
||||
AddItem(ApplyHue(new PlateGorget(), 0x47E));
|
||||
}
|
||||
|
||||
switch (Utility.Random(Female ? 2 : 1))
|
||||
{
|
||||
case 0:
|
||||
HairItemID = 0x203C;
|
||||
break;
|
||||
case 1:
|
||||
HairItemID = 0x203D;
|
||||
break;
|
||||
}
|
||||
|
||||
HairHue = 0x47E;
|
||||
|
||||
PackGold(100, 200);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Projects/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs
Normal file
44
Projects/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class InnKeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public InnKeeper() : base("the innkeeper")
|
||||
{
|
||||
}
|
||||
|
||||
public InnKeeper(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBInnKeeper());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSEFood());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
124
Projects/Scripts/Mobiles/Vendors/NPC/IronWorker.cs
Normal file
124
Projects/Scripts/Mobiles/Vendors/NPC/IronWorker.cs
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class IronWorker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public IronWorker() : base("the iron worker")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 36.0, 68.0);
|
||||
SetSkill(SkillName.Blacksmith, 65.0, 88.0);
|
||||
SetSkill(SkillName.Fencing, 60.0, 83.0);
|
||||
SetSkill(SkillName.Macing, 61.0, 93.0);
|
||||
SetSkill(SkillName.Swords, 60.0, 83.0);
|
||||
SetSkill(SkillName.Tactics, 60.0, 83.0);
|
||||
SetSkill(SkillName.Parry, 61.0, 93.0);
|
||||
}
|
||||
|
||||
public IronWorker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.None;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBAxeWeapon());
|
||||
m_SBInfos.Add(new SBKnifeWeapon());
|
||||
m_SBInfos.Add(new SBMaceWeapon());
|
||||
m_SBInfos.Add(new SBSmithTools());
|
||||
m_SBInfos.Add(new SBPoleArmWeapon());
|
||||
m_SBInfos.Add(new SBSpearForkWeapon());
|
||||
m_SBInfos.Add(new SBSwordWeapon());
|
||||
|
||||
m_SBInfos.Add(new SBMetalShields());
|
||||
|
||||
m_SBInfos.Add(new SBHelmetArmor());
|
||||
m_SBInfos.Add(new SBPlateArmor());
|
||||
m_SBInfos.Add(new SBChainmailArmor());
|
||||
m_SBInfos.Add(new SBRingmailArmor());
|
||||
m_SBInfos.Add(new SBStuddedArmor());
|
||||
m_SBInfos.Add(new SBLeatherArmor());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
Item item = Utility.RandomBool() ? null : new RingmailChest();
|
||||
|
||||
if (item != null && !EquipItem(item))
|
||||
{
|
||||
item.Delete();
|
||||
item = null;
|
||||
}
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
AddItem(new JesterHat(Utility.RandomBrightHue()));
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new Bandana(Utility.RandomBrightHue()));
|
||||
break;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
AddItem(new FullApron(Utility.RandomBrightHue()));
|
||||
|
||||
AddItem(new Bascinet());
|
||||
AddItem(new SmithHammer());
|
||||
|
||||
item = FindItemOnLayer(Layer.Pants);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerLegs);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.OuterTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.InnerTorso);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer(Layer.Shirt);
|
||||
|
||||
if (item != null)
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Projects/Scripts/Mobiles/Vendors/NPC/Jeweler.cs
Normal file
40
Projects/Scripts/Mobiles/Vendors/NPC/Jeweler.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Jeweler : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Jeweler() : base("the jeweler")
|
||||
{
|
||||
SetSkill(SkillName.ItemID, 64.0, 100.0);
|
||||
}
|
||||
|
||||
public Jeweler(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBJewel());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Projects/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs
Normal file
102
Projects/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class KeeperOfChivalry : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public KeeperOfChivalry() : base("the Keeper of Chivalry")
|
||||
{
|
||||
SetSkill(SkillName.Fencing, 75.0, 85.0);
|
||||
SetSkill(SkillName.Macing, 75.0, 85.0);
|
||||
SetSkill(SkillName.Swords, 75.0, 85.0);
|
||||
SetSkill(SkillName.Chivalry, 100.0);
|
||||
}
|
||||
|
||||
public KeeperOfChivalry(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBKeeperOfChivalry());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new StuddedGorget());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new PlateHelm());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new NorseHelm());
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new CloseHelm());
|
||||
break;
|
||||
case 3:
|
||||
AddItem(new Helmet());
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new BodySash(0x482));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Doublet(0x482));
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new Tunic(0x482));
|
||||
break;
|
||||
}
|
||||
|
||||
AddItem(new Broadsword());
|
||||
|
||||
Item shield = new MetalKiteShield();
|
||||
|
||||
shield.Hue = Utility.RandomNondyedHue();
|
||||
|
||||
AddItem(shield);
|
||||
|
||||
switch (Utility.Random(2))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Boots());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new ThighBoots());
|
||||
break;
|
||||
}
|
||||
|
||||
PackGold(100, 200);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Projects/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs
Normal file
41
Projects/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class LeatherWorker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public LeatherWorker() : base("the leather worker")
|
||||
{
|
||||
}
|
||||
|
||||
public LeatherWorker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBLeatherArmor());
|
||||
m_SBInfos.Add(new SBStuddedArmor());
|
||||
m_SBInfos.Add(new SBLeatherWorker());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Projects/Scripts/Mobiles/Vendors/NPC/Mage.cs
Normal file
57
Projects/Scripts/Mobiles/Vendors/NPC/Mage.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mage : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Mage() : base("the mage")
|
||||
{
|
||||
SetSkill(SkillName.EvalInt, 65.0, 88.0);
|
||||
SetSkill(SkillName.Inscribe, 60.0, 83.0);
|
||||
SetSkill(SkillName.Magery, 64.0, 100.0);
|
||||
SetSkill(SkillName.Meditation, 60.0, 83.0);
|
||||
SetSkill(SkillName.MagicResist, 65.0, 88.0);
|
||||
SetSkill(SkillName.Wrestling, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Mage(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMage());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Robe(Utility.RandomBlueHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Projects/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs
Normal file
40
Projects/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mapmaker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Mapmaker() : base("the mapmaker")
|
||||
{
|
||||
SetSkill(SkillName.Cartography, 90.0, 100.0);
|
||||
}
|
||||
|
||||
public Mapmaker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMapmaker());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Projects/Scripts/Mobiles/Vendors/NPC/Miller.cs
Normal file
39
Projects/Scripts/Mobiles/Vendors/NPC/Miller.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Miller : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Miller() : base("the miller")
|
||||
{
|
||||
}
|
||||
|
||||
public Miller(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMiller());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Projects/Scripts/Mobiles/Vendors/NPC/Miner.cs
Normal file
51
Projects/Scripts/Mobiles/Vendors/NPC/Miner.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Miner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Miner() : base("the miner")
|
||||
{
|
||||
SetSkill(SkillName.Mining, 65.0, 88.0);
|
||||
}
|
||||
|
||||
public Miner(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMiner());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new FancyShirt(0x3E4));
|
||||
AddItem(new LongPants(0x192));
|
||||
AddItem(new Pickaxe());
|
||||
AddItem(new ThighBoots(0x283));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Projects/Scripts/Mobiles/Vendors/NPC/Monk.cs
Normal file
51
Projects/Scripts/Mobiles/Vendors/NPC/Monk.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Monk : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Monk() : base("the Monk")
|
||||
{
|
||||
SetSkill(SkillName.EvalInt, 100.0);
|
||||
SetSkill(SkillName.Tactics, 70.0, 90.0);
|
||||
SetSkill(SkillName.Wrestling, 70.0, 90.0);
|
||||
SetSkill(SkillName.MagicResist, 70.0, 90.0);
|
||||
SetSkill(SkillName.Macing, 70.0, 90.0);
|
||||
}
|
||||
|
||||
public Monk(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMonk());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Sandals());
|
||||
AddItem(new MonkRobe());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Projects/Scripts/Mobiles/Vendors/NPC/Provisioner.cs
Normal file
44
Projects/Scripts/Mobiles/Vendors/NPC/Provisioner.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Provisioner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Provisioner() : base("the provisioner")
|
||||
{
|
||||
SetSkill(SkillName.Camping, 45.0, 68.0);
|
||||
SetSkill(SkillName.Tactics, 45.0, 68.0);
|
||||
}
|
||||
|
||||
public Provisioner(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBProvisioner());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSEHats());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Projects/Scripts/Mobiles/Vendors/NPC/Rancher.cs
Normal file
43
Projects/Scripts/Mobiles/Vendors/NPC/Rancher.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Rancher : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Rancher() : base("the rancher")
|
||||
{
|
||||
SetSkill(SkillName.AnimalLore, 55.0, 78.0);
|
||||
SetSkill(SkillName.AnimalTaming, 55.0, 78.0);
|
||||
SetSkill(SkillName.Herding, 64.0, 100.0);
|
||||
SetSkill(SkillName.Veterinary, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Rancher(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBRancher());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Mobiles/Vendors/NPC/Ranger.cs
Normal file
56
Projects/Scripts/Mobiles/Vendors/NPC/Ranger.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Ranger : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Ranger() : base("the ranger")
|
||||
{
|
||||
SetSkill(SkillName.Camping, 55.0, 78.0);
|
||||
SetSkill(SkillName.DetectHidden, 65.0, 88.0);
|
||||
SetSkill(SkillName.Hiding, 45.0, 68.0);
|
||||
SetSkill(SkillName.Archery, 65.0, 88.0);
|
||||
SetSkill(SkillName.Tracking, 65.0, 88.0);
|
||||
SetSkill(SkillName.Veterinary, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Ranger(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBRanger());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Shirt(Utility.RandomNeutralHue()));
|
||||
AddItem(new LongPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new Bow());
|
||||
AddItem(new ThighBoots(Utility.RandomNeutralHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
179
Projects/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs
Normal file
179
Projects/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Multis.Deeds;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class RealEstateBroker : BaseVendor
|
||||
{
|
||||
private DateTime m_NextCheckPack;
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public RealEstateBroker() : base("the real estate broker")
|
||||
{
|
||||
}
|
||||
|
||||
public RealEstateBroker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.Alive && from.InRange(this, 3))
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (DateTime.UtcNow > m_NextCheckPack && InRange(m, 4) && !InRange(oldLocation, 4) && m.Player)
|
||||
{
|
||||
Container pack = m.Backpack;
|
||||
|
||||
if (pack != null)
|
||||
{
|
||||
m_NextCheckPack = DateTime.UtcNow + TimeSpan.FromSeconds(2.0);
|
||||
|
||||
if (pack.FindItemByType<HouseDeed>(false) != null)
|
||||
{
|
||||
// If you have a deed, I can appraise it or buy it from you...
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500605, m.NetState);
|
||||
|
||||
// Simply hand me a deed to sell it.
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500606, m.NetState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnMovement(m, oldLocation);
|
||||
}
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
if (!e.Handled && e.Mobile.Alive && e.HasKeyword(0x38)) // *appraise*
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 500608); // Which deed would you like appraised?
|
||||
e.Mobile.BeginTarget(12, false, TargetFlags.None, Appraise_OnTarget);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is HouseDeed deed)
|
||||
{
|
||||
int price = ComputePriceFor(deed);
|
||||
|
||||
if (price > 0)
|
||||
{
|
||||
if (Banker.Deposit(from, price))
|
||||
{
|
||||
// For the deed I have placed gold in your bankbox :
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1008000, AffixType.Append, price.ToString());
|
||||
|
||||
deed.Delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 500390); // Your bank box is full.
|
||||
return false;
|
||||
}
|
||||
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 500607); // I'm not interested in that.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public void Appraise_OnTarget(Mobile from, object obj)
|
||||
{
|
||||
if (obj is HouseDeed deed)
|
||||
{
|
||||
int price = ComputePriceFor(deed);
|
||||
|
||||
if (price > 0)
|
||||
{
|
||||
// I will pay you gold for this deed :
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1008001, AffixType.Append, price.ToString());
|
||||
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
500610); // Simply hand me the deed if you wish to sell it.
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 500607); // I'm not interested in that.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 500609); // I can't appraise things I know nothing about...
|
||||
}
|
||||
}
|
||||
|
||||
public int ComputePriceFor(HouseDeed deed)
|
||||
{
|
||||
int price = 0;
|
||||
|
||||
if (deed is SmallBrickHouseDeed || deed is StonePlasterHouseDeed || deed is FieldStoneHouseDeed || deed is WoodHouseDeed || deed is WoodPlasterHouseDeed ||
|
||||
deed is ThatchedRoofCottageDeed)
|
||||
price = 43800;
|
||||
else if (deed is BrickHouseDeed)
|
||||
price = 144500;
|
||||
else if (deed is TwoStoryWoodPlasterHouseDeed || deed is TwoStoryStonePlasterHouseDeed)
|
||||
price = 192400;
|
||||
else if (deed is TowerDeed)
|
||||
price = 433200;
|
||||
else if (deed is KeepDeed)
|
||||
price = 665200;
|
||||
else if (deed is CastleDeed)
|
||||
price = 1022800;
|
||||
else if (deed is LargePatioDeed)
|
||||
price = 152800;
|
||||
else if (deed is LargeMarbleDeed)
|
||||
price = 192800;
|
||||
else if (deed is SmallTowerDeed)
|
||||
price = 88500;
|
||||
else if (deed is LogCabinDeed)
|
||||
price = 97800;
|
||||
else if (deed is SandstonePatioDeed)
|
||||
price = 90900;
|
||||
else if (deed is VillaDeed)
|
||||
price = 136500;
|
||||
else if (deed is StoneWorkshopDeed)
|
||||
price = 60600;
|
||||
else if (deed is MarbleWorkshopDeed)
|
||||
price = 60300;
|
||||
|
||||
return AOS.Scale(price, 80); // refunds 80% of the purchase price
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBRealEstateBroker());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Projects/Scripts/Mobiles/Vendors/NPC/Scribe.cs
Normal file
79
Projects/Scripts/Mobiles/Vendors/NPC/Scribe.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Scribe : BaseVendor
|
||||
{
|
||||
public static readonly TimeSpan ShushDelay = TimeSpan.FromMinutes(1);
|
||||
|
||||
private DateTime m_NextShush;
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Scribe() : base("the scribe")
|
||||
{
|
||||
SetSkill(SkillName.EvalInt, 60.0, 83.0);
|
||||
SetSkill(SkillName.Inscribe, 90.0, 100.0);
|
||||
}
|
||||
|
||||
public Scribe(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MagesGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBScribe());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new 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.UtcNow && InLOS(e.Mobile))
|
||||
{
|
||||
Direction = GetDirectionTo(e.Mobile);
|
||||
|
||||
PlaySound(Female ? 0x32F : 0x441);
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1073990); // Shhhh!
|
||||
|
||||
m_NextShush = DateTime.UtcNow + ShushDelay;
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Projects/Scripts/Mobiles/Vendors/NPC/Shipwright.cs
Normal file
49
Projects/Scripts/Mobiles/Vendors/NPC/Shipwright.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Shipwright : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Shipwright() : base("the shipwright")
|
||||
{
|
||||
SetSkill(SkillName.Carpentry, 60.0, 83.0);
|
||||
SetSkill(SkillName.Macing, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Shipwright(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBShipwright());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new SmithHammer());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Projects/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs
Normal file
49
Projects/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.GargoyleStonecrafter")]
|
||||
public class StoneCrafter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public StoneCrafter() : base("the stone crafter")
|
||||
{
|
||||
SetSkill(SkillName.Carpentry, 85.0, 100.0);
|
||||
}
|
||||
|
||||
public StoneCrafter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TinkersGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBStoneCrafter());
|
||||
m_SBInfos.Add(new SBStavesWeapon());
|
||||
m_SBInfos.Add(new SBCarpenter());
|
||||
m_SBInfos.Add(new SBWoodenShields());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Title == "the stonecrafter")
|
||||
Title = "the stone crafter";
|
||||
}
|
||||
}
|
||||
}
|
||||
96
Projects/Scripts/Mobiles/Vendors/NPC/Tailor.cs
Normal file
96
Projects/Scripts/Mobiles/Vendors/NPC/Tailor.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tailor : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Tailor() : base("the tailor")
|
||||
{
|
||||
SetSkill(SkillName.Tailoring, 64.0, 100.0);
|
||||
}
|
||||
|
||||
public Tailor(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TailorsGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTailor());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Bulk Orders
|
||||
|
||||
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
|
||||
{
|
||||
double theirSkill = pm.Skills.Tailoring.Base;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(6.0);
|
||||
else if (theirSkill >= 50.1)
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(2.0);
|
||||
else
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
|
||||
|
||||
if (theirSkill >= 70.1 && (theirSkill - 40.0) / 300.0 > Utility.RandomDouble())
|
||||
return new LargeTailorBOD();
|
||||
|
||||
return SmallTailorBOD.CreateRandomFor(from);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool IsValidBulkOrder(Item item)
|
||||
{
|
||||
return item is SmallTailorBOD || item is LargeTailorBOD;
|
||||
}
|
||||
|
||||
public override bool SupportsBulkOrders(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile && from.Skills.Tailoring.Base > 0;
|
||||
}
|
||||
|
||||
public override TimeSpan GetNextBulkOrder(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile mobile)
|
||||
return mobile.NextTailorBulkOrder;
|
||||
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override void OnSuccessfulBulkOrderReceive(Mobile from)
|
||||
{
|
||||
if (Core.SE && from is PlayerMobile mobile)
|
||||
mobile.NextTailorBulkOrder = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
40
Projects/Scripts/Mobiles/Vendors/NPC/Tanner.cs
Normal file
40
Projects/Scripts/Mobiles/Vendors/NPC/Tanner.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tanner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Tanner() : base("the tanner")
|
||||
{
|
||||
SetSkill(SkillName.Tailoring, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Tanner(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTanner());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Projects/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs
Normal file
47
Projects/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class TavernKeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public TavernKeeper() : base("the tavern keeper")
|
||||
{
|
||||
}
|
||||
|
||||
public TavernKeeper(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTavernKeeper());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Mobiles/Vendors/NPC/Thief.cs
Normal file
56
Projects/Scripts/Mobiles/Vendors/NPC/Thief.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Thief : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Thief() : base("the thief")
|
||||
{
|
||||
SetSkill(SkillName.Camping, 55.0, 78.0);
|
||||
SetSkill(SkillName.DetectHidden, 65.0, 88.0);
|
||||
SetSkill(SkillName.Hiding, 45.0, 68.0);
|
||||
SetSkill(SkillName.Archery, 65.0, 88.0);
|
||||
SetSkill(SkillName.Tracking, 65.0, 88.0);
|
||||
SetSkill(SkillName.Veterinary, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Thief(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBThief());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new Shirt(Utility.RandomNeutralHue()));
|
||||
AddItem(new LongPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new Dagger());
|
||||
AddItem(new ThighBoots(Utility.RandomNeutralHue()));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Projects/Scripts/Mobiles/Vendors/NPC/Tinker.cs
Normal file
44
Projects/Scripts/Mobiles/Vendors/NPC/Tinker.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tinker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Tinker() : base("the tinker")
|
||||
{
|
||||
SetSkill(SkillName.Lockpicking, 60.0, 83.0);
|
||||
SetSkill(SkillName.RemoveTrap, 75.0, 98.0);
|
||||
SetSkill(SkillName.Tinkering, 64.0, 100.0);
|
||||
}
|
||||
|
||||
public Tinker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TinkersGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTinker());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Vendors/NPC/Vagabond.cs
Normal file
68
Projects/Scripts/Mobiles/Vendors/NPC/Vagabond.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Vagabond : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Vagabond() : base("the vagabond")
|
||||
{
|
||||
SetSkill(SkillName.ItemID, 60.0, 83.0);
|
||||
}
|
||||
|
||||
public Vagabond(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBTinker());
|
||||
m_SBInfos.Add(new SBVagabond());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt(Utility.RandomBrightHue()));
|
||||
AddItem(new Shoes(GetShoeHue()));
|
||||
AddItem(new LongPants(GetRandomHue()));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
AddItem(new Cloak(Utility.RandomBrightHue()));
|
||||
|
||||
switch (Utility.Random(2))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new SkullCap(Utility.RandomNeutralHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Bandana(Utility.RandomNeutralHue()));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
PackGold(100, 200);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Projects/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs
Normal file
39
Projects/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class VarietyDealer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public VarietyDealer() : base("the variety dealer")
|
||||
{
|
||||
}
|
||||
|
||||
public VarietyDealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBVarietyDealer());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Projects/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs
Normal file
41
Projects/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Veterinarian : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Veterinarian() : base("the vet")
|
||||
{
|
||||
SetSkill(SkillName.AnimalLore, 85.0, 100.0);
|
||||
SetSkill(SkillName.Veterinary, 90.0, 100.0);
|
||||
}
|
||||
|
||||
public Veterinarian(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBVeterinarian());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Projects/Scripts/Mobiles/Vendors/NPC/Waiter.cs
Normal file
48
Projects/Scripts/Mobiles/Vendors/NPC/Waiter.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Waiter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Waiter() : base("the waiter")
|
||||
{
|
||||
SetSkill(SkillName.Discordance, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Waiter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBWaiter());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Projects/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs
Normal file
115
Projects/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BulkOrders;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Weaponsmith : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Weaponsmith() : base("the weaponsmith")
|
||||
{
|
||||
SetSkill(SkillName.ArmsLore, 64.0, 100.0);
|
||||
SetSkill(SkillName.Blacksmith, 65.0, 88.0);
|
||||
SetSkill(SkillName.Fencing, 45.0, 68.0);
|
||||
SetSkill(SkillName.Macing, 45.0, 68.0);
|
||||
SetSkill(SkillName.Swords, 45.0, 68.0);
|
||||
SetSkill(SkillName.Tactics, 36.0, 68.0);
|
||||
}
|
||||
|
||||
public Weaponsmith(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Boots : VendorShoeType.ThighBoots;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBWeaponSmith());
|
||||
|
||||
if (IsTokunoVendor)
|
||||
m_SBInfos.Add(new SBSEWeapons());
|
||||
}
|
||||
|
||||
public override int GetShoeHue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem(new HalfApron());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Bulk Orders
|
||||
|
||||
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
|
||||
{
|
||||
double theirSkill = pm.Skills.Blacksmith.Base;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
|
||||
else if (theirSkill >= 50.1)
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
|
||||
else
|
||||
pm.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
|
||||
|
||||
if (theirSkill >= 70.1 && (theirSkill - 40.0) / 300.0 > Utility.RandomDouble())
|
||||
return new LargeSmithBOD();
|
||||
|
||||
return SmallSmithBOD.CreateRandomFor(from);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool IsValidBulkOrder(Item item)
|
||||
{
|
||||
return item is SmallSmithBOD || item is LargeSmithBOD;
|
||||
}
|
||||
|
||||
public override bool SupportsBulkOrders(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile && Core.AOS && from.Skills.Blacksmith.Base > 0;
|
||||
}
|
||||
|
||||
public override TimeSpan GetNextBulkOrder(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile mobile)
|
||||
return mobile.NextSmithBulkOrder;
|
||||
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override void OnSuccessfulBulkOrderReceive(Mobile from)
|
||||
{
|
||||
if (Core.SE && from is PlayerMobile mobile)
|
||||
mobile.NextSmithBulkOrder = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
96
Projects/Scripts/Mobiles/Vendors/NPC/Weaver.cs
Normal file
96
Projects/Scripts/Mobiles/Vendors/NPC/Weaver.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Weaver : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Weaver() : base("the weaver")
|
||||
{
|
||||
SetSkill(SkillName.Tailoring, 65.0, 88.0);
|
||||
}
|
||||
|
||||
public Weaver(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.TailorsGuild;
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Sandals;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBWeaver());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Bulk Orders
|
||||
|
||||
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
|
||||
{
|
||||
double theirSkill = pm.Skills.Tailoring.Base;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(6.0);
|
||||
else if (theirSkill >= 50.1)
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(2.0);
|
||||
else
|
||||
pm.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
|
||||
|
||||
if (theirSkill >= 70.1 && (theirSkill - 40.0) / 300.0 > Utility.RandomDouble())
|
||||
return new LargeTailorBOD();
|
||||
|
||||
return SmallTailorBOD.CreateRandomFor(from);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool IsValidBulkOrder(Item item)
|
||||
{
|
||||
return item is SmallTailorBOD || item is LargeTailorBOD;
|
||||
}
|
||||
|
||||
public override bool SupportsBulkOrders(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile && from.Skills.Tailoring.Base > 0;
|
||||
}
|
||||
|
||||
public override TimeSpan GetNextBulkOrder(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile mobile)
|
||||
return mobile.NextTailorBulkOrder;
|
||||
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override void OnSuccessfulBulkOrderReceive(Mobile from)
|
||||
{
|
||||
if (Core.SE && from is PlayerMobile mobile)
|
||||
mobile.NextTailorBulkOrder = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
1052
Projects/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs
Normal file
1052
Projects/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs
Normal file
File diff suppressed because it is too large
Load diff
1584
Projects/Scripts/Mobiles/Vendors/PlayerVendor.cs
Normal file
1584
Projects/Scripts/Mobiles/Vendors/PlayerVendor.cs
Normal file
File diff suppressed because it is too large
Load diff
22
Projects/Scripts/Mobiles/Vendors/PresetMapBuy.cs
Normal file
22
Projects/Scripts/Mobiles/Vendors/PresetMapBuy.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PresetMapBuyInfo : GenericBuyInfo
|
||||
{
|
||||
private PresetMapEntry m_Entry;
|
||||
|
||||
public PresetMapBuyInfo(PresetMapEntry entry, int price, int amount) : base(entry.Name.ToString(), null, price,
|
||||
amount, 0x14EC, 0)
|
||||
{
|
||||
m_Entry = entry;
|
||||
}
|
||||
|
||||
public override bool CanCacheDisplay => false;
|
||||
|
||||
public override IEntity GetEntity()
|
||||
{
|
||||
return new PresetMap(m_Entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
377
Projects/Scripts/Mobiles/Vendors/RentedVendor.cs
Normal file
377
Projects/Scripts/Mobiles/Vendors/RentedVendor.cs
Normal file
|
|
@ -0,0 +1,377 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
using Server.Misc;
|
||||
using Server.Multis;
|
||||
using Server.Prompts;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class VendorRentalDuration
|
||||
{
|
||||
public static readonly VendorRentalDuration[] Instances =
|
||||
{
|
||||
new VendorRentalDuration(TimeSpan.FromDays(7.0), 1062361), // 1 Week
|
||||
new VendorRentalDuration(TimeSpan.FromDays(14.0), 1062362), // 2 Weeks
|
||||
new VendorRentalDuration(TimeSpan.FromDays(21.0), 1062363), // 3 Weeks
|
||||
new VendorRentalDuration(TimeSpan.FromDays(28.0), 1062364) // 1 Month
|
||||
};
|
||||
|
||||
private VendorRentalDuration(TimeSpan duration, int name)
|
||||
{
|
||||
Duration = duration;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public TimeSpan Duration{ get; }
|
||||
|
||||
public int Name{ get; }
|
||||
|
||||
public int ID
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < Instances.Length; i++)
|
||||
if (Instances[i] == this)
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RentedVendor : PlayerVendor
|
||||
{
|
||||
private Timer m_RentalExpireTimer;
|
||||
|
||||
public RentedVendor(Mobile owner, BaseHouse house, VendorRentalDuration duration, int rentalPrice,
|
||||
bool landlordRenew, int rentalGold) : base(owner, house)
|
||||
{
|
||||
RentalDuration = duration;
|
||||
RentalPrice = RenewalPrice = rentalPrice;
|
||||
LandlordRenew = landlordRenew;
|
||||
RenterRenew = false;
|
||||
|
||||
RentalGold = rentalGold;
|
||||
|
||||
RentalExpireTime = DateTime.UtcNow + duration.Duration;
|
||||
m_RentalExpireTimer = new RentalExpireTimer(this, duration.Duration);
|
||||
m_RentalExpireTimer.Start();
|
||||
}
|
||||
|
||||
public RentedVendor(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public VendorRentalDuration RentalDuration{ get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int RentalPrice{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool LandlordRenew{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool RenterRenew{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Renew => LandlordRenew && RenterRenew && House != null && House.DecayType != DecayType.Condemned;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int RenewalPrice{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int RentalGold{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime RentalExpireTime{ get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Landlord => House?.Owner;
|
||||
|
||||
public override bool IsOwner(Mobile m)
|
||||
{
|
||||
return m == Owner || m.AccessLevel >= AccessLevel.GameMaster || Core.ML && AccountHandler.CheckAccount(m, Owner);
|
||||
}
|
||||
|
||||
public bool IsLandlord(Mobile m)
|
||||
{
|
||||
return House?.IsOwner(m) == true;
|
||||
}
|
||||
|
||||
public void ComputeRentalExpireDelay(out int days, out int hours)
|
||||
{
|
||||
TimeSpan delay = RentalExpireTime - DateTime.UtcNow;
|
||||
|
||||
if (delay <= TimeSpan.Zero)
|
||||
{
|
||||
days = 0;
|
||||
hours = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
days = delay.Days;
|
||||
hours = delay.Hours;
|
||||
}
|
||||
}
|
||||
|
||||
public void SendRentalExpireMessage(Mobile to)
|
||||
{
|
||||
ComputeRentalExpireDelay(out int days, out int hours);
|
||||
|
||||
to.SendLocalizedMessage(1062464,
|
||||
days + "\t" +
|
||||
hours); // The rental contract on this vendor will expire in ~1_DAY~ day(s) and ~2_HOUR~ hour(s).
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
m_RentalExpireTimer.Stop();
|
||||
}
|
||||
|
||||
public override void Destroy(bool toBackpack)
|
||||
{
|
||||
if (RentalGold > 0 && House?.IsAosRules == true)
|
||||
{
|
||||
if (House.MovingCrate == null)
|
||||
House.MovingCrate = new MovingCrate(House);
|
||||
|
||||
Banker.Deposit(House.MovingCrate, RentalGold);
|
||||
RentalGold = 0;
|
||||
}
|
||||
|
||||
base.Destroy(toBackpack);
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
if (from.Alive)
|
||||
{
|
||||
if (IsOwner(from))
|
||||
{
|
||||
list.Add(new ContractOptionsEntry(this));
|
||||
}
|
||||
else if (IsLandlord(from))
|
||||
{
|
||||
if (RentalGold > 0)
|
||||
list.Add(new CollectRentEntry(this));
|
||||
|
||||
list.Add(new TerminateContractEntry(this));
|
||||
list.Add(new ContractOptionsEntry(this));
|
||||
}
|
||||
}
|
||||
|
||||
base.GetContextMenuEntries(from, list);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.WriteEncodedInt(RentalDuration.ID);
|
||||
|
||||
writer.Write(RentalPrice);
|
||||
writer.Write(LandlordRenew);
|
||||
writer.Write(RenterRenew);
|
||||
writer.Write(RenewalPrice);
|
||||
|
||||
writer.Write(RentalGold);
|
||||
|
||||
writer.WriteDeltaTime(RentalExpireTime);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
int durationID = reader.ReadEncodedInt();
|
||||
if (durationID < VendorRentalDuration.Instances.Length)
|
||||
RentalDuration = VendorRentalDuration.Instances[durationID];
|
||||
else
|
||||
RentalDuration = VendorRentalDuration.Instances[0];
|
||||
|
||||
RentalPrice = reader.ReadInt();
|
||||
LandlordRenew = reader.ReadBool();
|
||||
RenterRenew = reader.ReadBool();
|
||||
RenewalPrice = reader.ReadInt();
|
||||
|
||||
RentalGold = reader.ReadInt();
|
||||
|
||||
RentalExpireTime = reader.ReadDeltaTime();
|
||||
|
||||
TimeSpan delay = RentalExpireTime - DateTime.UtcNow;
|
||||
m_RentalExpireTimer = new RentalExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
|
||||
m_RentalExpireTimer.Start();
|
||||
}
|
||||
|
||||
private class ContractOptionsEntry : ContextMenuEntry
|
||||
{
|
||||
private RentedVendor m_Vendor;
|
||||
|
||||
public ContractOptionsEntry(RentedVendor vendor) : base(6209)
|
||||
{
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
Mobile from = Owner.From;
|
||||
|
||||
if (m_Vendor.Deleted || !from.CheckAlive())
|
||||
return;
|
||||
|
||||
if (m_Vendor.IsOwner(from))
|
||||
{
|
||||
from.CloseGump<RenterVendorRentalGump>();
|
||||
from.SendGump(new RenterVendorRentalGump(m_Vendor));
|
||||
|
||||
m_Vendor.SendRentalExpireMessage(from);
|
||||
}
|
||||
else if (m_Vendor.IsLandlord(from))
|
||||
{
|
||||
from.CloseGump<LandlordVendorRentalGump>();
|
||||
from.SendGump(new LandlordVendorRentalGump(m_Vendor));
|
||||
|
||||
m_Vendor.SendRentalExpireMessage(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class CollectRentEntry : ContextMenuEntry
|
||||
{
|
||||
private RentedVendor m_Vendor;
|
||||
|
||||
public CollectRentEntry(RentedVendor vendor) : base(6212)
|
||||
{
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
Mobile from = Owner.From;
|
||||
|
||||
if (m_Vendor.Deleted || !from.CheckAlive() || !m_Vendor.IsLandlord(from))
|
||||
return;
|
||||
|
||||
if (m_Vendor.RentalGold > 0)
|
||||
{
|
||||
int depositedGold = Banker.DepositUpTo(from, m_Vendor.RentalGold);
|
||||
m_Vendor.RentalGold -= depositedGold;
|
||||
|
||||
if (depositedGold > 0)
|
||||
from.SendLocalizedMessage(1060397,
|
||||
depositedGold.ToString()); // ~1_AMOUNT~ gold has been deposited into your bank box.
|
||||
|
||||
if (m_Vendor.RentalGold > 0)
|
||||
from.SendLocalizedMessage(500390); // Your bank box is full.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TerminateContractEntry : ContextMenuEntry
|
||||
{
|
||||
private RentedVendor m_Vendor;
|
||||
|
||||
public TerminateContractEntry(RentedVendor vendor) : base(6218)
|
||||
{
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
Mobile from = Owner.From;
|
||||
|
||||
if (m_Vendor.Deleted || !from.CheckAlive() || !m_Vendor.IsLandlord(from))
|
||||
return;
|
||||
|
||||
from.SendLocalizedMessage(
|
||||
1062503); // Enter the amount of gold you wish to offer the renter in exchange for immediate termination of this contract?
|
||||
from.Prompt = new RefundOfferPrompt(m_Vendor);
|
||||
}
|
||||
}
|
||||
|
||||
private class RefundOfferPrompt : Prompt
|
||||
{
|
||||
private RentedVendor m_Vendor;
|
||||
|
||||
public RefundOfferPrompt(RentedVendor vendor)
|
||||
{
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnResponse(Mobile from, string text)
|
||||
{
|
||||
if (!m_Vendor.CanInteractWith(from, false) || !m_Vendor.IsLandlord(from))
|
||||
return;
|
||||
|
||||
text = text.Trim();
|
||||
|
||||
if (!int.TryParse(text, out int amount))
|
||||
amount = -1;
|
||||
|
||||
Mobile owner = m_Vendor.Owner;
|
||||
if (owner == null)
|
||||
return;
|
||||
|
||||
if (amount < 0)
|
||||
{
|
||||
from.SendLocalizedMessage(1062506); // You did not enter a valid amount. Offer canceled.
|
||||
}
|
||||
else if (Banker.GetBalance(from) < amount)
|
||||
{
|
||||
from.SendLocalizedMessage(1062507); // You do not have that much money in your bank account.
|
||||
}
|
||||
else if (owner.Map != m_Vendor.Map || !owner.InRange(m_Vendor, 5))
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1062505); // The renter must be closer to the vendor in order for you to make this offer.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062504); // Please wait while the renter considers your offer.
|
||||
|
||||
owner.CloseGump<VendorRentalRefundGump>();
|
||||
owner.SendGump(new VendorRentalRefundGump(m_Vendor, from, amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class RentalExpireTimer : Timer
|
||||
{
|
||||
private RentedVendor m_Vendor;
|
||||
|
||||
public RentalExpireTimer(RentedVendor vendor, TimeSpan delay) : base(delay, vendor.RentalDuration.Duration)
|
||||
{
|
||||
m_Vendor = vendor;
|
||||
|
||||
Priority = TimerPriority.OneMinute;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
int renewalPrice = m_Vendor.RenewalPrice;
|
||||
|
||||
if (m_Vendor.Renew && m_Vendor.HoldGold >= renewalPrice)
|
||||
{
|
||||
m_Vendor.HoldGold -= renewalPrice;
|
||||
m_Vendor.RentalGold += renewalPrice;
|
||||
|
||||
m_Vendor.RentalPrice = renewalPrice;
|
||||
|
||||
m_Vendor.RentalExpireTime = DateTime.UtcNow + m_Vendor.RentalDuration.Duration;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vendor.Destroy(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBChainmailArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(ChainCoif), 17, 20, 0x13BB, 0));
|
||||
Add(new GenericBuyInfo(typeof(ChainChest), 143, 20, 0x13BF, 0));
|
||||
Add(new GenericBuyInfo(typeof(ChainLegs), 149, 20, 0x13BE, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(ChainCoif), 6);
|
||||
Add(typeof(ChainChest), 71);
|
||||
Add(typeof(ChainLegs), 74);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBHelmetArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(PlateHelm), 21, 20, 0x1412, 0));
|
||||
Add(new GenericBuyInfo(typeof(CloseHelm), 18, 20, 0x1408, 0));
|
||||
Add(new GenericBuyInfo(typeof(CloseHelm), 18, 20, 0x1409, 0));
|
||||
Add(new GenericBuyInfo(typeof(Helmet), 31, 20, 0x140A, 0));
|
||||
Add(new GenericBuyInfo(typeof(Helmet), 18, 20, 0x140B, 0));
|
||||
Add(new GenericBuyInfo(typeof(NorseHelm), 18, 20, 0x140E, 0));
|
||||
Add(new GenericBuyInfo(typeof(NorseHelm), 18, 20, 0x140F, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bascinet), 18, 20, 0x140C, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateHelm), 21, 20, 0x1419, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Bascinet), 9);
|
||||
Add(typeof(CloseHelm), 9);
|
||||
Add(typeof(Helmet), 9);
|
||||
Add(typeof(NorseHelm), 9);
|
||||
Add(typeof(PlateHelm), 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBLeatherArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(LeatherArms), 80, 20, 0x13CD, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherChest), 101, 20, 0x13CC, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherGloves), 60, 20, 0x13C6, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherGorget), 74, 20, 0x13C7, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherLegs), 80, 20, 0x13cb, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherCap), 10, 20, 0x1DB9, 0));
|
||||
Add(new GenericBuyInfo(typeof(FemaleLeatherChest), 116, 20, 0x1C06, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherBustierArms), 97, 20, 0x1C0A, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherShorts), 86, 20, 0x1C00, 0));
|
||||
Add(new GenericBuyInfo(typeof(LeatherSkirt), 87, 20, 0x1C08, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(LeatherArms), 40);
|
||||
Add(typeof(LeatherChest), 52);
|
||||
Add(typeof(LeatherGloves), 30);
|
||||
Add(typeof(LeatherGorget), 37);
|
||||
Add(typeof(LeatherLegs), 40);
|
||||
Add(typeof(LeatherCap), 5);
|
||||
|
||||
Add(typeof(FemaleLeatherChest), 18);
|
||||
Add(typeof(FemaleStuddedChest), 25);
|
||||
Add(typeof(LeatherShorts), 14);
|
||||
Add(typeof(LeatherSkirt), 11);
|
||||
Add(typeof(LeatherBustierArms), 11);
|
||||
Add(typeof(StuddedBustierArms), 27);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBMetalShields : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(BronzeShield), 66, 20, 0x1B72, 0));
|
||||
Add(new GenericBuyInfo(typeof(Buckler), 50, 20, 0x1B73, 0));
|
||||
Add(new GenericBuyInfo(typeof(MetalKiteShield), 123, 20, 0x1B74, 0));
|
||||
Add(new GenericBuyInfo(typeof(HeaterShield), 231, 20, 0x1B76, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenKiteShield), 70, 20, 0x1B78, 0));
|
||||
Add(new GenericBuyInfo(typeof(MetalShield), 121, 20, 0x1B7B, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Buckler), 25);
|
||||
Add(typeof(BronzeShield), 33);
|
||||
Add(typeof(MetalShield), 60);
|
||||
Add(typeof(MetalKiteShield), 62);
|
||||
Add(typeof(HeaterShield), 115);
|
||||
Add(typeof(WoodenKiteShield), 35);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBPlateArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(PlateGorget), 104, 20, 0x1413, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateChest), 243, 20, 0x1415, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateLegs), 218, 20, 0x1411, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateArms), 188, 20, 0x1410, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateGloves), 155, 20, 0x1414, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(PlateArms), 94);
|
||||
Add(typeof(PlateChest), 121);
|
||||
Add(typeof(PlateGloves), 72);
|
||||
Add(typeof(PlateGorget), 52);
|
||||
Add(typeof(PlateLegs), 109);
|
||||
|
||||
Add(typeof(FemalePlateChest), 113);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBRingmailArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(RingmailChest), 121, 20, 0x13ec, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailLegs), 90, 20, 0x13F0, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailArms), 85, 20, 0x13EE, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailGloves), 93, 20, 0x13eb, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(RingmailArms), 42);
|
||||
Add(typeof(RingmailChest), 60);
|
||||
Add(typeof(RingmailGloves), 26);
|
||||
Add(typeof(RingmailLegs), 45);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBStuddedArmor : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(StuddedArms), 87, 20, 0x13DC, 0));
|
||||
Add(new GenericBuyInfo(typeof(StuddedChest), 128, 20, 0x13DB, 0));
|
||||
Add(new GenericBuyInfo(typeof(StuddedGloves), 79, 20, 0x13D5, 0));
|
||||
Add(new GenericBuyInfo(typeof(StuddedGorget), 73, 20, 0x13D6, 0));
|
||||
Add(new GenericBuyInfo(typeof(StuddedLegs), 103, 20, 0x13DA, 0));
|
||||
Add(new GenericBuyInfo(typeof(FemaleStuddedChest), 142, 20, 0x1C02, 0));
|
||||
Add(new GenericBuyInfo(typeof(StuddedBustierArms), 120, 20, 0x1c0c, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(StuddedArms), 43);
|
||||
Add(typeof(StuddedChest), 64);
|
||||
Add(typeof(StuddedGloves), 39);
|
||||
Add(typeof(StuddedGorget), 36);
|
||||
Add(typeof(StuddedLegs), 51);
|
||||
Add(typeof(FemaleStuddedChest), 71);
|
||||
Add(typeof(StuddedBustierArms), 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBWoodenShields : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(WoodenShield), 30, 20, 0x1B7A, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(WoodenShield), 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs
Normal file
69
Projects/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBAlchemist : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(RefreshPotion), 15, 10, 0xF0B, 0));
|
||||
Add(new GenericBuyInfo(typeof(AgilityPotion), 15, 10, 0xF08, 0));
|
||||
Add(new GenericBuyInfo(typeof(NightSightPotion), 15, 10, 0xF06, 0));
|
||||
Add(new GenericBuyInfo(typeof(LesserHealPotion), 15, 10, 0xF0C, 0));
|
||||
Add(new GenericBuyInfo(typeof(StrengthPotion), 15, 10, 0xF09, 0));
|
||||
Add(new GenericBuyInfo(typeof(LesserPoisonPotion), 15, 10, 0xF0A, 0));
|
||||
Add(new GenericBuyInfo(typeof(LesserCurePotion), 15, 10, 0xF07, 0));
|
||||
Add(new GenericBuyInfo(typeof(LesserExplosionPotion), 21, 10, 0xF0D, 0));
|
||||
Add(new GenericBuyInfo(typeof(MortarPestle), 8, 10, 0xE9B, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(BlackPearl), 5, 20, 0xF7A, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bloodmoss), 5, 20, 0xF7B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Garlic), 3, 20, 0xF84, 0));
|
||||
Add(new GenericBuyInfo(typeof(Ginseng), 3, 20, 0xF85, 0));
|
||||
Add(new GenericBuyInfo(typeof(MandrakeRoot), 3, 20, 0xF86, 0));
|
||||
Add(new GenericBuyInfo(typeof(Nightshade), 3, 20, 0xF88, 0));
|
||||
Add(new GenericBuyInfo(typeof(SpidersSilk), 3, 20, 0xF8D, 0));
|
||||
Add(new GenericBuyInfo(typeof(SulfurousAsh), 3, 20, 0xF8C, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(Bottle), 5, 100, 0xF0E, 0));
|
||||
Add(new GenericBuyInfo(typeof(HeatingStand), 2, 100, 0x1849, 0));
|
||||
|
||||
Add(new GenericBuyInfo("1041060", typeof(HairDye), 37, 10, 0xEFF, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(BlackPearl), 3);
|
||||
Add(typeof(Bloodmoss), 3);
|
||||
Add(typeof(MandrakeRoot), 2);
|
||||
Add(typeof(Garlic), 2);
|
||||
Add(typeof(Ginseng), 2);
|
||||
Add(typeof(Nightshade), 2);
|
||||
Add(typeof(SpidersSilk), 2);
|
||||
Add(typeof(SulfurousAsh), 2);
|
||||
Add(typeof(Bottle), 3);
|
||||
Add(typeof(MortarPestle), 4);
|
||||
Add(typeof(HairDye), 19);
|
||||
|
||||
Add(typeof(NightSightPotion), 7);
|
||||
Add(typeof(AgilityPotion), 7);
|
||||
Add(typeof(StrengthPotion), 7);
|
||||
Add(typeof(RefreshPotion), 7);
|
||||
Add(typeof(LesserCurePotion), 7);
|
||||
Add(typeof(LesserHealPotion), 7);
|
||||
Add(typeof(LesserPoisonPotion), 7);
|
||||
Add(typeof(LesserExplosionPotion), 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Projects/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs
Normal file
38
Projects/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBAnimalTrainer : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new AnimalBuyInfo(1, typeof(Cat), 132, 10, 201, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(Dog), 170, 10, 217, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(Horse), 550, 10, 204, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(PackHorse), 631, 10, 291, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(PackLlama), 565, 10, 292, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(Rabbit), 106, 10, 205, 0));
|
||||
|
||||
if (!Core.AOS)
|
||||
{
|
||||
Add(new AnimalBuyInfo(1, typeof(Eagle), 402, 10, 5, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(BrownBear), 855, 10, 167, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(GrizzlyBear), 1767, 10, 212, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(Panther), 1271, 10, 214, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(TimberWolf), 768, 10, 225, 0));
|
||||
Add(new AnimalBuyInfo(1, typeof(Rat), 107, 10, 238, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Projects/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs
Normal file
33
Projects/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBArchitect : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo("1041280", typeof(InteriorDecorator), 10001, 20, 0xFC1, 0));
|
||||
if (Core.AOS)
|
||||
Add(new GenericBuyInfo("1060651", typeof(HousePlacementTool), 627, 20, 0x14F6, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(InteriorDecorator), 5000);
|
||||
|
||||
if (Core.AOS)
|
||||
Add(typeof(HousePlacementTool), 301);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs
Normal file
51
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBaker : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(BreadLoaf), 6, 20, 0x103B, 0));
|
||||
Add(new GenericBuyInfo(typeof(BreadLoaf), 5, 20, 0x103C, 0));
|
||||
Add(new GenericBuyInfo(typeof(ApplePie), 7, 20, 0x1041, 0)); //OSI just has Pie, not Apple/Fruit/Meat
|
||||
Add(new GenericBuyInfo(typeof(Cake), 13, 20, 0x9E9, 0));
|
||||
Add(new GenericBuyInfo(typeof(Muffins), 3, 20, 0x9EA, 0));
|
||||
Add(new GenericBuyInfo(typeof(SackFlour), 3, 20, 0x1039, 0));
|
||||
Add(new GenericBuyInfo(typeof(FrenchBread), 5, 20, 0x98C, 0));
|
||||
Add(new GenericBuyInfo(typeof(Cookies), 3, 20, 0x160b, 0));
|
||||
Add(new GenericBuyInfo(typeof(CheesePizza), 8, 10, 0x1040, 0)); // OSI just has Pizza
|
||||
Add(new GenericBuyInfo(typeof(JarHoney), 3, 20, 0x9ec, 0));
|
||||
Add(new GenericBuyInfo(typeof(BowlFlour), 7, 20, 0xA1E, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(BreadLoaf), 3);
|
||||
Add(typeof(FrenchBread), 1);
|
||||
Add(typeof(Cake), 5);
|
||||
Add(typeof(Cookies), 3);
|
||||
Add(typeof(Muffins), 2);
|
||||
Add(typeof(CheesePizza), 4);
|
||||
Add(typeof(ApplePie), 5);
|
||||
Add(typeof(PeachCobbler), 5);
|
||||
Add(typeof(Quiche), 6);
|
||||
Add(typeof(Dough), 4);
|
||||
Add(typeof(JarHoney), 1);
|
||||
Add(typeof(Pitcher), 5);
|
||||
Add(typeof(SackFlour), 1);
|
||||
Add(typeof(Eggs), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs
Normal file
29
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBanker : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo("1041243", typeof(ContractOfEmployment), 1252, 20, 0x14F0, 0));
|
||||
|
||||
if (BaseHouse.NewVendorSystem)
|
||||
Add(new GenericBuyInfo("1062332", typeof(VendorRentalContract), 1252, 20, 0x14F0, 0x672));
|
||||
Add(new GenericBuyInfo("1047016", typeof(CommodityDeed), 5, 20, 0x14F0, 0x47));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs
Normal file
35
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBard : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Drums), 21, 10, 0x0E9C, 0));
|
||||
Add(new GenericBuyInfo(typeof(Tambourine), 21, 10, 0x0E9E, 0));
|
||||
Add(new GenericBuyInfo(typeof(LapHarp), 21, 10, 0x0EB2, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lute), 21, 10, 0x0EB3, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(LapHarp), 10);
|
||||
Add(typeof(Lute), 10);
|
||||
Add(typeof(Drums), 10);
|
||||
Add(typeof(Harp), 10);
|
||||
Add(typeof(Tambourine), 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
103
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs
Normal file
103
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBarkeeper : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Ale, 7, 20, 0x99F, 0));
|
||||
Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Wine, 7, 20, 0x9C7, 0));
|
||||
Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Liquor, 7, 20, 0x99B, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Jug), BeverageType.Cider, 13, 20, 0x9C8, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Milk, 7, 20, 0x9F0, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Ale, 11, 20, 0x1F95, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Cider, 11, 20, 0x1F97, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Liquor, 11, 20, 0x1F99, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Wine, 11, 20, 0x1F9B, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Water, 11, 20, 0x1F9D, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(BreadLoaf), 6, 10, 0x103B, 0));
|
||||
Add(new GenericBuyInfo(typeof(CheeseWheel), 21, 10, 0x97E, 0));
|
||||
Add(new GenericBuyInfo(typeof(CookedBird), 17, 20, 0x9B7, 0));
|
||||
Add(new GenericBuyInfo(typeof(LambLeg), 8, 20, 0x160A, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfCarrots), 3, 20, 0x15F9, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfCorn), 3, 20, 0x15FA, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfLettuce), 3, 20, 0x15FB, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfPeas), 3, 20, 0x15FC, 0));
|
||||
Add(new GenericBuyInfo(typeof(EmptyPewterBowl), 2, 20, 0x15FD, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfCorn), 3, 20, 0x15FE, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfLettuce), 3, 20, 0x15FF, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfPeas), 3, 20, 0x1600, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfPotatos), 3, 20, 0x1601, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfStew), 3, 20, 0x1604, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfTomatoSoup), 3, 20, 0x1606, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(ApplePie), 7, 20, 0x1041, 0)); //OSI just has Pie, not Apple/Fruit/Meat
|
||||
|
||||
Add(new GenericBuyInfo("1016450", typeof(Chessboard), 2, 20, 0xFA6, 0));
|
||||
Add(new GenericBuyInfo("1016449", typeof(CheckerBoard), 2, 20, 0xFA6, 0));
|
||||
Add(new GenericBuyInfo(typeof(Backgammon), 2, 20, 0xE1C, 0));
|
||||
Add(new GenericBuyInfo(typeof(Dices), 2, 20, 0xFA7, 0));
|
||||
Add(new GenericBuyInfo("1041243", typeof(ContractOfEmployment), 1252, 20, 0x14F0, 0));
|
||||
Add(new GenericBuyInfo("a barkeep contract", typeof(BarkeepContract), 1252, 20, 0x14F0, 0));
|
||||
if (BaseHouse.NewVendorSystem)
|
||||
Add(new GenericBuyInfo("1062332", typeof(VendorRentalContract), 1252, 20, 0x14F0, 0x672));
|
||||
|
||||
/*if ( Map == Tokuno )
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( Wasabi ), 2, 20, 0x24E8, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Wasabi ), 2, 20, 0x24E9, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( BentoBox ), 6, 20, 0x2836, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( BentoBox ), 6, 20, 0x2837, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( GreenTeaBasket ), 2, 20, 0x284B, 0 ) );
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(WoodenBowlOfCarrots), 1);
|
||||
Add(typeof(WoodenBowlOfCorn), 1);
|
||||
Add(typeof(WoodenBowlOfLettuce), 1);
|
||||
Add(typeof(WoodenBowlOfPeas), 1);
|
||||
Add(typeof(EmptyPewterBowl), 1);
|
||||
Add(typeof(PewterBowlOfCorn), 1);
|
||||
Add(typeof(PewterBowlOfLettuce), 1);
|
||||
Add(typeof(PewterBowlOfPeas), 1);
|
||||
Add(typeof(PewterBowlOfPotatos), 1);
|
||||
Add(typeof(WoodenBowlOfStew), 1);
|
||||
Add(typeof(WoodenBowlOfTomatoSoup), 1);
|
||||
Add(typeof(BeverageBottle), 3);
|
||||
Add(typeof(Jug), 6);
|
||||
Add(typeof(Pitcher), 5);
|
||||
Add(typeof(GlassMug), 1);
|
||||
Add(typeof(BreadLoaf), 3);
|
||||
Add(typeof(CheeseWheel), 12);
|
||||
Add(typeof(Ribs), 6);
|
||||
Add(typeof(Peach), 1);
|
||||
Add(typeof(Pear), 1);
|
||||
Add(typeof(Grapes), 1);
|
||||
Add(typeof(Apple), 1);
|
||||
Add(typeof(Banana), 1);
|
||||
Add(typeof(Candle), 3);
|
||||
Add(typeof(Chessboard), 1);
|
||||
Add(typeof(CheckerBoard), 1);
|
||||
Add(typeof(Backgammon), 1);
|
||||
Add(typeof(Dices), 1);
|
||||
Add(typeof(ContractOfEmployment), 626);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs
Normal file
30
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBeekeeper : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(JarHoney), 3, 20, 0x9EC, 0));
|
||||
Add(new GenericBuyInfo(typeof(Beeswax), 2, 20, 0x1422, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(JarHoney), 1);
|
||||
Add(typeof(Beeswax), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
225
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs
Normal file
225
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBlacksmith : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(IronIngot), 5, 16, 0x1BF2, 0));
|
||||
Add(new GenericBuyInfo(typeof(Tongs), 13, 14, 0xFBB, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(BronzeShield), 66, 20, 0x1B72, 0));
|
||||
Add(new GenericBuyInfo(typeof(Buckler), 50, 20, 0x1B73, 0));
|
||||
Add(new GenericBuyInfo(typeof(MetalKiteShield), 123, 20, 0x1B74, 0));
|
||||
Add(new GenericBuyInfo(typeof(HeaterShield), 231, 20, 0x1B76, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenKiteShield), 70, 20, 0x1B78, 0));
|
||||
Add(new GenericBuyInfo(typeof(MetalShield), 121, 20, 0x1B7B, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(WoodenShield), 30, 20, 0x1B7A, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(PlateGorget), 104, 20, 0x1413, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateChest), 243, 20, 0x1415, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateLegs), 218, 20, 0x1411, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateArms), 188, 20, 0x1410, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateGloves), 155, 20, 0x1414, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(PlateHelm), 21, 20, 0x1412, 0));
|
||||
Add(new GenericBuyInfo(typeof(CloseHelm), 18, 20, 0x1408, 0));
|
||||
Add(new GenericBuyInfo(typeof(CloseHelm), 18, 20, 0x1409, 0));
|
||||
Add(new GenericBuyInfo(typeof(Helmet), 31, 20, 0x140A, 0));
|
||||
Add(new GenericBuyInfo(typeof(Helmet), 18, 20, 0x140B, 0));
|
||||
Add(new GenericBuyInfo(typeof(NorseHelm), 18, 20, 0x140E, 0));
|
||||
Add(new GenericBuyInfo(typeof(NorseHelm), 18, 20, 0x140F, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bascinet), 18, 20, 0x140C, 0));
|
||||
Add(new GenericBuyInfo(typeof(PlateHelm), 21, 20, 0x1419, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(ChainCoif), 17, 20, 0x13BB, 0));
|
||||
Add(new GenericBuyInfo(typeof(ChainChest), 143, 20, 0x13BF, 0));
|
||||
Add(new GenericBuyInfo(typeof(ChainLegs), 149, 20, 0x13BE, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(RingmailChest), 121, 20, 0x13ec, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailLegs), 90, 20, 0x13F0, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailArms), 85, 20, 0x13EE, 0));
|
||||
Add(new GenericBuyInfo(typeof(RingmailGloves), 93, 20, 0x13eb, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(ExecutionersAxe), 30, 20, 0xF45, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bardiche), 60, 20, 0xF4D, 0));
|
||||
Add(new GenericBuyInfo(typeof(BattleAxe), 26, 20, 0xF47, 0));
|
||||
Add(new GenericBuyInfo(typeof(TwoHandedAxe), 32, 20, 0x1443, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bow), 35, 20, 0x13B2, 0));
|
||||
Add(new GenericBuyInfo(typeof(ButcherKnife), 14, 20, 0x13F6, 0));
|
||||
Add(new GenericBuyInfo(typeof(Crossbow), 46, 20, 0xF50, 0));
|
||||
Add(new GenericBuyInfo(typeof(HeavyCrossbow), 55, 20, 0x13FD, 0));
|
||||
Add(new GenericBuyInfo(typeof(Cutlass), 24, 20, 0x1441, 0));
|
||||
Add(new GenericBuyInfo(typeof(Dagger), 21, 20, 0xF52, 0));
|
||||
Add(new GenericBuyInfo(typeof(Halberd), 42, 20, 0x143E, 0));
|
||||
Add(new GenericBuyInfo(typeof(HammerPick), 26, 20, 0x143D, 0));
|
||||
Add(new GenericBuyInfo(typeof(Katana), 33, 20, 0x13FF, 0));
|
||||
Add(new GenericBuyInfo(typeof(Kryss), 32, 20, 0x1401, 0));
|
||||
Add(new GenericBuyInfo(typeof(Broadsword), 35, 20, 0xF5E, 0));
|
||||
Add(new GenericBuyInfo(typeof(Longsword), 55, 20, 0xF61, 0));
|
||||
Add(new GenericBuyInfo(typeof(ThinLongsword), 27, 20, 0x13B8, 0));
|
||||
Add(new GenericBuyInfo(typeof(VikingSword), 55, 20, 0x13B9, 0));
|
||||
Add(new GenericBuyInfo(typeof(Cleaver), 15, 20, 0xEC3, 0));
|
||||
Add(new GenericBuyInfo(typeof(Axe), 40, 20, 0xF49, 0));
|
||||
Add(new GenericBuyInfo(typeof(DoubleAxe), 52, 20, 0xF4B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Pickaxe), 22, 20, 0xE86, 0));
|
||||
Add(new GenericBuyInfo(typeof(Pitchfork), 19, 20, 0xE87, 0));
|
||||
Add(new GenericBuyInfo(typeof(Scimitar), 36, 20, 0x13B6, 0));
|
||||
Add(new GenericBuyInfo(typeof(SkinningKnife), 14, 20, 0xEC4, 0));
|
||||
Add(new GenericBuyInfo(typeof(LargeBattleAxe), 33, 20, 0x13FB, 0));
|
||||
Add(new GenericBuyInfo(typeof(WarAxe), 29, 20, 0x13B0, 0));
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(BoneHarvester), 35, 20, 0x26BB, 0));
|
||||
Add(new GenericBuyInfo(typeof(CrescentBlade), 37, 20, 0x26C1, 0));
|
||||
Add(new GenericBuyInfo(typeof(DoubleBladedStaff), 35, 20, 0x26BF, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lance), 34, 20, 0x26C0, 0));
|
||||
Add(new GenericBuyInfo(typeof(Pike), 39, 20, 0x26BE, 0));
|
||||
Add(new GenericBuyInfo(typeof(Scythe), 39, 20, 0x26BA, 0));
|
||||
Add(new GenericBuyInfo(typeof(CompositeBow), 50, 20, 0x26C2, 0));
|
||||
Add(new GenericBuyInfo(typeof(RepeatingCrossbow), 57, 20, 0x26C3, 0));
|
||||
}
|
||||
|
||||
Add(new GenericBuyInfo(typeof(BlackStaff), 22, 20, 0xDF1, 0));
|
||||
Add(new GenericBuyInfo(typeof(Club), 16, 20, 0x13B4, 0));
|
||||
Add(new GenericBuyInfo(typeof(GnarledStaff), 16, 20, 0x13F8, 0));
|
||||
Add(new GenericBuyInfo(typeof(Mace), 28, 20, 0xF5C, 0));
|
||||
Add(new GenericBuyInfo(typeof(Maul), 21, 20, 0x143B, 0));
|
||||
Add(new GenericBuyInfo(typeof(QuarterStaff), 19, 20, 0xE89, 0));
|
||||
Add(new GenericBuyInfo(typeof(ShepherdsCrook), 20, 20, 0xE81, 0));
|
||||
Add(new GenericBuyInfo(typeof(SmithHammer), 21, 20, 0x13E3, 0));
|
||||
Add(new GenericBuyInfo(typeof(ShortSpear), 23, 20, 0x1403, 0));
|
||||
Add(new GenericBuyInfo(typeof(Spear), 31, 20, 0xF62, 0));
|
||||
Add(new GenericBuyInfo(typeof(WarHammer), 25, 20, 0x1439, 0));
|
||||
Add(new GenericBuyInfo(typeof(WarMace), 31, 20, 0x1407, 0));
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Scepter), 39, 20, 0x26BC, 0));
|
||||
Add(new GenericBuyInfo(typeof(BladedStaff), 40, 20, 0x26BD, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Tongs), 7);
|
||||
Add(typeof(IronIngot), 4);
|
||||
|
||||
Add(typeof(Buckler), 25);
|
||||
Add(typeof(BronzeShield), 33);
|
||||
Add(typeof(MetalShield), 60);
|
||||
Add(typeof(MetalKiteShield), 62);
|
||||
Add(typeof(HeaterShield), 115);
|
||||
Add(typeof(WoodenKiteShield), 35);
|
||||
|
||||
Add(typeof(WoodenShield), 15);
|
||||
|
||||
Add(typeof(PlateArms), 94);
|
||||
Add(typeof(PlateChest), 121);
|
||||
Add(typeof(PlateGloves), 72);
|
||||
Add(typeof(PlateGorget), 52);
|
||||
Add(typeof(PlateLegs), 109);
|
||||
|
||||
Add(typeof(FemalePlateChest), 113);
|
||||
Add(typeof(FemaleLeatherChest), 18);
|
||||
Add(typeof(FemaleStuddedChest), 25);
|
||||
Add(typeof(LeatherShorts), 14);
|
||||
Add(typeof(LeatherSkirt), 11);
|
||||
Add(typeof(LeatherBustierArms), 11);
|
||||
Add(typeof(StuddedBustierArms), 27);
|
||||
|
||||
Add(typeof(Bascinet), 9);
|
||||
Add(typeof(CloseHelm), 9);
|
||||
Add(typeof(Helmet), 9);
|
||||
Add(typeof(NorseHelm), 9);
|
||||
Add(typeof(PlateHelm), 10);
|
||||
|
||||
Add(typeof(ChainCoif), 6);
|
||||
Add(typeof(ChainChest), 71);
|
||||
Add(typeof(ChainLegs), 74);
|
||||
|
||||
Add(typeof(RingmailArms), 42);
|
||||
Add(typeof(RingmailChest), 60);
|
||||
Add(typeof(RingmailGloves), 26);
|
||||
Add(typeof(RingmailLegs), 45);
|
||||
|
||||
Add(typeof(BattleAxe), 13);
|
||||
Add(typeof(DoubleAxe), 26);
|
||||
Add(typeof(ExecutionersAxe), 15);
|
||||
Add(typeof(LargeBattleAxe), 16);
|
||||
Add(typeof(Pickaxe), 11);
|
||||
Add(typeof(TwoHandedAxe), 16);
|
||||
Add(typeof(WarAxe), 14);
|
||||
Add(typeof(Axe), 20);
|
||||
|
||||
Add(typeof(Bardiche), 30);
|
||||
Add(typeof(Halberd), 21);
|
||||
|
||||
Add(typeof(ButcherKnife), 7);
|
||||
Add(typeof(Cleaver), 7);
|
||||
Add(typeof(Dagger), 10);
|
||||
Add(typeof(SkinningKnife), 7);
|
||||
|
||||
Add(typeof(Club), 8);
|
||||
Add(typeof(HammerPick), 13);
|
||||
Add(typeof(Mace), 14);
|
||||
Add(typeof(Maul), 10);
|
||||
Add(typeof(WarHammer), 12);
|
||||
Add(typeof(WarMace), 15);
|
||||
|
||||
Add(typeof(HeavyCrossbow), 27);
|
||||
Add(typeof(Bow), 17);
|
||||
Add(typeof(Crossbow), 23);
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
Add(typeof(CompositeBow), 25);
|
||||
Add(typeof(RepeatingCrossbow), 28);
|
||||
Add(typeof(Scepter), 20);
|
||||
Add(typeof(BladedStaff), 20);
|
||||
Add(typeof(Scythe), 19);
|
||||
Add(typeof(BoneHarvester), 17);
|
||||
Add(typeof(Scepter), 18);
|
||||
Add(typeof(BladedStaff), 16);
|
||||
Add(typeof(Pike), 19);
|
||||
Add(typeof(DoubleBladedStaff), 17);
|
||||
Add(typeof(Lance), 17);
|
||||
Add(typeof(CrescentBlade), 18);
|
||||
}
|
||||
|
||||
Add(typeof(Spear), 15);
|
||||
Add(typeof(Pitchfork), 9);
|
||||
Add(typeof(ShortSpear), 11);
|
||||
|
||||
Add(typeof(BlackStaff), 11);
|
||||
Add(typeof(GnarledStaff), 8);
|
||||
Add(typeof(QuarterStaff), 9);
|
||||
Add(typeof(ShepherdsCrook), 10);
|
||||
|
||||
Add(typeof(SmithHammer), 10);
|
||||
|
||||
Add(typeof(Broadsword), 17);
|
||||
Add(typeof(Cutlass), 12);
|
||||
Add(typeof(Katana), 16);
|
||||
Add(typeof(Kryss), 16);
|
||||
Add(typeof(Longsword), 27);
|
||||
Add(typeof(Scimitar), 18);
|
||||
Add(typeof(ThinLongsword), 13);
|
||||
Add(typeof(VikingSword), 27);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs
Normal file
28
Projects/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBBowyer : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(FletcherTools), 2, 20, 0x1022, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(FletcherTools), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Projects/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs
Normal file
46
Projects/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBButcher : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Bacon), 7, 20, 0x979, 0));
|
||||
Add(new GenericBuyInfo(typeof(Ham), 26, 20, 0x9C9, 0));
|
||||
Add(new GenericBuyInfo(typeof(Sausage), 18, 20, 0x9C0, 0));
|
||||
Add(new GenericBuyInfo(typeof(RawChickenLeg), 6, 20, 0x1607, 0));
|
||||
Add(new GenericBuyInfo(typeof(RawBird), 9, 20, 0x9B9, 0));
|
||||
Add(new GenericBuyInfo(typeof(RawLambLeg), 9, 20, 0x1609, 0));
|
||||
Add(new GenericBuyInfo(typeof(RawRibs), 16, 20, 0x9F1, 0));
|
||||
Add(new GenericBuyInfo(typeof(ButcherKnife), 13, 20, 0x13F6, 0));
|
||||
Add(new GenericBuyInfo(typeof(Cleaver), 13, 20, 0xEC3, 0));
|
||||
Add(new GenericBuyInfo(typeof(SkinningKnife), 13, 20, 0xEC4, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(RawRibs), 8);
|
||||
Add(typeof(RawLambLeg), 4);
|
||||
Add(typeof(RawChickenLeg), 3);
|
||||
Add(typeof(RawBird), 4);
|
||||
Add(typeof(Bacon), 3);
|
||||
Add(typeof(Sausage), 9);
|
||||
Add(typeof(Ham), 13);
|
||||
Add(typeof(ButcherKnife), 7);
|
||||
Add(typeof(Cleaver), 7);
|
||||
Add(typeof(SkinningKnife), 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
85
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs
Normal file
85
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBCarpenter : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Nails), 3, 20, 0x102E, 0));
|
||||
Add(new GenericBuyInfo(typeof(Axle), 2, 20, 0x105B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Board), 3, 20, 0x1BD7, 0));
|
||||
Add(new GenericBuyInfo(typeof(DrawKnife), 10, 20, 0x10E4, 0));
|
||||
Add(new GenericBuyInfo(typeof(Froe), 10, 20, 0x10E5, 0));
|
||||
Add(new GenericBuyInfo(typeof(Scorp), 10, 20, 0x10E7, 0));
|
||||
Add(new GenericBuyInfo(typeof(Inshave), 10, 20, 0x10E6, 0));
|
||||
Add(new GenericBuyInfo(typeof(DovetailSaw), 12, 20, 0x1028, 0));
|
||||
Add(new GenericBuyInfo(typeof(Saw), 15, 20, 0x1034, 0));
|
||||
Add(new GenericBuyInfo(typeof(Hammer), 17, 20, 0x102A, 0));
|
||||
Add(new GenericBuyInfo(typeof(MouldingPlane), 11, 20, 0x102C, 0));
|
||||
Add(new GenericBuyInfo(typeof(SmoothingPlane), 10, 20, 0x1032, 0));
|
||||
Add(new GenericBuyInfo(typeof(JointingPlane), 11, 20, 0x1030, 0));
|
||||
Add(new GenericBuyInfo(typeof(Drums), 21, 20, 0xE9C, 0));
|
||||
Add(new GenericBuyInfo(typeof(Tambourine), 21, 20, 0xE9D, 0));
|
||||
Add(new GenericBuyInfo(typeof(LapHarp), 21, 20, 0xEB2, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lute), 21, 20, 0xEB3, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(WoodenBox), 7);
|
||||
Add(typeof(SmallCrate), 5);
|
||||
Add(typeof(MediumCrate), 6);
|
||||
Add(typeof(LargeCrate), 7);
|
||||
Add(typeof(WoodenChest), 15);
|
||||
|
||||
Add(typeof(LargeTable), 10);
|
||||
Add(typeof(Nightstand), 7);
|
||||
Add(typeof(YewWoodTable), 10);
|
||||
|
||||
Add(typeof(Throne), 24);
|
||||
Add(typeof(WoodenThrone), 6);
|
||||
Add(typeof(Stool), 6);
|
||||
Add(typeof(FootStool), 6);
|
||||
|
||||
Add(typeof(FancyWoodenChairCushion), 12);
|
||||
Add(typeof(WoodenChairCushion), 10);
|
||||
Add(typeof(WoodenChair), 8);
|
||||
Add(typeof(BambooChair), 6);
|
||||
Add(typeof(WoodenBench), 6);
|
||||
|
||||
Add(typeof(Saw), 9);
|
||||
Add(typeof(Scorp), 6);
|
||||
Add(typeof(SmoothingPlane), 6);
|
||||
Add(typeof(DrawKnife), 6);
|
||||
Add(typeof(Froe), 6);
|
||||
Add(typeof(Hammer), 14);
|
||||
Add(typeof(Inshave), 6);
|
||||
Add(typeof(JointingPlane), 6);
|
||||
Add(typeof(MouldingPlane), 6);
|
||||
Add(typeof(DovetailSaw), 7);
|
||||
Add(typeof(Board), 2);
|
||||
Add(typeof(Axle), 1);
|
||||
|
||||
Add(typeof(Club), 13);
|
||||
|
||||
Add(typeof(Lute), 10);
|
||||
Add(typeof(LapHarp), 10);
|
||||
Add(typeof(Tambourine), 10);
|
||||
Add(typeof(Drums), 10);
|
||||
|
||||
Add(typeof(Log), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs
Normal file
34
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBCobbler : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(ThighBoots), 15, 20, 0x1711, Utility.RandomNeutralHue()));
|
||||
Add(new GenericBuyInfo(typeof(Shoes), 8, 20, 0x170f, Utility.RandomNeutralHue()));
|
||||
Add(new GenericBuyInfo(typeof(Boots), 10, 20, 0x170b, Utility.RandomNeutralHue()));
|
||||
Add(new GenericBuyInfo(typeof(Sandals), 5, 20, 0x170d, Utility.RandomNeutralHue()));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Shoes), 4);
|
||||
Add(typeof(Boots), 5);
|
||||
Add(typeof(ThighBoots), 7);
|
||||
Add(typeof(Sandals), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs
Normal file
81
Projects/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBCook : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(BreadLoaf), 5, 20, 0x103B, 0));
|
||||
Add(new GenericBuyInfo(typeof(BreadLoaf), 5, 20, 0x103C, 0));
|
||||
Add(new GenericBuyInfo(typeof(ApplePie), 7, 20, 0x1041, 0)); //OSI just has Pie, not Apple/Fruit/Meat
|
||||
Add(new GenericBuyInfo(typeof(Cake), 13, 20, 0x9E9, 0));
|
||||
Add(new GenericBuyInfo(typeof(Muffins), 3, 20, 0x9EA, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(CheeseWheel), 21, 10, 0x97E, 0));
|
||||
Add(new GenericBuyInfo(typeof(CookedBird), 17, 20, 0x9B7, 0));
|
||||
Add(new GenericBuyInfo(typeof(LambLeg), 8, 20, 0x160A, 0));
|
||||
Add(new GenericBuyInfo(typeof(ChickenLeg), 5, 20, 0x1608, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfCarrots), 3, 20, 0x15F9, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfCorn), 3, 20, 0x15FA, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfLettuce), 3, 20, 0x15FB, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfPeas), 3, 20, 0x15FC, 0));
|
||||
Add(new GenericBuyInfo(typeof(EmptyPewterBowl), 2, 20, 0x15FD, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfCorn), 3, 20, 0x15FE, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfLettuce), 3, 20, 0x15FF, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfPeas), 3, 20, 0x1600, 0));
|
||||
Add(new GenericBuyInfo(typeof(PewterBowlOfPotatos), 3, 20, 0x1601, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfStew), 3, 20, 0x1604, 0));
|
||||
Add(new GenericBuyInfo(typeof(WoodenBowlOfTomatoSoup), 3, 20, 0x1606, 0));
|
||||
|
||||
Add(new GenericBuyInfo(typeof(RoastPig), 106, 20, 0x9BB, 0));
|
||||
Add(new GenericBuyInfo(typeof(SackFlour), 3, 20, 0x1039, 0));
|
||||
Add(new GenericBuyInfo(typeof(JarHoney), 3, 20, 0x9EC, 0));
|
||||
Add(new GenericBuyInfo(typeof(RollingPin), 2, 20, 0x1043, 0));
|
||||
Add(new GenericBuyInfo(typeof(FlourSifter), 2, 20, 0x103E, 0));
|
||||
Add(new GenericBuyInfo("1044567", typeof(Skillet), 3, 20, 0x97F, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(CheeseWheel), 12);
|
||||
Add(typeof(CookedBird), 8);
|
||||
Add(typeof(RoastPig), 53);
|
||||
Add(typeof(Cake), 5);
|
||||
Add(typeof(JarHoney), 1);
|
||||
Add(typeof(SackFlour), 1);
|
||||
Add(typeof(BreadLoaf), 2);
|
||||
Add(typeof(ChickenLeg), 3);
|
||||
Add(typeof(LambLeg), 4);
|
||||
Add(typeof(Skillet), 1);
|
||||
Add(typeof(FlourSifter), 1);
|
||||
Add(typeof(RollingPin), 1);
|
||||
Add(typeof(Muffins), 1);
|
||||
Add(typeof(ApplePie), 3);
|
||||
|
||||
Add(typeof(WoodenBowlOfCarrots), 1);
|
||||
Add(typeof(WoodenBowlOfCorn), 1);
|
||||
Add(typeof(WoodenBowlOfLettuce), 1);
|
||||
Add(typeof(WoodenBowlOfPeas), 1);
|
||||
Add(typeof(EmptyPewterBowl), 1);
|
||||
Add(typeof(PewterBowlOfCorn), 1);
|
||||
Add(typeof(PewterBowlOfLettuce), 1);
|
||||
Add(typeof(PewterBowlOfPeas), 1);
|
||||
Add(typeof(PewterBowlOfPotatos), 1);
|
||||
Add(typeof(WoodenBowlOfStew), 1);
|
||||
Add(typeof(WoodenBowlOfTomatoSoup), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs
Normal file
68
Projects/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBFarmer : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Cabbage), 5, 20, 0xC7B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Cantaloupe), 6, 20, 0xC79, 0));
|
||||
Add(new GenericBuyInfo(typeof(Carrot), 3, 20, 0xC78, 0));
|
||||
Add(new GenericBuyInfo(typeof(HoneydewMelon), 7, 20, 0xC74, 0));
|
||||
Add(new GenericBuyInfo(typeof(Squash), 3, 20, 0xC72, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lettuce), 5, 20, 0xC70, 0));
|
||||
Add(new GenericBuyInfo(typeof(Onion), 3, 20, 0xC6D, 0));
|
||||
Add(new GenericBuyInfo(typeof(Pumpkin), 11, 20, 0xC6A, 0));
|
||||
Add(new GenericBuyInfo(typeof(GreenGourd), 3, 20, 0xC66, 0));
|
||||
Add(new GenericBuyInfo(typeof(YellowGourd), 3, 20, 0xC64, 0));
|
||||
//Add( new GenericBuyInfo( typeof( Turnip ), 6, 20, XXXXXX, 0 ) );
|
||||
Add(new GenericBuyInfo(typeof(Watermelon), 7, 20, 0xC5C, 0));
|
||||
//Add( new GenericBuyInfo( typeof( EarOfCorn ), 3, 20, XXXXXX, 0 ) );
|
||||
Add(new GenericBuyInfo(typeof(Eggs), 3, 20, 0x9B5, 0));
|
||||
Add(new BeverageBuyInfo(typeof(Pitcher), BeverageType.Milk, 7, 20, 0x9AD, 0));
|
||||
Add(new GenericBuyInfo(typeof(Peach), 3, 20, 0x9D2, 0));
|
||||
Add(new GenericBuyInfo(typeof(Pear), 3, 20, 0x994, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lemon), 3, 20, 0x1728, 0));
|
||||
Add(new GenericBuyInfo(typeof(Lime), 3, 20, 0x172A, 0));
|
||||
Add(new GenericBuyInfo(typeof(Grapes), 3, 20, 0x9D1, 0));
|
||||
Add(new GenericBuyInfo(typeof(Apple), 3, 20, 0x9D0, 0));
|
||||
Add(new GenericBuyInfo(typeof(SheafOfHay), 2, 20, 0xF36, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Pitcher), 5);
|
||||
Add(typeof(Eggs), 1);
|
||||
Add(typeof(Apple), 1);
|
||||
Add(typeof(Grapes), 1);
|
||||
Add(typeof(Watermelon), 3);
|
||||
Add(typeof(YellowGourd), 1);
|
||||
Add(typeof(GreenGourd), 1);
|
||||
Add(typeof(Pumpkin), 5);
|
||||
Add(typeof(Onion), 1);
|
||||
Add(typeof(Lettuce), 2);
|
||||
Add(typeof(Squash), 1);
|
||||
Add(typeof(Carrot), 1);
|
||||
Add(typeof(HoneydewMelon), 3);
|
||||
Add(typeof(Cantaloupe), 3);
|
||||
Add(typeof(Cabbage), 2);
|
||||
Add(typeof(Lemon), 1);
|
||||
Add(typeof(Lime), 1);
|
||||
Add(typeof(Peach), 1);
|
||||
Add(typeof(Pear), 1);
|
||||
Add(typeof(SheafOfHay), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Projects/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs
Normal file
50
Projects/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBFisherman : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(RawFishSteak), 3, 20, 0x97A, 0));
|
||||
//TODO: Add( new GenericBuyInfo( typeof( SmallFish ), 3, 20, 0xDD6, 0 ) );
|
||||
//TODO: Add( new GenericBuyInfo( typeof( SmallFish ), 3, 20, 0xDD7, 0 ) );
|
||||
Add(new GenericBuyInfo(typeof(Fish), 6, 80, 0x9CC, 0));
|
||||
Add(new GenericBuyInfo(typeof(Fish), 6, 80, 0x9CD, 0));
|
||||
Add(new GenericBuyInfo(typeof(Fish), 6, 80, 0x9CE, 0));
|
||||
Add(new GenericBuyInfo(typeof(Fish), 6, 80, 0x9CF, 0));
|
||||
Add(new GenericBuyInfo(typeof(FishingPole), 15, 20, 0xDC0, 0));
|
||||
|
||||
#region Mondain's Legacy
|
||||
|
||||
Add(new GenericBuyInfo(typeof(AquariumFishNet), 250, 20, 0xDC8, 0x240));
|
||||
Add(new GenericBuyInfo(typeof(AquariumFood), 62, 20, 0xEFC, 0));
|
||||
Add(new GenericBuyInfo(typeof(FishBowl), 6312, 20, 0x241C, 0x482));
|
||||
Add(new GenericBuyInfo(typeof(VacationWafer), 67, 20, 0x971, 0));
|
||||
Add(new GenericBuyInfo(typeof(AquariumNorthDeed), 250002, 20, 0x14F0, 0));
|
||||
Add(new GenericBuyInfo(typeof(AquariumEastDeed), 250002, 20, 0x14F0, 0));
|
||||
Add(new GenericBuyInfo(typeof(NewAquariumBook), 15, 20, 0xFF2, 0));
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(RawFishSteak), 1);
|
||||
Add(typeof(Fish), 1);
|
||||
//TODO: Add( typeof( SmallFish ), 1 );
|
||||
Add(typeof(FishingPole), 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue