a_troll_01
Active member
- Joined
- Oct 5, 2006
- RedCents
- 21¢
Here's a little macro that I've used on my twink bard for a long time. I box Forgotten Halls with a cleric and druid so there is some communications code in there to call for HoT and assist. Hot is obvious, I've changed the afkcleric.mac to throw a Heal over time if I need it, respond to a mana check and throw the AC/HP buff. For the assist call, I have the druid snare,dot and nuke the mob.
Couple of other tid-bits. If you have a box cleric, this macro will check mana and melee if your healer has enough mana and you have the melee flag turned on.
I have some zone locations setup that I used while leveling up. It gives you an idea of how to set a hunting point but I wouldn't use the non-instanced locations while fully AFK.
Macro Customization:
heal_pct - {0-100} % of health to begin twisting heal song
selos_pct - {0-100} % of health to begin twisting heal and selo song
succor_pct - {0-100} % of health to /warp succor to a safe spot
gate_pct - {0-100} % of health to /gate
target_snare_pct - {0-100} % of health the mob will be snared if snare=true
loot - {TRUE/FALSE} True - mob will be looted after the kill
snare - {TRUE/FALSE} True - mob will be snared at target_snare_pct
UseWarp - {TRUE/FALSE} True - warp to startup point, False = Run to startup point
DoSkillHide - {TRUE/FALSE} Practice Hide
DoSkillSneak - {TRUE/FALSE} Practice Sneak
DoSkillSenseTrap - {TRUE/FALSE} Practice Sense Trap
DoSkillDisarmTrap - {TRUE/FALSE} Practice Disarm Trap
DoSkillForage - {TRUE/FALSE} Forage
spam - {TRUE/FALSE} Send messages on the defined chat channel
mychannel - {alphanumeric} Chat channel, please change this if nothing else.
weapon - {alphanumeric} Primary melee weapon
instrument - {alphanumeric} Percussion instrument
Have Fun!
I attached the file for lazy people, like myself. :p
Couple of other tid-bits. If you have a box cleric, this macro will check mana and melee if your healer has enough mana and you have the melee flag turned on.
I have some zone locations setup that I used while leveling up. It gives you an idea of how to set a hunting point but I wouldn't use the non-instanced locations while fully AFK.
Macro Customization:
heal_pct - {0-100} % of health to begin twisting heal song
selos_pct - {0-100} % of health to begin twisting heal and selo song
succor_pct - {0-100} % of health to /warp succor to a safe spot
gate_pct - {0-100} % of health to /gate
target_snare_pct - {0-100} % of health the mob will be snared if snare=true
loot - {TRUE/FALSE} True - mob will be looted after the kill
snare - {TRUE/FALSE} True - mob will be snared at target_snare_pct
UseWarp - {TRUE/FALSE} True - warp to startup point, False = Run to startup point
DoSkillHide - {TRUE/FALSE} Practice Hide
DoSkillSneak - {TRUE/FALSE} Practice Sneak
DoSkillSenseTrap - {TRUE/FALSE} Practice Sense Trap
DoSkillDisarmTrap - {TRUE/FALSE} Practice Disarm Trap
DoSkillForage - {TRUE/FALSE} Forage
spam - {TRUE/FALSE} Send messages on the defined chat channel
mychannel - {alphanumeric} Chat channel, please change this if nothing else.
weapon - {alphanumeric} Primary melee weapon
instrument - {alphanumeric} Percussion instrument
Have Fun!
Rich (BB code):
//
// Name: AFKBard.Mac
//
// Author: a_troll_01
//
// Purpose: I think the name says it all
//
// Spell Gems: 1) Heal, 2) Selo, 3-6) DOTs, 7) Debuff, 8) Snare, 9) DA
//
// Options: mychannel - channel to send commands to a cleric/druid bot
// weapon - weapon to use while meleeing
// instrument - percussion instrument
// spam - on/off. When on, mychannel will be used. If spam is set to True, this bot will send /chat requests
// HOT, assist, HP buffs, Sow and mana check.
// Notes: 1) Make sure you scroll down to the /* Macro Options begin here */ to customize this macro.
// 2) Have a favorite camp, add the location to the MoveToCamp subroutine
#turbo
#define NORMAL 1
#define HEAL 2
#define SELOS 3
#define SUCCOR 4
#define GATE 5
#define RUNNER 6
#define MELEE 7
#define EMPTY 10
#define NORTH 0
#define SOUTH 180
#define EAST 270
#define WEST 90
#define DEBUG_1 /SQUELCH /ECHO
#define DEBUG_2 /SQUELCH /ECHO
#define DEBUG_3 /SQUELCH /ECHO
#event dzadd "#1# tells you, 'add me'
#event invite "#*#invites you to join#*#"
#Event Zoned "#*#You have entered #1#".
#Event Slain "You have slain #1#"
#Event runner "Your target is out of range#*#"
#Event GetTarget "You must first selct a target for this spell."
#Event hitme "#1# #*# YOU for#*#"
#Event startup "[MQ2] Start Macro"
#Event virtue "Your virtue fades."
#Event Conviction "Your Conviction fades."
#Event Tenacity "Your Tenacity fades."
#Event sow "The spirit of the wolf leaves you."
#event sow "The avian spirit departs."
#Event HoT "The#1#Elixir fades#*#"
#Event Mana "Cleric Mana #1#&#*#"
#Event GetCloser "Your target is too far away#*#"
#include loot.inc
#include spell_routines.inc
Sub Main
/declare pause_flag bool outer FALSE
/declare pulldistance int OUTER 100
/declare SeloTimer timer outer 0
/declare healspell string outer Cantata of Replenshiment
/declare healgem int outer 1
/declare selospell string outer Selo's Accelerating Chorus
/declare selogem int outer 2
/declare dotspell1 string outer Tuyen's Chant of Frost
/declare dotgem1 int outer 3
/declare dotspell2 string outer Tuyen's Chant of Poison
/declare dotgem2 int outer 4
/declare dotspell3 string outer Tuyen's Chant of Disease
/declare dotgem3 int outer 5
/declare dotspell4 string outer Tuyen's Chant of Flame
/declare dotgem4 int outer 6
/declare debuffspell string outer Occlusion of Sound
/declare debuffgem int outer 7
/declare snarespell string outer Largo's Absonant Binding
/declare snaregem int outer 8
/declare DAspell string outer Kazum's Note' of Preservation
/declare DAgem int outer 9
/declare previous_mob int outer 0
/declare mob_count int outer 0
/declare iRunner int Outer 0
/declare bHuntingZone bool OUTER FALSE
/declare snaring bool outer FALSE
/declare OnCircle bool outer FALSE
/declare twist_mode int outer 0
/declare twist_gems string outer
/declare ZoneName string outer
/declare HuntX int outer 0
/declare HuntY int outer 0
/declare HuntZ int outer 0
/declare HuntCompass int outer 0
/declare HuntCircle int outer 0
/declare StuckXLoc int outer 0
/declare StuckYLoc int outer 0
/declare HoTFlag bool outer FALSE
/declare CallAssist bool outer FALSE
/declare KiteAttack bool outer TRUE
//****************************/
//* Macro Options begin here */
//****************************/
/declare heal_pct int OUTER 80 // % of health to begin twisting heal song
/declare selos_pct int OUTER 50 // % of health to begin twisting heal and selo song
/declare succor_pct int OUTER 30 // % of health to /warp succor to a safe spot
/declare gate_pct int OUTER 20 // % of health to /gate
/declare target_snare_pct int OUTER 20 // % of health the mob will be snared if snare=true
/declare loot bool outer TRUE // True - mob will be looted after the kill
/declare snare bool outer FALSE // True - mob will be snared at target_snare_pct
/declare UseWarp bool outer FALSE // True - warp to startup point, False = Run to startup point
/declare DoSkillHide bool outer TRUE // Practice Hide
/declare DoSkillSneak bool outer TRUE // Practice Sneak
/declare DoSkillSenseTrap bool outer TRUE // Practice Sense Trap
/declare DoSkillDisarmTrap bool outer FALSE // Practice Disarm Trap
/declare DoSkillForage bool outer TRUE // Forage
/declare spam bool outer TRUE // Send messages on the defined chat channel
/declare mychannel string outer afkbard
/declare weapon string out "silk handled hammer"
/declare instrument string out "Battle Tide Drum"
/squelch /alias /Melee /echo Melee Attack
/squelch /docrack nostun on
/squelch /docrack noencumber on
/squelch /docrack ultravision on
/squelch /docrack ezfollow on
/squelch /docrack indoorspells on
/squelch /docrack shared on
/squelch /docrack envirofall on
/squelch /docrack EB on
/squelch /docrack noblind on
/Echo *****************************************************
/Echo Starting AFKBard.Mac
/Echo Using channel: ${mychannel}
/Echo Melee Weapon: ${weapon}
/Echo Percussion: ${instrument}
/Echo Spam Channel: ${spam}
/Echo Flags: Snare-${snare}, Loot-${loot}, Warp-${UseWarp}
/Echo *****************************************************
/squelch /twist 1 2
/varset twist_mode EMPTY
/varset ZoneName ${Zone.Name}
/join ${mychannel}
/squelch /target clear
:loopstart
/doevents
/call GMcheck
/if (${Target.Type.Equal[NPC]} && (${Target.PctHPs} < 95) && !${CallAssist}) {
/if (${spam}) /chat #${mychannel} Assist
/varset CallAssist TRUE
}
/if (!${pause_flag}) {
/doevents
/call set_twist_mode
/if (${Target.ID} == NULL) {
|/call event_slain
/call get_target
/call StartHunting
}
/if (${Target.Type.NotEqual[NPC]} && ${Target.PctHPs} < 20 && ${snare} && !${snaring}) /call snare
}
/delay 1s
/goto :loopstart
/return
sub Event_startup
/call set_twist_mode
/call StartHunting
/return
sub MoveToCamp
/if (${ZoneName.Equal["The Forgotten Halls"]}) {
/varset loot TRUE
/call camp_location "-622.74" "155.746" "3.88" "90" "23"
} else /if (${ZoneName.Equal["Dulak's Harbor"]}) {
/call camp_location "611.22" "-475.04" "4.38" "270" "80"
} else /if (${ZoneName.Equal["JaggedPine Forest"]}) {
/call camp_location "895.12" "-634.54" "-9.15" "0" "50"
} else /if (${ZoneName.Equal["The Maiden's Eye"]}) {
/call camp_location "563.77" "1429.77" "174.80" "0" "70"
} else /if (${ZoneName.Equal["The Plane of Mischeif"]}) {
/call camp_location "-531" "761.09" "104.09" "0" "60"
} else /if (${ZoneName.Equal["The Crypt of Nadox"]}) {
/call camp_location "9.74" "255.62" "4.51" "90" "120"
} else /if (${ZoneName.Equal["The Rathe Mountains"]}) {
/call camp_location "1600" "1700" "2.7" "180" "90"
} else /if (${ZoneName.Equal["The Great Divide"]}) {
/call camp_location "-1752" "-2230" "-16.13" "270" "100"
} else /if (${ZoneName.Equal["The Skyfire Mountains"]}) {
/call camp_location "+560" "-4010" "100" "0" "50"
} else /if (${ZoneName.Equal["The Ocean of Tears"]}) {
/call camp_location "+1392" "-5892" "120" "0" "50"
} else /if (${ZoneName.Equal["Vxed, The Crumbling Caverns"]}) {
/varset loot FALSE
/varset UseWarp TRUE
/cast 9
/call camp_location "125" "-300" "447" "263" "69"
} else {
/Echo No camp coordinates defined for ${zone.name}
/endmac
}
/return
sub set_twist_mode
/if (!${HoTFlag} && ${Me.PctHPs} <= ${heal_pct}) {
/if (${spam}) /chat #${mychannel} HOT
/varset HoTFlag TRUE
}
/if (${twist_mode} == MELEE) /return
/if (${twist_mode} != MELEE && !${KiteAttack}) {
/varset twist_gems 8 9 3 4 5
/varset twist_mode MELEE
/squelch /twist ${twist_gems}
/return
} else /if (${twist_mode} == EMPTY) {
DEBUG_1 Twisting Normal
/varset twist_mode NORMAL
/varset twist_gems 2 3 4 5 6
/squelch /twist ${twist_gems}
/return
} else /if (${twist_mode} != NORMAL && ${Me.PctHPs} > ${heal_pct}) {
DEBUG_1 Twisting Normal
/varset twist_mode NORMAL
/varset twist_gems 2 3 4 5 6
/squelch /twist ${twist_gems}
/return
} else /if (${twist_mode} != HEAL && ${Me.PctHPs} <= ${heal_pct} && ${Me.PctHPs} > ${selos_pct}) {
DEBUG_1 Twisting Healing
/varset twist_mode HEAL
/varset twist_gems 1 2 3 4 5
/squelch /twist ${twist_gems}
/if (!${HoTFlag}) {
/if (${spam}) /chat #${mychannel} HOT
/varset HoTFlag TRUE
}
/return
} else /if (${twist_mode} != SELOS && ${Me.PctHPs} <= ${selos_pct} && ${Me.PctHPs} > ${succor_pct}) {
DEBUG_1 Twisting Selos
/varset twist_mode SELOS
/varset twist_gems 1 2 3 4 5
/squelch /twist ${twist_gems}
/return
} else /if (${twist_mode} != SUCCOR && ${Me.PctHPs} <= ${succor_pct}) {
/varset twist_mode SUCCOR
/squelch /twist off
/circle off
/warp succor
/keypress forward
/varset pause_flag TRUE
/Echo Succor!!!!
/mqlog Succor!!! Health at ${Me.PctHPs}
/1 Succor
/if (${ZoneName.Equal["The Forgotten Halls"]}) {
/fade
/tar guide
/warp guide
/say Ready to Leave
}
/return
} else /if (${twist_mode} == SUCCOR && ${Me.PctHPs}>95) {
/varset twist_mode EMPTY
/varset pause_flag FALSE
/mqlog Back to the hunt Health at ${Me.PctHPs}
/call StartHunting
/return
} else /if (${Me.PctHPs} <= ${gate_pct}) {
/squelch /twist off
/circle off
/varset pause_flag TRUE
/gate
/keypress forward
/mqlog Gating!!! Health at ${Me.PctHPs}
/return
}
/return
sub event_Slain(msg, mob)
/if (${loot} && ${Me.PctHPs} > 70 ) {
/varset pause_flag TRUE
/varset OnCircle FALSE
/squelch /twist 2
:NextCorpse
/tar corpse
/if (${Target.Type.Equal[Corpse]} && ${Target.Distance} < 100) {
/Call MoveToMob 10
/call lootmob
/goto :NextCorpse
}
/keypress ESC
}
/varset pause_flag FALSE
/doevents
/return
Sub get_target
/declare radius int local ${pulldistance}
/varset KiteAttack TRUE
/varset twist_mode EMPTY
/varset snaring FALSE
/varset pause_flag FALSE
/varset HoTFlag FALSE
/varset CallAssist FALSE
/varset iRunner 0
/squelch /target clear
:getmob
/doevents
/target ID ${NearestSpawn[1, npc].ID}
/if (${Target.ID} == NULL || ${Target.Name.Equal[Misguided Beludu Creque]} || ${Target.Name.Equal[a venomous stonemite]} || ${Target.Type.Equal[Corpse]} || ${Target.Level} > 67 ) {
/doevents
/varcalc radius (${radius}+50)
/squelch /target npc next radius ${radius}
/goto :getmob
}
/varset mob_count ${Math.Calc[${mob_count} + 1]}
/if (${Target.Distance} > ${pulldistance}) /call MoveToMob ${pulldistance}
/return
sub StartHunting
/if (${spam}) /chat #${mychannel} Mana Check
/if (${OnCircle}) /return
/doevents
/call MoveToCamp
/if (${KiteAttack}) {
/keypress forward hold
/squelch /circle on ${HuntCircle}
/varset OnCircle TRUE
} else /if (!${KiteAttack}) {
/chat ${mychannel} thorns
/circle off
/keypress forward
/face
/delay 2s
/stick 10
/attack on
} else /if (${KiteAttack}== NULL) {
/keypress ESC
/delay 30s
/return
}
/varset iRunner 0
/varset pause_flag FALSE
/return
sub camp_location(x, y, z, compass, circle_size)
/varset HuntX ${x}
/varset HuntY ${y}
/varset HuntZ ${z}
/varset HuntCircle ${circle_size}
/if (${UseWarp}) {
/warp loc ${x} ${y} ${z}
} else {
/call GotoLoc ${x} ${y}
}
/squelch /face fast heading ${compass}
/varset OnCircle TRUE
/return
Sub GotoLoc(AnchorX, AnchorY)
/Squelch /circle off
/moveto loc ${AnchorX} ${AnchorY}
/varset OnCircle TRUE
/delay 3s
/return
sub snare
/squelch /twist 8 ${twist_gems}
/varset snaring TRUE
/return
Sub MovetoMob(Distance)
/varset OnCircle FALSE
/Squelch /circle off
/keypress forward
/warp target
/If (${Distance.Equal[NULL]}) /Varset Distance ${pulldistance}
:runtomob
/if (${Target.Distance} > ${pulldistance}) {
/face
/stick
}
/delay 3s
/return
Sub GMcheck
/if (${Spawn[gm].ID}) {
/echo Gm detected
/target ${Spawn[gm].ID}
/Say Hey. What's up?
/MQLOG GM detected!!! ${Target.Name}
/beep
/beep
/beep
/keypress 9
/endmac
/unload
/q
}
/return
sub skills
| If we can forage then do so.
/if (${Me.AbilityReady[Forage]} && ${DoSkillForage} && ${KiteAttack}) {
/doability forage
| If we successfully foraged something then take care of it.
/delay 1s
/if (${Cursor.ID}) /call HandleItem
}
/if (${Me.AbilityReady[Sense Traps]} && ${DoSkillSenseTrap}) /doability "Sense Traps"
/if (${Me.AbilityReady[Disarm Traps]} && ${DoSkillDisarmTrap}) /doability "Disarm Traps"
/return
sub HandleItem
/declare ItemSetting int local
/declare NotFound int local
/varset NotFound -1
| Look up this item in yafm.ini
/varset ItemSetting ${Ini[yafm.ini,ForageList,${Cursor.Name},${NotFound}]}
/delay 5
| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "yafm.ini" "ForageList" "${Cursor.Name}" "1"
/varset ItemSetting 1
}
| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}==1) {
:LootIt
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :LootIt
} else {
/destroy
}
/return
|-----------------------------------------------------------------------
| Events
|-----------------------------------------------------------------------
Sub event_virtue
/if (${spam}) /chat #${mychannel} Virtue
/return
Sub event_conviction
/if (${spam}) /chat #${mychannel} Conviction
/return
Sub event_tenacity
/if (${spam}) /chat #${mychannel} Tenacity
/return
Sub event_sow
/if (${spam}) /chat #${mychannel} SOW
/return
Sub event_HOT
/if (${spam}) /varset HoTFlag FALSE
/return
sub event_zoned(ZoneMsg, sZoneName)
/varset ZoneName ${sZoneName}
/varset pause_flag TRUE
/varset UseWarp FALSE
/circle off
/squelch /twist 1 2
/if (${ZoneName.Equal["Nedaria's Landing"]}) {
/call get_forgotten_expd
/setvar bHuntingZone FALSE
/return
} else /if (${ZoneName.Equal["The Forgotten Halls"]} || ${ZoneName.Equal["Dulak's Harbor"]} || ${ZoneName.Equal["Vxed"]}) {
/setvar bHuntingZone TRUE
/varset UseWarp TRUE
/call get_target
/return
}
/delay 60s
/camp desk
/endmac
/Mqlog No res for ${me.name}
/return
sub Event_runner
/Varcalc iRunner ${iRunner}+1
/if (${iRunner} < 6) /return
/doevents
/if (${Target.ID} == NULL) /return
/if (${Target.PctHPs} < 20) {
/Echo Runner!!! ${Target} ${Target.ID} ${Target.PctHPs} Loc:${Target.X}, ${Target.Y}
| /varset twist_mode = RUNNER
/squelch /twist 2
/if (${Target.Distance} > ${pulldistance}) /call MoveToMob ${pulldistance}
/squelch /circle off
/varset pause_flag TRUE
/squelch /twist 3 4 5 6
:killdamob
/if (${Target.PctHPs} > 0) {
/doevents
/Call MoveToMob ${pulldistance}
/goto :killdamob
}
} else /if (${Target.PctHPs} >= 30) {
/keypress esc
}
/return
Sub event_camp
/sit
/camp desk
/endmac
/return
Sub Event_Chat(string ChatType,string Sender,string ChatText)
/declare Mana string
/declare inzone bool TRUE
/if (!${Spawn[${Sender}].ID}) {
/VARSET inzone FALSE
}
/if ( ${ChatText.Arg[1, ].Equal[Cleric]} && ${ChatText.Arg[2, ].Equal[Mana]}) {
/varset Mana ${ChatText.Arg[1,&]}
/varset Mana ${Mana.Right[-12]}
/Echo Check mana ${Mana}.
/if (${Mana} <= 30) {
/varset KiteAttack NULL
/exchange "${instrument}" mainhand
/delay 60s
/if (${spam}) /chat ${mychannel} Mana Check
/Echo waiting for mana
}
/if (${Mana} >= 80 && ${inzone}) {
/varset KiteAttack FALSE
/exchange "${weapon}" mainhand
/Echo Hand to Hand combat has been selected!
/varset OnCircle FALSE
}
/if ((${Mana} > 40 && ${Mana} < 80) || !${inzone}) {
/varset KiteAttack TRUE
/exchange "${instrument}" mainhand
/Echo Kiting combat has been selected!
}
}
/return
Sub Event_GetCloser
/face
/stick 10
/return
sub get_forgotten_expd
/Echo Walking to get an Expedition
/if (${UseWarp}) {
/tar Eldros
/warp target
} else {
/call gotoloc 1568 -636
/call gotoloc 1592 -621
/call gotoloc 1587 -567
/call gotoloc 1526 -469
/call gotoloc 1426 -470
/call gotoloc 1363 -417
/call gotoloc 1315 -236
/call gotoloc 1008 126
/call gotoloc 654 294
/call gotoloc 396 841
/call gotoloc 305 1584
}
/face
/delay 2s
/say Interested in Visiting
/delay 2s
/if (${UseWarp}) {
/tar Nideno
/warp target
} else {
/call gotoloc 305 1584
/call gotoloc 396 841
/call gotoloc 654 294
/call gotoloc 1055 -169
/call gotoloc 1315 -236
/call gotoloc 1363 -417
/call gotoloc 1426 -470
/call gotoloc 1526 -469
/call gotoloc 1587 -567
/call gotoloc 1592 -621
/call gotoloc 1568 -636
}
/face
/delay 2s
/say Forgotten Halls
/delay 5s
/call gotoloc 1544 -662.10
/keypress Esc
/face heading 270
/delay 1s
/sit
/Echo Click Left - 1
/delay 7s
/keypress u
/if (${ZoneName.NotEqual["The Forgotten Halls"]}) {
/Echo Click Left - 2
/delay 7s
/keypress u
}
/if (${ZoneName.NotEqual["The Forgotten Halls"]}) {
/Echo Click Left - 3
/delay 7s
/keypress u
}
/if (${ZoneName.NotEqual["The Forgotten Halls"]}) {
/Echo Click Left - 4
/delay 7s
/keypress u
}
/Echo Let's Stand and Try
/stand
/if (${ZoneName.NotEqual["The Forgotten Halls"]}) {
/Echo Click Left - Standing
/delay 7s
/keypress u
}
/if (${ZoneName.NotEqual["The Forgotten Halls"]}) {
/Echo Looks like we can't get another mission
/MQlog Couldn't target the Rock
/sit
/camp
/endmac
/unload
}
/return
I attached the file for lazy people, like myself. :p
Last edited:

