• Visit Rebornbuddy
  • ActionManager and CraftActions

    Discussion in 'Community Developer Forum' started by kraftaddikt, Aug 6, 2019.

    1. kraftaddikt

      kraftaddikt Member

      Joined:
      Jul 3, 2015
      Messages:
      46
      Likes Received:
      4
      Trophy Points:
      8
      I've been working on writing a botbase to handle some of my crafting (mostly because I keep writing the same order bot profiles for different items) and I'm running into the following issue;

      I'm unsure of the correct command to the ActionManager to process "buff" type Crafting Actions.
      For instance, and I've tested this either through the routine or using the Console, when on Carpenter and I send the following command:

      Code:
      ActionManager.DoAction(ActionType.CraftAction, 100203, null);
      The ability for Careful Synthesis III on my hotbar pulses and the action is performed and the progress of the craft increases.

      But when I run a command for Inner Quiet through the Console, e.g;

      Code:
      ActionManager.DoAction(ActionType.CraftAction, 252, null);
      The ability pulses, but it doesn't fire off.

      If tried setting the GameObject parameter to Core.Player but that didn't change anything and I replaced it with null in order to see if that would mimic some of the data visible in the logs when crafting, e.g;

      Code:
      [13:41:25.536 D] DoAction Spell 252 0xE0000000
      What would be the appropriate usage of the DoAction method to make sure that buff actions like Steady Hand etc. get handled properly?
       
      Last edited: Aug 6, 2019
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Try not using the id. The id for the spell is probably different for the class you are trying to use it for.
       
      kraftaddikt likes this.
    3. kraftaddikt

      kraftaddikt Member

      Joined:
      Jul 3, 2015
      Messages:
      46
      Likes Received:
      4
      Trophy Points:
      8
      Interesting. I double checked the ID from the ActionCache to make sure the ID I'm trying to use is the correct one, as I generally like to rely more on unique IDs than strings.

      Code:
      [20:39:02.958 N] Currently a level 80 Carpenter
      [20:39:02.958 N] Compiling custom behaviors...
      [20:39:07.009 N] Action Name:Inner Quiet Action Id:252
      
      I tried a couple other ActionTypes and found that Inner Quiet and Steady Hand II are classified as ActionType "Spell", but an ability like Observe is considered a "CraftAction".
      I kind of assumed that every ability that is considered a DoH ability would be of ActionType CraftAction and didn't consider any of them could be a Spell.

      If using the name yields the correct results, I'll change over to that, since without knowing exactly what action types are assigned to abilities, it would be hard to determine what type to use.

      Thanks!
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Just use the override that takes the name or the id without the actiontype parameter, itll decide for you.
       

    Share This Page