Page 1 of 6

BardHelper - bard group xp/raids (with Mezzing) - 6/3/05

Posted: Mon May 02, 2005 5:12 am
by DigitalMocking
06/03/2005: fixed a few things, added some new mezz code, still needs polishing, non-mezz mode is working as expected, mezz mode still buggy.

06/02/2005:
Exclusions for mezz immune mobs have been put in place, more testing will be done later tonight

Exclusions for immune mobs isn't working at the moment due to an issue with spell_routines.inc, I'll work on that later today, but it should mezz incoming adds with this update and the proper flags.

Pretty major update, few things have been fixed, especially with the death/rezzing loop. I've also added Bard Mezz functions.

I've also added /bardhelp and a few ingame toggles to turn on/off some functions.

I HAVE NOT COMEPLETED TESTING OF THE MEZZ FUNCTIONS, THERE ARE NO DOUBT BUGS IN THEM STILL. So please don't complain if it doesn't work :P

Just keep mezz turned off for now until I update the macro, or test/debug at your own leisure, any debugging help is always appreciated.

You need a few plugins and an include to make this macro work:
1) Mq2MoveUtils
2) Mq2Twist
3) spell_routines.inc

It also supports MQ2Bardswap if you have it... you'll also need MQ2Exchange as well

When you load the macro, it sets the current spot as home, if a mob comes into range and the main tank is on it, the macro will wait until the mob is at a certain % HP defined in the /declares, it will then get behind, twisting combat songs or mana drains/interrupts if the mob is a cleric. Once the mob is dead, the bard returns to the home spot and goes back to just mana song. The bard will also memorize the spells you specify in the /declares section, each in their own proper spell gem.

You can either target the MA when you start the macro, or don't have him targetted and just set it in the /declares section.

You can have the bard switch to 'raid mode' which basicly adds the resist song to the twist, xp mod uses 2 party buffs and a snare

There are a few rudimentary master/slave commands available, all issued from the MA, and in /tells right now.

Follow me / Move Camp : Abandon current camp spot, cast travel spell, follow me
Make camp : Set current location as new camp spot, go back to mana song
Stay here : Stop following, go back to mana song, do not set a new 'camp' spot
Raid mode : switch to raid mode, adding resist song
XP mode : no resist song, snare/slow mobs

The rest of the code is fairly self explainatory, seems to work fine in a few hours testing tonight. If you use it and spot any problems, let me know.

Posted: Tue May 03, 2005 2:44 am
by DigitalMocking

Code: Select all

#event FollowMe       "#1# tells the group, 'follow me'"
#event MobGating      "#*# begins to cast the gate spell#*#"
#event SnareIt        "#*# tells the group, 'snare#*#"
#event StayHere       "#1# tells the group, 'stay here'"
#event MakeCamp       "#1# tells the group, 'make camp'"
#event RaidMode       "#1# tells the group, 'raid mode'"
#event XPMode         "#1# tells the group, 'xp mode'"
#event GotHit         "#*#hits YOU for#*#" 
#event GotHit         "#*#slashes YOU for#*#" 
#event GotHit         "#*#crushes YOU for#*#" 
#event GotHit         "#*#bashes YOU for#*#" 
#event GotHit         "#*#kicks YOU for#*#" 
#event GotHit         "#*#smashes YOU for#*#" 
#event GotHit         "#*#mauls YOU for#*#" 
#event GotHit         "#*#gores YOU for#*#" 
#event GotHit         "#*#pierces YOU for#*#" 
#event GotHit         "#*#kicks YOU for#*#" 
#event GotHit         "#*#bashes YOU for#*#"  
#event NotStanding    "#*#You must be standing to attack!#*#"
#event NoSeeTarget    "#*#You cannot see your target.#*#
#event NoSeeTarget    "#*#You can't hit them from here#*#
#event Bswapoff       "#*#MQ2BardSwap::Melee-Swapping OFF#*#"
#Event MobDead        "#*#You have slain#*#"
#Event MobDead        "#*#has been slain by#*#"
#Event gohome         "#*#must be standing#*#spell#*#"
#Event Outdoors       "#*#You can only cast this spell in the outdoors#*#"
#Event Zoned          "#*#You have entered#*#"
#Event ImDead         "You have been slain by#*#"
#Event MezzImmune     "Your target cannot be mesmerized#*#"
#Event TBswap         "[MQ2] toggle bswap#*#" 
#Event TBswapMelee    "[MQ2] toggle bswapmelee#*#" 
#Event TDoMezz        "[MQ2] toggle domezz#*#" 
#Event TMezzAllAdds   "[MQ2] toggle mezzalladds#*#" 
#Event TProactiveMezz "[MQ2] toggle proactivemezz#*#" 
#Event TVerbose       "[MQ2] toggle verbose#*#" 
#Event TDEBUG         "[MQ2] toggle DEBUG#*#
#Event BardHelp       "[MQ2] Display Bard Help#*#" 

