Example #1
0
        public override bool IsEnemy(Mobile m)
        {
            if (!IntelligentAction.GetMyEnemies(m, this, true))
            {
                return(false);
            }

            if (m.Region != this.Region && !Server.Misc.MyServerSettings.GuardsPatrolOutside())
            {
                return(false);
            }

            m.Criminal = true;

            if (Server.Misc.MyServerSettings.GuardsSentenceDeath() || (m is BaseCreature && ((BaseCreature)m).ControlMaster == null))
            {
                //Effects.SendLocationParticles( EffectItem.Create( this.Location, this.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
                //Effects.PlaySound( this, this.Map, 0x201 );
                this.Location  = m.Location;
                this.Combatant = m;
                this.Warmode   = true;
                //Effects.SendLocationParticles( EffectItem.Create( this.Location, this.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
                //Effects.PlaySound( this, this.Map, 0x201 );
            }

            return(true);
        }
Example #2
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is JokeBook)
            {
                if (from.Blessed)
                {
                    string sSay = "I cannot deal with you while you are in that state.";
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState);
                    return(false);
                }
                else if (IntelligentAction.GetMyEnemies(from, this, false) == true)
                {
                    string sSay = "I don't think I should accept that from you.";
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState);
                    return(false);
                }
                else
                {
                    if (Utility.RandomBool())
                    {
                        GiftJesterHat hat = new GiftJesterHat();
                        hat.Name     = "Magical Jester Hat";
                        hat.Hue      = 0;
                        hat.ItemID   = Utility.RandomList(0x171C, 0x4C15);
                        hat.m_Owner  = from;
                        hat.m_Gifter = "Chuckles the Jester";
                        hat.m_How    = "Given to";
                        hat.m_Points = Utility.RandomMinMax(80, 100);

                        from.AddToBackpack(hat);
                        from.SendMessage("Chuckles gave you one of his hats!");
                    }
                    else
                    {
                        GiftFancyDress coat = new GiftFancyDress();
                        coat.Name     = "Magical Jester Suit";
                        coat.Hue      = 0;
                        coat.ItemID   = Utility.RandomList(0x1f9f, 0x1fa0, 0x4C16, 0x4C17, 0x2B6B);
                        coat.m_Owner  = from;
                        coat.m_Gifter = "Chuckles the Jester";
                        coat.m_How    = "Given to";
                        coat.m_Points = Utility.RandomMinMax(80, 100);

                        from.AddToBackpack(coat);
                        from.SendMessage("Chuckles gave you one of his suits!");
                    }
                    this.Say("Thank you, " + from.Name + "! I am always looking for some new jokes.");
                    from.SendSound(0x3D);
                    dropped.Delete();
                    from.SendMessage("Single click on it to customize it.");
                    return(true);
                }
            }

            return(base.OnDragDrop(from, dropped));
        }
Example #3
0
        public override bool IsEnemy(Mobile m)
        {
            if (IntelligentAction.GetMyEnemies(m, this, true) == false)
            {
                return(false);
            }

            if (m.Region != this.Region && !(m is PlayerMobile))
            {
                return(false);
            }

            m.Criminal = true;
            return(true);
        }
