상속: BaseContainer, IDyable
예제 #1
2
		public override void InitOutfit( Faction faction )
		{
			new Horse().Rider = this;

			AddItem( new StuddedChest() );
			AddItem( new StuddedArms() );
			AddItem( new StuddedGloves() );
			AddItem( new StuddedGorget() );
			AddItem( new StuddedLegs() );
			AddItem( new Boots() );
			AddItem( new SkullCap() );

			Bow bow = new Bow();

			bow.Movable = false;
			bow.Crafter = this;
			bow.Quality = WeaponQuality.Exceptional;

			AddItem( bow );

			Container pack = new Backpack();

			pack.Movable = false;

			Arrow arrows = new Arrow( 250 );

			arrows.LootType = LootType.Newbied;

			pack.DropItem( arrows );
			pack.DropItem( new Gold( 10, 25 ) );

			AddItem( pack );
		}
예제 #2
0
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			//PackItem( new Gold( 1000 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			PackItem( new Spellbook( UInt64.MaxValue ) );
			
			Account account = (Account)m.Account;
				if(account.GetTag("AlreadyGotTheirGold") == null)
			{
				PackItem( new StatBall() );
				PackItem( new SkillBall() );
				PackItem( new BankCheck( 100000 ) );
				account.SetTag("AlreadyGotTheirGold", "True");
			}
			
		}
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			PackItem( new Gold( 100 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			PackItem( new BankCheck (900) );
			PackItem( new Runebook(10) );
			PackItem( new TrashPack() );
			PackItem( new SkillBall() );
			PackItem( new CorpseWand() );
			PackItem( new SkillBall() );
			PackItem( new PetLeash() );
			PackItem( new ResourceStorageKeyBlackSmith() );
			PackItem( new ResourceStorageKeyScribersTome() );
			PackItem( new ResourceStorageKeySpellCasters() );
			PackItem( new ResourceStorageKeyTailor() );
			PackItem( new NewPlayerPackage() );
			PackItem( new StatSkillPurchaseCrystal() );
			PackItem( new NewPlayerWelcomeHandbook() );
			//PackItem( new ResourceStorageKeyWood() );


		}
예제 #4
0
		public FamousPirates(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
		{
			this.Body = 400;
			this.Hue = Utility.RandomSkinHue();

			this.Skills[SkillName.DetectHidden].Base = 100;
			this.Skills[SkillName.MagicResist].Base = 100;
			this.Skills[SkillName.Magery].Base = 100;
            this.Skills[SkillName.Healing].Base = 100;

			int Hue = 0 ;

			Utility.AssignRandomHair( this, Hue );

			LeatherGloves glv = new LeatherGloves();
			glv.Hue = Hue;
			glv.LootType = LootType.Regular;
			AddItem(glv);

			Container pack = new Backpack();

			pack.Movable = false;

			AddItem( pack );

			Kills = 5;
		}
예제 #5
0
		public Dummy(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
		{
			Body = 400 + Utility.Random(2);
			Hue = Utility.RandomSkinHue();

			Skills[SkillName.DetectHidden].Base = 100;
			Skills[SkillName.MagicResist].Base = 120;

			Team = Utility.Random(3);

			int iHue = 20 + Team * 40;
			int jHue = 25 + Team * 40;

			Utility.AssignRandomHair( this, iHue );

			LeatherGloves glv = new LeatherGloves();
			glv.Hue = iHue;
			glv.LootType = LootType.Newbied;
			AddItem(glv);

			Container pack = new Backpack();

			pack.Movable = false;

			AddItem( pack );

			m_Timer = new AutokillTimer(this);
			m_Timer.Start();
		}
예제 #6
0
        public BushidoMaster3()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SetSkill(SkillName.Swords, 80.0, 85.0);
            SetSkill(SkillName.Parry, 100.0, 100.0);
            SetSkill(SkillName.Bushido, 100.0, 100.0);
            Name = "Murray";
            Title = ", Le Pirate Honorable";
            Direction = Direction.South;

            Body = 400;
            Hue = 33825;
            Blessed = true;

            InitStats(100, 100, 25);

            SpeechHue = 802;
            EmoteHue = 802;

            Backpack bp = new Backpack();
            bp.Movable = false;
            AddItem(bp);
            AddItem(new SkullCap(1759));
            AddItem(new Cutlass());
            AddItem(new ShortPants(1759));
            AddItem(new Shirt());
            AddItem(new Shoes(1759));

            QuestPlayer = null;
        }
예제 #7
0
        public ShadowFiend() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Body = 0xA8;

            Alignment = Alignment.Undead;

            // this to allow shadow fiend to loot from corpses
            var backpack = new Backpack();
            backpack.Movable = false;
            AddItem(backpack);

            SetStr(46, 55);
            SetDex(121, 130);
            SetInt(46, 55);

            SetHits(28, 33);
            SetStam(46, 55);

            SetDamage(10, 22);

            SetSkill(SkillName.MagicResist, 20.1, 30.0);
            SetSkill(SkillName.Tactics, 20.1, 30.0);
            SetSkill(SkillName.Wrestling, 20.1, 30.0);

            Fame = 1000;
            Karma = -1000;

            m_Timer = new UnhideTimer(this);
            m_Timer.Start();
        }
예제 #8
0
		public Actor () : base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 ) 
		{ 
			InitStats( 31, 41, 51 ); 

			SpeechHue = Utility.RandomDyedHue(); 

			Hue = Utility.RandomSkinHue(); 

			if ( this.Female = Utility.RandomBool() ) 
			{ 
				this.Body = 0x191; 
				this.Name = NameList.RandomName( "female" );
				AddItem( new FancyDress( Utility.RandomDyedHue() ) ); 
				Title = "the actress"; 
			} 
			else 
			{ 
				this.Body = 0x190; 
				this.Name = NameList.RandomName( "male" );
				AddItem( new LongPants( Utility.RandomNeutralHue() ) ); 
				AddItem( new FancyShirt( Utility.RandomDyedHue() ) );
				Title = "the actor";
			} 

			AddItem( new Boots( Utility.RandomNeutralHue() ) );

			Utility.AssignRandomHair( this );

			Container pack = new Backpack(); 
			pack.Movable = false; 

			AddItem( pack ); 
		} 
		//private static void AddBankbox2( Mobile m )
		//{
		//	BankBox2 box = m.Bankbox2;
//
//			if ( box == null )
//			{
//				box = new Bankbox2();
//				box.Movable = false;
//
//				
//			}
//
//		}
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
			Container cont;
			cont = new WoodenBox();
			cont.ItemID = 0xE7D;
			cont.Hue = 0x489;
			PlaceItemIn( cont, 16, 51, new NLeatherGorget() );
			PlaceItemIn( cont, 28, 51, new NLeatherArms() );
			PlaceItemIn( cont, 40, 51, new NLeatherGloves() );
			PlaceItemIn( cont, 52, 51, new NLeatherLegs() );
			
			PlaceItemIn( cont, 64, 115, new TokenLedger() );
			
 			PlaceItemIn( cont, 16, 115, new Candle() );
			PlaceItemIn( pack, 18, 169, cont );
			PlaceItemIn( pack, 16, 51, new SkillBall() );
			PlaceItemIn( pack, 56, 51, new SkillBall() );
			PlaceItemIn( pack, 66, 51, new SkillBall() );
			PlaceItemIn( pack, 80, 51, new StatBall() );
			PlaceItemIn( pack, 70, 169, new RuleBook1() );
			PlaceItemIn( pack, 164, 169, new BankCheck(  5000 ) );
			PlaceItemIn( pack, 164, 51, new CommandBook() );
		}
