Git Product home page Git Product logo

antiafkkick's Introduction

AntiAfkKick

Square Enix have disabled afk kick in a recent game update. The AntiAfkKick plugin is not necessary for now, unless you want to prevent auto-kick from instances

An application, Dalamud and ACT plugin for preventing being auto-kicked from FFXIV due to inactivity.

Please use responsibly, this is meant to be used for gatherers or if you are waiting for raid/pf/event, not to just afk in limsa dancing

Dalamud plugin

Recommended if you are using FFXIV Quick Launcher. Using AntiAfkKick as Dalamud plugin provides advantages of automatically launching together with game and automatic updates. ACT plugin and standalone version must be updated manually if ever needed.

Add my custom repo URL:

https://raw.githubusercontent.com/Eternita-S/MyDalamudPlugins/main/pluginmaster.json

then install plugin from plugins list.

Detailed instruction available here: https://github.com/Eternita-S/MyDalamudPlugins

ACT plugin

Download it here: https://github.com/Eternita-S/AntiAfkKick/releases

Then copy it to any convenient folder. Open up ACT, go to "Plugins" tab, then to "Plugin Listing", then click "Browse" button and select DLL file you have just downloaded, and finally click "Add/Enable plugin". Upon doing so ACT may ask you to unblock file. In this case press "Yes".

Standalone version

Just download it and run it. No configuration needed. To exit, access program's tray icon.

Download link: https://github.com/Eternita-S/AntiAfkKick/releases

How it works?

It just sends left control key to the game every now and then. Seems like for now it's enough to make game think user is still active. It won't send keypress if you are actually playing.

But you can just open hud layout and you won't be kicked!

Not anymore

Ethical side of the plugin and my personal opinion about auto-kick

Some people question ethical side of this plugin and in general are against circumventing auto-afk kicking. Here is my personal opinion about it and why I think it's OK to do so:

  • First of all, many activities in FFXIV are tied to specific time windows. Once you get kicked, you aren't guaranteed that you are going to get back in without queue. Things such as gathering unspoiled and legendary nodes, fishing, waiting for specific party finder to fill or appear, waiting for hunt train require you to be in game. Just imagine that you have to sit out 15 minutes queue after seeing hunt train announcement, best case you'll be able to join it halfway.
  • I would understand AFK-kicking if SE was a startup indie company which can legitimately have issues with servers and lack of funding to fix it. Or if game was free. But both statements are not true. Not only SE makes great profit from the game, they are not shy about spending these money for other projects while the one that brings them money clearly requires maintenance. In other words: they ask you to pay for game, then also pay for every month you playing and then they ask you to bear with inconveniences that are directly a result of them using your money for other projects instead of using it to make sure your experience is as uninterruptible as possible and only then using what is left for other projects. This applies not only to queues and afk kick, but for example also to bots, for example they do not put any effort to stop gathering bots that ruin gathering and crafting fun just because they don't want to pay for programmers to write anti-bot checks, to extend their "special task force" or whatever they call their anti-cheat fighting department and pay them more.
  • Based on what I said above, I conclude that I personally have full rights to circumvent afk-kick. Whether you have that right and want to use it or not, is up to you to decide. However, I do ask you to use this tool or any other tool to bypass afk-kick responsible: if you do know that you won't be playing for a good while (while sleeping or at work for example), please do still log out.

antiafkkick's People

Contributors

limiana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

antiafkkick's Issues

Feature Request: Toggle functionality to work only in instances.

My only reason for grabbing this helpful plugin was to avoid the risk of being dropped from instances with door bosses whenever the group decides to take a long/extended break.
It's not a deal breaker, but having the plugin always active stops me from getting the afk status symbol in non-instanced areas, which could potentially mislead others. A simple switch, "Enable only in instances?", could be of benefit here.

Error occurs when updating to 2.1.0.2 in Chinese server.

Dalamud log:

2022-08-31 00:12:36.485 +08:00 [ERR] [LOCALPLUGIN] Error while loading AntiAfkKick
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.DefaultInterpolatedStringHandler' from assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at AntiAfkKick_Dalamud.AntiAfkKick..ctor(DalamudPluginInterface pluginInterface)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Dalamud.IoC.Internal.ServiceContainer.CreateAsync(Type objectType, Object[] scopedObjects)
   at Dalamud.Plugin.Internal.Types.LocalPlugin.LoadAsync(PluginLoadReason reason, Boolean reloading)
   at Dalamud.Plugin.Internal.PluginManager.LoadPluginAsync(FileInfo dllFile, LocalPluginManifest manifest, PluginLoadReason reason, Boolean isDev, Boolean isBoot, Boolean doNotLoad)
   at Dalamud.Plugin.Internal.PluginManager.InstallPluginAsync(RemotePluginManifest repoManifest, Boolean useTesting, PluginLoadReason reason)
2022-08-31 00:12:36.489 +08:00 [ERR] [PLUGINW] Plugin installer threw an unexpected error
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.DefaultInterpolatedStringHandler' from assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at AntiAfkKick_Dalamud.AntiAfkKick..ctor(DalamudPluginInterface pluginInterface)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Dalamud.IoC.Internal.ServiceContainer.CreateAsync(Type objectType, Object[] scopedObjects)
   at Dalamud.Plugin.Internal.Types.LocalPlugin.LoadAsync(PluginLoadReason reason, Boolean reloading)
   at Dalamud.Plugin.Internal.PluginManager.LoadPluginAsync(FileInfo dllFile, LocalPluginManifest manifest, PluginLoadReason reason, Boolean isDev, Boolean isBoot, Boolean doNotLoad)
   at Dalamud.Plugin.Internal.PluginManager.InstallPluginAsync(RemotePluginManifest repoManifest, Boolean useTesting, PluginLoadReason reason)

Dalamud version vD6.4.0.48

Idea: Configurable limit for how long AntiAFK will prevent kick

Sometimes I get up to do make dinner, feed pets, LIFE. And sometimes it takes me just barely over 30 minutes. Nothing hurts quite the same as coming back to that kick, but I feel like it'd be irresponsible to just turn on AntiAFK and forget about it, as I sometimes get wildly side-tracked to the point of not coming back for hours.

I think I'd be more comfortable with it if I could limit how long it would let me be AFK, so I don't get the short end from just handling household responsibilities, but if I get completely side tracked, it can let me get bumped after an hour, hour and a half of me not doing anything, myself.

Not a problem but a thank you

Cant thank you on discord cause privacy settings so I hope you dont mind me saying this here Just wanted to say thanks for the afk plugin. I for one appreciate it and don't abuse it like overnighting with it. I use it when I work so I don't get kicked when I'm on a work call or something.

Im sure some people come at you with pitchforks over this plugin but from myself and many others IM sure I am grateful for the plugin.

Have a great day and happy new year and Ill continue to support this.

Question - NextKeyPress = 0 why have it? (update line was commented out)

In AntiAfkKick/AntiAfkKick.cs in the current revision (16 days old) https://github.com/Eternita-S/AntiAfkKick/blob/44e3b75e2d31c94384b555492488fecabbc82816/AntiAfkKick/AntiAfkKick.cs

Below is the code referencing the tick and the next key press.
The way it is writting Next Key Press is never updated from 0
This means that the if (Native.GetTickCount64() > NextKeyPress) will return true 100% of the time.

The if statement is then not needed, the variable is also not used, and the rest is determined by the thread being inactive for more than 1 minute.

Sorry to bug you, I'm mostly just curious.