#include Spell_Routines.inc 

Sub Main
/declare  PartyFight      string outer "War March of Muram"
/declare  PartyFightGem   int    outer 1
/declare  PartyAug        string outer "Yelhun's Mystic Call"
/declare  PartyAugGem     int    outer 2
/declare  Snare           string outer "Dirge of Metala"
/declare  SnareGem        int    outer 3
/declare  DamageShield    string outer "Psalm of Veeshan"
/declare  DamageShieldGem int    outer 4
/declare  Debuff          string outer "Ervaj's Lost Composition"
/declare  DebuffGem       int    outer 5
/declare  Tash            string outer "Harmony of Sound"
/declare  TashGem         int    outer 5
/declare  Resist          string outer "Elemental Chorus"
/declare  ResistGem       int    outer 6
/declare  Mana            string outer "Chorus of Marr"
/declare  ManaGem         int    outer 7
/declare  Mezz            string outer "Lullaby of Morell"
/declare  MezzGem         int    outer 8
/declare  Interrupt       string outer "Saryrn's Scream of Pain"
/declare  InterruptGem    int    outer 9
/declare  Invis           string outer "Shauri`s Sonorous Clouding"
/declare  InvisGem        int    outer 9
/declare  Travel          string outer "Selo`s Song of Travel"
/declare  TravelGem       int    outer 9

|- Minor variables to change here, you can declare a default tank, distance
|- to assist at, when to jump into combat and change songs as well as setting
|- snare.
/declare  DefaultMT       string outer YOURTANKNAME
/declare  AssistDistance  int    outer 100
/declare  AssistAt        int    outer 96
/declare  SnareMob               outer TRUE
|- Set these to FALSE if you aren't using MQ2BardSwap 
/declare  Bswap                  outer TRUE
/declare  Bswapmelee             outer TRUE
|- If you want the bard to mezz, set this to true
/declare  DoMezz                 outer FALSE
|- If you want the bard to mezz any incoming add other than the MT's target,
|- set this to true.  If this is false, the bard will only mezz one add.
/declare  MezzAllAdds            outer FALSE
|- If you want the bard to mezz any NPC inside the assist radius, set this
|- to true.  be careful using this in places you don't want to mezz unles you're
|- in a fight
/declare  ProactiveMezz          outer FALSE
|- This is the max level your current mezz spell will work to
/declare  MaxMezzLevel    int    outer 68
|- Set this to true if you want group and raid announcement of mezz/debuff
|- messages
/declare  Verbose                outer FALSE

/squelch /alias /bswap           /echo toggle bswap
/squelch /alias /bswamelee       /echo toggle bswapmelee
/squelch /alias /bmezz           /echo toggle domezz
/squelch /alias /bmezzall        /echo toggle mezzalladds
/squelch /alias /bproactive      /echo toggle proactivemezz
/squelch /alias /bverbose        /echo toggle verbose
/squelch /alias /bardhelp        /echo Display Bard Help
/squelch /alias /bdebug          /echo toggle DEBUG

/declare  DEBUG                  outer FALSE
/declare  MovingCamp             outer FALSE
/declare  FollowingTank          outer FALSE
/declare  Outside                outer TRUE
/declare  StaticCamp             outer TRUE
/declare  HomeXLoc        int    outer ${Me.X}
/declare  HomeYLoc        int    outer ${Me.Y}
/declare  TankName        string outer ${Target}
/declare  Engaged                outer FALSE
/declare  GroupMobs              outer TRUE
/declare  SingingMana            outer FALSE
/declare  JustZoned              outer FALSE
/declare  TargetArray[4]  string outer 
/declare  AddArray[4]     int    outer
/declare  ExcludeArray[10]int    outer
/declare  MezzTimers[10]  int    outer 0
/declare  ClericMezzTimer timer  outer 0
/declare  SnareTimer      timer  outer 0

/echo Starting bardhelper.mac...
/echo /bardhelp for program help and toggles
/echo Mezzing is set to: ${DoMezz}

/if (!${Bool[${Plugin[mq2twist]}]}) {
  /echo MQ2Twist not detected!  This macro requires it.
  /beep
  /end
}

/if (!${Bool[${Plugin[mq2moveutils]}]}) {
  /echo MQ2MoveUtils not detected!  This macro requires it!
  /beep
  /end
}

/if (${Bool[${Plugin[mq2bardswap]}]} && ${Bswap}) {
  /bardswap on
  /if (${Bswapmelee}) /bardswap melee
  /doevents
  /echo MQ2BardSwap has been enabled
} else {
  /echo MQ2BardSwap not detected!
}

