Message on Reign Of Kings does not work

Message on Reign Of Kings does not work, the user just being kicked and then he gets confused why.

I know we have methods like ShowConfirmPopup on the "Player" object, but I think it is unavailable during CanUserLogin because this hook checking the connection even before the "Player" is created? Any ideas on how to perform a popup to the player about connection waiting in RoK?

Looks like I need to change that to a Deny method instead. I'll take a look and push up a build for you to test shortly.

We'll likely have a limited amount of messages as a reply:

    InternalDirectConnectFailed = -5,
    EmptyConnectTarget = -4,
    IncorrectParameters = -3,
    CreateSocketOrThreadFailure = -2,
    AlreadyConnectedToAnotherServer = -1,
    NoError = 0,
    ConnectionFailed = 14,
    TooManyConnectedPlayers = 17,
    RSAPublicKeyMismatch = 20,
    ConnectionBanned = 21,
    InvalidPassword = 22,
    DetectedDuplicatePlayerID = 23,
    NATTargetNotConnected = 61,
    NATTargetConnectionLost = 62,
    NATPunchthroughFailed = 63,
    IncompatibleVersions = 64,
    ServerAuthenticationTimeout = 65,
    ConnectionTimeout = 70,
    LimitedPlayers = 71,
    IsAuthoritativeServer = 80,
    ApprovalDenied = 81,
    ProxyTargetNotConnected = 90,
    ProxyTargetNotRegistered = 91,
    ProxyServerNotEnabled = 92,
    ProxyServerOutOfPorts = 93,
    ServerNotReady = 128,
    AuthenticationFailed = 129,
    NotInWhitelist = 130,
    BannedByEAC = 131,
    DisconnectedByEAC = 132,
    EACViolation = 133​

Maybe those "ServerNotReady" or "ConnectionTimeout" will fit as the response for the player, but need to look at what it's actually displaying.

By the way, don't you know in which way can we track the player's resource gathering? The problem with duping resources in RoK is the most popular hacking thing nowadays and devs gonna not to fix it. I think if we'll have the hooks like "OnPlayerGather" with the object ID whom those resources were gathered, save this data to local DB and ban the player if it wasn't received from the legal object previously saved. Can you check if it's even possible?

I'm just crying about the game I like when I see this: https://youtube.com/watch?v=TJ14eXstUzQ

v08ZCEo5WAyDjAS.jpg Ruby

Maybe those "ServerNotReady" or "ConnectionTimeout" will fit as the response for the player, but need to look at what it's actually displaying.

By the way, don't you know in which way can we track the player's resource gathering? The problem with duping resources in RoK is the most popular hacking thing nowadays and devs gonna not to fix it. I think if we'll have the hooks like "OnPlayerGather" with the object ID whom those resources were gathered, save this data to local DB and ban the player if it wasn't received from the legal object previously saved. Can you check if it's even possible?

I'm just crying about the game I like when I see this: https://youtube.com/watch?v=TJ14eXstUzQ

Sadly enough, this is easier said than done.
I have spent many hours digging through the .dll and reverse engineering the game to a unity project.
What I found is that resource gathering is first calculated client-side, then sent to the server.
The following is what is called on the client when you, for example, hit a tree.

        public void Damage(Damage damage, bool local = true)
        {
            if (local)
            {
                IDamageTypeModifier[] damageTypeModifiers = this.DamageTypeModifiers;
                for (int i = 0; i < (int)damageTypeModifiers.Length; i++)
                {
                    damageTypeModifiers[i].ModifyDamage(damage);
                }
                StaticSpawnModifyEvent staticSpawnModifyEvent = new StaticSpawnModifyEvent(this._spawnLocation, this._position, this._objectIndex, damage, StaticSpawnModifyEvent.ModifyType.Damage, null);
                EventManager.CallEvent(staticSpawnModifyEvent);
            }
            ISpriteObjectDamageListener[] spriteObjectDamageListeners = this.SpriteObjectDamageListeners;
            for (int j = 0; j < (int)spriteObjectDamageListeners.Length; j++)
            {
                spriteObjectDamageListeners[j].OnDamage(damage, local);
            }
        }

The hack from the video, and probably most others, works by modifying the data packages sent to and from the server with Windows Package Editor (WPE).
I do have an idea as to how to go about detecting at least these kinds of modifications, but without being able to test it, it'll be a shot in the dark.
When I finish it, it'll be included as another module in DetectCheats, which I'm converting to a server-side anti-cheat.

gGxwEZTC4s573yL.jpg DKay

I do have an idea as to how to go about detecting at least these kinds of modifications, but without being able to test it, it'll be a shot in the dark.
When I finish it, it'll be included as another module in DetectCheats, which I'm converting to a server-side anti-cheat.

I'm glad you've not abandoned this game. :-)
Let me know if you'll need any help with testing it on the server.

Merged post

P.S. I see you removed the damage check from the plugin. It will be nice if you'll add it back because we have caught a few cheaters removing crested blocks with infinite damage amount. Values like "5.764608E+17".

It'll come back, but in the form of its own damage module that also will be able to ban them automatically.

Can't load your new update. :(

 

Failed to initialize plugin 'DetectCheats v3.0.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.DetectCheats.Init () [0x00000] in <filename unknown>:0
at Oxide.Plugins.DetectCheats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0
12:55 [Info] Unloaded plugin Detect Cheats v3.0.0 by D-Kay & Troll Knight

Let's move this to the page for the plugin, instead of using a topic with a different subject.
Meanwhile, I'll check what the problem is.