0 Members and 1 Guest are viewing this topic.
constBullet = 1;Nade = 2;Shotgun = 3;M79 = 4;Flame = 5;Punch = 6;Arrow = 7;FArrow = 8;CNade = 9;CPellet = 10;Chainsaw = 11;LAW = 12;Knife = 13;SGun = 14;SCRIPTVER = '2.1.55';varx,y,x2,y2,Dist:Single;PosX, PosY: Array[1..32] of Single;BioKills,DKills: Array[0..32] of Integer;function RangeKill(Owner, Victim, Range, HitMult, BulletType:Integer):Integer;var i,Team:Byte;begin { x := GetPlayerStat(Victim,'x'); y := GetPlayerStat(Victim,'y');} Team := GetPlayerStat(Owner, 'Team'); for i := 1 to 32 do begin {x2 := GetPlayerStat(i,'x'); y2 := GetPlayerStat(i,'y');} if (Distance(x,y,x2,y2) <= Range) AND (Team <> GetPlayerStat(i, 'Team')) AND (GetPlayerStat(i,'Active') = true) AND (GetPlayerStat(i,'Team') = 2) AND (GetPlayerStat(i,'Alive') = true) then begin //CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y'), VelX,VelY,HitMult, BulletType, Owner); DoDamageBy(i,Owner, HitMult); BioKills[Owner]:=BioKills[Owner]+1; end; end; WriteConsole(Owner,'Bio-Kills: '+Inttostr(BioKills[Owner]),$EE81FAA1); BioKills[Owner] := 0;end;procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);var i: integer;angle: single;begin angle := 2*pi/n; for i:=0 to n do CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);Var F,i: Byte; Dist: Single; Wepname:String;begin //if Weapon = 'Cluster Grenades' then begin //RangeKill(Killer, Victim, 500,100, Bullet); //end; if Weapon = 'Combat Knife' then begin RangeKill(Killer, Victim, 500,100, Bullet); end; if Weapon = 'Grenade' then begin RangeKill(Killer, Victim, 200,25, Bullet); end; //if Weapon = 'M79' then begin //RangeKill(Killer, Victim, 50,25, CPellet); //end; if Weapon = 'Barrett M82A1' then begin RangeKill(Killer, Victim, 200,50, Bullet); end; if Weapon = 'HK MP5' then begin RangeKill(Killer, Victim, 200, 10, Bullet); end; if Weapon = 'Ak-74' then begin RangeKill(Killer, Victim, 200, 10, Bullet); end; if Weapon = 'Steyr AUG' then begin RangeKill(Killer, Victim, 200, 10, Bullet); end; if Weapon = 'FN Minimi' then begin RangeKill(Killer, Victim, 200, 10, Bullet); end; if Weapon = 'Spas-12' then begin RangeKill(Killer, Victim, 300, 5, Shotgun); end; if Weapon = 'Ruger 77' then begin RangeKill(Killer, Victim, 225, 12, Bullet); end;//if Weapon = 'Chainsaw' then begin// x := GetPlayerStat(Victim,'x');// y := GetPlayerStat(Victim,'y');// for i := 1 to 32 do begin// x2 := GetPlayerStat(i,'x'); // y2 := GetPlayerStat(i,'y');// if (RayCast(x,y,x2,y2,Dist,300000)) AND (i <> Killer) AND (GetPlayerStat(i,'Active') = true) AND (GetPlayerStat(i,'Team') <> GetPlayerStat(Killer,'Team')) then begin // CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y') - 0, 0,-10,1000, 3, Killer);// BioKills[Killer]:=BioKills[Killer]+1;// end;// end;// WriteConsole(Killer,'Bio-Kills: '+Inttostr(BioKills[Killer]),$EE81FAA1);// BioKills[Killer]:=0;// end; if Weapon = 'LAW' then begin RangeKill(Killer, Victim, 100,1000, Shotgun); end; //if Weapon = 'M79' then begin //RangeKill(Killer, Victim, 400,1000, CPellet); //end; //if Weapon = 'Spas-12' then begin //Nova(GetPlayerStat(Victim,'x'),Getplayerstat(Victim,'y'),200,30,0,Killer,4,200); //end;end;procedure OnPlayerSpeak(ID: Byte; Text: string);beginif Lowercase(Text) = '!info biokills' then beginWriteConsole(0,'This server is using Frostys BioKills script v'+SCRIPTVER, $00FFFF00);WriteConsole(0,'The BioKills script kills or does damage to all zombies within a set range', $00FFFF00);WriteConsole(0,'after a particular weapon is used', $00FFFF00);WriteConsole(0,'ranges are different for each weapon', $00FFFF00);end;end;
if (Distance(x,y,x2,y2) <= Range) AND (Team <> GetPlayerStat(i, 'Team')) AND (GetPlayerStat(i,'Active') = true) AND (GetPlayerStat(i,'Team') = 2) AND (GetPlayerStat(i,'Alive') = true) then
constBullet = 1;Nade = 2;Shotgun = 3;M79 = 4;Flame = 5;Punch = 6;Arrow = 7;FArrow = 8;CNade = 9;CPellet = 10;Chainsaw = 11;LAW = 12;Knife = 13;SGun = 14;SCRIPTVER = '2.1.55';varx,y,x2,y2,Dist:Single;PosX, PosY: Array[1..32] of Single;BioKills,DKills: Array[0..32] of Integer;function RangeKill(Owner, Victim, Range, HitMult, BulletType:Integer):Integer;var i,Team:Byte;begin GetPlayerXY(Victim,X,Y); Team := GetPlayerStat(Owner, 'Team'); for i := 1 to 32 do begin GetPlayerXY(i,x2,y2); if i <> victim then if (GetPlayerStat(i,'Alive') = true) then if (Distance(X,Y,x2,y2) <= Range) then if (GetPlayerStat(i,'Active') = true) then if (Team <> GetPlayerStat(i, 'Team')) then if (GetPlayerStat(i,'Team') = 2) then begin CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y'), 0,1,HitMult, BulletType, Owner); //DoDamageBy(i,Owner, HitMult); BioKills[Owner]:=BioKills[Owner]+1; end; end; WriteConsole(Owner,'Bio-Kills: '+Inttostr(BioKills[Owner]),$EE81FAA1); BioKills[Owner] := 0;end;procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);var i: integer;angle: single;begin angle := 2*pi/n; for i:=0 to n do CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);Var F,i: Byte; Dist: Single; Wepname:String;begin Case Weapon of //'Cluster Grenades' : RangeKill(Killer, Victim, 50,100, Bullet); 'Combat Knife' : RangeKill(Killer, Victim, 200,100, M79); 'Grenade' : RangeKill(Killer, Victim, 200,25, Bullet); 'M79' : RangeKill(Killer, Victim, 75, 5, CPellet); 'Barrett M82A1': RangeKill(Killer, Victim, 200,2, Shotgun); 'HK MP5' : RangeKill(Killer, Victim, 200, 1, Bullet); 'Ak-74': RangeKill(Killer, Victim, 200, 10, Bullet); 'Steyr AUG' : RangeKill(Killer, Victim, 200, 10, Bullet); 'FN Minimi' : RangeKill(Killer, Victim, 200, 10, Bullet); 'Spas-12' : RangeKill(Killer, Victim, 300, 5, Shotgun); 'Ruger 77' : RangeKill(Killer, Victim, 225, 12, Bullet); 'Chainsaw' : RangeKill(Killer, Victim, 150, 2, Shotgun); 'LAW' : RangeKill(Killer, Victim, 100,1000, Shotgun); //'M79' : RangeKill(Killer, Victim, 400,1000, CPellet); 'Spas-12' : Nova(GetPlayerStat(Victim,'x'),Getplayerstat(Victim,'y'),200,30,0,Killer,4,200);end;end;procedure OnPlayerSpeak(ID: Byte; Text: string);beginif Lowercase(Text) = '!info biokills' then beginWriteConsole(0,'This server is using Frostys BioKills script v'+SCRIPTVER, $00FFFF00);WriteConsole(0,'The BioKills script kills or does damage to all zombies within a set range', $00FFFF00);WriteConsole(0,'after a particular weapon is used', $00FFFF00);WriteConsole(0,'ranges are different for each weapon', $00FFFF00);end;end;