this is for both lotf and coemu
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Msg sender (CoEmu v2)

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 56
Join date : 2009-08-20

PostSubject: Msg sender (CoEmu v2)   Thu Aug 20, 2009 11:10 pm

CREDITS TO 12tails

Hello all!!

this can be a stupid release.... but for who wan't it here is...

in Nano.cs add this:

Code:
public static System.Timers.Timer MsgTimer = new System.Timers.Timer();
public static int MsgCounter = 0;

then... on StartServer add this:

Code:
MsgTimer.Interval = 1000;
            MsgTimer.Elapsed += delegate
            {
                MsgCounter += 1000;
                if (MsgCounter == 240000)
                {
                    CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "MSG HERE", CoEmu_v2_GameServer.Structs.Struct.ChatType.Center), 0);
                }
                if (MsgCounter == 300000)
                {
                    CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "MSG HERE", CoEmu_v2_GameServer.Structs.Struct.ChatType.Center), 0);
                }
                if (MsgCounter == 360000)
                {
                    CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "MSG HERE", CoEmu_v2_GameServer.Structs.Struct.ChatType.Center), 0);
                }
                if (MsgCounter == 420000)
                {
                    CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "MSG HERE", CoEmu_v2_GameServer.Structs.Struct.ChatType.Center), 0);
                    MsgCounter = 0;
                }
                MsgTimer.Stop();
                MsgTimer.Dispose();
            };
            MsgTimer.Start();

any bugs found post them on this post POST
Back to top Go down
View user profile http://openprojects.forumotions.net
 
Msg sender (CoEmu v2)
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
lotf/coemu project :: Codes-
Jump to: