本文整理汇总了C#中Server.Items.Bag.DropItem方法的典型用法代码示例。如果您正苦于以下问题:C# Bag.DropItem方法的具体用法?C# Bag.DropItem怎么用?C# Bag.DropItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Bag
的用法示例。
在下文中一共展示了Bag.DropItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BagOfMagicJewels
public BagOfMagicJewels( int amount )
{
this.Name = "Bag Of Jewels";
this.Hue = DimensionsNewAge.Scripts.HueItemConst.HueMagicColorRandom;
Bag bagBracelet = new Bag();
bagBracelet.DropItem(new BraceletAlchemy());
bagBracelet.DropItem(new BraceletBlacksmithing());
bagBracelet.DropItem(new BraceletMining());
bagBracelet.DropItem(new BraceletBowcraft());
bagBracelet.DropItem(new BraceletTaming());
bagBracelet.DropItem(new BraceletLumberjacking());
bagBracelet.DropItem(new BraceletSnooping());
bagBracelet.DropItem(new BraceletTailoring());
bagBracelet.DropItem(new BraceletPoisoning());
bagBracelet.DropItem(new BraceletStealing());
this.DropItem(bagBracelet);
Bag bagNecklace = new Bag();
bagNecklace.DropItem(new NecklaceFencing());
bagNecklace.DropItem(new NecklaceMacefighting());
bagNecklace.DropItem(new NecklaceSwordsmanship());
bagNecklace.DropItem(new NecklaceArchery());
bagNecklace.DropItem(new NecklaceTactics());
bagNecklace.DropItem(new NecklaceWrestling());
this.DropItem(bagNecklace);
Bag bagRing = new Bag();
bagRing.DropItem(new RingDexterity());
bagRing.DropItem(new RingStrenght());
bagRing.DropItem(new RingInteligence());
bagRing.DropItem(new RingPower());
this.DropItem(bagRing);
}
示例2: GiveReward
public bool GiveReward( Mobile to )
{
Bag bag = new Bag();
bag.DropItem( new Gold( Utility.RandomMinMax( 500, 1000 ) ) );
if ( Utility.RandomBool() )
{
BaseWeapon weapon = Loot.RandomWeapon();
BaseRunicTool.ApplyAttributesTo( weapon, 2, 20, 30 );
bag.DropItem( weapon );
}
else
{
Item item = Loot.RandomArmorOrShieldOrJewelry();
if ( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo( (BaseArmor) item, 2, 20, 30 );
else if ( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo( (BaseJewel) item, 2, 20, 30 );
bag.DropItem( item );
}
bag.DropItem( new Obsidian() );
return to.PlaceInBackpack( bag );
}
示例3: GiveReward
public bool GiveReward( Mobile to )
{
Bag bag = new Bag();
bag.DropItem( new Gold( Utility.RandomMinMax( 1500, 2000 ) ) ); //Edit by Blady. Default was (500, 1000)
if ( Utility.RandomBool() )
{
BaseWeapon weapon = Loot.RandomWeapon();
if ( Core.AOS )
{
BaseRunicTool.ApplyAttributesTo( weapon, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( weapon );
}
else
{
Item item;
if ( Core.AOS )
{
item = Loot.RandomArmorOrShieldOrJewelry();
if ( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo( (BaseArmor)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
else if ( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo( (BaseJewel)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
}
else
{
BaseArmor armor = Loot.RandomArmorOrShield();
item = armor;
armor.ProtectionLevel = (ArmorProtectionLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( item );
}
bag.DropItem( new Obsidian() );
if ( to.PlaceInBackpack( bag ) )
{
return true;
}
else
{
bag.Delete();
return false;
}
}
示例4: OnBeforeDeath
public override bool OnBeforeDeath()
{
BoneMagi rm = new BoneMagi();
rm.Map = this.Map;
rm.Location = this.Location;
Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );
Container bag = new Bag();
switch ( Utility.Random( 9 ))
{
case 0: bag.DropItem( new Amber() ); break;
case 1: bag.DropItem( new Amethyst() ); break;
case 2: bag.DropItem( new Citrine() ); break;
case 3: bag.DropItem( new Diamond() ); break;
case 4: bag.DropItem( new Emerald() ); break;
case 5: bag.DropItem( new Ruby() ); break;
case 6: bag.DropItem( new Sapphire() ); break;
case 7: bag.DropItem( new StarSapphire() ); break;
case 8: bag.DropItem( new Tourmaline() ); break;
}
switch ( Utility.Random( 25 ))
{
case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
case 3: bag.DropItem( new Garlic( 3 ) ); break;
case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
case 5: bag.DropItem( new Nightshade( 3 ) ); break;
case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
case 7: bag.DropItem( new Ginseng( 3 ) ); break;
}
bag.DropItem( new Gold( 1000, 1500 ));
rm.AddItem( bag );
this.Delete();
return false;
}
示例5: BagBetaTest
public BagBetaTest()
{
Hue = 780;
Name = "Bag BetaTeste";
Bag bagGold = new Bag();
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
this.DropItem(bagGold);
this.DropItem(new BagOfOres(250));
this.DropItem(new Server.Multis.Deeds.CastleDeed());
}
示例6: BagOfAssassinGear
public BagOfAssassinGear() : base()
{
DropItem( new ACreedBelt() );
DropItem( new ACreedBoneArms() );
DropItem( new ACreedChainCoif() );
DropItem( new ACreedJinBori() );
DropItem( new ACreedKilt() );
DropItem( new ACreedMempo() );
DropItem( new ACreedShirt() );
DropItem( new ACreedSkirt() );
DropItem( new ACreedStuddedChest() );
DropItem( new ACreedThighBoots() );
DropItem( new ACreedLeafGloves() );
DropItem( new ACreedSword() );
Bag bag = new Bag();
for ( int i = 0; i < 16; i++ )
{
bag.DropItem( new Dagger() );
}
SmokeBomb smoke = new SmokeBomb();
smoke.Amount = 15;
bag.DropItem( smoke );
bag.DropItem( new GreaterHealPotion( 15 ) );
DropItem( bag );
bag = new Bag();
for ( int i = 0; i < 34; i++ )
{
bag.DropItem( new UpgradeACreedGarbDeed() );
}
DropItem( bag );
}
示例7: ComputeRewards
public override ArrayList ComputeRewards()
{
ArrayList list = new ArrayList();
Container cont = new Bag();
int minProp = Level + 1;
if (minProp > 3)
minProp = 3;
//EUtility.AddRandomLoot(cont, (Level + 1) * 3, (int)(Level * 300 + AmountMax / 20.0 * 300), ScaleTypes.PlayerLuck, minProp, 5, 10, 100);
cont.DropItem(HuntBodUtility.GetSmallRewardItem(Level));
list.Add(cont);
return list;
}
示例8: BagOfLeatherArmor
public BagOfLeatherArmor( int amount )
{
this.Name = "Bag Of Leather Armor";
this.Hue = DimensionsNewAge.Scripts.HueItemConst.HueMagicColorRandom;
Bag bagLeatherCyclop = new Bag();
bagLeatherCyclop.DropItem(new StuddedChestCyclop());
bagLeatherCyclop.DropItem(new StuddedArmsCyclop());
bagLeatherCyclop.DropItem(new LeatherCapCyclop());
bagLeatherCyclop.DropItem(new StuddedGlovesCyclop());
bagLeatherCyclop.DropItem(new StuddedGorgetCyclop());
bagLeatherCyclop.DropItem(new StuddedLegsCyclop());
bagLeatherCyclop.DropItem(new CyclopsHides(5000));
bagLeatherCyclop.DropItem(new CyclopsLeather(5000));
bagLeatherCyclop.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideCyclops;
this.DropItem(bagLeatherCyclop);
Bag bagLeatherDaemon = new Bag();
bagLeatherDaemon.DropItem(new StuddedChestDaemon());
bagLeatherDaemon.DropItem(new StuddedArmsDaemon());
bagLeatherDaemon.DropItem(new LeatherCapDaemon());
bagLeatherDaemon.DropItem(new StuddedGlovesDaemon());
bagLeatherDaemon.DropItem(new StuddedGorgetDaemon());
bagLeatherDaemon.DropItem(new StuddedLegsDaemon());
bagLeatherDaemon.DropItem(new DaemonHides(5000));
bagLeatherDaemon.DropItem(new DaemonLeather(5000));
bagLeatherDaemon.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideDaemon;
this.DropItem(bagLeatherDaemon);
Bag bagLeatherDragon = new Bag();
bagLeatherDragon.DropItem(new StuddedChestDragon());
bagLeatherDragon.DropItem(new StuddedArmsDragon());
bagLeatherDragon.DropItem(new LeatherCapDragon());
bagLeatherDragon.DropItem(new StuddedGlovesDragon());
bagLeatherDragon.DropItem(new StuddedGorgetDragon());
bagLeatherDragon.DropItem(new StuddedLegsDragon());
bagLeatherDragon.DropItem(new DragonHides(5000));
bagLeatherDragon.DropItem(new DragonLeather(5000));
bagLeatherDragon.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideDragon;
this.DropItem(bagLeatherDragon);
Bag bagLeatherDragonGreen = new Bag();
bagLeatherDragonGreen.DropItem(new StuddedChestDragonGreen());
bagLeatherDragonGreen.DropItem(new StuddedArmsDragonGreen());
bagLeatherDragonGreen.DropItem(new LeatherCapDragonGreen());
bagLeatherDragonGreen.DropItem(new StuddedGlovesDragonGreen());
bagLeatherDragonGreen.DropItem(new StuddedGorgetDragonGreen());
bagLeatherDragonGreen.DropItem(new StuddedLegsDragonGreen());
bagLeatherDragonGreen.DropItem(new DragonGreenHides(5000));
bagLeatherDragonGreen.DropItem(new DragonGreenLeather(5000));
bagLeatherDragonGreen.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideDragonGreen;
this.DropItem(bagLeatherDragonGreen);
Bag bagLeatherGargoyle = new Bag();
bagLeatherGargoyle.DropItem(new StuddedChestGargoyle());
bagLeatherGargoyle.DropItem(new StuddedArmsGargoyle());
bagLeatherGargoyle.DropItem(new LeatherCapGargoyle());
bagLeatherGargoyle.DropItem(new StuddedGlovesGargoyle());
bagLeatherGargoyle.DropItem(new StuddedGorgetGargoyle());
bagLeatherGargoyle.DropItem(new StuddedLegsGargoyle());
bagLeatherGargoyle.DropItem(new GargoyleHides(5000));
bagLeatherGargoyle.DropItem(new GargoyleLeather(5000));
bagLeatherGargoyle.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideGargoyle;
this.DropItem(bagLeatherGargoyle);
Bag bagLeatherTerathan = new Bag();
bagLeatherTerathan.DropItem(new StuddedChestTerathan());
bagLeatherTerathan.DropItem(new StuddedArmsTerathan());
bagLeatherTerathan.DropItem(new LeatherCapTerathan());
bagLeatherTerathan.DropItem(new StuddedGlovesTerathan());
bagLeatherTerathan.DropItem(new StuddedGorgetTerathan());
bagLeatherTerathan.DropItem(new StuddedLegsTerathan());
bagLeatherTerathan.DropItem(new TerathanHides(5000));
bagLeatherTerathan.DropItem(new TerathanLeather(5000));
bagLeatherTerathan.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideTerathan;
this.DropItem(bagLeatherTerathan);
Bag bagLeatherZZ = new Bag();
bagLeatherZZ.DropItem(new StuddedChestZZ());
bagLeatherZZ.DropItem(new StuddedArmsZZ());
bagLeatherZZ.DropItem(new LeatherCapZZ());
bagLeatherZZ.DropItem(new StuddedGlovesZZ());
bagLeatherZZ.DropItem(new StuddedGorgetZZ());
bagLeatherZZ.DropItem(new StuddedLegsZZ());
bagLeatherZZ.DropItem(new ZZHides(5000));
bagLeatherZZ.DropItem(new ZZLeather(5000));
bagLeatherZZ.Hue = DimensionsNewAge.Scripts.HueHideConst.HueHideZZ;
this.DropItem(bagLeatherZZ);
}
示例9: FillBankbox
//.........这里部分代码省略.........
cont2.Name = "Various Potion Kegs";
PlaceItemIn( cont2, 45, 149, MakePotionKeg( PotionEffect.CureGreater, 0x2D ) );
PlaceItemIn( cont2, 69, 149, MakePotionKeg( PotionEffect.HealGreater, 0x499 ) );
PlaceItemIn( cont2, 93, 149, MakePotionKeg( PotionEffect.PoisonDeadly, 0x46 ) );
PlaceItemIn( cont2, 117, 149, MakePotionKeg( PotionEffect.RefreshGreater, 0x21 ) );
PlaceItemIn( cont2, 141, 149, MakePotionKeg( PotionEffect.ExplosionGreater, 0x74 ) );
PlaceItemIn( cont2, 93, 82, new Bottle( 1000 ) );
PlaceItemIn( cont, 78, 91, cont2 );
// End bag of potion kegs
GoldRing ring = new GoldRing();
ring.Name = "Ring Of Arcane Tactics";
ring.Attributes.CastRecovery = 3;
ring.Attributes.CastSpeed = 1;
PlaceItemIn( cont, 109, 90, ring );
GoldBracelet bracelet = new GoldBracelet();
bracelet.Name = "Farmer's Band Of Mastery";
bracelet.Attributes.CastRecovery = 3;
bracelet.Attributes.CastSpeed = 1;
PlaceItemIn( cont, 139, 95, bracelet );
PlaceItemIn( bank, 63, 142, cont );
// End box of Magery Items
// Begin bag of ethereals
cont = new Backpack();
cont.Hue = 0x490;
cont.Name = "Bag Of Ethy's!";
cont.DropItem( new EtherealHorse() );
cont.DropItem( new EtherealOstard() );
cont.DropItem( new EtherealLlama() );
cont.DropItem( new EtherealKirin() );
cont.DropItem( new EtherealUnicorn() );
cont.DropItem( new EtherealRidgeback() );
cont.DropItem( new EtherealSwampDragon() );
cont.DropItem( new EtherealBeetle() );
PlaceItemIn( bank, 43, 124, cont );
// End bag of ethereals
// Begin box of Artifacts
cont = new WoodenBox();
cont.ItemID = 0xE7D;
cont.Hue = 1170;
cont.Name = "Artifacts";
// Begin bag of minor artifacts
cont2 = new Bag();
cont2.Hue = 1167;
cont2.Name = "Minor Artifacts";
cont2.DropItem( new LunaLance() );
cont2.DropItem( new VioletCourage() );
cont2.DropItem( new CavortingClub() );
cont2.DropItem( new CaptainQuacklebushsCutlass() );
cont2.DropItem( new NightsKiss() );
cont2.DropItem( new ShipModelOfTheHMSCape() );
cont2.DropItem( new AdmiralsHeartyRum() );
cont2.DropItem( new CandelabraOfSouls() );
cont2.DropItem( new IolosLute() );
cont2.DropItem( new GwennosHarp() );
示例10: PackBagofRegs
public Bag PackBagofRegs( int amount )
{
Bag bag = new Bag();
PackItem( bag );
bag.DropItem( new BlackPearl ( amount ) );
bag.DropItem( new Bloodmoss ( amount ) );
bag.DropItem( new Garlic ( amount ) );
bag.DropItem( new Ginseng ( amount ) );
bag.DropItem( new MandrakeRoot ( amount ) );
bag.DropItem( new Nightshade ( amount ) );
bag.DropItem( new SulfurousAsh ( amount ) );
bag.DropItem( new SpidersSilk ( amount ) );
return bag;
}
示例11: OnTalk
//.........这里部分代码省略.........
obj.Complete();
}
qs.AddConversation( new HaochiSmilesConversation() );
player.AddToBackpack( new LeatherHiroSode() );
qs.AddObjective( new FollowRedPathObjective() );
}
if ( qs.IsObjectiveInProgress( typeof( MadeChoiceObjective ) ) )
{
QuestObjective obj = qs.FindObjective( typeof( MadeChoiceObjective ) );
if ( obj != null )
{
obj.Complete();
}
if ( htq.Choice == ChoiceType.Gold )
{
qs.AddConversation( new RespectForGoldConversation() );
}
if ( htq.Choice == ChoiceType.Cats )
{
qs.AddConversation( new RespectForCatsConversation() );
}
Bag bag = new Bag();
bag.Hue = 0x660;
bag.DropItem( new LeatherHiroSode() );
bag.DropItem( new JinBaori() );
player.AddToBackpack( bag );
qs.AddObjective( new RetrieveKatanaObjective() );
}
if ( qs.IsObjectiveInProgress( typeof( GiveSwordDaimyoObjective ) ) )
{
List<Item> list = player.Backpack.Items;
DaimyoHaochisKatana katana = null;
for ( int i = 0; i < list.Count; i++ )
{
if ( list[i] is DaimyoHaochisKatana )
{
katana = list[i] as DaimyoHaochisKatana;
break;
}
}
if ( katana == null )
{
qs.AddConversation( new WithoutSwordConversation() );
}
else
{
katana.Delete();
QuestObjective obj = qs.FindObjective( typeof( GiveSwordDaimyoObjective ) );
示例12: OnDragDrop
public override bool OnDragDrop(Mobile from, Item dropped)
{
Mobile m = from;
PlayerMobile mobile = m as PlayerMobile;
if ( mobile != null)
{
if (dropped is Gold && dropped.Amount == 100)
{
mobile.AddToBackpack ( new QuestScroll(1) );
this.PrivateOverheadMessage( MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState );
return true;
}
else if (dropped is Gold && dropped.Amount == 200)
{
mobile.AddToBackpack ( new QuestScroll(2) );
this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState);
return true;
}
else if (dropped is Gold && dropped.Amount == 300)
{
mobile.AddToBackpack ( new QuestScroll(3) );
this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState);
return true;
}
else if (dropped is Gold && dropped.Amount == 400)
{
mobile.AddToBackpack ( new QuestScroll(4) );
this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState);
return true;
}
else if (dropped is Gold && dropped.Amount == 500)
{
mobile.AddToBackpack ( new QuestScroll(5) );
this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState);
return true;
}
else if (dropped is Gold && dropped.Amount == 600)
{
mobile.AddToBackpack ( new QuestScroll(6) );
this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Me devolva este Scroll quando terminar...para receber sua recompensa..", mobile.NetState);
return true;
}
else if(dropped is Gold)
{
this.PrivateOverheadMessage( MessageType.Regular, 1153, false, "Nao tenho nada para voce por esta quantia de gold.", mobile.NetState );
return false;
}
else if( dropped is QuestScroll )
{
QuestScroll m_Quest = (QuestScroll)dropped;
if(m_Quest.NNeed > m_Quest.NGot)
{
mobile.AddToBackpack ( dropped );
this.PrivateOverheadMessage( MessageType.Regular, 1153, false, "Voce nao completou essa quest.", mobile.NetState );
return false;
}
string sMessage = "";
if (m_Quest.NType == 1) { sMessage = "Vejo que voce voltou vitorioso. Aqui esta sua recompensa!"; }
else { sMessage = "Ahh... voce encontrou " + m_Quest.NItemName + "! Aqui esta sua recompensa!"; }
Bag bagReward = new Bag();
// Skill Reward
int randomSkillType = 1;
if (Utility.RandomDouble() >= 0.8)
randomSkillType = (int)SkillRewardItemType.Tammer;
else
randomSkillType = Utility.Random(1, 3);
int randomSkillAmount = 1;
randomSkillAmount = m_Quest.NLevel;
if (randomSkillAmount > 5)
randomSkillAmount = 5;
bagReward.DropItem(new SkillRewardItem(1, randomSkillType, randomSkillAmount));
//mobile.AddToBackpack(new SkillRewardItem(1, randomSkillType, randomSkillAmount));
// Skill Reward
if ( Utility.RandomMinMax( 1, 4 ) == 1 )
{
bagReward.DropItem(new Gold(m_Quest.NLevel * 500));
//mobile.AddToBackpack ( new Gold( m_Quest.NLevel * 500 ) );
}
else
{
bagReward.DropItem(new Gold(m_Quest.NLevel * 400));
//mobile.AddToBackpack ( new Gold( m_Quest.NLevel * 400 ) );
Item item;
if ( Core.AOS )
item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
else
item = Loot.RandomArmorOrShieldOrWeapon();
bagReward.DropItem(item);
//mobile.AddToBackpack(item);
//.........这里部分代码省略.........
示例13: ComputeRewards
public override List<Item> ComputeRewards(bool full)
{
List<Item> list = new List<Item>();
double psChance = 0;
int iPSMin = 0;
int iPSMax = 0;
int itemAmount = (Level + 1) * this.Entries.Length;
switch (Level)
{
default:
case 0: // Easy
psChance = 0.03;
iPSMin = 5;
iPSMax = 5;
break;
case 1: // Medium
psChance = 0.05;
iPSMin = 5;
iPSMax = 5;
break;
case 2: // Hard
psChance = 0.10;
iPSMin = 5;
iPSMax = 5;
break;
case 3: // Very Hard
psChance = 0.20;
iPSMin = 10;
iPSMax = 10;
break;
}
psChance += this.AmountMax / 200.0;
psChance += this.Entries.Length / 60.0;
Container cont = new Bag();
int minProp = Level + 3;
if (minProp > 5)
minProp = 5;
LootPackEntry.AddRandomLoot(cont, (Level + 1) * 3, (int)(Level * 300 + AmountMax / 20.0 * 150 + Entries.Length / 6.0 * 150), minProp, 5, 50, 100);
cont.DropItem(HuntBodUtility.GetLargeRewardItem(Level));
if (psChance >= Utility.RandomDouble() && iPSMin > 0 && iPSMax > 0)
cont.DropItem(PowerScroll.CreateRandomNoCraft(iPSMin, iPSMax));
list.Add(cont);
return list;
}
示例14: FillBankbox
private static void FillBankbox( Mobile m )
{
if ( Core.AOS )
{
FillBankAOS( m );
return;
}
BankBox bank = m.BankBox;
bank.DropItem( new BankCheck( 1000000 ) );
// Full spellbook
Spellbook book = new Spellbook();
book.Content = ulong.MaxValue;
bank.DropItem( book );
Bag bag = new Bag();
for ( int i = 0; i < 5; ++i )
bag.DropItem( new Moonstone( MoonstoneType.Felucca ) );
// Felucca moonstones
bank.DropItem( bag );
bag = new Bag();
for ( int i = 0; i < 5; ++i )
bag.DropItem( new Moonstone( MoonstoneType.Trammel ) );
// Trammel moonstones
bank.DropItem( bag );
// Treasure maps
bank.DropItem( new TreasureMap( 1, Map.Trammel ) );
bank.DropItem( new TreasureMap( 2, Map.Trammel ) );
bank.DropItem( new TreasureMap( 3, Map.Trammel ) );
bank.DropItem( new TreasureMap( 4, Map.Trammel ) );
bank.DropItem( new TreasureMap( 5, Map.Trammel ) );
// Bag containing 50 of each reagent
bank.DropItem( new BagOfReagents( 50 ) );
// Craft tools
bank.DropItem( MakeNewbie( new Scissors() ) );
bank.DropItem( MakeNewbie( new SewingKit( 1000 ) ) );
bank.DropItem( MakeNewbie( new SmithHammer( 1000 ) ) );
bank.DropItem( MakeNewbie( new FletcherTools( 1000 ) ) );
bank.DropItem( MakeNewbie( new DovetailSaw( 1000 ) ) );
bank.DropItem( MakeNewbie( new MortarPestle( 1000 ) ) );
bank.DropItem( MakeNewbie( new ScribesPen( 1000 ) ) );
bank.DropItem( MakeNewbie( new TinkerTools( 1000 ) ) );
// A few dye tubs
bank.DropItem( new Dyes() );
bank.DropItem( new DyeTub() );
bank.DropItem( new DyeTub() );
bank.DropItem( new BlackDyeTub() );
DyeTub darkRedTub = new DyeTub();
darkRedTub.DyedHue = 0x485;
darkRedTub.Redyable = false;
bank.DropItem( darkRedTub );
// Some food
bank.DropItem( MakeNewbie( new Apple( 1000 ) ) );
// Resources
bank.DropItem( MakeNewbie( new Feather( 1000 ) ) );
bank.DropItem( MakeNewbie( new BoltOfCloth( 1000 ) ) );
bank.DropItem( MakeNewbie( new BlankScroll( 1000 ) ) );
bank.DropItem( MakeNewbie( new Hides( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bandage( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bottle( 1000 ) ) );
bank.DropItem( MakeNewbie( new Log( 1000 ) ) );
bank.DropItem( MakeNewbie( new IronIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new DullCopperIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new ShadowIronIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new CopperIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new BronzeIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new GoldIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new AgapiteIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new VeriteIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new ValoriteIngot( 5000 ) ) );
// Reagents
bank.DropItem( MakeNewbie( new BlackPearl( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bloodmoss( 1000 ) ) );
bank.DropItem( MakeNewbie( new Garlic( 1000 ) ) );
bank.DropItem( MakeNewbie( new Ginseng( 1000 ) ) );
bank.DropItem( MakeNewbie( new MandrakeRoot( 1000 ) ) );
bank.DropItem( MakeNewbie( new Nightshade( 1000 ) ) );
bank.DropItem( MakeNewbie( new SulfurousAsh( 1000 ) ) );
bank.DropItem( MakeNewbie( new SpidersSilk( 1000 ) ) );
//.........这里部分代码省略.........
示例15: OnResponse
public override void OnResponse(NetState state, RelayInfo info)
{
if (state == null || state.Mobile == null)
return;
m_Result.DataItems = GetUnclaimed(m_Result.DataItems);
if (m_Result.Status == ResultStatus.OK && m_Result.DataItems.Count == 0)
{
m_Result.Status = ResultStatus.NoUndeliveredDonationsFound;
}
if (info.ButtonID == (int)Buttons.Previous && m_Page > 0)
{
state.Mobile.SendGump(new ClaimDonationsGump(m_Page - 1, this.X, this.Y, m_Result));
}
else if (info.ButtonID == (int)Buttons.Next)
{
state.Mobile.SendGump(new ClaimDonationsGump(m_Page + 1, this.X, this.Y, m_Result));
}
else if (info.ButtonID == (int)Buttons.OK && m_Result.Status == ResultStatus.OK)
{
state.Mobile.CloseAllGumps();
if (state.Mobile != null && !state.Mobile.Deleted && state.Mobile.NetState != null)
{
if (state.Mobile.BankBox == null)
{
state.Mobile.SendMessage("You don't seem to have a bankbox, contact a GM.");
}
else
{
ArrayList temp = new ArrayList();
Bag bag = new Bag();
bag.Hue = 33;
bag.Name = "a donation claim bag";
foreach (DataItem item in m_Result.DataItems)
{
//Make sure we check amount
for (int i = 0; i < item.Amount; i++)
{
Item toGive = GetItem(item.ProductID);
if (toGive != null)
{
bag.DropItem(toGive);
}
else
{
state.Mobile.SendMessage("An error ocurred claiming an item in order number: {0}. An errorlog has been created, please contact an administrator.");
string error = String.Format("An error ocurred trying to fetch item for product number: {0} in order: {1} for {2}({3}).",
item.ProductID, item.OrderID, state.Mobile.RawName, (state.Mobile.Account as Account).Username);
Log(error);
}
}
// Register claim. We only register each order one time
if (!temp.Contains(item.OrderID))
{
temp.Add(item.OrderID);
ClaimedOrder claim = new ClaimedOrder(item.OrderID, state.Mobile);
m_ClaimedOrders.Add(claim);
}
}
state.Mobile.BankBox.DropItem(bag);
state.Mobile.SendMessage("Your have claimed your donations. They have been added to your bankbox. Thank you for donating!");
}
}
}
else
{
//state.Mobile.SendMessage("You could not claim the donations, because you claimed them wile this gump was open");
}
}