This commit is contained in:
mark 2006-06-15 04:14:30 +00:00
commit 47711d616e
2644 changed files with 479454 additions and 0 deletions

View file

@ -0,0 +1,28 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class AnimalBuyInfo : GenericBuyInfo
{
private int m_ControlSlots;
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 )
{
m_ControlSlots = controlSlots;
}
public override int ControlSlots
{
get
{
return m_ControlSlots;
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class BeverageBuyInfo : GenericBuyInfo
{
private BeverageType m_Content;
public override bool CanCacheDisplay{ get{ return false; } }
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 object GetObject()
{
return Activator.CreateInstance( Type, new object[]{ m_Content } );
}
}
}

View file

@ -0,0 +1,344 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
public class GenericBuyInfo : IBuyItemInfo
{
private class DisplayCache : Container
{
private static DisplayCache m_Cache;
public static DisplayCache Cache
{
get
{
if ( m_Cache == null || m_Cache.Deleted )
m_Cache = new DisplayCache();
return m_Cache;
}
}
private Hashtable m_Table;
private ArrayList m_Mobiles;
public DisplayCache() : base( 0 )
{
m_Table = new Hashtable();
m_Mobiles = new ArrayList();
}
public object Lookup( Type key )
{
return m_Table[key];
}
public void Store( Type key, object obj, bool cache )
{
if ( cache )
m_Table[key] = obj;
if ( obj is Item )
AddItem( (Item) obj );
else if ( obj is Mobile )
m_Mobiles.Add( obj );
}
public DisplayCache( Serial serial ) : base( serial )
{
}
public override void OnAfterDelete()
{
base.OnAfterDelete();
for ( int i = 0; i < m_Mobiles.Count; ++i )
((Mobile)m_Mobiles[i]).Delete();
m_Mobiles.Clear();
for ( int i = Items.Count - 1; i >= 0; --i )
{
if ( i < Items.Count )
((Item)Items[i]).Delete();
}
if ( m_Cache == this )
m_Cache = null;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteMobileList( m_Mobiles, true );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Mobiles = reader.ReadMobileList();
for ( int i = 0; i < m_Mobiles.Count; ++i )
((Mobile)m_Mobiles[i]).Delete();
m_Mobiles.Clear();
for ( int i = Items.Count - 1; i >= 0; --i )
{
if ( i < Items.Count )
((Item)Items[i]).Delete();
}
if ( m_Cache == null )
m_Cache = this;
else
Delete();
m_Table = new Hashtable();
}
}
private Type m_Type;
private string m_Name;
private int m_Price;
private int m_MaxAmount, m_Amount;
private int m_ItemID;
private int m_Hue;
private object[] m_Args;
private object m_DisplayObject;
public virtual int ControlSlots{ get{ return 0; } }
public virtual bool CanCacheDisplay{ get{ return false; } } //return ( m_Args == null || m_Args.Length == 0 ); }
private bool IsDeleted( object obj )
{
if ( obj is Item )
return (obj as Item).Deleted;
else if ( obj is Mobile )
return (obj as Mobile).Deleted;
return false;
}
public void DeleteDisplayObject()
{
if ( m_DisplayObject is Item )
(m_DisplayObject as Item).Delete();
else if ( m_DisplayObject is Mobile )
(m_DisplayObject as Mobile).Delete();
m_DisplayObject = null;
}
public object GetDisplayObject()
{
if ( m_DisplayObject != null && !IsDeleted( m_DisplayObject ) )
return m_DisplayObject;
bool canCache = this.CanCacheDisplay;
if ( canCache )
m_DisplayObject = DisplayCache.Cache.Lookup( m_Type );
if ( m_DisplayObject == null || IsDeleted( m_DisplayObject ) )
m_DisplayObject = GetObject();
DisplayCache.Cache.Store( m_Type, m_DisplayObject, canCache );
return m_DisplayObject;
}
public Type Type
{
get{ return m_Type; }
set{ m_Type = value; }
}
public string Name
{
get{ return m_Name; }
set{ m_Name = value; }
}
public int DefaultPrice{ get{ return m_PriceScalar; } }
private int m_PriceScalar;
public int PriceScalar
{
get{ return m_PriceScalar; }
set{ m_PriceScalar = value; }
}
public int Price
{
get
{
if ( m_PriceScalar != 0 )
{
if ( m_Price > 5000000 )
{
long price = m_Price;
price *= m_PriceScalar;
price += 50;
price /= 100;
if ( price > int.MaxValue )
price = int.MaxValue;
return (int)price;
}
return ( ((m_Price * m_PriceScalar) + 50) / 100 );
}
return m_Price;
}
set{ m_Price = value; }
}
public int ItemID
{
get{ return m_ItemID; }
set{ m_ItemID = value; }
}
public int Hue
{
get{ return m_Hue; }
set{ m_Hue = value; }
}
public int Amount
{
get{ return m_Amount; }
set{ if ( value < 0 ) value = 0; m_Amount = value; }
}
public int MaxAmount
{
get{ return m_MaxAmount; }
set{ m_MaxAmount = value; }
}
public object[] Args
{
get{ return m_Args; }
set{ m_Args = value; }
}
public GenericBuyInfo( Type type, int price, int amount, int itemID, int hue ) : this( null, type, price, amount, itemID, hue, null )
{
}
public GenericBuyInfo( string name, Type type, int price, int amount, int itemID, int hue ) : this( name, type, price, amount, itemID, hue, null )
{
}
public GenericBuyInfo( Type type, int price, int amount, int itemID, int hue, object[] args ) : this( null, type, price, amount, itemID, hue, args )
{
}
public GenericBuyInfo( string name, Type type, int price, int amount, int itemID, int hue, object[] args )
{
amount = 20;
m_Type = type;
m_Price = price;
m_MaxAmount = m_Amount = amount;
m_ItemID = itemID;
m_Hue = hue;
m_Args = args;
if ( name == null )
m_Name = (1020000 + (itemID & 0x3FFF)).ToString();
else
m_Name = name;
}
//get a new instance of an object (we just bought it)
public virtual object GetObject()
{
if ( m_Args == null || m_Args.Length == 0 )
return Activator.CreateInstance( m_Type );
return Activator.CreateInstance( m_Type, m_Args );
//return (Item)Activator.CreateInstance( m_Type );
}
//Attempt to restock with item, (return true if restock sucessful)
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 )
{
m_MaxAmount *= 2;
if ( m_MaxAmount >= 999 )
m_MaxAmount = 999;
}
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 = m_MaxAmount;
if ( halfQuantity >= 999 )
halfQuantity = 640;
else if ( halfQuantity > 20 )
halfQuantity /= 2;
if ( m_Amount >= halfQuantity )
m_MaxAmount = halfQuantity;
}
m_Amount = m_MaxAmount;
}
}
}

View file

@ -0,0 +1,134 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class GenericSellInfo : IShopSellInfo
{
private Hashtable m_Table = new Hashtable();
private Type[] m_Types;
public GenericSellInfo()
{
}
public void Add( Type type, int price )
{
m_Table[type] = price;
m_Types = null;
}
public int GetSellPriceFor( Item item )
{
int price = (int)m_Table[item.GetType()];
if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor)item;
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 )
{
BaseWeapon weapon = (BaseWeapon)item;
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 )
{
int price1 = price, price2 = price;
if ( item is Pitcher )
{ price1 = 3; price2 = 5; }
else if ( item is BeverageBottle )
{ price1 = 3; price2 = 3; }
else if ( item is Jug )
{ price1 = 6; price2 = 6; }
BaseBeverage bev = (BaseBeverage)item;
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;
else
return item.LabelNumber.ToString();
}
public bool IsSellable( Item item )
{
//if ( item.Hue != 0 )
//return false;
return IsInList( item.GetType() );
}
public bool IsResellable( Item item )
{
//if ( item.Hue != 0 )
//return false;
return IsInList( item.GetType() );
}
public bool IsInList( Type type )
{
Object o = m_Table[type];
if ( o == null )
return false;
else
return true;
}
}
}

View file

@ -0,0 +1,56 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Alchemist : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
public Alchemist() : base( "the alchemist" )
{
SetSkill( SkillName.Alchemy, 85.0, 100.0 );
SetSkill( SkillName.TasteID, 65.0, 88.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBAlchemist() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomPinkHue() ) );
}
public Alchemist( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,426 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.ContextMenus;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
namespace Server.Mobiles
{
public class AnimalTrainer : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBAnimalTrainer() );
}
public override VendorShoeType ShoeType
{
get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; }
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( Utility.RandomBool() ? (Item)new QuarterStaff() : (Item)new ShepherdsCrook() );
}
private class StableEntry : ContextMenuEntry
{
private AnimalTrainer m_Trainer;
private Mobile m_From;
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 AnimalTrainer m_Trainer;
private Mobile m_From;
private List<BaseCreature> m_List;
public ClaimListGump( AnimalTrainer trainer, Mobile from, List<BaseCreature> list ) : base( 50, 50 )
{
m_Trainer = trainer;
m_From = from;
m_List = list;
from.CloseGump( typeof( 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>", false, false );
for ( int i = 0; i < list.Count; ++i )
{
BaseCreature pet = list[i];
if ( pet == null || pet.Deleted )
continue;
AddButton( 15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0 );
AddHtml( 32, 35 + (i * 20), 275, 18, String.Format( "<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name ), false, false );
}
}
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 AnimalTrainer m_Trainer;
private Mobile m_From;
public ClaimAllEntry( AnimalTrainer trainer, Mobile from ) : base( 6127, 12 )
{
m_Trainer = trainer;
m_From = from;
}
public override void OnClick()
{
m_Trainer.Claim( m_From );
}
}
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[SkillName.AnimalTaming].Value;
double anlore = from.Skills[SkillName.AnimalLore].Value;
double vetern = from.Skills[SkillName.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 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 )
m_Trainer.EndStable( from, (BaseCreature)targeted );
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!
}
}
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 == null || pet.Deleted )
{
pet.IsStabled = false;
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 == null || pet.Deleted || from.Map != this.Map || !from.InRange( this, 14 ) || !from.Stabled.Contains( pet ) || !from.CheckAlive() )
return;
if ( (from.Followers + pet.ControlSlots) <= from.FollowersMax )
{
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;
from.Stabled.Remove( pet );
SayTo( from, 1042559 ); // Here you go... and good day to you!
}
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;
if ( from.Stabled.Count >= GetMaxStabled( from ) )
{
SayTo( from, 1042565 ); // You have too many pets in the stables!
}
else
{
SayTo( from, 1042558 ); /* 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.Target = new StableTarget( this );
}
}
public void EndStable( Mobile from, BaseCreature pet )
{
if ( Deleted || !from.CheckAlive() )
return;
if ( !pet.Controlled || 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.Body.IsHuman )
{
SayTo( from, 502672 ); // HA HA HA! Sorry, I am not an inn.
}
else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && 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.BankBox;
if ( bank != null && bank.ConsumeTotal( typeof( Gold ), 30 ) )
{
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster( null );
pet.SummonMaster = null;
pet.IsStabled = true;
if ( Core.SE )
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy
from.Stabled.Add( pet );
SayTo( from, 502679 ); // 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 )
{
if ( Deleted || !from.CheckAlive() )
return;
bool claimed = false;
int stabled = 0;
for ( int i = 0; i < from.Stabled.Count; ++i )
{
BaseCreature pet = from.Stabled[i] as BaseCreature;
if ( pet == null || pet.Deleted )
{
pet.IsStabled = false;
from.Stabled.RemoveAt( i );
--i;
continue;
}
++stabled;
if ( (from.Followers + pet.ControlSlots) <= from.FollowersMax )
{
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;
if ( Core.SE )
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy
from.Stabled.RemoveAt( i );
--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!
}
public override bool HandlesOnSpeech( Mobile from )
{
return true;
}
public override void OnSpeech( SpeechEventArgs e )
{
if ( !e.Handled && e.HasKeyword( 0x0008 ) )
{
e.Handled = true;
BeginStable( e.Mobile );
}
else if ( !e.Handled && e.HasKeyword( 0x0009 ) )
{
e.Handled = true;
if ( !Insensitive.Equals( e.Speech, "claim" ) )
BeginClaimList( e.Mobile );
else
Claim( e.Mobile );
}
else
{
base.OnSpeech( e );
}
}
public AnimalTrainer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Architect : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
public Architect() : base( "the architect" )
{
}
public override void InitSBInfo()
{
if ( !Core.AOS )
m_SBInfos.Add( new SBHouseDeed() );
m_SBInfos.Add( new SBArchitect() );
}
public Architect( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,96 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Armorer : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Armorer() : base( "the armorer" )
{
SetSkill( SkillName.ArmsLore, 64.0, 100.0 );
SetSkill( SkillName.Blacksmith, 60.0, 83.0 );
}
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 VendorShoeType ShoeType
{
get{ return VendorShoeType.Boots; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron( Utility.RandomYellowHue() ) );
AddItem( new Server.Items.Bascinet() );
}
public Armorer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Baker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Baker() : base( "the baker" )
{
SetSkill( SkillName.Cooking, 75.0, 98.0 );
SetSkill( SkillName.TasteID, 36.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBBaker() );
}
public Baker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,48 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Bard : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.BardsGuild; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBBard() );
}
public Bard( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,54 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Prompts;
using Server.Network;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class Barkeeper : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override void InitSBInfo()
{
m_SBInfos.Add( new SBBarkeeper() );
}
public override VendorShoeType ShoeType{ get{ return Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } }
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new HalfApron( RandomBrightHue() ) );
}
[Constructable]
public Barkeeper() : base( "the barkeeper" )
{
}
public Barkeeper( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Beekeeper : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Beekeeper() : base( "the beekeeper" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBBeekeeper() );
}
public override VendorShoeType ShoeType{ get{ return VendorShoeType.Boots; } }
public Beekeeper( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,150 @@
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Blacksmith : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.BlacksmithsGuild; } }
[Constructable]
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 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 VendorShoeType ShoeType
{
get{ return VendorShoeType.None; }
}
public override void InitOutfit()
{
base.InitOutfit();
Item item = ( Utility.RandomBool() ? null : new Server.Items.RingmailChest() );
if ( item != null && !EquipItem( item ) )
{
item.Delete();
item = null;
}
if ( item == null )
AddItem( new Server.Items.FullApron() );
AddItem( new Server.Items.Bascinet() );
AddItem( new Server.Items.SmithHammer() );
}
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
{
double theirSkill = pm.Skills[SkillName.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[SkillName.Blacksmith].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
if ( from is PlayerMobile )
return ((PlayerMobile)from).NextSmithBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderRecieve( Mobile from )
{
if( Core.SE && from is PlayerMobile )
((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
}
#endregion
public Blacksmith( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,65 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
[TypeAlias( "Server.Mobiles.Bower" )]
public class Bowyer : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Bowyer() : base( "the bowyer" )
{
SetSkill( SkillName.Fletching, 80.0, 100.0 );
SetSkill( SkillName.Archery, 80.0, 100.0 );
}
public override VendorShoeType ShoeType
{
get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; }
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Bow() );
AddItem( new Server.Items.LeatherGorget() );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBBowyer() );
m_SBInfos.Add( new SBRangedWeapon() );
if ( IsTokunoVendor )
m_SBInfos.Add( new SBSEBowyer() );
}
public Bowyer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,49 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Butcher : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Butcher() : base( "the butcher" )
{
SetSkill( SkillName.Anatomy, 45.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBButcher() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
AddItem( new Server.Items.Cleaver() );
}
public Butcher( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,56 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Carpenter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
public Carpenter() : base( "the carpenter" )
{
SetSkill( SkillName.Carpentry, 85.0, 100.0 );
SetSkill( SkillName.Lumberjacking, 60.0, 83.0 );
}
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 Server.Items.HalfApron() );
}
public Carpenter( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,46 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Cobbler : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Cobbler() : base( "the cobbler" )
{
SetSkill( SkillName.Tailoring, 60.0, 83.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBCobbler() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
}
public Cobbler( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,57 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Cook : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Cook() : base( "the cook" )
{
SetSkill( SkillName.Cooking, 90.0, 100.0 );
SetSkill( SkillName.TasteID, 75.0, 98.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBCook() );
if ( IsTokunoVendor )
m_SBInfos.Add( new SBSECook() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
public Cook( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,587 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Network;
namespace Server.Mobiles
{
public class CustomHairstylist : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override bool ClickTitle{ get{ return false; } }
public override bool IsActiveBuyer{ get{ return false; } }
public override bool IsActiveSeller{ get{ return true; } }
public override bool OnBuyItems( Mobile buyer, ArrayList list )
{
return false;
}
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[]
{
new HairstylistBuyInfo( 1018357, 50000, false, typeof( ChangeHairstyleGump ), new object[]
{ From, Vendor, Price, false, ChangeHairstyleEntry.HairEntries } ),
new HairstylistBuyInfo( 1018358, 50000, true, typeof( ChangeHairstyleGump ), new object[]
{ From, Vendor, Price, true, ChangeHairstyleEntry.BeardEntries } ),
new HairstylistBuyInfo( 1018359, 50, false, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, true, true, ChangeHairHueEntry.RegularEntries } ),
new HairstylistBuyInfo( 1018360, 500000, false, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, true, true, ChangeHairHueEntry.BrightEntries } ),
new HairstylistBuyInfo( 1018361, 30000, false, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, true, false, ChangeHairHueEntry.RegularEntries } ),
new HairstylistBuyInfo( 1018362, 30000, true, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, false, true, ChangeHairHueEntry.RegularEntries } ),
new HairstylistBuyInfo( 1018363, 500000, false, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, true, false, ChangeHairHueEntry.BrightEntries } ),
new HairstylistBuyInfo( 1018364, 500000, true, typeof( ChangeHairHueGump ), new object[]
{ From, Vendor, Price, false, true, ChangeHairHueEntry.BrightEntries } )
};
public override void VendorBuy( Mobile from )
{
from.SendGump( new HairstylistBuyGump( from, this, m_SellList ) );
}
[Constructable]
public CustomHairstylist() : base( "the hairstylist" )
{
}
public override int GetHairHue()
{
return RandomBrightHue();
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomPinkHue() ) );
}
public override void InitSBInfo()
{
}
public CustomHairstylist( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class HairstylistBuyInfo
{
private int m_Title;
private string m_TitleString;
private int m_Price;
private bool m_FacialHair;
private Type m_GumpType;
private object[] m_GumpArgs;
public int Title{ get{ return m_Title; } }
public string TitleString{ get{ return m_TitleString; } }
public int Price{ get{ return m_Price; } }
public bool FacialHair{ get{ return m_FacialHair; } }
public Type GumpType{ get{ return m_GumpType; } }
public object[] GumpArgs{ get{ return m_GumpArgs; } }
public HairstylistBuyInfo( int title, int price, bool facialHair, Type gumpType, object[] args )
{
m_Title = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
}
public HairstylistBuyInfo( string title, int price, bool facialHair, Type gumpType, object[] args )
{
m_TitleString = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
}
}
public class HairstylistBuyGump : Gump
{
private Mobile m_From;
private Mobile m_Vendor;
private HairstylistBuyInfo[] m_SellList;
public HairstylistBuyGump( Mobile from, Mobile vendor, HairstylistBuyInfo[] sellList ) : base( 50, 50 )
{
m_From = from;
m_Vendor = vendor;
m_SellList = sellList;
from.CloseGump( typeof( HairstylistBuyGump ) );
from.CloseGump( typeof( ChangeHairHueGump ) );
from.CloseGump( typeof( 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, false, false ); // 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, false, false );
else
AddHtmlLocalized( 140, 75 + (index * 25), 300, 20, sellList[i].Title, false, false );
AddButton( 100, 75 + (index++ * 25), 4005, 4007, 1 + i, GumpButtonType.Reply, 0 );
}
}
}
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 )
{
// You cannot place facial hair on a woman!
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
{
}
}
else
{
// You cannot afford my services for that style.
m_Vendor.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1042293, m_From.NetState );
}
}
}
}
public class ChangeHairHueEntry
{
private string m_Name;
private int[] m_Hues;
public string Name{ get{ return m_Name; } }
public int[] Hues{ get{ return m_Hues; } }
public ChangeHairHueEntry( string name, int[] hues )
{
m_Name = name;
m_Hues = hues;
}
public ChangeHairHueEntry( string name, int start, int count )
{
m_Name = name;
m_Hues = new int[count];
for ( int i = 0; i < count; ++i )
m_Hues[i] = start + i;
}
public static readonly ChangeHairHueEntry[] BrightEntries = new ChangeHairHueEntry[]
{
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[]
{
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 class ChangeHairHueGump : Gump
{
private Mobile m_From;
private Mobile m_Vendor;
private int m_Price;
private bool m_Hair;
private bool m_FacialHair;
private ChangeHairHueEntry[] m_Entries;
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( typeof( HairstylistBuyGump ) );
from.CloseGump( typeof( ChangeHairHueGump ) );
from.CloseGump( typeof( ChangeHairstyleGump ) );
AddPage( 0 );
AddBackground( 100, 10, 350, 370, 2600 );
AddBackground( 120, 54, 110, 270, 5100 );
AddHtmlLocalized( 155, 25, 240, 30, 1011013, false, false ); // <center>Hair Color Selection Menu</center>
AddHtmlLocalized( 150, 330, 220, 35, 1011014, false, false ); // Dye my hair this color!
AddButton( 380, 330, 4005, 4007, 1, GumpButtonType.Reply, 0 );
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
{
private int m_ItemID;
private int m_GumpID;
private int m_X, m_Y;
public int ItemID{ get{ return m_ItemID; } }
public int GumpID{ get{ return m_GumpID; } }
public int X{ get{ return m_X; } }
public int Y{ get{ return m_Y; } }
public ChangeHairstyleEntry( int gumpID, int x, int y, int itemID )
{
m_GumpID = gumpID;
m_X = x;
m_Y = y;
m_ItemID = itemID;
}
public static readonly ChangeHairstyleEntry[] HairEntries = new ChangeHairstyleEntry[]
{
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[]
{
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 class ChangeHairstyleGump : Gump
{
private Mobile m_From;
private Mobile m_Vendor;
private int m_Price;
private bool m_FacialHair;
private ChangeHairstyleEntry[] m_Entries;
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( typeof( HairstylistBuyGump ) );
from.CloseGump( typeof( ChangeHairHueGump ) );
from.CloseGump( typeof( 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, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 77, 45 + (tableHeight * offsetHeight), 90, 35, 1006044, false, false ); // Ok
AddButton( 81 + (tableWidth * offsetWidth) - 180, 45 + (tableHeight * offsetHeight), 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 81 + (tableWidth * offsetWidth) - 148, 45 + (tableHeight * offsetHeight), 90, 35, 1006045, false, false ); // Cancel
if ( !facialHair )
AddHtmlLocalized( 50, 15, 350, 20, 1018353, false, false ); // <center>New Hairstyle</center>
else
AddHtmlLocalized( 55, 15, 200, 20, 1018354, false, false ); // <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, false, false ); // Bald
}
else
{
AddRadio( 40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i );
AddHtmlLocalized( 60 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 85, 35, 1011064, false, false ); // 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];
if ( m_From is PlayerMobile )
((PlayerMobile)m_From).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 );
}
}
}
}

View file

@ -0,0 +1,60 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Farmer : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBFarmer() );
}
public override VendorShoeType ShoeType
{
get{ return VendorShoeType.ThighBoots; }
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.WideBrimHat( Utility.RandomNeutralHue() ) );
}
public Farmer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,50 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Fisherman : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.FishermensGuild; } }
[Constructable]
public Fisherman() : base( "the fisher" )
{
SetSkill( SkillName.Fishing, 75.0, 98.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBFisherman() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.FishingPole() );
}
public Fisherman( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Furtrader : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBFurtrader() );
}
public Furtrader( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,49 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
[TypeAlias( "Server.Mobiles.GargoyleAlchemist" )]
public class Glassblower : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
public Glassblower() : base( "the alchemist" )
{
SetSkill( SkillName.Alchemy, 85.0, 100.0 );
SetSkill( SkillName.TasteID, 85.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBGlassblower() );
m_SBInfos.Add( new SBAlchemist() );
}
public Glassblower( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if ( Body == 0x2F2 )
Body = 0x2F6;
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class GolemCrafter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBTinker() );
m_SBInfos.Add( new SBVagabond() );
}
public GolemCrafter( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class BardGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.BardsGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,167 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
public abstract class BaseGuildmaster : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override bool IsActiveVendor{ get{ return false; } }
public override bool ClickTitle{ get{ return false; } }
public virtual int JoinCost{ get{ return 500; } }
public virtual TimeSpan JoinAge{ get{ return TimeSpan.FromDays( 0.0 ); } }
public virtual TimeSpan JoinGameAge{ get{ return TimeSpan.FromDays( 2.0 ); } }
public virtual TimeSpan QuitAge{ get{ return TimeSpan.FromDays( 7.0 ); } }
public virtual TimeSpan QuitGameAge{ get{ return 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 = this.Name;
return ( name != null && Insensitive.StartsWith( speech, name ) );
}
public override bool HandlesOnSpeech( Mobile from )
{
if ( from.InRange( this.Location, 2 ) )
return true;
return base.HandlesOnSpeech( from );
}
public override void OnSpeech( SpeechEventArgs e )
{
Mobile from = e.Mobile;
if ( !e.Handled && from is PlayerMobile && from.InRange( this.Location, 2 ) && WasNamed( e.Speech ) )
{
PlayerMobile pm = (PlayerMobile)from;
if ( e.HasKeyword( 0x0004 ) ) // *join* | *member*
{
if ( pm.NpcGuild == this.NpcGuild )
SayTo( from, 501047 ); // Thou art already a member of our guild.
else if ( pm.NpcGuild != NpcGuild.None )
SayTo( from, 501046 ); // Thou must resign from thy other guild first.
else if ( pm.GameTime < JoinGameAge || (pm.CreationTime + JoinAge) > DateTime.Now )
SayTo( from, 501048 ); // You are too young to join my guild...
else if ( CheckCustomReqs( pm ) )
SayPriceTo( from );
e.Handled = true;
}
else if ( e.HasKeyword( 0x0005 ) ) // *resign* | *quit*
{
if ( pm.NpcGuild != this.NpcGuild )
{
SayTo( from, 501052 ); // Thou dost not belong to my guild!
}
else if ( (pm.NpcGuildJoinTime + QuitAge) > DateTime.Now || (pm.NpcGuildGameTime + QuitGameAge) > pm.GameTime )
{
SayTo( from, 501053 ); // You just joined my guild! You must wait a week to resign.
}
else
{
SayTo( from, 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 && dropped.Amount == JoinCost )
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == this.NpcGuild )
{
SayTo( from, 501047 ); // Thou art already a member of our guild.
}
else if ( pm.NpcGuild != NpcGuild.None )
{
SayTo( from, 501046 ); // Thou must resign from thy other guild first.
}
else if ( pm.GameTime < JoinGameAge || (pm.CreationTime + JoinAge) > DateTime.Now )
{
SayTo( from, 501048 ); // You are too young to join my guild...
}
else if ( CheckCustomReqs( pm ) )
{
SayWelcomeTo( from );
pm.NpcGuild = this.NpcGuild;
pm.NpcGuildJoinTime = DateTime.Now;
pm.NpcGuildGameTime = pm.GameTime;
dropped.Delete();
return true;
}
return false;
}
return base.OnGoldGiven( from, dropped );
}
public BaseGuildmaster( string title ) : base( title )
{
Title = String.Format( "the {0} {1}", title, Female ? "guildmistress" : "guildmaster" );
}
public BaseGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,70 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class BlacksmithGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.BlacksmithsGuild; } }
public override bool IsActiveVendor{ get{ return true; } }
public override bool ClickTitle{ get{ return true; } }
[Constructable]
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 override void InitSBInfo()
{
SBInfos.Add( new SBBlacksmith() );
}
public override VendorShoeType ShoeType
{
get{ return VendorShoeType.ThighBoots; }
}
public override void InitOutfit()
{
base.InitOutfit();
Item item = ( Utility.RandomBool() ? null : new Server.Items.RingmailChest() );
if ( item != null && !EquipItem( item ) )
{
item.Delete();
item = null;
}
if ( item == null )
AddItem( new Server.Items.FullApron() );
AddItem( new Server.Items.Bascinet() );
AddItem( new Server.Items.SmithHammer() );
}
public BlacksmithGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class FisherGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.FishermensGuild; } }
[Constructable]
public FisherGuildmaster() : base( "fisher" )
{
SetSkill( SkillName.Fishing, 80.0, 100.0 );
}
public FisherGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,51 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class HealerGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.HealersGuild; } }
[Constructable]
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 override VendorShoeType ShoeType
{
get{ return VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomYellowHue() ) );
}
public HealerGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,54 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class MageGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
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 override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomBlueHue() ) );
AddItem( new Server.Items.GnarledStaff() );
}
public MageGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,36 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class MerchantGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.MerchantsGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,36 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class MinerGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.MinersGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class RangerGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.RangersGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class TailorGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.TailorsGuild; } }
[Constructable]
public TailorGuildmaster() : base( "tailor" )
{
SetSkill( SkillName.Tailoring, 90.0, 100.0 );
}
public TailorGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,127 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class ThiefGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.ThievesGuild; } }
public override TimeSpan JoinAge{ get{ return TimeSpan.FromDays( 7.0 ); } }
[Constructable]
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 override void InitOutfit()
{
base.InitOutfit();
if ( Utility.RandomBool() )
AddItem( new Server.Items.Kryss() );
else
AddItem( new Server.Items.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;
}
else if ( pm.Kills > 0 )
{
SayTo( pm, 501050 ); // This guild is for cunning thieves, not oafish cutthroats.
return false;
}
else if ( pm.Skills[SkillName.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( this.Location, 2 ) )
return true;
return base.HandlesOnSpeech( from );
}
public override void OnSpeech( SpeechEventArgs e )
{
Mobile from = e.Mobile;
if ( !e.Handled && from is PlayerMobile && from.InRange( this.Location, 2 ) && e.HasKeyword( 0x1F ) ) // *disguise*
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == NpcGuild.ThievesGuild )
SayTo( from, 501839 ); // That particular item costs 700 gold pieces.
else
SayTo( from, 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 && dropped.Amount == 700 )
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == NpcGuild.ThievesGuild )
{
from.AddToBackpack( new DisguiseKit() );
dropped.Delete();
return true;
}
}
return base.OnGoldGiven( from, dropped );
}
public ThiefGuildmaster( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,37 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class TinkerGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class WarriorGuildmaster : BaseGuildmaster
{
public override NpcGuild NpcGuild{ get{ return NpcGuild.WarriorsGuild; } }
[Constructable]
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,88 @@
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class GypsyAnimalTrainer : AnimalTrainer
{
[Constructable]
public GypsyAnimalTrainer()
{
if ( Utility.RandomBool() )
Title = "the gypsy animal trainer";
else
Title = "the gypsy animal herder";
}
public override VendorShoeType ShoeType
{
get{ return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; }
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( Utility.RandomBool() ? (Item)new QuarterStaff() : (Item)new ShepherdsCrook() );
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
}
public GypsyAnimalTrainer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,89 @@
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class GypsyBanker : Banker
{
public override bool IsActiveVendor{ get{ return false; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.None; } }
public override bool ClickTitle{ get{ return false; } }
[Constructable]
public GypsyBanker()
{
Title = "the gypsy banker";
}
public override void InitOutfit()
{
base.InitOutfit();
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new JesterHat( RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
}
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.Shoes );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
}
public GypsyBanker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,80 @@
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class GypsyMaiden : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public GypsyMaiden() : base( "the gypsy maiden" )
{
}
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( RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
}
if ( Utility.RandomBool() )
AddItem( new HalfApron( RandomBrightHue() ) );
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
}
public GypsyMaiden( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,43 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class HairStylist : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBHairStylist() );
}
public HairStylist( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,50 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Herbalist : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBHerbalist() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public Herbalist( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,82 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class HolyMage : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 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 HolyMage( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,48 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class InnKeeper : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public InnKeeper() : base( "the innkeeper" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBInnKeeper() );
if ( IsTokunoVendor )
m_SBInfos.Add( new SBSEFood() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
}
public InnKeeper( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,124 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class IronWorker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 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 VendorShoeType ShoeType
{
get{ return VendorShoeType.None; }
}
public override void InitOutfit()
{
base.InitOutfit();
Item item = ( Utility.RandomBool() ? null : new Server.Items.RingmailChest() );
if ( item != null && !EquipItem( item ) )
{
item.Delete();
item = null;
}
switch ( Utility.Random( 3 ) )
{
case 0:
case 1: AddItem( new JesterHat( RandomBrightHue() ) ); break;
case 2: AddItem( new Bandana( RandomBrightHue() ) ); break;
}
if ( item == null )
AddItem( new FullApron( RandomBrightHue() ) );
AddItem( new Bascinet() );
AddItem( new SmithHammer() );
item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
}
public IronWorker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Jeweler : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Jeweler() : base( "the jeweler" )
{
SetSkill( SkillName.ItemID, 64.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBJewel() );
}
public Jeweler( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,85 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class KeeperOfChivalry : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 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 KeeperOfChivalry( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class LeatherWorker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public LeatherWorker() : base( "the leather worker" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBLeatherArmor() );
m_SBInfos.Add( new SBStuddedArmor() );
m_SBInfos.Add( new SBLeatherWorker() );
}
public LeatherWorker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,60 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Mage : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBMage() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomBlueHue() ) );
}
public Mage( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Mapmaker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Mapmaker() : base( "the mapmaker" )
{
SetSkill( SkillName.Cartography, 90.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBMapmaker() );
}
public Mapmaker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Miller : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Miller() : base( "the miller" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBMiller() );
}
public Miller( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,51 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Miner : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Miner() : base( "the miner" )
{
SetSkill( SkillName.Mining, 65.0, 88.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBMiner() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.FancyShirt( 0x3E4 ) );
AddItem( new Server.Items.LongPants( 0x192 ) );
AddItem( new Server.Items.Pickaxe() );
AddItem( new Server.Items.ThighBoots( 0x283 ) );
}
public Miner( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Provisioner : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Provisioner() : base( "the provisioner" )
{
SetSkill( SkillName.Camping, 45.0, 68.0 );
SetSkill( SkillName.Tactics, 45.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBProvisioner() );
if ( IsTokunoVendor )
m_SBInfos.Add( new SBSEHats() );
}
public Provisioner( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,49 @@
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class Rancher : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBRancher() );
}
public Rancher( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,56 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Ranger : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBRanger() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Shirt( Utility.RandomNeutralHue() ) );
AddItem( new Server.Items.LongPants( Utility.RandomNeutralHue() ) );
AddItem( new Server.Items.Bow() );
AddItem( new Server.Items.ThighBoots( Utility.RandomNeutralHue() ) );
}
public Ranger( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,187 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Multis;
using Server.Multis.Deeds;
using Server.Targeting;
using Server.Network;
namespace Server.Mobiles
{
public class RealEstateBroker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public RealEstateBroker() : base( "the real estate broker" )
{
}
public override bool HandlesOnSpeech( Mobile from )
{
if ( from.Alive && from.InRange( this, 3 ) )
return true;
return base.HandlesOnSpeech( from );
}
private DateTime m_NextCheckPack;
public override void OnMovement( Mobile m, Point3D oldLocation )
{
if ( DateTime.Now > m_NextCheckPack && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && m.Player )
{
Container pack = m.Backpack;
if ( pack != null )
{
m_NextCheckPack = DateTime.Now + TimeSpan.FromSeconds( 2.0 );
Item deed = pack.FindItemByType( typeof( HouseDeed ), false );
if ( deed != 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, new TargetCallback( Appraise_OnTarget ) );
e.Handled = true;
}
base.OnSpeech( e );
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( dropped is HouseDeed )
{
HouseDeed deed = (HouseDeed)dropped;
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;
}
else
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500390 ); // Your bank box is full.
return false;
}
}
else
{
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 )
{
HouseDeed deed = (HouseDeed)obj;
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 SmallBrickHouseDeed || 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 RealEstateBroker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,56 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Scribe : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
[Constructable]
public Scribe() : base( "the scribe" )
{
SetSkill( SkillName.EvalInt, 60.0, 83.0 );
SetSkill( SkillName.Inscribe, 90.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBScribe() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; }
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Robe( Utility.RandomNeutralHue() ) );
}
public Scribe( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,49 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Shipwright : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Shipwright() : base( "the shipwright" )
{
SetSkill( SkillName.Carpentry, 60.0, 83.0 );
SetSkill( SkillName.Macing, 36.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBShipwright() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.SmithHammer() );
}
public Shipwright( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,50 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
[TypeAlias( "Server.Mobiles.GargoyleStonecrafter" )]
public class StoneCrafter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
public StoneCrafter() : base( "the stone crafter" )
{
SetSkill( SkillName.Carpentry, 85.0, 100.0 );
}
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 StoneCrafter( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if ( Title == "the stonecrafter" )
Title = "the stone crafter";
}
}
}

View file

@ -0,0 +1,99 @@
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Tailor : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TailorsGuild; } }
[Constructable]
public Tailor() : base( "the tailor" )
{
SetSkill( SkillName.Tailoring, 64.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBTailor() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
}
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
{
double theirSkill = pm.Skills[SkillName.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[SkillName.Tailoring].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
if ( from is PlayerMobile )
return ((PlayerMobile)from).NextTailorBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderRecieve( Mobile from )
{
if( Core.SE && from is PlayerMobile )
((PlayerMobile)from).NextTailorBulkOrder = TimeSpan.Zero;
}
#endregion
public Tailor( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Tanner : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Tanner() : base( "the tanner" )
{
SetSkill( SkillName.Tailoring, 36.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBTanner() );
}
public Tanner( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class TavernKeeper : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public TavernKeeper() : base( "the tavern keeper" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBTavernKeeper() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
public TavernKeeper( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,56 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Thief : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBThief() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.Shirt( Utility.RandomNeutralHue() ) );
AddItem( new Server.Items.LongPants( Utility.RandomNeutralHue() ) );
AddItem( new Server.Items.Dagger() );
AddItem( new Server.Items.ThighBoots( Utility.RandomNeutralHue() ) );
}
public Thief( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Tinker : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBTinker() );
}
public Tinker( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,65 @@
using System;
using System.Collections;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class Vagabond : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Vagabond() : base( "the vagabond" )
{
SetSkill( SkillName.ItemID, 60.0, 83.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBTinker() );
m_SBInfos.Add( new SBVagabond() );
}
public override void InitOutfit()
{
AddItem( new FancyShirt( RandomBrightHue() ) );
AddItem( new Shoes( GetShoeHue() ) );
AddItem( new LongPants( GetRandomHue() ) );
if ( Utility.RandomBool() )
AddItem( new Cloak( 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 Vagabond( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class VarietyDealer : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public VarietyDealer() : base( "the variety dealer" )
{
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBVarietyDealer() );
}
public VarietyDealer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.ContextMenus;
namespace Server.Mobiles
{
public class Veterinarian : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Veterinarian() : base( "the vet" )
{
SetSkill( SkillName.AnimalLore, 85.0, 100.0 );
SetSkill( SkillName.Veterinary, 90.0, 100.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBVeterinarian() );
}
public Veterinarian( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,48 @@
using System;
using System.Collections;
using Server;
namespace Server.Mobiles
{
public class Waiter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
public Waiter() : base( "the waiter" )
{
SetSkill( SkillName.Discordance, 36.0, 68.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBWaiter() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
public Waiter( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,117 @@
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Weaponsmith : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
[Constructable]
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 override void InitSBInfo()
{
m_SBInfos.Add( new SBWeaponSmith() );
if ( IsTokunoVendor )
m_SBInfos.Add( new SBSEWeapons() );
}
public override VendorShoeType ShoeType
{
get{ return Utility.RandomBool() ? VendorShoeType.Boots : VendorShoeType.ThighBoots; }
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
{
double theirSkill = pm.Skills[SkillName.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[SkillName.Blacksmith].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
if ( from is PlayerMobile )
return ((PlayerMobile)from).NextSmithBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderRecieve( Mobile from )
{
if( Core.SE && from is PlayerMobile )
((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
}
#endregion
public Weaponsmith( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,99 @@
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Weaver : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TailorsGuild; } }
[Constructable]
public Weaver() : base( "the weaver" )
{
SetSkill( SkillName.Tailoring, 65.0, 88.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBWeaver() );
}
public override VendorShoeType ShoeType
{
get{ return VendorShoeType.Sandals; }
}
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
{
double theirSkill = pm.Skills[SkillName.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[SkillName.Tailoring].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
if ( from is PlayerMobile )
return ((PlayerMobile)from).NextTailorBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderRecieve( Mobile from )
{
if( Core.SE && from is PlayerMobile )
((PlayerMobile)from).NextTailorBulkOrder = TimeSpan.Zero;
}
#endregion
public Weaver( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class PresetMapBuyInfo : GenericBuyInfo
{
private PresetMapEntry m_Entry;
public override bool CanCacheDisplay{ get{ return false; } }
public PresetMapBuyInfo( PresetMapEntry entry, int price, int amount ) : base( entry.Name.ToString(), null, price, amount, 0x14EC, 0 )
{
m_Entry = entry;
}
public override object GetObject()
{
return new PresetMap( m_Entry );
}
}
}

View file

@ -0,0 +1,431 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Gumps;
using Server.Multis;
using Server.ContextMenus;
using Server.Prompts;
namespace Server.Mobiles
{
public class VendorRentalDuration
{
public static readonly VendorRentalDuration[] Instances = new VendorRentalDuration[]
{
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 TimeSpan m_Duration;
private int m_Name;
public TimeSpan Duration{ get{ return m_Duration; } }
public int Name{ get{ return m_Name; } }
public int ID
{
get
{
for ( int i = 0; i < Instances.Length; i++ )
{
if ( Instances[i] == this )
return i;
}
return 0;
}
}
private VendorRentalDuration( TimeSpan duration, int name )
{
m_Duration = duration;
m_Name = name;
}
}
public class RentedVendor : PlayerVendor
{
private VendorRentalDuration m_RentalDuration;
private int m_RentalPrice;
private bool m_LandlordRenew;
private bool m_RenterRenew;
private int m_RenewalPrice;
private int m_RentalGold;
private DateTime m_RentalExpireTime;
private Timer m_RentalExpireTimer;
public RentedVendor( Mobile owner, BaseHouse house, VendorRentalDuration duration, int rentalPrice, bool landlordRenew, int rentalGold ) : base( owner, house )
{
m_RentalDuration = duration;
m_RentalPrice = m_RenewalPrice = rentalPrice;
m_LandlordRenew = landlordRenew;
m_RenterRenew = false;
m_RentalGold = rentalGold;
m_RentalExpireTime = DateTime.Now + duration.Duration;
m_RentalExpireTimer = new RentalExpireTimer( this, duration.Duration );
m_RentalExpireTimer.Start();
}
public RentedVendor( Serial serial ) : base( serial )
{
}
public VendorRentalDuration RentalDuration
{
get{ return m_RentalDuration; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int RentalPrice
{
get{ return m_RentalPrice; }
set{ m_RentalPrice = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool LandlordRenew
{
get{ return m_LandlordRenew; }
set{ m_LandlordRenew = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool RenterRenew
{
get{ return m_RenterRenew; }
set{ m_RenterRenew = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool Renew
{
get{ return LandlordRenew && RenterRenew && House != null && House.DecayType != DecayType.Condemned; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int RenewalPrice
{
get{ return m_RenewalPrice; }
set{ m_RenewalPrice = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int RentalGold
{
get{ return m_RentalGold; }
set{ m_RentalGold = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public DateTime RentalExpireTime
{
get{ return m_RentalExpireTime; }
}
public override bool IsOwner( Mobile m )
{
return m == Owner || m.AccessLevel >= AccessLevel.GameMaster;
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Landlord
{
get
{
if ( House != null )
return House.Owner;
return null;
}
}
public bool IsLandlord( Mobile m )
{
return House != null && House.IsOwner( m );
}
public void ComputeRentalExpireDelay( out int days, out int hours )
{
TimeSpan delay = RentalExpireTime - DateTime.Now;
if ( delay <= TimeSpan.Zero )
{
days = 0;
hours = 0;
}
else
{
days = delay.Days;
hours = delay.Hours;
}
}
public void SendRentalExpireMessage( Mobile to )
{
int days, hours;
ComputeRentalExpireDelay( out days, out hours );
to.SendLocalizedMessage( 1062464, days.ToString() + "\t" + hours.ToString() ); // 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 != null && House.IsAosRules )
{
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 );
}
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( typeof( RenterVendorRentalGump ) );
from.SendGump( new RenterVendorRentalGump( m_Vendor ) );
m_Vendor.SendRentalExpireMessage( from );
}
else if ( m_Vendor.IsLandlord( from ) )
{
from.CloseGump( typeof( 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();
int amount;
try
{
amount = Convert.ToInt32( text );
}
catch
{
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( typeof( VendorRentalRefundGump ) );
owner.SendGump( new VendorRentalRefundGump( m_Vendor, from, amount ) );
}
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
writer.WriteEncodedInt( m_RentalDuration.ID );
writer.Write( (int) m_RentalPrice );
writer.Write( (bool) m_LandlordRenew );
writer.Write( (bool) m_RenterRenew );
writer.Write( (int) m_RenewalPrice );
writer.Write( (int) m_RentalGold );
writer.WriteDeltaTime( (DateTime) m_RentalExpireTime );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
int durationID = reader.ReadEncodedInt();
if ( durationID < VendorRentalDuration.Instances.Length )
m_RentalDuration = VendorRentalDuration.Instances[durationID];
else
m_RentalDuration = VendorRentalDuration.Instances[0];
m_RentalPrice = reader.ReadInt();
m_LandlordRenew = reader.ReadBool();
m_RenterRenew = reader.ReadBool();
m_RenewalPrice = reader.ReadInt();
m_RentalGold = reader.ReadInt();
m_RentalExpireTime = reader.ReadDeltaTime();
TimeSpan delay = m_RentalExpireTime - DateTime.Now;
m_RentalExpireTimer = new RentalExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
m_RentalExpireTimer.Start();
}
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.m_RentalExpireTime = DateTime.Now + m_Vendor.RentalDuration.Duration;
}
else
{
m_Vendor.Destroy( false );
}
}
}
}
}

View file

@ -0,0 +1,39 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBChainmailArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBChainmailArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBHelmetArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHelmetArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,57 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBLeatherArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBLeatherArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,46 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBMetalShields : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMetalShields()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBPlateArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBPlateArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBRingmailArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBRingmailArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBStuddedArmor: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBStuddedArmor()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBWoodenShields: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBWoodenShields()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( WoodenShield ), 30, 20, 0x1B7A, 0 ) );
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( WoodenShield ), 15 );
}
}
}
}

View file

@ -0,0 +1,80 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBAlchemist : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBAlchemist()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 ) );
Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) ); // This is on OSI :-P
}
}
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 );
}
}
}
}

View file

@ -0,0 +1,51 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBAnimalTrainer : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBAnimalTrainer()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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
{
public InternalSellInfo()
{
}
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBArchitect : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBArchitect()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,58 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBaker : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBaker()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,39 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBanker : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBanker()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( "1041243", typeof( ContractOfEmployment ), 1252, 20, 0x14F0, 0 ) );
if ( Multis.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
{
public InternalSellInfo()
{
}
}
}
}

View file

@ -0,0 +1,43 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBard: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBard()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,110 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBarkeeper : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBarkeeper()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 ( Multis.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 );
}
}
}
}

View file

@ -0,0 +1,37 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBeekeeper : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBeekeeper()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,234 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBlacksmith : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBlacksmith()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBBowyer : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBowyer()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( FletcherTools ), 2, 20, 0x1022, 0 ) );
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( FletcherTools ), 1 );
}
}
}
}

View file

@ -0,0 +1,62 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBButcher : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBButcher()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,92 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBCarpenter: SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCarpenter()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBCobbler : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCobbler()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,89 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBCook : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCook()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,76 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBFarmer : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFarmer()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 );
}
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBFisherman : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFisherman()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
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 ), 3, 80, 0x9CC, 0 ) );
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CD, 0 ) );
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CE, 0 ) );
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CF, 0 ) );
Add( new GenericBuyInfo( typeof( FishingPole ), 15, 20, 0xDC0, 0 ) );
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( RawFishSteak ), 1 );
Add( typeof( Fish ), 1 );
//TODO: Add( typeof( SmallFish ), 1 );
Add( typeof( FishingPole ), 7 );
}
}
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
public class SBFortuneTeller : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFortuneTeller()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( Bandage ), 5, 20, 0xE21, 0 ) );
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( Bandage ), 1 );
}
}
}
}

Some files were not shown because too many files have changed in this diff Show more