Author Topic: Need help!Searching "Kamakazi" script!  (Read 1411 times)

0 Members and 1 Guest are viewing this topic.

Offline absoulut1234

  • Major(1)
  • Posts: 30
Need help!Searching "Kamakazi" script!
« on: November 11, 2009, 05:51:32 am »
YA
I  am searching about Kamikaze   script
the script      have   about...10 kamikaze   [nades]  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!    [ban]




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 != =|||

« Last Edit: November 11, 2009, 07:58:56 am by absoulut1234 »

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Need help!Searching "Kamakazi" script!
« Reply #1 on: November 11, 2009, 09:09:07 am »
That was help you with Kamikaze's blood high.
http://forums.soldat.pl/index.php?topic=36545.0
KAWAAAAAAAIIIIIIIIII

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Need help!Searching "Kamakazi" script!
« Reply #2 on: November 11, 2009, 12:07:54 pm »
TheBot[1].BHealth := 100;

^ modify that

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!Searching "Kamakazi" script!
« Reply #3 on: November 12, 2009, 09:25:30 am »
ya
but now i have  other question!

i use that script  make a BOT  called      "Knife Man"
i want them can do shot same as "Slice Zombie" (shot knife)
but after they shot knife! they are NO WEAPON!
how can i let the knife repeat in the bot's hand ???


this is my Knife Man script!what's wrong?



begin
    TheBot[9].BName   := 'Knife Man';
    TheBot[9].BHealth := 200;
    TheBot[9].BHPReg  := 10;
    TheBot[9].BRegLim := false;
    TheBot[9].BShowHP := false;
    TheBot[9].BHColor := $00ff00;
    TheBot[9].BWeapon := 14;
    TheBot[9].BBonus  := 255;
    TheBot[9].BBonT   := 0;
    TheBot[9].BDamage := 5;
   
    TheBot[9].BWaveVal:= 3;
    TheBot[9].BWaveStl:= 13;
    TheBot[9].BWaveSpd:= 30;
  end;
       



where can setup the weapon(knife)  repeat??
thx

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Need help!Searching "Kamakazi" script!
« Reply #4 on: November 12, 2009, 07:13:15 pm »
In AppOnIdle.


Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!Searching "Kamakazi" script!
« Reply #5 on: November 13, 2009, 04:15:47 am »
how to write AppOnIdle??
who can help me?
i need some script that can make my bot shot knife and repeat weapon!
thx






procedure AppOnIdle(Ticks: integer);
begin
if GetPlayerStat(1,'Secondary') <> 14 then
begin

ForceWeapon(1,GetPlayerStat(1,'Primary'),14,0);
end;
end;





and then??

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Need help!Searching "Kamakazi" script!
« Reply #6 on: November 13, 2009, 05:22:07 pm »
EDIT: Just fixed a very bad typo.

Code: [Select]
procedure AppOnIdle(Ticks: integer);
var i: byte;
begin
for i := 1 to 32 do begin
if getplayerstat(i,'active') then begin
if getplayerstat(i,'name') = 'Knife Man' then begin
if getplayerstat(i,'primary') <> 14 then forceweapon(i,14,getplayerStat(i,'secondary'),0);
end;
end;
end;
end;
« Last Edit: November 13, 2009, 11:11:50 pm by Hacktank »


Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!Searching "Kamakazi" script!
« Reply #7 on: November 16, 2009, 06:24:49 am »
thank you!!!You are nice guy!  \(T_T)/