Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: zop on October 18, 2009, 02:00:47 am

Title: HPSP & HPSPNoSK (Score Point by Damage)
Post by: zop on October 18, 2009, 02:00:47 am
Script Name: HPSP & HPSPNoSK
Script Description This script change the score point counting from killing player to damage player.
Author: zop (http://soldatcentral.com/index.php?page=profile&u=64)
Compile Test: (http://soldatcentral.com/images/pass.gif) Passed
Core Version: 2.6.5
Hosted by: Soldat Central - http://soldatcentral.com/ (http://soldatcentral.com/)
Code: [Select]
Const
  nNoSKCountDown = 4;
  NoSKDist = 150;
  MaxHP = 150;
Full Description:
This script change the score point counting from killing player to damage player.

In normal mode, player's HP is 150, and 65 in realistic.

Default HP setting is 150 in this script, you may change it if needed.

And with NoSK, Player will not get any damage in 3 secs after spwan. But there are 2 situations to cancel it.

First, player damage enemy in 3 secs after spwan. That means you can protect yourself. So you don't need NoSK protection.

Second, player near any flag (even Flagger) in 3 secs after spwan. That makes flag grab fairly.

And of course player will not get damage counting for score point in NoSK time.



HPSP
(http://soldatcentral.com/images/download.gif) (http://soldatcentral.com/dl.php?id=143&act=1)
(Size 865 B)
- http://soldatcentral.com/index.php?page=script&f=143 -


HPSPNoSK
(http://soldatcentral.com/images/download.gif) (http://soldatcentral.com/dl.php?id=144&act=1)
(Size 1.31 KB)
- http://soldatcentral.com/index.php?page=script&f=144 -


** Script hosted by Soldat Central (http://soldatcentral.com/index.php?page=script&f=144)! Please visit the author's script page (http://soldatcentral.com/index.php?page=script&f=144) and Rate this script **
Title: Re: HPSP & HPSPNoSK (Score Point by Damage)
Post by: Gizd on October 18, 2009, 02:21:01 am
In normal mode, player's HP is 150, and 100 in realistic.
HP in realistic is 65. How did you get that 100?

You should use this:
Quote
if Command('/realistic') = 1 then MaxHP:= 65 else MaxHP:= 150;
Title: Re: HPSP & HPSPNoSK (Score Point by Damage)
Post by: zop on October 18, 2009, 02:31:36 am
Sorry :-X I didn't really remember HP in realitic.

Quote
if Command('/realistic') = 1 then MaxHP:= 65 else MaxHP:= 150;
This should be a command by admin keyin, right?
Is there any way to auto detect game mode to change max hp setting?
Title: Re: HPSP & HPSPNoSK (Score Point by Damage)
Post by: Serial K!ller on October 18, 2009, 04:07:59 am
Sorry :-X I didn't really remember HP in realitic.

Quote
if Command('/realistic') = 1 then MaxHP:= 65 else MaxHP:= 150;
This should be a command by admin keyin, right?

No you can use it in the scriptcore.

http://enesce.com/help/html/Functions/Command.html :
Quote from: Server help
Some commands will have a return variable.
Title: Re: HPSP & HPSPNoSK (Score Point by Damage)
Post by: zop on October 18, 2009, 05:03:24 am
Updated scripts.

Thanks for suggestions. :D