Exemplo n.º 1
0
        public virtual bool Payday(BaseHire m)
        {
            m_Pay  = 0;
            m_Pay += (int)m.Skills[SkillName.Macing].Base + (int)m.Skills[SkillName.Swords].Base;
            m_Pay += (int)m.Skills[SkillName.Fencing].Base + (int)m.Skills[SkillName.Wrestling].Base;

            if (m_Pay < 50)
            {
                m_Pay = 6;
            }
            else if (m_Pay >= 50 && m_Pay < 65)
            {
                m_Pay = 7;
            }
            else if (m_Pay >= 65 && m_Pay < 80)
            {
                m_Pay = 8;
            }
            else
            {
                m_Pay = 9;
            }

            return(true);
        }
Exemplo n.º 2
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            if (m_Pay != 0)
            {
                // Is the creature already hired
                if (Controlled == false)
                {
                    // Is the item the payment in gold
                    if (item is Gold)
                    {
                        // Is the payment in gold sufficient
                        if (item.Amount >= m_Pay)
                        {
                            // Check if this mobile already has a hire
                            BaseHire hire = (BaseHire)m_HireTable[from];

                            if (hire != null && !hire.Deleted && hire.GetOwner() == from)
                            {
                                SayTo(from, 500896);                                   // I see you already have an escort.
                                return(false);
                            }

                            // Try to add the hireling as a follower
                            if (AddHire(from) == true)
                            {
                                SayTo(from, 1043258, string.Format("{0}", (int)item.Amount / m_Pay));                                     //"I thank thee for paying me. I will work for thee for ~1_NUMBER~ days.", (int)item.Amount / m_Pay );
                                m_HireTable[from] = this;
                                m_HoldGold       += item.Amount;
                                m_PayTimer        = new PayTimer(this);
                                m_PayTimer.Start();
                                return(true);
                            }
                            else
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            this.SayHireCost();
                        }
                    }
                    else
                    {
                        SayTo(from, 1043268);                           // Tis crass of me, but I want gold
                    }
                }
                else
                {
                    Say(1042495);                      // I have already been hired.
                }
            }
            else
            {
                SayTo(from, 500200);                   // I have no need for that.
            }

            return(base.OnDragDrop(from, item));
        }
Exemplo n.º 3
0
 public virtual bool Payday(BaseHire m)
 {
     if (m_Scale == 0.0)
     {
         m_Scale = 1.0 * (Teiravon.TAVUtilities.CalculateLevel(m) / 100.0);
     }
     m_Pay = m_Pay < 10 ? 10 : m_Pay;
     return(true);
 }
Exemplo n.º 4
0
 public virtual bool Payday(BaseHire m)
 {
     m_Pay  = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value;
     m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value;
     m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value;
     m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value;
     m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
     m_Pay /= 35;
     m_Pay += 1;
     return(true);
 }
Exemplo n.º 5
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            if (m_PayRate > 0)
            {
                // Is the creature already hired
                if (Controlled == false)
                {
                    // Is the item the payment in gold
                    if (item is Gold)
                    {
                        Gold payment = (Gold)item;

                        // Is the payment in gold sufficient
                        if (payment.Amount >= m_PayRate)
                        {
                            // Check if this mobile already has a hire
                            BaseHire hire = (BaseHire)HireTable[from];

                            if ((hire != null) &&
                                (hire.Deleted == false) &&
                                (hire.Alive == true) &&
                                (hire.GetOwner() == from))
                            {
                                SayTo(from, 500896);                                   // I see you already have an escort.
                                return(false);
                            }

                            // Try to add the hireling as a follower
                            return(AddHire(from, payment));
                        }
                        else
                        {
                            this.SayHireCost();
                        }
                    }
                    else
                    {
                        SayTo(from, 1043268);                           // Tis crass of me, but I want gold
                    }
                }
                else
                {
                    Say(1042495);                      // I have already been hired.
                }
            }
            else
            {
                SayTo(from, 500200);                   // I have no need for that.
            }

            return(base.OnDragDrop(from, item));
        }
Exemplo n.º 6
0
 public virtual bool Payday(BaseHire m)
 {
     if (IsInArmy || IsHired)
     {
         return(false);
     }
     //m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactiques].Value;
     m_Pay  = (int)m.Skills[SkillName.ArmeContondante].Value + (int)m.Skills[SkillName.Epee].Value;
     m_Pay += (int)m.Skills[SkillName.ArmePerforante].Value + (int)m.Skills[SkillName.ArmeDistance].Value;
     m_Pay += (int)m.Skills[SkillName.Concentration].Value + (int)m.Skills[SkillName.Soins].Value;
     m_Pay += (int)m.Skills[SkillName.ArtMagique].Value + (int)m.Skills[SkillName.Parer].Value;
     m_Pay /= 10;
     m_Pay += 10;
     return(true);
 }
Exemplo n.º 7
0
            public static void RemoveTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    return;
                }

                if (Instance.Hires.Contains(hire))
                {
                    Instance.Hires.Remove(hire);

                    if (Instance.Hires.Count == 0)
                    {
                        Instance.Stop();
                    }
                }
            }
Exemplo n.º 8
0
            public static void RegisterTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    Instance = new PayTimer();
                }

                if (!Instance.Running)
                {
                    Instance.Start();
                }

                if (!Instance.Hires.Contains(hire))
                {
                    Instance.Hires.Add(hire);
                }
            }
Exemplo n.º 9
0
        public static void Initialize()
        {
            foreach (object o in World.Mobiles.Values)
            {
                if (o is BaseHire)
                {
                    BaseHire bh = (BaseHire)o;

                    Mobile Owner = bh.ControlMaster;

                    if (Owner != null)
                    {
                        HireTable[Owner] = bh;
                    }
                }
            }
        }
