#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
56
Scripts/Mobiles/Vendors/NPC/Alchemist.cs
Normal file
56
Scripts/Mobiles/Vendors/NPC/Alchemist.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Alchemist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
477
Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs
Normal file
477
Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs
Normal file
|
|
@ -0,0 +1,477 @@
|
|||
using System;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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!
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseClaimList( Mobile from )
|
||||
{
|
||||
from.CloseGump( typeof( ClaimListGump ) );
|
||||
}
|
||||
|
||||
public void BeginClaimList( Mobile from )
|
||||
{
|
||||
if ( Deleted || !from.CheckAlive() )
|
||||
return;
|
||||
|
||||
List<BaseCreature> list = new List<BaseCreature>();
|
||||
|
||||
for ( int i = 0; i < from.Stabled.Count; ++i )
|
||||
{
|
||||
BaseCreature pet = from.Stabled[i] as BaseCreature;
|
||||
|
||||
if ( pet == null || pet.Deleted )
|
||||
{
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
from.Stabled.RemoveAt( i );
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
|
||||
list.Add( pet );
|
||||
}
|
||||
|
||||
if ( list.Count > 0 )
|
||||
from.SendGump( new ClaimListGump( this, from, list ) );
|
||||
else
|
||||
SayTo( from, 502671 ); // But I have no animals stabled with me at the moment!
|
||||
}
|
||||
|
||||
public void EndClaimList( Mobile from, BaseCreature pet )
|
||||
{
|
||||
if ( pet == null || pet.Deleted || from.Map != this.Map || !from.Stabled.Contains( pet ) || !from.CheckAlive() )
|
||||
return;
|
||||
|
||||
if ( !from.InRange( this, 14 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( CanClaim( from, pet ) )
|
||||
{
|
||||
DoClaim( from, pet );
|
||||
|
||||
from.Stabled.Remove( pet );
|
||||
|
||||
if ( from is PlayerMobile )
|
||||
((PlayerMobile)from).AutoStabled.Remove( pet );
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 1049612, pet.Name ); // ~1_NAME~ remained in the stables because you have too many followers.
|
||||
}
|
||||
}
|
||||
|
||||
public void BeginStable( Mobile from )
|
||||
{
|
||||
if ( Deleted || !from.CheckAlive() )
|
||||
return;
|
||||
|
||||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if ( ( from.Backpack == null || from.Backpack.GetAmount( typeof( Gold ) ) < 30 ) && ( bank == null || bank.GetAmount( typeof( Gold ) ) < 30 ) )
|
||||
{
|
||||
SayTo( from, 1042556 ); // Thou dost not have enough gold, not even in thy bank account.
|
||||
}
|
||||
else
|
||||
{
|
||||
/* I charge 30 gold per pet for a real week's stable time.
|
||||
* I will withdraw it from thy bank account.
|
||||
* Which animal wouldst thou like to stable here?
|
||||
*/
|
||||
from.SendLocalizedMessage(1042558);
|
||||
|
||||
from.Target = new StableTarget( this );
|
||||
}
|
||||
}
|
||||
|
||||
public void EndStable( Mobile from, BaseCreature pet )
|
||||
{
|
||||
if ( Deleted || !from.CheckAlive() )
|
||||
return;
|
||||
|
||||
if ( pet.Body.IsHuman )
|
||||
{
|
||||
SayTo( from, 502672 ); // HA HA HA! Sorry, I am not an inn.
|
||||
}
|
||||
else if ( !pet.Controlled )
|
||||
{
|
||||
SayTo( from, 1048053 ); // You can't stable that!
|
||||
}
|
||||
else if ( pet.ControlMaster != from )
|
||||
{
|
||||
SayTo( from, 1042562 ); // You do not own that pet!
|
||||
}
|
||||
else if ( pet.IsDeadPet )
|
||||
{
|
||||
SayTo( from, 1049668 ); // Living pets only, please.
|
||||
}
|
||||
else if ( pet.Summoned )
|
||||
{
|
||||
SayTo( from, 502673 ); // I can not stable summoned creatures.
|
||||
}
|
||||
/*
|
||||
else if ( pet.Allured )
|
||||
{
|
||||
SayTo( from, 1048053 ); // You can't stable that!
|
||||
}
|
||||
*/
|
||||
else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != 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.FindBankNoCreate();
|
||||
|
||||
if ( ( from.Backpack != null && from.Backpack.ConsumeTotal( typeof( Gold ), 30 ) ) || ( 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;
|
||||
pet.StabledBy = from;
|
||||
|
||||
if ( Core.SE )
|
||||
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy
|
||||
|
||||
from.Stabled.Add( pet );
|
||||
|
||||
SayTo( from, Core.AOS ? 1049677 : 502679 ); // [AOS: Your pet has been stabled.] Very well, thy pet is stabled. Thou mayst recover it by saying 'claim' to me. In one real world week, I shall sell it off if it is not claimed!
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 502677 ); // But thou hast not the funds in thy bank account!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Claim( Mobile from )
|
||||
{
|
||||
Claim( from, null );
|
||||
}
|
||||
|
||||
public void Claim( Mobile from, string petName )
|
||||
{
|
||||
if ( Deleted || !from.CheckAlive() )
|
||||
return;
|
||||
|
||||
bool claimed = false;
|
||||
int stabled = 0;
|
||||
|
||||
bool claimByName = ( petName != null );
|
||||
|
||||
for ( int i = 0; i < from.Stabled.Count; ++i )
|
||||
{
|
||||
BaseCreature pet = from.Stabled[i] as BaseCreature;
|
||||
|
||||
if ( pet == null || pet.Deleted )
|
||||
{
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
from.Stabled.RemoveAt( i );
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
|
||||
++stabled;
|
||||
|
||||
if ( claimByName && !Insensitive.Equals( pet.Name, petName ) )
|
||||
continue;
|
||||
|
||||
if ( CanClaim( from, pet ) )
|
||||
{
|
||||
DoClaim( from, pet );
|
||||
|
||||
from.Stabled.RemoveAt( i );
|
||||
|
||||
if ( from is PlayerMobile )
|
||||
((PlayerMobile)from).AutoStabled.Remove( pet );
|
||||
|
||||
--i;
|
||||
|
||||
claimed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 1049612, pet.Name ); // ~1_NAME~ remained in the stables because you have too many followers.
|
||||
}
|
||||
}
|
||||
|
||||
if ( claimed )
|
||||
SayTo( from, 1042559 ); // Here you go... and good day to you!
|
||||
else if ( stabled == 0 )
|
||||
SayTo( from, 502671 ); // But I have no animals stabled with me at the moment!
|
||||
else if ( claimByName )
|
||||
BeginClaimList( from );
|
||||
}
|
||||
|
||||
public bool CanClaim( Mobile from, BaseCreature pet )
|
||||
{
|
||||
return ((from.Followers + pet.ControlSlots) <= from.FollowersMax);
|
||||
}
|
||||
|
||||
private void DoClaim( Mobile from, BaseCreature pet )
|
||||
{
|
||||
pet.SetControlMaster( from );
|
||||
|
||||
if ( pet.Summoned )
|
||||
pet.SummonMaster = from;
|
||||
|
||||
pet.ControlTarget = from;
|
||||
pet.ControlOrder = OrderType.Follow;
|
||||
|
||||
pet.MoveToWorld( from.Location, from.Map );
|
||||
|
||||
pet.IsStabled = false;
|
||||
pet.StabledBy = null;
|
||||
|
||||
if ( Core.SE )
|
||||
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
if ( !e.Handled && e.HasKeyword( 0x0008 ) ) // *stable*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
CloseClaimList( e.Mobile );
|
||||
BeginStable( e.Mobile );
|
||||
}
|
||||
else if ( !e.Handled && e.HasKeyword( 0x0009 ) ) // *claim*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
CloseClaimList( e.Mobile );
|
||||
|
||||
int index = e.Speech.IndexOf( ' ' );
|
||||
|
||||
if ( index != -1 )
|
||||
Claim( e.Mobile, e.Speech.Substring( index ).Trim() );
|
||||
else
|
||||
Claim( e.Mobile );
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnSpeech( e );
|
||||
}
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Vendors/NPC/Architect.cs
Normal file
45
Scripts/Mobiles/Vendors/NPC/Architect.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Architect : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
96
Scripts/Mobiles/Vendors/NPC/Armorer.cs
Normal file
96
Scripts/Mobiles/Vendors/NPC/Armorer.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Armorer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Mobiles/Vendors/NPC/Baker.cs
Normal file
42
Scripts/Mobiles/Vendors/NPC/Baker.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Baker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Mobiles/Vendors/NPC/Bard.cs
Normal file
48
Scripts/Mobiles/Vendors/NPC/Bard.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Bard : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Mobiles/Vendors/NPC/Barkeeper.cs
Normal file
54
Scripts/Mobiles/Vendors/NPC/Barkeeper.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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( Utility.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Mobiles/Vendors/NPC/Beekeeper.cs
Normal file
42
Scripts/Mobiles/Vendors/NPC/Beekeeper.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Beekeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
148
Scripts/Mobiles/Vendors/NPC/Blacksmith.cs
Normal file
148
Scripts/Mobiles/Vendors/NPC/Blacksmith.cs
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Blacksmith : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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 OnSuccessfulBulkOrderReceive( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Mobiles/Vendors/NPC/Bowyer.cs
Normal file
65
Scripts/Mobiles/Vendors/NPC/Bowyer.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias( "Server.Mobiles.Bower" )]
|
||||
public class Bowyer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Scripts/Mobiles/Vendors/NPC/Butcher.cs
Normal file
49
Scripts/Mobiles/Vendors/NPC/Butcher.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Butcher : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Mobiles/Vendors/NPC/Carpenter.cs
Normal file
56
Scripts/Mobiles/Vendors/NPC/Carpenter.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Carpenter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Mobiles/Vendors/NPC/Cobbler.cs
Normal file
46
Scripts/Mobiles/Vendors/NPC/Cobbler.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cobbler : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Scripts/Mobiles/Vendors/NPC/Cook.cs
Normal file
57
Scripts/Mobiles/Vendors/NPC/Cook.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cook : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
588
Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs
Normal file
588
Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs
Normal file
|
|
@ -0,0 +1,588 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class CustomHairstylist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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, List<BuyItemResponse> 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 Utility.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Scripts/Mobiles/Vendors/NPC/Farmer.cs
Normal file
60
Scripts/Mobiles/Vendors/NPC/Farmer.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Farmer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Mobiles/Vendors/NPC/Fisherman.cs
Normal file
50
Scripts/Mobiles/Vendors/NPC/Fisherman.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Fisherman : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Vendors/NPC/Furtrader.cs
Normal file
45
Scripts/Mobiles/Vendors/NPC/Furtrader.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Furtrader : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Scripts/Mobiles/Vendors/NPC/Glassblower.cs
Normal file
49
Scripts/Mobiles/Vendors/NPC/Glassblower.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias( "Server.Mobiles.GargoyleAlchemist" )]
|
||||
public class Glassblower : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs
Normal file
45
Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GolemCrafter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Mobiles/Vendors/NPC/Guildmasters/BardGuildmaster.cs
Normal file
40
Scripts/Mobiles/Vendors/NPC/Guildmasters/BardGuildmaster.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
167
Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs
Normal file
167
Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseGuildmaster : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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.UtcNow )
|
||||
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.UtcNow || (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.UtcNow )
|
||||
{
|
||||
SayTo( from, 501048 ); // You are too young to join my guild...
|
||||
}
|
||||
else if ( CheckCustomReqs( pm ) )
|
||||
{
|
||||
SayWelcomeTo( from );
|
||||
|
||||
pm.NpcGuild = this.NpcGuild;
|
||||
pm.NpcGuildJoinTime = DateTime.UtcNow;
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs
Normal file
54
Scripts/Mobiles/Vendors/NPC/Guildmasters/MageGuildmaster.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Mobiles/Vendors/NPC/Guildmasters/MinerGuildmaster.cs
Normal file
36
Scripts/Mobiles/Vendors/NPC/Guildmasters/MinerGuildmaster.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
127
Scripts/Mobiles/Vendors/NPC/Guildmasters/ThiefGuildmaster.cs
Normal file
127
Scripts/Mobiles/Vendors/NPC/Guildmasters/ThiefGuildmaster.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.ContextMenus;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
if ( Core.ML && from.Alive )
|
||||
{
|
||||
RechargeEntry entry = new RechargeEntry( from, this );
|
||||
|
||||
if ( WeaponEngravingTool.Find( from ) == null )
|
||||
entry.Enabled = false;
|
||||
|
||||
list.Add( entry );
|
||||
}
|
||||
|
||||
base.AddCustomContextEntries( from, list );
|
||||
}
|
||||
|
||||
private class RechargeEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Mobile m_Vendor;
|
||||
|
||||
public RechargeEntry( Mobile from, Mobile vendor ) : base( 6271, 6 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Vendor = vendor;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if ( !Core.ML || m_Vendor == null || m_Vendor.Deleted )
|
||||
return;
|
||||
|
||||
WeaponEngravingTool tool = WeaponEngravingTool.Find( m_From );
|
||||
|
||||
if ( tool != null && tool.UsesRemaining <= 0 )
|
||||
{
|
||||
if ( Banker.GetBalance( m_From ) >= 100000 )
|
||||
m_From.SendGump( new WeaponEngravingTool.ConfirmGump( tool, m_Vendor ) );
|
||||
else
|
||||
m_Vendor.Say( 1076167 ); // You need a 100,000 gold and a blue diamond to recharge the weapon engraver.
|
||||
}
|
||||
else
|
||||
m_Vendor.Say( 1076164 ); // I can only help with this if you are carrying an engraving tool that needs repair.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs
Normal file
86
Scripts/Mobiles/Vendors/NPC/GypsyAnimalTrainer.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
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();
|
||||
|
||||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
89
Scripts/Mobiles/Vendors/NPC/GypsyBanker.cs
Normal file
89
Scripts/Mobiles/Vendors/NPC/GypsyBanker.cs
Normal 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( Utility.RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shoes );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs
Normal file
80
Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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( Utility.RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
|
||||
|
||||
Item item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Mobiles/Vendors/NPC/HairStylist.cs
Normal file
43
Scripts/Mobiles/Vendors/NPC/HairStylist.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HairStylist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Mobiles/Vendors/NPC/Herbalist.cs
Normal file
50
Scripts/Mobiles/Vendors/NPC/Herbalist.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Herbalist : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Scripts/Mobiles/Vendors/NPC/HolyMage.cs
Normal file
82
Scripts/Mobiles/Vendors/NPC/HolyMage.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HolyMage : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Mobiles/Vendors/NPC/InnKeeper.cs
Normal file
48
Scripts/Mobiles/Vendors/NPC/InnKeeper.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class InnKeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
124
Scripts/Mobiles/Vendors/NPC/IronWorker.cs
Normal file
124
Scripts/Mobiles/Vendors/NPC/IronWorker.cs
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class IronWorker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
|
||||
if ( item == null )
|
||||
AddItem( new FullApron( Utility.RandomBrightHue() ) );
|
||||
|
||||
AddItem( new Bascinet() );
|
||||
AddItem( new SmithHammer() );
|
||||
|
||||
item = FindItemOnLayer( Layer.Pants );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerLegs );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.InnerTorso );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
|
||||
item = FindItemOnLayer( Layer.Shirt );
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Mobiles/Vendors/NPC/Jeweler.cs
Normal file
41
Scripts/Mobiles/Vendors/NPC/Jeweler.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Jeweler : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
85
Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs
Normal file
85
Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class KeeperOfChivalry : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs
Normal file
40
Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class LeatherWorker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Scripts/Mobiles/Vendors/NPC/Mage.cs
Normal file
60
Scripts/Mobiles/Vendors/NPC/Mage.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mage : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Mobiles/Vendors/NPC/Mapmaker.cs
Normal file
41
Scripts/Mobiles/Vendors/NPC/Mapmaker.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mapmaker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Mobiles/Vendors/NPC/Miller.cs
Normal file
41
Scripts/Mobiles/Vendors/NPC/Miller.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Miller : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Scripts/Mobiles/Vendors/NPC/Miner.cs
Normal file
51
Scripts/Mobiles/Vendors/NPC/Miner.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Miner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Mobiles/Vendors/NPC/Monk.cs
Normal file
53
Scripts/Mobiles/Vendors/NPC/Monk.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Monk : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos{ get { return m_SBInfos; } }
|
||||
|
||||
[Constructable]
|
||||
public Monk() : base( "the Monk" )
|
||||
{
|
||||
SetSkill( SkillName.EvalInt, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 70.0, 90.0 );
|
||||
SetSkill( SkillName.Wrestling, 70.0, 90.0 );
|
||||
SetSkill( SkillName.MagicResist, 70.0, 90.0 );
|
||||
SetSkill( SkillName.Macing, 70.0, 90.0 );
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add( new SBMonk() );
|
||||
}
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new Sandals() );
|
||||
AddItem( new MonkRobe() );
|
||||
}
|
||||
|
||||
public Monk( 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Vendors/NPC/Provisioner.cs
Normal file
45
Scripts/Mobiles/Vendors/NPC/Provisioner.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Provisioner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Scripts/Mobiles/Vendors/NPC/Rancher.cs
Normal file
49
Scripts/Mobiles/Vendors/NPC/Rancher.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Mobiles/Vendors/NPC/Ranger.cs
Normal file
56
Scripts/Mobiles/Vendors/NPC/Ranger.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Ranger : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
187
Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs
Normal file
187
Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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.UtcNow > m_NextCheckPack && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && m.Player )
|
||||
{
|
||||
Container pack = m.Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
{
|
||||
m_NextCheckPack = DateTime.UtcNow + TimeSpan.FromSeconds( 2.0 );
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Scripts/Mobiles/Vendors/NPC/Scribe.cs
Normal file
80
Scripts/Mobiles/Vendors/NPC/Scribe.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Scribe : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos{ get { return m_SBInfos; } }
|
||||
|
||||
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
|
||||
|
||||
private DateTime m_NextShush;
|
||||
public static readonly TimeSpan ShushDelay = TimeSpan.FromMinutes( 1 );
|
||||
|
||||
[Constructable]
|
||||
public Scribe() : base( "the scribe" )
|
||||
{
|
||||
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 override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
return from.Player;
|
||||
}
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
base.OnSpeech( e );
|
||||
|
||||
if ( !e.Handled && m_NextShush <= DateTime.UtcNow && InLOS( e.Mobile ) )
|
||||
{
|
||||
Direction = GetDirectionTo( e.Mobile );
|
||||
|
||||
PlaySound( Female ? 0x32F : 0x441 );
|
||||
PublicOverheadMessage( Network.MessageType.Regular, 0x3B2, 1073990 ); // Shhhh!
|
||||
|
||||
m_NextShush = DateTime.UtcNow + ShushDelay;
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
Scripts/Mobiles/Vendors/NPC/Shipwright.cs
Normal file
49
Scripts/Mobiles/Vendors/NPC/Shipwright.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Shipwright : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs
Normal file
50
Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias( "Server.Mobiles.GargoyleStonecrafter" )]
|
||||
public class StoneCrafter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
99
Scripts/Mobiles/Vendors/NPC/Tailor.cs
Normal file
99
Scripts/Mobiles/Vendors/NPC/Tailor.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tailor : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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 OnSuccessfulBulkOrderReceive( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Mobiles/Vendors/NPC/Tanner.cs
Normal file
41
Scripts/Mobiles/Vendors/NPC/Tanner.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tanner : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs
Normal file
47
Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class TavernKeeper : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Mobiles/Vendors/NPC/Thief.cs
Normal file
56
Scripts/Mobiles/Vendors/NPC/Thief.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Thief : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Vendors/NPC/Tinker.cs
Normal file
45
Scripts/Mobiles/Vendors/NPC/Tinker.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Tinker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Mobiles/Vendors/NPC/Vagabond.cs
Normal file
65
Scripts/Mobiles/Vendors/NPC/Vagabond.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Vagabond : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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( Utility.RandomBrightHue() ) );
|
||||
AddItem( new Shoes( GetShoeHue() ) );
|
||||
AddItem( new LongPants( GetRandomHue() ) );
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
AddItem( new Cloak( Utility.RandomBrightHue() ) );
|
||||
|
||||
switch ( Utility.Random( 2 ) )
|
||||
{
|
||||
case 0: AddItem( new SkullCap( Utility.RandomNeutralHue() ) ); break;
|
||||
case 1: AddItem( new Bandana( Utility.RandomNeutralHue() ) ); break;
|
||||
}
|
||||
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
|
||||
PackGold( 100, 200 );
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs
Normal file
40
Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class VarietyDealer : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Mobiles/Vendors/NPC/Veterinarian.cs
Normal file
47
Scripts/Mobiles/Vendors/NPC/Veterinarian.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Mobiles/Vendors/NPC/Waiter.cs
Normal file
48
Scripts/Mobiles/Vendors/NPC/Waiter.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Waiter : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs
Normal file
117
Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Weaponsmith : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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 OnSuccessfulBulkOrderReceive( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
Scripts/Mobiles/Vendors/NPC/Weaver.cs
Normal file
99
Scripts/Mobiles/Vendors/NPC/Weaver.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Engines.BulkOrders;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Weaver : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> 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 OnSuccessfulBulkOrderReceive( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue