Author Topic: Total Damage per Map  (Read 6211 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Total Damage per Map
« on: June 05, 2007, 06:28:00 pm »
Script Name: Total Damage per Map
Script Description: At the end of the map, this script shows the person with the most damage dealt to foes, and your damage dealt to all foes at the end of a map. The script is designed for team gamemodes (CTF, Inf, TM). It is a feature to make it so it doesn't tell you your personal dealt damage when you are either the high scorer or one of the tied people. The Stress constant is ment to give a more accurate result of total damage per map, although if you are having issues with the server lagging up or something because of this script, try to turn Stress to false and see if it runs better. Round place is for how many decimal digits you want to round into when showing people their damage.
Original Author: Curt
Core Version: 2.6.3
« Last Edit: February 26, 2009, 06:06:33 am by DorkeyDear »

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Total damage per map
« Reply #1 on: June 06, 2007, 05:22:08 am »
interesting script :)

Date Posted: June 06, 2007, 12:03:09 PM
07-06-06 13:19:52    Console Log Started
07-06-06 13:19:52 Welcome to Soldat 1.4.1
07-06-06 13:19:52 
  • Compiling Script NetworkCore.pas...

07-06-06 13:19:52 
  • Compiling Script Core.pas...

07-06-06 13:19:52 
  • Compiling Script AdminCore.pas...

07-06-06 13:19:52 
  • [Error] (44:13): Unknown identifier 'Damage'

07-06-06 13:19:52 Shutting server...
07-06-06 13:19:52 Shutting down admin server...
« Last Edit: June 06, 2007, 05:23:51 am by xmRipper »
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline KeYDoN

  • Major
  • *
  • Posts: 60
Re: Total damage per map
« Reply #2 on: June 06, 2007, 06:21:19 am »
change line 10 from "Temp := Damage;" to "Temp := Dmg;"

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Total damage per map
« Reply #3 on: June 06, 2007, 09:44:25 am »
data type of Dmg should be longint imo because the integer datatype doesn't allow that high numbers
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total damage per map
« Reply #4 on: June 06, 2007, 10:23:33 pm »
Fixed and changed.

Offline kornsick

  • Major(1)
  • Posts: 42
  • Fhtagn!
    • Soldat Server @ StarNet
Re: Total damage per map
« Reply #5 on: June 11, 2007, 11:47:53 am »
It's not working for me... when i tested it on my server with bots, i reached 30 kills - nothing happened, then the map changed and it said "
  • You have dealt a total of 0 damage this map."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total damage per map
