示例#1
0
		public override void OnDestroyed( WoodenBox lootbox )
		{
			Item book;

			if( Utility.RandomBool( ) )
			{
				book = new BlueBook( );
			}
			else
			{
				book = new BrownBook( );
			}

			if( book != null || !book.Deleted )
				lootbox.DropItem( book );

			if( Utility.RandomDouble( ) < 0.25 )
			{
				Item loot;

				if( Utility.RandomBool( ) )
				{
					loot = new ScribesPen( );
				}
				else
				{
					loot = new MapmakersPen( );
				}

				if( loot != null || !loot.Deleted )
					lootbox.DropItem( loot );
			}
		}
示例#2
0
 public override void OnDestroyed(WoodenBox lootbox)
 {
     if (Utility.RandomDouble( ) < 0.25)
     {
         lootbox.DropItem(new IronOre(Utility.RandomMinMax(1, 8)));
     }
 }
示例#3
0
 public override void OnDestroyed( WoodenBox lootbox )
 {
     if( Utility.RandomDouble( ) < 0.25 )
     {
         lootbox.DropItem( new IronOre( Utility.RandomMinMax( 1, 8 ) ) );
     }
 }
示例#4
0
        public override void OnDestroyed(WoodenBox lootbox)
        {
            Item book;

            if (Utility.RandomBool( ))
            {
                book = new BlueBook( );
            }
            else
            {
                book = new BrownBook( );
            }

            if (book != null || !book.Deleted)
            {
                lootbox.DropItem(book);
            }

            if (Utility.RandomDouble( ) < 0.25)
            {
                Item loot;

                if (Utility.RandomBool( ))
                {
                    loot = new ScribesPen( );
                }
                else
                {
                    loot = new MapmakersPen( );
                }

                if (loot != null || !loot.Deleted)
                {
                    lootbox.DropItem(loot);
                }
            }
        }
示例#5
0
        // Deux sous fonctions qui permettent de vider la zone de location, lorsque le proprio perd la maison.
        private void DumpItems()
        {
            if (m_Container != null)
            {
                WoodenBox b = new WoodenBox();
                b.MaxItems = int.MaxValue;
                b.Name     = m_OwnerName;

                List <Item> toMove            = new List <Item>();
                Rectangle2D rect              = new Rectangle2D(RegionPoint1, RegionPoint2);
                IPooledEnumerable <Item> list = Map.Felucca.GetItemsInBounds(rect);

                foreach (Item i in list)
                {
                    if (i != null && !(i is BaseDoor))
                    {
                        toMove.Add(i);
                    }
                }
                list.Free();

                for (int i = 0; i < toMove.Count; ++i)
                {
                    b.DropItem(toMove[i]);
                    toMove[i].Movable = true;
                }

                // Seulement ouvrable par le owner, qui obtient une nouvelle clef à chaque fois.
                GenerateKey.GenerateNewKey(m_Proprio, b, 1);
                b.Locked = true;

                // Ajout de la boite lockée dans le container lié à la maison.
                m_Container.DropItem(b);
                b.CanBeAltered = false;
                b.Movable      = false;
            }
        }