예제 #10
0
		public DecorBox()
		{
			Weight = 1.0;
			Hue = 1150;
			Item item = null;
			Name = "Defiance Decoration Member Box";


			PlaceItemIn( 10, 53, new FishTankPart1() );
			PlaceItemIn( 25, 53, new FishTankPart2() );
			PlaceItemIn( 50, 53, new AncientBedPart1() );
			PlaceItemIn( 85, 53, new AncientBedPart2() );
			PlaceItemIn( 90, 53, new AncientFruitBowl() );
			PlaceItemIn( 110, 53, new StoneSculpture() );

			BaseContainer cont;
			PlaceItemIn( 58, 57, (cont = new Backpack()) );
			cont.Hue = 2213;
			cont.Name = "a golden backpack";


			PlaceItemIn(130, 83, (item = new MembershipTicket()));
			item.Hue = 2213;
			((MembershipTicket)item).MemberShipTime = TimeSpan.FromDays(180);
		}
예제 #11
0
		public Artist()
			: base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
		{
			InitStats( 31, 41, 51 );

			SetSkill( SkillName.Healing, 36, 68 );


			SpeechHue = Utility.RandomDyedHue();
			Title = "the artist";
			Hue = Utility.RandomSkinHue();


			if( this.Female = Utility.RandomBool() )
			{
				this.Body = 0x191;
				this.Name = NameList.RandomName( "female" );
			}
			else
			{
				this.Body = 0x190;
				this.Name = NameList.RandomName( "male" );
			}
			AddItem( new Doublet( Utility.RandomDyedHue() ) );
			AddItem( new Sandals( Utility.RandomNeutralHue() ) );
			AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
			AddItem( new HalfApron( Utility.RandomDyedHue() ) );

			Utility.AssignRandomHair( this );

			Container pack = new Backpack();
			pack.Movable = false;

			AddItem( pack );
		}
예제 #12
0
        public Archambeau()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Archambeau";
            Title = "Guard of Knowledge";
            Body = 400;
            CantWalk = true;
            Hue = 33770;
            CantWalk = true;

            int hairHue = 0;
            Blessed = true;

            switch (Utility.Random(1))
            {
                case 0: AddItem(new LongHair(hairHue)); break;
            }
            switch (Utility.Random(1))
            {
                case 0: AddItem(new Vandyke(hairHue)); break;
            }

            AddItem(new Server.Items.Cloak(1882));
            AddItem(new Server.Items.Sandals(1530));
            AddItem(new Server.Items.Robe(1530));

            Backpack backpack = new Backpack();
            backpack.Hue = 1530;
            backpack.Movable = false;
            AddItem(backpack);

        }
예제 #13
0
        public static void CombineBackpacks( BaseCreature animal )
        {
            if ( Core.AOS )
                return;

            //if ( animal.IsBonded || animal.IsDeadPet )
            //	return;

            Container pack = animal.Backpack;

            if ( pack != null )
            {
                Container newPack = new Backpack();

                for ( int i = pack.Items.Count - 1; i >= 0; --i )
                {
                    if ( i >= pack.Items.Count )
                        continue;

                    newPack.DropItem( pack.Items[i] );
                }

                pack.DropItem( newPack );
            }
        }
		public override void OnDoubleClick( Mobile from )
		{
			Backpack bankbag = new Backpack();
			Container mobilePack = from.Backpack;
			BankBox mobileBox = from.BankBox;
			ArrayList equipitems = new ArrayList(from.Items);
			mobileBox.AddItem( bankbag );
			//				this.AddPlayer( player );
			from.Frozen = true;
			from.SendMessage( "All your belongings were transported to your bankbox.  You will need to close you backpack and re-open it for it to display the correct contents.");

			//				if ( Teams.Contains( from ) )
			//				{
			//					from.Frozen = true;
			//				}
			foreach (Item item in equipitems)
			{
				if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair) && (item.Layer != Layer.Mount))
				{
					mobilePack.DropItem( item );
				}
			}

			ArrayList packitems = new ArrayList( mobilePack.Items );

			foreach (Item items in packitems)
			{
				bankbag.DropItem(items);
			}
		}
예제 #15
0
[Constructable]public Crystal(){

///////////STR/DEX/INT
InitStats( 31, 41, 51 );

///////////name
Name = "Crystal";

///////////title
Title = "Quest Giver";

///////////sex. 0x191 is female, 0x190 is male.
Body = 0x191;

///////////skincolor
Hue = Utility.RandomSkinHue();

///////////Random hair and haircolor
Utility.AssignRandomHair( this );

///////////clothing and hues
AddItem( new Server.Items.Shirt( Utility.RandomBlueHue() ) );
AddItem( new Server.Items.LongPants( Utility.RandomBlueHue() ) );
AddItem( new Server.Items.Sandals( Utility.RandomBlueHue() ) );

///////////immortal and frozen to-the-spot features below:
Blessed = true;
CantWalk = true;

///////////Adding a backpack
Container pack = new Backpack();
pack.DropItem( new Gold( 250, 300 ) );
pack.Movable = false;
AddItem( pack );
}
예제 #16
0
        public BushidoMaster1()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SetSkill(SkillName.Macing, 50.0, 55.0);
            Name = "Cedric";
            Title = ", Le Combattant";
            Direction = Direction.South;

            Body = 400;
            Hue = 33825;
            Blessed = true;

            InitStats(100, 100, 25);

            SpeechHue = 802;
            EmoteHue = 802;

            Backpack bp = new Backpack();
            bp.Movable = false;
            AddItem(bp);
            AddItem(new Robe(2224));
            AddItem(new QuarterStaff());
            AddItem(new RingmailGloves());
            AddItem(new RingmailChest());
            AddItem(new RingmailLegs());
            Boots b = new Boots();
            b.Hue = 1527;
            AddItem(b);
            this.HairItemID = 8253;
            this.HairHue = 1129;
            QuestPlayer = null;
        }
예제 #17
0
        	private void setup()
        	{
            		Body = 999;
            		Name = "BaseBoss";

            		SetStr(100, 100);
            		SetDex(100, 100);
            		SetInt(100, 100);

            		SetHits(100);
            		SetStam(100, 100);

            		SetDamage(40, 50);

            		SetSkill(SkillName.Anatomy, 100.0);
            		SetSkill(SkillName.MagicResist, 100.0);
            		SetSkill(SkillName.Tactics, 100.0);
            		SetSkill(SkillName.DetectHidden, 200.0);

            		Fame = 1000;
            		Karma = -1000;

            		VirtualArmor = 130;

            		Backpack pack = new Backpack();
            		AddItem(pack);
        	}
