Anyway, here's the code.
Code: Select all
|Countexp.inc Version 1.0
|Written by Dregs
|Based on exp-calculating code from the rogue helper macro
|------------------------------------------------------------------------------
|Usage: Make sure to include a line for /doevents
| Post these variables into the macro you want to call this snippet from:
|
| /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}
|------------------------------------------------------------------------------
#event GroupExp "#*#You gain party experience#*#"
#event SoloExp "#*#You gain experience#*#"
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
