Quick Question

Hello,
I just want to start out by saying that I've been using ISXEQ2 and Innerspace for several years now and haven't really got into the scripting side of things. Whenever the Beastlord came out I took it upon myself to start scripting an add-on to the EQ2Bot for the Beastlord but, I've ran into a problem.

Is there a way to determine if a certain ability is active within the Effects window?

I'm thinking there is because you can see what's in the "Maintained Window" and if the following is incorrect could someone push me towards the right direction.

Code:
if ${Me.Effects[${SpellType[Weakness]}]}(exists)
 

Kannkor

Ogre
Hello,
I just want to start out by saying that I've been using ISXEQ2 and Innerspace for several years now and haven't really got into the scripting side of things. Whenever the Beastlord came out I took it upon myself to start scripting an add-on to the EQ2Bot for the Beastlord but, I've ran into a problem.

Is there a way to determine if a certain ability is active within the Effects window?

I'm thinking there is because you can see what's in the "Maintained Window" and if the following is incorrect could someone push me towards the right direction.

Code:
if ${Me.Effects[${SpellType[Weakness]}]}(exists)
Be warned, names are not available to the client without making a request to the server (this is true for effects and detrimental effects). So do not put it in any kind of loop without an early exit timer.
If done incorrectly, and ran on 3+ toons in the same zone, you can lag the entire zone (and you'd show up if anyone checked the server logs usage).

One easy way to see if something is not available to the client, echo the value you are trying to obtain, if it's NULL, wait 3 seconds and do it again, if it now returns a value, that means it had to ask the server for the information.
 
Be warned, names are not available to the client without making a request to the server (this is true for effects and detrimental effects). So do not put it in any kind of loop without an early exit timer.
If done incorrectly, and ran on 3+ toons in the same zone, you can lag the entire zone (and you'd show up if anyone checked the server logs usage).

One easy way to see if something is not available to the client, echo the value you are trying to obtain, if it's NULL, wait 3 seconds and do it again, if it now returns a value, that means it had to ask the server for the information.
Thank you for the tip Kannkor.

I was just going to have it check once within the combat routine to see if "Weakness" is active and if it was it would cast a buff, if not it would move on.
 

Kannkor

Ogre
Thank you for the tip Kannkor.

I was just going to have it check once within the combat routine to see if "Weakness" is active and if it was it would cast a buff, if not it would move on.
Right, keep in mind how fast it can go through the combat routine if nothing is available. If you want to start, add an echo with ${Time} in there so you can see how often it is running.
 
Right, keep in mind how fast it can go through the combat routine if nothing is available. If you want to start, add an echo with ${Time} in there so you can see how often it is running.
Okay, thank you again.

Right now I am setting it up to level the pets up to grandmaster via the quickest way, which uses the Spiritual Stance. I have about 1/10th of it written and once I get it done I'll post it so people can look over it and see if there is a flaw before I actually test it. (I know you guys will be able to look over something and see if something is flawed after many years of experience.)
 

Amadeus

The Maestro
Staff member
Also, it's "Me.Effect" not "Me.Effects"

Additionally, the (exists) goes before the final bracket. For example:
Code:
if ${Me.Effect[${SpellType[Weakness]}](exists)}
I believe that the whole weaknesses thing for beastlords is something that needs to be added to ISXEQ2 (to avoid the issue that Kannkor describes.) I told Pygar to make a feature request for something, and I think this might have been it (you'll have to ask him.)
 
Also, it's "Me.Effect" not "Me.Effects"

Additionally, the (exists) goes before the final bracket. For example:
Code:
if ${Me.Effect[${SpellType[Weakness]}](exists)}
I believe that the whole weaknesses thing for beastlords is something that needs to be added to ISXEQ2 (to avoid the issue that Kannkor describes.) I told Pygar to make a feature request for something, and I think this might have been it (you'll have to ask him.)
Thank you Amadeus for the tips. I have since found the bracket issue out.

I've gotten most of the "Pet Leveling" code completed and will be showing it off soon, very soon.
 

Kannkor

Ogre
Also, it's "Me.Effect" not "Me.Effects"

Additionally, the (exists) goes before the final bracket. For example:
Code:
if ${Me.Effect[${SpellType[Weakness]}](exists)}
I believe that the whole weaknesses thing for beastlords is something that needs to be added to ISXEQ2 (to avoid the issue that Kannkor describes.) I told Pygar to make a feature request for something, and I think this might have been it (you'll have to ask him.)
I did Weakness by doing an IsReady check, and a check to make sure you haven't casted a weakness recently. It's no different than a stealth ability, it's "grayed" out until a certain condition is met.
 
A new issue has risen to the surface. Currently I am having issues with several of my combat art castings. I've looked over the other .iss routines but, I can't seem to figure out the issue that I'm having.

Code:
function Post_Combat_Routine(int xAction)
{
	echo Entered Post Combat ${Time}.
	
	; Checks to see if Frigid Fortification is ready.
	if !${Me.Maintained[${SpellType[702]}](exists)} && ${Me.Ability[${SpellType[702]}].IsReady}
	{
		echo Casting Frigid Fortification @ ${Time}
		; Casts Frigid Fortification.
		call CastSpellRange 702
	}
		
	; Checks to see if Chillbarrier is ready.
	if ${Me.Ability[${SpellType[706]}].IsReady} && !${Me.Maintained[${SpellType[706]}](exists)}
	{
		echo Casting Chillbarrier @ ${Time}
		; Casts Chillbarrier.
		call CastSpellRange 706
	}
	
	switch $(PostAction[${xAction]}}
	{
		Default
			return Post Combat Routine Complete
			break
	}
}
This portion of the code is suppose to cast "Frigid Fortification" and "Chillbarrier" as soon as combat is over so we maximize the effectiveness of the affinity system but, they are not getting called. In fact none of my combat arts are getting called, they are exactly like these. Any suggestions or nudges in the right direction would be wonderful.
 
I did Weakness by doing an IsReady check, and a check to make sure you haven't casted a weakness recently. It's no different than a stealth ability, it's "grayed" out until a certain condition is met.
Kannkor, that is exactly what I decided to do after reading your post. Currently having a little issue with casting combat arts though. A small side effect of not knowing enough scripting I guess. Anyway here is the current "Post Combat Routine" I'm using, any advice on how to get it to work correctly?

Code:
function Post_Combat_Routine(int xAction)
{
	echo Entered Post Combat ${Time}.
	
	; Checks to see if Frigid Fortification is ready.
	if !${Me.Maintained[${SpellType[702]}](exists)} && ${Me.Ability[${SpellType[702]}].IsReady}
	{
		echo Casting Frigid Fortification @ ${Time}
		; Casts Frigid Fortification.
		call CastSpellRange 702
	}
		
	; Checks to see if Chillbarrier is ready.
	if ${Me.Ability[${SpellType[706]}].IsReady} && !${Me.Maintained[${SpellType[706]}](exists)}
	{
		echo Casting Chillbarrier @ ${Time}
		; Casts Chillbarrier.
		call CastSpellRange 706
	}
	
	switch $(PostAction[${xAction]}}
	{
		Default
			return Post Combat Routine Complete
			break
	}
}
 
Top Bottom