Author Topic: Kill assists  (Read 7412 times)

0 Members and 1 Guest are viewing this topic.

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Kill assists
« on: September 12, 2009, 10:09:14 am »
Script Name: Kill assists
Script Description Kill assists with minimum damage & timer
Author: Serial killer
Compile Test: Passed
Core Version: 2.6.5
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
I saw some servers with assist points but there you could win without killing anyone just by spraying because one shot was enough to get a assist point so I made a smarter script where:

- You can set the minimum percentage of damage you have to do to get an assist.
- You can set the maximum time span after you have done damage where you can get an assist.
- Set the amount of assists you have to do to get a kill point.
- Option to enable/disable whether you can get assist after you died.

Ingame message:

 




(Size 4.64 KB)
- http://soldatcentral.com/index.php?page=script&f=137 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **
« Last Edit: September 12, 2009, 10:57:51 am by Serial K!ller »

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Kill assists
« Reply #1 on: September 12, 2009, 11:36:45 am »
Makes it feel a bit like Team Fortress 2 in a way. :P

I played some of these servers myself with the kill assist and I love it. Great job.
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

DarkCrusade

  • Guest
Re: Kill assists
« Reply #2 on: September 13, 2009, 10:39:04 am »
It´s cool, I even got assistpoints on that servers for damaging myself with nades and stuff, very funny :)

Offline Crimson Goth

  • Camper
  • ***
  • Posts: 387
  • A*|INF|Veteran
Re: Kill assists
« Reply #3 on: September 13, 2009, 01:03:18 pm »
I dig this script.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Kill assists
« Reply #4 on: September 13, 2009, 03:15:43 pm »
Code: [Select]
TextWidth[32] := 103.20;TextWidth[33] := 114.67;TextWidth[34] := 74.53;TextWidth[35] := 5.73;TextWidth[36] := 206.40;
TextWidth[37] := 235.07;TextWidth[38] := 212.13;TextWidth[39] := 40.13;TextWidth[40] := 103.20;TextWidth[41] := 103.20;
TextWidth[42] := 137.60;TextWidth[43] := 229.33;TextWidth[44] := 103.20;TextWidth[45] := 91.73;TextWidth[46] := 103.20;
TextWidth[47] := 97.47;TextWidth[48] := 206.40;TextWidth[49] := 206.40;TextWidth[50] := 206.40;TextWidth[51] := 206.40;
TextWidth[52] := 206.40;TextWidth[53] := 206.40;TextWidth[54] := 206.40;TextWidth[55] := 206.40;TextWidth[56] := 206.40;
TextWidth[57] := 206.40;TextWidth[58] := 103.20;TextWidth[59] := 103.20;TextWidth[60] := 229.33;TextWidth[61] := 229.33;
TextWidth[62] := 229.33;TextWidth[63] := 177.73;TextWidth[64] := 275.20;TextWidth[65] := 200.67;TextWidth[66] := 212.13;
TextWidth[67] := 206.40;TextWidth[68] := 223.60;TextWidth[69] := 194.93;TextWidth[70] := 177.73;TextWidth[71] := 223.60;
TextWidth[72] := 235.07;TextWidth[73] := 97.47;TextWidth[74] := 183.47;TextWidth[75] := 200.67;TextWidth[76] := 177.73;
TextWidth[77] := 246.53;TextWidth[78] := 229.33;TextWidth[79] := 235.07;TextWidth[80] := 200.67;TextWidth[81] := 235.07;
TextWidth[82] := 212.13;TextWidth[83] := 212.13;TextWidth[84] := 160.53;TextWidth[85] := 223.60;TextWidth[86] := 189.20;
TextWidth[87] := 235.07;TextWidth[88] := 194.93;TextWidth[89] := 183.47;TextWidth[90] := 189.20;TextWidth[91] := 103.20;
TextWidth[92] := 97.47;TextWidth[93] := 103.20;TextWidth[94] := 275.20;TextWidth[95] := 137.60;TextWidth[96] := 137.60;
TextWidth[97] := 172;TextWidth[98] := 172;TextWidth[99] := 172;TextWidth[100] := 200.67;TextWidth[101] := 160.53;
TextWidth[102] := 149.07;TextWidth[103] := 183.47;TextWidth[104] := 189.20;TextWidth[105] := 74.53;TextWidth[106] := 154.80;
TextWidth[107] := 166.27;TextWidth[108] := 149.07;TextWidth[109] := 206.40;TextWidth[110] := 189.20;TextWidth[111] := 189.20;
TextWidth[112] := 166.27;TextWidth[113] := 189.20;TextWidth[114] := 166.27;TextWidth[115] := 177.73;TextWidth[116] := 143.33;
TextWidth[117] := 183.47;TextWidth[118] := 160.53;TextWidth[119] := 200.67;TextWidth[120] := 160.53;TextWidth[121] := 154.80;
TextWidth[122] := 172;TextWidth[123] := 137.60;TextWidth[124] := 137.60;TextWidth[125] := 137.60;TextWidth[126] := 229.33;
TextWidth[127] := 166.27;
Idk what this does but I'm 99% sure it can be done otherwise...

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Kill assists
« Reply #5 on: September 13, 2009, 03:30:10 pm »
@Gizd - its the width of each character, something which really can't be measured using scripting core. Even if it could be, why bother re-measuring it every time you startup the script when it could be manually put in.

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: Kill assists
« Reply #6 on: September 13, 2009, 03:31:55 pm »
It's the DrawTextCenter function I used and changed slightly.
Those numbers are the width of each character in the default font (Bank Gothic Lt BT) used to calculate the string width in pixels.

