Starfleet Commander Forum

Starfleet Commander => General Starfleet Discussion => Topic started by: Dark Eye on March 02, 2016, 06:18:29 PM

Title: Eljer scripts
Post by: Dark Eye on March 02, 2016, 06:18:29 PM
Any idea if they will be updated, or someone come out with new ones?

Title: Re: Eljer scripts
Post by: Pantin on March 02, 2016, 06:33:45 PM
they won't, he's MIA as a new daddy of two.

The best you can hope for is for someone with the correct programming skills to fix/update the scripts and for eljer to host the updates on his site once they've been fixed.
Title: Re: Eljer scripts
Post by: sgt tj hooker on March 03, 2016, 01:30:10 AM
or you can just fix it.

what exactly is the problem?
Title: Re: Eljer scripts
Post by: Dark Eye on March 03, 2016, 02:11:40 AM
One issue is that stat script is not seeing moons, it sees the planet that has a moon as a moon

Planetary Buildings
Mines   Power      Warehouses      Fields      
Planet    Coords    Ore    Crys    Hydro    SA    NPP    SY    Cap    Lab    Silo    Fctry    Ore    Cry    Hyd    Fndry   Den   Used   Left   Energy   MaxTemp
316   x:xx:1   31   27   27   28   13   13   14   14   7   7   12   11   10   5   3   222 of 316   94   8,224   97
321   x:xx:7   30   25   28   28   12   12   13   14   5   6   12   10   10   5   0   210 of 320   110   2,223   45
1-m   x:xx:11m   36   32   39   37   18   21   19   20   11   9   12   12   17   11   8   302 of 320   18   11,165   -8
317   x:xx:12   30   25   31   28   15   12   15   15   5   5   13   10   11   6   3   224 of 316   92   9,209   4
309   x:xx:14   29   25   35   32   14   13   15   16   5   5   11   10   12   8   4   234 of 309   75   2,570   -47
2-m   x:xx:4m   29   25   28   28   12   16   17   15   7   11   12   10   11   7   9   237 of 310   73   1,118   66
3-m   x:xx:6m   33   28   34   31   0   18   17   18   12   0   13   12   14   9   0   239 of 246   7   18,788   66
4-m   x:xx:5m   31   27   31   29   0   16   16   15   10   0   13   11   12   7   0   218 of 244   26   9,333   61
5-m   x:xx:7m   32   27   31   28   11   17   17   15   8   7   14   11   13   8   5   244 of 309   65   3,509   37


Moon Buildings
Name    Coords    Shipyard    Capitol    Lunar Base    Oracle    Warp Gate    Dock   Fields
0   0   0   0   0   0   0   0   0 of 0
Title: Re: Eljer scripts
Post by: sgt tj hooker on March 06, 2016, 06:35:50 AM
Looks like bfg moved what were the div ids for the planet coords to the moon coords so the new div id for planet coords isnt mapped to the stat table (as well as all the moon production). For proof, take a look at the production; the production is correct for the planet, but shows the coords for the moon. Further proof the divs were changed is that the moon gates etc are missing, meaning the new div id for "other_planet moon" is not in b's script, so it cannot getElementByID, because the ID changed...

I found it, so the next guy can recode it lol.

He's quite the coder!
Title: Re: Eljer scripts
Post by: WEG3 on March 06, 2016, 10:31:17 AM
There is an updated Script floating around somewhere, (not on Eijers site unfortunately  :-\ )

With the correct info, showing where it should be ... also with the Heph 'in flight' issue sorted too :D
Title: Re: Eljer scripts
Post by: Stefen Reincarnate on March 06, 2016, 11:57:31 PM
Having trouble with the latest new and improved Firefox version.  It keeps freezing up.  Has anyone tried the new Microsoft "EDGE" browser?  It seems to work great, but I can't figure out how to get any of the scripts to work....openparser, Battlementat, nor Eljer seem to work after downloading.
Title: Re: Eljer scripts
Post by: sgt tj hooker on March 07, 2016, 12:50:00 PM
scriptish
Title: Re: Eljer scripts
Post by: Dark Eye on March 07, 2016, 04:07:52 PM
There is an updated Script floating around somewhere, (not on Eijers site unfortunately  :-\ )

With the correct info, showing where it should be ... also with the Heph 'in flight' issue sorted too :D

Would love to find it.   we need to find someone to update all of the scripts,  I am willing to paypal a few bucks to the project
Title: Re: Eljer scripts
Post by: Boris Alden on May 16, 2016, 04:03:23 PM
I will quite happily host the SFC scripts on my webserver if someone re-writes them so they are upto date...

I do keep a copy of the old one's there also http://www.klingonblackfleet.co.uk/scripts/

Enjoy
Title: Re: Eljer scripts
Post by: belgarath on May 22, 2016, 10:47:49 AM
Hay thanks for the link for the scripts. SFC user scripts site has gone down and couldn't find them anywhere
Title: Re: Eljer scripts
Post by: Anij on May 25, 2016, 03:24:35 AM
Yes, much appreciated. They make things so much easier.
Title: Re: Eljer scripts
Post by: Rogan on June 04, 2016, 05:26:21 PM
Here is a modified StatsScript that works for SFCO.

I changed the name of the object for the heph to 'Roaming_planet_1_mini' for each instance it was referenced and also for the moon to 'other_planet moon selected'
Title: Re: Eljer scripts
Post by: Eugene McMullin on June 04, 2016, 06:56:59 PM
Three Cheers for Rogan!!!
The Stat Script Works for all planets and moons.  Good work Sir.

P.S.  I have updated the documentation at the top, See below...
Gene

//1.6.0.2 -- actually fixed shipyard timer on moon
//1.6.0.3 -- 1)BFG changed the wrapper for Hephaestus from Roaming_planet to Roaming_Planet_1
//         and in one case Roaming_Planet_Move
//       2)BFG changed /Moon/ to /other_planet/.
//       3)Bfg changed how Moons were search for.
//1.6.0.5 -- Changed /other_planet/ to /other_planet moon selected/. Thanks to Rogan Lors

Title: Re: Eljer scripts
Post by: sgt tj hooker on June 10, 2016, 06:54:49 PM
v    Vacation    Players on vacation.
i    Inactive    Players inactive for the past 7 days.
I    Inactive    Players inactive for the past 21 days.
n    Newbie    Players too low for you to attack.
N    Newbie    Players too high for you to attack.
d    Diplomacy Mode    Players in Diplomacy Mode, who cannot be attacked.
!    Diplomacy Mode    Diplomacy Mode is being toggled by this player.
p    Pantin mode    Friends of Pantin, who cannot be attacked
*    Activity    Planets with activity in the last 15 minutes.
s    Suspended    Players who have been suspended
Title: Re: Eljer scripts
Post by: Pantin on June 11, 2016, 02:26:33 PM
p    Pantin mode    Friends of Pantin, who cannot be attacked


