예제 #1
0
 public FromQuiFermente(CheeseForm m_TimerCheeseForm) : base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(72), 100)          //base( TimeSpan.FromSeconds(delai avant premier tick),TimeSpan.FromSeconds(durée du tick),nombre de répétition)
 {
     Priority       = TimerPriority.FiftyMS;
     m_TimerMoulVar = m_TimerCheeseForm;
 }
예제 #2
0
        /* le target aura 2 effets , si c'est un animal a traire , il extrait du lait en echange de 2 point de Bouffe
         * si c'est une bouteille il extrait 1L du seau et fait une bouteille pleine , chaque lait a une propriété soif
         * allant de 1 a 3 pour le lait de chevre , on pourra transformez cela en faim avec les fromages */

        // google translates

        /* the target will have 2 effects, if it is an animal has to milk,
         * it extracts from milk in exchange of 2 point from Puffs out if it is a bottle it
         * extracts 1L from the bucket and makes a full bottle, each milk has a property thirst
         * going for 1 A 3 for the goat's milk, one will be able transform that into hunger with cheeses */


        protected override void OnTarget(Mobile from, object o)
        {
            Container pack = from.Backpack;

            if (o is Mobile)
            {
                m_mobile = (Mobile)o;
            }

            if ((m_varsaut.m_laitage == 0) && (m_varsaut.m_bestiole == 0) && m_mobile != null)
            {
                if (m_mobile is Sheep)
                {
                    m_varsaut.m_bestiole = 1;
                    //m_varsaut.Name ="Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk";
                    //from.SendMessage (0x84B,"The milk bucket is ready for sheep milk.");
                    ++m_varsaut.m_laitage;
                    m_mobile.Stam = m_mobile.Stam - 20;
                    from.PlaySound(0X4D1);
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk.";
                    from.SendMessage(0x96D, "You obtain 1 liter of sheep milk.");
                }
                else if (m_mobile is Goat)
                {
                    m_varsaut.m_bestiole = 2;
                    //m_varsaut.Name ="Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk";
                    //from.SendMessage (0x84B,"The milk bucket is ready for goat milk.");
                    ++m_varsaut.m_laitage;
                    m_mobile.Stam = m_mobile.Stam - 20;
                    from.PlaySound(0X4D1);
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk.";
                    from.SendMessage(0x96D, "You obtain 1 liter of goat milk.");
                }
                else if (m_mobile is Cow)
                {
                    m_varsaut.m_bestiole = 3;
                    //m_varsaut.Name ="Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk";
                    //from.SendMessage (0x84B,"The milk bucket is ready for cow milk.");
                    ++m_varsaut.m_laitage;
                    m_mobile.Stam = m_mobile.Stam - 20;
                    from.PlaySound(0X4D1);
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk.";
                    from.SendMessage(0x96D, "You obtain 1 liter of cow milk.");
                }
                else
                {
                    from.SendMessage(0x96D, "You can obtain milk only from sheep, goats or cows!");
                    from.CloseGump(typeof(LaitageHelpGump));
                    from.SendGump(new LaitageHelpGump(from));
                }
            }
            else if (m_mobile != null && (m_varsaut.m_laitage <= 49))
            {
                if (m_mobile.Stam > 3)
                {
                    if ((m_mobile is Cow) && (m_varsaut.m_bestiole == 3))
                    {
                        ++m_varsaut.m_laitage;
                        m_mobile.Stam = m_mobile.Stam - 20;
                        from.PlaySound(0X4D1);
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk.";
                        from.SendMessage(0x96D, "You obtain 1 liter of cow milk.");
                    }
                    else if ((m_mobile is Goat) && (m_varsaut.m_bestiole == 2))
                    {
                        ++m_varsaut.m_laitage;
                        m_mobile.Stam = m_mobile.Stam - 20;
                        from.PlaySound(0X4D1);
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk.";
                        from.SendMessage(0x96D, "You obtain 1 liter of goat milk.");
                    }
                    else if ((m_mobile is Sheep) && (m_varsaut.m_bestiole == 1))
                    {
                        ++m_varsaut.m_laitage;
                        m_mobile.Stam = m_mobile.Stam - 20;
                        from.PlaySound(0X4D1);
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk.";
                        from.SendMessage(0x96D, "You obtain 1 liter of sheep milk.");
                    }
                    else
                    {
                        from.SendMessage(0x84B, "You can't obtain milk from that!");
                        from.CloseGump(typeof(LaitageHelpGump));
                        from.SendGump(new LaitageHelpGump(from));
                    }
                }
                else
                {
                    from.SendMessage(0x84B, "This animal is too tired to give more milk!");
                }
            }
            else if ((o is Bottle) && (m_varsaut.m_laitage > 0) && pack.ConsumeTotal(typeof(Bottle), 1))
            {
                if (m_varsaut.m_bestiole == 3)
                {
                    m_varsaut.m_laitage = m_varsaut.m_laitage - 1;
                    from.SendMessage(0x96D, "You fill a bottle with cow milk.");
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk.";
                    from.PlaySound(0X240);
                    from.AddToBackpack(new BottleCowMilk());
                }
                else if (m_varsaut.m_bestiole == 2)
                {
                    m_varsaut.m_laitage = m_varsaut.m_laitage - 1;
                    from.SendMessage(0x96D, "You fill a bottle with goat milk.");
                    from.PlaySound(0X240);
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk.";
                    from.AddToBackpack(new BottleGoatMilk());
                }
                else if (m_varsaut.m_bestiole == 1)
                {
                    m_varsaut.m_laitage = m_varsaut.m_laitage - 1;
                    from.SendMessage(0x96D, "You fill a bottle with sheep milk.");
                    m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk.";
                    from.PlaySound(0X240);
                    from.AddToBackpack(new BottleSheepMilk());
                }
                else
                {
                    from.SendMessage(0x84B, "This isn't a bottle or the milk bucket is empty.");
                    from.CloseGump(typeof(LaitageHelpGump));
                    from.SendGump(new LaitageHelpGump(from));
                }

                if (m_varsaut.m_laitage <= 0)
                {
                    m_varsaut.m_bestiole = 0;
                    m_varsaut.Name       = "Milk Bucket: (Empty)";
                }
            }
            else if ((o is BaseBeverage))                 // added by Alari
            {
                BaseBeverage p = (BaseBeverage)o;

                if ((m_varsaut.m_laitage >= p.MaxQuantity) && (p.Quantity == 0))
                {
                    if (m_varsaut.m_bestiole == 3)
                    {
                        p.Content           = BeverageType.Milk;
                        p.Quantity          = p.MaxQuantity;
                        m_varsaut.m_laitage = m_varsaut.m_laitage - p.MaxQuantity;
                        from.SendMessage(0x96D, "You fill the container with cow milk.");
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk.";
                        from.PlaySound(0X240);
                    }
                    else if (m_varsaut.m_bestiole == 2)
                    {
                        p.Content           = BeverageType.Milk;
                        p.Quantity          = p.MaxQuantity;
                        m_varsaut.m_laitage = m_varsaut.m_laitage - p.MaxQuantity;
                        from.SendMessage(0x96D, "You fill the container with goat milk.");
                        from.PlaySound(0X240);
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk.";
                    }
                    else if (m_varsaut.m_bestiole == 1)
                    {
                        p.Content           = BeverageType.Milk;
                        p.Quantity          = p.MaxQuantity;
                        m_varsaut.m_laitage = m_varsaut.m_laitage - p.MaxQuantity;
                        from.SendMessage(0x96D, "You fill the container with sheep milk.");
                        m_varsaut.Name = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk.";
                        from.PlaySound(0X240);
                    }
                    else
                    {
                        from.SendMessage(0x84B, "This isn't a drink container, drink container has liquid in it already, or the milk bucket doesn't have enough milk left in it.");
                        from.CloseGump(typeof(LaitageHelpGump));
                        from.SendGump(new LaitageHelpGump(from));
                    }
                }

                if (m_varsaut.m_laitage <= 0)
                {
                    m_varsaut.m_laitage  = 0;
                    m_varsaut.m_bestiole = 0;
                    m_varsaut.Name       = "Milk Bucket: (Empty)";
                }
            }

            else if (o is CheeseForm)               // added by Alari
            {
                CheeseForm m_MouleVar = (CheeseForm)o;

                if (m_varsaut.m_laitage >= 15 && m_MouleVar.m_MoulePlein == false)
                {
                    m_varsaut.m_laitage = m_varsaut.m_laitage - 15;

                    if (m_varsaut.m_bestiole == 1)
                    {
                        m_varsaut.Name          = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of sheep milk.";
                        m_MouleVar.m_FromAfaire = 1;
                        m_MouleVar.Name         = "Cheese form - Sheep cheese";
                        m_MouleVar.m_MoulePlein = true;
                    }
                    else if (m_varsaut.m_bestiole == 2)
                    {
                        m_varsaut.Name          = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of goat milk.";
                        m_MouleVar.m_FromAfaire = 2;
                        m_MouleVar.Name         = "Cheese form - Goat cheese";
                        m_MouleVar.m_MoulePlein = true;
                    }
                    else if (m_varsaut.m_bestiole == 3)
                    {
                        m_varsaut.Name          = "Milk Bucket: " + m_varsaut.m_laitage.ToString() + "/50 liters of cow milk.";
                        m_MouleVar.m_FromAfaire = 3;
                        m_MouleVar.Name         = "Cheese form - Cow cheese";
                        m_MouleVar.m_MoulePlein = true;
                    }
                    else
                    {
                        from.SendMessage(0x84C, "This milk bucket is bad.");
                        from.CloseGump(typeof(CheeseFormHelpGump));
                        from.SendGump(new CheeseFormHelpGump(from));
                    }

                    if (m_varsaut.Laitage <= 0)
                    {
                        m_varsaut.m_bestiole = 0;
                        m_varsaut.Name       = "This milk bucket is empty";
                    }
                }
                else
                {
                    from.SendMessage(0x84C, "The milk bucket didn't contain enough milk.");
                    from.CloseGump(typeof(CheeseFormHelpGump));
                    from.SendGump(new CheeseFormHelpGump(from));
                }
            }

            else
            {
                from.CloseGump(typeof(LaitageHelpGump));
                from.SendGump(new LaitageHelpGump(from));
            }
        }
