Can someone help me with a AFK timer ?

03/07/2010 18:39 herekorvac#16
You don't put it anywhere.. its an example.. lol your going to have to find all your spots where they move and whatnot and do something like it.. i mean anyone who sees that should get a spark to get it done.. come on..

this doesn't go with any server its an example.. put character and client just to make it seem like u can relate.
03/07/2010 18:40 Arcо#17
It's its own class.
03/07/2010 18:52 Paralyzer[GM]#18
aha k thanks
03/07/2010 19:27 pro4never#19
Quote:
Originally Posted by herekorvac View Post
You don't put it anywhere.. its an example.. lol your going to have to find all your spots where they move and whatnot and do something like it.. i mean anyone who sees that should get a spark to get it done.. come on..

this doesn't go with any server its an example.. put character and client just to make it seem like u can relate.
From the bit I glanced at the code it looks like a very valid example but wouldn't making it a single check and then just reset the date time/timer in those specific sections save alot of work/lines of code?
03/07/2010 19:54 -NewDawn-#20
Quote:
Originally Posted by herekorvac View Post
I wrote this just now...This could help you a little bit..I hope you continue from what I wrote otherwise it was just a waste of my time.. I thought since no one really is "helping" you , I guess i would...

Code:
codes...
reply also.. want to know if it helped u ><
I don't want them to be kicked though =\
In real CO they have it so after 5 minutes of the mouse not moving it puts " (Away)" in your name. Then when the mouse moves again it takes it away.
03/08/2010 00:38 herekorvac#21
Quote:
Originally Posted by -NewDawn- View Post
I don't want them to be kicked though =\
In real CO they have it so after 5 minutes of the mouse not moving it puts " (Away)" in your name. Then when the mouse moves again it takes it away.
Entity.Name = Entity.Name + " [AFK] ";
03/08/2010 15:32 -NewDawn-#22
Quote:
Originally Posted by herekorvac View Post
Entity.Name = Entity.Name + " [AFK] ";
I'm taking that that's the display name?

AFK. Class: BB in 8 hours.
03/08/2010 19:20 walmartboi#23
Quote:
Originally Posted by -NewDawn- View Post
I'm taking that that's the display name?

AFK. Class: BB in 8 hours.
Yes, it would do this:

Character -> Character[AFK] or Character(Away)
03/09/2010 00:59 herekorvac#24
Quote:
Originally Posted by -NewDawn- View Post
I'm taking that that's the display name?

AFK. Class: BB in 8 hours.
here make new proejct in C# and copy paste this for all then press F5

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "Quick Preview of Name Changer"; 
            Console.Write("Please type in a name: "); 
            string name = Console.ReadLine();
            Console.WriteLine(); Console.WriteLine(); string newname = name + "(AFK)"; // just to show + ..
            Console.WriteLine("Your new name is: " + newname); Console.ReadLine();
        }
    }
}
just type in a name it will show u what + away does ><
03/09/2010 03:39 -NewDawn-#25
Quote:
Originally Posted by herekorvac View Post
here make new proejct in C# and copy paste this for all then press F5

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "Quick Preview of Name Changer"; 
            Console.Write("Please type in a name: "); 
            string name = Console.ReadLine();
            Console.WriteLine(); Console.WriteLine(); string newname = name + "(AFK)"; // just to show + ..
            Console.WriteLine("Your new name is: " + newname); Console.ReadLine();
        }
    }
}
just type in a name it will show u what + away does ><
Well no, I don't want to change the name because what if they log out? then their name is "blah blah(away)" lol =s

EDIT: What about making a StatEffect?
03/09/2010 12:21 herekorvac#26
Quote:
Originally Posted by -NewDawn- View Post
Well no, I don't want to change the name because what if they log out? then their name is "blah blah(away)" lol =s

EDIT: What about making a StatEffect?
do something like...

if (LastActionTime > 15)

Entity.Name = Entity.Name + "[AFK]";
LastAction = AFK;
// don't do time for a reason because they are still afk...



then find out where they log out and do something like this

if (LastAction = LastAction.AFK)
{

Name = Name.Remove(Name.Length - 5);
}

or if u dont want to do the lastaction thing do something like this

if (Name.Contains("[AFK]")
{
Name = Name.Remove(Name.Length - 5);
}