Example #4
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is PirateBounty)
            {
                if (IntelligentAction.GetMyEnemies(from, this, false) == true)
                {
                    string sSay = "You shouldn't be carrying that around with you.";
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState);
                }
                else
                {
                    PirateBounty bounty   = (PirateBounty)dropped;
                    int          fame     = (int)(bounty.BountyValue / 5);
                    int          karma    = -1 * fame;
                    int          gold     = bounty.BountyValue;
                    string       sMessage = "";
                    string       sReward  = "Here is " + gold.ToString() + " gold for you.";

                    switch (Utility.RandomMinMax(0, 9))
                    {
                    case 0: sReward = "Here is " + gold.ToString() + " gold for you.";                                                      break;

                    case 1: sReward = "Take this " + gold.ToString() + " gold for your trouble.";                           break;

                    case 2: sReward = "The reward is " + gold.ToString() + " gold.";                                                        break;

                    case 3: sReward = "Here is " + gold.ToString() + " gold for the bounty.";                                       break;

                    case 4: sReward = "The bounty is " + gold.ToString() + " gold for this one.";                           break;

                    case 5: sReward = "Here is your reward of " + gold.ToString() + " gold";                                        break;

                    case 6: sReward = "You can have this " + gold.ToString() + " gold for the bounty.";                     break;

                    case 7: sReward = "There is a reward of " + gold.ToString() + " gold for this one.";            break;

                    case 8: sReward = "This one was worth " + gold.ToString() + " gold for their crimes.";          break;

                    case 9: sReward = "Their crimes called for a bounty of " + gold.ToString() + " gold.";          break;
                    }

                    Titles.AwardKarma(from, karma, true);
                    Titles.AwardFame(from, fame, true);
                    from.SendSound(0x2E6);
                    from.AddToBackpack(new Gold(gold));

                    switch (Utility.RandomMinMax(0, 9))
                    {
                    case 0: sMessage = "We have been looking for this pirate. " + sReward;  break;

                    case 1: sMessage = "I have heard of this pirate before. " + sReward;    break;

                    case 2: sMessage = "I never thought I would see this pirate brought to justice. " + sReward;    break;

                    case 3: sMessage = "This pirate will plunder no more. " + sReward;      break;

                    case 4: sMessage = "Our galleons are safer now. " + sReward;    break;

                    case 5: sMessage = "The sea is safer because of you. " + sReward;       break;

                    case 6: sMessage = "The sailors at the docks will not believe this. " + sReward;        break;

                    case 7: sMessage = "I have only heard stories about this pirate. " + sReward;   break;

                    case 8: sMessage = "How did you come across this pirate? " + sReward;   break;

                    case 9: sMessage = "Where did you find this pirate? " + sReward;        break;
                    }
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
                    dropped.Delete();
                    return(true);
                }
            }
            else if (dropped is Head && !from.Blessed)
            {
                if (IntelligentAction.GetMyEnemies(from, this, false) == true)
                {
                    string sSay = "You shouldn't be carrying that around with you.";
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState);
                }
                else
                {
                    Head   head     = (Head)dropped;
                    int    karma    = 0;
                    int    gold     = 0;
                    string sMessage = "";
                    string sReward  = "Here is " + gold.ToString() + " gold for you.";

                    if (head.m_Job == "Thief")
                    {
                        karma = Utility.RandomMinMax(40, 60);
                        gold  = Utility.RandomMinMax(80, 120);
                    }
                    else if (head.m_Job == "Bandit")
                    {
                        karma = Utility.RandomMinMax(20, 30);
                        gold  = Utility.RandomMinMax(30, 40);
                    }
                    else if (head.m_Job == "Brigand")
                    {
                        karma = Utility.RandomMinMax(30, 40);
                        gold  = Utility.RandomMinMax(50, 80);
                    }
                    else if (head.m_Job == "Pirate")
                    {
                        karma = Utility.RandomMinMax(90, 110);
                        gold  = Utility.RandomMinMax(120, 160);
                    }
                    else if (head.m_Job == "Assassin")
                    {
                        karma = Utility.RandomMinMax(60, 80);
                        gold  = Utility.RandomMinMax(100, 140);
                    }

                    switch (Utility.RandomMinMax(0, 9))
                    {
                    case 0: sReward = "Here is " + gold.ToString() + " gold for you.";                                                      break;

                    case 1: sReward = "Take this " + gold.ToString() + " gold for your trouble.";                           break;

                    case 2: sReward = "The reward is " + gold.ToString() + " gold.";                                                        break;

                    case 3: sReward = "Here is " + gold.ToString() + " gold for the bounty.";                                       break;

                    case 4: sReward = "The bounty is " + gold.ToString() + " gold for this one.";                           break;

                    case 5: sReward = "Here is your reward of " + gold.ToString() + " gold";                                        break;

                    case 6: sReward = "You can have this " + gold.ToString() + " gold for the bounty.";                     break;

                    case 7: sReward = "There is a reward of " + gold.ToString() + " gold for this one.";            break;

                    case 8: sReward = "This one was worth " + gold.ToString() + " gold for their crimes.";          break;

                    case 9: sReward = "Their crimes called for a bounty of " + gold.ToString() + " gold.";          break;
                    }

                    if (head.m_Job == "Thief" || head.m_Job == "Bandit" || head.m_Job == "Brigand")
                    {
                        Titles.AwardKarma(from, karma, true);
                        from.SendSound(0x2E6);
                        from.AddToBackpack(new Gold(gold));

                        switch (Utility.RandomMinMax(0, 9))
                        {
                        case 0: sMessage = "We have been looking for this rogue. " + sReward;   break;

                        case 1: sMessage = "I have heard of this thief before. " + sReward;     break;

                        case 2: sMessage = "I never thought I would see this bandit brought to justice. " + sReward;    break;

                        case 3: sMessage = "This rouge will steal no more. " + sReward; break;

                        case 4: sMessage = "Our gold purses are safer now. " + sReward; break;

                        case 5: sMessage = "The land is safer because of you. " + sReward;      break;

                        case 6: sMessage = "The others at the guard house will not believe this. " + sReward;   break;

                        case 7: sMessage = "I have only heard stories about this rogue. " + sReward;    break;

                        case 8: sMessage = "How did you come across this thief? " + sReward;    break;

                        case 9: sMessage = "Where did you find this sneak? " + sReward; break;
                        }
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
                        dropped.Delete();
                        return(true);
                    }
                    else if (head.m_Job == "Pirate")
                    {
                        Titles.AwardKarma(from, karma, true);
                        from.SendSound(0x2E6);
                        from.AddToBackpack(new Gold(gold));

                        switch (Utility.RandomMinMax(0, 9))
                        {
                        case 0: sMessage = "We have been looking for this pirate. " + sReward;  break;

                        case 1: sMessage = "I have heard of this pirate before. " + sReward;    break;

                        case 2: sMessage = "I never thought I would see this pirate brought to justice. " + sReward;    break;

                        case 3: sMessage = "This pirate will plunder no more. " + sReward;      break;

                        case 4: sMessage = "Our galleons are safer now. " + sReward;    break;

                        case 5: sMessage = "The sea is safer because of you. " + sReward;       break;

                        case 6: sMessage = "The sailors at the docks will not believe this. " + sReward;        break;

                        case 7: sMessage = "I have only heard stories about this pirate. " + sReward;   break;

                        case 8: sMessage = "How did you come across this pirate? " + sReward;   break;

                        case 9: sMessage = "Where did you find this pirate? " + sReward;        break;
                        }
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
                        dropped.Delete();
                        return(true);
                    }
                    else if (head.m_Job == "Assassin")
                    {
                        Titles.AwardKarma(from, karma, true);
                        from.SendSound(0x2E6);
                        from.AddToBackpack(new Gold(gold));

                        switch (Utility.RandomMinMax(0, 9))
                        {
                        case 0: sMessage = "We have been living in fear of this one. " + sReward;       break;

                        case 1: sMessage = "I have heard others speak of this assassin. " + sReward;    break;

                        case 2: sMessage = "I never thought this assassin existed. " + sReward; break;

                        case 3: sMessage = "This assassin will kill no more. " + sReward;       break;

                        case 4: sMessage = "Our nobles are safer now. " + sReward;      break;

                        case 5: sMessage = "The shadows are less feared because of you. " + sReward;    break;

                        case 6: sMessage = "Those in the tavern will not believe this. " + sReward;     break;

                        case 7: sMessage = "I have only heard rumors about this assassin. " + sReward;  break;

                        case 8: sMessage = "It is good to see this assassin did not best you. " + sReward;      break;

                        case 9: sMessage = "How did you survive this assassin? " + sReward;     break;
                        }
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
                        dropped.Delete();
                        return(true);
                    }
                    else
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I assume they done you harm. Let me rid you of this thing.", from.NetState);
                        dropped.Delete();
                        return(true);
                    }
                }
            }

            return(base.OnDragDrop(from, dropped));
        }