public override Item CreateBulkOrder(Mobile from, bool fromContextMenu) { PlayerMobile pm = from as PlayerMobile; if (pm != null && pm.NextHuntContract == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble())) { double theirSkill = pm.Skills[HuntBodUtility.GetBestFightingSkill(from)].Base; if (theirSkill >= 100) { pm.NextHuntContract = TimeSpan.FromHours(6.0); } else if (theirSkill >= 80) { pm.NextHuntContract = TimeSpan.FromHours(2.0); } else { pm.NextHuntContract = TimeSpan.FromHours(1.0); } if (theirSkill >= LargeBodSkillNeeded && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { return(LargeHuntBOD.CreateRandomFor(from, theirSkill)); } return(SmallHuntBOD.CreateRandomFor(from, theirSkill)); } return(null); }
public static bool CanUseContract(Mobile from) { if (from is PlayerMobile && from.Skills[HuntBodUtility.GetBestFightingSkill(from)].Base >= SkillNeeded) { return(true); } return(false); }