示例#6
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( !this.IsChildOf( from.Backpack ) )
            {
                // This item must be in your backpack to be used.
                from.SendLocalizedMessage( 1062334 );
                return;
            }

            if ( from != Owner )
            {
                from.SendLocalizedMessage( 1116257 ); // This token does not belong to this character.
                return;
            }

            var acct = from.Account as Account;
            if ( acct.Trial )
            {
                from.SendLocalizedMessage( 1116258 ); // Trial account cannot use this token.
                return;
            }

            var totalTime = ( DateTime.Now - acct.Created );
            if ( totalTime >= TimeSpan.FromDays( 30.0 ) )
            {
                from.SendLocalizedMessage( 1116259 ); // This can only be used by accounts less than 1 month old.
                return;
            }

            BankBox bankbox = from.BankBox;

            WoodenBox box = new WoodenBox();
            box.Name = "A Starter Kit";
            box.Hue = 66;
            box.ItemID = 3709;

            if ( from.Race == Race.Gargoyle )
            {
                box.DropItem( new GargishInitiationEarrings() );
                box.DropItem( new GargishInitiationKilt() );
                box.DropItem( new GargishInitiationNecklace() );
                box.DropItem( new GargishInitiationLeggings() );
                box.DropItem( new GargishInitiationArms() );
                box.DropItem( new GargishInitiationChest() );
            }
            else
            {
                box.DropItem( new InitiationCap() );
                box.DropItem( new InitiationGloves() );
                box.DropItem( new InitiationGorget() );
                box.DropItem( new InitiationLeggings() );
                box.DropItem( new InitiationSleeves() );
                box.DropItem( new InitiationTunic() );
            }

            box.DropItem( CreateStarterRunebook() );
            box.DropItem( new Gold( 20001 ) );

            if ( bankbox.TryDropItem( from, box, false ) )
            {
                this.Delete();
                from.SendLocalizedMessage( 1042672, true, " 20001" );
                from.SendLocalizedMessage( 1116286 ); // Your new player starter kit has been placed in your bank box.
            }
        }
		public PirateCaptain() : base( AIType.AI_Archer, FightMode.Closest, 15, 1, 0.2, 0.4 )
		{
			SpeechHue = Utility.RandomDyedHue();
			Hue = Utility.RandomSkinHue();

			if ( this.Female = Utility.RandomBool() )
			{
			   	Title = "Piratska Kapitanka";
				Body = 0x191;
				Name = NameList.RandomName( "female" );
				AddItem( new ThighBoots());
			}
			else
			{
				Title = "Piratsky Kapitan";		
				Body = 0x190;
				Name = NameList.RandomName( "male" );
				AddItem( new ThighBoots());
			}

			SetStr( 495, 500 );
			SetDex( 781, 895 );
			SetInt( 61, 75 );
			SetHits( 1488, 1508 );

			SetDamage( 40, 70 );

			SetSkill( SkillName.Fencing, 86.0, 97.5 );
			SetSkill( SkillName.Macing, 85.0, 87.5 );
			SetSkill( SkillName.MagicResist, 55.0, 67.5 );
			SetSkill( SkillName.Swords, 85.0, 87.5 );
			SetSkill( SkillName.Tactics, 85.0, 87.5 );
			SetSkill( SkillName.Wrestling, 35.0, 37.5 );
			SetSkill( SkillName.Archery, 85.0, 87.5 );

			Fame = 5000;
			Karma = -5000;
			VirtualArmor = 66;
			
			switch ( Utility.Random( 1 ))
			{
				case 0: AddItem( new LongPants ( Utility.RandomRedHue() ) ); break;
				case 1: AddItem( new ShortPants( Utility.RandomRedHue() ) ); break;
			}				
			AddItem( new FancyShirt( 1153 ) );
      
			AddItem( new TricorneHat( 33 ));			

			switch ( Utility.Random( 5 ))
			{
				case 0: AddItem( new Bow() ); break;
				case 1: AddItem( new CompositeBow() ); break;
				case 2: AddItem( new Crossbow() ); break;
				case 3: AddItem( new RepeatingCrossbow() ); break;
				case 4: AddItem( new HeavyCrossbow() ); break;
			}		

			Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) );
			hair.Hue = Utility.RandomNondyedHue();
			hair.Layer = Layer.Hair;
			hair.Movable = false;
			AddItem( hair );

			Container cont= new WoodenBox();
			cont.ItemID = 0xE7D;
			cont.Hue = 0x489;

			int count = Utility.RandomMinMax( 30, 50 );

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

			PackItem( cont );

		}
示例#8
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!this.IsChildOf(from.Backpack))
            {
                // This item must be in your backpack to be used.
                from.SendLocalizedMessage(1062334);
                return;
            }

            if (from != Owner)
            {
                from.SendLocalizedMessage(1116257);                   // This token does not belong to this character.
                return;
            }

            var acct = from.Account as Account;

            if (acct.Trial)
            {
                from.SendLocalizedMessage(1116258);                   // Trial account cannot use this token.
                return;
            }

            var totalTime = (DateTime.Now - acct.Created);

            if (totalTime >= TimeSpan.FromDays(30.0))
            {
                from.SendLocalizedMessage(1116259);                   // This can only be used by accounts less than 1 month old.
                return;
            }

            BankBox bankbox = from.BankBox;

            WoodenBox box = new WoodenBox();

            box.Name   = "A Starter Kit";
            box.Hue    = 66;
            box.ItemID = 3709;

            if (from.Race == Race.Gargoyle)
            {
                box.DropItem(new GargishInitiationEarrings());
                box.DropItem(new GargishInitiationKilt());
                box.DropItem(new GargishInitiationNecklace());
                box.DropItem(new GargishInitiationLeggings());
                box.DropItem(new GargishInitiationArms());
                box.DropItem(new GargishInitiationChest());
            }
            else
            {
                box.DropItem(new InitiationCap());
                box.DropItem(new InitiationGloves());
                box.DropItem(new InitiationGorget());
                box.DropItem(new InitiationLeggings());
                box.DropItem(new InitiationSleeves());
                box.DropItem(new InitiationTunic());
            }

            box.DropItem(CreateStarterRunebook());
            box.DropItem(new Gold(20001));

            if (bankbox.TryDropItem(from, box, false))
            {
                this.Delete();
                from.SendLocalizedMessage(1042672, true, " 20001");
                from.SendLocalizedMessage(1116286);                   // Your new player starter kit has been placed in your bank box.
            }
        }