my very sad claim to fame...
Title: Re: Eljer scripts
Post by: ironshins on June 11, 2016, 11:10:03 PM
Many thanks Boris!
Title: Re: Eljer scripts
Post by: Vinegar Joe on June 20, 2016, 12:39:43 AM
Thank you.
Title: Re: Eljer scripts
Post by: ML1 on June 22, 2016, 01:10:32 AM
There is a Script listed "NPC"

It shows some Npc's in red, I can't seem to find any theme as to why or how some are in red.

Anyone have any idea's?
Title: Re: Eljer scripts
Post by: Pantin on June 22, 2016, 02:42:44 AM
it's changing the NPC coloring based on npc severity number. It's a feature we wanted added to be able to see the good NPCs from the bad ones.

You should have a button allowing you to select the NPC severity number, if you dont you have an loder version and youll need to open the script and manually change it.
Title: Re: Eljer scripts
Post by: Captain Blackbeard on June 22, 2016, 02:48:55 PM
The script that use to record your info from the buildings page and use that to tell you how long the ships in queue would take to finish building has quit working. Anybody have any info on this please.
Title: Re: Eljer scripts
Post by: Captain Blackbeard on June 22, 2016, 08:49:54 PM
Also how do you install the StatScript.user.js into Firefox. Thanks
Title: Re: Eljer scripts
Post by: ML1 on June 23, 2016, 11:48:11 PM
Once you have GreaseMonkey loaded.  (Grease is the word, is the word, is the word)


Then you just need to click on the script while in Firefox.

Once you open a window, in the location bar, find the script, even if it is stored on your puter. Once you find it, just click on it.  It will auto load.


Title: Re: Eljer scripts
Post by: Captain Blackbeard on June 24, 2016, 10:03:54 PM
Okay Thanks. Got it. I clicked oh it and it saved itself to my download folder. I went to it had to right click then select open with. When that box opened I chose desktop then Firefox then whrn I clicked an the file and selected open it installed itself in grease monkey.
Title: Re: Eljer scripts
Post by: ML1 on July 01, 2016, 12:42:32 AM
Anyone else having trouble with Battlementat?

I only seem to be having the issue on one PC.  I suspect it is a Win 10 or Firefox issue.


When I run a calc, and then click the copy button next to the Dios.  When I paste on the harvest screen the number is different than what I copied.

It's almost like the copy paste, max's out at so many digits.

Anyone else see this?
Title: Re: Eljer scripts
Post by: Sean Alderson on July 08, 2016, 01:28:34 PM
Looks as though his domain name, www.eljercode.com is up for grabs on godaddy....

Welcome to: eljercode.com
This Web page is parked for FREE, courtesy of GoDaddy.com.
Title: Re: Eljer scripts
Post by: Dead Zone on July 27, 2016, 12:47:11 AM
I will quite happily host the SFC scripts on my webserver if someone re-writes them so they are upto date...

I do keep a copy of the old one's there also http://www.klingonblackfleet.co.uk/scripts/

Enjoy



I think this site is down too now, on 4 different computers and networks I have not been able to access them
Title: Re: Eljer scripts
Post by: Locutus on August 31, 2016, 03:41:10 AM
just an FYI, I've been hosting a site for SDE scripts which a lot are compatible w/ SFC as well but I don't recall which ones.  I'm currently createing a new script as well to format the page to be more compatible for 1920x1080 resolutions.

Link to the site is http://bfg.kcnetworks.biz (http://bfg.kcnetworks.biz)
Title: Re: Eljer scripts
Post by: sgt tj hooker on September 14, 2016, 03:32:38 AM
boris' site is back up

i would highly recommend to anyone wanting to use all the hard work that has been put into these tools after the site goes back down that you copy save all the scripts. bfg will continue to fine tune javascript to fit their needs, and renaming the unique id's breaks small pieces of code in the scripts. doesnt meant the whole thing goes down, but it may not behave an any number of ways it is not supposed to if bfg gets...creative.
Title: Re: Eljer scripts
Post by: Baron Von Richtofen on October 17, 2016, 08:39:05 AM
The script that use to record your info from the buildings page and use that to tell you how long the ships in queue would take to finish building has quit working. Anybody have any info on this please.
I'm having the same kind of problem.  Sometimes it works sometimes it doesn't.
Title: Re: Eljer scripts
Post by: Locutus on November 06, 2016, 10:17:54 PM
So most of the eljerscripts were the same regardless of SDE/SFC and I've added the ones ***flagged*** working in the script to my site as well.  If anyone has any scripts that aren't listed there you're welcome to go to my about page and e-mail me about them.  Most of my scripts are slightly higher version number than the ones on eljer to make updating them from my site more of an automatic  thing (if that ever happens).

I also forgot to mention that there is some update scripts that were fixed on the SDEN side that may also fix issues on the SFC side that were precoded to work with both sides.  Example  When titan is deployed one of the scripts would break, a alliance mate fixed it to work with deployed titans.  This is just one of the examples of several scrips fixed.

http://bfg.kcnetworks.biz

Peace, Love, & Joy and happy shooting out there.

Locutus
Title: Re: Eljer scripts
Post by: Rohi on November 10, 2016, 07:36:08 PM
I am getting runtime errors when installing scripts from your site
Title: Re: Eljer scripts
Post by: Locutus on December 03, 2016, 05:06:18 AM
There is an updated Script floating around somewhere, (not on Eijers site unfortunately  :-\ )

With the correct info, showing where it should be ... also with the Heph 'in flight' issue sorted too :D

I used to play on SDEN and an alliancemate fixed the statscript.  If it's still compatible with SFC <which I believe it is> then I know for sure it fixed the titan deployed issue and maybe the other one stated as well.

I host a copy of the said script at http://bfg.kcnetworks.biz and you're welcome to try it out.  I think it was updated approximately 1 year ago.
Title: Re: Eljer scripts
Post by: Locutus on December 03, 2016, 05:15:55 AM
I am getting runtime errors when installing scripts from your site

That's a first I've heard of that issue.  If you can toss me a screenshot <my e-mail is on the "Contact Me" page> with your error I would be happy to help troubleshoot your issue with you.  No one else has reported that issue to me.

Things I would need to know.
> Browser
> Extension Used for userscripts
> What script were you attempting to download
> Exact error message you are getting

