예제 #1
0
        public override bool OnDroppedToMobile(Mobile from, Mobile target)
        {
            if (target is BaseVendor && target.Region.IsPartOf(typeof(VillageRegion)))
            {
                if (m_Poison == 1)
                {
                    target.ApplyPoison(from, PoisonImpl.Regular);
                }
                else if (m_Poison == 2)
                {
                    target.ApplyPoison(from, PoisonImpl.Greater);
                }
                else if (m_Poison == 3)
                {
                    target.ApplyPoison(from, PoisonImpl.Deadly);
                }
                else if (m_Poison == 4)
                {
                    target.ApplyPoison(from, PoisonImpl.Lethal);
                }
                else
                {
                    target.ApplyPoison(from, PoisonImpl.Lethal);
                }

                target.Say("Poison!");

                target.PlaySound(target.Female ? 813 : 1087);
                if (!target.Mounted)
                {
                    target.Animate(32, 5, 1, true, false, 0);
                }
                Puke puke = new Puke();
                puke.Map      = target.Map;
                puke.Location = target.Location;

                this.Delete();
            }
            else if (target.Body == 0x191 || target.Body == 0x190 || target.Body == 606 || target.Body == 605)
            {
                from.AddToBackpack(this);
                target.Say("That doesn't look good.");
            }
            else
            {
                from.AddToBackpack(this);
                from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "They don't seem to want that.", from.NetState);
            }

            return(true);
        }
예제 #2
0
        public override bool Eat(Mobile from)
        {
            if (FillHunger(from, FillFactor))
            {
                string tastemsg;
                int    RatChances = (int)Taste;
                if (Poisoner == null)
                {
                    if (RatChances > Utility.Random(8))
                    {
                        BaseCreature rat = new Rat();
                        rat.MoveToWorld(from.Location, from.Map);
                        switch (Utility.Random(4))
                        {
                        case 2:
                        {
                            rat.FocusMob = from;
                            rat.AI       = AIType.AI_Predator;
                            rat.Say("*Semble jaloux de votre fromage*");
                            break;
                        }

                        default:
                        {
                            rat.Controlled    = true;
                            rat.ControlMaster = from;
                            rat.ControlOrder  = OrderType.Come;
                            rat.Say("*Couinant amoureusement près de vous*");
                            break;
                        }
                        }
                    }

                    string paste = "Vous mangez";
                    string taste = "";

                    switch (Paste)
                    {
                    case CheesePaste.Molle: paste = "Vous laissez fondre"; break;

                    case CheesePaste.Normale: paste = "Vous dégustez"; break;

                    case CheesePaste.Dure: paste = "Vous grignottez"; break;
                    }

                    switch (Taste)
                    {
                    case CheeseTaste.Faible: taste = "au goût subtil"; break;

                    case CheeseTaste.Leger: taste = "au goût délicat"; break;

                    case CheeseTaste.Modere: taste = "au goût agréable"; break;

                    case CheeseTaste.Prononce: taste = "au goût bien présent"; break;

                    case CheeseTaste.Fort: taste = "au goût persistant"; break;
                    }

                    tastemsg = String.Format("{0} ce fromage {1}", paste, taste);
                    if (Quality == CheeseQuality.Exceptionnal)
                    {
                        from.Say("*Semble subjugué{0} par le goût de ce fromage*", from.Female ? "e" : "");
                    }
                }
                else
                {
                    tastemsg = "Le goût de la moisissure vous dégoûte au plus haut point";
                    from.PlaySound(from.Female ? 813 : 1087);

                    Point3D p = new Point3D(from.Location);
                    switch (from.Direction)
                    {
                    case Direction.North:
                        p.Y--; break;

                    case Direction.South:
                        p.Y++; break;

                    case Direction.East:
                        p.X++; break;

                    case Direction.West:
                        p.X--; break;

                    case Direction.Right:
                        p.X++; p.Y--; break;

                    case Direction.Down:
                        p.X++; p.Y++; break;

                    case Direction.Left:
                        p.X--; p.Y++; break;

                    case Direction.Up:
                        p.X--; p.Y--; break;

                    default:
                        break;
                    }
                    p.Z = from.Map.GetAverageZ(p.X, p.Y);

                    bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, from.Map, 12, false);

                    if (canFit)
                    {
                        Puke puke = new Puke();
                        puke.Map      = from.Map;
                        puke.Location = p;
                    }
                    from.Say("*Recrache le fromage, l'air malade*");
                }

                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, tastemsg, from.NetState);


                // Play a random "eat" sound
                from.PlaySound(Utility.Random(0x3A, 3));

                if (from.Body.IsHuman && !from.Mounted)
                {
                    from.Animate(34, 5, 1, true, false, 0);
                }

                if (Poison != null)
                {
                    from.ApplyPoison(Poisoner, Poison);
                }

                Consume();

                return(true);
            }

            return(false);
        }
