This is a very basic macro for those that are semi-afk. This is an assistant, and when you hit attack it auto sticks and does your abilities for you. I also built in a auto-FD function both in and out of combat. So you can jump up right in the middle of combat and come back whenever. MQ2Moveutils, MQ2Cast, and MQ2Exchange MUST BE LOADED!!!
Rich (BB code):
|******Monk.mac v1.5*******|
|-Basic Macro to stick to target on attack and do 2 basic abilities.
|=======1.1 Update=====
|-Error trap Added for Stick at start of fight
|-Added Monk Epic weapon cast when no haste potion used
|=======1.2 Update=====
|Fixed logical error and broke combat into diffrent sub-routine
|=======1.3 Update=====
|Added Event State to prevent spamming screen when casting skill
|=======1.4 Update=====
|Added error trap because sometimes epic swap for haste gets bugged
|Added Feign Death on low HPs both in combat and out
|=======1.5 Update=====
|Added Line of Sight Checks when targeting
|Fixed bug when you loot sometimes you would get "stuck"
|Stick is ALWAYS on, no more breaking from key presses.
|--------------------------|
|WARNING: MQ2MOVEUTILS MUST BE LOADED!!!!!!!
#event Stunned "You are too distracted to use a skill.#*#"
#event Stunned "You are stunned#*#"
#event Stunned "You can't cast spells while stunned!#*#"
#event Stunned "You can't attack while stunned!#*#"
#event Stunned "You cannot use a skill while stunned!#*#"
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#"
Sub Main
|--------------------------------------------------------------------------------
|Configure Values Below
|--------------------------------------------------------------------------------
/declare monkage int outer 1 |--Change to 1 for combat abilities / Clickies (monks only)
/declare dolootz int outer 0 |--Change to 1 to have macro loot items
/declare usearray int outer 1 |--Change to 1 to use loot array
/declare RV_LootArray[19] string outer
/varset RV_LootArray[1] "Ancient"
/varset RV_LootArray[2] "Tongue"
/varset RV_LootArray[3] "Emerald"
/varset RV_LootArray[4] "Diamond"
/varset RV_LootArray[5] "Stonewarden"
/varset RV_LootArray[6] "Blackflame"
/varset RV_LootArray[7] "Sapphire"
/varset RV_LootArray[8] "Jacinth"
/varset RV_LootArray[9] "Glowgem"
/varset RV_LootArray[10] "Glob"
/varset RV_LootArray[11] "Geode"
/varset RV_LootArray[12] "Starlight"
/varset RV_LootArray[13] "Pearlescent"
/varset RV_LootArray[14] "Junk"
/varset RV_LootArray[15] "Scale"
/varset RV_LootArray[16] "Purity"
/varset RV_LootArray[17] "Spell"
/varset RV_LootArray[18] "Star Ruby"
/varset RV_LootArray[19] "Sparkling"
|--------------------------------------------------------------------------------
|MAIN LOOP: Out of Combat actions
|--------------------------------------------------------------------------------
:abilwatch
/if ((${NearestSpawn[NPC LoS].Distance} < 40) && (${NearestSpawn[NPC LoS].ID})) {
/target ${NearestSpawn[NPC LoS]}
/attack on
}
/if (${Me.Combat}) /call Combat
/if (${Me.PctHPs} < 15) /call FDend
/goto :abilwatch
/return
|--------------------------------------------------------------------------------
|SUB: Combat Start Attack / End Fight
|--------------------------------------------------------------------------------
Sub Combat
:combatstart
/if (${Target.ID} && !${Me.Combat}) /attack on
/doevents
/if (${Me.PctHPs} < 15) /call FDend
/if (${Stick.Status.NotEqual[ON]}) {
/stick 10 moveback
}
/if (${monkage}==1) /call Monkabil
|---------Run at end of fight---------------|
/if (${Target.Type.Equal[corpse]}) /keypress esc
/if (!${Target.ID}) {
/keypress back
/delay 20
/if ((${NearestSpawn[NPC LoS].Distance} < 40) && (${NearestSpawn[NPC LoS].ID})) {
/target ${NearestSpawn[NPC LoS]}
/attack on
/goto :combatstart
}
/attack off
/if (${dolootz}==1) /call Loot
/return
}
/goto :combatstart
/return
|--------------------------------------------------------------------------------
|SUB: Loot w/ Array
|--------------------------------------------------------------------------------
Sub Loot
/declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
:lootstart
/target corpse radius 220
/stick 5 hold
:Moveto
/if (${Target.Distance} > 5) {
/delay 1s
/goto :Moveto
}
/stick off
/loot
/delay 1s
/keypress forward
/keypress back
/fastdrop on
/lootn never
/delay 1s
/loot
/delay 1s
/if (!${Corpse.Items}) /goto :endofloot
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/nomodkey /shiftkey /itemnotify loot${LootSlot} leftmouseup
/delay 2s
|-------------------
|--Array Usage------
|-------------------
/if (${usearray}==1) {
/for LootCheck 1 to ${RV_LootArray.Size}
/if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 1s
}
/next LootCheck
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/delay 1s
}
/next LootSlot
} else {
/autoinventory
/next LootSlot
}
|------End Array
:endofloot
/notify LootWnd DoneButton leftmouseup
/delay 1s
/target corpse radius 200
/if (${Target.Type.Equal[corpse]}) /goto :lootstart
/return
|--------------------------------------------------------------------------------
|SUB: Monk Abilities (Epic Click, Mend, Flying Kick, Specials)
|--------------------------------------------------------------------------------
Sub Monkabil
|---------Abilities-------------------------|
/if ((${Me.AbilityReady["Flying Kick"]}) && (${Target.Distance}<18) && (${Me.Endurance}>500)) /doability "Flying Kick"
/if ((${Me.AbilityReady["Mend"]}) && (${Me.PctHPs} < 50)) /doability "Mend"
/if ((${Me.CombatAbilityReady["Clawstriker's Flurry"]}) && (${Target.Distance}<18) && (${Me.Endurance}>500)) /doability "Calanin's Synergy Rk. III"
/if ((${Me.CombatAbilityReady["Defer Death Rk. III"]}) && (${Me.PctHPs} < 45)) /doability "Defer Death Rk. III"
|---------Instant Casts Check---------------|
/if (!${Me.Buff[Celestial Tranquility].ID} && ${Spell[Celestial Tranquility].Stacks} && ${Me.FreeBuffSlots}>=1 && ${Me.State.Equal[STAND]}) {
/casting "Celestial Fists" hands
/return
}
/if (${Cast.Ready[Transcended Fistwraps of Immortality]}) {
/casting "Transcended Fistwraps of Immortality" item
/delay 1s
}
/return
|--------------------------------------------------------------------------------
|SUB: Feign Death (Something went terribly wrong)
|--------------------------------------------------------------------------------
Sub FDend
/doability "Feign Death"
/echo LOW HP!!!! ENDING MACRO
/end
/return
|--------------------------------------------------------------------------------
|Event Triggers
|--------------------------------------------------------------------------------
Sub Event_Stunned
/delay 1s
/return
Last edited:

