protected override void OnTick() { ++m_Count; if (m_Count < m_MaxCount) { new SoundTimer(m_From).Start(); if (m_From.Mounted) { m_From.Animate(26, 5, 2, true, false, 0); } else { m_From.Animate(9, 5, 2, true, false, 0); } } else { m_Bank.Consume(Lumberjacking.System.Definition, 5, m_From); Item item = new Kindling(); if (m_From.PlaceInBackpack(item)) { m_From.SendLocalizedMessage(500491); // You put some kindling into your backpack. //m_From.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { m_From.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } }
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); } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, m_Item); } else if (targeted is SwampDragon && ((SwampDragon)targeted).HasBarding) { SwampDragon pet = (SwampDragon)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; } } else if (targeted is StaticTarget) { int itemID = ((StaticTarget)targeted).ItemID; if (itemID == 0xD15 || itemID == 0xD16) // red mushroom { PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is WitchApprenticeQuest) { FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective; if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms) { player.SendLocalizedMessage(1055036); // You slice a red cap mushroom from its stem. obj.Complete(); } } } } else { HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendLocalizedMessage(500493); // There's not enough wood here to harvest. } else { bank.Consume(def, 5); Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } } }
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(); }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, m_Item); } else { HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.GetCurrentFor(from) < 5) { from.SendLocalizedMessage(500493); // There's not enough wood here to harvest. } else { bank.Consume(def, 5); Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } }
public GiftBag(bool nice) { Item item = null; Hue = Utility.RandomList(32, 64, 2301); if (nice) { Name = "Happy Holidays!"; DropItem(MakeNewbie(new WristWatch())); if (Utility.RandomBool()) { item = new Food(4164); item.Hue = 432; item.Name = "fruit cake"; DropItem(MakeNewbie(item)); } else { DropItem(MakeNewbie(new Pizza())); } if (Utility.RandomBool()) { DropItem(MakeNewbie(new BeverageBottle(BeverageType.Champagne))); } else { DropItem(MakeNewbie(new BeverageBottle(BeverageType.EggNog))); } switch (Utility.Random(7)) { default: case 0: DropItem(MakeNewbie(new Apple())); break; case 1: DropItem(MakeNewbie(new Pear())); break; case 2: DropItem(MakeNewbie(new Bananas())); break; case 3: DropItem(MakeNewbie(new Dates())); break; case 4: DropItem(MakeNewbie(new Coconut())); break; case 5: DropItem(MakeNewbie(new Peach())); break; case 6: DropItem(MakeNewbie(new Grapes())); break; } item = new Goblet(); item.Name = "a champagne glass"; item.Hue = 71; DropItem(MakeNewbie(item)); item = new Goblet(); item.Name = "a champagne glass"; item.Hue = 34; DropItem(MakeNewbie(item)); DropItem(MakeNewbie(new FireworksWand(100))); item = new BaseItem(5359); item.Hue = Utility.RandomList(32, 64, 2301); item.Name = "Seasons Greetings"; DropItem(MakeNewbie(item)); } else { Name = "You were naughty this year!"; DropItem(MakeNewbie(new Food(4164))); // spam DropItem(MakeNewbie(new Coal())); item = new Kindling(); item.Name = "switches"; DropItem(item); // not newbied... item = new BaseItem(5359); item.Hue = Utility.RandomList(32, 64, 2301); item.Name = "Maybe next year you will get a nicer gift."; DropItem(MakeNewbie(item)); } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, m_Item); } else if (targeted is ForestWyrm && ((ForestWyrm)targeted).HasBarding) { ForestWyrm pet = (ForestWyrm)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; } } #region CropSystem else if (targeted is Weeds) { ((Weeds)targeted).Delete(); from.SendMessage("You slice the roots of the weed and toss them away."); } else if (targeted is Food && ((Food)targeted).SeedType != null) { try { Food food = targeted as Food; int amount = (food.Amount * Utility.RandomMinMax(2, 6)); Item seed = Activator.CreateInstance(food.SeedType, amount) as Item; if (seed != null) { from.AddToBackpack(seed); from.SendMessage(String.Format("You slice open the plant{0} and remove {1} seeds.", (food.Amount > 1 ? "s" : ""), (food.Amount > 1 ? "their" : "its"))); } food.Delete(); } catch { } } else if (targeted is Flax) { int amount = (((Flax)targeted).Amount * Utility.RandomMinMax(2, 6)); from.AddToBackpack(new FlaxSeed(amount)); from.SendMessage("You cut off the stalk of the flax and throw it away, keeping the seeds for later use."); ((Flax)targeted).Delete(); } else if (targeted is WheatSheaf) { int amount = (((WheatSheaf)targeted).Amount * Utility.RandomMinMax(3, 8)); from.AddToBackpack(new WheatSeed(amount)); from.SendMessage("You split open the wheat and take all the seeds you can find."); ((WheatSheaf)targeted).Delete(); } else if (targeted is Rose) { from.AddToBackpack(new RoseBud(Utility.RandomMinMax(3, 6))); from.SendMessage("You break away the petals of the flowers and gently remove the buds."); ((Rose)targeted).Delete(); } #endregion else { HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendLocalizedMessage(500493); // There's not enough wood here to harvest. } else { bank.Consume(5, from); Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } }
protected override void OnTarget(Mobile from, object targeted) { if (this.m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, this.m_Item); } else if (targeted is SwampDragon && ((SwampDragon)targeted).HasBarding) { SwampDragon pet = (SwampDragon)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; } } else { HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, this.m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendLocalizedMessage(500493); // There's not enough wood here to harvest. } else { bank.Consume(5, from); Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { if (targeted is Item) { Item item = targeted as Item; if (item.IsLockedDown || (item.RootParent is Container && (!item.Movable || !((Container)item.RootParent).LiftOverride))) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! return; } } if (((ICarvable)targeted).Carve(from, m_Item) && Siege.SiegeShard) { Siege.CheckUsesRemaining(from, m_Item); } } else if (targeted is SwampDragon && ((SwampDragon)targeted).HasBarding) { SwampDragon pet = (SwampDragon)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; if (Siege.SiegeShard && m_Item is IUsesRemaining) { Siege.CheckUsesRemaining(from, m_Item); } } } else { if (targeted is Mobile) { ((Mobile)targeted).PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500450, from.NetState); // You can only skin dead creatures. return; } else if (targeted is StaticTarget) { int itemID = ((StaticTarget)targeted).ItemID; if (itemID == 0xD15 || itemID == 0xD16) // red mushroom { PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is WitchApprenticeQuest) { FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective; if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms) { player.SendLocalizedMessage(1055036); // You slice a red cap mushroom from its stem. obj.Complete(); if (Siege.SiegeShard && m_Item is IUsesRemaining) { Siege.CheckUsesRemaining(from, m_Item); } return; } } } } } HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendMessage("Voce nao pode cortar nada ali"); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendMessage("Voce nao pode cortar nada ali"); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendMessage("Nao tem madeira suficiente aqui"); // There's not enough wood here to harvest. } else { bank.Consume(5, from); Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendMessage("Voce colocou alguns galhos secos em sua mochila"); // You put some kindling into your backpack. } else { from.SendMessage("Nao cabe mais em sua mochila"); // You can't place any kindling into your backpack! item.Delete(); } if (Siege.SiegeShard && m_Item is IUsesRemaining) { Siege.CheckUsesRemaining(from, m_Item); } } } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, m_Item); } else if (targeted is Container) { Container body = (Container)targeted; if (body.ItemID >= 0x4B5A && body.ItemID <= 0x4BAB) { body.ItemID = Utility.RandomList(0xECA, 0xECB, 0xECC, 0xECD, 0xECE, 0xECF, 0xED0, 0xED1, 0xED2); body.Hue = 0; from.CriminalAction(true); Misc.Titles.AwardKarma(from, -50, true); body.DropItem(new BodyPart(0x1D9F)); body.DropItem(new BodyPart(0x1DA4)); body.DropItem(new BodyPart(0x1DA2)); body.DropItem(new BodyPart(0x1DA3)); body.DropItem(new BodyPart(0x1DA1)); body.DropItem(new BodyPart(0x1DA0)); from.SendMessage("You hack up the body into bloody pieces."); } } else if (targeted is SwampDragon && ((SwampDragon)targeted).HasBarding) { SwampDragon pet = (SwampDragon)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; } } else { HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendMessage("There is not enough here to harvest."); //from.SendLocalizedMessage( 500493 ); // There's not enough wood here to harvest. } else { bank.Consume(5, from); if (tileID == 0x4D96 || tileID == 0x4D9A) // apples { Item item = new Apple(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put an apple into your backpack."); } else { from.SendMessage("You can't place any apples into your backpack!"); item.Delete(); } } else if (tileID == 0x4DA6 || tileID == 0x4DAA) // pears { Item item = new Pear(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put a pear into your backpack."); } else { from.SendMessage("You can't place any pears into your backpack!"); item.Delete(); } } else if (tileID == 0x4D9E || tileID == 0x4DA2) // peaches { Item item = new Peach(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put a peach into your backpack."); } else { from.SendMessage("You can't place any peaches into your backpack!"); item.Delete(); } } else if (tileID == 0x4CDA || tileID == 0x4CDB || tileID == 0x4CDC || tileID == 0x4CDD || tileID == 0x4CDE || tileID == 0x4CDF) // acorns { Item item = new Acorn(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put an acorn into your backpack."); } else { from.SendMessage("You can't place any acorns into your backpack!"); item.Delete(); } } else if (tileID == 0x4CA8 || tileID == 0x4CAA || tileID == 0x4CAB) // bananas { Item item = new Banana(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put a banana into your backpack."); } else { from.SendMessage("You can't place any bananas into your backpack!"); item.Delete(); } } else if (tileID == 0x4C95) // coconut { Item item = new Coconut(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put a coconut into your backpack."); } else { from.SendMessage("You can't place any coconuts into your backpack!"); item.Delete(); } } else if (tileID == 0x4C96) // dates { Item item = new Dates(); if (from.PlaceInBackpack(item)) { from.SendMessage("You put some dates into your backpack."); } else { from.SendMessage("You can't place any dates into your backpack!"); item.Delete(); } } else { Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Item.Deleted) { return; } if (targeted is ICarvable) { ((ICarvable)targeted).Carve(from, m_Item); } else if (targeted is SwampDragon && ((SwampDragon)targeted).HasBarding) { SwampDragon pet = (SwampDragon)targeted; if (!pet.Controlled || pet.ControlMaster != from) { from.SendLocalizedMessage(1053022); // You cannot remove barding from a swamp dragon you do not own. } else { pet.HasBarding = false; } } else if (targeted is Head) { Head targ = (Head)targeted; if (from.Karma > -1500) { from.SendMessage("Vous n'avez pas le profil d'un dépeceur de crâne..."); return; } if (from.Dex <= Utility.Random(110)) { from.SendMessage("Vous avez été trop maladroit et avez raté le dépeçage"); targ.Delete(); return; } from.SendMessage("Vous achevez d'enlever la chair du crâne."); from.AddToBackpack(new Skull()); targ.Consume(); } else if (targeted is Pumpkin) { Pumpkin targ = (Pumpkin)targeted; if (from.Dex <= Utility.Random(100)) { from.SendMessage("Vous avez été trop maladroit et avez raté votre tracé"); targ.Consume(); return; } int karma = 0; if (from.Karma > 100) { karma++; } else if (from.Karma < -100) { karma--; } int chance = Utility.Random(4) + karma; if (chance >= 2) { from.AddToBackpack(new SmileyPumpkin()); } else { from.AddToBackpack(new EvilPumpkin()); } from.SendMessage("Vous taillez la citrouille selon votre humeur"); targ.Consume(); } else { if (targeted is StaticTarget) { int itemID = ((StaticTarget)targeted).ItemID; if (itemID == 0xD15 || itemID == 0xD16) // red mushroom { PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is WitchApprenticeQuest) { FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective; if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms) { player.SendLocalizedMessage(1055036); // You slice a red cap mushroom from its stem. obj.Complete(); return; } } } } } HarvestSystem system = Lumberjacking.System; HarvestDefinition def = Lumberjacking.System.Definition; int tileID; Map map; Point3D loc; if (!system.GetHarvestDetails(from, m_Item, targeted, out tileID, out map, out loc)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else if (!def.Validate(tileID)) { from.SendLocalizedMessage(500494); // You can't use a bladed item on that! } else { HarvestBank bank = def.GetBank(map, loc.X, loc.Y); if (bank == null) { return; } if (bank.Current < 5) { from.SendLocalizedMessage(500493); // There's not enough wood here to harvest. } else { bank.Consume(5, from); if (map.Season == (int)ServerSeasons.Season.Spring && Utility.RandomDouble() < 0.33) { from.PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, false, "De la sève se met à couler du tronc, souhaitez-vous la recueillir?", from.NetState); from.BeginTarget(2, false, TargetFlags.None, new TargetCallback(OnSelectTarget)); return; } Item item = new Kindling(); if (from.PlaceInBackpack(item)) { from.SendLocalizedMessage(500491); // You put some kindling into your backpack. from.SendLocalizedMessage(500492); // An axe would probably get you more wood. } else { from.SendLocalizedMessage(500490); // You can't place any kindling into your backpack! item.Delete(); } } } } }
public GiftBag(bool nice) { Item item = null; Hue = Utility.RandomList(32, 77, 2301); if (nice) { Name = "Happy Holidays!"; DropItem(MakeNewbie(new WristWatch())); if (Utility.RandomBool()) { item = new Cake() { ItemID = 4164 }; item.Hue = 432; item.Name = "fruit cake"; DropItem(MakeNewbie(item)); } else { DropItem(MakeNewbie(new Pizza())); } if (Utility.RandomBool()) { DropItem(MakeNewbie(new BeverageBottle(BeverageType.Champagne))); } else { DropItem(MakeNewbie(new BeverageBottle(BeverageType.Eggnog))); } DropItem(MakeNewbie(new Dates())); item = new Goblet(); item.Name = "a champagne glass"; item.Hue = Utility.RandomList(77, 34); DropItem(MakeNewbie(item)); /*item = new Goblet(); * item.Name = "a champagne glass"; * item.Hue = 34; * DropItem(MakeNewbie(item));*/ DropItem(MakeNewbie(new FireworksWand(100))); item = new Item(5359); item.Hue = Utility.RandomList(32, 77, 2301); item.Name = "Seasons Greetings"; DropItem(MakeNewbie(item)); } else { Name = "You were naughty this year!"; DropItem(MakeNewbie(new Cake() { ItemID = 4164, Name = "spam" })); // spam DropItem(MakeNewbie(new Coal())); item = new Kindling(); item.Name = "switches"; DropItem(item); // not newbied... item = new Item(5359); item.Hue = Utility.RandomList(32, 77, 2301); item.Name = "Maybe next year you will get a nicer gift."; DropItem(MakeNewbie(item)); } }