I've been busy lately so it may take a few days to get back.
Title: Re: Eljer scripts
Post by: Boris Alden on December 08, 2016, 10:41:52 AM
Sorry guys when my site was unavaialble I moved house no one knew....
Title: Re: Eljer scripts
Post by: RLaburda on January 08, 2017, 11:44:03 PM
Anyone still have the old quick fleetsave script that Eljer once had that made selecting ships / res for overnight saves?  I saw it mentioned on the forums in 1-2 posts, but no updated link to it, and not on the userscripts sites.
Title: Re: Eljer scripts
Post by: Locutus on January 30, 2017, 07:17:55 PM
I never heard of a script that would do that.  It would probably also violate BFG current TOS regarding scripts that "automate" functions of the game.  On the other note if you do find it let me know and I'll take that up with  BFG before posting on my site.

My contact information is on my site on the "Contact Me"
Title: Re: Eljer scripts
Post by: RLaburda on February 01, 2017, 09:31:32 PM
It didn't automate the FRS; it just had a better option, when on your fleet page, to select all ships/resources and set the FRS time-away.  Much like the options to click the # on the ships needed to transport and it put that amount in the ship count box.
Title: Re: Eljer scripts
Post by: RLaburda on February 01, 2017, 09:34:51 PM
It used to be under http://eljercode.com/FRSAssist.user.js, see http://forum.playstarfleet.com/index.php?topic=24049.5;wap2
Title: Re: Eljer scripts
Post by: A Ruckus on March 19, 2018, 06:24:23 PM
You can find lots of the user scripts at https://www.sfolegacy.com/scripts
Title: Re: Eljer scripts
Post by: A Ruckus on March 20, 2018, 09:20:12 PM
I have added the FRS Assist Script to the website.  https://www.sfolegacy.com/scripts
Title: Re: Eljer scripts
Post by: rick blackford on March 30, 2018, 07:57:59 PM
This helped me!!! From the legacy page link above...

"This is a step by step guide to fix your user scripts.
On you browser i.e. Chrome, at the very top right you will see a black and white icon.  If you hover your mouse over it, it will say “Tampermonkey”, click on it.
You will get a drop down menu, click on Dashboard.
The first (top) line is the header (Enabled, Name, Version, Sites, Fratures, Homepage, Last Updated, Actions). Under “Actions look for the edit icon (hover your mouse curser over the icon and it will tell you which one it is) and click it.
This opens up the script, don’t worry this will be easy. At the very top you will see “// ==UserScript==”,
Just under a few lines under that you will see “// @include” at the start of the line, these are all the websites/games this script works for.  You are looking for the ones that contain http://*starfleet*.com, all you need to do is add the letter “s” after the http, it should look like this https://*starfleet*.com.
Then click on the save icon.
Do this to all the scripts then reload the page."

However the "?" shortcut for open parser does not work. You must use the O! link for the 'other' open parser. I liked the one with the popup box better.....

Edit: This is now fixed, there were several http that needed changed.
Title: Re: Eljer scripts
Post by: Sean Alderson on March 30, 2018, 09:39:29 PM
Anyone having problems with the statscripts? They seem to be not working on my end.
I use Chrome, Opera and Mozilla. none of them are working.
Title: Re: Eljer scripts
Post by: Huntsman on March 31, 2018, 06:38:36 AM
This was posted by an alliance member in Extreme 3. Hope it helps.

I used GreaseMonkey to inspect the scripts, and at the top of each one, I noted that most of the web addresses started with either a * or with http://. I either added an s to the http ones, or I just pasted https:// in front of the * and saved the changes. That seemed to fix my scripts. I'm not Javascript savvy, so I can't do anything more beyond what I just described.

Title: Re: Eljer scripts
Post by: slickerpimp on March 31, 2018, 03:22:48 PM
I use tampermonkey with firefox and this is my fix for all scripts.

Open firefox
In the top right corner is an icon for tampermonkey...click on it
when it opens the drop menu, click DASHBOARD
this is your scripts...on the right of each script is a edit and garbage...click edit
it will open the script with an EDITOR tab...
click on EDIT and then REPLACE ALL...
type this into the replace all box that pops up    http://
the next box is replace with, type this exact    https://
click on file then save

If done correctly you will see a padlock icon under the feature section on the dashboard.
ALL DONE...repeat for all other scripts and restart firefox.
Title: Re: Eljer scripts
Post by: rick blackford on March 31, 2018, 04:13:45 PM
I just posted this same fix yesterday!  Also on the open parser script, there are multiple places to change http to https, so look carefully.

All scripts back in working order again.

If you need any more detail, pm me.

Happy Hunting.
Title: Re: Eljer scripts
Post by: raider007 on May 21, 2018, 06:29:07 PM
i noticed that http://bfg.kcnetworks.biz/ is missing one of the best scripts ever.
'battle report formatter'

 included below.

thanks!



// ==UserScript==
// @name BattleReportReformatter2
// @namespace https://eljercode.com
// @description Reformats battle reports for easier posting showing only the outcome with losses
// @include https://*playstarfleet*/messages/additional_content/*
// @include https://*stardrift*/messages/additional_content/*
// @version 2.2.5
// ==/UserScript==
// 2.2   -- added sde support
// 2.2.1 -- img alts changed again, updated function
// 2.2.2 -- fixed missiles (6->16)
// 2.2.3 -- added total ship count (Lost X of Y)
// 2.2.4 -- fixed longstanding bug of report showing all defenses wiped
// 2.2.5 -- added Nova ships and Nova DSP breakouts for GA/GD.
//          courtesy of Kronin - http://hubbach.com
// 2013.05.21 - rrh - fixed for conquest

//get primary attacker, defender, defender's location, outcome summary, and round info

var vBattleLog = GetClassItem(document.getElementById('content'), 'div', 'battle_log');
var vMainParticipants = GetClassItem(vBattleLog, 'div', 'participants');
var vAttackerList = GetClassItem(vMainParticipants, 'div', 'attacker');
var vShipAlt;

var TOTAL_NUM_SHIPS = 26;
var TOTAL_NUM_DEFENSES = 11;
var TOTAL_NUM_SHIPS_AND_DEFENSES = TOTAL_NUM_SHIPS + TOTAL_NUM_DEFENSES;

var vAttackers = new Array();

var vElements = vAttackerList.getElementsByTagName('div');

for (var i = 0; i < vElements.length; i++) {
   if (typeof vElements == "object" && vElements.getAttribute('class') == 'name') {
      addPlayer(vAttackers, vElements.innerHTML);
   }
}

var vDefenderList = GetClassItem(vMainParticipants, 'div', 'defender');
var vDefenders = new Array();
var vElements = vDefenderList.getElementsByTagName('div');

for (var i = 0; i < vElements.length; i++) {
   if (typeof vElements == "object" && vElements.getAttribute('class') == 'name') {
      addPlayer(vDefenders, vElements.innerHTML);
   }
}

var vMainAttacker = vAttackers[0]['name'];
var vMainDefender = vDefenders[0]['name'];

