public void Sew(int range) { IPooledEnumerable eable = m_Mobile.GetItemsInRange(range); foreach (Item item in eable) { if (item is ISpinningWheel) { ISpinningWheel wheel = (ISpinningWheel)item; if (wheel.Spinning) { if (MoveTo(item, false, 1)) { wheel.BeginSpin(new SpinCallback(Cotton.OnSpun), m_Mobile, item.Hue); //Repeat m_Schedule.nextAct = DateTime.Now; break; } } } } eable.Free(); }
protected override void OnTarget(Mobile from, object targeted) { if (m_Cotton.Deleted) { return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { if (!m_Cotton.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendLocalizedMessage(502656); // That spinning wheel is being used. } else { m_Cotton.Consume(); wheel.BeginSpin(new SpinCallback(Cotton.OnSpun), from, m_Cotton.Hue); } } else { from.SendLocalizedMessage(502658); // Use that on a spinning wheel. } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Wool.Deleted) { return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { Item item = (Item)wheel; if (!m_Wool.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendLocalizedMessage(502656); // That spinning wheel is being used. } else { SpinningWheelQuotaAttachment att = (SpinningWheelQuotaAttachment)XmlAttach.FindAttachment(from, typeof(SpinningWheelQuotaAttachment)); if (att == null) { att = new SpinningWheelQuotaAttachment(); XmlAttach.AttachTo(from, att); } if (att.getNumWheels() < SpinningWheelQuotaAttachment.m_WheelQuotaCap) { att.AddWheels(item); from.PublicOverheadMessage(Server.Network.MessageType.Emote, 51, false, "*spinning*"); m_Wool.Consume(); if (m_Wool is TaintedWool) { wheel.BeginSpin(new SpinCallback(TaintedWool.OnSpunLoop), from, m_Wool.Hue, m_Wool); } else { wheel.BeginSpin(new SpinCallback(Wool.OnSpunLoop), from, m_Wool.Hue, m_Wool); } } else { from.SendMessage("You are too occupied with the " + SpinningWheelQuotaAttachment.m_WheelQuotaCap.ToString() + " spinning wheels you are running."); } } } else { from.SendLocalizedMessage(502658); // Use that on a spinning wheel. } }
protected override void OnTarget(Mobile from, object targeted) { if (m_RawFlax.Deleted) { return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { Item item = (Item)wheel; if (!m_RawFlax.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendLocalizedMessage(502656); // That spinning wheel is being used. } else { LokaiSkills skills = LokaiSkillUtilities.XMLGetSkills(from); LokaiSkill lokaiSkill = (LokaiSkillUtilities.XMLGetSkills(from)).Spinning; SuccessRating rating = LokaiSkillUtilities.CheckLokaiSkill(from, lokaiSkill, 0.0, 100.0); if (rating >= SuccessRating.PartialSuccess) { m_RawFlax.Consume(); wheel.BeginSpin(new SpinCallback(RawFlax.OnSpun), from, m_RawFlax.Hue); } else if (rating == SuccessRating.Failure) { from.SendMessage("You fail, but manage to save your Raw Flax."); } else if (rating == SuccessRating.HazzardousFailure || rating == SuccessRating.CriticalFailure) { m_RawFlax.Consume(); from.SendMessage("You fail, and some Raw Flax is lost."); } else if (rating == SuccessRating.TooDifficult) { m_RawFlax.Consume(); from.SendMessage("You have no idea how to use this thing."); from.SendMessage("You fail utterly, some Raw Flax is lost."); } } } else { from.SendLocalizedMessage(502658); // Use that on a spinning wheel. } }
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue ) { Item item = new SpoolOfThread( 6 ); item.Hue = hue; from.AddToBackpack( item ); from.SendAsciiMessage( "You put the spools of thread in your backpack." ); }
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue ) { Item item = new DarkYarn( 3 ); item.Hue = hue; from.AddToBackpack( item ); from.SendAsciiMessage( "You put the balls of yarn in your backpack." ); }
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue ) { Item item = new SpoolOfThread( 6 ); item.Hue = hue; from.AddToBackpack( item ); from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new SpoolOfThread(6); item.Hue = hue; from.AddToBackpack(item); from.SendMessage("Voce colocou linho sua mochila"); }
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue ) { Item item = new DarkYarn( 3 ); item.Hue = hue; from.AddToBackpack( item ); from.SendLocalizedMessage( 1010576 ); // You put the balls of yarn in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new SpoolOfThread(6); item.Hue = hue; from.AddToBackpack(item); from.SendAsciiMessage("You put the spools of thread in your backpack."); }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new DarkYarn(3); item.Hue = hue; from.AddToBackpack(item); from.SendAsciiMessage("You put the balls of yarn in your backpack."); }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new SpoolOfThread(2); item.Hue = hue; from.AddToBackpack(item); from.SendMessage("Voce colocou linho em sua mochila"); // You put the spools of thread in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new SpoolOfThread(6); item.Hue = hue; from.AddToBackpack(item); from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new DarkYarn(3); item.Hue = hue; from.AddToBackpack(item); from.SendLocalizedMessage(1010576); // You put the balls of yarn in your backpack. }
public override void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new DarkYarn(); item.Hue = hue; from.AddToBackpack(item); from.SendLocalizedMessage(1010574); // You put a ball of yarn in your backpack. }
public static new void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { Item item = new DarkYarn(1) { Hue = hue }; _ = from.AddToBackpack(item); from.SendLocalizedMessage(1010574); // You put a ball of yarn in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue) { //Item item = new SpoolOfThread(6); Item item = new LinBoltOfCloth(1); item.Hue = hue; from.AddToBackpack(item); from.SendMessage("Vous utilisez l'outil pour récupperez le lin de la fleur."); // You put the spools of thread in your backpack. }
public static void OnSpun(ISpinningWheel wheel, Mobile from, Item yarn) { if (yarn != null) { Item item = new DarkYarn((yarn.Amount * 3)); item.Hue = yarn.Hue; yarn.Delete(); from.AddToBackpack(item); from.SendLocalizedMessage(1010576); // You put the balls of yarn in your backpack. } }
public static void OnSpun(ISpinningWheel wheel, Mobile from, Item yarn) { if (yarn != null) { Item item = new SpoolOfThread((yarn.Amount * 6)); item.Hue = yarn.Hue; yarn.Delete(); from.AddToBackpack(item); from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack. } }
public static void OnSpunLoop(ISpinningWheel wheel, Mobile from, int hue, Item cotton) { Item item = new SpoolOfThread(3); item.Hue = hue; from.AddToBackpack(item); SpinningWheelQuotaAttachment att = (SpinningWheelQuotaAttachment)XmlAttach.FindAttachment(from, typeof(SpinningWheelQuotaAttachment)); if (att == null) { att = new SpinningWheelQuotaAttachment(); XmlAttach.AttachTo(from, att); } att.RemoveWheels((Item)wheel); if (from.NetState == null) // player logged off return; if (cotton.Deleted || cotton.Amount < 1 || !(cotton is Cotton)) from.SendMessage("You finished processing all the cotton."); else if (!cotton.IsChildOf(from.Backpack)) from.SendMessage("You can not continue without the cotton in your backpack."); else if (wheel is Item) { Item wheel1 = (Item)wheel; if (wheel1.Deleted) from.SendMessage("Where did the spinning wheel go?"); else if (!from.InRange(wheel1.GetWorldLocation(), 3)) from.SendMessage("You are too far away from the spinning wheel to continue your work."); else if (wheel.Spinning) from.SendLocalizedMessage(502656); // That spinning wheel is being used. else { if (att.getNumWheels() < SpinningWheelQuotaAttachment.m_WheelQuotaCap) { att.AddWheels(wheel1); if (Utility.Random(6 * att.getNumWheels()) < 1) from.PublicOverheadMessage(Server.Network.MessageType.Emote, 51, false, "*spinning*"); cotton.Consume(); wheel.BeginSpin(new SpinCallback(Cotton.OnSpunLoop), from, cotton.Hue, cotton); return; } else from.SendMessage("You are too occupied with the " + SpinningWheelQuotaAttachment.m_WheelQuotaCap.ToString() + " spinning wheels you are running."); } } from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack. }
protected override void OnTarget(Mobile from, object targeted) { if (m_Wool.Deleted) { return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { Item item = (Item)wheel; if (!m_Wool.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendMessage("Le rouet est deja en marche !"); //from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used. } else { m_Wool.Consume(); if (m_Wool is TaintedWool) { wheel.BeginSpin(new SpinCallback(TaintedWool.OnSpun), from, m_Wool.Hue); } else { wheel.BeginSpin(new SpinCallback(Wool.OnSpun), from, m_Wool.Hue); } } } else { from.SendMessage("Ceci n'est pas un rouet !"); //from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel. } }
protected override void OnTarget(Mobile from, object targeted) { if (this.m_Cotton.Deleted) { return; } if (this.m_Cotton.Amount < 5) { from.SendMessage("Junte pelo menos 5 bolas de algodao"); return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { Item item = (Item)wheel; if (!this.m_Cotton.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendMessage("Esta roda ja esta sendo usada"); } else { this.m_Cotton.Consume(5); wheel.BeginSpin(new SpinCallback(Cotton.OnSpun), from, this.m_Cotton.Hue); } } else { from.SendMessage("Use isto em uma roda de tecer"); // Use that on a spinning wheel. } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Wool.Deleted) { return; } ISpinningWheel wheel = targeted as ISpinningWheel; if (wheel == null && targeted is AddonComponent) { wheel = ((AddonComponent)targeted).Addon as ISpinningWheel; } if (wheel is Item) { Item item = (Item)wheel; if (!m_Wool.IsChildOf(from.Backpack)) { from.SendAsciiMessage("That must be in your pack for you to use it."); // That must be in your pack for you to use it. } else if (wheel.Spinning) { from.SendAsciiMessage("That spinning wheel is being used."); // That spinning wheel is being used. } else { m_Wool.Consume(); wheel.BeginSpin(new SpinCallback(Wool.OnSpun), from, m_Wool.Hue); } } else { from.SendAsciiMessage("Use that on a spinning wheel."); // Use that on a spinning wheel. } }
public static void OnSpunLoop(ISpinningWheel wheel, Mobile from, int hue, Item cotton) { Item item = new DarkYarn(3); item.Hue = hue; from.AddToBackpack(item); SpinningWheelQuotaAttachment att = (SpinningWheelQuotaAttachment)XmlAttach.FindAttachment(from, typeof(SpinningWheelQuotaAttachment)); if (att == null) { att = new SpinningWheelQuotaAttachment(); XmlAttach.AttachTo(from, att); } att.RemoveWheels((Item)wheel); if (from.NetState == null) // player logged off { return; } if (cotton.Deleted || cotton.Amount < 1 || !(cotton is Wool)) { from.SendMessage("You finished processing all the wool."); } else if (!cotton.IsChildOf(from.Backpack)) { from.SendMessage("You can not continue without the wool in your backpack."); } else if (wheel is Item) { Item wheel1 = (Item)wheel; if (wheel1.Deleted) { from.SendMessage("Where did the spinning wheel go?"); } else if (!from.InRange(wheel1.GetWorldLocation(), 3)) { from.SendMessage("You are too far away from the spinning wheel to continue your work."); } else if (wheel.Spinning) { from.SendLocalizedMessage(502656); // That spinning wheel is being used. } else { if (att.getNumWheels() < SpinningWheelQuotaAttachment.m_WheelQuotaCap) { att.AddWheels(wheel1); if (Utility.Random(6 * att.getNumWheels()) < 1) { from.PublicOverheadMessage(Server.Network.MessageType.Emote, 51, false, "*spinning*"); } cotton.Consume(); wheel.BeginSpin(new SpinCallback(Wool.OnSpunLoop), from, cotton.Hue, cotton); return; } else { from.SendMessage("You are too occupied with the " + SpinningWheelQuotaAttachment.m_WheelQuotaCap.ToString() + " spinning wheels you are running."); } } } from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack. }