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

Skill.CanUse() not working correctly

buddyfu2

Member
Joined
Aug 18, 2015
Messages
47
Reaction score
2
Skill.CanUse() returns false even when my skill is castable. I'm using the Enlighten gem to reduce the mana cost of my auras from 100% to 97% and Elreons's -8 mana accessory to allow my skill to be castable inside the 3% of mana I have left.
 
Skill.CanUse() returns false even when my skill is castable. I'm using the Enlighten gem to reduce the mana cost of my auras from 100% to 97% and Elreons's -8 mana accessory to allow my skill to be castable inside the 3% of mana I have left.
You are going to have to be more specific by posting the code.
 
It's not my code. It's the OldRoutine that can't cast my skill. I just narrowed down the reason of why it can't cast my skill to the built in method Skill.CanUse().

Using this in the DevTab returns False even tho i have more mana than what is necessary to cast the skill.
Code:
Log.InfoFormat(LokiPoe.InGameState.SkillBarPanel.Slot(3).CanUse().ToString());
 
It's not my code. It's the OldRoutine that can't cast my skill. I just narrowed down the reason of why it can't cast my skill to the built in method Skill.CanUse().

Using this in the DevTab returns False even tho i have more mana than what is necessary to cast the skill.
Code:
Log.InfoFormat(LokiPoe.InGameState.SkillBarPanel.Slot(3).CanUse().ToString());
Ok I think you are using log wrong.
Code:
Log.InfoFormat("{0}", LokiPoe.InGameState.SkillBarPanel.Slot(3).CanUse());

CanUse() returns a bool, there's no need ToString() it.
Try that and see.
 
Hey sorry, it seems we misunderstood each other. My problem is not with displaying the value of a boolean in the console. My problem is that i think that the built in method Skill.CanUse() does not account for Elreon's "-8 to Mana Cost of Skills".

Here's an example of my situation:

My skill requires 24 mana to cast.
Elreon's accessory reduces this mana cost to 16.
I have 20 mana available.

Even if 16 < 20, Skill.CanUse() returns False.

My hypothesis is that Skill.CanUse() does not account for Elreon's "-8 to Mana Cost of Skills". However, I cannot verify that since I do not have access to Pushedx code for the method Skill.CanUse().
 
Hey sorry, it seems we misunderstood each other. My problem is not with displaying the value of a boolean in the console. My problem is that i think that the built in method Skill.CanUse() does not account for Elreon's "-8 to Mana Cost of Skills".

Here's an example of my situation:

My skill requires 24 mana to cast.
Elreon's accessory reduces this mana cost to 16.
I have 20 mana available.

Even if 16 < 20, Skill.CanUse() returns False.

My hypothesis is that Skill.CanUse() does not account for Elreon's "-8 to Mana Cost of Skills". However, I cannot verify that since I do not have access to Pushedx code for the method Skill.CanUse().
Might have to ask Drew about this when he wakes up.
You can also make your own CanUse() Method.
IE var res = LokiPoe.InGameState.SkillBarPanel.UseAt(skill, false, point);
We'll wait for pushedx to reply.
 
Also interested in the outcome of this because i'm aiming for a 0manacost build soon :)
 
Open up the ObjectExplorer -> Equipped Items -> select the ring that has the crafted mod you're talking about -> Save.

Inside the Logs folder you'll find a new file that starts with "ObjectExplorer-", pastebin/gist the contents of this file and send me a PM and I'll take a look at the API data to see if CanCast can be updated to handle it.
 
Back
Top