Exemplo n.º 10
0
        public virtual bool Payday(BaseHire m)
        {
            if (m is HireBard)
            {
                m_Pay = 20;
            }
            else if (m is HireBeggar)
            {
                m_Pay = 10;
            }
            else if (m is HireFighter || m is HireMercenary || m is HireWarrior)
            {
                m_Pay = 60;
            }
            else if (m is HireMage)
            {
                m_Pay = 60;
            }
            else if (m is HirePaladin)
            {
                m_Pay = 80;
            }
            else if (m is HirePeasant)
            {
                m_Pay = 10;
            }
            else if (m is HireRanger)
            {
                m_Pay = 70;
            }
            else if (m is HireSailor)
            {
                m_Pay = 50;
            }
            else if (m is HireThief)
            {
                m_Pay = 60;
            }
            else if (m is HirePirate)
            {
                m_Pay = 70;
            }

            return(true);
        }
Exemplo n.º 11
0
            public static void RegisterTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    Instance = new PayTimer();
                }

                if (!Instance.Running)
                {
                    Instance.Start();
                }

                if (!Instance.Hires.Contains(hire))
                {
                    Console.WriteLine("ADding hire: {0}", hire);
                    Instance.Hires.Add(hire);
                }
            }
Exemplo n.º 12
0
            public static void RemoveTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    return;
                }

                if (Instance.Hires.Contains(hire))
                {
                    Console.WriteLine("Removing Hire: {0}", hire);
                    Instance.Hires.Remove(hire);

                    if (Instance.Hires.Count == 0)
                    {
                        Instance.Stop();
                    }
                }
            }
Exemplo n.º 13
0
        public virtual bool Payday( BaseHire m ) 
        { 
        	m_Pay = 0;
            m_Pay += (int)m.Skills[SkillName.Macing].Base + (int)m.Skills[SkillName.Swords].Base; 
            m_Pay += (int)m.Skills[SkillName.Fencing].Base + (int)m.Skills[SkillName.Wrestling].Base;
        	
			if ( m_Pay < 50 )
			{
				m_Pay = 6;
			}
			else if ( m_Pay >= 50 && m_Pay < 65 )
			{
				m_Pay = 7;
			}
			else if ( m_Pay >= 65 && m_Pay < 80 )
			{
				m_Pay = 8;
			}
			else
			{
				m_Pay = 9;
			}

            return true; 
        } 
Exemplo n.º 14
0
 public HireEntry( BaseHire hire )
     : base(6120, 3)
 {
     m_Hire = hire;
 }
Exemplo n.º 15
0
 public HireEntry(Mobile from, BaseHire hire) : base(6120, 3)
 {
     m_Hire   = hire;
     m_Mobile = from;
 }
Exemplo n.º 16
0
 public PayTimer(BaseHire vend) : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0))
 {
     m_Hire   = vend;
     Priority = TimerPriority.OneMinute;
 }
Exemplo n.º 17
0
			public HireEntry( Mobile from, BaseHire hire ) : base( 6120, 3 )
			{ 
				m_Hire = hire;
				m_Mobile = from;
			}
Exemplo n.º 18
0
			public PayTimer( BaseHire vend ) : base( TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 ) ) 
			{ 
				m_Hire = vend;
				Priority = TimerPriority.OneMinute;
			}
Exemplo n.º 19
0
		public virtual bool Payday( BaseHire m ) 
		{ 
			m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value;
			m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value;
			m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value;
			m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value;
			m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
			m_Pay /= 35;
			m_Pay += 1;
			return true;
		}
Exemplo n.º 20
0
 public PayTimer( BaseHire vend )
     : base(TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 ))
 {
     m_Hire = vend;
 }
Exemplo n.º 21
0
 public PayTimer( BaseHire hire )
     : base(TimeSpan.FromMinutes( Clock.MinutesPerUODay ), TimeSpan.FromMinutes( Clock.MinutesPerUODay ))
 {
     m_Hire = hire;
     Priority = TimerPriority.OneMinute;
 }
Exemplo n.º 22
0
 public PayTimer(BaseHire vend)
     : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0))
 {
     m_Hire = vend;
 }
Exemplo n.º 23
0
        public virtual bool Payday( BaseHire m )
        {
            if (m is HireBard)
                m_Pay = 20;
            else if (m is HireBeggar)
                m_Pay = 10;
            else if (m is HireFighter || m is HireMercenary || m is HireWarrior)
                m_Pay = 60;
            else if (m is HireMage)
                m_Pay = 60;
            else if (m is HirePaladin)
                m_Pay = 80;
            else if (m is HirePeasant)
                m_Pay = 10;
            else if (m is HireRanger)
                m_Pay = 70;
            else if (m is HireSailor)
                m_Pay = 50;
            else if (m is HireThief)
                m_Pay = 60;
            else if (m is HirePirate)
                m_Pay = 70;

            return true;
        }
Exemplo n.º 24
0
        public virtual bool Payday( BaseHire m ) 
        { 

	    m_Pay = 100; 

            return true; 
        } 
Exemplo n.º 25
0
 public HireEntry(BaseHire hire)
     : base(6120, 3)
 {
     m_Hire = hire;
 }
Exemplo n.º 26
0
 public PayTimer(BaseHire vend)
     : base(TimeSpan.FromMinutes(Clock.MinutesPerUODay), TimeSpan.FromMinutes(Clock.MinutesPerUODay))
 {
     m_Hire   = vend;
     Priority = TimerPriority.OneMinute;
 }