Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: freestyler on November 05, 2011, 07:51:52 am

Title: Power Limiter
Post by: freestyler on November 05, 2011, 07:51:52 am
script name: Power Limiter
short description: the more people use the same gun, the smaller damage it deals
original author: fri (http://oko.im/scripts)
core version: 2.7.2



longer description:
Are you tired of seeing whole Alpha team raping Bravos with shotguns? Annoyed by ubiquitous MP5 sprayers? Power Limiter can change any weapon's output depending on how many team players use it. You can make it deal 100% if there is only one "copy" of a particular gun in a team, 90% if two, etc. - up to five "copies" per team.

Weapons aren't removed from player's menu - the script is invisible to mere mortals. Unless you make their gun deal 0% of original damage, of course - everyone will notice that something's wrong.

By default, weapons deal 100% for 1 user, 95 for two, 85, 70 and 50 for five or more users. Values can vary from 0 through 255. There's nothing that stops you from making a gun stronger with more users.

code snippet: (not the whole script)
Code: [Select]
function onplayerdamage(victim, shooter: byte; damage: integer): integer;
begin
if (pl[shooter].weapon < 17) then
result := round(damage * dmg[count[pl[shooter].weapon][pl[shooter].team]] / 100)
else
result := damage;
end;

If used with bots then it won't count their weapon until you use /setteam on them or recompile the script after adding them. This is the scriptcore's fault for not triggering some events for bots (#0000126) (http://bugs.soldat.pl/view.php?id=126). I'm not sure if any of you need it to work with bots; just post here if you do.



(http://oko.im/script/dl.png) (http://oko.im/script/dl.php?s=powerlimiter)
Title: Re: Power Limiter
Post by: pavliko on November 05, 2011, 10:17:36 am
I will use the minigun then....
 Nice script, hoping too see it on pubs
Title: Re: Power Limiter
Post by: Falcon` on November 05, 2011, 02:03:31 pm
That's just stupid. Why would anyone want prevent whole team of using  same weapon at same time? If enemy uses short range weapons - spray them. If they spray, - snipe them. If they snipe then either spray at them or snipe them back.
Would make a bit more sense if you prevent one person to carry one weapon for too long. Though still, only a bit.
Title: Re: Power Limiter
Post by: pavliko on November 05, 2011, 02:29:32 pm
"If enemy uses short range weapons - spray them. If they spray, - snipe them. If they snipe then either spray at them or snipe them back."

And in the end no one even uses short ranged weapons.

Title: Re: Power Limiter
Post by: Falcon` on November 06, 2011, 04:26:47 am
It's kind of obvious that usage of short weapons depend mostly on the terrain (tunnels).