Problem in Inquisitor.iss

bob_the_builder

Well-Known Member
Inquisitor seems to use more mana then needed. So I debugged using 'eq2execute /p Casting xxx'
I found that during cures the bot casts a heal also regardless of health.

Having issue with this function:

Code:
function CureGroupMember(int gMember)
{
	declare tmpcure int local

	tmpcure:Set[0]

	do
	{
		call CheckGroupHealth 30
		if !${Return}
		{
			eq2execute /p Casting ${SpellType[10]}
			call CastSpellRange 10
		}
		;if ${Me.Group[${gMember}].Health}<50 && ${Me.Group[${gMember}].Health}>-99
		;{
		;	eq2execute /p Casting ${SpellType[4]} while trying to cure
		;	call CastSpellRange 4 0 0 0 ${Me.Group[${gMember}].ID}
		;}
		if  ${Me.Group[${gMember}].Arcane}>0
		{
			call CastSpellRange 326
			wait 5
				if  ${Me.Group[${gMember}].Arcane}>0
				{
					eq2execute /p Casting ${SpellType[210]}
					call CastSpellRange 210 0 0 0 ${Me.Group[${gMember}].ID}
				}
		}

		if  ${Me.Group[${gMember}].Noxious}>0
		{
			call CastSpellRange 213 0 0 0 ${Me.Group[${gMember}].ID}
		}

		if  ${Me.Group[${gMember}].Elemental}>0
		{
			call CastSpellRange 211 0 0 0 ${Me.Group[${gMember}].ID}
		}

		if  ${Me.Group[${gMember}].Trauma}>0
		{
      eq2execute /p Casting ${SpellType[212]}
			call CastSpellRange 212 0 0 0 ${Me.Group[${gMember}].ID}
		}
	}
	while ${Me.Group[${gMember}].IsAfflicted} && ${CureMode} && ${tmpcure:Inc}<3 && ${Me.Group[${gMember}].ToActor(exists)}
}
The problem seems to be were my ';' comments are:

Code:
		;if ${Me.Group[${gMember}].Health}<50 && ${Me.Group[${gMember}].Health}>-99
		;{
		;	eq2execute /p Casting ${SpellType[4]} while trying to cure
		;	call CastSpellRange 4 0 0 0 ${Me.Group[${gMember}].ID}
		;}
It reports ${Me.Group[${gMember}].Health} as being < 50 ... From what I can tell it reports as NULL.

Anyone able to confirm that ${Me.Group[${gMember}].Health} works or if I am seeing something else in the script.

ty in adv.

Bob
 
Last edited:

bob_the_builder

Well-Known Member
While eq2bot is running i type:

echo ${Me.Group[${gMember}].Health}
echo ${Me.Group[${gMember}].ToActor.Health}
echo ${Me.Group[${2}].Health}
echo ${Me.Group[${2}].ToActor.Health}

I recieve a NULL for each of these


Bob
 
Last edited:

LostOne

Well-Known Member
Don't you need a ToActor in there?

${Me.Group[${gMember}].ToActor.Health}

I think that's the way I've always done it... and if you want to test in the console just replace ${gMember} with a number 1-5 for the groupmember you want to test on.

LostOne
 
Top Bottom