本文整理汇总了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;
}
示例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;
}
示例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 );
}
示例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 );
}
示例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 );
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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
}
示例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);
}
示例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
}
示例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 );
}
示例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);
}