From 83a0990f8eb28caeb35107dfb53b6545ff46bf9f Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 31 Jul 2011 03:40:44 +0000 Subject: [PATCH] --- Scripts/SpecialSystems/Engines/GiftGiving.cs | 88 +++++++ Scripts/SpecialSystems/Engines/TestCenter.cs | 246 ++++++++++++++++++ .../Items/Stones/AlchemyStone.cs | 46 ++++ .../SpecialSystems/Items/Stones/GMStone.cs | 56 ++++ .../Items/Stones/GamblingStone.cs | 123 +++++++++ .../SpecialSystems/Items/Stones/IngotStone.cs | 46 ++++ .../SpecialSystems/Items/Stones/RegStone.cs | 46 ++++ .../Items/Stones/ScribeStone.cs | 46 ++++ .../SpecialSystems/Items/Stones/SmithStone.cs | 46 ++++ .../Items/Stones/TailorStone.cs | 46 ++++ .../Items/SupplyBags/AlchemyBag.cs | 47 ++++ .../Items/SupplyBags/BagOfIngots.cs | 49 ++++ .../Items/SupplyBags/ScribeBag.cs | 46 ++++ .../Items/SupplyBags/SmithBag.cs | 49 ++++ .../Items/SupplyBags/TailorBag.cs | 52 ++++ 15 files changed, 1032 insertions(+) create mode 100644 Scripts/SpecialSystems/Engines/GiftGiving.cs create mode 100644 Scripts/SpecialSystems/Engines/TestCenter.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/GMStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/GamblingStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/IngotStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/RegStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/ScribeStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/SmithStone.cs create mode 100644 Scripts/SpecialSystems/Items/Stones/TailorStone.cs create mode 100644 Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs create mode 100644 Scripts/SpecialSystems/Items/SupplyBags/BagOfIngots.cs create mode 100644 Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs create mode 100644 Scripts/SpecialSystems/Items/SupplyBags/SmithBag.cs create mode 100644 Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs diff --git a/Scripts/SpecialSystems/Engines/GiftGiving.cs b/Scripts/SpecialSystems/Engines/GiftGiving.cs new file mode 100644 index 000000000..94cbbd2a6 --- /dev/null +++ b/Scripts/SpecialSystems/Engines/GiftGiving.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using Server; +using Server.Accounting; +using Server.Items; + +namespace Server.Misc +{ + public enum GiftResult + { + Backpack, + BankBox + } + + public class GiftGiving + { + private static List m_Givers = new List(); + + public static void Register( GiftGiver giver ) + { + m_Givers.Add( giver ); + } + + public static void Initialize() + { + EventSink.Login += new LoginEventHandler( EventSink_Login ); + } + + private static void EventSink_Login( LoginEventArgs e ) + { + Account acct = e.Mobile.Account as Account; + + if ( acct == null ) + return; + + DateTime now = DateTime.Now; + + for ( int i = 0; i < m_Givers.Count; ++i ) + { + GiftGiver giver = m_Givers[i]; + + if ( now < giver.Start || now >= giver.Finish ) + continue; // not in the correct timefream + + if ( acct.Created > (giver.Start - giver.MinimumAge) ) + continue; // newly created account + + if ( acct.LastLogin >= giver.Start ) + continue; // already got one + + giver.DelayGiveGift( TimeSpan.FromSeconds( 5.0 ), e.Mobile ); + } + + acct.LastLogin = now; + } + } + + public abstract class GiftGiver + { + public virtual TimeSpan MinimumAge{ get{ return TimeSpan.FromDays( 30.0 ); } } + + public abstract DateTime Start{ get; } + public abstract DateTime Finish{ get; } + public abstract void GiveGift( Mobile mob ); + + public virtual void DelayGiveGift( TimeSpan delay, Mobile mob ) + { + Timer.DelayCall( delay, new TimerStateCallback( DelayGiveGift_Callback ), mob ); + } + + protected virtual void DelayGiveGift_Callback( object state ) + { + GiveGift( (Mobile) state ); + } + + public virtual GiftResult GiveGift( Mobile mob, Item item ) + { + if ( mob.PlaceInBackpack( item ) ) + { + if ( !WeightOverloading.IsOverloaded( mob ) ) + return GiftResult.Backpack; + } + + mob.BankBox.DropItem( item ); + return GiftResult.BankBox; + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Engines/TestCenter.cs b/Scripts/SpecialSystems/Engines/TestCenter.cs new file mode 100644 index 000000000..44d1cc07d --- /dev/null +++ b/Scripts/SpecialSystems/Engines/TestCenter.cs @@ -0,0 +1,246 @@ +using System; +using System.Text; +using Server.Gumps; +using Server.Network; +using Server.Commands; + +namespace Server.Misc +{ + public class TestCenter + { + private const bool m_Enabled = false; + public static bool Enabled { get{ return m_Enabled; } } + + public static void Initialize() + { + // Register our speech handler + if( Enabled ) + EventSink.Speech += new SpeechEventHandler( EventSink_Speech ); + } + + private static void EventSink_Speech( SpeechEventArgs args ) + { + if ( !args.Handled ) + { + if( Insensitive.StartsWith( args.Speech, "set" ) ) + { + Mobile from = args.Mobile; + + string[] split = args.Speech.Split( ' ' ); + + if ( split.Length == 3 ) + { + try + { + string name = split[1]; + double value = Convert.ToDouble( split[2] ); + + if ( Insensitive.Equals( name, "str" ) ) + ChangeStrength( from, (int)value ); + else if ( Insensitive.Equals( name, "dex" ) ) + ChangeDexterity( from, (int)value ); + else if ( Insensitive.Equals( name, "int" ) ) + ChangeIntelligence( from, (int)value ); + else + ChangeSkill( from, name, value ); + } + catch + { + } + } + } + else if( Insensitive.Equals( args.Speech, "help" ) ) + { + args.Mobile.SendGump( new TCHelpGump() ); + + args.Handled = true; + } + } + } + + private static void ChangeStrength( Mobile from, int value ) + { + if ( value < 10 || value > 125 ) + { + from.SendLocalizedMessage( 1005628 ); // Stats range between 10 and 125. + } + else + { + if ( (value + from.RawDex + from.RawInt) > from.StatCap ) + { + from.SendLocalizedMessage( 1005629 ); // You can not exceed the stat cap. Try setting another stat lower first. + } + else + { + from.RawStr = value; + from.SendLocalizedMessage( 1005630 ); // Your stats have been adjusted. + } + } + } + + private static void ChangeDexterity( Mobile from, int value ) + { + if ( value < 10 || value > 125 ) + { + from.SendLocalizedMessage( 1005628 ); // Stats range between 10 and 125. + } + else + { + if ( (from.RawStr + value + from.RawInt) > from.StatCap ) + { + from.SendLocalizedMessage( 1005629 ); // You can not exceed the stat cap. Try setting another stat lower first. + } + else + { + from.RawDex = value; + from.SendLocalizedMessage( 1005630 ); // Your stats have been adjusted. + } + } + } + + private static void ChangeIntelligence( Mobile from, int value ) + { + if ( value < 10 || value > 125 ) + { + from.SendLocalizedMessage( 1005628 ); // Stats range between 10 and 125. + } + else + { + if ( (from.RawStr + from.RawDex + value) > from.StatCap ) + { + from.SendLocalizedMessage( 1005629 ); // You can not exceed the stat cap. Try setting another stat lower first. + } + else + { + from.RawInt = value; + from.SendLocalizedMessage( 1005630 ); // Your stats have been adjusted. + } + } + } + + private static void ChangeSkill( Mobile from, string name, double value ) + { + SkillName index; + + try + { + index = (SkillName)Enum.Parse( typeof( SkillName ), name, true ); + } + catch + { + from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set. + return; + } + + if ( ( !Core.SE && (int)index > 51 ) || ( !Core.AOS && (int)index > 48 ) ) + { + from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set. + return; + } + + Skill skill = from.Skills[index]; + + if ( skill != null ) + { + if ( value < 0 || value > skill.Cap ) + { + from.SendMessage( String.Format( "Your skill in {0} is capped at {1:F1}.", skill.Info.Name, skill.Cap ) ); + } + else + { + int newFixedPoint = (int)(value * 10.0); + int oldFixedPoint = skill.BaseFixedPoint; + + if ( ((skill.Owner.Total - oldFixedPoint) + newFixedPoint) > skill.Owner.Cap ) + { + from.SendMessage( "You can not exceed the skill cap. Try setting another skill lower first." ); + } + else + { + skill.BaseFixedPoint = newFixedPoint; + } + } + } + else + { + from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set. + } + } + + + public class TCHelpGump : Gump + { + public TCHelpGump() : base( 40, 40 ) + { + AddPage( 0 ); + AddBackground( 0, 0, 160, 120, 5054 ); + + AddButton( 10, 10, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0 ); + AddLabel( 45, 10, 0x34, "RunUO.com" ); + + AddButton( 10, 35, 0xFB7, 0xFB9, 2, GumpButtonType.Reply, 0 ); + AddLabel( 45, 35, 0x34, "List of skills" ); + + AddButton( 10, 60, 0xFB7, 0xFB9, 3, GumpButtonType.Reply, 0 ); + AddLabel( 45, 60, 0x34, "Command list" ); + + AddButton( 10, 85, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0 ); + AddLabel( 45, 85, 0x34, "Close" ); + } + + public override void OnResponse( NetState sender, RelayInfo info ) + { + switch ( info.ButtonID ) + { + case 1: // RunUO.com + { + sender.LaunchBrowser( "http://www.RunUO.com" ); + break; + } + case 2: // List of skills + { + string[] strings = Enum.GetNames( typeof( SkillName ) ); + + Array.Sort( strings ); + + StringBuilder sb = new StringBuilder(); + + if ( strings.Length > 0 ) + sb.Append( strings[0] ); + + for ( int i = 1; i < strings.Length; ++i ) + { + string v = strings[i]; + + if ( (sb.Length + 1 + v.Length) >= 256 ) + { + sender.Send( new AsciiMessage( Server.Serial.MinusOne, -1, MessageType.Label, 0x35, 3, "System", sb.ToString() ) ); + sb = new StringBuilder(); + sb.Append( v ); + } + else + { + sb.Append( ' ' ); + sb.Append( v ); + } + } + + if ( sb.Length > 0 ) + { + sender.Send( new AsciiMessage( Server.Serial.MinusOne, -1, MessageType.Label, 0x35, 3, "System", sb.ToString() ) ); + } + + break; + } + case 3: // Command list + { + sender.Mobile.SendAsciiMessage( 0x482, "The command prefix is \"{0}\"", CommandSystem.Prefix ); + CommandHandlers.Help_OnCommand( new CommandEventArgs( sender.Mobile, "help", "", new string[0] ) ); + + break; + } + } + } + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs b/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs new file mode 100644 index 000000000..a22455393 --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/AlchemyStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class AlchemyStone : Item + { + public override string DefaultName + { + get { return "an Alchemist Supply Stone"; } + } + + [Constructable] + public AlchemyStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x250; + } + + public override void OnDoubleClick( Mobile from ) + { + AlchemyBag alcBag = new AlchemyBag(); + + if ( !from.AddToBackpack( alcBag ) ) + alcBag.Delete(); + } + + public AlchemyStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/GMStone.cs b/Scripts/SpecialSystems/Items/Stones/GMStone.cs new file mode 100644 index 000000000..5576ab5cc --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/GMStone.cs @@ -0,0 +1,56 @@ +#if false +using System; +using Server.Network; +using Server.Commands; + +namespace Server.Items +{ + public class GMStone : Item + { + public override string DefaultName + { + get { return "a GM stone"; } + } + + [Constructable] + public GMStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x489; + } + + public GMStone( 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 OnDoubleClick( Mobile from ) + { + if ( from.AccessLevel < AccessLevel.GameMaster ) + { + from.AccessLevel = AccessLevel.GameMaster; + + from.SendAsciiMessage( 0x482, "The command prefix is \"{0}\"", CommandSystem.Prefix ); + CommandHandlers.Help_OnCommand( new CommandEventArgs( from, "help", "", new string[0] ) ); + } + else + { + from.SendMessage( "The stone has no effect." ); + } + } + } +} +#endif \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs b/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs new file mode 100644 index 000000000..4faa0e06d --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/GamblingStone.cs @@ -0,0 +1,123 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class GamblingStone : Item + { + private int m_GamblePot = 2500; + + [CommandProperty( AccessLevel.GameMaster )] + public int GamblePot + { + get + { + return m_GamblePot; + } + set + { + m_GamblePot = value; + InvalidateProperties(); + } + } + + public override string DefaultName + { + get { return "a gambling stone"; } + } + + [Constructable] + public GamblingStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x56; + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + list.Add( "Jackpot: {0}gp", m_GamblePot ); + } + + public override void OnSingleClick( Mobile from ) + { + base.OnSingleClick( from ); + base.LabelTo( from, "Jackpot: {0}gp", m_GamblePot ); + } + + public override void OnDoubleClick( Mobile from ) + { + Container pack = from.Backpack; + + if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 250 ) ) + { + m_GamblePot += 150; + InvalidateProperties(); + + int roll = Utility.Random( 1200 ); + + if ( roll == 0 ) // Jackpot + { + from.SendMessage( 0x35, "You win the {0}gp jackpot!", m_GamblePot ); + from.AddToBackpack( new BankCheck( m_GamblePot ) ); + + m_GamblePot = 2500; + } + else if ( roll <= 20 ) // Chance for a regbag + { + from.SendMessage( 0x35, "You win a bag of reagents!" ); + from.AddToBackpack( new BagOfReagents( 50 ) ); + } + else if ( roll <= 40 ) // Chance for gold + { + from.SendMessage( 0x35, "You win 1500gp!" ); + from.AddToBackpack( new BankCheck( 1500 ) ); + } + else if ( roll <= 100 ) // Another chance for gold + { + from.SendMessage( 0x35, "You win 1000gp!" ); + from.AddToBackpack( new BankCheck( 1000 ) ); + } + else // Loser! + { + from.SendMessage( 0x22, "You lose!" ); + } + } + else + { + from.SendMessage( 0x22, "You need at least 250gp in your backpack to use this." ); + } + } + + public GamblingStone( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + + writer.Write( (int) m_GamblePot ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + + switch ( version ) + { + case 0: + { + m_GamblePot = reader.ReadInt(); + + break; + } + } + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/IngotStone.cs b/Scripts/SpecialSystems/Items/Stones/IngotStone.cs new file mode 100644 index 000000000..8da5a3064 --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/IngotStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class IngotStone : Item + { + public override string DefaultName + { + get { return "an Ingot stone"; } + } + + [Constructable] + public IngotStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x480; + } + + public override void OnDoubleClick( Mobile from ) + { + BagOfingots ingotBag = new BagOfingots( 5000 ); + + if ( !from.AddToBackpack( ingotBag ) ) + ingotBag.Delete(); + } + + public IngotStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/RegStone.cs b/Scripts/SpecialSystems/Items/Stones/RegStone.cs new file mode 100644 index 000000000..10baff918 --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/RegStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class RegStone : Item + { + public override string DefaultName + { + get { return "a reagent stone"; } + } + + [Constructable] + public RegStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x2D1; + } + + public override void OnDoubleClick( Mobile from ) + { + BagOfReagents regBag = new BagOfReagents( 50 ); + + if ( !from.AddToBackpack( regBag ) ) + regBag.Delete(); + } + + public RegStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs b/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs new file mode 100644 index 000000000..57ad6498d --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/ScribeStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class ScribeStone : Item + { + public override string DefaultName + { + get { return "a Scribe Supply Stone"; } + } + + [Constructable] + public ScribeStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x105; + } + + public override void OnDoubleClick( Mobile from ) + { + ScribeBag scribeBag = new ScribeBag(); + + if ( !from.AddToBackpack( scribeBag ) ) + scribeBag.Delete(); + } + + public ScribeStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/SmithStone.cs b/Scripts/SpecialSystems/Items/Stones/SmithStone.cs new file mode 100644 index 000000000..c6c9502c3 --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/SmithStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class SmithStone : Item + { + public override string DefaultName + { + get { return "a Blacksmith Supply Stone"; } + } + + [Constructable] + public SmithStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x476; + } + + public override void OnDoubleClick( Mobile from ) + { + SmithBag SmithBag = new SmithBag( 5000 ); + + if ( !from.AddToBackpack( SmithBag ) ) + SmithBag.Delete(); + } + + public SmithStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/Stones/TailorStone.cs b/Scripts/SpecialSystems/Items/Stones/TailorStone.cs new file mode 100644 index 000000000..184c0e7e9 --- /dev/null +++ b/Scripts/SpecialSystems/Items/Stones/TailorStone.cs @@ -0,0 +1,46 @@ +using System; +using Server.Items; + +namespace Server.Items +{ + public class TailorStone : Item + { + public override string DefaultName + { + get { return "a Tailor Supply Stone"; } + } + + [Constructable] + public TailorStone() : base( 0xED4 ) + { + Movable = false; + Hue = 0x315; + } + + public override void OnDoubleClick( Mobile from ) + { + TailorBag tailorBag = new TailorBag(); + + if ( !from.AddToBackpack( tailorBag ) ) + tailorBag.Delete(); + } + + public TailorStone( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs new file mode 100644 index 000000000..f2176b5d0 --- /dev/null +++ b/Scripts/SpecialSystems/Items/SupplyBags/AlchemyBag.cs @@ -0,0 +1,47 @@ +using System; +using Server; +using Server.Items; + +namespace Server.Items +{ + public class AlchemyBag : Bag + { + public override string DefaultName + { + get { return "an Alchemy Kit"; } + } + + [Constructable] + public AlchemyBag() : this( 1 ) + { + Movable = true; + Hue = 0x250; + } + + [Constructable] + public AlchemyBag( int amount ) + { + DropItem( new MortarPestle( 5 ) ); + DropItem( new BagOfReagents( 5000 ) ); + DropItem( new Bottle( 5000 ) ); + } + + public AlchemyBag( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/SupplyBags/BagOfIngots.cs b/Scripts/SpecialSystems/Items/SupplyBags/BagOfIngots.cs new file mode 100644 index 000000000..213e0cd97 --- /dev/null +++ b/Scripts/SpecialSystems/Items/SupplyBags/BagOfIngots.cs @@ -0,0 +1,49 @@ +using System; +using Server; +using Server.Items; + +namespace Server.Items +{ + public class BagOfingots : Bag + { + [Constructable] + public BagOfingots() : this( 5000 ) + { + } + + [Constructable] + public BagOfingots( int amount ) + { + DropItem( new DullCopperIngot ( amount ) ); + DropItem( new ShadowIronIngot ( amount ) ); + DropItem( new CopperIngot ( amount ) ); + DropItem( new BronzeIngot ( amount ) ); + DropItem( new GoldIngot ( amount ) ); + DropItem( new AgapiteIngot ( amount ) ); + DropItem( new VeriteIngot ( amount ) ); + DropItem( new ValoriteIngot ( amount ) ); + DropItem( new IronIngot ( amount ) ); + DropItem( new Tongs() ); + DropItem( new TinkerTools() ); + + } + + public BagOfingots( 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(); + } + } +} diff --git a/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs new file mode 100644 index 000000000..e4d82a584 --- /dev/null +++ b/Scripts/SpecialSystems/Items/SupplyBags/ScribeBag.cs @@ -0,0 +1,46 @@ +using System; +using Server; +using Server.Items; + +namespace Server.Items +{ + public class ScribeBag : Bag + { + public override string DefaultName + { + get { return "a Scribe Kit"; } + } + + [Constructable] + public ScribeBag() : this( 1 ) + { + Movable = true; + Hue = 0x105; + } + + [Constructable] + public ScribeBag( int amount ) + { + DropItem( new BagOfReagents( 5000 ) ); + DropItem( new BlankScroll( 500 ) ); + } + + public ScribeBag( 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(); + } + } +} \ No newline at end of file diff --git a/Scripts/SpecialSystems/Items/SupplyBags/SmithBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/SmithBag.cs new file mode 100644 index 000000000..994fafe37 --- /dev/null +++ b/Scripts/SpecialSystems/Items/SupplyBags/SmithBag.cs @@ -0,0 +1,49 @@ +using System; +using Server; +using Server.Items; + +namespace Server.Items +{ + public class SmithBag : Bag + { + [Constructable] + public SmithBag() : this( 5000 ) + { + } + + [Constructable] + public SmithBag( int amount ) + { + DropItem( new DullCopperIngot ( amount ) ); + DropItem( new ShadowIronIngot ( amount ) ); + DropItem( new CopperIngot ( amount ) ); + DropItem( new BronzeIngot ( amount ) ); + DropItem( new GoldIngot ( amount ) ); + DropItem( new AgapiteIngot ( amount ) ); + DropItem( new VeriteIngot ( amount ) ); + DropItem( new ValoriteIngot ( amount ) ); + DropItem( new IronIngot ( amount ) ); + DropItem( new Tongs ( amount ) ); + DropItem( new TinkerTools ( amount ) ); + + } + + public SmithBag( 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(); + } + } +} diff --git a/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs b/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs new file mode 100644 index 000000000..6cbdad498 --- /dev/null +++ b/Scripts/SpecialSystems/Items/SupplyBags/TailorBag.cs @@ -0,0 +1,52 @@ +using System; +using Server; +using Server.Items; + +namespace Server.Items +{ + public class TailorBag : Bag + { + public override string DefaultName + { + get { return "a Tailoring Kit"; } + } + + [Constructable] + public TailorBag() : this( 1 ) + { + Movable = true; + Hue = 0x315; + } + + [Constructable] + public TailorBag( int amount ) + { + DropItem( new SewingKit( 5 ) ); + DropItem( new Scissors() ); + DropItem( new Hides( 500 ) ); + DropItem( new BoltOfCloth( 20 ) ); + DropItem( new DyeTub() ); + DropItem( new DyeTub() ); + DropItem( new BlackDyeTub() ); + DropItem( new Dyes() ); + } + + public TailorBag( 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(); + } + } +} \ No newline at end of file