I want to give the snowman but I want it named the name of the player. I'm not sure how to put that in the script. Can anyone help?

using System;
using Server.Items;

namespace Server.Misc
{
public class Xmas2019 : GiftGiver
{
public override DateTime Start
{
get
{
return new DateTime(2019, 12, 10);
}
}
public override DateTime Finish
{
get
{
return new DateTime(2020, 1, 2);
}
}
public static void Initialize()
{
GiftGiving.Register(new Xmas2019 ());
}

public override void GiveGift(Mobile mob)
{
BowsGiftBox box = new BowsGiftBox();

box.DropItem(new GlacialSnowPile());
box.DropItem(new HolidayTimepiece());
box.DropItem(new Gold(25000));
box.DropItem(new Snowman2017());
box.DropItem(new WreathDeed());

switch ( this.GiveGift(mob, box) )
{
case GiftResult.Backpack:
mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your backpack.");
break;
case GiftResult.BankBox:
mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your bank box.");
break;
}
}
}
}

Thank you for helping.
 
IF you are using the Snowman with a different name, and it uses the title for the players name below like this one.

Screenshot_23.png

You could do this...

C#:
using System;
using Server.Items;

namespace Server.Misc
{
    public class Xmas2019 : GiftGiver
    {
        public override DateTime Start
        {
            get
            {
                return new DateTime(2019, 12, 10);
            }
        }
        public override DateTime Finish
        {
            get
            {
                return new DateTime(2020, 1, 2);
            }
        }
        public static void Initialize()
        {
            GiftGiving.Register(new Xmas2019());
        }

        public override void GiveGift(Mobile mob)
        {
            BowsGiftBox box = new BowsGiftBox();

            Snowman2017 sm = new Snowman2017();
            sm.Title = mob.Name;

            box.DropItem(new GlacialSnowPile());
            box.DropItem(new HolidayTimepiece());
            box.DropItem(new Gold(25000));
            box.DropItem(sm);
            box.DropItem(new WreathDeed());

            switch (this.GiveGift(mob, box))
            {
                case GiftResult.Backpack:
                    mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your backpack.");
                    break;
                case GiftResult.BankBox:
                    mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your bank box.");
                    break;
            }
        }
    }
}


I hope this is what you are looking for.
 
IF you are using the Snowman with a different name, and it uses the title for the players name below like this one.

View attachment 14352

You could do this...

C#:
using System;
using Server.Items;

namespace Server.Misc
{
    public class Xmas2019 : GiftGiver
    {
        public override DateTime Start
        {
            get
            {
                return new DateTime(2019, 12, 10);
            }
        }
        public override DateTime Finish
        {
            get
            {
                return new DateTime(2020, 1, 2);
            }
        }
        public static void Initialize()
        {
            GiftGiving.Register(new Xmas2019());
        }

        public override void GiveGift(Mobile mob)
        {
            BowsGiftBox box = new BowsGiftBox();

            Snowman2017 sm = new Snowman2017();
            sm.Title = mob.Name;

            box.DropItem(new GlacialSnowPile());
            box.DropItem(new HolidayTimepiece());
            box.DropItem(new Gold(25000));
            box.DropItem(sm);
            box.DropItem(new WreathDeed());

            switch (this.GiveGift(mob, box))
            {
                case GiftResult.Backpack:
                    mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your backpack.");
                    break;
                case GiftResult.BankBox:
                    mob.SendMessage(0x482, "Happy Holidays from the Darkness Once Forsaken Shard! Gift items have been placed in your bank box.");
                    break;
            }
        }
    }
}


I hope this is what you are looking for.

Thank you so much, I will give it a try today. Really appreciate the help.
 
Back