/if (!${Target.ID} || ${Target.Type.NotEqual[PC]} || ${Target.Type.Equal[Corpse]} || ${Target.Type.Equal[PET]}) { 
  /varset TankName ${DefaultMT} 
  } else {
/varset TankName ${Target} 
}

/declare z int local 1
/for z 1 to 10
  /varset ExcludeArray[${z}] 0
  /next z
  
/echo Now Assisting: [ ${TankName} ]
/call MemSpells

:Main_Loop
  /delay 1
  /doevents
  /if (${ProactiveMezz}) /call CheckForAdds
  /if (!${Engaged}) /call AssistTank
  /if (${Engaged} && ${TargetArray[4]}) /call KillTarget
  /if (${DoMezz}) /call CheckMezzTimers
  /call ReadyForNext
  /goto :Main_Loop
/return

Sub AssistTank
  /if (${DEBUG}) /echo Entered Sub AssistTank
  /assist ${TankName} 
  /if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Distance}<${AssistDistance} && !${Target.Type.Equal[Corpse]} && !${Target.Type.Equal[PET]} && ${Target.PctHPs}<=${AssistAt}) { 
    /if (${DEBUG}) /echo Setting TargetArray
    /varset TargetArray[1] ${Target.CleanName} 
    /varset TargetArray[2] ${Target.Level} 
    /varset TargetArray[3] ${Target.Name} 
    /varset TargetArray[4] ${Target.ID} 
    /if (${Me.Sitting}) /stand 
    /call SongSelection
    /squelch /stick hold behind 10
    /varset Engaged TRUE
    /varset SingingMana FALSE
    /return
  } 
/return

Sub KillTarget
  /if (${DEBUG}) /echo Entered Sub KillTarget
	:Combat
  /if (${DoMezz}) /call CheckForAdds
  /if (${DoMezz}) /call CheckMezzTimers
  /if (${Target.Type.Equal["Corpse"]}) {
    /squelch /target clear
    /varset Engaged FALSE
    /return
  }
  /if (${Target.Class.Name.Equal[Cleric]} && ${Target.PctHPs} <= 45 && ${ClericMezzTimer} <= 1 && ${Target.Level} < ${MaxMezzLevel}) {
    /squelch /twist once ${MezzGem}
    /varset ClericMezzTimer 65
  }
  /if (${SnareMob} && ${SnareTimer} <= 1 && ${Target.PctHPs} <= 22) {
    /squelch /twist once ${SnareGem}
    /varset SnareTimer 120
  }
	/if (!${Me.Combat} && ${Int[${Target.Distance}]} <15 ) /attack on 
	/if (${Int[${Target.Distance}]} > 20 && ${Int[${Target.Distance}]} < 125) /squelch /stick behind 10
  /if (!${Target.ID}) {
    /varset Engaged FALSE
    /attack off
    /delay 1
    /doevents
    /if (${DEBUG}) /echo Leaving Sub KillTarget
    /return
  }
  /delay 1
  /doevents
  /goto :Combat
/return    