예제 #3
0
		public OnRempliMouleFromton( CheeseForm m_CheeseForm ) : base( 3, false, TargetFlags.None )
		{
			m_MouleVar = m_CheeseForm;
			
		}
예제 #4
0
 public OnRempliMouleFromton(CheeseForm m_CheeseForm) : base(3, false, TargetFlags.None)
 {
     m_MouleVar = m_CheeseForm;
 }
 public FromQuiFermente(CheeseForm m_TimerCheeseForm) : base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(72), 100)
 {
     Priority       = TimerPriority.FiftyMS;
     m_TimerMoulVar = m_TimerCheeseForm;
 }
예제 #6
0
 //base( TimeSpan.FromSeconds(delai avant premier tick),TimeSpan.FromSeconds(durée du tick),nombre de répétition)
 public FromQuiFermente( CheeseForm m_TimerCheeseForm )
     : base(TimeSpan.FromSeconds(1),TimeSpan.FromSeconds(72),100)
 {
     Priority = TimerPriority. FiftyMS ;
     m_TimerMoulVar = m_TimerCheeseForm;
 }
예제 #7
0
 public CheeseFormMenu(Mobile from, CheeseForm CheeseForm)
     : base(5114, 1)
 {
     m_From = from;
     m_Cheese = CheeseForm;
 }