示例#9
0
        public TentSouthAddon( Mobile from )
        {
            this.Owner = from;
            AddonComponent ac;
            ac = new AddonComponent( 734 );
            AddComponent( ac, 3, 3, 0 );
            ac = new AddonComponent( 735 );
            AddComponent( ac, 2, 3, 0 );
            ac = new AddonComponent( 736 );
            AddComponent( ac, 3, 2, 0 );
            ac = new AddonComponent( 736 );
            AddComponent( ac, 3, 1, 0 );
            ac = new AddonComponent( 736 );
            AddComponent( ac, 3, 0, 0 );
            ac = new AddonComponent( 739 );
            AddComponent( ac, 3, -2, 0 );
            ac = new AddonComponent( 740 );
            AddComponent( ac, 2, -2, 0 );
            ac = new AddonComponent( 743 );
            AddComponent( ac, 1, -2, 0 );
            ac = new AddonComponent( 743 );
            AddComponent( ac, -1, -2, 0 );
            ac = new AddonComponent( 737 );
            AddComponent( ac, -2, -2, 0 );
            ac = new AddonComponent( 742 );
            AddComponent( ac, -2, -1, 0 );
            ac = new AddonComponent( 742 );
            AddComponent( ac, -2, 0, 0 );
            ac = new AddonComponent( 742 );
            AddComponent( ac, -2, 1, 0 );
            ac = new AddonComponent( 1635 );
            ac.Hue = 1341;
            AddComponent( ac, 3, 3, 25 );
            ac = new AddonComponent( 1633 );
            ac.Hue = 1341;
            AddComponent( ac, 3, 1, 25 );
            ac = new AddonComponent( 1632 );
            ac.Hue = 1341;
            AddComponent( ac, 1, 3, 25 );
            ac = new AddonComponent( 1630 );
            ac.Hue = 1341;
            AddComponent( ac, 0, 1, 25 );
            ac = new AddonComponent( 1631 );
            ac.Hue = 1341;
            AddComponent( ac, 1, 0, 25 );
            ac = new AddonComponent( 1636 );
            ac.Hue = 1341;
            AddComponent( ac, 3, 0, 25 );
            ac = new AddonComponent( 1637 );
            ac.Hue = 1341;
            AddComponent( ac, 0, 0, 25 );
            ac = new AddonComponent( 1638 );
            ac.Hue = 1341;
            AddComponent( ac, 0, 3, 25 );
            ac = new AddonComponent( 743 );
            AddComponent( ac, 0, -2, 0 );
            ac = new AddonComponent( 742 );
            AddComponent( ac, -2, 2, 0 );
            ac = new AddonComponent( 736 );
            AddComponent( ac, 3, -1, 0 );
            ac = new AddonComponent( 735 );
            AddComponent( ac, -1, 3, 0 );
            ac = new AddonComponent( 738 );
            AddComponent( ac, -2, 3, 0 );
            ac = new AddonComponent( 1633 );
            ac.Hue = 1341;
            AddComponent( ac, 3, 2, 25 );
            ac = new AddonComponent( 1632 );
            ac.Hue = 1341;
            AddComponent( ac, 2, 3, 25 );
            ac = new AddonComponent( 1630 );
            ac.Hue = 1341;
            AddComponent( ac, 0, 2, 25 );
            ac = new AddonComponent( 1631 );
            ac.Hue = 1341;
            AddComponent( ac, 2, 0, 25 );
            ac = new AddonComponent( 1635 );
            ac.Hue = 1341;
            AddComponent( ac, 2, 2, 28 );
            ac = new AddonComponent( 1636 );
            ac.Hue = 1341;
            AddComponent( ac, 2, 1, 28 );
            ac = new AddonComponent( 1637 );
            ac.Hue = 1341;
            AddComponent( ac, 1, 1, 28 );
            ac = new AddonComponent( 1638 );
            ac.Hue = 1341;
            AddComponent( ac, 1, 2, 28 );
            ac = new AddonComponent( 4012 );
            ac.Light = LightType.Circle150;
            AddComponent( ac, 1, 5, 0 );

            uint keyvalue = Convert.ToUInt32( 2 * Utility.RandomMinMax( 1, 4999 ) );
            WoodenBox pack = new WoodenBox();
            pack.MoveToWorld( this.Owner.Location );
            pack.Map = this.Owner.Map;
            pack.Y -= 1;
            pack.X -= 1;
            pack.Movable = false;
            pack.KeyValue = keyvalue;
            pack.LockLevel = 95;
            pack.RequiredSkill = 95;
            pack.ItemID = 0x9AA;

            Key key = new Key();
            key.KeyValue = keyvalue;
            pack.DropItem( key );
            this.Box = pack;

            Bedroll bedroll = new Bedroll();
            bedroll.MoveToWorld( this.Owner.Location );
            bedroll.Map = this.Owner.Map;
            bedroll.Y += 1;
            bedroll.Z -= 1;
            bedroll.ItemID = 0xA56;
            bedroll.Movable = false;
            this.Bedroll = bedroll;
        }
		private static void GiveItems( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				return;
			}

			// Frog Drop
			/*
			MetalBox box = new MetalBox();
			box.Name = "<BASEFONT COLOR='#007FFF'>Frog Drop Collection";
			box.LootType = LootType.Blessed;
			box.Locked = true;
			box.RequiredSkill = box.LockLevel = 1000;
			box.DropItem( new WorldMap() );
			box.DropItem( new RedLeaves() );
			box.DropItem( new Sand() );
			box.DropItem( new SpecialHairDye() );
			box.DropItem( new Rope() );
			box.DropItem( new Vines() );
			box.DropItem( new TribalPaint() );
			box.DropItem( new RockArtifact() );
			box.DropItem( new Runebook() );
			box.DropItem( new Gold( 500 ) );
			*/
			pack.DropItem( new FrogDropBag( true ) );

			// Angel's Snack
			Pouch pouch = new Pouch();
			pouch.DropItem( new HealPotion( 25 ) );
			pouch.DropItem( new CurePotion( 25 ) );
			pouch.DropItem( new RefreshPotion( 25 ) );
			pack.DropItem( pouch );

			// Forks
			Bag bag = new Bag();
			bag.Name = "Forks";
			bag.DropItem( new BistroFork() );
			bag.DropItem( new GastroFork() );
			bag.DropItem( new SilverFork() );
			pack.DropItem( bag );

			// Spellcasting Stuff
			bag = new Bag();
			bag.Name = "Spell Casting Stuff";
			TomeOfLostKnowledge tome = new TomeOfLostKnowledge();
			tome.Name = "Tome Of Lost Knowledge [Replica]";
			tome.Content = 18446744073709551615;
			bag.DropItem( tome );
			bag.DropItem( new CompleteNecromancerSpellbook() );
			bag.DropItem( new BagOfAllReagents() );
			CrystallineRing ring = new CrystallineRing();
			ring.Name = "Crystalline Ring [Replica]";
			bag.DropItem( ring );
			OrnamentOfTheMagician brace = new OrnamentOfTheMagician();
			brace.Name = "Ornament Of The Magician [Replica]";
			bag.DropItem( brace );
			pack.DropItem( bag );

			// Blue Clothing
			MetalBox box = new MetalBox();
			box.Name = "Blue Clothing";
			box.DropItem( new BlueHat() );
			box.DropItem( new BlueArms() );
			box.DropItem( new BlueShirt() );
			box.DropItem( new BluePants() );
			box.DropItem( new BlueBoots() );
			box.DropItem( new BlueCloak() );
			box.DropItem( new BlueSash() );
			box.DropItem( new BlueBelt() );

			WoodenBox wood = new WoodenBox();
			wood.Name = "Tier One Deeds";
			for ( int i = 0; i < 4; i++ )
			{
				for ( int j = 0; j < 9; j++ )
					wood.DropItem( new BlueEnhanceDeed( (BlueEnhance)( i + 1 ), 1 ) );
			}
			box.DropItem( wood );

			wood = new WoodenBox();
			wood.Name = "Tier Two Deeds";
			for ( int i = 0; i < 4; i++ )
			{
				for ( int j = 0; j < 9; j++ )
					wood.DropItem( new BlueEnhanceDeed( (BlueEnhance)( j + 1 ), 2 ) );
			}
			box.DropItem( wood );
			pack.DropItem( box );
		}