当前位置: 首页>>代码示例>>C#>>正文


C# Backpack.DropItem方法代码示例

本文整理汇总了C#中Server.Items.Backpack.DropItem方法的典型用法代码示例。如果您正苦于以下问题:C# Backpack.DropItem方法的具体用法?C# Backpack.DropItem怎么用?C# Backpack.DropItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Items.Backpack的用法示例。


在下文中一共展示了Backpack.DropItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ArcherGuard

		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;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:60,代码来源:ArcherGuard.cs

示例2: Hunter

        public Hunter()
            : base(AIType.AI_Archer, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            InitStats( 300, 300, 100 );
            Title = "the hunter";

            SpeechHue = Utility.RandomDyedHue();

            Hue = Utility.RandomSkinHue();

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

            AddItem( new StuddedChest() );
            AddItem( new StuddedArms() );
            AddItem( new StuddedGloves() );
            AddItem( new StuddedGorget() );
            AddItem( new StuddedLegs() );
            AddItem( new ThighBoots() );
            AddItem( new BodySash(2118));
            AddItem(Utility.RandomBool() ? (Item)new BearMask() : (Item)new DeerMask());
            AddItem(Utility.RandomBool() ? (Item)new Bow() : (Item)new Crossbow());

            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;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:50,代码来源:Hunter.cs

示例3: Crystal

[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 );
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:35,代码来源:CrystalQuest.cs

示例4: Marrow

[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 );
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:29,代码来源:MarrowQuest.cs

示例5: CombineBackpacks

        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 );
            }
        }
开发者ID:Godkong,项目名称:Origins,代码行数:25,代码来源:PackHorse.cs

示例6: OnDoubleClick

		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);
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:30,代码来源:AutoBankStone.cs

示例7: Sculptor

        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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:35,代码来源:Sculptor.cs

示例8: IchabodCrane

        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);
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:30,代码来源:IchabodCrane.cs

示例9: AGhostlyBlacksmith

        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);
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:27,代码来源:GhostlyBlacksmithQuest.cs

