ServUO Version
Publish 57
Ultima Expansion
Endless Journey
I'm trying to add a delay to a new channel, Trade, but can't seem to figure it out.. has anyone done this before?

If I use this code then the delay does work for the Trade channel but the second delay does not work for all other channels.

C#:
            if (c_Name == "Trade")
            {
                if (c_Delay && !TrackSpam.LogSpam(m, "Trade", TimeSpan.FromMinutes(20)))
                {
                    if (spam) m.SendMessage(Data.GetData(m).SystemC, General.Local(97));
                    Timer.DelayCall(TimeSpan.FromSeconds(4), new TimerStateCallback(OnChat), new object[] { m, msg });
                    return;
                }
            }
            else
            {
                if (c_Delay && !TrackSpam.LogSpam(m, "Chat", TimeSpan.FromSeconds(Data.ChatSpam)))
                {
                    if (spam) m.SendMessage(Data.GetData(m).SystemC, General.Local(97));
                    Timer.DelayCall(TimeSpan.FromSeconds(4), new TimerStateCallback(OnChat), new object[] { m, msg });
                    return;
                }
            }
 
Back