예제 #8
0
        public void ExtractTarget(Mobile from, object obj)
        {
            if (this.MilkType != Milk.None)
            {
                if (obj is Mobile)
                {
                    Mobile targ = (Mobile)obj;

                    if (Quantity >= MaxQuantity)
                    {
                        from.SendMessage("Ce seau est plein");
                        return;
                    }

                    if (targ.Stam < 10)
                    {
                        targ.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous ne pourrez rien enlever à cette pauvre bête!", from.NetState);
                        return;
                    }

                    if (targ is Cow && (this.MilkType == Milk.None || this.MilkType == Milk.Cow))
                    {
                        MilkType = Milk.Cow;
                        Quantity++;
                        targ.Stam -= 10;
                        from.SendMessage("Vous obtenez" + BucketNameAffix());
                        return;
                    }

                    if (targ is Brebis && (this.MilkType == Milk.None || this.MilkType == Milk.Sheep))
                    {
                        MilkType = Milk.Sheep;
                        Quantity++;
                        targ.Stam -= 10;
                        from.SendMessage("Vous obtenez" + BucketNameAffix());
                        return;
                    }

                    if (targ is Chevre && (this.MilkType == Milk.None || this.MilkType == Milk.Goat))
                    {
                        MilkType = Milk.Goat;
                        Quantity++;
                        targ.Stam -= 10;
                        from.SendMessage("Vous obtenez" + BucketNameAffix());
                        return;
                    }

                    if (targ == from)
                    {
                        from.SendMessage("Versez le contenu dans un récipient plus propice pour boire!");
                        return;
                    }
                    from.SendMessage("Cela ne servira à rien sur cette créature");
                    return;
                }
                if (obj is BaseBeverage)
                {
                    BaseBeverage targ = (BaseBeverage)obj;

                    int shared = Math.Min(this.Quantity, (targ.MaxQuantity - targ.Quantity));

                    from.SendMessage("Vous versez{0} dans le contenant", BucketNameAffix());
                    targ.Quantity += shared;
                    this.Quantity -= shared;

                    switch (MilkType)
                    {
                    case Milk.Cow: targ.Content = BeverageType.Milk; break;

                    case Milk.Goat: targ.Content = BeverageType.LaitChevre; break;

                    case Milk.Sheep: targ.Content = BeverageType.LaitBrebis; break;
                    }
                }

                if (obj is CheeseForm)
                {
                    CheeseForm targ = (CheeseForm)obj;

                    if (ResourceType != BucketLiquid.None)
                    {
                        from.SendMessage("Vous ne pouvez verser cela ici");
                        return;
                    }

                    if (targ.Quantity >= targ.MaxQuantity)
                    {
                        from.SendMessage("Ce fromage fermente déjà");
                        return;
                    }

                    if (targ.Content != Milk.None && (MilkType != targ.Content))
                    {
                        from.SendMessage("Vous ne pouvez mélanger des laits");
                        return;
                    }

                    int shared = Math.Min(Quantity, (targ.MaxQuantity - targ.Quantity));

                    targ.Content = this.MilkType;

                    from.SendMessage("Vous versez{0} dans le moule", BucketNameAffix());
                    targ.Quantity += shared;
                    this.Quantity -= shared;
                    if (targ.Quantity >= targ.MaxQuantity)
                    {
                        targ.CookingValue = from.Skills[SkillName.Cooking].Value;
                        targ.TimeStart    = DateTime.Now;
                    }
                }
            }

            else
            {
                from.SendMessage("Ce seau est vide");
                return;
            }

            if (Quantity <= 0)
            {
                EmptyBucket();
            }
        }