YA
I am searching about Kamikaze script
the script have about...10 kamikaze
and if i touch them or shot them
they will bomb!! (this problem is OK! i already solve them!)
and Kamikaze's blood was some high! ex:our player just have 150 blood but kamikazes have 200 blood!!!
i just need kamikaze's blood high!
yea who can help me write this script?very THX!
i use "Simple Zombie" this script
This can work
but don't make high blood
-----------------↓
const
CLASSES = 6; //how many bot classes you want
type
SBot = Record
BName : string;
BHealth : integer;
BHPReg : integer;
BRegLim : boolean;
BShowHP : boolean;
BHColor : longint;
BWeapon : byte;
BBonus : byte;
BBonT : integer;
BDamage : integer;
BWaveVal: byte;
BWaveStl: byte;
BWaveSpd: integer;
end;
var
TheBot: array[0..CLASSES] of SBot;
IGB: array[1..32] of SBot;
BotHpLeft: array[1..32] of integer;
//********************************************************************
procedure ActivateServer();
begin
begin //COPY THIS PIECE TO CREATE NEW BOT
TheBot[1].BName := 'Kamikaze'; //bot name
TheBot[1].BHealth := 100; //bot health (150- normal, 65- realistic)
TheBot[1].BHPReg := 0; //health regeneration per second(0 to disable)
TheBot[1].BRegLim := false; //regeneration limited to max health(true/false)(it will stop anyway at 65000 to avoid crash)
TheBot[1].BShowHP := false; //show bot hp (true/false)
TheBot[1].BHColor := $FFFF00; //color of hp
TheBot[1].BWeapon := 20; //bot weapon (255 to random)
TheBot[1].BBonus := 255; //bonus given to bot (255 to turn off)
TheBot[1].BBonT := 0; //time to give bonus (60 - 1 sec)(0 to give bonus only at respawn)
TheBot[1].BDamage := 1; //damage multiplier(1 to normal damage)
//
TheBot[1].BWaveVal:= 15; //how many bullets in on death wave(0 to turn off)
TheBot[1].BWaveStl:= 4; //style of bullets in wave
TheBot[1].BWaveSpd:= 25; //max speed of bullets in wave(speed is random value from -maxspeed to maxspeed)
end;
end;
//********************************************************************
procedure Explode(Target: byte);
var i: byte;
begin
for i:= 1 to IGB[Target].BWaveVal do CreateBullet(GetPlayerStat(Target,'X'),GetPlayerStat(Target,'Y'),Random(IGB[Target].BWaveSpd, -(IGB[Target].BWaveSpd)),Random(IGB[Target].BWaveSpd, -(IGB[Target].BWaveSpd)), 100, IGB[Target].BWaveStl, Target);
end;
procedure ShowHP(Target,Shooter: byte);
begin
DrawText(Shooter, IntToStr(BotHpLeft[Target]), 180, IGB[Target].BHColor, 0.1, 260, 350);
end;
function Assignable(ID: byte): boolean;
var i: byte;
begin
result:= false;
for i:= 1 to CLASSES do if IDToName(ID) = TheBot
.BName then result:= true;
if GetPlayerStat(ID,'Human') = true then result:= false;
end;
procedure Assign(ID: Byte);
var i: byte;
begin
for i:= 1 to CLASSES do if IDToName(ID) = TheBot.BName then begin
IGB[ID] := TheBot;
end;
if not Assignable(ID) then IGB[ID]:= TheBot[0];
end;
procedure Regenerate(ID: byte);
begin
if IGB[ID].BRegLim then begin
if (IGB[ID].BHealth - BotHpLeft[ID]) < IGB[ID].BHPReg then BotHpLeft[ID]:= BotHpLeft[ID] + (IGB[ID].BHealth - BotHpLeft[ID]);
if (IGB[ID].BHealth - BotHpLeft[ID]) >= IGB[ID].BHPReg then BotHpLeft[ID]:= BotHpLeft[ID] + IGB[ID].BHPReg;
end else if BotHpLeft[ID] < 65000 then BotHpLeft[ID]:= BotHpLeft[ID] + IGB[ID].BHealth;
end;
//********************************************************************
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
if Assignable(Victim) then if IGB[Victim].BWaveVal > 0 then Explode(Victim);
end;
procedure AppOnIdle(Ticks: integer);
var i: byte;
begin
// AllHealth;
for i:= 1 to 32 do if Assignable(i) then begin
if (IGB.BBonT >= 60) and (IGB.BBonus <> 255) then if Ticks mod IGB.BBonT = 0 then GiveBonus(i, IGB.BBonus);
if IGB.BWeapon <> 255 then if (GetPlayerStat(i, 'Primary') <> IGB.BWeapon) or (GetPlayerStat(i, 'Secondary') <> 255) then ForceWeapon(i, IGB.BWeapon, 255, 0);
if (IGB.BHPReg <> 0) and (GetPlayerStat(i,'Alive')= true) then Regenerate(i);
end;
end;
procedure OnPlayerRespawn(ID: Byte);
begin
if Assignable(ID) then if IDToName(ID) <> IGB[ID].BName then Assign(ID);
if Assignable(ID) then begin
if IGB[ID].BBonus <> 255 then GiveBonus(ID, IGB[ID].BBonus);
if IGB[ID].BWeapon <> 255 then ForceWeapon(ID, IGB[ID].BWeapon, 255, 0);
BotHpLeft[ID]:= IGB[ID].BHealth;
end;
end;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;
begin
Result:= Damage;
if Assignable(Victim) then if IGB[Victim].BShowHP then ShowHP(Victim, Shooter);
if Assignable(Shooter) then if IGB[Shooter].BDamage <> 1 then Result:= Damage*IGB[Shooter].BDamage;
if Assignable(Victim) then if BotHpLeft[Victim] > 0 then begin
Result:= -99999;
if Damage < 5000 then dec(BotHpLeft[Victim],Damage) else dec(BotHpLeft[Victim],Round(Damage/75));
if BotHpLeft[Victim] < 1 then DoDamageBy(Victim,Shooter,200);
end;
end;
//********************************************************************
who can help me write Kamikaze's blood high? and combine to ↑ that script!!
From: November 11, 2009, 07:58:56 am
sorry!i am so dumb!
「BH」 can change bot 's health!! okey i know != =|||