public override Item Dupe( int amount ) { BigFish fish = new BigFish(); fish.m_Fisher = m_Fisher; return base.Dupe( fish, amount ); }
public override Item Dupe(int amount) { BigFish fish = new BigFish(); fish.m_Fisher = m_Fisher; return(base.Dupe(fish, amount)); }
private void FillChest() { int RaresDropped = 0; LogHelper Logger = new LogHelper("PirateChampChest.log", false); // 25 piles * 1200 = 30K gold for (int ix = 0; ix < 25; ix++) { // force the separate piles Gold gold = new Gold(800, 1200); gold.Stackable = false; m_MetalChest.DropItem(gold); gold.Stackable = true; } // "a smelly old mackerel" if (Utility.RandomChance(10)) { Item ii; ii = new BigFish(); ii.Name = "a smelly old mackerel"; ii.Weight = 5; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // single gold ingot weight 12 if (Utility.RandomChance(10 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7145); else ii = new Item(7148); ii.Weight = 12; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // 3 gold ingots 12*3 if (Utility.RandomChance(5 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7146); else ii = new Item(7149); ii.Weight = 12 * 3; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // 5 gold ingots 12*5 if (Utility.RandomChance(1 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7147); else ii = new Item(7150); ii.Weight = 12 * 5; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // single silver ingot weight 6 if (Utility.RandomChance(10 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7157); else ii = new Item(7160); ii.Weight = 6; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // 3 silver ingots 6*3 if (Utility.RandomChance(5 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7158); else ii = new Item(7161); ii.Weight = 6 * 3; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // 5 silver ingots 6*5 if (Utility.RandomChance(1 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(7159); else ii = new Item(7162); ii.Weight = 6 * 5; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // rolled map w1 if (Utility.RandomChance(20 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(5357); else ii = new Item(5358); ii.Weight = 1; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // ship plans if (Utility.RandomChance(10 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(5361); else ii = new Item(5362); ii.Weight = 1; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // ship model if (Utility.RandomChance(5 * 2)) { Item ii; if (Utility.RandomBool()) ii = new Item(5363); else ii = new Item(5364); ii.Weight = 3; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // "scale shield" w6 if (Utility.RandomChance(1)) { Item ii; if (Utility.RandomBool()) ii = new Item(7110); else ii = new Item(7111); ii.Name = "scale shield"; ii.Weight = 6; m_MetalChest.DropItem(ii); RaresDropped++; Logger.Log(LogType.Item, ii); } // level 5 chest regs & gems TreasureMapChest.PackRegs(m_MetalChest, 5 * 10); TreasureMapChest.PackGems(m_MetalChest, 5 * 5); // level 5 magic items DungeonTreasureChest.PackMagicItem(m_MetalChest, 3, 3, 0.20); DungeonTreasureChest.PackMagicItem(m_MetalChest, 3, 3, 0.10); DungeonTreasureChest.PackMagicItem(m_MetalChest, 3, 3, 0.05); // an a level 5 treasure map m_MetalChest.DropItem(new TreasureMap(5, Map.Felucca)); Logger.Finish(); }
protected override void OnTarget(Mobile from, object targeted) { if (m_Kit.Deleted) { return; } if (!(targeted is Corpse) && !(targeted is BigFish) && !(targeted is BaseHighseasFish) && !(targeted is HuntingPermit)) { from.SendLocalizedMessage(1042600); // That is not a corpse! } else if (targeted is Corpse && ((Corpse)targeted).VisitedByTaxidermist) { from.SendLocalizedMessage(1042596); // That corpse seems to have been visited by a taxidermist already. } else if (!m_Kit.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (from.Skills[SkillName.Carpentry].Base < 90.0) { from.SendLocalizedMessage(1042603); // You would not understand how to use the kit. } #region Huntmasters Challenge else if (targeted is HuntingPermit) { HuntingPermit lic = targeted as HuntingPermit; if (from.Backpack == null || !lic.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (!lic.CanUseTaxidermyOn) { //TODO: Message? } else if (from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Board), 10)) { Server.Engines.HuntsmasterChallenge.HuntingTrophyInfo info = Server.Engines.HuntsmasterChallenge.HuntingTrophyInfo.Infos[lic.KillEntry.KillIndex]; if (info != null) { if (info.Complex) { from.AddToBackpack(new HuntTrophyAddonDeed(from.Name, info.MeasuredBy, lic.KillEntry.Measurement, info.SouthID, lic.KillEntry.DateKilled.ToShortDateString(), lic.KillEntry.Location, info.Species)); } else { from.AddToBackpack(new HuntTrophyDeed(from.Name, info.MeasuredBy, lic.KillEntry.Measurement, info.SouthID, lic.KillEntry.DateKilled.ToShortDateString(), lic.KillEntry.Location, info.Species)); } lic.ProducedTrophy = true; m_Kit.Delete(); } } else { from.SendLocalizedMessage(1042598); // You do not have enough boards. return; } } #endregion else { object obj = targeted; if (obj is Corpse) { obj = ((Corpse)obj).Owner; } if (obj != null) { for (int i = 0; i < m_Table.Length; i++) { if (m_Table[i].CreatureType == obj.GetType()) { Container pack = from.Backpack; if (pack != null && pack.ConsumeTotal(typeof(Board), 10)) { from.SendLocalizedMessage(1042278); // You review the corpse and find it worthy of a trophy. from.SendLocalizedMessage(1042602); // You use your kit up making the trophy. Mobile hunter = null; int weight = 0; if (targeted is BigFish) { BigFish fish = targeted as BigFish; hunter = fish.Fisher; weight = (int)fish.Weight; fish.Consume(); } #region High Seas else if (targeted is RareFish) { RareFish fish = targeted as RareFish; hunter = fish.Fisher; weight = (int)fish.Weight; DateTime dateCaught = fish.DateCaught; from.AddToBackpack(new FishTrophyDeed(weight, hunter, dateCaught, m_Table[i].DeedNumber, m_Table[i].AddonNumber, m_Table[i].NorthID)); fish.Delete(); m_Kit.Delete(); return; } else if (targeted is RareCrabAndLobster) { RareCrabAndLobster fish = targeted as RareCrabAndLobster; hunter = fish.Fisher; weight = (int)fish.Weight; DateTime dateCaught = fish.DateCaught; from.AddToBackpack(new FishTrophyDeed(weight, hunter, dateCaught, m_Table[i].DeedNumber, m_Table[i].AddonNumber, m_Table[i].NorthID)); fish.Delete(); m_Kit.Delete(); return; } #endregion from.AddToBackpack(new TrophyDeed(m_Table[i], hunter, weight)); if (targeted is Corpse) { ((Corpse)targeted).VisitedByTaxidermist = true; } m_Kit.Delete(); return; } else { from.SendLocalizedMessage(1042598); // You do not have enough boards. return; } } } } from.SendLocalizedMessage(1042599); // That does not look like something you want hanging on a wall. } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Kit.Deleted) { return; } if (!(targeted is Corpse) && !(targeted is BigFish)) { from.SendLocalizedMessage(1042600); // That is not a corpse! } else if (targeted is Corpse && ((Corpse)targeted).VisitedByTaxidermist) { from.SendLocalizedMessage(1042596); // That corpse seems to have been visited by a taxidermist already. } else if (!m_Kit.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (from.Skills[SkillName.Carpentry].Base < 90.0) { from.SendLocalizedMessage(1042603); // You would not understand how to use the kit. } else { object obj = targeted; if (obj is Corpse) { obj = ((Corpse)obj).Owner; } if (obj != null) { for (int i = 0; i < m_Table.Length; i++) { if (m_Table[i].CreatureType == obj.GetType()) { Container pack = from.Backpack; if (pack != null && pack.ConsumeTotal(typeof(Board), 10)) { from.SendLocalizedMessage(1042278); // You review the corpse and find it worthy of a trophy. from.SendLocalizedMessage(1042602); // You use your kit up making the trophy. Mobile hunter = null; int weight = 0; if (targeted is BigFish) { BigFish fish = targeted as BigFish; hunter = fish.Fisher; weight = (int)fish.Weight; fish.Consume(); } from.AddToBackpack(new TrophyDeed(m_Table[i], hunter, weight)); if (targeted is Corpse) { ((Corpse)targeted).VisitedByTaxidermist = true; } m_Kit.Delete(); return; } else { from.SendLocalizedMessage(1042598); // You do not have enough boards. return; } } } } from.SendLocalizedMessage(1042599); // That does not look like something you want hanging on a wall. } }
public static void LBBstart_OnCommand(CommandEventArgs e) { Map map = Map.Felucca; ///////////// // MOBILES // ///////////// LBBbaker baker = new LBBbaker(); baker.Home = new Point3D(1451, 1614, 20); baker.MoveToWorld(baker.Home, map); LBBbaldur baldur = new LBBbaldur(); baldur.Home = new Point3D(5220, 730, -20); baldur.MoveToWorld(baldur.Home, map); LBBblacksmith blacksmith = new LBBblacksmith(); blacksmith.Home = new Point3D(1420, 1547, 30); blacksmith.MoveToWorld(blacksmith.Home, map); LBBcarpenter carpenter = new LBBcarpenter(); carpenter.Home = new Point3D(1432, 1595, 20); carpenter.MoveToWorld(carpenter.Home, map); LBBcook cook = new LBBcook(); cook.Home = new Point3D(1318, 1604, 50); cook.MoveToWorld(cook.Home, map); LBBdrunkJeffrey drunkJeffrey = new LBBdrunkJeffrey(); drunkJeffrey.Home = new Point3D(1412, 1655, 10); drunkJeffrey.MoveToWorld(drunkJeffrey.Home, map); LBBeasternMageryShopVendor easternMageryShopVendor = new LBBeasternMageryShopVendor(); easternMageryShopVendor.Home = new Point3D(1595, 1654, 10); easternMageryShopVendor.MoveToWorld(easternMageryShopVendor.Home, map); LBBfisherman fisherman = new LBBfisherman(); fisherman.Home = new Point3D(1489, 1749, -2); fisherman.MoveToWorld(fisherman.Home, map); LBBleonard leonard = new LBBleonard(); leonard.Home = new Point3D(1675, 1593, 7); leonard.MoveToWorld(leonard.Home, map); LBBlibrarian librarian = new LBBlibrarian(); librarian.Home = new Point3D(1410, 1604, 30); librarian.MoveToWorld(librarian.Home, map); LBBlordBritish lordBritish = new LBBlordBritish(); lordBritish.Home = new Point3D(1323, 1624, 55); lordBritish.MoveToWorld(lordBritish.Home, map); LBBmaid1 maid1 = new LBBmaid1(); maid1.Home = new Point3D(1352, 1660, 72); maid1.MoveToWorld(maid1.Home, map); LBBmaid2 maid2 = new LBBmaid2(); maid2.Home = new Point3D(1351, 1604, 72); maid2.MoveToWorld(maid2.Home, map); LBBmaid3 maid3 = new LBBmaid3(); maid3.Home = new Point3D(1329, 1660, 72); maid3.MoveToWorld(maid3.Home, map); LBBmaid4 maid4 = new LBBmaid4(); maid4.Home = new Point3D(1345, 1643, 50); maid4.MoveToWorld(maid4.Home, map); LBBmaid5 maid5 = new LBBmaid5(); maid5.Home = new Point3D(1353, 1588, 50); maid5.MoveToWorld(maid5.Home, map); LBBnorthernMageryShopVendor northernMageryShopVendor = new LBBnorthernMageryShopVendor(); northernMageryShopVendor.Home = new Point3D(1492, 1547, 35); northernMageryShopVendor.MoveToWorld(northernMageryShopVendor.Home, map); LBBoriandur oriandur = new LBBoriandur(); oriandur.Home = new Point3D(5323, 749, -20); oriandur.MoveToWorld(oriandur.Home, map); LBBpriest priest = new LBBpriest(); priest.Home = new Point3D(1452, 1589, 20); priest.MoveToWorld(priest.Home, map); LBBguard guard1 = new LBBguard(); guard1.Home = new Point3D(1323, 1626, 55); guard1.MoveToWorld(guard1.Home, map); guard1.Direction = guard1.GetDirectionTo(new Point3D(1330, 1624, 50)); LBBguard guard2 = new LBBguard(); guard2.Home = new Point3D(1323, 1622, 55); guard2.MoveToWorld(guard2.Home, map); guard2.Direction = guard2.GetDirectionTo(new Point3D(1330, 1624, 50)); LBBguard guard3 = new LBBguard(); guard3.Home = new Point3D(1328, 1627, 50); guard3.MoveToWorld(guard3.Home, map); guard3.Direction = guard3.GetDirectionTo(new Point3D(1330, 1624, 50)); LBBguard guard4 = new LBBguard(); guard4.Home = new Point3D(1328, 1621, 50); guard4.MoveToWorld(guard4.Home, map); guard4.Direction = guard4.GetDirectionTo(new Point3D(1330, 1624, 50)); LBBguard guard5 = new LBBguard(); guard5.Home = new Point3D(1334, 1627, 50); guard5.MoveToWorld(guard5.Home, map); guard5.Direction = guard5.GetDirectionTo(new Point3D(1330, 1624, 50)); LBBguard guard6 = new LBBguard(); guard6.Home = new Point3D(1334, 1621, 50); guard6.MoveToWorld(guard6.Home, map); guard6.Direction = guard6.GetDirectionTo(new Point3D(1330, 1624, 50)); /////////// // ITEMS // /////////// LBBdiary1 diary1 = new LBBdiary1(); diary1.MoveToWorld(new Point3D(1454, 1582, 30), map); LargeBoat boat = new LargeBoat(); boat.TillerMan = null; boat.Facing = Direction.West; boat.MoveToWorld(new Point3D(1493, 1854, -5), map); LBBdiary2 diary2 = new LBBdiary2(); diary2.MoveToWorld(new Point3D(1496, 1854, -2), map); BattleAxe axe = new BattleAxe(); axe.MoveToWorld(new Point3D(1490, 1854, -2), map); axe.Movable = false; GlassBottle bottle = new GlassBottle(); bottle.MoveToWorld(new Point3D(1497, 1854, -2), map); bottle.Movable = false; Backpack pack = new Backpack(); pack.MoveToWorld(new Point3D(1494, 1854, -2), map); pack.Movable = false; pack.DropItem(new GlassBottle()); pack.DropItem(new GlassBottle()); pack.DropItem(new FishingPole()); BigFish packItem1 = new BigFish(); packItem1.Amount = 8; pack.DropItem(packItem1); SpidersSilk packItem2 = new SpidersSilk(); packItem2.Amount = 3; pack.DropItem(packItem2); MandrakeRoot packItem3 = new MandrakeRoot(); packItem3.Amount = 5; pack.DropItem(packItem3); Bloodmoss packItem4 = new Bloodmoss(); packItem4.Amount = 3; pack.DropItem(packItem4); SulfurousAsh packItem5 = new SulfurousAsh(); packItem5.Amount = 4; pack.DropItem(packItem5); e.Mobile.SendMessage("All NPCs and Items have been generated. Ready to start Lord British's Books event."); }