Giter Club home page Giter Club logo

ultimate-afk's Introduction

                                   

A passionate software developer from Argentina 🇦🇷


🌱 I’m currently learning C#

🐍 My Contributions 🐍


snake eating my contributions



⚡ Stats ⚡


streak stats readme stats
top langs





ultimate-afk's People

Contributors

dgvagabond avatar joker-119 avatar mrafitol avatar pintthedragon avatar srlicht avatar steven4547466 avatar thijsnameistaken avatar thomasjosif avatar thundermaker300 avatar wafelowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ultimate-afk's Issues

Spammed error in console

Hello, @SrLicht,

The below error is spammed constantly when someone is in the SCP:SL Server.
Plugin Version used: 6.4.3
Exiled Version used: 8.3.6

As you can see in the timestamps, it's just a spam flood.

[30-10=2023 18:56:16.255 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:16.459 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:17.263 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:17.490 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:18.296 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:18.487 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:19.291 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:19.519 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:20.323 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException
[30-10=2023 18:56:20.550 +02:00] [Error] [UltimateAFK] Error on AfkComponent::AfkStatusChecker: Object reference not set to an instance of an object || typeof System.NullReferenceException

Plugin config is default. Nothing is changed.

# Setting this to false will stop the plugin from working in the next round.
is_enabled: true
# If you have any error in the plugin operation activate this and create an Issue in Github https://github.com/SrLicht/Ultimate-AFK/issues
debug_mode: false
# When a player is replaced it is called a delay, if when replacing the player the position is not updated correctly, increase this value but it must not exceed 2.5 since it would be too long.
replace_delay: 1.39999998
# If the number of players is less than this the plugin will not work.
min_players: 1
# Tutorials should be ignored ?
ignore_tut: true
# RoleTypes on this list will not be replaced by other players
role_type_blacklist:
- Scp0492
# How long a player can remain motionless before being detected as AFK
afk_time: 30
# After being detected as AFK a message will appear on his face and he will be given this time to move or he will be Kicked/Moved to spectator.
grace_time: 30
# The number of times a player must be moved to spectator for a player to be kicked from the server. Use -1 to disable it
afk_count: -1
# When the player is detected as AFK and is in grace period this message will appear on his face. {0} represents the seconds the player has to move or be moved to spectator.
msg_grace: <color=white>[</color><color=green>AFK</color><color=white>]</color> <color=red>You will be moved to spectator if you do not move in less than <color=white>{0}</color> seconds.</color>
# This message will be sent to the player who has been moved to spectator when he is detected as AFK, it is also sent to the player's console.
msg_fspec: <color=red>You were detected as AFK and were moved to spectator</color>
# When a player is replaced by another player, this message will be sent to his console.
msg_replaced: >2-

  <color=yellow>you were replaced by {0}</color>
# This will be the reason for the Kick, due to the VSR it is obligatory to clarify that it is a plugin with flags like [UltimateAFK] or something similar.
msg_kick: '[AFK] You were removed from the server for being AFK for too long!'
# When a player replaces another player, this message will appear on the player's face and on the player console. | {0} it is the name of the player who was afk
msg_replace: <color=red> You replaced {0} who was afk.</color>
# All configuration related with the command
command_config:
# Is the command enabled on this server ?
  is_enabled: false
  # When a player uses the command, he must stand still for this amount of seconds to be moved to spectator.
  seconds_still: 10
  # The number of times a player can be this command per round
  use_limits_per_round: 3
  # The coldown of the command when using it
  cooldown: 40
  # The command can only be used by players who have a group that is on the list ?
  exclusive_for_groups: false
  # List of groups.
  user_groups_allowed:
  - someGroup
  # The command is disabled for certain RoleTypes?
  disable_for_certain_role: false
  # List of RoleTypes that cannot use the command
  role_type_id_black_list:
  - None
  responses:
  # Response given to the player when trying to use the command when it is disabled.
    on_disable: This command is disabled
    # Response given to the player when successfully executing the command.
    on_success: You were moved to spectator because you considered yourself AFK.
    # Response given to the player when he has no hands
    on_severe_hands: You cannot use this command if you have no hands
    # Response given to the player when affected by Cardiact Arrest (Effect of SCP-049)
    on_hearth_attack: You cannot use this command if you have a heart attack.
    # Response given to the player when trying to use the command when in the pocket dimension.
    on_pocket_dimension: There is no easy escape from the pocket dimension.
    # Response given to the player when he still has cooldown to use the command. {0} is the number of seconds the player has to wait.
    on_cooldown: You cannot use the command yet, you have to wait {0} seconds.
    # Response given when a player tries to use the command with a role in the blacklist
    on_black_listed_role: You cannot use this command when you are {0}
    # Response given to the player when not in the group list
    on_group_exclusive: Your current group is not in the list of allowed groups.
    # Response given to the player when he tries to use the command when the round has not started.
    on_round_is_not_started: The round has not started yet, you cannot use the command.
    # Response given to the player when trying to use the command while is dead.
    on_player_is_dead: You cannot use the command if you are dead.
    # If a player has the value "afk disable" (bool) set to true in his Temporary Storage, trying to use the command will give him this message
    on_uafk_disable: You can't use this command because you have a subclass or some plugin temporarily removed your access to the command
    # If a player is inside an elevator he will not be able to use the command because his replacement will fall into the void if the elevator is moving.
    on_elevator_moving: ' You cannot use this command while in a moving elevator.'
    # When a player uses the command he will have to wait X seconds to be spectator.
    on_waiting_for_afk: You will be moved to spectator in {0} seconds.
    # If a player moves within the time limit this message will be sent to the player's console.
    on_moving: You moved, you have to be still for {0} seconds to be moved to spectator.
    # If a player tries to execute the command when he has already reached his limit per round this message will be sent to the console.
    on_limit: You have reached the limit of uses of the command per round.
    # If a player tries to execute the command while it is being processed to move to spectator he will get this message
    on_try_to_execute: You are already being processed to move to spectator, you have to stand still for {0} seconds.

Afk Replacment does not work

Replacing an afk Player does not function as intened and provides the error seen in the image
image
There is a second player in spectator on the server when this occurs.
I am using plugin version: 6.4.4 (latest)

[Suggestion] PlayerIDs for ignored AFK players

Is it possible to introduce a configuration file entry enabling the specification of player IDs to be exempted from the AFK timer, akin to the permissions afforded to staff members?

This proposition arises from the prevalence of Exiled usage, where the inability of permissions to traverse between NWApi and Exiled renders the AFK ignore permissions ineffective.

AFK does'nt work.

AFK detection has no effect except for instructions. Do you need to update it?

[BUG] error message in console

I get this error log with v6.0.1 Not sure if i should be worried

[2023-01-08 18:36:52.097 +01:00] [Info] [UltimateAFK] kris.g (REDACTED@steam) Detected as AFK
[2023-01-08 18:36:52.121 +01:00] [Error] [UltimateAFK] Player [connId=23] (UltimateAFK.Handlers.Components.AfkComponent) error on CheckAFK: System.NullReferenceException
                                   at (wrapper managed-to-native) UnityEngine.Component.get_gameObject(UnityEngine.Component)
                                   at PluginAPI.Core.Player.get_GameObject () [0x00006] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.TryGetComponent[T] (Tcomponent, System.Boolean globalSearch) [0x00069] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.GetComponent[T] (System.Boolean globalSearch) [0x00000] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.ClearBroadcasts () [0x00005] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.SendBroadcast (System.String message, System.UInt16 duration, Broadcast+BroadcastFlags type, System.Boolean shouldClearPrevious) [0x00004] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent.Replace (PluginAPI.Core.Player player, PlayerRoles.RoleTypeId role) [0x0040d] in <d054805a601f4f468512a897bbc8b68c>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent.CheckAfk () [0x00277] in <d054805a601f4f468512a897bbc8b68c>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent+<CheckAfkPerSecond>d__16.MoveNext () [0x00076] in <d054805a601f4f468512a897bbc8b68c>:0  ||   at (wrapper managed-to-native) UnityEngine.Component.get_gameObject(UnityEngine.Component)
                                   at PluginAPI.Core.Player.get_GameObject () [0x00006] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.TryGetComponent[T] (Tcomponent, System.Boolean globalSearch) [0x00069] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.GetComponent[T] (System.Boolean globalSearch) [0x00000] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.ClearBroadcasts () [0x00005] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at PluginAPI.Core.Player.SendBroadcast (System.String message, System.UInt16 duration, Broadcast+BroadcastFlags type, System.Boolean shouldClearPrevious) [0x00004] in <4c2a3c9f04a54612acd3e9a88faf0eba>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent.Replace (PluginAPI.Core.Player player, PlayerRoles.RoleTypeId role) [0x0040d] in <d054805a601f4f468512a897bbc8b68c>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent.CheckAfk () [0x00277] in <d054805a601f4f468512a897bbc8b68c>:0 
                                   at UltimateAFK.Handlers.Components.AfkComponent+<CheckAfkPerSecond>d__16.MoveNext () [0x00076] in <d054805a601f4f468512a897bbc8b68c>:0

[Feature] Blacklist specific roles

Could you add a config option to blacklist specific classes? I wan't to exclude SCP-049-2 from being afk-replaced. People on my server are exploiting this plugin because they don't want to be a zombie.

[enhancement] Replacement happens for people who leaves from server:

The main task of this plugin is to replace players who are too long AFK with other players to give them a chance to play.
Unfortunately, some players tend to leave the server even before the AFK-trigger starts.

I think this addition would be good for the main idea of the plugin.
By this i mean:

Add config option, to allow players which leaves the server to be auto-replaced by spectators with their inventory restored to new player, just like in afk-replacement.

Thank you.

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.