Moderator: MacroQuest Developers


In the first post it explains what it does.missingfiles wrote:Macros keeps sitting and stops targeting mobs after a little while and when it does get close to a mob sometimes it gets to close causing the screen to jump around. Also attack is pressed over and over again spamming one of my windows. Anyone have any ideas on how to fix this?
Thanks
Code: Select all
This macro will use autoattack and will spam hotkey 1, which I set to be Bash. It could be easily modded to use spells or other skills. 

Code: Select all
Sub Looting
/declare x int local
/target corpse radius 15
/delay 2
/face fast
/delay 1
/loot
/delay 1s
/notify LootWnd LootAllButton leftmouseup
/nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 5s
/notify LootWnd DoneButton leftmouseup
/target clear
/look
/return

Code: Select all
Sub Looting
/declare x int local
/target corpse radius 15
/delay 1
/face fast
/loot
/delay 1s
/for x 1 to 6
/itemnotify loot${x} leftmouseup
| /if !(${Cursor.ID}) /goto :EndLoot
/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
/nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 1s
/if (!${Ini[forage.ini,ForageList,${Cursor.Name}].Length}) {
/ini "Forage.ini" "ForageList" "${Cursor.Name}" "-1"
} else {
/if (${Ini[forage.ini,ForageList,${Cursor.Name}]}) {
/if (${FindItemCount["=${Cursor.Name}"]}>=${Ini[forage.ini,ForageList,${Cursor.Name}]} && ${Ini[forage.ini,ForageList,${Cursor.Name}]}!=-1) /goto :Destroy
} else {
:Destroy
/echo Destroying ${Cursor.Name}
/destroy
/next x
}
}
:LootIt
/echo Keeping ${Cursor.Name}
/autoinventory
/if (${Cursor.ID}) /goto :LootIt
}
/next x
:EndLoot
/delay 1s
/notify LootWnd DoneButton leftmouseup
/target clear
/look
/return
Code: Select all
/declare loottotal int local
:lootlag
/varset loottotal ${Corpse.Items}
/delay 1s ${loottotal}!=${Corpse.Items}
/if (${loottotal}!=${Corpse.Items}) /goto :lootlag
/for i 1 to ${loottotal}
do stuff
next i

