public PickWheelTarget(Wool wool) : base(3, false, TargetFlags.None) { m_Wool = wool; }
public void Carve( Mobile from, Item item ) { if ( DateTime.Now < m_NextWoolTime ) { // This sheep is not yet ready to be shorn. PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500449, from.Client ); } else if ( Controlled && ControlMaster != from ) { // The sheep nimbly escapes your attempts to shear his wool. PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500453, from.Client ); } else { Item wool = new Wool( Map == Map.Felucca ? 2 : 1 ); if ( !from.AddToBackpack( wool ) ) { from.SendLocalizedMessage( 500451 ); // You would not be able to place the gathered wool in your backpack! wool.Delete(); } else { from.SendLocalizedMessage( 500452 ); // You place the gathered wool into your backpack. if ( from is PlayerMobile && QuestHelper.HasQuest<ShearingKnowledgeQuest>( from as PlayerMobile ) ) { from.SendLocalizedMessage( 1113241 ); // You shear some fresh, Britannian wool from the sheep. from.AddToBackpack( new BritannianWool( Map == Map.Felucca ? 2 : 1 ) ); } NextWoolTime = DateTime.Now + TimeSpan.FromHours( 3.0 ); // TODO: Proper time delay } } }
public PickWheelTarget( Wool wool ) : base(3, false, TargetFlags.None) { m_Wool = wool; }
public override void OnComponentUsed(AddonComponent c, Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); /* * Unique problems have unique solutions. OSI does not have a problem with 1000s of mining carts * due to the fact that they have only a miniscule fraction of the number of 10 year vets that a * typical RunUO shard will have (RunUO's scaled down account aging system makes this a unique problem), * and the "freeness" of free accounts. We also dont have mitigating factors like inactive (unpaid) * accounts not gaining veteran time. * * The lack of high end vets and vet rewards on OSI has made testing the *exact* ranging/stacking * behavior of these things all but impossible, so either way its just an estimation. * * If youd like your shard's carts/stumps to work the way they did before, simply replace the check * below with this line of code: * * if (!from.InRange(GetWorldLocation(), 2) * * However, I am sure these checks are more accurate to OSI than the former version was. * */ if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this) || !((from.Z - Z) > -3 && (from.Z - Z) < 3)) { from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } else if (house != null && house.HasSecureAccess(from, SecureLevel.Friends)) { if (m_ResourceCount > 0) { Item res = null; switch (Utility.Random(5)) { case 0: res = new Wool(); break; case 1: res = new Leather(); break; case 2: res = new SpinedLeather(); break; case 3: res = new HornedLeather(); break; case 4: res = new BarbedLeather(); break; } int amount = Math.Min(10, m_ResourceCount); res.Amount = amount; if (!from.PlaceInBackpack(res)) { res.Delete(); from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again. } else { ResourceCount -= amount; PublicOverheadMessage(MessageType.Regular, 0, 1151834, m_ResourceCount.ToString()); // Resources: ~1_COUNT~ } } else { from.SendLocalizedMessage(1094725); // There are no more ResourceCounts available at this time. } } else { from.SendLocalizedMessage(1061637); // You are not allowed to access } }