[Orion] DPS Tracker

If you make a Client-side script you can publish it here for other players to use
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

[Orion] DPS Tracker

Post by MagicUser »

Hey everyone, Muolke pointed out to me recently that DPS would be a cool statistic to keep track of.

I asked about it on the Orion discord. Credit to adverserath for the amazing script :).

I added some comments and made it flow a little better.

Consider adding a screen shot of your "epic dps" below.

Code: Select all

function ShowDPS() {	
	var dps = 0;
	var highestdps = 0;
	
	var lastMessage = null;
	var pastMessage = null;
	var damage_text = [];
	while (true) {
		dps = 0;
		
		lastMessage = Orion.LastJournalMessage();
		pastMessage = lastMessage;
		while (pastMessage && pastMessage.Timer() > Orion.Now() - 1000) {
			if (pastMessage.Serial() == '0xFFFFFFFF' && Orion.Contains(pastMessage.Text(), 'damageecho') && !Orion.Contains(pastMessage.Text(), Player.Serial())) {
				//Damage parsing.
				damage_text = pastMessage.Text().match(/^damageecho:\s\w*=\w*\s\w*=(\d*)/i);
				//Adding damage.
				dps += parseInt(damage_text[1]);
			}
			
			//Check for dps update.
			if (dps > highestdps) {
				//Update dps.
				highestdps = dps;
			}
			
			pastMessage = pastMessage.PrevMessage();
		}
		
		DPSGump(dps, highestdps);
		
		Orion.Wait(200);
	}
}

function DPSGump(dps, highestdps) {
	var gump = Orion.CreateCustomGump(1);
	gump.Clear();
	
	//Set background.
	gump.AddHtmlGump(1, 0, 0, 160, 60, '0x1400', 1, 0);
	
	//Display.
	gump.AddText(10, 10, '0x0035', 'Current DPS -- ' + dps);
	gump.AddText(10, 30, '0x0035', 'Highest DPS -- ' + highestdps);
	
	gump.Update();
}
Last edited by MagicUser on Sat Jan 14, 2023 1:08 am, edited 3 times in total.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: [Orion] DPS Tracker

Post by MagicUser »

crazy_damage.png
crazy_damage.png (34 KiB) Viewed 2803 times
Respectfully,
Paroxysmus ILV Master Spellcaster
User avatar
Cerrera
Legendary Scribe
Posts: 330
Joined: Fri Sep 21, 2018 8:51 am

Re: [Orion] DPS Tracker

Post by Cerrera »

:)
Attachments
dps.jpg
dps.jpg (8.55 KiB) Viewed 2765 times
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Re: [Orion] DPS Tracker

Post by Alibaster »

script newbie here. I loaded the script and ran it but nothing is showing up on my DPS screen. Is there something I am doing wrong? Went hunting and nothing is being registered.
Alibaster in game!!
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: [Orion] DPS Tracker

Post by MagicUser »

Do you have this checked? Make sure you leave the script running as well. Since its a tally and display.
Echo_damage.png
Echo_damage.png (30.86 KiB) Viewed 2743 times
scroft391 wrote:
Sat Jan 14, 2023 9:01 pm
script newbie here. I loaded the script and ran it but nothing is showing up on my DPS screen. Is there something I am doing wrong? Went hunting and nothing is being registered.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: [Orion] DPS Tracker

Post by MagicUser »

:shock:

@40540.
Cerrera wrote:
Sat Jan 14, 2023 6:16 pm
:)
Respectfully,
Paroxysmus ILV Master Spellcaster
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Re: [Orion] DPS Tracker

Post by Alibaster »

That did it. Thanks. Now I just need to figure out how to get such crazy high DPS numbers!
Alibaster in game!!
User avatar
Melkor
Legendary Scribe
Posts: 997
Joined: Sun Feb 14, 2010 1:30 pm

Re: [Orion] DPS Tracker

Post by Melkor »

Thanks for this, I've been wanting a DPS tracker for testing for quite some time.

If we are going to post DPS we should have categories. Here's mine, no pets. I usually use a single target weapon, my WW weapon for this was a 2 handed Blaze of Death. Bigger numbers when more mobs around, even for single target due to reflect physical damage.

-Edited for updated DPS
Attachments
DPS.jpg
DPS.jpg (44.18 KiB) Viewed 2600 times
Last edited by Melkor on Mon Jan 16, 2023 8:43 pm, edited 3 times in total.
Image
TDC Guild
User avatar
Cerrera
Legendary Scribe
Posts: 330
Joined: Fri Sep 21, 2018 8:51 am

Re: [Orion] DPS Tracker

Post by Cerrera »

MagicUser wrote:
Sat Jan 14, 2023 10:17 pm
:shock:

@40540.
Cerrera wrote:
Sat Jan 14, 2023 6:16 pm
:)
All good, just a paint job :P don't have Orion
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Re: [Orion] DPS Tracker

Post by Alibaster »

Is this still working for anyone? For some reason the script won't even load any more. When I click to launch it, the indicator shows up in game with the values of Undefined and the script is not showing as loaded in Orion. Is there a setting someplace that would block this script from running It was working once before but not any more. Any ideas?
Alibaster in game!!
User avatar
Melkor
Legendary Scribe
Posts: 997
Joined: Sun Feb 14, 2010 1:30 pm

Re: [Orion] DPS Tracker

Post by Melkor »

Still works for me
Image
TDC Guild
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Re: [Orion] DPS Tracker

Post by Alibaster »

Melkor wrote:
Fri Mar 10, 2023 4:36 pm
Still works for me
Then I must have made some changes in Orion settings that screwed it up. I have no idea what I did. LOL.
Alibaster in game!!
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: [Orion] DPS Tracker

Post by MagicUser »

Were you able to get it working again Alibaster?
Alibaster wrote:
Fri Mar 10, 2023 4:46 pm
Then I must have made some changes in Orion settings that screwed it up. I have no idea what I did. LOL.
Respectfully,
Paroxysmus ILV Master Spellcaster
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Re: [Orion] DPS Tracker

Post by Alibaster »

No. I must have made a change in my Orion setting or something that interferes with this script. My other scripts work. If I start the script I Debug more, one of the lines is highlighted

var gump = Orion.CreateCustomGump(1);

Not sure if that means anything or not.
Alibaster in game!!
MagicUser
Elder Scribe
Posts: 174
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: [Orion] DPS Tracker

Post by MagicUser »

Custom gumps in Orion are not dynamically allocated. They are hard coded and Orion does not keep track of whether a number is already in use. If you have another custom gump that is custom gump 1, that would be a problem. Are you making any other custom gumps?

Another thing you might check would be that you have the "Echo Damage" box checked in the options under Main (like I talked about above).

Additionally, you will need to have the script file selected or included in the file you have selected when launching the script, not sure if you are using a hotkey or if you are just launching the script.

Could you post a picture of the error message?
Alibaster wrote:
Mon Mar 13, 2023 12:01 am
No. I must have made a change in my Orion setting or something that interferes with this script. My other scripts work. If I start the script I Debug more, one of the lines is highlighted

var gump = Orion.CreateCustomGump(1);

Not sure if that means anything or not.
Never ran the debugger, the debugger has not been a thing for so long that I have already developed my own way of problem solving. I am sure that it is useful if you know how to use it though.
Respectfully,
Paroxysmus ILV Master Spellcaster
Post Reply