public override void OnDeath(Container c) { base.OnDeath(c); Beeswax wax = new Beeswax(); wax.Amount = Utility.RandomMinMax(5, 20); c.DropItem(wax); }
public void FindJunk(Mobile from) { if (from == null) { return; } Item item = null; switch (Utility.RandomMinMax(1, 10)) { case 1: item = new Torch(); break; case 2: item = new Lantern(); break; case 3: item = new Skillet(); break; case 4: item = new Beeswax(); break; case 5: item = new Bedroll(); break; case 6: item = new Dices(); break; case 7: item = new Kindling(); break; case 8: item = new Bottle(); break; case 9: item = new BeverageBottle(BeverageType.Ale); break; case 10: item = new Jug(BeverageType.Cider); break; } if (item != null) { if (from.AddToBackpack(item)) { from.SendMessage("You retrieve some junk from the shipwreck and place it in your backpack."); } else { from.SendMessage("You retrieve some junk from the shipwreck, and place it at your feet."); item.MoveToWorld(from.Location, from.Map); } } }
public override void OnCast() { if (CheckSequence()) { Item item = new Dagger(); string msg = "You conjure a dagger."; switch (Utility.RandomMinMax(1, 28)) { case 1: item = new Apple(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some apples."; break; case 2: item = new Arrow(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some arrows."; break; case 3: item = new Backpack(); msg = "You conjure a backpack."; break; case 4: item = new Bag(); msg = "You conjure a bag."; break; case 5: item = new Bandage(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some bandages."; break; case 6: item = new Bedroll(); msg = "You conjure a bedroll."; break; case 7: item = new Beeswax(); msg = "You conjure some beeswax."; break; case 8: item = new BlueBook(); msg = "You conjure a book."; break; case 9: item = new Bolt(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some crossbow bolts."; break; case 10: item = new Bottle(); msg = "You conjure a bottle."; break; case 11: item = new BreadLoaf(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some bread."; break; case 12: item = new Candle(); msg = "You conjure a candle."; break; case 13: item = new Club(); msg = "You conjure a club."; break; case 14: item = new Dagger(); msg = "You conjure a dagger."; break; case 15: item = new DarkYarn(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some yarn."; break; case 16: item = new FloppyHat(); msg = "You conjure a hat."; break; case 17: item = new Jar(); msg = "You conjure a jar."; break; case 18: item = new Kindling(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some kindling."; break; case 19: item = new Lantern(); msg = "You conjure a lantern."; break; case 20: item = new Lockpick(); msg = "You conjure a lockpick."; break; case 21: item = new OilCloth(); msg = "You conjure an oil cloth."; break; case 22: item = new Pouch(); msg = "You conjure a pouch."; break; case 23: item = new Robe(); msg = "You conjure a robe."; break; case 24: item = new Shoes(); msg = "You conjure some shoes."; break; case 25: item = new SpoolOfThread(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some thread."; break; case 26: item = new TenFootPole(); msg = "You conjure a ten foot pole."; break; case 27: item = new Torch(); msg = "You conjure a torch."; break; case 28: item = new Waterskin(); msg = "You conjure a waterskin."; break; } Caster.SendMessage(msg); Caster.AddToBackpack(item); Caster.FixedParticles(0, 10, 5, 2003, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0, EffectLayer.RightHand); Caster.PlaySound(0x1E2); Server.Misc.Research.ConsumeScroll(Caster, true, spellIndex, true); } FinishSequence(); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; if (info.ButtonID == 0 || m_hive.Deleted || !from.InRange(m_hive.GetWorldLocation(), 3)) { return; } if (!m_hive.IsAccessibleTo(from)) { m_hive.LabelTo(from, "You cannot use that."); return; } switch (info.ButtonID) { case (int)Buttons.butExit: //Exit back to main gump { from.SendGump(new apiBeeHiveMainGump(from, m_hive)); break; } case (int)Buttons.butHoney: //Honey { //ToDo: get hurt or poisoned when harvesting Item hivetool = GetHiveTool(from); if (NeedHiveTool) { if (hivetool == null || !(hivetool is HiveTool)) { m_hive.LabelTo(from, "You need a hive tool to extract the excess honey!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); return; } } if (m_hive.Honey < 3) { m_hive.LabelTo(from, "There isn't enough honey in the hive to fill a bottle!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } Container pack = from.Backpack; if (pack != null && pack.ConsumeTotal(typeof(Bottle), 1)) { JarHoney honey = new JarHoney(); if (!from.PlaceInBackpack(honey)) { honey.Delete(); from.PlaceInBackpack(new Bottle()); //add the consumed bottle m_hive.LabelTo(from, "There is not enough room in your backpack for the honey!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } if (NeedHiveTool) { ((HiveTool)hivetool).UsesRemaining--; if (((HiveTool)hivetool).UsesRemaining < 1) { from.SendMessage("You wear out the hive tool."); hivetool.Delete(); } } m_hive.Honey -= 3; m_hive.LabelTo(from, "You fill a bottle with golden honey and place it in your pack."); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } else { m_hive.LabelTo(from, "You need a bottle to fill with honey!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } } case (int)Buttons.butWax: //Wax { //ToDo: get hurt or poisoned when harvesting Item hivetool = GetHiveTool(from); if (NeedHiveTool) { if (hivetool == null || !(hivetool is HiveTool)) { m_hive.LabelTo(from, "You need a hive tool to scrape the excess beeswax!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); return; } } if (m_hive.Wax < 1) { m_hive.LabelTo(from, "There isn't enough excess wax in the hive to harvest!"); return; } Item wax; if (PureWax) { wax = new Beeswax(m_hive.Wax); } else { wax = new RawBeeswax(m_hive.Wax); } if (!from.PlaceInBackpack(wax)) { wax.Delete(); m_hive.LabelTo(from, "There is not enough room in your backpack for the wax!"); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } if (NeedHiveTool) { ((HiveTool)hivetool).UsesRemaining--; if (((HiveTool)hivetool).UsesRemaining < 1) { from.SendMessage("You wear out the hive tool."); hivetool.Delete(); } } m_hive.Wax = 0; m_hive.LabelTo(from, "You collect the excess beeswax and place it in your pack."); from.SendGump(new apiBeeHiveProductionGump(from, m_hive)); break; } } }
public InternalSellInfo() { Add(typeof(Beeswax), Beeswax.GetSBSellValue()); }
public InternalBuyInfo() { Add(new GenericBuyInfo("Beeswax", typeof(Beeswax), Beeswax.GetSBPurchaseValue(), 50, 0x1422, 0)); }