Code: Select all
|Countexp.mac Version 1.0
|Written by Dregs
|Based on exp-calculating code from the rogue helper macro
|------------------------------------------------------------------------------
|Usage: Simply start the macro by typing /macro countexp
|------------------------------------------------------------------------------
#event GroupExp "#*#You gain party experience#*#"
#event SoloExp "#*#You gain experience#*#"
Sub Main
/declare MobsKilled int outer 0
/declare LDExp float outer ${Me.PctGroupLeaderExp}
/declare AAExp float outer ${Me.PctAAExp}
/declare Exp float outer ${Me.PctExp}
/declare CurrentAA int outer ${Me.AAPointsTotal}
/declare CurrentLevel int outer ${Me.Level}
/declare CurrentLeaderPoints int outer ${Me.GroupLeaderPoints}
/echo CountExp macro begun. Will count exp gained per mob killed.
:Loop
/doevents
/goto :Loop
/return
Sub Event_GroupExp
/varcalc MobsKilled (1+${MobsKilled})
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: REG (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%)
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: REG (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: Reg (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: Reg (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/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}]}%)
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Group XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/varset CurrentAA ${Me.AAPointsTotal}
/varset CurrentLevel ${Me.Level}
/varset CurrentLeaderPoints ${Me.GroupLeaderPoints}
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
/return
Sub Event_SoloExp
/varcalc MobsKilled (1+${MobsKilled})
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: REG (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%)
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: REG (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: Reg (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}>${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: Reg (${Math.Calc[100+${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/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}]}%)
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}==${CurrentAA} && ${Me.GroupLeaderPoints}>${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[100+${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/if (${Me.Level}==${CurrentLevel} && ${Me.AAPointsTotal}>${CurrentAA} && ${Me.GroupLeaderPoints}==${CurrentLeaderPoints}) {
/echo Kill number ${MobsKilled} yielded Solo XP: Reg (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[100+${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%
}
/varset CurrentAA ${Me.AAPointsTotal}
/varset CurrentLevel ${Me.Level}
/varset CurrentLeaderPoints ${Me.GroupLeaderPoints}
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
/return

