public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (pm != null && pm.NextFletcherBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
            {
                double theirSkill = pm.Skills[SkillName.Fletching].Base;

                if (theirSkill >= 70.1)
                {
                    pm.NextFletcherBulkOrder = TimeSpan.FromHours(6.0);
                }
                else if (theirSkill >= 50.1)
                {
                    pm.NextFletcherBulkOrder = TimeSpan.FromHours(2.0);
                }
                else
                {
                    pm.NextFletcherBulkOrder = TimeSpan.FromHours(1.0);
                }

                if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                {
                    return(new LargeFletcherBOD());
                }

                return(SmallFletcherBOD.CreateRandomFor(from));
            }

            return(null);
        }
Exemple #2
0
        public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
        {
            PlayerMobile pm      = from as PlayerMobile;
            BODModule    bod_mod = (BODModule)CentralMemory.GetModule(from.Serial, typeof(BODModule));

            if (bod_mod == null && from == null)
            {
                return(null);
            }

            if (bod_mod != null && bod_mod.NextFletcherBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
            {
                double theirSkill = pm.Skills[SkillName.Fletching].Base;

                if (theirSkill >= 70.1)
                {
                    bod_mod.NextFletcherBulkOrder = TimeSpan.FromHours(3.0);
                }
                else if (theirSkill >= 50.1)
                {
                    bod_mod.NextFletcherBulkOrder = TimeSpan.FromHours(2.0);
                }
                else
                {
                    bod_mod.NextFletcherBulkOrder = TimeSpan.FromHours(1.0);
                }

                if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                {
                    return(new LargeFletcherBOD());
                }

                return(SmallFletcherBOD.CreateRandomFor(from));
            }
            else
            {
                CentralMemory.AppendModule(from.Serial, new BODModule(from.Serial), true);
                from.SendMessage("Please try again");
            }

            return(null);
        }
Exemple #3
0
        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.NextCarpenterBulkOrder == 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.NextCarpenterBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextCarpenterBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextCarpenterBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeCarpenterBOD()));
                    }
                    else
                    {
                        SmallCarpenterBOD ssb = SmallCarpenterBOD.CreateRandomFor(from) as SmallCarpenterBOD;
                        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.NextFletcherBulkOrder == 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.NextFletcherBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextFletcherBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextFletcherBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeFletcherBOD()));
                    }
                    else
                    {
                        SmallFletcherBOD stb = SmallFletcherBOD.CreateRandomFor(from) as SmallFletcherBOD;
                        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;
            }
            }
        }