• Visit Rebornbuddy
  • RebornBuddyCN r202

    Discussion in 'Rebornbuddy Forum' started by mastahg, Aug 26, 2014.

    1. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      hi mastahg, I seem to have encountered a mysterious bug, i use a System.Timers.Timer instance and subscribed its elapsed event to repeatedly trigger some functions outside the main behaviour tree, like this
      Code:
                  System.Timers.Timer t = new System.Timers.Timer(100);
                  t.Elapsed += (sender, e) =>
                  {
                      RaptureAtkUnitManager.Update();
                      GameObjectManager.Update();
                      DirectorManager.Update();
                      if (GameObjectManager.GameObjects.Any(i=>i.Type == GameObjectType.Pc && !i.IsVisible) && !NowLoading.IsVisible)
                      {
                          //...
                      }
                  };
                  t.Start();
      It functions well, but I found that calling the elapsed function frequently has a certain chance of causing the game to close directly, without any error or exception in RB's log or a crash dialogbox from the game. A 100ms Timer may cause the game close randomly in a few hours, and a 1ms Timer will close the game in less than a minute.
      I'm not sure what goes wrong, should I use some other method to refresh Managers for plugins?
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Running anything on an external thread is highly unsupported. You can get away with it in certain instances if you know how the internals work and only call functions that read data and are unlikely to invoke game function calls. Try refactoring your code to run in the pulse handler for plugins.
       
    3. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      if player didn't unlocked flight on Coerthas Western Highlands, NavGraph will still guide player through ishgard. but theres a obstacle we can't pass upload_2021-1-18_2-44-45.png

      it will stuck there and triggers anti-stuck to jump strafe all day long, and was immediately identified as a bot.


       
      Last edited: Jan 19, 2021
    4. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      and CNBooster v1.3 seems not working... i put it under the same path of launcher exe and run booster, it still warns me "the process is already opened“.
      upload_2021-1-18_5-3-59.png
       
    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Thanks for the report on the navgraph issue.

      As for the booster, you cannot have multiple copies of the launcher open at a time. Login then run the booster and repeat.
       
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Looking into the navgraph issue more, I think it's most likely a profile issue. Navgraph makes a best attempt to get you where you need to go, but if the profile tries to take you somewhere early, then that's a profile problem. It'd require a lot of internal work to add checks for those connections.
       
    7. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      hi mastahg,Since yesterday, RB will disappear directly, and it is very slow to open RB again. What is the situation
       
    8. claud321

      claud321 Member

      Joined:
      Sep 15, 2013
      Messages:
      67
      Likes Received:
      1
      Trophy Points:
      6
      管理员您好,请问中文版客户端在哪里购买和下载。
       
      Last edited: Jan 21, 2021
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
    10. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      It's the same with me and my friends

      [16:48:19.788 N] Session has expired
      [16:48:19.788 N] Stopping the bot. Reason:Session has expired
      [16:48:19.839 D] CurrentBot.Stop()
      [16:48:19.839 D] TreeHooks.Instance.ClearAll()
      [16:48:19.839 N] Clearing all hooks.
      [16:48:19.839 D] Replaced hook [PreCombatBuff] 9ab10b41-1ada-49a4-9376-ddbccde28971
      [16:48:19.839 D] Replaced hook [Heal] 6c7ea7a9-649a-44a3-ab43-ac2dfb0c5e6c
      [16:48:19.839 D] Replaced hook [Pull] 1a04a305-785b-476c-ab89-96c3ea5cdcea
      [16:48:19.839 D] Replaced hook [CombatBuff] 08035636-bd99-4a04-a6bc-0a01f23ca39a
      [16:48:19.839 D] Replaced hook [Combat] 32dbbcad-b8fd-41d1-a613-9a65cae9dbec
      [16:48:19.839 D] Replaced hook [Rest] 26ad653c-ed36-489c-996b-a17dae87c345
      [16:48:19.839 D] Inserted new hook [TreeStart @0] 4e2beba2-1aff-45ec-bd57-591515f3b00e
      [16:48:19.839 D] Navigator.Clear()
      [16:48:19.839 D] OnStop event
      [16:48:19.839 D] OnStop Event Invoking
      [16:48:19.839 N] Bot Thread Ended.
       
    11. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Full log please
       
    12. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      hi mastahg,Help me see, a key drops more than 10 times a day
       
    13. claud321

      claud321 Member

      Joined:
      Sep 15, 2013
      Messages:
      67
      Likes Received:
      1
      Trophy Points:
      6
      Where can I download the task script suitable for Chinese client? I downloaded y2krazy with SVN, but it's not easy to use. (machine translation, please forgive me)
       
    14. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Do you have some logs that are <24 hours long?
       
    15. claud321

      claud321 Member

      Joined:
      Sep 15, 2013
      Messages:
      67
      Likes Received:
      1
      Trophy Points:
      6
      太坑人了一点也不好用
       
    16. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      Please try your best to deal with it, I can't find what you need, everything is normal after the start of operation, all of a sudden the session expired, and then the RB disappeared, now this problem is very serious in China

      [14:51:09.636 D] DoAction Spell 16497 0x4000BBA3
      [14:51:10.905 N] Session has expired
      [14:51:10.905 N] Stopping the bot. Reason:Session has expired
      [14:51:10.947 D] CurrentBot.Stop()
      [14:51:10.948 D] TreeHooks.Instance.ClearAll()
      [14:51:10.948 N] Clearing all hooks.
      [14:51:10.948 D] Replaced hook [PreCombatBuff] 46e34cf7-a9d4-4d6c-84bd-b02be6f94f47
      [14:51:10.948 D] Replaced hook [Heal] 4b49b041-caab-49ea-8e36-f7b9033f4759
      [14:51:10.950 D] Replaced hook [Pull] 825cab83-b673-4c93-9ad3-66c3a862a058
      [14:51:10.950 D] Replaced hook [CombatBuff] abba6d5b-b232-42a9-9243-1ac41ed50876
      [14:51:10.950 D] Replaced hook [Combat] 5a8ad3f6-feb7-444b-b82d-91e532cf402e
      [14:51:10.950 D] Replaced hook [Rest] 860128fe-2813-47a6-acfd-2bd7c9306585
      [14:51:10.950 D] Navigator.Clear()
      [14:51:10.950 D] OnStop event
      [14:51:10.950 D] OnStop Event Invoking
      [14:51:10.950 N] Bot Thread Ended.
       
    17. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      I need full logs. Partial logs do nothing to help me with this issue.
       
    18. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      Sorry mastahg, I thought about this problem again today. If a Coroutine.Wait is running, then every ticks before the Wait() ends will continue executing from the coroutine line without judging its previous conditions.

      I ran this test code in the codechunk of orderbot
      Code:
                      if (!MovementManager.IsMoving)
                      {
                          Logging.Write("coroutine wait started" + DateTime.Now);
                          if (await Coroutine.Wait(10000, () => (Core.Me.StatusFlags & StatusFlags.WeaponOut) != 0))
                          {
                              Logging.Write("weapons out " + DateTime.Now);
                          }
                          else
                          {
                              Logging.Write("waited 10000 no weapons out " + DateTime.Now);
                          }
                          Logging.Write("Coroutine wait ends "+DateTime.Now);
                      }
                      Logging.Write("all ends " + DateTime.Now);
      After the "start coroutine wait" line is printed in the log, even if I control my character to start moving, the whole Coroutine.Wait will continues to wait until I pull out my weapon or wait 10 seconds. It seems there's no way I can stop calling it after it started waiting...
      Is it possible to make a Coroutine stops immediately when an external condition changes?
       
      Last edited: Jan 26, 2021
    19. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      That is how coroutines work. When you call a coroutine it continues from where it last left off, so when you call coroutine.wait the next iteration the only thing that will be checked is the contents of the wait. You could add || abortearly or something to the wait conditional, but you probably should try and think about changing how you are approaching w/e it is you are working on. Wait is typically used for short periods when waiting for very specific conditions to occur.
       
      Akira0245 likes this.
    20. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      You could also try using await coroutine.sleep(1) inside a loop
       
      Akira0245 likes this.

    Share This Page