Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hits to Kill Script
#7
I did something like this for the NL Damage Calculator that banditcom originally made. However, it's still unreleased because there's some issues we need to fix, and we're both extremely lazy to fix them. Biggrin

Anyway, here's an excerpt of code from the script I wrote. Note that this is written in VBA (for Excel) because I wrote the script to integrate directly with banditcom's spreadsheet. Below is excerpt of code dealing with hits to kill with TT and TT w/ SE:
 Spoiler
Also, here is a function to calculate a factorial. I found it easier to write the function myself than try to call Excel's factorial function with VBA.
 Spoiler
Hopefully, the variables names I chose to use in the script should be quite evident or easily deducible. Some of the stuff might seem like they're not useful at all, but again.... the above part was an excerpt so it'd find a use outside of the above excerpt. I'll check the thread as often as I can to clear up anything else you may think is confusing.

Oh, and a note about the variable Pc in my script. At first, I calculate the probability of NOT killing for each number of hits in question. Then the line: "NHitArray3(h) = Pc" in each iteration builds an array of these values. With that, it's easy to build the array of probabilities of killing in exactly a certain number of hits -- done by that For function at the end. Kind of a roundabout way of getting the results we want, but it works. Redface And I thought it was easier to program it in this way. Rolleyes
Reply


Messages In This Thread
Hits to Kill Script - by Russt - 2008-12-07, 05:26 AM
Hits to Kill Script - by Technolink - 2008-12-08, 08:32 PM
Hits to Kill Script - by Russt - 2008-12-08, 10:31 PM
Hits to Kill Script - by Shidoshi - 2008-12-09, 10:17 PM
Hits to Kill Script - by Spaz - 2008-12-10, 11:12 PM
Hits to Kill Script - by Russt - 2008-12-11, 01:09 AM
Hits to Kill Script - by singularity - 2008-12-12, 01:47 AM
Hits to Kill Script - by Russt - 2008-12-13, 05:09 PM
Hits to Kill Script - by singularity - 2008-12-14, 07:23 AM
Hits to Kill Script - by Technolink - 2008-12-14, 12:28 PM
Hits to Kill Script - by Nikkey - 2008-12-14, 03:50 PM
Hits to Kill Script - by Technolink - 2008-12-14, 07:00 PM
Hits to Kill Script - by Nikkey - 2008-12-14, 07:28 PM
Hits to Kill Script - by Technolink - 2008-12-18, 12:30 AM
Hits to Kill Script - by Nikkey - 2008-12-18, 02:30 AM
Hits to Kill Script - by Technolink - 2008-12-18, 05:24 PM
Hits to Kill Script - by Russt - 2008-12-22, 03:24 AM
Hits to Kill Script - by Nikkey - 2008-12-22, 06:33 AM
Hits to Kill Script - by ZachAttack - 2008-12-28, 02:37 AM
Hits to Kill Script - by Russt - 2008-12-28, 02:40 AM
Hits to Kill Script - by ZachAttack - 2008-12-28, 02:49 AM
Hits to Kill Script - by Russt - 2008-12-28, 02:51 AM
Hits to Kill Script - by ZachAttack - 2008-12-28, 02:52 AM
Hits to Kill Script - by Russt - 2008-12-28, 02:58 AM
Hits to Kill Script - by ZachAttack - 2008-12-28, 03:04 AM
Hits to Kill Script - by Technolink - 2008-12-31, 02:35 AM
Hits to Kill Script - by Russt - 2008-12-31, 05:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)