var vLocationDiv = GetClassItem(GetClassItem(vMainParticipants, 'div', 'defender'), 'div', 'stats');
var vLocation=ReturnSystemLink(GetClassItem(vLocationDiv,'span','planet_name').innerHTML+' '+GetClassItem(vLocationDiv,'span','planet_coords').innerHTML);

var vFireFox = false;
if (vLocationDiv.innerText == null) { vFireFox = true; }
var vOutcome = GetClassItem(vBattleLog, 'div', 'outcome');

if (vFireFox == true) {
   vOutcome = vOutcome.textContent;
} else {
   vOutcome = vOutcome.innerText;
}

vOutcome = vTrim(vOutcome.replace(/\s\s/g, ' ').replace(/\s\s/g, ' ').replace(/\s\s/g, ' ').replace(/\s\s/g, ' ').replace(/\s\s/g, ' ').replace(/\s\s/g, ' ')).replace(/\.\s/g, '.<br />');

var vDivs = vBattleLog.getElementsByTagName('div');
var RountCount = ''

for (divCount = 0; divCount < vDivs.length; divCount++) {
   var div = vDivs[divCount];
      if (div.getAttribute('class') == 'round_title') {
      if (vTrim(div.innerHTML) == 'Round 1') { var vRound1 = div.parentNode; }
      if (vTrim(div.innerHTML) == 'Round 1') { RoundCount = '1'; }
      if (vTrim(div.innerHTML) == 'Round 2') { RoundCount = '2'; }
      if (vTrim(div.innerHTML) == 'Round 3') { RoundCount = '3'; }
      if (vTrim(div.innerHTML) == 'Round 4') { RoundCount = '4'; }
      if (vTrim(div.innerHTML) == 'Round 5') { RoundCount = '5'; }
      if (vTrim(div.innerHTML) == 'Round 6') { RoundCount = '6'; }
      if (vTrim(div.innerHTML) == 'Final State') { var vFinalRound = div.parentNode; }
   }
}

var currentPlayer = null;

if (vRound1 != null) {
   var vDivs = vRound1.getElementsByTagName('div');
   for (divCount = 0; divCount < vDivs.length; divCount++) {
      var div = vDivs[divCount];
      if (typeof div == "object" && div.getAttribute('class') == 'name') {
         var vData = vTrim(div.innerHTML).split(': ');
         if (vData[0] == "ATTACKER") {
            currentPlayer = findAttackingPlayer(vData[1]);
            if(currentPlayer == null) { currentPlayer = addPlayer(vAttackers, vData[1]); }
         } else {
            currentPlayer = findDefendingPlayer(vData[1]);
            if(currentPlayer == null) { currentPlayer = addPlayer(vDefenders, vData[1]); }
         }
         currentPlayer['fleetssent']++;
      }

      if (typeof div == "object" && div.getAttribute('class') == 'attacker ships') {
         var vShips = new Array();
         GetClassArray(div, 'div', 'ship', vShips);
         for (var shipCount = 0; shipCount < vShips.length; shipCount++) {
            var ship = vShips[shipCount];
            if (ship.getAttribute('class') == 'ship') {
                vShipAlt=ship.getElementsByTagName('img')[0].getAttribute('alt');
                var vShip = GetShipIndex(ship.getElementsByTagName('img')[0].getAttribute('alt').substring(((vShipAlt.substring(0,5).toLowerCase()=='icon_')?5:0)));
                var vQty = parseInt(vTrim(GetClassItem(ship, 'div', 'number').innerHTML).substr(1).replace(/,/g, ''));
                currentPlayer['initialships'][vShip] += vQty;   
            }
         }
      }

      if (typeof div == "object" && div.getAttribute('class') == 'attacker defenses') {
         var vShips = new Array();
         GetClassArray(div, 'div', 'ship', vShips);
         for (var shipCount = 0; shipCount < vShips.length; shipCount++) {
            var ship = vShips[shipCount];
            if (ship.getAttribute('class') == 'ship') {
               vShipAlt=ship.getElementsByTagName('img')[0].getAttribute('alt');
               var vShip = GetShipIndex(ship.getElementsByTagName('img')[0].getAttribute('alt').substring(((vShipAlt.substring(0,5).toLowerCase()=='icon_')?5:0)));
               var vQty = parseInt(vTrim(GetClassItem(ship, 'div', 'number').innerHTML).substr(1).replace(/,/g, ''));
               currentPlayer['initialdefenses'][vShip] += vQty;
            }
         }
      }

      if (vDivs[divCount].getAttribute('class') == 'synopsis') { break; }
   }
}

if (vFinalRound != null) {
   var vDivs = vFinalRound.getElementsByTagName('div');
   for (divCount = 0; divCount < vDivs.length; divCount++) {
      var div = vDivs[divCount];
      if (typeof div == "object" && div.getAttribute('class') == 'name') {
         var vData = vTrim(div.innerHTML).split(': ');
         if (vData[0] == "ATTACKER") {
            currentPlayer = findAttackingPlayer(vData[1]);
         } else {
            currentPlayer = findDefendingPlayer(vData[1]);
         }
      }

      if (typeof div == "object" && div.getAttribute('class') == 'destroyed') { }

      if (typeof div == "object" && div.getAttribute('class') == 'attacker ships') {
         var vShips = new Array();
         GetClassArray(div, 'div', 'ship', vShips);
         for (var shipCount = 0; shipCount < vShips.length; shipCount++) {
            var ship = vShips[shipCount];
            if (ship.getAttribute('class') == 'ship') {
               vShipAlt=ship.getElementsByTagName('img')[0].getAttribute('alt');
               var vShip = GetShipIndex(ship.getElementsByTagName('img')[0].getAttribute('alt').substring(((vShipAlt.substring(0,5).toLowerCase()=='icon_')?5:0)));
               var vQty = parseInt(vTrim(GetClassItem(ship, 'div', 'number').innerHTML).substr(1).replace(/,/g, ''));
               currentPlayer['finalships'][vShip] += vQty;
            }
         }
      }

      if (typeof div == "object" && div.getAttribute('class') == 'attacker defenses') {
         var vShips = new Array();
         GetClassArray(div, 'div', 'ship', vShips);
         for (var shipCount = 0; shipCount < vShips.length; shipCount++) {
            var ship = vShips[shipCount];
            if (ship.getAttribute('class') == 'ship') {
               vShipAlt=ship.getElementsByTagName('img')[0].getAttribute('alt');
               var vShip = GetShipIndex(ship.getElementsByTagName('img')[0].getAttribute('alt').substring(((vShipAlt.substring(0,5).toLowerCase()=='icon_')?5:0)));
               var vQty = parseInt(vTrim(GetClassItem(ship, 'div', 'number').innerHTML).substr(1).replace(/,/g, ''));
               currentPlayer['finaldefenses'][vShip] += vQty;
            }
         }
      }

      if (vDivs[divCount].getAttribute('class') == 'synopsis') { break; }
   }
}