Tried to find a simpler way to define them like (TextWidth[32..126] = (value1,value2,...) but failed...

[edit]
Updated DrawTextCenter function so text doesn't overlap ctf/inf flagbox on long names.
« Last Edit: September 13, 2009, 04:04:41 pm by Serial K!ller »

Offline F4||3N

  • Soldier
  • **
  • Posts: 245
Re: Kill assists
« Reply #7 on: September 13, 2009, 09:16:05 pm »
Make it so if someone medikits. The assists get wiped! (If it isnt already)

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: Kill assists
« Reply #8 on: September 14, 2009, 12:08:14 am »
Make it so if someone medikits. The assists get wiped! (If it isnt already)
Already made it like that :)

Code: (pascal) [Select]

//In apponidle
//Polygon or medikit heal
if (((Getplayerstat(ID,'Health')*100)/healthfactor) > ((100-TotalPercentDamageRecieved(ID)))) then begin
RemoveDamageDoneBy(ID,((Getplayerstat(ID,'Health')*100)/healthfactor) - (100-TotalPercentDamageRecieved(ID)));
end;

Offline crckdns

  • Major(1)
  • Posts: 10
    • Dedicated Soldat Server - crckdns.de-Soldat
Re: Kill assists
« Reply #9 on: March 12, 2010, 01:59:12 pm »
I am not sure, if it's a bug of assist script or a bug of regenerate script, I'm getting time to time such exceptions (and after that..even /recompile doesnt help, server is unuseable.
log:
Code: [Select]
(19:47:09) Sladalos has left the game.
(19:47:09)  [*] [Error] Regenerate -> (OnLeaveGame): Out of Global Vars range
(19:47:09)  [*] [Error] Regenerate -> (AppOnIdle): Access violation at address 080A0B43, accessing address 00000109
(19:47:09)  [*] [Error] z-KillAssists -> (AppOnIdle): Out of Global Vars range
(19:47:10)  [*] [Error] z-KillAssists -> (OnLeaveGame): Invalid Type
(19:47:10)  [*] [Error] Regenerate -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000109
 [*] Exception raised on call to AppOnIdle (Access violation at address 080F5A3F, accessing address 00000004)
 [*] Exception raised on call to OnPlayerDamage (Access violation at address 080F5A3F, accessing address 00000004)
 [*] Exception raised on call to AppOnIdle (Access violation at address 080F5A3F, accessing address 00000004)
 [*] Exception raised on call to AppOnIdle (Access violation at address 080F5A3F, accessing address 00000004)
and so on and so on....

edit: ok, unloaded regenerate-script..and the bug with kill-assist is still there.. it appears without any signs what could cause it..
« Last Edit: March 12, 2010, 03:19:35 pm by crckdns »
Join crckdns.de-Soldat server and enjoy fairplay and tons of maps.
dedicated crckdns.de Soldat server

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Kill assists
« Reply #10 on: March 12, 2010, 04:20:52 pm »
could be because the script doesnt check for active right in the beginning of the loop in OnPlayerDeathGiveAssists. Try changing line 457 to

Code: (pascal) [Select]
if GetplayerStat(i,'Active') = true then if (Victim <> i) and (PlayersInfoArr[Victim].KilledBy <> i) and ((GetplayerStat(Victim,'Team') <> GetplayerStat(i,'Team')) or (GameStyle=0) or (GameStyle=1) or (GameStyle=4)) then begin(not tested)

Offline crckdns

  • Major(1)
  • Posts: 10
    • Dedicated Soldat Server - crckdns.de-Soldat
Re: Kill assists
« Reply #11 on: March 12, 2010, 05:38:43 pm »
heh =) thanks for the reply^^
I'm not sure if this did help.. as I'm still getting time to time errors like
Code: [Select]
CornyNussig joining game (134.99.26.161:23073)
 [*] [Error] z-KillAssists -> (OnPlayerRespawn): Out of Global Vars range
