Question

05/11/2010 05:15 KinG^PlutO#1
I'm trying to make a item that makes you lvl 137 for 5 minutes but i dont know how to create a timer.
Can anyone help?
05/11/2010 13:43 .Summer#2
Quote:
Originally Posted by -virTuaL View Post
Program.Timer = new System.Timers.Timer();
thats really helping him much :)
a statement wont help much, you should have posted a methode for it to him. as he say he dont kno how to make a timer :)
05/11/2010 14:35 ~Yuki~#3
virtual cant even create a timer :facepalm:
05/11/2010 14:37 Basser#4
Quote:
Originally Posted by -virTuaL View Post
Program.Timer = new System.Timers.Timer();
Enlighten us with your experience. :facepalm:
05/11/2010 15:50 CØĐ£Ř||Mã©hÍñє#5
With TQ r C#

with TQ Binary use STC"s

with c# no idea am just learner :)
05/11/2010 15:52 .Summer#6
Quote:
Originally Posted by CØĐ£Ř||Mã©hÍñє View Post
With TQ r C#

with TQ Binary use STC"s

with c# no idea am just learner :)
what have that to do with making a timer? :)
05/12/2010 04:27 gerble93#7
Quote:
Originally Posted by KinG^PlutO View Post
I'm trying to make a item that makes you lvl 137 for 5 minutes but i dont know how to create a timer.
Can anyone help?
Yes, a great many of people may help you. I am one of them.

This is an example of a timer.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers; // use this to do the Timers or you can replace the Timer with System.Timers.Timer

namespace CA_TimerProject
{
    class Program
    {

        public static Timer ExplanationTimer = new Timer(); // Create a new timer 

        static void Main(string[] args)
        {
            Console.Title = "C# Explain Timers"; // Console Title
            
            
            ExplanationTimer.Elapsed += new ElapsedEventHandler(ExplanationTimer_Elapsed); // Create a new void that does something when the timer ends
            ExplanationTimer.Interval = 300000; // 1000 ticks * 60 seconds * 5 minutes | tells when the timer stops and then restarts (ofcourse you can make it completely stop forever)
            ExplanationTimer.Start(); // starts the timer
    
            Console.ReadLine();
        }

        static void ExplanationTimer_Elapsed(object sender, ElapsedEventArgs e) // Once again this action happens once the timer reaches the interval of 5 minutes
        {
            Console.WriteLine("5 Minutes has passed");
            ExplanationTimer.Stop(); // stops the timer so it does not repeat itself (I am sure this is what you want)
        }
    }
}
05/12/2010 06:30 Arcо#8
Quote:
Originally Posted by .Summer View Post
what have that to do with making a timer? :)
He asked if it was for binaries, if so use STC's.
l2r.