Sub CheckForAdds
  /delay 1
  /if (${DEBUG}) /echo In Sub CheckForAdds
  /declare s   int local 
  /declare i   int local 1 
  /declare j   int local 1
  /for i 1 to 4
    /if (${DEBUG}) /echo i: ${i} 
    /varset s ${NearestSpawn[${i},npc].ID} 
    /if (${s} == ${TargetArray[4]}) /next i
    /if (${Spawn[${s}].Type.Equal["Corpse"]}) /next i
    /for j 1 to ${AddArray.Size}
      /if (${s} == ${AddArray[${j}]) /next i
      /next j
    /if (${Spawn[${s}].Distance}>${Spell[${Mezz}].Range} || ${Spawn[${s}].Distance} > ${AssistDistance}) {
      /if (${DEBUG}) /echo Leaving CheckForAdds because next spawn is at: ${Spawn[${s}].Distance
      /return
    }
    /varset AddArray[${i}] ${s}
    /if (${DEBUG}) /echo Targeting ID ${s}
    /squelch /target id ${s}
    /if (${Target.Type.Equal["Corpse"]}) {
    /if (${DEBUG}) /echo Target.Type.Equal corpse, clearing target.
      /squelch /target clear
      /next i
    }
    /delay 2 
    /call Mezz 
    /if (!${MezzAllAdds}) /return
    /next i
/return 

Sub Mezz 
  /if (${DEBUG}) /echo In Sub Mezz
  /if (${Target.ID}==${TargetArray[4]}) /return 
  /declare i int local 1
  /declare k int local 1
  /for i 1 to ${ExcludeArray.Size}
    /if (${Target.ID} == ${ExcludeArray[${i}]}) /return
    /next i
  /if (${Target.Level} > ${MaxMezzLevel}) {
    /if (${Verbose}) /gsay [ %t ] is too high level to mezz!  Someone Tank it!
    /for k 1 to ${ExcludeArray.Size}
      /if (!${ExcludeArray[${k}]}) /varset ExcludeArray[${k}] ${Target.ID}
      /next k
  }
  /attack off
  /twist once ${MezzGem}
  /delay 3s
  /doevents MezzImmune
  /call SetMezzTimer ${Target.ID} 150
/return


Sub SetMezzTimer(int id,timer t) 
  /if (${DEBUG}) /echo In Sub SetMezzTimer
  /declare i int local 1 
  /for i 1 to ${AddArray.Size} 
    /if (!${AddArray[${i}]}) { 
      /varset AddArray[${i}] ${id} 
      /if (!${Defined[MezzTimer${AddArray[${i}]}]}) { 
        /declare MezzTimer${AddArray[${i}]} timer outer ${t} 
      } else { 
        /varset MezzTimer${AddArray[${i}]} ${t} 
      } 
      /return 
    } 
  /next i 
/return 

Sub CheckMezzTimers 
  /if (${DEBUG}) /echo In Sub CheckMezzTimers
  /declare i int local 1 
  /for i 1 to ${AddArray.Size} 
    /if (${AddArray[${i}]}) /if (!${Spawn[${AddArray[${i}]}].ID} || ${Spawn[${AddArray[${i}]}].State.Equal[DEAD]}) { 
      /if (${Defined[MezzTimer${AddArray[${i}]}]}) /deletevar MezzTimer${AddArray[${i}]}  
      /varset AddArray[${i}] 0 
    } 
    /if (${AddArray[${i}]}) /if (${Defined[MezzTimer${AddArray[${i}]}]}) /if (${MezzTimer${AddArray[${i}]}}<=6) { 
      /if (${Me.Combat}) /attack off 
      /target id ${AddArray[${i}]} 
      /call Mezz 
      /target id ${TargetArray[4]} 
      /attack on 
    } 
  /next i 
/return 

Sub SongSelection
  /if (${DEBUG}) /echo In Sub SongSelection
  /if (${Target.Class.Name.Equal[Cleric]}) {
    /if (${Me.Gem[${Mezz}]} && ${Me.Gem[${Mezz}]}!=${MezzGem}) {
      /varset gemnum ${Me.Gem[${Mezz}]}
      /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
      /memspell ${MezzGem} ${Mezz}
      /delay 30
    }
    /if (!${Me.Gem[${Mezz}]}) {
      /memspell ${MezzGem} ${Mezz}
      /delay 30
    }
    /if (${GroupMobs} && ${Target.PctHPs} > 50) {
      /squelch /twist ${PartyFightGem} ${DamageShieldGem} ${DebuffGem} ${ManaGem}
      /return
    } else {
      /if (${Me.Gem[${Tash}]} && ${Me.Gem[${Tash}]}!=${TashGem}) {
        /varset gemnum ${Me.Gem[${Tash}]}
        /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
        /memspell ${TashGem} ${Tash}
        /delay 30
      }
      /if (!${Me.Gem[${Tash}]}) {
        /memspell ${TashGem} ${Tash}
        /delay 30
      }
      /squelch /twist ${PartyFightGem} ${TashGem} ${ResistGem} ${ManaGem}
      /return
    }
  }
  /if (${GroupMobs}) {
    /squelch /twist ${PartyFightGem} ${ManaGem} ${PartyAugGem} ${DamageShieldGem}
    /return
  } else {
      /if (${Me.Gem[${Tash}]} && ${Me.Gem[${Tash}]}!=${TashGem}) {
        /varset gemnum ${Me.Gem[${Tash}]}
        /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
        /memspell ${TashGem} ${Tash}
        /delay 30
      }
      /if (!${Me.Gem[${Tash}]}) {
        /memspell ${TashGem} ${Tash}
        /delay 30
      }
    /squelch /twist ${PartyFightGem} ${TashGem} ${ResistGem} ${ManaGem}
    /return
  }
/return

Sub ReturnHome
  /if (${DEBUG}) /echo Entered Sub ReturnHome
  /if (${FollowingTank} || ${MovingCamp} || !${StaticCamp}) /return
  /if (${Me.Sitting}) /stand 
  /if (${Math.Distance[${HomeYLoc},${HomeXLoc}]}<10) {
    /keypress forward
    /keypress back
    /return
  }
  :MoveHome
  /delay 1
  /doevents
  /face fast nolook loc ${HomeYLoc},${HomeXLoc}
  /if (${Math.Distance[${HomeYLoc},${HomeXLoc}]}>10) /keypress forward hold
  /call AreWeStuck
  /if (${Math.Distance[${HomeYLoc},${HomeXLoc}]}<15) {
    /keypress forward
    /keypress back
    /if (${DEBUG}) /echo Leaving Sub ReturnHome
    /return
  }
  /goto :MoveHome
/return

Sub ReadyForNext
  /if (${DEBUG}) /echo Entered Sub ReadyForNext
  /if (${SingingMana}) /return
  /declare i int local 1 
  /if (${DoMezz}) {
    /for i 1 to ${ExcludeArray.Size} 
      /if (${ExcludeArray[${i}]}) /if (!${Spawn[${ExcludeArray[${i}]}].ID} || ${Spawn[${ExcludeArray[${i}]}].State.Equal[DEAD]}) /varset ExcludeArray[${i}] 0  
      /next i
  }
  /squelch /twist off
  /delay 2
  /squelch /twist ${ManaGem}
  /varset SingingMana TRUE
/return

Sub Event_Bswapoff
    /squelch /bardswap melee
/return  

Sub AreWeStuck
	/doevents
  /declare  StuckXLoc      int local ${Me.X}
  /declare  StuckYLoc      int local ${Me.Y}
  /delay 1s
  /if (${StuckXLoc}==${Me.X} && ${StuckYLoc}==${Me.Y}) /call MoveAround
/return

Sub MoveAround
  /doevents
  /keypress forward 
  /keypress back hold 
  /delay 8
  /keypress forward
  /if (${Math.Rand[2]}) { 
     /keypress strafe_right hold 
  } else { 
     /keypress strafe_left hold 
  } 
  /delay 15 
  /keypress strafe_right 
  /keypress strafe_left 
/return 


Sub Event_GotHit 
  /if (!${Engaged}) {
    /assist ${TankName}
    /call SongSelection
    /squelch /stick 10
    /varset Engaged TRUE
    /varset SingingMana FALSE
    /call KillTarget
  }
/return

Sub Event_NotStanding
  /call MoveAround
  /assist ${TankName}
  /call ReturnHome
/return

Sub Event_NoSeeTarget
  /if (!${Engaged}) /return
  /assist ${TankName}
  /squelch stick off
  /squelch stick 10
/return

Sub Event_MobDead 
  /squelch /stick off
  /keypress forward
  /keypress back
  /if (${Math.Distance[${HomeYLoc},${HomeXLoc}]}>15) /call ReturnHome
/return

Sub Event_gohome
  /call ReturnHome
/return

Sub MemSpells
  /declare gemnum int local
  /if (${Me.Gem[${PartyFight}]} && ${Me.Gem[${PartyFight}]}!=${PartyFightGem}) {
    /varset gemnum ${Me.Gem[${PartyFight}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${PartyFightGem} ${PartyFight}
    /delay 30
  }
  /if (!${Me.Gem[${PartyFight}]}) {
    /memspell ${PartyFightGem} ${PartyFight}
    /delay 30
  }

  /if (${Me.Gem[${PartyAug}]} && ${Me.Gem[${PartyAug}]}!=${PartyAugGem}) {
    /varset gemnum ${Me.Gem[${PartyAug}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${PartyAugGem} ${PartyAug}
    /delay 30
  }
  /if (!${Me.Gem[${PartyAug}]}) {
    /memspell ${PartyAugGem} ${PartyAug}
    /delay 30
  }

  /if (${Me.Gem[${Snare}]} && ${Me.Gem[${Snare}]}!=${SnareGem}) {
    /varset gemnum ${Me.Gem[${Snare}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${SnareGem} ${Snare}
    /delay 30
  }
  /if (!${Me.Gem[${Snare}]}) {
    /memspell ${SnareGem} ${Snare}
    /delay 30
  }
  
  /if (${Me.Gem[${DamageShield}]} && ${Me.Gem[${DamageShield}]}!=${DamageShieldGem}) {
    /varset gemnum ${Me.Gem[${DamageShield}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${DamageShieldGem} ${DamageShield}
    /delay 30
  }
  /if (!${Me.Gem[${DamageShield}]}) {
    /memspell ${DamageShieldGem} ${DamageShield}
    /delay 30
  }
  
  /if (${Me.Gem[${Debuff}]} && ${Me.Gem[${Debuff}]}!=${DebuffGem}) {
    /varset gemnum ${Me.Gem[${Debuff}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${DebuffGem} ${Debuff}
    /delay 30
  }
  /if (!${Me.Gem[${Debuff}]}) {
    /memspell ${DebuffGem} ${Debuff}
    /delay 30
  }

  /if (${Me.Gem[${Resist}]} && ${Me.Gem[${Resist}]}!=${ResistGem}) {
    /varset gemnum ${Me.Gem[${Resist}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${ResistGem} ${Resist}
    /delay 30
  }
  /if (!${Me.Gem[${Resist}]}) {
    /memspell ${ResistGem} ${Resist}
    /delay 30
  }

  /if (${Me.Gem[${Mana}]} && ${Me.Gem[${Mana}]}!=${ManaGem}) {
    /varset gemnum ${Me.Gem[${Mana}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${ManaGem} ${Mana}
    /delay 30
  }
  /if (!${Me.Gem[${Mana}]}) {
    /memspell ${ManaGem} ${Mana}
    /delay 30
  }

  /if (${Me.Gem[${Mezz}]} && ${Me.Gem[${Mezz}]}!=${MezzGem}) {
    /varset gemnum ${Me.Gem[${Mezz}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${MezzGem} ${Mezz}
    /delay 30
  }
  /if (!${Me.Gem[${Mezz}]}) {
    /memspell ${MezzGem} ${Mezz}
    /delay 30
  }

  /if (${Me.Gem[${Travel}]} && ${Me.Gem[${Travel}]}!=${TravelGem}) {
    /varset gemnum ${Me.Gem[${Travel}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${TravelGem} ${Travel}
    /delay 30
  }
  /if (!${Me.Gem[${Travel}]}) {
    /memspell ${TravelGem} ${Travel}
    /delay 30
  }

  /if (${Me.Sitting}) /stand 
/return 

Sub Event_Outdoors
  /if (${FollowingTank})  { 
    /if (${Me.Gem[${Invis}]} && ${Me.Gem[${Invis}]}!=${InvisGem}) {
      /varset gemnum ${Me.Gem[${Invis}]}
      /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
      /memspell ${InvisGem} ${Invis}
      /delay 30
    }
    /if (!${Me.Gem[${Invis}]}) {
      /memspell ${InvisGem} ${Invis}
      /delay 30
    }
  }
  /squelch /twist ${InvisGem}
  /varset Outside FALSE
/return

Sub Event_Zoned
  /varset Outside TRUE
  /varset JustZoned TRUE
  /if (${FollowingTank}) {
    :WaitForTank
    /delay 10
    /doevents
    /squelch /target ${TankName}
    /if (!${Target.ID}) /goto :WaitForTank
    /squelch /stick 20
    /if (${Me.Gem[${Travel}]} && ${Me.Gem[${Travel}]}!=${TravelGem}) {
      /varset gemnum ${Me.Gem[${Travel}]}
      /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
      /memspell ${TravelGem} ${Travel}
      /delay 30
    }
    /if (!${Me.Gem[${Travel}]}) {
      /memspell ${TravelGem} ${Travel}
      /delay 30
    }
    /squelch /twist ${TravelGem}
  }
}
/return

Sub Event_ImDead 
  /echo Died, Waiting for Rez!
  /squelch stick off
  /keypress forward
  /keypress back
  /keypress left
  /keypress right
  /varset  MovingCamp    FALSE
  /varset  FollowingTank FALSE
  /varset  Outside       TRUE
  /varset  StaticCamp    TRUE
  /varset  Engaged       FALSE
  /varset  SingingMana   FALSE
  :Zone_Loop 
  /if (!${JustZoned}) {
    /doevents
    /goto :Zone_Loop
  }
  /consent group 
  /delay 1s
  /consent raid 
  /delay 1s
  /consent guild
  /if (${Verbose} && ${Group}) /gsay Group Consented
  /varset  HomeXLoc      ${Me.X}
  /varset  HomeYLoc      ${Me.Y}
  /call MemSpells 
  /varset JustZoned FALSE
  /call Rez
/return 

Sub Rez 
  :waitforrez 
   /if (!${Window[ConfirmationDialogBox].Open}) { 
      /delay 5s ${Window[ConfirmationDialogBox].Open} 
      /goto :waitforrez 
   } 
   /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup 
  :zonein 
  :Zone_Loop2
  /if (!${JustZoned}) {
    /doevents
    /goto :Zone_Loop2
  }
   /squelch /target mycorpse 
   /squelch /corpse
   /delay 5 
   /if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein 
   /if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
     /varset  HomeXLoc ${Me.X}
     /varset  HomeYLoc ${Me.Y}
     /delay 20s 
     /call Loot_Corpse 
     /return
   } else /goto :zonein 
/return 

Sub Loot_Corpse 
  /declare LootTotal int local 0 
  /declare LootSlot int local 
  /squelch /target mycorpse 
  /if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) { 
    /echo ** Can't target my corpse. 
    /return 
  }    
  /loot 
  /delay 3s 
  /if (${Me.State.NotEqual[BIND]}) { 
    /echo ** Massive lag right now... Aborting looting. 
    /return 
  } 
  :LootLag 
  /if (${LootTotal}!=${Corpse.Items}) { 
    /varset LootTotal ${Corpse.Items} 
    /delay 5 
    /goto :LootLag 
  } 
  /for LootSlot 1 to ${LootTotal} 
    :LootItem 
    /itemnotify loot${LootSlot} rightmouseup 
    /delay 3 
    /if (${Corpse.Item[${LootSlot}].ID}) { 
      /delay 2 
      /goto :LootItem 
    } 
  /next LootSlot 
  /delay 5 
  /echo ** Done looting my corpse. 
  /notify LootWnd DoneButton leftmouseup 
/return 

Sub Event_FollowMe
  /if (${Me.Gem[${Travel}]} && ${Me.Gem[${Travel}]}!=${TravelGem}) {
    /varset gemnum ${Me.Gem[${Travel}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${TravelGem} ${Travel}
    /delay 30
  }
  /if (!${Me.Gem[${Travel}]}) {
    /memspell ${TravelGem} ${Travel}
    /delay 30
  }
  /varset FollowingTank TRUE
  /target ${TankName}
  /squelch /stick 20 hold
  /squelch /twist off
  /delay 2
  /if (${Outside}) {
    /squelch /twist ${TravelGem}
    /return
  }
  /squelch /twist ${InvisGem}
/return

Sub Event_MobGating
  /if (${Me.Gem[${Mezz}]} && ${Me.Gem[${Mezz}]}!=${MezzGem}) {
    /varset gemnum ${Me.Gem[${Mezz}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${MezzGem} ${Mezz}
    /delay 30
  }
  /if (!${Me.Gem[${Mezz}]}) {
    /memspell ${MezzGem} ${Mezz}
    /delay 30
  }
  /squelch /twist once ${MezzGem}
/return

Sub Event_SnareIt
  /if (${Me.Gem[${Snare}]} && ${Me.Gem[${Snare}]}!=${SnareGem}) {
    /varset gemnum ${Me.Gem[${Snare}]}
    /notify SpellBookWnd SBW_Spell${gemnum} rightmouseup
    /memspell ${SnareGem} ${Snare}
    /delay 30
  }
  /if (!${Me.Gem[${Snare}]}) {
    /memspell ${SnareGem} ${Snare}
    /delay 30
  }
  /varset SnareMob TRUE
/return

Sub Event_StayHere
  /varset FollowingTank FALSE
  /varset StaticCamp    FALSE
  /squelch /stick off
  /timed 50 /face pc ${maintank} 
  /squelch /twist off
  /delay 2
  /squelch /twist ${ManaGem}
/return

Sub Event_MakeCamp
  /varset MovingCamp    FALSE
  /varset FollowingTank FALSE
  /squelch /stick off
  /varset  HomeXLoc ${Me.X}
  /varset  HomeYLoc ${Me.Y}
  /squelch /twist off
  /delay 2
  /squelch /twist ${ManaGem}
/return 

Sub Event_RaidMode
  /varset GroupMobs FALSE
/return

Sub Event_XPMode
  /varset GroupMobs TRUE
/return

Sub Event_TBswap   
  /if (${Bswap}) {
    /varset Bswap FALSE
    /return
  }
  /varset Bswap TRUE
/return

Sub Event_TBswapMelee
  /if (${BswapMelee}) {
    /varset BswapMelee FALSE
    /return
  }
  /varset BswapMelee TRUE
/return

Sub Event_TDoMezz
  /if (${DoMezz}) {
    /varset DoMezz FALSE
    /echo Mezz routines turned OFF
    /return
  }
  /varset DoMezz TRUE
  /echo Mezz routines turned ON
/return

Sub Event_TMezzAllAdds
  /if (${MezzAllAdds}) {
    /varset MezzAllAdds FALSE
    /echo Mezz all adds turned OFF
    /return
  }
  /varset MezzAllAdds TRUE
  /echo Mezz all adds turned ON
/return

Sub Event_TProactiveMezz
  /if (${ProactiveMezz}) {
    /varset ProactiveMezz FALSE
    /echo Proactive Mezzing(not in combat) turned OFF
    /return
  }
  /varset ProactiveMezz TRUE
  /echo Proactive Mezzing(not in combat) turned ON
/return

Sub Event_TVerbose
  /if (${Verbose}) {
    /varset Verbose FALSE
    /echo Group/Raid announcing turned OFF
    /return
  }
  /varset Verbose TRUE
  /echo Group/Raid announcing turned ON
/return

Sub Event_TDEBUG
  /if (${DEBUG}) {
    /varset DEBUG FALSE
    /echo Debugging turned off.
    /return
  }
  /varset DEBUG TRUE
  /echo Debugging turned on.
/return

Sub Event_BardHelp
  /echo BardHelper.mac - Define the Default MT in the macro, or target your default MT and run bardhelper.mac
  /echo Available Toggles:
  /echo /bswap - Turn off/on the BardSwap plugin
  /echo /bswapmelee - Turn off/on Melee Bard Swapping
  /echo /bmezz - Turn off/on Target Mezzing -- Currently set to: ${DoMezz} --
  /echo /bmezzall - Turn off/on Mezzing all Adds -- Currently set to: ${MezzAllAdds} --
  /echo /bproactive - Turn off/on Proactive Mezzing -- Currently set to: ${ProactiveMezz} --
  /echo /bverbose - Turn off/on /gsay and /rsay use -- Currently set to: ${Verbose} --
  /echo /bardhelp - Displays this help.
/return

Sub Event_MezzImmune
  /declare i int local 1
  /if (${Verbose}) /gsay [ %t ] is too high level to mezz!  Someone Tank it!
  /for i 1 to ${ExcludeArray.Size}
    /if (!${ExcludeArray[${i}]}) /varset ExcludeArray[${i}] ${Target.ID}
    /next i
/return

Posted: Tue May 03, 2005 1:28 pm
by Trump
looks rather interesting i can't wait to find some free time to try it out. /grumble stupid work

Posted: Wed May 04, 2005 12:48 am
by OnyxSys
Excellent Job DM.. works great! This is perfect for any bard :)

PS. Throw in 9th spell gem & when you gonna add AutoMez adds in area? ;)

Posted: Mon May 23, 2005 6:35 pm
by DigitalMocking
Added a rez loop, corpse autoloot as well as tank following through zones and switching from selo's to invis song in indoor zones.

edit: few new changes: The bard will now mezz when a mob tries to gate, and mezz every 7 seconds on cleric mobs. I got tired of ALL the friggin cleric mobs in DoN, this will put an end to that.

I've also converted from the #chat blech to #events per Lax's recommendation.

Posted: Tue May 31, 2005 1:25 am
by JimJohnson
Anyone having issues with the rez part of this? everytime it accepts rez corpse movse to some funky location within zone.

Posted: Tue May 31, 2005 3:37 pm
by AEbard
Same thing for me, when rez happens corpse gets put under world and then has to be summoned?


Also when you start the mac, the anchor is set to where it happens. But sometimes the bard will go hay wire trying to get back to that exact spot, perhaps you can code it where it has some radius give as to where it anchors.

Posted: Tue May 31, 2005 5:43 pm
by JimJohnson
looks automated for sure with the anchor code. Might just be i always keep selos on

Posted: Wed Jun 01, 2005 12:22 am
by DigitalMocking
JimJohnson wrote:Anyone having issues with the rez part of this? everytime it accepts rez corpse movse to some funky location within zone.
Yeah, something weird in the bard rez code, I'll look into it tonight, not sure why that's happening.

Posted: Thu Jun 02, 2005 5:36 pm
by DigitalMocking
crapola. turns out spell_routines.inc doesn't "understand" bard spells... I've fixed the mezz routine, but since bard spells don't actually end if you cast them, spell_routines.inc never releases the bard from the spell.

I'll just have to build my own events for immune messages.

What I could really use are all the "mezz immune" messages you can think of or have in your logs.

Posted: Fri Jun 03, 2005 3:18 pm
by Paradigm68
Awesome job on this mac btw - and I'm going to test the mez aspect of it tonight =)

Posted: Fri Jun 03, 2005 4:22 pm
by DigitalMocking
Paradigm68 wrote:Awesome job on this mac btw - and I'm going to test the mez aspect of it tonight =)
Its very broken at the moment, working on an update for this evening.

Posted: Fri Jun 03, 2005 5:17 pm
by JimJohnson
Issues with Selos and anchor code, its minor but its there. Ill try and test the mez code when you get it little more updated DM. This might save my chanter some =p

Posted: Sat Jun 04, 2005 3:36 am
by DigitalMocking
JimJohnson wrote:Issues with Selos and anchor code, its minor but its there. Ill try and test the mez code when you get it little more updated DM. This might save my chanter some =p
What are you seeing with the anchor code and selo's?

New update posted, haven't tested the new mezz changes yet, but non-mezz mode is working fine again.

Posted: Sat Jun 04, 2005 4:32 am
by JimJohnson
with Selos on sometimes it takes 30+ seconds after mob dies for him to stop looking for anchor spot. he runs back and forth while doing this he will not seek new target.