예제 #18
0
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new Gold( 50000 ) ); // Starting gold can be customized here
			//PackItem( new MiniRewardCan() );
			//PackItem( new Dagger() );
            PackItem(new Spellbook(UInt64.MaxValue));
            //PackItem( new KeyRing());
            //PackItem( new PlayerGuide());
            PackItem( new Scissors());
             PackItem(new BagOfReagents());
            PackItem(new BagOfScrolls());
            PackItem(new ManaPotion( 5000 ) );
            PackItem(new GreaterHealPotion( 5000 ) );
            PackItem(new Bandage( 5000 ) );





		}
        public AGhostlyBlacksmith()
        {

            InitStats(31, 41, 51);

            Name = "A Ghostly Blacksmith";

            Title = "";

            Body = 0x190;
            Hue = 1072;


            AddItem(new Server.Items.DeathShroud());
            AddItem(new SmithHammer());



            Blessed = true;
            CantWalk = true;


            Container pack = new Backpack();
            pack.DropItem(new Gold(250, 300));
            pack.Movable = false;
            AddItem(pack);
        }
예제 #20
0
[Constructable]public Marrow(){

InitStats( 100, 100, 100 );

Name = "Marrow";

Title = "the chemist";

Body = 0x191;

Fame = 2000;
Karma = 3000;

Hue = Utility.RandomSkinHue();

Utility.AssignRandomHair( this );

AddItem( new Server.Items.Shirt( Utility.RandomRedHue() ) );
AddItem( new Server.Items.Skirt( Utility.RandomRedHue() ) );
AddItem( new Server.Items.Boots( Utility.RandomNeutralHue() ) );

Blessed = true;
CantWalk = true;

Container pack = new Backpack();
pack.DropItem( new Gold( 150, 200 ) );
pack.Movable = false;
AddItem( pack );
}
예제 #21
0
파일: Sculptor.cs 프로젝트: Crome696/ServUO
        public Sculptor()
            : base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
        {
            this.InitStats(31, 41, 51);

            this.SpeechHue = Utility.RandomDyedHue();
            this.Title = "the sculptor";
            this.Hue = Utility.RandomSkinHue();

            if (this.Female = Utility.RandomBool())
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName("female");
                this.AddItem(new Kilt(Utility.RandomNeutralHue()));
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName("male");
                this.AddItem(new LongPants(Utility.RandomNeutralHue()));
            }

            this.AddItem(new Doublet(Utility.RandomNeutralHue()));
            this.AddItem(new HalfApron());

            Utility.AssignRandomHair(this);

            Container pack = new Backpack();

            pack.DropItem(new Gold(250, 300));

            pack.Movable = false;

            this.AddItem(pack);
        }
예제 #22
0
        public BushidoMaster2()
            : base(AIType.AI_None, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Lee";
            Title = ", Le Combattant";
            Direction = Direction.South;

            Body = 400;
            Hue = 33825;
            Blessed = true;

            InitStats(25, 25, 25);
            SetHits(5);

            SpeechHue = 802;
            EmoteHue = 802;

            Backpack bp = new Backpack();
            bp.Movable = false;
            AddItem(bp);
            AddItem(new LeatherDo());
            AddItem(new LeatherHaidate());
            AddItem(new LeatherHiroSode());
            AddItem(new LeatherJingasa());
            Boots b = new Boots();
            b.Hue = 1527;
            AddItem(b);
            this.HairItemID = 8253;
            this.HairHue = 1129;
            QuestPlayer = null;
        }
예제 #23
0
        public MortysTheMaster()
            : base(AIType.AI_None, FightMode.None, 10, 1, 0.2, 0.4)
        {
            Name = "Mortys";
            Title = "Le Maitre";
            Direction = Direction.South;

            Body = 400;
            Hue = 33797;
            Blessed = true;

            InitStats(75, 75, 75);

            SpeechHue = 33;
            EmoteHue = 33;

            Backpack bp = new Backpack();
            bp.Movable = false;
            AddItem(bp);
            AddItem(new RobeACapuche(1109));
            Lantern l = new Lantern();
            l.Hue = 1109;
            AddItem(l);
            l.Ignite();
            Boots b = new Boots();
            b.Hue = 1109;
            AddItem(b);
        }
예제 #24
0
        public IchabodCrane()
            : base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
        {


            InitStats(31, 41, 51);


            Name = "Ichabod Crane";
            Body = 0x190;
            Hue = 1002;




            AddItem(new Server.Items.FancyShirt());
            AddItem(new Server.Items.LongPants());
            AddItem(new Server.Items.Boots());
            int hairHue = 1865;

            Utility.AssignRandomHair(this);

            Blessed = true;


            Container pack = new Backpack();
            pack.DropItem(new Gold(250, 300));
            pack.Movable = false;
            AddItem(pack);
        }
예제 #25
0
		public ArcherGuard( Mobile target ) : base( target )
		{
			InitStats( 100, 125, 25 );
			Title = "the guard";

			SpeechHue = Utility.RandomDyedHue();

			Hue = Utility.RandomSkinHue();

			if ( Female = Utility.RandomBool() )
			{
				Body = 0x191;
				Name = NameList.RandomName( "female" );
			}
			else
			{
				Body = 0x190;
				Name = NameList.RandomName( "male" );
			}

			new Horse().Rider = this;

			AddItem( new StuddedChest() );
			AddItem( new StuddedArms() );
			AddItem( new StuddedGloves() );
			AddItem( new StuddedGorget() );
			AddItem( new StuddedLegs() );
			AddItem( new Boots() );
			AddItem( new SkullCap() );

			Bow bow = new Bow();

			bow.Movable = false;
			bow.Crafter = this;
			bow.Quality = WeaponQuality.Exceptional;

			AddItem( bow );

			Container pack = new Backpack();

			pack.Movable = false;

			Arrow arrows = new Arrow( 250 );

			arrows.LootType = LootType.Newbied;

			pack.DropItem( arrows );
			pack.DropItem( new Gold( 10, 25 ) );

			AddItem( pack );

			Skills[SkillName.Anatomy].Base = 120.0;
			Skills[SkillName.Tactics].Base = 120.0;
			Skills[SkillName.Archery].Base = 120.0;
			Skills[SkillName.MagicResist].Base = 120.0;
			Skills[SkillName.DetectHidden].Base = 100.0;

			this.NextCombatTime = DateTime.Now + TimeSpan.FromSeconds( 0.5 );
			this.Focus = target;
		}
		public override bool OnBeforeDeath()
		{
			ShadowLord rm = new ShadowLord();
			rm.Team = this.Team;
			rm.Combatant = this.Combatant;
			rm.NoKillAwards = true;

			if ( rm.Backpack == null )
			{
				Backpack pack = new Backpack();
				pack.Movable = false;
				rm.AddItem( pack );
			}

			for ( int i = 0; i < 2; i++ )
			{
				LootPack.FilthyRich.Generate( this, rm.Backpack, true, LootPack.GetLuckChanceForKiller( this ) );
				LootPack.FilthyRich.Generate( this, rm.Backpack, false, LootPack.GetLuckChanceForKiller( this ) );
			}

			Effects.PlaySound(this, Map, GetDeathSound());
			Effects.SendLocationEffect( Location, Map, 0x3709, 30, 10, 0, 0 );
			rm.MoveToWorld( Location, Map );

			Delete();
			return false;
		}