var vNewReport = vMainAttacker + ' led an attack on ' + vMainDefender + ' at ' + vLocation + '.<br />';
vNewReport += 'The following emerged from battle after ' + RoundCount + ' Round(s)';
vNewReport += '<br />';
var vTotalAttackersShipsRSPLost = 0;
var vTotalInitialAttackerRSP = 0;
for (i = 0; i < vAttackers.length; i++) {
   //alert('vAttackers = '+vAttackers);
   vAttackers['initialrsp'] = CalcRSP(vAttackers['initialships'],TOTAL_NUM_SHIPS);
   vTotalInitialAttackerRSP += vAttackers['initialrsp'];
   vSurvived = false;
   for (var z = 0; z < TOTAL_NUM_SHIPS; z++) {
      if (vAttackers['finalships'] != null && vAttackers['finalships'][z] != null && parseInt(vAttackers['finalships'][z]) > 0) {
         vSurvived = true;
         break; 
      }
   }
   vAttackers['script'] += '<br />*****Attacker: ' + vAttackers['name'] + ' with ' + addCommas(vAttackers['initialrsp'].toString()) + ' RSP involved (initial fleet RSP) *****<br />';
   var vDmg = new Array(0, 0, 0);
   for (j = 0; j < TOTAL_NUM_SHIPS; j++) {
      initialshipCount = (vAttackers['initialships'] != null && vAttackers['initialships'][j] != null) ? vAttackers['initialships'][j] : 0;
      finalshipCount = (vAttackers['finalships'] != null && vAttackers['finalships'][j] != null) ? vAttackers['finalships'][j] : 0;
      if (initialshipCount > 0) {
         var vShipLost = '';
         if (vSurvived == false) {
            vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
            var vLost = initialshipCount;
            vDmg[0] += (OreCost(j) * vLost);
            vDmg[1] += (CrysCost(j) * vLost);
            vDmg[2] += (HydroCost(j) * vLost);
         } else {
            if (finalshipCount > 0) {
               if (initialshipCount != finalshipCount) {
                  var vLost = initialshipCount - finalshipCount;
                  vDmg[0] += (OreCost(j) * vLost);
                  vDmg[1] += (CrysCost(j) * vLost);
                  vDmg[2] += (HydroCost(j) * vLost);
                  vShipLost = finalshipCount + '&nbsp;&nbsp;(Lost: ' + vLost + ' of ' + initialshipCount + ')';
               } else {
                  vShipLost = finalshipCount;
               }
            } else {
               vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
               var vLost = initialshipCount;
               vDmg[0] += (OreCost(j) * vLost);
               vDmg[1] += (CrysCost(j) * vLost);
               vDmg[2] += (HydroCost(j) * vLost);
            }
         }
         vAttackers['script'] += GetShipName(j) + ': ' + vShipLost + '<br />';
      }
   }
   vTotalAttackersShipsRSPLost += (vDmg[0] + vDmg[1] + vDmg[2]);
   vAttackers['script'] += '** Resources lost: ' + addCommas(vDmg[0].toString()) + ' ore, ' + addCommas(vDmg[1].toString()) + ' crystal, and ' + addCommas(vDmg[2].toString()) + ' hydrogen.<br />';
}

var vTotalDefendersShipsRSPLost = 0;
var vTotalInitialDefenderRSP = 0;
for (i = 0; i < vDefenders.length; i++) {
   vDefenders['initialrsp'] = CalcRSP(vDefenders['initialships'],TOTAL_NUM_SHIPS);
   vTotalInitialDefenderRSP += vDefenders['initialrsp'];
   vSurvived = false;
   for (var z = 0; z < TOTAL_NUM_SHIPS_AND_DEFENSES; z++) {
      if ((vDefenders['finalships']!=null || vDefenders['finaldefenses']!=null) && (vDefenders['finalships'][z]!=null || vDefenders['finaldefenses'][z]!=null) && (parseInt(vDefenders['finalships'][z])>0 || parseInt(vDefenders['finaldefenses'][z])>0)) {
         vSurvived = true;
      }
   }
   vDefenders['script'] += '<br />*****Defender: ' + vDefenders['name'] + ' with ' + addCommas(vDefenders['initialrsp'].toString()) + ' RSP involved (initial fleet RSP) *****<br />';
   var vDmg = new Array(0, 0, 0);
   var vShipDmg = new Array(0, 0, 0);
   for (j = 0; j < TOTAL_NUM_SHIPS; j++) {
      initialshipCount = (vDefenders['initialships'] != null && vDefenders['initialships'][j] != null) ? vDefenders['initialships'][j] : 0;
      finalshipCount = (vDefenders['finalships'] != null && vDefenders['finalships'][j] != null) ? vDefenders['finalships'][j] : 0;
      if (initialshipCount > 0) {
         var vShipLost = '';
         if (vSurvived == false) {
            vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
            var vLost = initialshipCount;
            vShipDmg[0] += (OreCost(j) * vLost);
            vShipDmg[1] += (CrysCost(j) * vLost);
            vShipDmg[2] += (HydroCost(j) * vLost);
         } else {
            if (finalshipCount > 0) {
            if (initialshipCount != finalshipCount) {
            var vLost = initialshipCount - finalshipCount;
            vShipDmg[0] += (OreCost(j) * vLost);
            vShipDmg[1] += (CrysCost(j) * vLost);
            vShipDmg[2] += (HydroCost(j) * vLost);
            vShipLost = finalshipCount + '&nbsp;&nbsp;(Lost: ' + vLost + ' of ' + initialshipCount + ')';
            } else {
            vShipLost = finalshipCount;
            }
            } else {
            vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
            var vLost = initialshipCount;
            vShipDmg[0] += (OreCost(j) * vLost);
            vShipDmg[1] += (CrysCost(j) * vLost);
            vShipDmg[2] += (HydroCost(j) * vLost);
            }
         }
         vDefenders['script'] += GetShipName(j) + ': ' + vShipLost + '<br />';
      }
   }
   vTotalDefendersShipsRSPLost += (vShipDmg[0] + vShipDmg[1] + vShipDmg[2]);

   vDmg[0] = vShipDmg[0];
   vDmg[1] = vShipDmg[1];
   vDmg[2] = vShipDmg[2];
   for (j = TOTAL_NUM_SHIPS; j < TOTAL_NUM_SHIPS_AND_DEFENSES; j++) {
      initialshipCount = (vDefenders['initialdefenses'] != null && vDefenders['initialdefenses'][j] != null) ? vDefenders['initialdefenses'][j] : '0';
      finalshipCount = (vDefenders['finaldefenses'] != null && vDefenders['finaldefenses'][j] != null) ? vDefenders['finaldefenses'][j] : '0';
      if (initialshipCount > 0) {
         var vShipLost = '';
         if (vSurvived == false) {
            vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
            var vLost = initialshipCount;
            vDmg[0] += (OreCost(j) * vLost);
            vDmg[1] += (CrysCost(j) * vLost);
            vDmg[2] += (HydroCost(j) * vLost);
         } else {
            if (finalshipCount > 0) {
               if (initialshipCount != finalshipCount) {
                  var vLost = initialshipCount - finalshipCount;
                  vDmg[0] += (OreCost(j) * vLost);
                  vDmg[1] += (CrysCost(j) * vLost);
                  vDmg[2] += (HydroCost(j) * vLost);
                  vShipLost = finalshipCount + '&nbsp;&nbsp;(Lost: ' + vLost + ' of ' + initialshipCount + ')';
               } else { vShipLost = finalshipCount; }
            } else {
               vShipLost = '0&nbsp;&nbsp;(Lost: ' + initialshipCount + ' of ' + initialshipCount + ')';
               var vLost = initialshipCount;
               vDmg[0] += (OreCost(j) * vLost);
               vDmg[1] += (CrysCost(j) * vLost);
               vDmg[2] += (HydroCost(j) * vLost);
            }
         }
         vDefenders['script'] += GetShipName(j) + ': ' + vShipLost + '<br />';
      }
   }

   vDefenders['script'] += '** Ship Resources lost: ' + addCommas(vShipDmg[0].toString()) + ' ore, ' + addCommas(vShipDmg[1].toString()) + ' crystal, and ' + addCommas(vShipDmg[2].toString()) + ' hydrogen.<br />';
   vDefenders['script'] += '** Total Resources lost: ' + addCommas(vDmg[0].toString()) + ' ore, ' + addCommas(vDmg[1].toString()) + ' crystal, and ' + addCommas(vDmg[2].toString()) + ' hydrogen.<br />';
}


