Register for your free account! | Forgot your password?

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

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

Advertisement



PK Tourney Timer Problem

Discussion on PK Tourney Timer Problem within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2010
Posts: 90
Received Thanks: 26
PK Tourney Timer Problem

Alright, I have a problem. I made a Timer, to start the PK Tournament. But it keeps doing it over and over for that one minute. I only want it to do it once in that one minute. Here is what I got.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.Features
{
    class PKTourneyTimer
    {
        public static void PKTTimer()
        {
            if (DateTime.Now.Minute == 30)
            {
                if (NewestCOServer.Features.PKTournament.Stage == NewestCOServer.Features.PKTournamentStage.None)
                {
                    NewestCOServer.Features.PKTournament.StartTournament();
                }
            }
        }
    }
}
Code:
try
            {
                Features.PKTourneyTimer.PKTTimer();
            }
            catch { }
Help will be appreciated.
peterpiper99 is offline  
Thanks
1 User
Old 09/29/2010, 21:27   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.Features
{
    class PKTourneyTimer
    {
        public static bool PKStarted = false;
        public static void PKTTimer()
        {
            if (DateTime.Now.Minute == 30 && PKStarted == false)
            {
                PKStarted = true;
                if (NewestCOServer.Features.PKTournament.Stage == NewestCOServer.Features.PKTournamentStage.None)
                {
                    NewestCOServer.Features.PKTournament.StartTournament();
                }
            }
        }
    }
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.Features
{
    class PKTourneyTimer
    {
        public static void PKTTimer()
        {
            if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 01)
            {
                if (NewestCOServer.Features.PKTournament.Stage == NewestCOServer.Features.PKTournamentStage.None)
                {
                    NewestCOServer.Features.PKTournament.StartTournament();
                }
            }
        }
    }
}
now make sure u make it false when tourny ends.
You simply just use a bool.

You could do DateTime.Now.Minute == 30 && DateTime.Now.Second == 01
also.
Fish* is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[VB] Timer Problem
06/19/2010 - .NET Languages - 17 Replies
Hey Leute Ich habe ein problem mit einem Timer. Ich mache es meistens so, wenn Button1 geklickt wird soll das passieren: Timer1.Start Timer1.Interval = 1000 timeleft = 5 So dann schreib ich bei Timer hin: timeleft = timeleft -1
Timer-Problem
07/31/2009 - AutoIt - 13 Replies
Hey Leute, ich bins mal wieder, mit nem neuen kleinen Problem ;) Also: Dies funktioniert nicht, obwohl es eigentlich funktionieren sollte (denke ich^^) ......GUI-Kram While 1
[Problem] With this timer
06/29/2009 - CO2 Private Server - 4 Replies
Ok im adding the Auto Afk thing in but the problem is this Error 1 The name 'AfkKickElapsed' does not exist in the current context. Now the timer is at Character.cs becuse thats where the guide said to go
pk tourney
04/13/2009 - EO PServer Hosting - 6 Replies
hi does anyone know how to turn fam pot off in pk tourney if so plz let me know thanx
[request]translations for legionwar pk tourney
02/23/2009 - EO PServer Hosting - 3 Replies
i hope someone release it....eheee



All times are GMT +1. The time now is 08:20.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.