Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
        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.
        }
Exemplo n.º 3
0
        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." );
        }
Exemplo n.º 4
0
        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.
        }
Exemplo n.º 5
0
        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.");
        }
Exemplo n.º 6
0
Arquivo: Flax.cs Projeto: Ziden/ServUO
        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.
        }
Exemplo n.º 7
0
        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.
            }
        }
Exemplo n.º 8
0
        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.
        }
Exemplo n.º 9
0
        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 Flax))
            {
                from.SendMessage("You finished processing all the flax.");
            }
            else if (!cotton.IsChildOf(from.Backpack))
            {
                from.SendMessage("You can not continue without the flax 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(Flax.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.
        }