Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 15:38

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] event handler / system message for 5165 source

Discussion on [Release] event handler / system message for 5165 source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
gulpi_de_gulat's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 71
Received Thanks: 40
[Release] event handler / system message for 5165 source

i was partially made this and completed by pringle, i dont know if pringle is in here in this forum. but still credit to him.

Go to Program.cs and find:
Code:
public static Random Rnd = new Random();
Above this add:
Code:
public static DateTime SystemMsgTime = new DateTime();
scroll down and you found this
Code:
static void ServerStuff_Execute()
        {
            try
            {
                [COLOR="Red"]if (World.BroadCastCount > 0 && DateTime.Now > World.LastBroadCast.AddMinutes(1))[/COLOR]
                {
                    BroadCastMessage B = World.BroadCasts[0];

                    for (int i = 0; i < World.BroadCastCount; i++)
                        World.BroadCasts[i] = World.BroadCasts[i + 1];

                    World.BroadCastCount--;

                    World.SendMsgToAll(B.Name, B.Message, 2500, 0);
                    World.LastBroadCast = DateTime.Now;
                    World.CurrentBC = B;
                }
            }
above the red color add this
Code:
if (DateTime.Now > SystemMsgTime.AddMinutes(1))
                {
                    Handle_Events();
                    SystemMsgTime = DateTime.Now;
                }
scroll down again and you see this
Code:
static void CompanionThread_Execute()
Above this add:
Code:
 static void Handle_Events()
        {
            switch (DateTime.Now.Minute)
            {
                case 7:
                case 8:
                    Game.World.SendMsgToAll("GM", "GMs have [GM] or [PM] at the end of their names. Don`t trust anyone claiming to be a GM but not having [GM]/[PM] in their names.", 2011, 0);
                    break;
                case 19:
                case 20:
                    Game.World.SendMsgToAll("GM", "File account problems and TQ Point Card purchase problems at SUPPORT on the official site.", 2011, 0);
                    break;
                case 31:
                case 32:
                    Game.World.SendMsgToAll("GM", "Help UnknownMan at Market (212,204) to level up quickly.", 2011, 0);
                    break;
                case 43:
                case 44:
                    Game.World.SendMsgToAll("GM", "Trading of game accounts is illegal and may result in the instant banning of the accounts involved in the trading.", 2011, 0);
                    break;
                case 55:
                case 56:
                    Game.World.SendMsgToAll("GM", "co.91.com is the only official website of CO, which is also the only website where you can purchase Dragonballs.", 2011, 0);
                    break;
                default:
                    break;
            }
        }
you can put any event you want, but be sure not upset to each other
gulpi_de_gulat is offline  
Thanks
12 Users
Old 03/15/2010, 02:08   #2
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
This is a nice release ill say was waiting when somone would say something about this. Thought when the pk tourny's and other events got released someone would have released this sooner good job man.
ImFlamedCOD is offline  
Old 03/15/2010, 02:32   #3
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
I've had this forever, but thanks for contributing.
walmartboi is offline  
Old 03/15/2010, 03:06   #4
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
The name 'SystemMsgTime' does not exist in the current context

How do i make this work? sorry still quite a noob at coding would be good if someone can help me
.Beatz is offline  
Old 03/15/2010, 03:11   #5
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by mattyc2580 View Post
The name 'SystemMsgTime' does not exist in the current context

How do i make this work? sorry still quite a noob at coding would be good if someone can help me
You skipped step one.
public static DateTime SystemMsgTime = new DateTime();
Arcо is offline  
Old 03/15/2010, 03:14   #6
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by .Arco View Post
You skipped step one.
public static DateTime SystemMsgTime = new DateTime();

**EDIT**
yer got it working now .Arco i didnt copy the whole line right lol
.Beatz is offline  
Old 03/15/2010, 03:49   #7
 
gulpi_de_gulat's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 71
Received Thanks: 40
hmmm, pls follow the thread correctly before the complain
gulpi_de_gulat is offline  
Old 03/15/2010, 05:17   #8
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by gulpi_de_gulat View Post
hmmm, pls follow the thread correctly before the complain
He didn't quite complain, more as ask for further assistance.
Arcо is offline  
Old 03/15/2010, 05:44   #9
 
dieg900's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 86
Received Thanks: 2
I needed this for this source, I used a lot, because I had no idea how to modify the message and change my way, and another language, good job
dieg900 is offline  
Old 03/18/2010, 07:45   #10
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Nice Thanks
How i can add His date?>>>>
Quote:
(DateTime.Now.DayOfWeek == DayOfWeek.Friday == DateTime.Now.Hour == 19 && DateTime.Now.Minute >= 45)
?
sawickas is offline  
Old 05/01/2010, 14:46   #11
 
elite*gold: 0
Join Date: May 2008
Posts: 35
Received Thanks: 0
how i can make it work
nader_sah2000 is offline  
Reply


Similar Threads Similar Threads
[Release] Flower System (5165)
09/25/2010 - CO2 PServer Guides & Releases - 71 Replies
Heya! Mostly complete... just figure a way to save it on your server.... ScreenShots: http://img98.imageshack.us/img98/1949/164947279.j pg http://img714.imageshack.us/img714/5372/64922998. jpg http://img59.imageshack.us/img59/1025/64930238.jp g
[question] how to changes system message 5165?
05/17/2010 - CO2 Private Server - 4 Replies
hi guys how to changes system message like this?: http://img40.imageshack.us/img40/175/69485093.jpg
[Release]NPC system 5165 simplified
05/10/2010 - CO2 PServer Guides & Releases - 14 Replies
//
some1 have 5165 source with flower system please post download link here
01/31/2010 - CO2 Private Server - 7 Replies
some1 have 5165 source with flower system please post download link here:(



All times are GMT +1. The time now is 15:39.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.