예제 #27
0
		public ArmyBase(int Team, AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) 
            : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
		{
			this.Body = 400 + Utility.Random(2);
			this.Hue = Utility.RandomSkinHue();
            this.Team = Team;

			this.Skills[SkillName.DetectHidden].Base = 100;
            this.Skills[SkillName.MagicResist].Base = 120;

			int iHue = 20 + Team * 40;
			int jHue = 25 + Team * 40;

			Item hair = new Item( Utility.RandomList( 0x203C, 0x203B, 0x203C, 0x203D ) );
			hair.Hue = iHue;
			hair.Layer = Layer.Hair;
			hair.Movable = false;
			AddItem( hair );

			LeatherGloves glv = new LeatherGloves();
			glv.Hue = iHue;
			glv.LootType = LootType.Newbied;
			AddItem(glv);

			Container pack = new Backpack();

			pack.Movable = false;

			AddItem( pack );

			m_Timer = new AutokillTimer(this);
			m_Timer.Start();
		}
예제 #28
0
		public People (bool isFemale) : base( AIType.AI_None, FightMode.None, 10, 1, 0.2, 0.4 )
		{
			
			InitStats( 30, 30, 30 );

			SpeechHue = Utility.RandomDyedHue();
			Hue = Utility.RandomSkinHue();

			if (Female = isFemale) //  this.Female = Utility.RandomBool()
			{
				this.Body = 0x191;
				this.Name = "une femme";
				AddItem( new Server.Items.Robe( Utility.RandomNeutralHue() ) );
				switch ( Utility.Random ( 2 ) )
				{
						case 0: AddItem( new Skirt ( Utility.RandomNeutralHue() ) ); break;
						case 1: AddItem( new Kilt ( Utility.RandomNeutralHue() ) ); break;
				}
			}
			else
			{
				this.Body = 0x190;
				this.Name = "un homme";
				AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
				AddItem( new Server.Items.Robe( Utility.RandomNeutralHue() ) );
			}

			AddItem( new Boots( Utility.RandomNeutralHue() ) );

			Utility.AssignRandomHair( this );

			Container pack = new Backpack();
			pack.Movable = false;
			AddItem( pack );
		}
예제 #29
0
		public HordeMinionFamiliar()
		{
			Name = "a horde minion";
			Body = 776;
			BaseSoundID = 0x39D;

			SetStr( 100 );
			SetDex( 110 );
			SetInt( 100 );

			SetHits( 70 );
			SetStam( 110 );
			SetMana( 0 );

			SetDamage( 5, 10 );

			SetSkill( SkillName.Wrestling, 70.1, 75.0 );
			SetSkill( SkillName.Tactics, 50.0 );

			ControlSlots = 1;

			Container pack = Backpack;

			if ( pack != null )
				pack.Delete();

			pack = new Backpack();
			pack.Movable = false;
			pack.Weight = 13.0;

			AddItem( pack );
		}
예제 #30
0
파일: Sculptor.cs 프로젝트: Godkong/RunUO
        public Sculptor()
            : base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
        {
            InitStats( 31, 41, 51 );

            SpeechHue = Utility.RandomDyedHue();
            Title = "the sculptor";
            Hue = Utility.RandomSkinHue();

            if( this.Female = Utility.RandomBool() )
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName( "female" );
                AddItem( Skirt( Utility.RandomAllColors() ) );
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName( "male" );
                AddItem( PlainPants( Utility.RandomAllColors() ) );
            }

            AddItem(PlainShirt(Utility.RandomAllColors()));
            AddItem(new Shoes(Utility.RandomNeutralHue()));
            AddItem( new HalfApron( 2301 ) );

            Utility.AssignRandomHair( this );

            Container pack = new Backpack();

            pack.Movable = false;

            AddItem( pack );
        }
예제 #31
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.BankBox))
            {
                if (from.AccessLevel == AccessLevel.Player && Owner != from)
                {
                    from.SendAsciiMessage("This is not your item, only the owner can claim this.");
                    return;
                }

                Backpack bp = new Backpack {
                    Hue = 1170, Name = "Gift bag"
                };

                //PvP
                Bag pvpBag = new Bag {
                    Hue = 1, Name = "Gift bag"
                };
                pvpBag.DropItem(new FlamestrikeScroll {
                    Amount = 200, Name = "Flame Strike (gift)"
                });
                pvpBag.DropItem(new ManaPotion {
                    Amount = 500, Name = "Mana Potion (gift)"
                });
                pvpBag.DropItem(new GreaterHealPotion {
                    Amount = 500, Name = "greater heal potion (gift)"
                });
                pvpBag.DropItem(new KillRemoveBall {
                    Name = "Kill remove ball (gift)"
                });
                pvpBag.DropItem(new KillRemoveBall {
                    Name = "Kill remove ball (gift)"
                });
                pvpBag.DropItem(new KillRemoveBall {
                    Name = "Kill remove ball (gift)"
                });
                pvpBag.DropItem(new KillRemoveBall {
                    Name = "Kill remove ball (gift)"
                });
                pvpBag.DropItem(new KillRemoveBall {
                    Name = "Kill remove ball (gift)"
                });

                //Armor
                Bag armorBag = new Bag {
                    Hue = 1218, Name = "Gift bag"
                };
                armorBag.DropItem(new HeaterShield {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "heater shield (gift)"
                });
                armorBag.DropItem(new PlateChest {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail chest (gift)"
                });
                armorBag.DropItem(new PlateLegs {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail legs (gift)"
                });
                armorBag.DropItem(new PlateArms {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail arms (gift)"
                });
                armorBag.DropItem(new PlateGloves {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gloves (gift)"
                });
                armorBag.DropItem(new PlateGorget {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gorget (gift)"
                });
                armorBag.DropItem(new PlateHelm {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "plate helm (gift)"
                });

                Bag armorBag2 = new Bag {
                    Hue = 1218, Name = "Gift bag"
                };
                armorBag2.DropItem(new HeaterShield {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "heater shield (gift)"
                });
                armorBag2.DropItem(new PlateChest {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail chest (gift)"
                });
                armorBag2.DropItem(new PlateLegs {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail legs (gift)"
                });
                armorBag2.DropItem(new PlateArms {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail arms (gift)"
                });
                armorBag2.DropItem(new PlateGloves {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gloves (gift)"
                });
                armorBag2.DropItem(new PlateGorget {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gorget (gift)"
                });
                armorBag2.DropItem(new PlateHelm {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "plate helm (gift)"
                });

                Bag armorBag3 = new Bag {
                    Hue = 1218, Name = "Gift bag"
                };
                armorBag3.DropItem(new HeaterShield {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "heater shield (gift)"
                });
                armorBag3.DropItem(new PlateChest {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail chest (gift)"
                });
                armorBag3.DropItem(new PlateLegs {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail legs (gift)"
                });
                armorBag3.DropItem(new PlateArms {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail arms (gift)"
                });
                armorBag3.DropItem(new PlateGloves {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gloves (gift)"
                });
                armorBag3.DropItem(new PlateGorget {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gorget (gift)"
                });
                armorBag3.DropItem(new PlateHelm {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "plate helm (gift)"
                });

                //Add to backpack
                bp.DropItem(new Robe {
                    Hue = 1, Name = "robe (gift)"
                });
                bp.DropItem(new BankCheck(80000)
                {
                    Name = "(gift)"
                });
                bp.DropItem(new ExceptionalWeaponCrystal());
                bp.DropItem(new ExceptionalWeaponCrystal());
                bp.DropItem(pvpBag);
                bp.DropItem(armorBag);
                bp.DropItem(armorBag2);
                bp.DropItem(armorBag3);

                //Add to bank
                from.BankBox.DropItem(bp);

                from.SendAsciiMessage("Your items have been placed in a backpack in your bank box");

                Delete();
            }
            else
            {
                from.SendAsciiMessage("That must be in your bank box for you to use it.");
            }
        }
예제 #32
0
        public static void GetListOfItems(Mobile from)
        {
            //List of Item Locations Message
            //***Put item into Backpack
            #region Backpack
            from.SendMessage("You will find new items in your Backpack.");
            from.Backpack.AddItem(new KillBook());                          //http://www.runuo.com/forums/custom-script-releases/80034-book-kills.html
            from.Backpack.AddItem(new AnNoxGuideBook());
            #endregion

            //***Drop item on the Ground
            #region Ground
            //put item under player on the ground
            from.SendMessage("You will find new items on the ground near by.");
            new SewingKit().MoveToWorld(from.Location, from.Map);
            new Bible().MoveToWorld(from.Location, from.Map);               //http://www.runuo.com/forums/custom-script-releases/71826-runuo-2-0-rc1-lokais-xml-bible-system.html
            new BeltranGuideBook().MoveToWorld(from.Location, from.Map);    //http://www.runuo.com/forums/runuo-post-archive/34074-osi-library-books.html
            new PrimerArmsBook().MoveToWorld(from.Location, from.Map);      //http://www.runuo.com/forums/runuo-post-archive/34074-osi-library-books.html

            //put item near player on the ground
            new BagOfDresses().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfJewlery().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfShirts().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfPants().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfShoes().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfCloaks().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            new BagOfHats().MoveToWorld(new Point3D(from.X + Utility.RandomMinMax(-5, 5), from.Y + Utility.RandomMinMax(-5, 5), from.Z), from.Map);
            #endregion

            //***Put item into Bank
            #region Bank
            from.SendMessage("You will find new items in your Bank.");
            BankBox   bank = from.BankBox;
            Container cont;

            // Begin box of money
            cont        = new WoodenBox();
            cont.Name   = "Money Box";
            cont.ItemID = 0xE7D;
            cont.Hue    = 0x489;

            PlaceItemIn(cont, 64, 51, new BankCheck(5000));
            PlaceItemIn(cont, 16, 115, new Factions.Silver(1000));
            PlaceItemIn(cont, 34, 115, new Gold(1000));

            PlaceItemIn(bank, 18, 169, cont);

            // Begin bag of archery ammo
            cont      = new Bag();
            cont.Name = "Bag Of Archery Ammo";

            PlaceItemIn(cont, 48, 76, new Arrow(50));
            PlaceItemIn(cont, 72, 76, new Bolt(50));

            PlaceItemIn(bank, 118, 124, cont);

            // Begin bag of raw materials
            cont      = new Bag();
            cont.Hue  = 0x835;
            cont.Name = "Raw Materials Bag";

            PlaceItemIn(cont, 92, 84, new Leather(50));
            PlaceItemIn(cont, 30, 118, new Cloth(50));
            PlaceItemIn(cont, 30, 84, new Board(50));
            PlaceItemIn(cont, 57, 80, new BlankScroll(50));

            PlaceItemIn(bank, 98, 169, cont);

            // Begin bag of spell casting stuff
            cont      = new Backpack();
            cont.Hue  = 0x480;
            cont.Name = "Spell Casting Stuff";

            PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue));
            PlaceItemIn(cont, 65, 105, new NecromancerSpellbook((UInt64)0xFFFF));
            PlaceItemIn(cont, 85, 105, new BookOfChivalry((UInt64)0x3FF));
            PlaceItemIn(cont, 105, 105, new BookOfBushido());  //Default ctor = full
            PlaceItemIn(cont, 125, 105, new BookOfNinjitsu()); //Default ctor = full

            Runebook runebook = new Runebook(10);
            runebook.CurCharges = runebook.MaxCharges;
            PlaceItemIn(cont, 145, 105, runebook);

            Item toHue = new BagOfReagents(50);
            toHue.Hue  = 0x2D;
            toHue.Name = "Bag of Basic Reagents";
            PlaceItemIn(cont, 45, 150, toHue);

            toHue      = new BagOfNecroReagents(50);
            toHue.Hue  = 0x488;
            toHue.Name = "Bag of Necro Reagents";
            PlaceItemIn(cont, 65, 150, toHue);

            toHue      = new BagOfAllReagents(50);
            toHue.Hue  = 0x2D;
            toHue.Name = "Bag of All Reagents";
            PlaceItemIn(cont, 140, 150, toHue);

            for (int i = 0; i < 9; ++i)
            {
                PlaceItemIn(cont, 45 + (i * 10), 75, new RecallRune());
            }

            PlaceItemIn(cont, 141, 74, new FireHorn());

            PlaceItemIn(bank, 78, 169, cont);
            #endregion
        }
