Does that apply to > and < also? Or just = ?blueninja wrote:Comparison uses 2 = instead of one.. It should be /if (${Players}==0) {
Moderator: MacroQuest Developers


From TFM:Clueless_Coder wrote:Does that apply to > and < also? Or just = ?blueninja wrote:Comparison uses 2 = instead of one.. It should be /if (${Players}==0) {
Logical Operators
==
Equal to
!=
Not equal to
>
Greater than
<
Less than
>=
Greater than or equal to
<=
Less than or equal to
&&
AND
| |
OR
!
NOT

or similar statement./if (${Players}==0) {

My Sub HealcheckTank is as follows:#1 does your Sub HealcheckTank look like this?
Code:
Sub HealcheckTank
/if (${Target.PctHPs}<65)&&(${Target.Distance}<120) {
/call Cast "Supernal Light"
}
/return
Code: Select all
Sub HealcheckTank
/if (${Target.PctHPs}<65)&&(${Target.Distance}<120) {
/call Cast "Holy Light"
}
/returnYes, I did. I created the file with the code posted in the Snippets forum and placed it in the Macros folder.Also have you made your spell_routines.inc?
Text returned:/macro aeheal 10
That loop was repeated non stop until a target came within radius. At which point I received the following:[MQ2] AEHeal Macro Activated!
[MQ2] 10 will be targeted and healed. Every 10 players targeted per second will be calculated!
There are no spawns matching: (0-100) any xxxxxxx
There are no spawns matching: (0-100) pc Radius 240.00
[MQ2] Players per second 30.25
My AEHEal.mac code is as follows:Failed to parse /if command. Could not find command to execute.
aeheal.mac@76 (Healcheck Tank): /if (${Target PctHPs}<65)&&(${Target Distance}<120) {
aeheal.mac@62 (Class Check): /if (${TankListFind[|${Target Class}|]}) /call Healcheck Tank
aeheal.mac@48 (Main): /call Class Check
The current macro has ended
Usage: /if (<condition>) <command>
Code: Select all
| Version 1.1
| AE AutoHeal
| Usage /macro AEHeal <Number of players to check for>
| Example: /macro AEHeal 40
| Will check the closest 40 people to the cleric and heal them apropriately.
| Macro will automatically calculate and echo the number of players check per second, every cycle.
| Looking at the ground (Increasing frame rate) seems to increase number of targets per second drastically.
|
|Known Issues:
| Not healing Shadow Knights at this time.
|
#include spell_routines.inc
Sub Main
/echo AEHeal Macro Activated!
/declare PlayersTarg int outer
/declare Targets int outer
/declare Players int outer
/declare CasterList string outer
/declare TankList string outer
/varset Targets 1
/varset TankList |Warrior|Shadow Knight|Paladin|
/varset CasterList |Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard|Shaman|Beastlord|Berserker|Ranger|
:verify
/if (!${Defined[Param0]}) {
/echo You must specify the number of players near you first!
/end
} else {
/varset PlayersTarg ${Param0}
/echo ${PlayersTarg} will be targeted and healed. Every ${PlayersTarg} players targeted per second will be calculated!
:start
/varset Players ${PlayersTarg}
/target Xxxxx
/call ClassCheck
| /echo ${Targets}
/if (${Macro.RunTime}>0) {
/echo Players per second! ${Math.Calc[${Targets}/${Macro.RunTime}]}
}
:TargetCycle
/varcalc Players ${Players}-1
/target PC radius 240 Next
/call ClassCheck
/if (${Players}<1) {
/varcalc Targets ${Targets}+${PlayersTarg}
/goto :start
} else {
/goto :TargetCycle
}
/return
Sub ClassCheck
/if (${CasterList.Find[|${Target.Class}|]}) /call HealcheckCaster
/if (${TankList.Find[|${Target.Class}|]}) /call HealcheckTank
/return
Sub HealcheckCaster
/if (${Target.PctHPs}<79) {
/call Cast "Supernal Remedy"
}
/return
Sub HealcheckTank
/if (${Target.PctHPs}<65)&&(${Target.Distance}<120) {
/call Cast "Holy Light"
}
/returnCode: Select all
| Version 1.2
| AE AutoHeal
| Usage /macro AEHeal <Number of players to check for>
| Example: /macro AEHeal 40
| Will check the closest 40 people to the cleric and heal them apropriately.
| Macro will automatically calculate and echo the number of players check per second, every cycle.
| Looking at the ground (Increasing frame rate) seems to increase number of targets per second drastically.
|
|Known Issues:
| Not healing Shadow Knights at this time.
|
#include spell_routines.inc
Sub Main
/echo AEHeal Macro Activated!
/declare PlayersTarg int outer
/declare Targets int outer
/declare Players int outer
/declare CasterList string outer
/declare TankList string outer
/varset Targets 1
/varset TankList |Warrior|Shadow Knight|Paladin|
/varset CasterList |Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard|Shaman|Beastlord|Berserker|Ranger|
:verify
/if (!${Defined[Param0]}) {
/echo You must specify the number of players near you first!
/end
} else {
/varset PlayersTarg ${Param0}
/echo ${PlayersTarg} will be targeted and healed. Every ${PlayersTarg} players targeted per second will be calculated!
:start
/varset Players ${PlayersTarg}
/target ${Me}
/call ClassCheck
| /echo ${Targets}
/if (${Macro.RunTime}>0) {
/echo Players per second! ${Math.Calc[${Targets}/${Macro.RunTime}]}
}
:TargetCycle
/varcalc Players ${Players}-1
/target PC radius 240 Next
/call ClassCheck
/if (${Players}<1) {
/varcalc Targets ${Targets}+${PlayersTarg}
/goto :start
} else {
/goto :TargetCycle
}
/return
Sub ClassCheck
/if (${CasterList.Find[|${Target.Class}|]}) /call HealcheckCaster
/if (${TankList.Find[|${Target.Class}|]}) /call HealcheckTank
/return
Sub HealcheckCaster
/if (${Target.PctHPs}<79) {
/call Cast "Supernal Remedy"
}
/return
Sub HealcheckTank
/if (${Target.PctHPs}<65)&&(${Target.Distance}<120) {
/call Cast "Holy Light"
}
/returnCode: Select all
Sub HealcheckTank
/if (${Target.PctHPs}<65) {
/call Cast "Holy Light"
}
/return Code: Select all
Sub HealcheckTank
/if (${Target.PctHPs}<65 && ${Target.Distance}<120) {
/call Cast "Holy Light"
}
/return
Ok.. I see what's happening now. The light bulb went on last night finally.Neolesh wrote:Ok, I figured out why the distance check wasn't working. Here's your new HealcheckTank Sub
...
The formating was bad. Let me know this works for you.
Code: Select all
/declare PCsInRange int outer
/declare index int outer Code: Select all
/varset PCsInRange ${SpawnCount[pc radius 200]}
/for index ${PCsInRange} downto 0
Code: Select all
#include Spell_Routines.inc
#include feedme.inc
#CHAT tell
Sub Main
/echo AEHeal Macro Activated!
/declare PCsInRange int outer
/declare index int outer
:start
/target myself
:HealCycle
/varset PCsInRange ${SpawnCount[pc radius 200]}
/for index ${PCsInRange} downto 0
/target id ${NearestSpawn[${index}, pc radius 200].ID}
/delay 1
/if (${Target.PctHPs}<70) /call Cast "Nature's Infusion" spell 2s CheckHP
/next index
/call FeedMe
/goto :HealCycle
/return
Sub CheckHP
/if ( ${Target.PctHPs}>=90 && !${Me.Mount.ID} ) /call Interrupt
/returnYou should probably at least check if they've FDed in range of you and break off the heal. Maybe just add !${Target.Feigned} to the CheckHP sub? Then again, this might render you suddenly unable to heal anybody vs a mob with an FD attack.It might not be a bad idea to leave monks off the list by readding the declares, but in my guild our monks do their splitting well outside of my heal radius anyway.