« Reply #6 on: June 11, 2007, 01:24:55 pm »
When the actual map changes and when the map is ending are two different times. There is no event for when the map ends, so I had to put it on the map change event. (I'm really not certain about this, but I know there is some time difference.)
I already tried making it occur when a person's score reaches the limit, but it gets called when the map changes too. I could make it get called 1 less than the limit but that would mean there could be time between the second from last point to last point difference not accounted for.

I forgot to have it check if you are playing a deathmatch or teammatch (sense it does not add friendly fire damage).
Fixed.
« Last Edit: June 11, 2007, 01:43:24 pm by DorkeyDear »

Offline kornsick

  • Major(1)
  • Posts: 42
  • Fhtagn!
    • Soldat Server @ StarNet
Re: Total damage per map
« Reply #7 on: June 11, 2007, 10:31:04 pm »
Now it works just fine. Thank you!

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total damage per map
« Reply #8 on: June 12, 2007, 10:23:47 pm »
UPDATE!
It now will say everybody who is tied for first!

Date Posted: June 12, 2007, 01:58:28 PM
UPDATE!
It will now say ', and ' before the last player listed when there is a tie.
Question: do you put the "," before the "and" in proper american english? (or non-american, i don't know if its different elsewhere)

Date Posted: June 12, 2007, 02:49:36 PM
UPDATE!
It will now show the % damage that you have done for realistic mode. (65 damage = death in realistic mode, 100 = death for unreal; for those who didn't know)

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Total damage per map
« Reply #9 on: June 12, 2007, 10:33:30 pm »
Question: do you put the "," before the "and" in proper american english? (or non-american, i don't know if its different elsewhere)
comma before the and.

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Total damage per map
« Reply #10 on: June 12, 2007, 11:58:24 pm »
Question: do you put the "," before the "and" in proper american english? (or non-american, i don't know if its different elsewhere)
comma before the and.

It's debatable actually, some sources say to use ", and", while others say that it's redundant, and to just put " and". It all comes down to personal choice; when in doubt, consult an english writing style guide, most libraries carry them.

Offline deguix

  • Major
  • *
  • Posts: 79
Re: Total damage per map
« Reply #11 on: June 16, 2007, 09:28:26 pm »
Actually yes, because the 2 last items are not together (under 1 item), they're different items. It's like saying "She gave a cookie to him, to someone else, and to my father and me." (my father and me are together, so she actually gave 1 cookie to be split with both of us... =().
« Last Edit: June 16, 2007, 09:30:20 pm by deguix »

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Total damage per map
« Reply #12 on: June 16, 2007, 10:59:50 pm »
Actually yes, because the 2 last items are not together (under 1 item), they're different items. It's like saying "She gave a cookie to him, to someone else, and to my father and me." (my father and me are together, so she actually gave 1 cookie to be split with both of us... =().

You are using 2 ands; and using the second and differently from the first and. This is not what the discussion is about.

Better illustration is:

"She gave a cookie to him, to someone else, and to me."
vs
"She gave a cookie to him, to someone else and to me."

Depending on who you talk to, either one of these is acceptable, and they mean the same thing; that 3 people got cookies.

Offline dumdum31

  • Major(1)
  • Posts: 15
Re: Total damage per map
« Reply #13 on: July 01, 2007, 06:41:59 am »
Uhhh... Right. The Script is good, the English is somewhat irrelevant. As is this post XD

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Total damage per map
« Reply #14 on: July 01, 2007, 09:57:18 am »
Question, I dind't test out the script - but shouldn't it be:
iif(Realistic = true,InttoStr(20 * Dmg / 13),InttoStr(2 * Dmg / 3))
instead of:
iif(Realistic = true,InttoStr(20 * Dmg / 13),InttoStr(Dmg))
since in non-realistic max health is 150 (and this converts it to percent)
Can't think of anything original to put here...

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total damage per map
« Reply #15 on: July 01, 2007, 05:39:00 pm »
I am converting it to a percent.

Should I add a constant boolean that asks if it should be changed to % or not? I may add that sometime in the future.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Total damage per map
« Reply #16 on: July 02, 2007, 08:51:55 am »
well I see your point w/ the bool.
On one hand, percent gives a better idea of how many deaths on average there were and similar, but then again there will be much greater damage percentwise in realistic than in non-realistic even though the same amount of 'actual' damage was dealt.
I just made that remark before because I thought since the damage in realistic mode was returned as a %, so should damage in non-realistic...
Can't think of anything original to put here...

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total damage per map
« Reply #17 on: July 02, 2007, 11:27:26 am »
Oh, well, I never checked that if they were returned as a percent. I thought that they shouldn't so I only assumed that they were not returned as a percent. Maybe I should have checked that...

Offline Freedom

  • Major
  • *
  • Posts: 97
  • Veritas Vincit
Re: Total damage per map
« Reply #18 on: August 16, 2007, 07:17:47 am »
In that script is some bug or something.
If i launch it, i can't kill eny1 :(

Only with m79 :D
Cum pare contendere anceps est, cum superiore furiosum, cum inferiore sordidum.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Total Damage per Map
« Reply #19 on: July 06, 2008, 11:51:01 am »
I updated the script for 2.6.2 and made it much cleaner.

Date Posted: August 16, 2007, 07:14:41 pm
Update:
  • Added !damage command
  • Added !dmgall command