1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Daily bod reward from NPC

Discussion in 'Script Support' started by Opywang, Oct 30, 2017.

  1. Opywang
    Offline

    Opywang Member

    Joined:
    Jan 16, 2017
    Messages:
    65
    Likes Received:
    2
    Hey there I would like to make our shard to have one click daily bod reward where all the bod go in your pack depending on your level that last 24 hour time limit, and all bod within 24 hour drop in pack.

    The problem we need to solve is where the gump come up, and ask you if you will accept this bod, or not I like to have that removed, and make it where it make you accept anyway, and automatic put it in pack after click bulk order.


    #region Bulk Orders
    public override BODType BODType { get { return BODType.Smith; } }

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

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

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

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

    return SmallSmithBOD.CreateRandomFor(from);
    }

    return null;
     
  2. Opywang
    Offline

    Opywang Member

    Joined:
    Jan 16, 2017
    Messages:
    65
    Likes Received:
    2
    Can somebody show me how to make this give more than 1 bods in random in one click?

    if (theirSkill >= 70.1)
    pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);

    I think maybe we still have to go to BulkOrderSystem.CS to make it give bod, but if that is true then it may have to be custom to make it random, or something?
    public static List<CollectionItem> GetRewardCollection(BODType type)
    {
    switch (type)
    {
    default:
    case BODType.Smith: return SmithRewardCalculator.Instance.RewardCollection;
    case BODType.Tailor: return TailorRewardCalculator.Instance.RewardCollection;
    case BODType.Alchemy: return AlchemyRewardCalculator.Instance.RewardCollection;
    case BODType.Inscription: return InscriptionRewardCalculator.Instance.RewardCollection;
    case BODType.Tinkering: return TinkeringRewardCalculator.Instance.RewardCollection;
    case BODType.Fletching: return FletchingRewardCalculator.Instance.RewardCollection;
    case BODType.Carpentry: return CarpentryRewardCalculator.Instance.RewardCollection;
    case BODType.Cooking: return CookingRewardCalculator.Instance.RewardCollection;

    I was thinking maybe something like this here.
    case BODType.Smith: return SmithRewardCalculator.Instance.RewardCollection; (24);

    Something like that, but I am unsure how to separate it per hour depend on levels, and how to make it random it could be easy, or complex, but I am hoping it would be something simple, and if it is complex I am all game for it.
     
Similar Threads: Daily bod
Forum Title Date
Archived Bug Reports Siege Mode - Stat gain daily limit Jul 23, 2017
General Discussion Just a question on daily restarts! Sep 29, 2015
Custom Releases FS Daily Rares Mar 30, 2015
Bug Reports Tinker BOD issue. Tuesday at 10:35 AM
Script Support Small Taming BOD *** SOLVED *** Sunday at 5:18 PM
Archived Bug Reports TinkeringBODs Nov 28, 2017
Script Support Messing around on a T2A shard. How do I force mobiles to show their newer body values Nov 23, 2017