Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:31

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

Advertisement



[Release] Better Timer

Discussion on [Release] Better Timer within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
keving15's Avatar
 
elite*gold: 0
Join Date: Nov 2006
Posts: 79
Received Thanks: 25
[Release] Better Timer

If you Noob: Stop Reading!

The most People using 2 Timers or more, i show you an way how to use only 1.
Create in Character.cs for Player the "public DateTime TestCheck;"
Code:
 public static System.Timers.Timer MainTimer;
Code:
      MainTimer = new System.Timers.Timer();
                MainTimer.Interval = 100;
                MainTimer.Elapsed += new ElapsedEventHandler(MainTimer_System);
                MainTimer.Start();
Code:
       public static void MainTimer_System(object sender, ElapsedEventArgs e)
        {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Char = (Character)DE.Value;
                if (Char != null && DateTime.Now > Char.TestCheck.AddMilliseconds(1000)) // Checks if the Current Date + Clocktime like "TestCheck" + 1000 Miliseconds (like 1 Sec). then continue.
                {
                    Char.TestCheck = DateTime.Now; // This sets the "TestCheck" to the current Date + Clocktime...
                    and the step is going to repeat :)
                }
            }
        }
if u have Problems with the Code just ask here.

Dont say something like this suckz or other things.
IF YOU DONT LIKE IT DONT REPLY TO MY POST , VERY EASY OR NOT!
keving15 is offline  
Old 10/21/2008, 23:12   #2
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
added to my [All-In-1] thread ok?
XxArcherMasterxX is offline  
Old 10/21/2008, 23:32   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Pointless.
tao4229 is offline  
Old 10/21/2008, 23:51   #4
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by tao4229 View Post
Pointless.
Only because it's not being utilized to its full potential.
InfamousNoone is offline  
Old 10/21/2008, 23:58   #5
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by InfamousNoone View Post
Only because it's not being utilized to its full potential.
I meant this topic, it's pretty much a rip out of LOTF, just a basic example of it.
tao4229 is offline  
Old 10/22/2008, 09:56   #6
 
keving15's Avatar
 
elite*gold: 0
Join Date: Nov 2006
Posts: 79
Received Thanks: 25
Quote:
Originally Posted by tao4229 View Post
I meant this topic, it's pretty much a rip out of LOTF, just a basic example of it.
Its nothing Rip i have coded it myself.
If you dont know nothing about me, my codes or anything its better to be quit.
keving15 is offline  
Old 10/22/2008, 13:40   #7
 
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
mmm.. if you want to make a single timer, you're probably better off using "if"s to check how much time has passed since the last timer_elapsed, adding that to variables, then when the variables reach a certain amount, call the already existing functions for the old timers and reset the variables to 0. True, this could free up some resources on the host computer; however, if done wrong, it could also jump to 100% and stay there ^.^
Rechocto is offline  
Old 10/22/2008, 22:44   #8
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by keving15 View Post
Its nothing Rip i have coded it myself.
If you dont know nothing about me, my codes or anything its better to be quit.
I meant LOTF does this with like everything.

And wtf? I don't understand your point in the second line. You're not a famous(lol, wow >_>)/good coder, so why the hell does it matter?
tao4229 is offline  
Old 10/23/2008, 07:05   #9
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
iv allwayz used timespan :x, use a timeout and runtill, timout being a timespan set to whatever like (0, 0, 4) - 4 secs. Rununtill = Datetime.now.add(TimeOut)
Ultimatum is offline  
Reply


Similar Threads Similar Threads
Timer CE
07/09/2010 - Last Chaos - 1 Replies
Hi, wollte mal fragen wie man den Timer mit CE herausfinden kann. Danke Hat sich erledigt. Danke trotzdem
Help with gw timer
02/10/2010 - CO2 Private Server - 0 Replies
Hey, i am using a timer on my gw and im trying to figure out how to make it that the timer could restart before it ends. if you can help me then reply here or add me on msn [email protected] thx in advance flamers will be reported
[HELP] Timer
05/26/2009 - CO2 Private Server - 3 Replies
I need help making a timer in lotf
first timer
05/17/2008 - Say Hello - 0 Replies
hello all elite peps... hope to find a lot of useful info on this site and meet some peps who share all other common interest. cya around. :D
DB Timer
09/16/2005 - General Gaming Discussion - 0 Replies
you can have no DB timer....this is how it works...say you incap someone an you DB click on them if someone else atks you the DB skips an DB's the person...if your dbing someone an a NPC attacks you same effect..so in PvP you can exploit by dueling people that your grouped w/ to get fast DB's on your opponents



All times are GMT +1. The time now is 16:31.


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.