Here is my DPS module. I have compared it to the MQ2DPS calculations. In all my tests it was 100% the same as the plugins output except:
1) it is self only DPS
2) mine starts tracking DPS when you hit a mob, and the plugin will start tracking as soon as you start attack. For example in my testing when I pulled a mob with an arrow and missed, my DPS started calculating from the time I actually hit when it get it back to the group and hit for the first time.
Usage with Rogue Helper
add the lines in
RED to rh.mac
/echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/echo Jerle's Rogue Helper Macro (v${rhversion}) Starting...
/echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/echo Loading Includes...
/echo Use "/rhhelp" to display help information
/echo -------=======(Current Status)=======--------
#Event StatInfo "[MQ2] -------=======(Current Status)=======--------"
#include DPS.inc
Sub Main
add to your HUD(just change the X and Y location if you need to)
DPSHeader=3,5,326,255,255,255,${If[${DPS_bDPSLoaded},~~~~~~ DPS Stats~~~~~~,]}
DPS=3,5,338,255,255,255,${If[${DPS_bDPSLoaded},${DPS_iTotalDMG} (DMG) / ${DPS_iNumSec} (seconds) = ${DPS_iDPS} DPS,]}
Code: Select all
|**----------------------------------------------------------
DPS.inc
Usage:
add the following to your main script
(just before sub main)
#include RHBackstab.inc
(inside of sub Main)
/echo Loading Includes...
add to your HUD(just change the X and Y location)
DPSHeader=3,5,326,255,255,255,${If[${DPS_bDPSLoaded},~~~~~~ DPS Stats~~~~~~,]}
DPS=3,5,338,255,255,255,${If[${DPS_bDPSLoaded},${DPS_iTotalDMG} (DMG) / ${DPS_iNumSec} (seconds) = ${DPS_iDPS} DPS,]}
NuttsThatKlank
----------------------------------------------------------**|
#Event InitDPS "[MQ2] Loading Includes..."
#Event DPS "You #1# #2# for #3# points of damage."
#Event DPSnm "#1# hit #2# for #3# points of non-melee damage."
Sub Event_InitDPS
/declare DPS_bDPSLoaded bool outer TRUE
/declare DPS_iStart int outer ${Math.Calc[${MacroQuest.Running}/1000]}]}
/declare DPS_iNumSec int outer 0
/declare DPS_iTotalDMG int outer 0
/declare DPS_iDPS int outer 0
/declare DPS_CombatTargetID int outer 0
/echo ---===DPS module loaded===---
/return
sub EVENT_DPS
/call addDMG ${Param1} ${Param3}
/RETURN
sub EVENT_DPSnm
/IF (${Param1.Equal[${Me.Name}]}) {
/call addDMG "non melee" ${Param3}
}
/RETURN
sub addDMG(string dmgType,string Damage)
/IF (${DPS_CombatTargetID}!=${Target.ID} && (${Target.ID}!=NULL)) {
/varset DPS_iStart ${MacroQuest.Running}
/varset DPS_iNumSec 0
/varset DPS_iTotalDMG 0
/varset DPS_CombatTargetID ${Target.ID}
}
/declare tNow float ${MacroQuest.Running}
/varset DPS_iNumSec ${Math.Calc[(${tNow}-${DPS_iStart})/1000]}
/varcalc DPS_iTotalDMG ${DPS_iTotalDMG}+${Damage}
/IF (!${DPS_iNumSec}==0) {
/varset DPS_iDPS ${Math.Calc[${DPS_iTotalDMG}/${DPS_iNumSec}]}]}
}
/RETURN
Enjoy
_________________
--NuttsThatKlank