示例10: Olin

        public Olin()
            : base(AIType.AI_Archer, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            InitStats(500, 400, 100);
            Title = "the head hunter";

            SpeechHue = Utility.RandomDyedHue();

            Hue = 0x840E;

            Body = 0x190;
            Name = "Lord Olin";

            HairItemID = 8252;
            HairHue = 1107;
            FacialHairItemID = 0;

            AddItem(new StuddedChest());
            AddItem(new PlateArms());
            AddItem(new StuddedGloves());
            AddItem(new PlateGorget());
            AddItem(new StuddedLegs());
            AddItem(new ThighBoots(1907));
            AddItem(new Cloak(2118));
            AddItem(new BodySash(2118));
            AddItem(new 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;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:46,代码来源:Lord+Olin.cs

示例11: EithkaUlesra

		public EithkaUlesra() : base( AIType.AI_Archer, FightMode.Closest, 10, 5, 0.2, 0.4 )
		{
			Name = "Eithka Ulesra";
			Body = 0x190;
			Hue = 0x798;

			SetStr( 100 ); //I've set him up with normal stats since we've defined his Hits and his weapons speed elsewhere.
			SetDex( 100 );
			SetInt( 100 );

			SetHits( 250, 350 ); // here are his hits according to the spherescript. random between 250 and 350
			SetStam( 350, 450 );

			SetDamage( 10, 15 ); //i set his damage to be low since he hits like 3 times a second. This will probably need to be tweaked.

			SetSkill( SkillName.Archery, 110.0 ); //we dont need to give him uberskillz
			SetSkill( SkillName.Tactics, 110.0 );
			SetSkill( SkillName.MagicResist, 100.0 );

			Fame = 3900;
			Karma = -4000;

			VirtualArmor = 70; //this might need to be tweaked

			//Here we add his loot. I'm omitting his gloves since that's later in his dress.
            //no here do you NOT add the loot, onyl whats in hes backpack.
			Container pack = new Backpack();
			pack.Movable = false;
			pack.DropItem( new Arrow( 50 ) );
			AddItem( pack );
			//Now we dress him
			Item shroud = new HoodedShroudOfShadows(); //since we want a custom shroud, we define it here.
			shroud.Movable = false; //this way we dont let the shroud drop
			shroud.Hue = 0x798; //omg more props
			AddItem( shroud ); //add the item

			Item smurfshoes = new Sandals(); //since sandals are already a class i've named it smurfshoes. It doesnt matter what we call it.
			smurfshoes.Movable = false; // leet shoes for the players? GM tailoring kthx.
			smurfshoes.Hue = 0x798; // more props
			AddItem( smurfshoes ); //add the item

			Bow weapon = new Bow(); //same thing. define the weapon.
			weapon.Skill = SkillName.Archery; //props
			weapon.Hue = 0x798; //we're leet
			weapon.Speed = 90; //set the speed to 5 higher than the cho ku no.
			weapon.DamageLevel = WeaponDamageLevel.Force; //bow of force
			weapon.Movable = false; // not for players
			AddItem( weapon ); //add the weapon

			Item gloves = new PlateGloves(); // here we add his gloves. this time we let them drop
			gloves.Hue = 0x798; //omg more props
			AddItem( gloves ); //add the item
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:53,代码来源:EithkaUlesra.cs

示例12: TillerManHS

        public TillerManHS(BaseGalleon galleon, uint keyValue, Point3D initOffset)
            : base()
        {
			Location = initOffset;
			galleon.Embark(this);
			galleon.TillerManMobile = this;
            m_Galleon = galleon;
			m_KeyValue = keyValue;
            CantWalk = true;
			Blessed = true;

            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 Kilt(Utility.RandomDyedHue()));
                AddItem(new Shirt(Utility.RandomDyedHue()));
                AddItem(new ThighBoots());
                Title = "the tillerman";
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName("male");
                AddItem(new ShortPants(Utility.RandomNeutralHue()));
                AddItem(new Shirt(Utility.RandomDyedHue()));
                AddItem(new Sandals());
                Title = "the tillerman";
            }

            AddItem(new Bandana(Utility.RandomDyedHue()));

            Utility.AssignRandomHair(this);

            Container pack = new Backpack();

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

            pack.Movable = false;

            AddItem(pack);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:49,代码来源:TillermanHS.cs

示例13: OutlanderLord

        public OutlanderLord()
            : base(AIType.AI_Archer, FightMode.Closest, 10, 3, 0.2, 0.4)
        {
            Name = "an outlander lord";
            Body = 773;
            Team = 2;

            SetStr(401, 500);
            SetDex(81, 100);
            SetInt(151, 200);

            SetHits(241, 300);

            SetDamage(10, 12);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 40, 50);
            SetResistance(ResistanceType.Fire, 45, 50);
            SetResistance(ResistanceType.Cold, 40, 50);
            SetResistance(ResistanceType.Poison, 20, 25);
            SetResistance(ResistanceType.Energy, 40, 50);

            SetSkill(SkillName.Anatomy, 90.1, 100.0);
            SetSkill(SkillName.Archery, 95.1, 100.0);
            SetSkill(SkillName.Healing, 80.1, 100.0);
            SetSkill(SkillName.MagicResist, 120.1, 130.0);
            SetSkill(SkillName.Swords, 90.1, 100.0);
            SetSkill(SkillName.Tactics, 95.1, 100.0);
            SetSkill(SkillName.Wrestling, 90.1, 100.0);

            Fame = 15000;
            Karma = -15000;

            VirtualArmor = 28;

            Container pack = new Backpack();

            pack.DropItem(new Arrow(Utility.RandomMinMax(25, 35)));
            pack.DropItem(new Arrow(Utility.RandomMinMax(25, 35)));
            pack.DropItem(new Bandage(Utility.RandomMinMax(5, 15)));
            pack.DropItem(new Bandage(Utility.RandomMinMax(5, 15)));
            pack.DropItem(Loot.RandomGem());
            pack.DropItem(new ArcaneGem());
            pack.DropItem(new OutlanderHead());
            PackItem(pack);

            //AddItem(new JukaBow());

            // TODO: Bandage self
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:51,代码来源:OutlanderLord.cs

示例14: Gypsy

        public Gypsy()
            : base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
        {
            InitStats( 31, 41, 51 );

            SpeechHue = Utility.RandomDyedHue();

            SetSkill( SkillName.Cooking, 65, 88 );
            SetSkill( SkillName.Snooping, 65, 88 );
            SetSkill( SkillName.Stealing, 65, 88 );

            Hue = Utility.RandomSkinHue();

            if( this.Female = Utility.RandomBool() )
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName( "female" );
                AddItem( new Kilt( Utility.RandomDyedHue() ) );
                AddItem( new Shirt( Utility.RandomDyedHue() ) );
                AddItem( new ThighBoots() );
                Title = "a cigana";
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName( "male" );
                AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
                AddItem( new Shirt( Utility.RandomDyedHue() ) );
                AddItem( new Sandals() );
                Title = "o cigano";
            }

            AddItem( new Bandana( Utility.RandomDyedHue() ) );
            AddItem( new Dagger() );

            Utility.AssignRandomHair( this );

            Container pack = new Backpack();

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

            pack.Movable = false;

            AddItem( pack );
        }
开发者ID:felladrin,项目名称:runuo-pt-br,代码行数:45,代码来源:Gypsy.cs

示例15: GoblinBountyHunter

        public GoblinBountyHunter()
        {
            Title = "the goblin bounty hunter";

            Body = 0x190;
            Name = NameList.RandomName("male");

            AddItem(new PlateChest());
            AddItem(new PlateArms());
            AddItem(new PlateLegs());
            AddItem(new BodySash(Utility.RandomYellowHue()));
            //DropItem(Robe());

            Utility.AssignRandomHair(this);

            if (Utility.RandomBool())
                Utility.AssignRandomFacialHair(this, HairHue);

            Halberd weapon = new Halberd();

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

            AddItem(weapon);

            Container pack = new Backpack();

            pack.Movable = false;

            pack.DropItem(new Factions.Silver(10, 25));

            AddItem(pack);

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

            SetSkill(SkillName.Camping, 80.0, 100.0);
            SetSkill(SkillName.Forensics, 80.0, 100.0);
            SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:44,代码来源:GoblinBountyHunter.cs


注:本文中的Server.Items.Backpack.DropItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。