[*] [Error] z-KillAssists -> (OnPlayerRespawn): Out of Global Vars range [*] [Error] z-KillAssists -> (AppOnIdle): Out of Global Vars range
Join crckdns.de-Soldat server and enjoy fairplay and tons of maps.
dedicated crckdns.de Soldat server

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Kill assists
« Reply #12 on: March 13, 2010, 03:50:23 am »
bleh.. try to rename the vars in apponidle to something that's not used yet and make them global

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: Kill assists
« Reply #13 on: March 13, 2010, 04:58:58 am »
hmm... does it happen more when the regeneration script is also running?

That would call the RemoveDamageDoneBy() function in apponidle more which is a recurrent function and that might be the problem.

I'll see if I can rewrite the function so it does not have to call itself again.


Try setting line 282 "RemoveDamageDoneBy(ID,DamagePercentLeft);" in comment to check if that is causing the problem.

Code: (pascal) [Select]
if DamagePercentLeft <> 0 then begin
//RemoveDamageDoneBy(ID,DamagePercentLeft);
end;
« Last Edit: March 13, 2010, 05:31:13 am by Serial K!ller »

Offline Szewczuq

  • Soldier
  • **
  • Posts: 115
  • WOOH! ROCKS ON MY HEAD!
    • POLISH GAMERS COMMUNITY
Re: Kill assists
« Reply #14 on: March 13, 2010, 07:01:28 am »
too much TF2 in soldat, i dont like it :(



Offline demoniac93

  • Veteran
  • *****
  • Posts: 1554
Re: Kill assists
« Reply #15 on: March 13, 2010, 07:32:34 am »
Keep this on the TBA servers ;/
b&

Offline Mexer

  • Soldier
  • **
  • Posts: 121
  • real eyes. realize. real lies.
Re: Kill assists
« Reply #16 on: February 06, 2012, 09:25:54 am »
Can you please reupload?
Soldat devs and community: We want this game to be successful and have new players and make it popular!

Soldat devs and community: But we want the oldskool graphics and bugs and errors to be left alone! Soldat shall never change!!!

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Kill assists
« Reply #17 on: February 06, 2012, 02:04:27 pm »
all the scripts that were on soldat central are still available here
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline darDar

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 794
    • #Soldat Gather - Community on Discord
Re: Kill assists
« Reply #18 on: April 11, 2013, 07:16:26 pm »
all the scripts that were on soldat central are still available here
any other site?
Soldat Gather 'Matchmaking Community on Discord'

gather.soldat.pl

| My Maps: ctf_Pyramid, ctf_Replay, ctf_Blako, ctf_R6, ctf_Ntex, ctf_Caro, ctf_Bizar & vs_mode mappack |

Offline Moroes

  • Soldier
  • **
  • Posts: 165
    • Soldat-Game.eu
Re: Kill assists
« Reply #19 on: April 13, 2013, 11:41:53 am »
all the scripts that were on soldat central are still available here
any other site?
Try this
Code: [Select]
http://db.tt/FdPRgz29