Does anyone know how to run this service?

I see Winter2004.cs and I have used it like example but I cannot make it work :(
 
With this code works in an owner account but no in an player account (last login a few minutes ago)

If I change DateTime Start, for example (2016, 12, 1), then not works.

I tried also with an old account (last login 1 year ago) and runs. Maybe the problem is with time?

Code:
using System;

using Server.Items;

namespace Server.Misc
{
    public class WinterGiftGiver2016 : GiftGiver
    {
        public override DateTime Start
        {
            get
            {
                return new DateTime(2016, 12, 13);
            }
        }
        public override DateTime Finish
        {
            get
            {
                return new DateTime(2017, 1, 1);
            }
        }
        public static void Initialize()
        {
            GiftGiving.Register(new WinterGiftGiver2016());
        }

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

            box.DropItem(new MistletoeDeed());
            box.DropItem(new PileOfGlacialSnow());
            box.DropItem(new LightOfTheWinterSolstice());

            int random = Utility.Random(100);

            if (random < 60)
                box.DropItem(new DecorativeTopiary());
            else if (random < 84)
                box.DropItem(new FestiveCactus());
            else
                box.DropItem(new SnowyTree());

            switch ( this.GiveGift(mob, box) )
            {
                case GiftResult.Backpack:
                    mob.SendMessage(0x482, "Happy Holidays from the team!  Gift items have been placed in your backpack.");
                    break;
                case GiftResult.BankBox:
                    mob.SendMessage(0x482, "Happy Holidays from the team!  Gift items have been placed in your bank box.");
                    break;
            }
        }
    }
}
 
You are using my script :)

Here is mine for my current event

Are you using newest ServUO? If not show me your GiftGiver.cs, the stock one you have.
 

Attachments

  • Winter2016.cs
    1.3 KB · Views: 8
Using GiftGiver.cs of ServUO.

Trying with a fresh ServUO (changing MinimumAge to TimeSpan.FromSeconds(5.0);) and have the same problem.
 
Any account that has logged on BEFORE that day / date / time will not be eligible. The best way to set is to set the day 1 out from today and wait 24 hours to see.
 
Any account that has logged on BEFORE that day / date / time will not be eligible. The best way to set is to set the day 1 out from today and wait 24 hours to see.

But if I set DateTime Start (2016, 12, 1) and loggin today (2016, 12, 14)

why don't works?

what datetime start i need if I wish to begin the event on (2016, 12 , 25)? I need restart the shard and kick all players?
 
Back