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); }
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)); }
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); }
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); }
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)); }
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); }
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(); } } }
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); } }
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; } } } }
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); }
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); } }
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(); } } }
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; }
public HireEntry( BaseHire hire ) : base(6120, 3) { m_Hire = hire; }
public HireEntry(Mobile from, BaseHire hire) : base(6120, 3) { m_Hire = hire; m_Mobile = from; }
public PayTimer(BaseHire vend) : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0)) { m_Hire = vend; Priority = TimerPriority.OneMinute; }
public HireEntry( Mobile from, BaseHire hire ) : base( 6120, 3 ) { m_Hire = hire; m_Mobile = from; }
public PayTimer( BaseHire vend ) : base( TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 ) ) { m_Hire = vend; Priority = TimerPriority.OneMinute; }
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; }
public PayTimer( BaseHire vend ) : base(TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 )) { m_Hire = vend; }
public PayTimer( BaseHire hire ) : base(TimeSpan.FromMinutes( Clock.MinutesPerUODay ), TimeSpan.FromMinutes( Clock.MinutesPerUODay )) { m_Hire = hire; Priority = TimerPriority.OneMinute; }
public PayTimer(BaseHire vend) : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0)) { m_Hire = vend; }
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; }
public virtual bool Payday( BaseHire m ) { m_Pay = 100; return true; }
public HireEntry(BaseHire hire) : base(6120, 3) { m_Hire = hire; }
public PayTimer(BaseHire vend) : base(TimeSpan.FromMinutes(Clock.MinutesPerUODay), TimeSpan.FromMinutes(Clock.MinutesPerUODay)) { m_Hire = vend; Priority = TimerPriority.OneMinute; }