예제 #3
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            int val = info.ButtonID - 1;

            if (val < 0)
            {
                return;
            }

            Mobile         from       = m_From;
            Mobile         victim     = m_Suffer;
            BaseVoodooDoll voodoodoll = m_Doll;
            int            type       = val % 15;
            int            index      = val / 15;

            string frommsg   = "Vous piquez ";
            string victimmsg = "*Vous ressentez une douleur ";
            string publicmsg = null;
            int    sound     = victim.Female ? 814 : 1088;

            switch (index)
            {
            default: break;

            case 1:
            {
                frommsg   += "son bras";
                victimmsg += "au bras*";
                publicmsg  = "*Se prend le bras*";
                victim.Animate(120, 5, 1, true, false, 0);

                break;
            }

            case 2:
            {
                frommsg   += "sa main";
                victimmsg += "à la main*";
                if (from.Skills[SkillName.Anatomy].Value > Utility.Random(200))
                {
                    Item item = victim.FindItemOnLayer(Layer.OneHanded);
                    if (item != null)
                    {
                        item.MoveToWorld(victim.Location);
                        publicmsg = "*Lâche ce qu'il tient sous la douleur*";
                        if (!victim.Mounted)
                        {
                            victim.Animate(120, 5, 1, true, false, 0);
                        }
                    }
                    else
                    {
                        publicmsg = "*Se prend la main*";
                    }
                }
                else
                {
                    publicmsg = "*Se prend le bras*";
                }
                break;
            }

            case 3:
            {
                frommsg   += "sa cuisse";
                victimmsg += "à la cuisse*";
                publicmsg  = "*boite légèrement*";
                break;
            }

            case 4:
            {
                frommsg   += "son pied";
                victimmsg += "au pied*";
                publicmsg  = "*Sautille*";
                if (!victim.Mounted)
                {
                    victim.Animate(25, 5, 1, true, true, 3);
                }
                if (from.Skills[SkillName.Anatomy].Value > Utility.Random(150))
                {
                    victim.CantWalk = true;
                    Timer.DelayCall(TimeSpan.FromSeconds(3), ChangeWalk, victim);
                }
                break;
            }

            case 5:
            {
                frommsg   += "son ventre";
                victimmsg += "au ventre*";
                if (from.Skills[SkillName.Anatomy].Value > Utility.Random(80))
                {
                    sound = victim.Female ? 813 : 1087;

                    Point3D p = new Point3D(victim.Location);
                    switch (victim.Direction)
                    {
                    case Direction.North:
                        p.Y--; break;

                    case Direction.South:
                        p.Y++; break;

                    case Direction.East:
                        p.X++; break;

                    case Direction.West:
                        p.X--; break;

                    case Direction.Right:
                        p.X++; p.Y--; break;

                    case Direction.Down:
                        p.X++; p.Y++; break;

                    case Direction.Left:
                        p.X--; p.Y++; break;

                    case Direction.Up:
                        p.X--; p.Y--; break;

                    default:
                        break;
                    }
                    p.Z = victim.Map.GetAverageZ(p.X, p.Y);

                    bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, victim.Map, 12, false);

                    if (canFit)
                    {
                        Puke puke = new Puke();
                        puke.Map      = victim.Map;
                        puke.Location = p;
                    }
                }
                else
                {
                    publicmsg = "*Se tient le ventre*";
                }
                if (!victim.Mounted)
                {
                    victim.Animate(32, 5, 1, true, false, 0);
                }
                break;
            }

            case 6:
            {
                frommsg   += "son dos";
                victimmsg += "Au dos*";
                publicmsg  = "*Courbe l'échine*";
                if (!victim.Mounted)
                {
                    victim.Animate(32, 5, 1, true, true, 3);
                }
                break;
            }

            case 7:
            {
                frommsg   += "son nez";
                victimmsg += "au nez*";
                publicmsg  = "*Éternue bruyamment*";
                sound      = victim.Female ? 817 : 1091;
                if (!victim.Mounted)
                {
                    victim.Animate(32, 5, 1, true, false, 0);
                }
                break;
            }

            case 8:
            {
                frommsg   += "ses yeux";
                victimmsg += "aux yeux*";
                publicmsg  = "*Pleure abondamment*";
                sound      = victim.Female ? 787 : 1058;
                break;
            }

            case 9:
            {
                frommsg   += "sa bouche";
                victimmsg += "aux lèvres*";
                publicmsg  = "*Ses lèvres se closent*";
                sound      = victim.Female ? 784 : 1055;
                if (!victim.Mounted)
                {
                    victim.Animate(33, 5, 1, true, false, 0);
                }
                if (from.Skills[SkillName.Anatomy].Value > Utility.Random(150))
                {
                    victim.Squelched = true;
                    Timer.DelayCall(TimeSpan.FromSeconds(5), ChangeSquelch, victim);
                }
                break;
            }

            case 10:
            {
                frommsg   += "ses fesses";
                victimmsg += "aux fesses*";
                publicmsg  = "*Pète*";
                sound      = victim.Female ? 792 : 1064;
                victim.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist);
                break;
            }
            }
            from.CloseGump(typeof(EffectGump));

            from.SendMessage(frommsg);

            from.SendMessage("Vous perdez du Karma");
            from.Karma -= Utility.Random(100);

            victim.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, victimmsg, victim.NetState);

            if (publicmsg != null)
            {
                victim.Say(publicmsg);
            }

            victim.PlaySound(sound);

            voodoodoll.Charges--;

            if (voodoodoll.Charges <= 0)
            {
                from.SendMessage("La poupée perd ses cheveux, redevenant inutile");
                if (voodoodoll is VoodooDollFemale)
                {
                    from.AddToBackpack(new PoupeeFemale());
                }
                else
                {
                    from.AddToBackpack(new PoupeeMale());
                }

                voodoodoll.Delete();
            }
        }
예제 #4
0
        public override bool Eat(Mobile from)
        {

            if (FillHunger(from, FillFactor))
            {
                string tastemsg;
                int RatChances = (int)Taste;
                if (Poisoner == null)
                {
                    if (RatChances > Utility.Random(8))
                    {
                        BaseCreature rat = new Rat();
                        rat.MoveToWorld(from.Location, from.Map);
                        switch (Utility.Random(4))
                        {
                            case 2:
                                {
                                    rat.FocusMob = from;
                                    rat.AI = AIType.AI_Predator;
                                    rat.Say("*Semble jaloux de votre fromage*");
                                    break;
                                }
                            default:
                                {
                                    rat.Controlled = true;
                                    rat.ControlMaster = from;
                                    rat.ControlOrder = OrderType.Come;
                                    rat.Say("*Couinant amoureusement près de vous*");
                                    break;
                                }
                        }
                    }

                    string paste = "Vous mangez";
                    string taste = "";

                    switch (Paste)
                    {
                        case CheesePaste.Molle: paste = "Vous laissez fondre"; break;
                        case CheesePaste.Normale: paste = "Vous dégustez"; break;
                        case CheesePaste.Dure: paste = "Vous grignottez"; break;
                    }

                    switch (Taste)
                    {
                        case CheeseTaste.Faible: taste = "au goût subtil"; break;
                        case CheeseTaste.Leger: taste = "au goût délicat"; break;
                        case CheeseTaste.Modere: taste = "au goût agréable"; break;
                        case CheeseTaste.Prononce: taste = "au goût bien présent"; break;
                        case CheeseTaste.Fort: taste = "au goût persistant"; break;
                    }

                    tastemsg = String.Format("{0} ce fromage {1}", paste, taste);
                    if (Quality == CheeseQuality.Exceptionnal)
                        from.Say("*Semble subjugué{0} par le goût de ce fromage*", from.Female ? "e" : "");
                }
                else
                {
                    tastemsg = "Le goût de la moisissure vous dégoûte au plus haut point";
                    from.PlaySound(from.Female ? 813 : 1087);

                    Point3D p = new Point3D(from.Location);
                    switch (from.Direction)
                    {
                        case Direction.North:
                            p.Y--; break;
                        case Direction.South:
                            p.Y++; break;
                        case Direction.East:
                            p.X++; break;
                        case Direction.West:
                            p.X--; break;
                        case Direction.Right:
                            p.X++; p.Y--; break;
                        case Direction.Down:
                            p.X++; p.Y++; break;
                        case Direction.Left:
                            p.X--; p.Y++; break;
                        case Direction.Up:
                            p.X--; p.Y--; break;
                        default:
                            break;
                    }
                    p.Z = from.Map.GetAverageZ(p.X, p.Y);

                    bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, from.Map, 12, false);

                    if (canFit)
                    {
                        Puke puke = new Puke();
                        puke.Map = from.Map;
                        puke.Location = p;
                    }
                    from.Say("*Recrache le fromage, l'air malade*");
                }

                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, tastemsg, from.NetState);


                // Play a random "eat" sound
                from.PlaySound(Utility.Random(0x3A, 3));

                if (from.Body.IsHuman && !from.Mounted)
                    from.Animate(34, 5, 1, true, false, 0);

                if (Poison != null)
                    from.ApplyPoison(Poisoner, Poison);

                Consume();

                return true;
            }

            return false;
        }