Anyways, I made a macro to farm Greater Lightstones from Willowisps in Jaggedpine on the EQEmu server I play on (they're essential for progression), but I'm completely new to this and there are a few things I have problems with. I want to try to set it up to check if the character is moving but isn't attacking, and start attacking, but I don't know how to make it check the entire time my character is moving, if that makes sense. It seems to only check once, rather than the whole time. Right now the macro does work, but doesn't do anything if the attack gets turned off. Any help would be greatly appreciated.
This is what I'm trying to use to get it to work
Code: Select all
/if (${Me.Moving} && !${Me.Combat}) {
/attack on
}Code: Select all
Sub Main
|The ancient willowisp is a custom mob on the server that kills pretty much everything.
|This will gate you and end the macro if it's up.
/declare LootSlot int local 1
:beginning
/varset LootSlot 1
/tar ancient
/if (${Target.CleanName.Equal[ancient willowisp]}) {
/stand
/delay 1s
/keypress 0
/goto :end
}
|This part targets a willowisp and sticks to it, or waits a minute and tries again.
|I use /attack on instead of /killthis so that I can keep my MQ2Melee settings the same
|but use casters with this macro, and have the attack stay on.
/tar will
/if (${Target.CleanName.Equal[a willowisp]}) {
/echo Targeting a willowisp.
/stick 5 uw
/attack on
} else {
/delay 60s
/echo No willowisp detected. Pausing 1 minute.
/goto :beginning
}
|This is what I'm having trouble with. I want it to check if I'm moving and not in combat, |and if so, /attack on
/if (${Me.Moving} && !${Me.Combat}) {
/attack on
}
|This section targets the dead willowisp, waits 2 seconds to get next to the body, and |opens the loot window
:attemptLoot
/tar will
/if (${Target.CleanName.Equal[a willowisp's corpse]}) {
/stick 1
/delay 2s
/loot
}
|This checks if the loot window is open, and if not, tries again to open it.
/if (${Window[LootWnd].Open}) {
/goto :looting
} else {
/goto :attemptLoot
}
|This loots the first item, bags it if it's a Greater Lightstone, but destroys it otherwise, |then goes on to the next item til the corpse is empty. Then it exits the window and starts |the macro over.
:looting
/itemnotify Loot${LootSlot} leftmouseup
/delay 1s
/if (${Cursor.Name.Equal[Greater Lightstone]}) {
/autoinv
} else {
/destroy
}
/varcalc LootSlot ${LootSlot}+1
/if (${Corpse.Items}==0) {
/keypress esc
/keypress esc
/keypress esc
/keypress esc
} else {
/goto :looting
}
/delay 3s
/goto :beginning
} else {
/goto :looting
:end
/return
