So, I improved this one a bit. It clears all the spawns in a 220 unit radius of your camp. I suggest Circular rooms (400+ units, check using map) or wide open areas. Enjoy!
This is a beta release, so notify me of any bugs.
***MQ2MoveUtils, MQ2Exchange, and MQ2Cast MUST BE LOADED.
This is a beta release, so notify me of any bugs.
***MQ2MoveUtils, MQ2Exchange, and MQ2Cast MUST BE LOADED.
Rich (BB code):
|****Monkcamp.mac****|
|****by Noobhaxor****|
|-REQUIRED PLUGINS: MQ2Exchange, MQ2MoveUtils and MQ2Cast
#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!#*#"
#include spell_routines.inc
Sub Main
|--------------------------------------------------------------------------------
|Configure Values Below
|--------------------------------------------------------------------------------
/declare monkage int outer 1 |--Change to 1 for combat abilities / Clickies (monks only)
/declare dolootz int outer 1 |--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"
|------------------------------------------------------------
|Declare Safe Players.
|------------------------------------------------------------
/declare HealerName string outer NameofShammy
/alert add 2 pc ${HealerName}
/alert add 2 pc ${Me}
|--------------------------------------------------------------------------------
|DO NOT MODIFY ANY OF THESE VALUES
|--------------------------------------------------------------------------------
/declare StickFighting int outer 0
|--------------------------------------------------------------------------------
|MAIN LOOP: Out of Combat actions
|--------------------------------------------------------------------------------
/makecamp on radius 20 mindelay 100000 maxdelay 200000
:abilwatch
/if (${StickFighting}==1) /varset StickFighting 0
|AQUIRE
/if (${NearestSpawn[NPC].Distance} < 220) {
/target npc radius 220
} else {
/delay 5s
}
/if (${Target.ID}) {
:Aquire
/stick 13
/if (${Target.Distance} > 20) {
/delay 1s
/if (${NearestSpawn[NPC].Distance} < 40) /target ${NearestSpawn[NPC]}
/goto :Aquire
} else {
/call Combat
}
}
/if (${Me.PctHPs} < 20) /call FDend
/call playercheck
/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 (${StickFighting}==0) {
/varset StickFighting 1
/stick 13
}
/if (${monkage}==1) /call Monkabil
|---------Run at end of fight---------------|
/if (${Target.Type.Equal[corpse]}) /keypress esc
/if (!${Target.ID}) {
/varset StickFighting 0
/delay 20
/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} > 10) {
/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
/if (!${Me.Aura[Master's Aura].ID}) /casting "Master's Aura"
/target corpse radius 200
/if (${Target.Type.Equal[corpse]}) /goto :lootstart
/makecamp return
/delay 10s
/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["Defer Death Rk. III"]}) && (${Me.PctHPs} < 40)) /doability "Defer Death Rk. III"
/if ((${Me.CombatAbilityReady["Clawstriker's Flurry"]}) && (${Target.Distance}<18) && (${Me.Endurance}>500)) /doability "Calanin's Synergy 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
|--------------------------------------------------------------------------------
|SUB: Feign Death Reset (Something went terribly wrong)
|--------------------------------------------------------------------------------
Sub FDreset
/doability "Feign Death"
/delay 5m
/stand
/echo Event Reset
/end
/return
|--------------------------------------------------------------------------------
|Event Triggers
|--------------------------------------------------------------------------------
Sub Event_Stunned
/delay 1s
/return
|--------------------------------------------------------------------------------
|SUB: Playercheck
|--------------------------------------------------------------------------------
Sub playercheck
/if (${Spawn[pc noalert 2 radius 300].ID}) {
/echo Player Near hold pattern
:playerhold
/doability "Feign Death"
/afk Be back later
/if (!${Spawn[pc noalert 2 radius 300].ID}) {
/stand
/afk
/return
}
/goto :playerhold
}
/return
Last edited:

