Issue with Me.Ability for Bruiser Spell "Impenetrable Will"

mistahmikey

Active Member
For the subject spell, I am getting incorrect results for the "IsReady" and "TimeUntilReady" members.

I am first retrieving the Ability ID for the spell, then subsequently using:

${Me.Ability[id,${SpellID}].IsReady}

which always returns TRUE or

${Me.Ability[id,${SpellID}].TimeUntilReady}

which always returns 0

I am however able to actually cast the spell - the problem is I am trying to use the above information to avoid the cast if the spell isn't actually ready to be cast, but its always passing the test even when it is not really ready.

I am using the same technique to cast a variety of others spells, and they are working as expected.

The problem also occurs if I use the spell name instead of the spell id. I read the update notes and noticed the addition of the spell name cache, so I also tried calling ISXEQ2:ClearAbilitiesCache, but it made no difference.

Any idea why this might be happening?
 
Last edited:

Kannkor

Ogre
For the subject spell, I am getting incorrect results for the "IsReady" and "TimeUntilReady" members.

I am first retrieving the Ability ID for the spell, then subsequently using:

${Me.Ability[id,${SpellID}].IsReady}

which always returns TRUE or

${Me.Ability[id,${SpellID}].TimeUntilReady}

which always returns 0

I am however able to actually cast the spell - the problem is I am trying to use the above information to avoid the cast if the spell isn't actually ready to be cast, but its always passing the test even when it is not really ready.

I am using the same technique to cast a variety of others spells, and they are working as expected.

The problem also occurs if I use the spell name instead of the spell id. I read the update notes and noticed the addition of the spell name cache, so I also tried calling ISXEQ2:ClearAbilitiesCache, but it made no difference.

Any idea why this might be happening?
That's exactly what I use. I suspect your ${SpellID} is probably not what you think it is. Add some debugging to find out what the actual value of that is.

Edit: Apparently I failed at reading the subject line... I can't say I've tested that exact ability...
I'm guessing there are two abilities with that name. And the one you checking, is always available.
 

Amadeus

The Maestro
Staff member
I am first retrieving the Ability ID for the spell, then subsequently using:

${Me.Ability[id,${SpellID}].IsReady}

which always returns TRUE or

${Me.Ability[id,${SpellID}].TimeUntilReady}
So, when you do Me.Ability:Use[${SpellID}] (the same SpellID that you used above), it actually casts the spell in which you're interested?
 

mistahmikey

Active Member
So, when you do Me.Ability:Use[${SpellID}] (the same SpellID that you used above), it actually casts the spell in which you're interested?
I retrieve the Spell ID for Impenetrable Will using the following:

Me.Ability["Impenetrable Will"].ID

The value is 2380073790.

I am using Ogrebot. My script works in parallel with it (I am trying to manage the bruiser's use of avoidance buffs a bit more intelligently than can be done using Ogre's "Priority" tab, which I disable), so to synchronize with Ogre's casting of all other bruiser spells, I use the following:

relay all OgreBotAtom a_CastFromUplink ${Me.Name} "Impenetrable Will" TRUE

When I do this, the behavior I described previously occurs.

Now, if I do the following instead (which I am assuming what Amadeus wanted me to do, because Me.Ability:Use[${SpellID}] does nothing)

Me.Ability[id,2380073790]:Use

Now, a problem still exists with the same spell, but its different. Instead of the spell reporting that it is never ready, it now counts down its TimeUntilReady in a way that is unrelated to the actual spell's readiness as reported by EQ2's Combat Arts window. Here is what I am seeing.

My script casts the spell, which, according to the CA Window, has a recast time of 97 seconds. The Maintained effects window shows "Impenetrable Will" is up. Ability.TimeUntilReady starts to count down from 193 seconds (rather than 97 seconds). However, in the CA window, "Impenetrable Will" shows as being immediately available to cast again, even though it should be counting down from 97 seconds.

Now, when Ability.TimeUntilReady becomes zero, Ability.IsReady becomes TRUE and the script casts the spell again, and the result is the same as I described in the preceding paragraph. However, since the CA window shows the spell is ready, I can actually cast the spell again manually from the window, even though it really should not be available to cast. After the manual cast, it shows up in Maintained effects, and now the CA window shows the spell is not ready and begins to count down from 97 seconds. In the meantime, my script is still steadily showing it is counting down from the original 193 second value - my manual cast did not cause any change to the Ability.TimeUntilReady value.

So, I thought - wow, if when the script casts the spell, EQ2 still thinks the spell is available, then maybe I can cast it from the script whenever its effect drops, thereby making my bruiser virtually invulnerable to physical attacks! But, sadly, the script will not cast the spell again until Ability.TimeUntilReady becomes 0, even though I can cast it manually from the CA window. Bummer.

Curiouser and curiouser. So perhaps something is bugged in EQ2 with this spell? This sure is some strange behavior.

I should also add that I have written a virtually identical script for a Monk, and it works flawlessly.
 

mistahmikey

Active Member
Some more info.

I decided to take a look at Kannkor's ogre spell command results to compare the ID he was getting for this spell to mine; low and behold, it was different. So I used his ID instead of mine, and his ID worked.

But here's the thing. I also looked at the code he uses to generate the abilities file, and what I am doing to get the ID is EXACTLY the same as what he is doing. In fact, in my code, I grab 6 other Spell IDs using the same function call, and those IDs all match what Kannkor gets. So I am quite confused. Somehow, in my space, it appears the ISXeq2 abilities container responds with a different ID when indexed by "Impenetrable Will" than does Kannkor's "ogre spell" command.

In any case, I switched to using Lavishsettings to get my IDs from Kannkor's abililites file rather than ISXEq2, so I am good now. But I sure would like to know why this might be happening if anyone has an idea.
 
Top Bottom