if(/nova/i.test(document.location.href) || /conquest/i.test(document.location.href)) {
   for (i = 0; i < vAttackers.length; i++) {
      var dsp = Math.floor(Math.floor(vTotalDefendersShipsRSPLost / 1000) * (vAttackers['initialrsp'] / vTotalInitialAttackerRSP) );
      vNewReport += vAttackers['script'] + '** Destroyed Ship Points Base (multiply by Defender RSP / Attacker RSP * 0.5): '+addCommas(dsp.toString())+'<br/>';
      vNewReport += '** Max DSP: ' + addCommas(dsp.toString()) + ' ** Min DSP: ' + addCommas(Math.floor(dsp*0.1).toString()) + '<br />';
   }
   for (i = 0; i < vDefenders.length; i++) {
      var dsp = Math.floor(Math.floor(vTotalAttackersShipsRSPLost / 1000) * (vDefenders['initialrsp'] / vTotalInitialDefenderRSP) );
      vNewReport += vDefenders['script'] + '** Destroyed Ship Points Base (multiply by Attacker RSP / Defender RSP * 0.5): max '+addCommas(dsp.toString())+'<br/>';
      vNewReport += '** Max DSP: ' + addCommas(dsp.toString()) + ' ** Min DSP: ' + addCommas(Math.floor(dsp*0.1).toString()) + '<br />';
   }
} else {
   var vAttackerDSPGained = Math.floor(Math.floor(vTotalDefendersShipsRSPLost / 1000) / vAttackers.length);
   for (i = 0; i < vAttackers.length; i++) { vNewReport += vAttackers['script'] + '** Destroyed Ship Points Gained: ' + addCommas(Math.floor(vAttackerDSPGained).toString()) + '<br />'; }
   var vDefenderDSPGained = Math.floor(Math.floor(vTotalAttackersShipsRSPLost / 1000) / vDefenders.length);
   for (i = 0; i < vDefenders.length; i++) { vNewReport += vDefenders['script'] + '** Destroyed Ship Points Gained: ' + addCommas(Math.floor(vDefenderDSPGained).toString()) + '<br />'; }
}

vNewReport += '<br />' + vOutcome;
AddStickyNotice(vNewReport);

function calculateArrayedNumberOf( vSource, vIndex ) {
   var vReturn = 0;
   for(var i = 0; i < vSource.length; i++) {
      vReturn += vSource[vIndex];
   }
   return vReturn;
}

function addPlayer( vArray, vName ) {
   var nextindex = vArray.length;
   vArray[nextindex] = new Array();
   vArray[nextindex]['name'] = vTrim(vName);
   vArray[nextindex]['initialdefenses'] = new Array(TOTAL_NUM_SHIPS_AND_DEFENSES);
   vArray[nextindex]['initialships'] = new Array(TOTAL_NUM_SHIPS_AND_DEFENSES);
   vArray[nextindex]['finalships'] = new Array(TOTAL_NUM_SHIPS_AND_DEFENSES);
   vArray[nextindex]['finaldefenses'] = new Array(TOTAL_NUM_SHIPS_AND_DEFENSES);
   vArray[nextindex]['script'] = '';
   vArray[nextindex]['fleetssent'] = 0;
   vArray[nextindex]['initialrsp'] = 0;
   for (var k = 0; k < TOTAL_NUM_SHIPS_AND_DEFENSES; k++) {
      vArray[nextindex]['initialdefenses'][k] = 0;
      vArray[nextindex]['initialships'][k] = 0;
      vArray[nextindex]['finalships'][k] = 0;
      vArray[nextindex]['finaldefenses'][k] = 0;
   }
   return vArray[nextindex];
}

