There are a few strange things with the exp calculation that I may fix later, but I'm still a bit new writing macros and wasn't quite sure how to tackle these problems yet. If you ding an AA, the calculation shows as negative. This is a bit odd, of course, but not a huge deal. Also, if you kill more than one mob before it updates, say they give 6% AA per kill, it will show up as one kill worth double the experience, 12%.
It's not totally amazing, but it will hopefully be useful for other people like me who like to find the best place for leveling up their alt on leach exp. If anyone finds any problems with it, or knows how to fix the exp calculation problems with more than one mob dying at a time, or dinging an AA, please let me know.
Code: Select all
|------------------------------------------------------------------------------------------------------
|Followexp version 1.0
|Written by Dregs
|The EXP calculation section is copied from the RogueHelper macro, with a few modifications
|------------------------------------------------------------------------------------------------------
|Usage:
|To follow your current target, simply type
|/macro Followexp
|
|To follow something other than your current target, enter the name of the character you wish to follow.
|Names are not case sensitive.
|Examples:
|/macro Followexp Sirtanksalot
|/macro Followexp sirtanksalot
|-------------------------------------------------------------------------------------------------------
#event GroupExp "#*#You gain party experience#*#"
#event SoloExp "#*#You gain experience#*#"
Sub Main
/declare FollowWho string outer
/declare LDExp float outer ${Me.PctGroupLeaderExp}
/declare AAExp float outer ${Me.PctAAExp}
/declare Exp float outer ${Me.PctExp}
/declare MobsKilled int outer 0
/declare FeedbackTimer timer outer 0
/if (!${Defined[Param0]} && !${Target.ID}) {
/echo You must begin the macro with the name of the character you want to follow targeted, or supply that character's name as a parameter.
/echo Example: /macro FollowExp Sirtanksalot
/return
}
/if (${Defined[Param0]} && !${Spawn[PC ${Param0}].ID}) {
/echo There seems to be no character in the zone matching the name you supplied.
/echo Please restart the macro, making sure to enter the correct name.
/echo Example: /macro Followexp sirtanksalot
/return
}
/if (${Defined[Param0]} && ${Spawn[PC ${Param0}].ID}) {
/varset FollowWho ${Param0}
/target ${FollowWho}
/delay 2s ${Target.ID}
/if (!${Target.ID}) {
/echo Targeting timed out. Please restart the macro.
/return
}
/if (${Target.Name.NotEqual[${FollowWho}]}) {
/if (${Target.ID}) {
/echo A target was acquired, but it does not exactly match the name you supplied.
/echo The macro will begin in 10 seconds, using your current target. If this is not desired, please press the Escape key to end the macro.
/varset FeedbackTimer 10s
:Feedback
/if (${FeedbackTimer} && ${Target.ID}) {
/goto :Feedback
}
/if (${Target.ID}) {
/varset FollowWho ${Target.Name}
/goto :Begin
}
}
}
}
/if (${Target.ID}) {
/varset FollowWho ${Target.Name}
}
:Begin
/if (!${Target.ID}) /return
/echo Following ${FollowWho}. Will calculate exp gained per kill.
/echo You may end the macro at any time by pressing the Escape key.
:Loop
/doevents
/if (${Target.Distance}>60) /keypress up hold
/if (${Target.Distance}<40) /keypress up
/face fast
/delay 2
/if (${Target.ID} && ${Target.Name.Equal[${FollowWho}]}) /goto :Loop
/keypress down
/return
Sub Event_GroupExp
/varcalc MobsKilled (1+${MobsKilled})
/echo Kill number ${MobsKilled} yielded Group XP: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
/return
Sub Event_SoloExp
/varcalc MobsKilled (1+${MobsKilled})
/echo Kill number ${MobsKilled} yielded Solo XP: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
/return
