What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Possible Vaal gems?

eyeballs

New Member
Joined
Mar 17, 2014
Messages
18
Reaction score
0
Is there any way to get your bot to use Vaal gems? Specifically I want the bot to use my Vaal gem once per dominus run, right as he becomes targetable. Is there any way to do this?
 
Is there any way to get your bot to use Vaal gems? Specifically I want the bot to use my Vaal gem once per dominus run, right as he becomes targetable. Is there any way to do this?
yea, it should be already added in I think, previous bot would use it as soon as it was fully charged. Might need push to give us some code.
 
yea, it should be already added in I think, previous bot would use it as soon as it was fully charged. Might need push to give us some code.


Right now it's not. And I'd rather have it just use it on Dominus if possible.


If anyone knows if it's possible.
 
You have to add in code to the CR to do this. With the current CR setup, there's no way to allow for dynamic conditions to control how a skill slot get's used (that's a lot more complicated setup), so in order to make the CR use a skill slot under a really specific condition, you'll have to add it in yourself.

IsTargetable is the property of a NetworkObject that tells you if an object is targetable, but you'll still have to make sure he's attackable (Reaction == Reaction.Enemy).

Instead, you can just do a check for IsActive when you have a Monster object (as opposed to a NetworkObject) and if that returns true, you're desired conditions are met.

So your code would be roughly like:
Code:
var dom = LokiPoe.ObjectManager.GetObjectByName<Monster>("Dominus, High Templar");
if(dom != null && dom.IsActive)
{
   var skill = LokiPoe.InGameState.SkillBarPanel.Slot(yourVaalSkillGemSlot);
   if(skill.CanUse())
   {
       // check distance from him, if it's within range, you'd cast the skill based on the slot
       var err = LokiPoe.InGameState.SkillBarPanel.UseOn(8, false, yourVaalSkillGemSlot);
       if(err == LokiPoe.InGameState.UseError.None)
       {
            // depending on the skill you might want to delay after the cast.
            return true;
       }
    }
}

You'd want to check the distance from him before casting and either move towards him or not do anything. That's not shown, but you can check the CR or the DominusFight plugin for examples of moving towards mobs.

As to where you'd put it, you would want to handle it most likely before the generic skill use logic, so after the logic for Cold Snap, and before the aoe/melee stuff.

You'll have to code in additional logic to not use the skill again if it's usable and you only want to cast it once, and other things like that. That's the general idea behind what you are asking though.
 
You have to add in code to the CR to do this. With the current CR setup, there's no way to allow for dynamic conditions to control how a skill slot get's used (that's a lot more complicated setup), so in order to make the CR use a skill slot under a really specific condition, you'll have to add it in yourself.

IsTargetable is the property of a NetworkObject that tells you if an object is targetable, but you'll still have to make sure he's attackable (Reaction == Reaction.Enemy).

Instead, you can just do a check for IsActive when you have a Monster object (as opposed to a NetworkObject) and if that returns true, you're desired conditions are met.

So your code would be roughly like:
Code:
var dom = LokiPoe.ObjectManager.GetObjectByName<Monster>("Dominus, High Templar");
if(dom != null && dom.IsActive)
{
   var skill = LokiPoe.InGameState.SkillBarPanel.Slot(yourVaalSkillGemSlot);
   if(skill.CanUse())
   {
       // check distance from him, if it's within range, you'd cast the skill based on the slot
       var err = LokiPoe.InGameState.SkillBarPanel.UseOn(8, false, yourVaalSkillGemSlot);
       if(err == LokiPoe.InGameState.UseError.None)
       {
            // depending on the skill you might want to delay after the cast.
            return true;
       }
    }
}

You'd want to check the distance from him before casting and either move towards him or not do anything. That's not shown, but you can check the CR or the DominusFight plugin for examples of moving towards mobs.

As to where you'd put it, you would want to handle it most likely before the generic skill use logic, so after the logic for Cold Snap, and before the aoe/melee stuff.

You'll have to code in additional logic to not use the skill again if it's usable and you only want to cast it once, and other things like that. That's the general idea behind what you are asking though.

Sorry for the delayed response, but it's greatly appreciated.
 
Back
Top