function GetShipIndex(ShipName) {
   switch (ShipName.toLowerCase()) {
      case 'shadow_probe': return 0; break;
      case 'genesis_solar_satellite': return 1; break;
      case 'hermes_class_probe': return 2; break;
      case 'hermes_probe': return 2; break;
      case 'hermes_class': return 2; break;
      case 'helios_class_solar_satellite': return 3; break;
      case 'helios_solar_satellite': return 3; break;
      case 'solar_satellite': return 3; break;
      case 'artemis_class_fighter': return 4; break;
      case 'artemis_fighter': return 4; break;
      case 'artemis_class': return 4; break;

      // rrh: added 2 new ship types
      case 'erebus_class': return 5; break;

      case 'atlas_class_cargo': return 6; break;
      case 'atlas_cargo': return 6; break;
      case 'atlas_class': return 6; break;
      case 'apollo_class_fighter': return 7; break;
      case 'apollo_fighter': return 7; break;
      case 'apollo_class': return 7; break;
      case 'zagreus_class': return 8; break;
      case 'charon_class_transport': return 9; break;
      case 'charon_transport': return 9; break;
      case 'charon_class': return 9; break;
      case 'hercules_class_cargo': return 10; break;
      case 'hercules_cargo': return 10; break;
      case 'hercules_class': return 10; break;
      case 'empusa_class': return 11;
      case 'dionysus_class_recycler': return 12; break;
      case 'dionysus_recycler': return 12; break;
      case 'dionysus_class': return 12; break;
      case 'curetes_class': return 13; break;
      case 'poseidon_class_cruiser': return 14; break;
      case 'poseidon_cruiser': return 14; break;
      case 'poseidon_class': return 14; break;
      case 'carmanor_class': return 15; break;

      // rrh: added 2 new ship types
      case 'moros_class': return 16; break;
      
      case 'pallas_class': return 17; break;
      case 'gaia_class_colony_ship': return 18; break;
      case 'gaia_colony_ship': return 18; break;
      case 'gaia_class': return 18; break;
      case 'athena_class_battleship': return 19; break;
      case 'athena_battleship': return 19; break;
      case 'athena_class': return 19; break;
      case 'ares_class_bomber': return 20; break;
      case 'ares_bomber': return 20; break;
      case 'ares_class': return 20; break;
      case 'hades_class_battleship': return 21; break;
      case 'hades_battleship': return 21; break;
      case 'hades_class': return 21; break;
      case 'prometheus_class_destroyer': return 22; break;
      case 'prometheus_destroyer': return 22; break;
      case 'prometheus_class': return 22; break;
      case 'thanatos_class': return 23; break;
      case 'zeus_class': return 24; break;
      case 'zeus': return 24; break;
      case 'hephaestus_class_attack_platform': return 25; break;
      case 'titan_attack_platform': return 25; break;
      case 'roaming_planet': return 25; break;
      case 'missile_battery': return 26; break;
      case 'missile_turret': return 26; break;
      case 'laser_cannon': return 27; break;
      case 'laser_turret': return 27; break;
      case 'space_mine': return 28; break;
      case 'pulse_cannon': return 29; break;
      case 'particle_cannon': return 30; break;
      case 'anti-ballistic_missile': return 31; break;
      case 'antiballistic_missile': return 31; break;
      case 'decoy': return 32; break;
      case 'interplanetary_ballistic_missile': return 33; break;
      case 'interplanetary_missile': return 33; break;
      case 'gauss_cannon': return 34; break;
      case 'large_decoy': return 35; break;
      case 'plasma_cannon': return 36; break;
      case 'plasma_turret': return 36; break;
   }
}

function GetShipName(ShipIndex) {
   switch (ShipIndex) {
      case 0: return 'Shadow '; break;
      case 1: return 'Genesis '; break;
      case 2: return 'Hermes '; break;
      case 3: return 'Helios '; break;
      case 4: return 'Artemis '; break;
      
      case 5: return 'Erebus '; break;

      case 6: return 'Atlas '; break;
      case 7: return 'Apollo '; break;
      case 8: return 'Zagreus '; break;
      case 9: return 'Charon '; break;
      case 10: return 'Hercules '; break;
      case 11: return 'Empusa '; break;
      case 12: return 'Dionysus '; break;
      case 13: return 'Curetes '; break;
      case 14: return 'Poseidon '; break;
      case 15: return 'Carmanor '; break;

      case 16: return 'Moros '; break;
      
      case 17: return 'Pallas '; break;
      case 18: return 'Gaia '; break;
      case 19: return 'Athena '; break;
      case 20: return 'Ares '; break;
      case 21: return 'Hades '; break;
      case 22: return 'Prometheus '; break;
      case 23: return 'Thanatos '; break;
      case 24: return 'Zeus '; break;
      case 25:
         if(/stardrift/i.test(document.location.href)) {
            return 'Titan ';
         } else {
            return 'Hephaestus ';
         }
         break;
      case 26: return 'Missile '; break;
      case 27: return 'Laser '; break;
      case 28: return 'Space mine '; break;
      case 29: return 'Pulse '; break;
      case 30: return 'Particle '; break;
      case 31: return 'ABM '; break;
      case 32: return 'Decoy '; break;
      case 33: return 'IPBM '; break;
      case 34: return 'Gauss '; break;
      case 35: return 'Large decoy'; break;
      case 36: return 'Plasma '; break;

   }
}

function ReturnSystemLink(PlanetInBrackets) {
var PlanetMatch = PlanetInBrackets.match(/\[(\d{1,2}):(\d{1,3}):\d{1,2}m?\]/im);
var PlanetLink = '';
var currPlanet = '';
var vURLTest = document.location.href.match(/_planet=(\d+)/i);
if (vURLTest != null) { currPlanet = vURLTest[1]; }
if (PlanetMatch != null) { PlanetLink = '<a href="/galaxy/show?current_planet=' + currPlanet + '&amp;galaxy=' + PlanetMatch[1] + '&amp;solar_system=' + PlanetMatch[2] + '">' + PlanetInBrackets + '</a>'; }
return PlanetLink;
}

function GetTableItem(vTable, vPrevious) {
var vReturn = null;
var vElements = vTable.getElementsByTagName('tr');
if (vPrevious == null) {
vReturn = vElements[0];
}
else {
var i = 0;

for (i = 0; i < vElements.length; i++) {
if (vElements == vPrevious) {
i++;
break;
}
}

if (i < vElements.length)
vReturn = vElements;
}
return vReturn;
}

function GetClassItem(vSource, vTagname, vClass) {
var vReturn = null;
var vElements = vSource.getElementsByTagName(vTagname);
for (var i = 0; i < vElements.length; i++) {
if (typeof vElements == "object" && vElements.getAttribute('class') == vClass) {
vReturn = vElements;
}
}
return vReturn;
}

function GetClassArray(vSource, vTagname, vClass, vReturn) {
var vElements = vSource.getElementsByTagName(vTagname);
var j = 0;
for (var i = 0; i < vElements.length; i++) {
if (typeof vElements == "object" && vElements.getAttribute('class') == vClass) {
vReturn[j] = vElements;
j++;
}
}
}

function vTrim(vInString) { return vInString.replace(/^\s+|\s+$/g, ""); };

function findAttackingPlayer(vName) {
for (var i = 0; i < vAttackers.length; i++) {
if (vName == vAttackers['name']) {
return vAttackers;
}
}
return null;
}

function findDefendingPlayer(vName) {
for (var i = 0; i < vDefenders.length; i++) {
if (vName == vDefenders['name']) {
return vDefenders;
}
}
return null;
}

