protected override void OnTarget(Mobile from, object targ) { Item target = targ as Item; if (from is PlayerMobile && from.Backpack != null && m_Resin.IsChildOf(from.Backpack)) { if (IsHeatSource(target)) { if (from.InRange(target.Location, 1) && from.CanSee(target)) { m_Resin.Consume(1); Opium opiumDrug = new Opium(2); from.PlaySound(0x356); from.Backpack.DropItem(opiumDrug); from.SendMessage("You cook the resin until it becomes usable opium."); } else { from.SendMessage("You are too far away from that."); } } else { from.SendMessage("You need a decent flame."); } } else { from.SendMessage("That must be in your backpack for you to use it."); } }
public PickTarget(Opium item) : base(15, false, TargetFlags.None) { m_Opium = item; }