• Visit Rebornbuddy
  • RebornBuddyCN r202

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

    1. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Are you testing that in the console, a test file, or a compiled assembly?
      Unless you manually upgraded the roslyn compiler the $ and ? is unsupported in the console/files.


      But regardless of that, there can be buttons without labels, so check that button.isvalid and button.label.isvalid, as the button simply contains a label.
       
    2. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      Sorry I only checked the label is not null, added an IsValid check then it works:)
      for the console, yes I upgraded it to use the roslyn complier included in rb folder.
       
    3. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      hi mastahg, i met some trouble when trying to use the Lua class. many of the client lua functions such as
      Code:
      Log(Lua.GetReturnVal<string>("return _G['CmnDefHousingSignboard:721031']:OpenSignboard()"));
      or
      Code:
      Log(Lua.GetReturnVal<string>("return _G['Pc:0000014924BFCCA0']:BalloonTalk()"));
      throws an "attempt to index a nil value" exception, google says it's because the function being called is a local function so the the calling procedure must be later than it declares... but i really don't know how to control the time to calling them properly... Can you help me?
       
      Last edited: Oct 30, 2020
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      I don't recommend you touch anything with lua unless you know exactly what the game is doing, as most of the functions must be called with parameters.
       
    5. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
      mastahg sorry to bother again, i am trying to use NavGraph in a botbase as navigator, i ran this in console
      Code:
      Task.Run(async () =>
      {
          Log("getting path");
          var path = await NavGraph.GetPathAsync(WorldManager.ZoneId,
              FateManager.ActiveFates.Where(i => i.IsValid)
                  .OrderBy(i => i.Location.Distance(Core.Me.Location)).First().Location);
          Log("received path");
      });
      i tried these codes both in an async botbase and reborn console, but its output is always "getting path" and nothing more...
      is it possible to use NavGraph in another botbase? or it is limited for orderbot usage?
       
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Coroutines are not compatible with the standard Task.run

      There isnt a good way to test/run coroutines from the console.

      If I really need to test them I use a dummy botbase, i imagine you could modify this to wait for the console to assign a function and then it would execute that.


      Code:
          public class CoroutineBot : BotBase
          {
              public override string Name
              {
                  get { return "CoroutineBot"; }
              }
      
              public override bool RequiresProfile
              {
                  get { return false; }
              }
      
      
              public override PulseFlags PulseFlags
              {
                  get { return PulseFlags.All; }
              }
      
              public static async Task<bool> dowork()
              {
      
                  var bagslot = InventoryManager.FilledSlots.FirstOrDefault(r => r.RawItemId == 4870);
                  await CommonTasks.HandOverRequestedItems();
                  return true;
              }
      
      
              private Composite _cache;
              public override Composite Root
              {
                  get
                  {
      
                      if (_cache != null)
                      {
                          return _cache;
                      }
      
                      _cache = new PrioritySelector(new ActionRunCoroutine(r => dowork()));
                      return _cache;
                  }
              }
      
              public override void Start()
              {
                  Navigator.NavigationProvider = new ServiceNavigationProvider();
                  Navigator.PlayerMover = new SlideMover();
              }
      
              public override void Stop()
              {
                  (Navigator.NavigationProvider as IDisposable)?.Dispose();
                  Navigator.NavigationProvider = null;
              }
          }
      
      
      This also does not demonstrate optimal practices, just an example of how it could be done. Using an AsyncBotBase would probably better.
       
      Akira0245 likes this.
    7. Akira0245

      Akira0245 Member

      Joined:
      Mar 9, 2019
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      6
    8. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Thanks for the notice.
       
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      New version for 5.3 is building now.
       
      Akira0245 likes this.
    10. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      嗨, 玛塔格, 运行 < Desynth Bagids = "& 巴吉德;"德辛斯·德莱莱="6000"德辛特超时="10"/>
      将有一个:FFXIV关闭,关闭
       
    11. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      hi mastahg,run<Desynth BagIds="&BagIds;" DesynthDelay="6000" DesynthTimeout="10"/>
      There will be a:FFXIV closed,shutting down
       
    12. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Post the log file please.
       
    13. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      [09:00:19.341 N] Finished compiling custom behaviors...
      [09:00:19.341 N] Parsing xml...
      [09:00:20.029 N] Loaded profile 分解
      [09:00:20.031 N] Bot Thread Started.
      [09:00:20.073 N] [ShinraEx] Loading Gunbreaker...
      [09:00:20.215 N] Clearing all hooks.
      [09:00:20.215 D] Replaced hook [PreCombatBuff] 963d51a5-1544-4d17-af43-f273a156b28c
      [09:00:20.215 D] Replaced hook [Heal] db5aa8d7-f58a-4167-90cb-30ffcaf1920e
      [09:00:20.215 D] Replaced hook [Pull] 369e3563-9035-49bc-8253-637772afa151
      [09:00:20.215 D] Replaced hook [CombatBuff] 13b3df0d-29bd-4279-80c6-ec351a95f7f5
      [09:00:20.215 D] Replaced hook [Combat] 022f1137-528c-46fb-a013-2cc6d7c7f436
      [09:00:20.215 D] Replaced hook [Rest] bbf8c3b6-14fb-4132-bfe3-75bb630f3bf0
      [09:00:20.235 D] Added new hook [RoutineCombat] 333c6e63-682d-4ef0-97cf-faad8b299e72
      [09:00:20.237 D] Added new hook [HotspotPoi] e6d43976-2554-4040-a6a9-dacf76e6d49a
      [09:00:20.239 D] Added new hook [SetDeathPoi] b4005c6c-6762-4e30-9266-711e44893489
      [09:00:20.239 D] Added new hook [SetCombatPoi] 6c612c0b-c6a1-4f7c-9f4c-2af7a7fd546e
      [09:00:20.239 D] Added new hook [SetHotspotPoi] 216a2074-1f42-4185-8f73-03a320771086
      [09:00:20.239 D] Added new hook [SelectPoiType] 1261a7bc-e61d-4017-98c8-96203840d487
      [09:00:20.240 D] Replaced hook [SelectPoiType] 2658ce39-3aec-4004-8a7a-228b357a7130
      [09:00:20.241 D] Inserted new hook [TreeStart @0] 80779041-7c22-48f8-ac7f-8faba46421dc
      [09:00:20.533 V] [Poi.Clear] Reason: Current behavior changed to DesynthTag: LineNumber: 28, ItemIds: null, BagIds: Bag1,Bag2,Bag3,Bag4, DesynthDelay: 6000, DesynthTimeout: 10, ConsecutiveDesynthTimeoutLimit: 3, IsDone: False, HighPriority: False, InCombat: False, QuestId: 0, StepId: 0, PostCombatDelay: 0, QuestName: null, IsDoneCache: False, Behavior: null, .
      [09:00:20.537 D] Removed all hooks from [HighPriorityProfileOrderBehavior_Hook]
      [09:00:20.537 D] Replaced hook [ProfileOrderBehavior_Hook] 384a54e7-278c-4f47-822a-49b64f2f1ebb
      [09:00:20.686 N] [Desynth] Your Gunbreaker's desynthesis level is: 0.
      [09:00:20.710 N] [Desynth] You have 1 bag slots that are desynthesizable.
      [09:00:20.711 N] [Desynth] You have 1 items in bag Slot 1 to desynthesize.
      [09:00:20.758 D] OpenSalvageDialog with 雷克兰德精准项链 25775
      [09:00:20.764 N] [Desynth] Attempting to desynthesize item "Lakeland Necklace of Aiming"[1][1] of (1,1) - success chance is 100%.
      [09:00:20.774 D] OpenSalvageDialog with 雷克兰德精准项链 25775
      [09:00:25.827 D] FFXIV closed,shutting down.
       
    14. mastahg

      mastahg Administrator Staff Member

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

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Unable to reproduce the issue.

      Desynth tag isn't an offical tag anyway, but the version I have worked fine.

      Code:
      <Desynth ItemIds="4304"/>
      
      鞣革项环 4304 4304
       
    16. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      thank you
       

      Attached Files:

    17. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Try desynthesizing 鞣革项环
       
    18. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      Ok, I'll try
       
    19. sttianling

      sttianling Member

      Joined:
      Jan 31, 2015
      Messages:
      59
      Likes Received:
      3
      Trophy Points:
      8
      鞣革项环
      Normal equipment is ok

      Only one piece of equipment won't do
       

      Attached Files:

    20. meera1321

      meera1321 New Member

      Joined:
      Dec 1, 2020
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      1
      hi mastahg . I have the same issue as sttianling.
      Code:
      <Desynth BagIds="&BagIds;" DesynthDelay="6000" DesynthTimeout="10"/>
      when runing this code , will log :FFXIV closed,shutting down.
       

      Attached Files:

    Share This Page