function AddStickyNotice(StickyNotice) {
   var stickyNotices = document.getElementById('sticky_notices');
   if (vTrim(stickyNotices.innerHTML).length > 0) { stickyNotices.innerHTML += '<br/>'; }
   //var closeMessages = new Array('(close)', '(OK OK!)', '(OKAY)', '(roger)', '(go away)');
   var closeMessage = '(close)'//closeMessages[Math.round(Math.random() * (closeMessages.length - 1))];
   var stickyText = ' <div class="notice">';
   stickyText += ' <div class="close"><span class="ajax_link"><span class="active"><span class="enabled"><a href="#" onclick="disable_ajax_links();; new Ajax.Request('/stickies/close/7&amp;klass=GlobalSticky', {asynchronous:true, evalScripts:true, method:'post'}); return false;">' + closeMessage + '</a></span></span></span></div>';
   stickyText += ' <div class="message">' + StickyNotice + '</div>';
   stickyText += ' </div>';
   stickyNotices.innerHTML += vTrim(stickyText);
}

function OreCost(ShipIndex) {
   switch (ShipIndex) {
      case 0: return 0; break; //shadow
      case 1: return 0; break; //genesis
      case 2: return 0; break; //hermes
      case 3: return 0; break; //helios
      case 4: return 3000; break; //arty

      case 5: return 4000; break; //Erebus

      case 6: return 2000; break; //atlas
      case 7: return 6000; break; //apollo
      case 8: return 5000; break; //zagreus
      case 9: return 4000; break; //charon
      case 10: return 6000; break; //herc
      case 11: return 500; break; //empusa
      case 12: return 10000; break; //dion
      case 13: return 2000; break; //curetes
      case 14: return 20000; break; //pos
      case 15: return 18000; break; //carmanor
      
      case 16: return 28000; break; //Moros
      
      case 17: return 25000; break; //pallas
      case 18: return 10000; break; //gaia
      case 19: return 45000; break; //athena
      case 20: return 50000; break; //ares
      case 21: return 30000; break; //hades
      case 22: return 60000; break; //prom
      case 23: return 1750000; break; //thanatos
      case 24: return 5000000; break; //zeus
      case 25: return 20000000; break; //heph
      case 26: return 2000; break; //missile batt
      case 27: return 1500; break; //laser
      case 28: return 500; break; //space mine
      case 29: return 6000; break; //pulse
      case 30: return 2000; break; //particle
      case 31: return 8000; break; //ABM
      case 32: return 10000; break; //decoy
      case 33: return 12500; break; //IPBM
      case 34: return 20000; break; //gauss
      case 35: return 50000; break; //large decoy
      case 36: return 50000; break; //plasma
   }
}

function CrysCost(ShipIndex) {
   switch (ShipIndex) {
      case 0: return 0; break; //shadow
      case 1: return 0; break; //genesis
      case 2: return 1000; break; //hermes
      case 3: return 2000; break; //helios
      case 4: return 1000; break; //arty

      case 5: return 2250; break; //Erebus

      case 6: return 2000; break; //atlas
      case 7: return 2500; break; //apollo
      case 8: return 3000; break; //zagreus
      case 9: return 4000; break; //charon
      case 10: return 6000; break; //herc
      case 11: return 0; break; //empusa
      case 12: return 6000; break; //dion
      case 13: return 2000; break; //curetes
      case 14: return 7000; break; //pos
      case 15: return 18000; break; //carmanor

      case 16: return 17000; break; //Moros

      case 17: return 12500; break; //pallas
      case 18: return 20000; break; //gaia
      case 19: return 15000; break; //athena
      case 20: return 25000; break; //ares
      case 21: return 40000; break; //hades
      case 22: return 50000; break; //prom
      case 23: return 800000; break; //thanatos
      case 24: return 4000000; break; //zeus
      case 25: return 20000000; break; //heph
      case 26: return 0; break; //missile batt
      case 27: return 500; break; //laser
      case 28: return 0; break; //space mine
      case 29: return 2000; break; //pulse
      case 30: return 6000; break; //particle
      case 31: return 0; break; //ABM
      case 32: return 10000; break; //decoy
      case 33: return 2500; break; //IPBM
      case 34: return 15000; break; //gauss
      case 35: return 50000; break; //large decoy
      case 36: return 50000; break; //plasma
   }
}

function HydroCost(ShipIndex) {
   switch (ShipIndex) {
      case 0: return 0; break; //shadow
      case 1: return 0; break; //genesis
      case 2: return 0; break; //hermes
      case 3: return 500; break; //helios
      case 4: return 0; break; //arty

      case 5: return 500; break; //Erebus

      case 6: return 0; break; //atlas
      case 7: return 0; break; //apollo
      case 8: return 1000; break; //zagreus
      case 9: return 1000; break; //charon
      case 10: return 0; break; //herc
      case 11: return 7500; break; //empusa
      case 12: return 2000; break; //dion
      case 13: return 10000; break; //curetes
      case 14: return 2000; break; //pos
      case 15: return 0; break; //carmanor

      case 16: return 3500; break; //Moros

      case 17: return 7500; break; //pallas
      case 18: return 10000; break; //gaia
      case 19: return 0; break; //athena
      case 20: return 15000; break; //ares
      case 21: return 15000; break; //hades
      case 22: return 15000; break; //prom
      case 23: return 100000; break; //thanatos
      case 24: return 1000000; break; //zeus
      case 25: return 10000000; break; //heph
      case 26: return 0; break; //missile batt
      case 27: return 0; break; //laser
      case 28: return 3000; break; //space mine
      case 29: return 0; break; //pulse
      case 30: return 0; break; //particle
      case 31: return 2000; break; //ABM
      case 32: return 0; break; //decoy
      case 33: return 10000; break; //IPBM
      case 34: return 2000; break; //gauss
      case 35: return 0; break; //large decoy
      case 36: return 30000; break; //plasma
   }
}

function GetRSP(ShipIndex) {
   return OreCost(ShipIndex) + CrysCost(ShipIndex) + HydroCost(ShipIndex);
}

function CalcRSP(shipArray,max_index) {
   var RSP = 0;
   if(shipArray != null) {
      for(var i = 0; i < max_index; i++) {
         if(shipArray != null) {
            RSP += shipArray * GetRSP(i);
         }   
      }
   }
   return RSP;
}

function addCommas(vNumber) {
   while (/(\d+)(\d{3})/.test(vNumber)) { vNumber = vNumber.replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); }
   return vNumber;
}
Title: Re: Eljer scripts
Post by: Locutus on May 29, 2018, 03:30:42 PM
Added, I'm honestly not sure how i missed that one as I used it all the time when I played.  I have added the script as well as updated removetrailingspace which I missed updating on april 1st.  Added autoupdate url and changed version numbers to my format to make future updates easier for any updates to the scripts.  Enjoy.  Thanks for the user that e-mailed it to me.
Title: Re: Eljer scripts
Post by: renykeny on May 30, 2018, 04:00:43 AM
Anyone know why parser not working.....says under construction
Title: Re: Eljer scripts
Post by: Locutus on June 05, 2018, 02:18:11 PM
Openparser uses their site to populate data, so if they go to maintenance, then their scripts may quit working as well since it's querying their database stored on their server.