Resource icon

Approved AdvancedTester (RecoilTest/JumpTest) 1.6.4

No permission to download
Python:
if (TestCooldown.ContainsKey(p.UID))
                {
                    var ticks = TestCooldown[p.UID];
                    var calc = System.Environment.TickCount - ticks;
                    var time = TestCooldown[p.UID];
                    if (calc > 0 || !double.IsNaN(calc) || !double.IsNaN(ticks))
                    {
                        var done = Math.Round((float) ((calc/1000)/60));
                        player.MessageFrom("AdvancedTest",
                            "Player has report cooldown for: " + (time - done) + " minutes!");
                        return;
                    }
                    if (calc < (TestAllowedEvery + time)*60000)
                    {
                        var done = Math.Round((float) ((calc/1000)/60));
                        player.MessageFrom("AdvancedTest",
                            "Player has report cooldown for: " + (time - done) + " minutes!");
                        return;
                    }
                }

I dont understand what you want to reach with the time variable.

And specially why it gets added to TestAllowedEvery, its in a wrong format there anyways (time is already in ms).

"Player has report cooldown for: (time - done) What do you try to calculate?


CommandEvent Error: System.Collections.Generic.KeyNotFoundException: The given k
ey was not present in the dictionary.

I think you should use Datastore for this?
 
Last edited:
OK, I found the real cause why the key cannot be found.

At the succesfull end of the test this will get executed:

else if (dist > 0.10f)
{
player.MessageFrom("AdvancedTest", green + "ButtonTest3 Complete!");
UnderTesting[player.UID].ButtonComplete3 = true;
RemoveTest(player);
Server.GetServer().BroadcastFrom("AdvancedTest", green + player.Name + " passed all auto tests!");
return;
}

RemoveTest actually executes then:

if (TestCooldown.ContainsKey(player.UID))

{

TestCooldown.Remove(player.UID);

}

Therefore the TestCoolDown does not work because this key gets removed at the end of the successful test.


Here is a fix of me, I also rewrote the CoolDown check function.

Also with Sourcecode
 

Attachments

Last edited:
var time = TestCooldown[p.UID];

if (calc < (TestAllowedEvery + time)*60000)

But isn't time already in ms? Why would you multiply it again with 60000? TestAllowedEvery instead is in min.
 
How does the Drop Test exactly work? I'm not able to figure it out by the source code.

var timedEvent = CreateParallelTimer(3500, dict);

timedEvent.OnFire += Callback2;

timedEvent.Start();

What exactly is the 3500ms?
 
So after 3,5 secs after the drop it checks if the player got hurt, right?

How can it be that there are false positives, specially with high pings?
 
So after 3,5 secs after the drop it checks if the player got hurt, right?

How can it be that there are false positives, specially with high pings?
Remember the auto droptest in BannedPeople?

Sometimes people with high pigh were never teleported, teleported too late, or got teleported but didnt receive the damage yet.