예제 #33
0
        public static void Fill(Mobile from, LockableContainer cont, int level, bool isSos)
        {
            var map  = from.Map;
            var luck = from is PlayerMobile ? ((PlayerMobile)from).RealLuck : from.Luck;

            cont.Movable = false;
            cont.Locked  = true;
            int count;

            if (level == 0)
            {
                cont.LockLevel = 0; // Can't be unlocked

                cont.DropItem(new Gold(Utility.RandomMinMax(50, 100)));

                if (Utility.RandomDouble() < 0.75)
                {
                    cont.DropItem(new TreasureMap(0, Map.Trammel));
                }
            }
            else
            {
                cont.TrapType  = TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.TrapLevel = level;

                switch (level)
                {
                case 1:
                    cont.RequiredSkill = 5;
                    break;

                case 2:
                    cont.RequiredSkill = 45;
                    break;

                case 3:
                    cont.RequiredSkill = 65;
                    break;

                case 4:
                    cont.RequiredSkill = 75;
                    break;

                case 5:
                    cont.RequiredSkill = 75;
                    break;

                case 6:
                    cont.RequiredSkill = 80;
                    break;

                case 7:
                    cont.RequiredSkill = 80;
                    break;
                }

                cont.LockLevel    = cont.RequiredSkill - 10;
                cont.MaxLockLevel = cont.RequiredSkill + 40;

                #region Gold
                cont.DropItem(new Gold(isSos ? level * 10000 : level * 5000));
                #endregion

                #region Scrolls
                if (isSos)
                {
                    switch (level)
                    {
                    default: count = 20; break;

                    case 0:
                    case 1: count = Utility.RandomMinMax(2, 5); break;

                    case 2: count = Utility.RandomMinMax(10, 15); break;
                    }
                }
                else
                {
                    count = level * 5;
                }

                for (int i = 0; i < count; ++i)
                {
                    cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
                }
                #endregion

                #region Magical Items
                double propsScale = 1.0;

                switch (level)
                {
                case 1:
                    count      = isSos ? Utility.RandomMinMax(2, 6) : 32;
                    propsScale = 0.5625;
                    break;

                case 2:
                    count      = isSos ? Utility.RandomMinMax(10, 15) : 40;
                    propsScale = 0.6875;
                    break;

                case 3:
                    count      = isSos ? Utility.RandomMinMax(15, 20) : 48;
                    propsScale = 0.875;
                    break;

                case 4:
                    count = isSos ? Utility.RandomMinMax(15, 20) : 56;
                    break;

                case 5:
                    count = isSos ? Utility.RandomMinMax(15, 20) : 64;
                    break;

                case 6:
                    count = isSos ? Utility.RandomMinMax(15, 20) : 72;
                    break;

                case 7:
                    count = isSos ? Utility.RandomMinMax(15, 20) : 80;
                    break;

                default:
                    count = 0;
                    break;
                }

                for (int i = 0; i < count; ++i)
                {
                    Item item;

                    item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();

                    if (item != null && RandomItemGenerator.Enabled)
                    {
                        int min, max;
                        GetRandomItemStat(out min, out max, propsScale);

                        RunicReforging.GenerateRandomItem(item, luck, min, max, map);

                        cont.DropItem(item);
                    }
                    else if (item is BaseWeapon)
                    {
                        BaseWeapon weapon = (BaseWeapon)item;

                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);

                        cont.DropItem(item);
                    }
                    else if (item is BaseArmor)
                    {
                        BaseArmor armor = (BaseArmor)item;

                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);

                        cont.DropItem(item);
                    }
                    else if (item is BaseHat)
                    {
                        BaseHat hat = (BaseHat)item;

                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);

                        cont.DropItem(item);
                    }
                    else if (item is BaseJewel)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                        cont.DropItem(item);
                    }
                }
            }
            #endregion

            #region Reagents
            if (isSos)
            {
                switch (level)
                {
                default: count = Utility.RandomMinMax(45, 60); break;

                case 0:
                case 1: count = Utility.RandomMinMax(15, 20); break;

                case 2: count = Utility.RandomMinMax(25, 40); break;
                }
            }
            else
            {
                count = level == 0 ? 12 : Utility.RandomMinMax(40, 60) * (level + 1);
            }

            for (int i = 0; i < count; i++)
            {
                cont.DropItemStacked(Loot.RandomPossibleReagent());
            }
            #endregion

            #region Gems
            if (level == 0)
            {
                count = 2;
            }
            else
            {
                count = (level * 3) + 1;
            }

            for (int i = 0; i < count; i++)
            {
                cont.DropItem(Loot.RandomGem());
            }
            #endregion

            #region Imbuing Ingreds
            if (level > 1)
            {
                Item item = Loot.Construct(m_ImbuingIngreds[Utility.Random(m_ImbuingIngreds.Length)]);

                item.Amount = level;
                cont.DropItem(item);
            }
            #endregion

            Item arty    = null;
            Item special = null;

            if (isSos)
            {
                if (0.004 * level > Utility.RandomDouble())
                {
                    arty = Loot.Construct(m_SOSArtifacts);
                }
                if (0.006 * level > Utility.RandomDouble())
                {
                    special = Loot.Construct(m_SOSDecor);
                }
                else if (0.009 * level > Utility.RandomDouble())
                {
                    special = new TreasureMap(Utility.RandomMinMax(level, Math.Min(7, level + 1)), cont.Map);
                }
            }
            else
            {
                if (level >= 7)
                {
                    if (0.025 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelSevenOnly);
                    }
                    else if (0.10 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.25 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }

                    arty = Loot.Construct(m_Artifacts);
                }
                else if (level >= 6)
                {
                    if (0.025 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.20 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }

                    arty = Loot.Construct(m_Artifacts);
                }
                else if (level >= 5)
                {
                    if (0.005 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.15 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }
                }
                else if (.10 > Utility.RandomDouble())
                {
                    special = GetRandomSpecial(level, cont.Map);
                }
            }

            if (arty != null)
            {
                Container pack = new Backpack();
                pack.Hue = 1278;

                pack.DropItem(arty);
                cont.DropItem(pack);
            }

            if (special != null)
            {
                cont.DropItem(special);
            }

            int rolls = 2;

            if (level >= 5)
            {
                rolls += level - 2;
            }

            RefinementComponent.Roll(cont, rolls, 0.10);
        }
        public ApagiteDonationBox()
        {
            Weight = 1.0;
            Hue    = 2425;
            Item item = null;

            Name = "Defiance Agapite Member Box";

            PlaceItemIn(16, 60, (item = new SkillBall(25)));
            item.Hue = 5;
            PlaceItemIn(28, 60, (item = new SkillBall(25)));
            item.Hue = 5;
            PlaceItemIn(41, 58, (item = new SevenGMSkillBall()));
            item.Hue = 1161;
            PlaceItemIn(53, 58, (item = new StatsBall()));
            item.Hue = 1161;

            PlaceItemIn(16, 81, (item = new HoodedShroudOfShadows()));
            item.Hue      = 2425;
            item.Name     = "Agapite Shroud of Shadows";
            item.LootType = LootType.Blessed;

            BaseContainer cont;

            PlaceItemIn(58, 57, (cont = new Backpack()));
            cont.Hue  = 2425;
            cont.Name = "a agapite backpack";

            cont.PlaceItemIn(44, 65, new SulfurousAsh(10000));
            cont.PlaceItemIn(77, 65, new Nightshade(10000));
            cont.PlaceItemIn(110, 65, new SpidersSilk(10000));
            cont.PlaceItemIn(143, 65, new Garlic(10000));

            cont.PlaceItemIn(44, 128, new Ginseng(10000));
            cont.PlaceItemIn(77, 128, new Bloodmoss(10000));
            cont.PlaceItemIn(110, 128, new BlackPearl(10000));
            cont.PlaceItemIn(143, 128, new MandrakeRoot(10000));

            PlaceItemIn(90, 58, (item = new AncientCoat()));
            item.Hue      = 2425;
            item.Name     = "Agapite Ancient Coat";
            item.LootType = LootType.Blessed;

            PlaceItemIn(74, 64, (item = new WizardGlasses()));
            item.Hue = Utility.RandomList(1150, 1151, 1154, 1153);
            PlaceItemIn(103, 58, (item = new Sandals()));
            item.Hue      = Utility.RandomList(1150, 1151, 1154, 1153);
            item.Name     = "Polar Sandals";
            item.LootType = LootType.Blessed;

            PlaceItemIn(122, 53, new SpecialDonateHairDye());
            PlaceItemIn(133, 53, new SpecialDonateBeardDye());

            PlaceItemIn(156, 55, (item = new EtherealLongManeHorse()));
            item.Hue = 2425;

            PlaceItemIn(34, 83, (item = new HolyDeedofBlessing()));
            item.Hue = 2425;
            PlaceItemIn(43, 83, (item = new CursedClothingBlessDeed()));
            item.Hue = 2425;
            PlaceItemIn(58, 83, (item = new SpecialHairRestylingDeed()));
            item.Hue = 2425;
            PlaceItemIn(73, 83, (item = new SmallBrickHouseDeed()));
            item.Hue = 2425;
            PlaceItemIn(88, 83, (item = new NameChangeDeed()));
            item.Hue = 2425;
            PlaceItemIn(103, 83, (item = new AntiBlessDeed()));
            item.Hue = 2425;
            PlaceItemIn(118, 83, (item = new BankCheck(100000)));
            item.Hue = 2425;
            PlaceItemIn(130, 83, (item = new MembershipTicket()));
            item.Hue = 2425;
            ((MembershipTicket)item).MemberShipTime = TimeSpan.FromDays(730);
        }
