Author Topic: Killing Sprees - remade for: 2.6.3  (Read 2434 times)

0 Members and 1 Guest are viewing this topic.

Offline Szewczuq

  • Soldier
  • **
  • Posts: 115
  • WOOH! ROCKS ON MY HEAD!
    • POLISH GAMERS COMMUNITY
Killing Sprees - remade for: 2.6.3
« on: February 12, 2008, 10:03:22 am »
Hi. i remade EnesCe's script for dediced server verrsion: 2.6.3
And i added one option: Change color of the script.

Script Name: Killing Sprees
Script Description: Shows who is on killing sprees and who ends their spree
Original Author(s): Bmekim (Remake of EnEsCe's script)
Core Version: 2.6.3

Code:

Code: [Select]
const
  Color = $000000; //$000000 - it's gray. Change it. :)

var
kills: array[1..32] of byte;

procedure OnJoinGame(ID, Team: byte);
begin
kills[ID] := 0;
end;

procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
kills[ID] := 0;
end;

procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
var
spree: array[1..27] of string;
killsNeeded: byte;
begin
killsNeeded := 5; //number of kills needed to count as a killing spree
//spree[x] where x represents the current number of spree kills player has
//more can be added just be sure to change the spree array size
spree[killsNeeded] := ' is on a Killing Spree!';
spree[8] := ' is on a Rampage!';
spree[11] := ' is Dominating!';
spree[14] := ' is Madness!';
spree[17] := ' is Ownage!';
spree[20] := ' is Unstopable!';
spree[22] := ' is Godlike!';
spree[25] := ' is Cheater!!';
spree[27] := ' Dude! Stop it!!';
if killer <> victim then begin
if (GetPlayerStat(killer,'name') <> GetPlayerStat(victim,'name')) then begin
kills[killer] := kills[killer] + 1;
if (kills[victim] >= killsNeeded) then begin
WriteConsole(0, + GetplayerStat(victim,'name') + 's ' + inttostr(kills[victim]) + ' kills spree ended by ' + GetPlayerStat(killer,'name'),Color);
end;
kills[victim] := 0;
if (kills[killer] <= Arrayhigh(spree) + 1) then begin
if (spree[kills[killer]] <> '') then WriteConsole(0, + GetPlayerStat(killer,'name') + spree[kills[killer]],Color);
end;
end
else begin
if (kills[killer] > 0) then SayToPlayer(killer, 'Your spree kills have been reset for team killing');
kills[killer] := 0;
end;
end;
end;



Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Killing Sprees - remade for: 2.6.3
« Reply #1 on: February 12, 2008, 06:23:41 pm »
It's a nice script. But why check if the victim and the killer have the same name...?

(oh yeah, unstoppable)

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Killing Sprees - remade for: 2.6.3
« Reply #2 on: February 13, 2008, 02:34:45 am »
You really should just check the ID instead of comparing the two player names.

Offline Szewczuq

  • Soldier
  • **
  • Posts: 115
  • WOOH! ROCKS ON MY HEAD!
    • POLISH GAMERS COMMUNITY
Re: Killing Sprees - remade for: 2.6.3
« Reply #3 on: February 13, 2008, 03:57:07 pm »
now im goint to remake script:
[Release] Vote random map (with time) and
Spam Meter



Offline Sub Zero

  • Major(1)
  • Posts: 16
Re: Killing Sprees - remade for: 2.6.3
« Reply #4 on: February 29, 2008, 12:56:58 am »
sry for noob question, but after DLing this where do i put it? i'm sure there is some specific folder or something cause it's a .pas file

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Killing Sprees - remade for: 2.6.3
« Reply #5 on: February 29, 2008, 01:00:43 am »
sry for noob question, but after DLing this where do i put it? i'm sure there is some specific folder or something cause it's a .pas file
http://forums.soldat.pl/index.php?topic=21468.0