Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

LatencyMin/LatencyMax

Featured Replies

Hello everyone, especially DroidZ!

How works subj under the hood? It used for like Usefuls.Latency => return Random(LatencyMin, LatencyMax) or Thread.Sleep(Random(LatencyMin, LatencyMax)) or smth?

If Engine.StartEngine method has default 16fps framerate, so LatencyMax should be less than 625ms ?

I want to understand, how to tune LatencyMin & Engine.framerate for lower CPU using, meanwhile fighting with lowest latency between hits.

Hello,

It's more for network latency than the delay to interact with the game. In the bot, before/after action, I generally use code like "Sleep(Usefuls.Latency + XXms)".

Actual code used to get "Latency" :

        /// <summary>
        /// Gets the latency (between <see cref="wManagerSetting.LatencyMax"/> and <see cref="wManagerSetting.LatencyMin"/>, to get real latency use <see cref="LatencyReal"/>).
        /// </summary>
        /// <value>The latency.</value>
        public static int Latency
        {
            get
            {
                lock (_lockLatency)
                {
                    try
                    {
                        var real = LatencyReal;

                        if (real > wManagerSetting.CurrentSetting.LatencyMax)
                            real = wManagerSetting.CurrentSetting.LatencyMax;
                        if (real < wManagerSetting.CurrentSetting.LatencyMin)
                            real = wManagerSetting.CurrentSetting.LatencyMin;

                        return real;
                    }
                    catch (Exception e)
                    {
                        Logging.WriteError("Latency: " + e);
                        return 0;
                    }
                }
            }
        }

        private static readonly Object _lockLatencyReal = new Object();
        /// <summary>
        /// Gets the real latency (home+world)).
        /// </summary>
        /// <value>The real latency.</value>
        public static int LatencyReal
        {
            get
            {
                lock (_lockLatencyReal)
                {
                    try
                    {
                        if (!_timerLatency.IsReady || !Conditions.InGameAndConnectedAndAlive)
                            return _lastLatency;

                        _timerLatency = new Timer(30 * 1000);
                        var result = Lua.LuaDoString<int>("local _, _, lag = GetNetStats(); return lag;");
                        if (result > 0)
                            _lastLatency = result;
                        return _lastLatency;
                    }
                    catch (Exception e)
                    {
                        Logging.WriteError("LatencyReal: " + e);
                        return 0;
                    }
                }
            }
        }

 

You can use low FPS in game. But you need to use optimised fightclass/plugins/profile (try to call lua codes between lock/unlockframe)

You can also change settings :

https://wrobot.eu/byme/doc/html/F-wManager.wManagerSetting.ReadObjectManagerFTS.htm

https://wrobot.eu/byme/doc/html/F-robotManager.MemoryClass.Hook.SleepTimeWaitCalled.htm

https://wrobot.eu/byme/doc/html/F-wManager.wManagerSetting.EventsLuaWithArgsWaitTime.htm

And use code like 

robotManager.Events.FiniteStateMachineEvents.OnAfterRunState += (engine, state) => { Thread.Sleep(10); };

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.