Code: Select all
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| DPS Pet Caster - Farming and Looting
|
| Set the Pet Caster running this macro as the Group MA
|
| Bind the following:
| /pet attack to Hotkey 3
| A light DPS spell rotation to hotkey 2 that starts with a /gsay Attack << %t >>
| A burn rotation to hotkey 4 ** Not implemented - need more target.hlth checking**
| The /sit command to Hotkey 9
|
| This macro has 3 startup parameters:
| P1 - partial name match of mob1
| P2 - partial name match of mob2
| P3 - search radius for mobs (think in terms of feet on a scale basis)
|
| Example startup: /macro dpsmaster diamondback wolf 150
| The above startup will actively scan a 150 foot radius around the char based on
| whatever your current location is and attack anything that has a partial name
| match for 'diamondback' or 'wolf'. Example: Diamondback Snake and Alpha Wolf.
|
| This macro will loot the nearest corpse to the player that has a partial name match
| to the currently active target name, approach it and loot all items unless limits or
| zeros are set in the forage.ini file.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#event Looting "#.# gain party #*#"
#event Farm_talk "#*#tells you#*#"
Sub Main
/declare targ1 string outer ${Param0}
/declare targ2 string outer ${Param1}
/declare dist int outer ${Param2}
/declare ready int outer 0
/declare fighting int outer 0
/declare mob string outer
/declare i int local
/varset mob ${targ1}
:startpoint
/echo "About to check Events"
/doevents
/varset fighting 0
/varset ready 0
/if (${Me.PctMana}<41) {
/call medbreak
}
/if (${Target.Name.Equal[${Me.Name}]}) {
/delay 100
/goto :startpoint
}
/echo "about to aquire a new target!"
/squelch /target npc radius ${dist} zradius 50 ${mob}
/if (!${Target.ID}) {
/echo Changing to alternate target
/varset mob ${targ1}
/squelch /target npc radius ${dist} zradius 50 ${mob}
/if (!${Target.ID}) {
/echo Changing to alternate target
/varset mob ${targ2}
/squelch /target npc radius ${dist} zradius 50 ${mob}
}
}
/if (!${Target.ID}) /delay 10s
/echo "No Target in Startpoint function"
/if (${Target.ID} && ${Me.PctMana}>40 && ${ready}==0 && ${fighting}==0) /call Combat
/squelch /target clear
/doevents
/if (!${Me.FreeInventory}) {
/echo "No bag space!"
/beep
/endmac
}
/goto :startpoint
/return
Sub Combat
/echo "Combat Starting!!!"
/varset fighting 1
/if (${Target.Distance}>70) {
/face fast nolook
/keypress forward hold
:moveloop
/if (${Target.ID}) /face fast nolook
/if (${Target.Distance}>70) /goto :moveloop
/keypress forward
}
| Send in the Pet - should be bound to hotkey 3
/keypress 3
/delay 14s
:combatloop
/echo "Starting Combat Loop"
/doevents Looting
/if (${Target.ID} && ${fighting}==1) {
/if (${Target.ID}) /face fast nolook
| Activate your spellcasting macro - should be bound to hotkey 2
/echo "Starting my regular DPS cycle"
/if (!${Me.Casting.ID}) /nomodkey /keypress 2
| Adjust this delay based on the cast times and cooldowns of the spells in your spellcasting hotkey #2
/delay 8s
/doevents Looting
}
/Echo "About to check for a targetID"
/if (${Target.ID} && ${fighting}==1) /goto :combatloop
/return
Sub Event_Looting
/echo "In the looting sub routine"
/varset fighting 0
/varset ready 1
/declare x int local
/if (!${Me.FreeInventory}) {
/echo "No bag space!"
/beep
/endmac
}
/target corpse radius 80 ${mob}
/delay 1
/face fast
/if (${Target.Distance}>14) {
/face fast nolook
/keypress forward hold
:moveloop
/if (${Target.ID}) /face fast nolook
/if (${Target.Distance}>8) /goto :moveloop
/keypress forward
}
/loot
/delay 1s
/for x 1 to 6
/itemnotify loot${x} leftmouseup
| /if !(${Cursor.ID}) /goto :EndLoot
/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
/nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 1s
/if (!${Ini[Forage.ini,ForageList,${Cursor.Name}].Length}) {
/ini "Forage.ini" "ForageList" "${Cursor.Name}" "-1"
} else {
/if (${Ini[Forage.ini,ForageList,${Cursor.Name}]}) {
/if (${FindItemCount["=${Cursor.Name}"]}>=${Ini[Forage.ini,ForageList,
${Cursor.Name}]} && ${Ini[Forage.ini,ForageList,${Cursor.Name}]}!=-1) /goto :Destroy
} else {
:Destroy
/echo Destroying ${Cursor.Name}
/destroy
/next x
}
}
:LootIt
/echo Keeping ${Cursor.Name}
/autoinventory
/if (${Cursor.ID}) /goto :LootIt
}
/next x
:EndLoot
/delay 1s
/notify LootWnd DoneButton leftmouseup
/target clear
/look
/varset ready 0
/delay 2s
/return
Sub Event_Farm_talk
/if (${afkset}) {
/camp
/unload
}
/return
Sub MedBreak
/echo "Med Break!"
/g Med break. mana up
/keypress 9
/if (!${Me.Sitting}) /sit
:medloop
/if (${Target.ID} && !${Me.Sitting}) /call Combat
/delay 10
/if (!${Me.Sitting}) /sit
/delay 5s
/if (${Me.PctMana}<95) /goto :medloop
/returnCode: Select all
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| DPS Caster - Slave macro
| This macro will follow around the main assist and attack the MAs target
| When the MA says Attack in group chat. When the MA says Burn in group chat
| the caster will unload his max DPS rotation
| Bind the following:
| /assist group to Hotkey 3
| A light spell rotation to hotkey 2
| A burn rotation to hotkey 4
| /target %MA (Insert your Main Assist here) to Hotkey 5
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#chat group
#event Assist "#*#tells the group, 'Assist#*#"
#event Burn "#*#tells the group, 'Burn#*#"
#event Med "#*#tells the group, 'Med break#*#"
#event Fight "#*# gain party#*#"
Sub Main
/declare ready int outer 0
/declare fight int outer 0
:FollowLoop
/keypress 5
/delay 1s
/doevents
/if (${Target.Distance}>60) /keypress up hold
/if (${Target.Distance}<40) /keypress up
/face fast
/delay 3
/goto :FollowLoop
/return
Sub Event_Assist
/echo "Found a request to assist DPS"
/varset fight 1
/keypress 3
/delay 1s
:AssistLoop
| Start light DPS Spell rotation if not already engaged
/face fast
/keypress 2
| Give it 8 seconds to get through the light DPS rotation and then go back to following the MA
/delay 13s
/doevents Fight
/delay 1s
/if (${fight}==1) /goto :AssistLoop
/target clear
/delay 1s
/keypress 5
/return
Sub Event_Burn
| /assist group
/keypress 3
/delay 1s
/face fast
| Start DPS burn spell rotation
/keypress 4
| Give it 8 seconds to get through the light DPS rotation and then go back to following the MA
/delay 8s
/target clear
/delay 1s
/keypress 5
/return
Sub Event_Fight
| Clear the Im fighting variable
/echo Killed it
/varset fight 0
/doevents flush
/return
Sub Event_Med
/echo "Med Break!"
/target clear
/keypress 9
/if (!${Me.Sitting}) /sit
:medloop
/if (!${Me.Sitting}) /sit
/delay 5s
/if (${Me.PctMana}<95) /goto :medloop
/if (${Me.Sitting}) /stand
/return
Things I am still wanting to add:
- Mob exclusion list
- Buff cycle
- Auto-accept rez
- XP tracker
Code: Select all
Sub GroupBuffCheck(BuffSpell)
/declare i int local 1
/for i 1 to 50
:GroupBuff
/if (!${Group.Member[i].Buff[${BuffSpell}].ID) {
/echo Buffing ${Group.Member[i].Name} with ${BuffSpell}
/target ${Group.Member[i].Name}
/delay 5
/call cast "${BuffSpell}" 15s
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :GroupBuff
/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :GroupBuff
}
/next i
/return