예제 #35
0
        public static void Fill(LockableContainer cont, int luck, int level, bool isSos)
        {
            cont.Movable = false;
            cont.Locked  = true;
            int numberItems;

            if (level == 0)
            {
                cont.LockLevel = 0; // Can't be unlocked

                cont.DropItem(new Gold(Utility.RandomMinMax(50, 100)));

                if (Utility.RandomDouble() < 0.75)
                {
                    cont.DropItem(new TreasureMap(0, Map.Trammel));
                }
            }
            else
            {
                cont.TrapType  = TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.TrapLevel = level;

                switch (level)
                {
                case 1:
                    cont.RequiredSkill = 36;
                    break;

                case 2:
                    cont.RequiredSkill = 76;
                    break;

                case 3:
                    cont.RequiredSkill = 84;
                    break;

                case 4:
                    cont.RequiredSkill = 92;
                    break;

                case 5:
                    cont.RequiredSkill = 105;
                    break;

                case 6:
                case 7:
                    cont.RequiredSkill = 110;
                    break;
                }

                cont.LockLevel    = cont.RequiredSkill - 10;
                cont.MaxLockLevel = cont.RequiredSkill + 40;

                cont.DropItem(new Gold(level * 5000));

                for (int i = 0; i < level * 5; ++i)
                {
                    cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
                }

                if (Core.SE)
                {
                    switch (level)
                    {
                    case 1:
                        numberItems = 32;
                        break;

                    case 2:
                        numberItems = 40;
                        break;

                    case 3:
                        numberItems = 48;
                        break;

                    case 4:
                        numberItems = 56;
                        break;

                    case 5:
                        numberItems = 64;
                        break;

                    case 6:
                        numberItems = 72;
                        break;

                    case 7:
                        numberItems = 80;
                        break;

                    default:
                        numberItems = 0;
                        break;
                    }
                }
                else
                {
                    numberItems = level * 6;
                }

                for (int i = 0; i < numberItems; ++i)
                {
                    Item item;

                    if (Core.AOS)
                    {
                        item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
                    }
                    else
                    {
                        item = Loot.RandomArmorOrShieldOrWeapon();
                    }

                    if (item != null && Core.HS && RandomItemGenerator.Enabled)
                    {
                        int min, max;
                        GetRandomItemStat(out min, out max);

                        RunicReforging.GenerateRandomItem(item, LootPack.GetLuckChance(luck), min, max);

                        cont.DropItem(item);
                    }
                    else if (item is BaseWeapon)
                    {
                        BaseWeapon weapon = (BaseWeapon)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
                        }
                        else
                        {
                            weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(6);
                            weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                            weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                        }

                        cont.DropItem(item);
                    }
                    else if (item is BaseArmor)
                    {
                        BaseArmor armor = (BaseArmor)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                        }
                        else
                        {
                            armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                            armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                        }

                        cont.DropItem(item);
                    }
                    else if (item is BaseHat)
                    {
                        BaseHat hat = (BaseHat)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
                        }

                        cont.DropItem(item);
                    }
                    else if (item is BaseJewel)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                        cont.DropItem(item);
                    }
                }
            }

            int reagents;

            if (level == 0)
            {
                reagents = 12;
            }
            else
            {
                reagents = level + 1;
            }

            for (int i = 0; i < reagents; i++)
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax(40, 60);
                cont.DropItem(item);
            }

            int gems;

            if (level == 0)
            {
                gems = 2;
            }
            else
            {
                gems = (level * 3) + 1;
            }

            for (int i = 0; i < gems; i++)
            {
                Item item = Loot.RandomGem();
                cont.DropItem(item);
            }

            if (level > 1)
            {
                Item item = Loot.Construct(m_ImbuingIngreds[Utility.Random(m_ImbuingIngreds.Length)]);

                item.Amount = level;
                cont.DropItem(item);
            }

            Item arty    = null;
            Item special = null;

            if (isSos)
            {
                if (0.002 * level > Utility.RandomDouble())
                {
                    arty = Loot.Construct(m_SOSArtifacts);
                }
            }
            else
            {
                if (level >= 7)
                {
                    if (0.025 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelSevenOnly);
                    }
                    else if (0.10 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.25 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }

                    arty = Loot.Construct(m_Artifacts);
                }
                else if (level >= 6)
                {
                    if (0.025 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.10 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }

                    arty = Loot.Construct(m_Artifacts);
                }
                else if (level >= 5)
                {
                    if (0.05 > Utility.RandomDouble())
                    {
                        special = Loot.Construct(m_LevelFiveToSeven);
                    }
                    else if (0.25 > Utility.RandomDouble())
                    {
                        special = GetRandomSpecial(level, cont.Map);
                    }
                }
                else if (.10 > Utility.RandomDouble())
                {
                    special = GetRandomSpecial(level, cont.Map);
                }
            }

            if (arty != null)
            {
                Container pack = new Backpack();
                pack.Hue = 1278;

                pack.DropItem(arty);
                cont.DropItem(pack);
            }

            if (special != null)
            {
                cont.DropItem(special);
            }
        }
예제 #36
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.BankBox))
            {
                if (from.AccessLevel == AccessLevel.Player && Owner != from)
                {
                    from.SendAsciiMessage("This is not your item, only the owner can claim this.");
                    return;
                }

                Backpack bp = new Backpack {
                    Hue = 1170, Name = "Gift bag"
                };

                Bag pvmBag = new Bag {
                    Hue = 1, Name = "Gift bag"
                };
                pvmBag.DropItem(new BladeSpiritsScroll {
                    Amount = 200, Name = "Blade spirit (gift)"
                });
                pvmBag.DropItem(new EnergyVortexScroll {
                    Amount = 100, Name = "Energy vortex (gift)"
                });
                pvmBag.DropItem(new ManaPotion {
                    Amount = 100, Name = "Mana Potion (gift)"
                });
                pvmBag.DropItem(new Arrow {
                    Amount = 10000, Name = "arrow (gift)"
                });
                pvmBag.DropItem(new Bloodmoss {
                    Amount = 400, Name = "Blood Mooss (gift)"
                });
                pvmBag.DropItem(new MandrakeRoot {
                    Amount = 400, Name = "Mandrake Root (gift)"
                });
                pvmBag.DropItem(new Ginseng {
                    Amount = 400, Name = "Ginseng (gift)"
                });
                pvmBag.DropItem(new BlackPearl {
                    Amount = 400, Name = "Black Pearl (gift)"
                });
                pvmBag.DropItem(new SpidersSilk {
                    Amount = 400, Name = "Spiders' Silk (gift)"
                });
                pvmBag.DropItem(new SulfurousAsh {
                    Amount = 400, Name = "Sulfurous Ash (gift)"
                });
                pvmBag.DropItem(new Nightshade {
                    Amount = 400, Name = "Nightshade (gift)"
                });
                pvmBag.DropItem(new Garlic {
                    Amount = 400, Name = "Garlic (gift)"
                });

                //Armor
                Bag armorBag = new Bag {
                    Hue = 1218
                };
                armorBag.DropItem(new HeaterShield {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "heater shield (gift)"
                });
                armorBag.DropItem(new PlateChest {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail chest (gift)"
                });
                armorBag.DropItem(new PlateLegs {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail legs (gift)"
                });
                armorBag.DropItem(new PlateArms {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail arms (gift)"
                });
                armorBag.DropItem(new PlateGloves {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gloves (gift)"
                });
                armorBag.DropItem(new PlateGorget {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "platemail gorget (gift)"
                });
                armorBag.DropItem(new PlateHelm {
                    Resource = CraftResource.BloodRock, Quality = ArmorQuality.Exceptional, Name = "plate helm (gift)"
                });

                //Mount
                Horse horse = new Horse
                {
                    ItemID        = 16034,
                    BodyValue     = 120,
                    Name          = "Mustang",
                    ControlMaster = from,
                    Controlled    = true,
                    MinTameSkill  = 100.0,
                    Hue           = Utility.Random(4, 900)
                };

                //Add to backpack
                bp.DropItem(new ShrinkItem(horse));
                bp.DropItem(new Robe {
                    Hue = 1963, Name = "robe (gift)"
                });
                bp.DropItem(new BankCheck(125000)
                {
                    Name = "(gift)"
                });
                bp.DropItem(pvmBag);
                bp.DropItem(armorBag);
                bp.DropItem(new ExceptionalWeaponCrystal());

                //Add to bank
                from.BankBox.DropItem(bp);

                Delete();
            }
            else
            {
                from.SendAsciiMessage("That must be in your bank box for you to use it.");
            }
        }
예제 #37
0
        private bool MoveItemsToBank(Mobile m)
        {
            Backpack  bag   = new Backpack();
            ArrayList equip = new ArrayList(m.Items);

            if (m.Backpack != null)
            {
                // count clothing items
                int WornCount = 0;
                foreach (Item i in equip)
                {
                    if (Moongate.RestrictedItem(m, i) == false)
                    {
                        continue;                               // not clothes
                    }
                    else
                    {
                        WornCount++;
                    }
                }

                // erl: added check for Mobile.Alive property... will not return false if mobile is not alive
                if (125 - m.BankBox.TotalItems - 1 - m.Backpack.TotalItems - WornCount < 0 && m.Alive)
                {
                    return(false);
                }

                // Unequip any items being worn
                foreach (Item i in equip)
                {
                    if (Moongate.RestrictedItem(m, i) == false)
                    {
                        continue;
                    }
                    else
                    {
                        m.Backpack.DropItem(i);
                    }
                }

                // Get a count of all items in the player's backpack.
                ArrayList items = new ArrayList(m.Backpack.Items);

                // Drop our new bag in the player's bank
                m.BankBox.DropItem(bag);

                // Run through all items in player's pack, move them to the bag we just dropped in the bank
                foreach (Item i in items)
                {
                    // If there's room, drop the item in the bank, otherwise drop it on the ground
                    if (bag.TryDropItem(m, i, false) || !m.Alive)
                    {
                        bag.DropItem(i);
                    }
                    else
                    {
                        i.DropToWorld(m, m.Location);
                    }
                }
            }

            // Give them a Deathrobe, Stinger dagger, and a blank spell book
            if (m.Alive)
            {
                Item robe = new Server.Items.DeathRobe();
                if (!m.EquipItem(robe))
                {
                    robe.Delete();
                }
            }

            Item aiStinger = new Server.Items.AIStinger();

            if (!m.AddToBackpack(aiStinger))
            {
                aiStinger.Delete();
            }

            Item spellbook = new Server.Items.Spellbook();

            if (!m.AddToBackpack(spellbook))
            {
                spellbook.Delete();
            }
            return(true);
        }
예제 #38
0
        private void AddHarvestToPack(Mobile m, Item i) // Adds a passed item to the passed mobiles pack
        {
            Backpack pack = (Backpack)m.Backpack;

            pack.DropItem(i);
        }
예제 #39
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            int newAmount = 0;

            if (m_James == null)
            {
                return(false);
            }

            if (DonationList.ContainsValue(MaxAmount))
            {
                m_James.SayTo(from, true, "Thank you but we have already reached our donation amount!");
                return(false);
            }

            if (dropped is IronIngot && dropped.Tag == "mining")
            {
                if (!DonationList.ContainsKey((PlayerMobile)from))
                {
                    newAmount = dropped.Amount;
                    if (newAmount > MaxAmount)
                    {
                        from.AddToBackpack(new IronIngot(newAmount - MaxAmount));
                        newAmount = MaxAmount;
                    }

                    DonationList.Add((PlayerMobile)from, dropped.Amount);
                }
                else
                {
                    DonationList.TryGetValue((PlayerMobile)from, out newAmount);

                    newAmount += dropped.Amount;
                    if (newAmount > MaxAmount)
                    {
                        from.AddToBackpack(new IronIngot(newAmount - MaxAmount));
                        newAmount = MaxAmount;
                    }

                    DonationList.Remove((PlayerMobile)from);
                    DonationList.Add((PlayerMobile)from, newAmount);
                }

                if (DonationList.ContainsValue(MaxAmount))
                {
                    m_James.Say(true, String.Format("{0}! You are the first to reach our donation goal! Thank you for your help and here is your reward!", from.Name));
                    World.Broadcast(m_James.SpeechHue, true, String.Format("James: {0} was the first to donate a total of {1} iron ingots. Congratulations!", from.Name, MaxAmount));
                    Backpack prize = new Backpack();
                    prize.LootType = LootType.Newbied;
                    prize.AddItem(new Forge()
                    {
                        Movable = false, Weight = 255
                    });

                    from.AddToBackpack(prize);
                }
                else
                {
                    DonationList.TryGetValue((PlayerMobile)from, out newAmount);
                    m_James.Say(true, String.Format("Thank you {0}! You have donated {1} iron ingots in total.", from.Name, newAmount));
                }

                UpdateBook();

                dropped.Delete();
                Tag = "mining";
                return(true);
            }
            else if (dropped.Tag != "mining")
            {
                m_James.SayTo(from, true, "You can only donate ingots that have been mined after the event began!");
                Tag = "mining";
                return(false);
            }
            else
            {
                m_James.SayTo(from, true, "You can only donate iron ingots!");
                Tag = "mining";
                return(false);
            }
        }