Hey Scotch,
I did not mean to come across as critical, just my observations trying to figure out what the code was doing.
I couldn't make sense out of the 48% and 84% mana calculations.
Nature's Fury costs 24 mana and 84% of that is approximately 20 mana.
EV costs 50 mana and 48% of that is 24 mana.
I couldn't figure out what the percentages were because I was assuming it was supposed to be the same mana because it would call the same follow up spell. No biggie.
My way I tend to do mana calculations has some calculations at script startup:
1) calculate LMC for equipped items
2) calculate required mana for each level as a group (for example: all spells that use 11 mana are part of a group)
3) assign the mana value for each spell
Now when I go to cast, I decide if I have enough mana to perform the cast by comparing the variable against current #mana.
You mentioned you were using detect hidden because the cast of the summon wasn't working. It looks like it is missing setting #LTARGETKIND - which would be different after casting either Heal or Cure before that.
Sub Cast
While #FOLLOWERS < %MaxFollowers && #MANA > %ManaRequired
{
If C in #CHARSTATUS
gosub Cure
If #HITS < %MaxHits
gosub Heal
event macro 15 %Cast
target 4s
If %CastAttempt < 2
{
set #LTARGETX %LTX
set #LTARGETY %LTY
set #LTARGETZ 2 ; <<<<----- looks like it is missing both setting #LTARGETZ correctly and not setting #LTARGETKIND
}
else
{
set #LTARGETX %TempLTX
set #LTARGETY %TempLTY
set #LTARGETZ %LTZ ; <<<<<------ This is much better, but happens after the initial attempt
set #lTARGETKIND 2 ; <<<<<------ Something like this logic would be needed when %CastAttempt < 2 above
}
event macro 22
wait 1s
set %CastAttempt %CastAttempt + 1
}
set %CastAttempt 1
return
Gaderian