public override Item CreateBulkOrder(Mobile from, bool fromContextMenu) { PlayerMobile pm = from as PlayerMobile; if (pm != null && pm.NextFletchingBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble())) { double theirSkill = pm.Skills[SkillName.Fletching].Base; if (theirSkill >= 70.1) { pm.NextFletchingBulkOrder = TimeSpan.FromHours(6.0); } else if (theirSkill >= 50.1) { pm.NextFletchingBulkOrder = TimeSpan.FromHours(2.0); } else { pm.NextFletchingBulkOrder = TimeSpan.FromHours(1.0); } if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { return(new LargeFletchingBOD()); } return(SmallFletchingBOD.CreateRandomFor(from)); } return(null); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { default: from.CloseGump(typeof(OWLTRbodGump)); break; case 1: { if (pm_From != null && pm_From.NextSmithBulkOrder == TimeSpan.Zero) { double theirSkill = pm_From.Skills[SkillName.Blacksmith].Base; if (theirSkill < 0.1) { pm_From.SendMessage("You need more Blacksmithy skill to get Blacksmith bods!!!"); break; } if (theirSkill >= 70.1) { pm_From.NextSmithBulkOrder = TimeSpan.FromHours(6.0); } else if (theirSkill >= 50.1) { pm_From.NextSmithBulkOrder = TimeSpan.FromHours(2.0); } else { pm_From.NextSmithBulkOrder = TimeSpan.FromHours(1.0); } if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { pm_From.SendGump(new LargeBODAcceptGump(from, new LargeSmithBOD())); } else { SmallSmithBOD ssb = SmallSmithBOD.CreateRandomFor(from) as SmallSmithBOD; if (ssb == null) { pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one..."); } else { pm_From.SendGump(new SmallBODAcceptGump(from, ssb)); } } } break; } case 2: { if (pm_From != null && pm_From.NextTailorBulkOrder == TimeSpan.Zero) { double theirSkill = pm_From.Skills[SkillName.Tailoring].Base; if (theirSkill < 0.1) { pm_From.SendMessage("You need more Tailoring skill to get Tailoring bods!!!"); break; } if (theirSkill >= 70.1) { pm_From.NextTailorBulkOrder = TimeSpan.FromHours(6.0); } else if (theirSkill >= 50.1) { pm_From.NextTailorBulkOrder = TimeSpan.FromHours(2.0); } else { pm_From.NextTailorBulkOrder = TimeSpan.FromHours(1.0); } if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { pm_From.SendGump(new LargeBODAcceptGump(from, new LargeTailorBOD())); } else { SmallTailorBOD stb = SmallTailorBOD.CreateRandomFor(from) as SmallTailorBOD; if (stb == null) { pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one..."); } else { pm_From.SendGump(new SmallBODAcceptGump(from, stb)); } } } break; } case 3: { if (pm_From != null && pm_From.NextCarpentryBulkOrder == TimeSpan.Zero) { double theirSkill = pm_From.Skills[SkillName.Carpentry].Base; if (theirSkill < 0.1) { pm_From.SendMessage("You need more Carpentry skill to get Carpenter bods!!!"); break; } if (theirSkill >= 70.1) { pm_From.NextCarpentryBulkOrder = TimeSpan.FromHours(6.0); } else if (theirSkill >= 50.1) { pm_From.NextCarpentryBulkOrder = TimeSpan.FromHours(2.0); } else { pm_From.NextCarpentryBulkOrder = TimeSpan.FromHours(1.0); } if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { pm_From.SendGump(new LargeBODAcceptGump(from, new LargeCarpentryBOD())); } else { SmallCarpentryBOD ssb = SmallCarpentryBOD.CreateRandomFor(from) as SmallCarpentryBOD; if (ssb == null) { pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one..."); } else { pm_From.SendGump(new SmallBODAcceptGump(from, ssb)); } } } break; } case 4: { if (pm_From != null && pm_From.NextFletchingBulkOrder == TimeSpan.Zero) { double theirSkill = pm_From.Skills[SkillName.Fletching].Base; if (theirSkill < 0.1) { pm_From.SendMessage("You need more BowFletching skill to get Fletcher bods!!!"); break; } if (theirSkill >= 70.1) { pm_From.NextFletchingBulkOrder = TimeSpan.FromHours(6.0); } else if (theirSkill >= 50.1) { pm_From.NextFletchingBulkOrder = TimeSpan.FromHours(2.0); } else { pm_From.NextFletchingBulkOrder = TimeSpan.FromHours(1.0); } if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble()) { pm_From.SendGump(new LargeBODAcceptGump(from, new LargeFletchingBOD())); } else { SmallFletchingBOD stb = SmallFletchingBOD.CreateRandomFor(from) as SmallFletchingBOD; if (stb == null) { pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one..."); } else { pm_From.SendGump(new SmallBODAcceptGump(from, stb)); } } } break; } } }