So I saw an AFK timer and it looked pretty cool so I wanted to use it and as you have most likely guest that it was LOTF and LOTF = **** so.... So I was think something like
AFK for 10 mins you get auto-kicked
and maybe add a code so like if (!==1002) || (!==1038)
so like if your in ANY map u get kicked after 10mins of not moving but (!==1002) can be there so I can add a map that does NOT have the Auto AFK timer.
So can anyone help me out ? or you can just PM me the code if you dont want other people having it
lol why its just a little code ** have a biscuit **
Reason people won't give you the code is because this forum is full of leechers and most of us intermediate people want the newcomers to try to learn for themselves. Well that's my reason anyways.
my reason is do it ur ******* self. and + no one uses a afk timer for their server because its plain stupid... there is multiple things u have to count for ( its possible, itsbeen done)
- Training Ground
- Attacking Guild Pole
- Talking with friends
- Viewing items and different combinations
- Thinking of a cool name to change yours to
- leveling skills..
whoever wants to kick players out of their server for no reason other than being gone for like 5 seconds... seriously what if the person has to go somewhere and returns? hes like brb for 10 mins u gonna kick him? .. anyway why would u kick players? people want to get MORE players not less.
Under your characters I'd do a datetime controling when the last 'action' was and a bool controlling if the character is afk or not.
Then in your movement, attack and chat sections reset the date time to current datetime (saying the last time the client was active is now)
Then where your source handles server checks (such as pk tourneys, dis city or w/e), do a loop through all connected client seeing if they are not on certain maps (market/tg) check if their last action + 10 minutes is less than the current date time. if so, kick them... or use an afk bool which you could use to display an effect around a character to show they are 'away' or whatnot.
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...
public UInt16[] OmittedMaps = new UInt16[5] { 1002, 1015, 1050, 1323, 1564 };
Then at this part
Code:
if (Entity.LastActionTime.Minute > 15) // The Entity's last action is greater than 15 minutes..kick
{
Console.WriteLine(Entity.Name + " is AFK..being kicked");
Entity.Drop();
}
Change it to
Code:
if (Entity.LastActionTime.Minute > 15) // The Entity's last action is greater than 15 minutes..kick
{
if (Entity.OmittedMaps.Contains(Entity.MapId))
Console.WriteLine(Entity.Name + " is AFK BUT!!! is allowed to stay online due to training ground or somereason");
else
{
Console.WriteLine(Entity.Name + " is AFK..being kicked");
Entity.Drop();
}
}
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
Timer 07/08/2009 - CO2 Private Server - 12 Replies Would thi sbe how i go about making a timer for my server?
In General.cs
public static System.Timers.Timer Thetimer;
//Regular Save Timer
Thetimer = new System.Timers.Timer();
Thetimer.Interval = 5000;//5 seconds
Thetimer.Elapsed += new ElapsedEventHandler(Thetimer_Elapsed);
Thetimer.Start();
[au3]Timer 08/26/2008 - General Coding - 2 Replies hallo, habe eine frage zu einem timer, undzwar soll es im endeffekt so aussehen das sich ein label auf einer form im sekundentakt von selbst aktualisiert, quasi wie nen timer ;)
leider hab ich kein plan wo ich da ansetzen kann.
hier mal ein codeausschnitt:
$countdown ist die variable die in dem label aktualisiert werden soll.
.....
#Region ### START Koda GUI section ### Form=
Timer 06/04/2008 - Metin2 - 13 Replies Hey leute kann mir jemand bitte eine datei programmiern, die nachdem start den pc in 90 mins herunterfährt. :)
ich bräuchte ihn für den angelbot;), damit ich ihn starten kann, wenn ich in der schule bin, ohne das der pc umsonst so lang an bleibt.:D
Timer 01/14/2005 - General Gaming Discussion - 8 Replies Hi Leutz
Dieser Timer is ne gute hilfe fuer alle Klassen die beim OP fight mit machen.
Der Timer zeigt euch welcher Buff gerade ausgeht (10min Resistbuff) und wann Shelter/def ausläuft... für das schöne syncgelame ^^... gf and hf ;)
http://home.pages.at/smoker/timer/timer.zip
mfg das BluB