static ulong NextKeyPress = 0;

  new Thread((ThreadStart)delegate
                {
                    while (true)
                    {
                        Thread.Sleep(10000);
                        Console.WriteLine($"Cycle begins {Native.GetTickCount64()}");
                        try
                        {
                            if (Native.GetTickCount64() > NextKeyPress) {
                                foreach (var handle in Native.GetGameWindows())
                                {
                                    if(Native.GetForegroundWindow() != handle || Native.IdleTimeFinder.GetIdleTime() > 60 * 1000)
                                    {
                                        Console.WriteLine(Native.GetTickCount64() + ": Sending keypress to FFXIV window " + handle.ToString());
                                        Native.Keypress.SendKeycode(handle, Native.Keypress.LControlKey);
                                    }
                                }
                                **//NextKeyPress = Native.GetTickCount64() + 2 * 60 * 1000;**
                            }
                        }
                        catch (Exception) { }
                    }

The code is essentially the same this way right?


 new Thread((ThreadStart)delegate
                {
                    while (true)
                    {
                        Thread.Sleep(10000);
                        Console.WriteLine($"Cycle begins {Native.GetTickCount64()}");
                        try
                        {
                         foreach (var handle in Native.GetGameWindows())
                            {
                                 if(Native.GetForegroundWindow() != handle || Native.IdleTimeFinder.GetIdleTime() > 60 * 1000)
                                 {
                                     Console.WriteLine(Native.GetTickCount64() + ": Sending keypress to FFXIV window " + handle.ToString());
                                     Native.Keypress.SendKeycode(handle, Native.Keypress.LControlKey);
                                 }
                            }
                        }
                        catch (Exception) { }
                    }

interfering in Controller controlls?

since i use that plugin i have kinda random missbehaving from my COntroller. like im Moving and suddenly stops walking even the Stick ist still tilted. could this be happend because of the plugin ?

AFK status activates if you are using Wordsmith plugin

Hello,

I am using Wordsmith plugin for roleplay to write paragraphs but for some reason, if I write for 5 minutes, the afk status (red chair) activates. This does not happen if I am alt tabbed out of the game.

Is there a chance that Wordsmith disables the AntiAFkKick plugin while you are using the plugin to write text?

(feature request) Configurable keypress time for ACT plugin

Hi, it seems to be working with quick tests in EW, but wondering if you could make it configurable keypress time?

The press time seems too short -- every two minutes, as per NextKeyPress = Native.GetTickCount64() + 2 * 60 * 1000;

Would be great if something closer to 10 or 15 or even 20minutes -- if it could pull from a settings area or so!
thanks!

Support for Bozja and Zadnor

Do you think its possible to add support for Bozja and Zadnor? Waiting for CLL and Dalriada and always end up forgetting to move every 10 mins.

Doesn't seem to work for me?

I'm not entirely sure when this left movement key press happens, is it when I have the game minimized, when I have the game window open?

Doesnt work when in controller mode

It appears because it uses the ctrl key,this does not work when using a controller. However once controller is removed it works.

Any chance this could also send a controller button press to work with both methods?

Non-issue Enhancement Ideas - Time out option, and Randomize time between clicks

Hello~,
I was wondering if adding a config file with a min/max delay and a random might be a good idea so that there is not a left control key stoke at exactly 2 mins (or what ever its set to). Also maybe a Max Run time too.

I am terrible and rusty with the coding I do know... so forgive me if I butchered things

This is the project file I was working on. If there are any passwords they were all set to Password.
Thoughts.zip

I added app setting and a config file so save/adjust setting for the time between clicks.

	<appSettings>
		<add key="DelayMinMinutes" value="10"/>
		<add key="DelayMaxMinutes" value="25"/>
		<add key="Pause" value="True"/>
	</appSettings>

I never got around to messing with the pause...

On the AntiafkKick.cs I added some menu to the notification icon so you could see what config you had setup. I was going to add a drop down with about 5 options for min and max. Probably 1,2,5,10 for min and 5,10,15,20,25 for max, with max replacing the min if a user is silly enough to go low on the max and high on the min. But I was lazy and out of practice so I didn't figurer out the dropdown on the notification menu and just placed the values in the config file and manual update them as I want.

                String DMinMin;
                String DMaxMin;
                DMinMin = ConfigurationManager.AppSettings.Get("DelayMinMinutes");
                DMaxMin = ConfigurationManager.AppSettings.Get("DelayMaxMinutes");
                Console.WriteLine(": The value of DelayMinMinutes is " + DMinMin);
                Console.WriteLine(": The value of DelayMaxMinutes is " + DMaxMin);

                n = new NotifyIcon
                {
                    Icon = icon,
                    Visible = true,
                    Text = "Anti AFK Kick",
                    ContextMenu = new ContextMenu(new MenuItem[]
                    {
                        new MenuItem("Anti AFK Kick"),
                        new MenuItem("-"),
                        new MenuItem("Min Delay is set to: " + DMinMin),
                        new MenuItem("Max Delay is set to: " + DMaxMin),
                        new MenuItem("Exit", delegate { n.Dispose(); Environment.Exit(0); }),
                    }),
                };

And I adjusted the key press tickcount adding the random from the min/max in the config file. I didnt idiot proof it so incorrect min/max can cause issues.

                              Random rnd = new Random();
                               int rInt = rnd.Next(int.Parse(DMinMin), int.Parse(DMaxMin));
                               Console.WriteLine(": The value of random is " + rInt);
                               NextKeyPress = Environment.TickCount + rInt * 60 * 1000;

I also tossed in a bunch of comments because as I mentioned I'm nub at coding... I haven't done anything in 10 years+ and even then I was only through some basics.

I was thinking of adding to it somewhere... to add a stop/start to the menu and a time out period to the config file. Adding a time out to allow people set a max run time, say 2 hours? The anti-afk kick program would stop at that point. They could turn it back on by going back in to the stop/start on the menu and reset the count timer?

Last thought I had for people that are worried about game TOS/EULA violations is potentially making it a pop up reminder with a "AFK Wake" button every set period of time. Making it so they are actually pressing the key to wake their character. Have it pop up at a set interval by the user and put a count down timer based off 30 mins minus inactive window time. Potentially adding a chime or sound notification to go with it.

I dont know... As is works for me~.

Thanks for the program

Does not work in frontline

Hello.

It is understandable if this is on purpose, but feel like it should be documented if it is. You still get kicked out for being afk in frontline.

Standalone Error

Not sure what we're doing wrong here, but attempting to run the standalone version results in the "side-by-side configuration is incorrect" error message upon launch. My buddy tried it as well and said he couldn't get it to run either. Thoughts or ideas as to what we're missing?

Standalone and ACT versions: game changes

Standalone version and ACT plugin are expected to be working immediately, but due to internal game changes a changes to the program/plugin might be required. Please report here if you encounter any problems, feel free to report that program works fine as well if it does for you.

Additional information: to test it without risk of being kicked - enter any duty undersized and go afk for 7-10 minutes. Should you come back and see no messages that you are being inactive - the program/plugin is working fine. Should you see a warning about auto-kick from duty, it means anti-kick does not works.

AntiAFGKick

FF14 had a huge new patch today and the AntiAFGKick Standalone no longer works. :(

ACT plugin not working?

Heyo,
Been trying to get the plugin to work for 4hours now and It just doesnt seem to be sending any keypresses to my XIV client.
Installed it the usual way, have tried redownloading the plugin, ACT itself etc and notthing seems to work, sadly..
Is this plugin in need of an update to work with the latest ACT update?

Cheers

Safe to use plugin?

Just wondering is people are getting banned from using this as I've heard people had gotten banned for using macros before. If it's unlikely then that would be cool to avoid the que times.

No longer working as of 12/09/21?

I had used this over the past few days via ACT with no issue (currently caring for family with limited mobility, and have to step away frequently). However, as of today the activity in the plugin window appeared different, and I had gotten kicked back to the title screen.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.