Author Topic: Berserk script?  (Read 613 times)

0 Members and 1 Guest are viewing this topic.

Offline FORBES

  • Major(1)
  • Posts: 13
  • It AlL GeTs CrAzY WhEn ThE LiGhT's Go Out !
Berserk script?
« on: April 10, 2009, 01:06:44 pm »
has anyone got a script or know of a script to give people berserk like for example the invisible script u just type

/invis ?  and he/she gets it then u do /invis ? again to take it away

i love to have this but i cant find it

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Berserk script?
« Reply #1 on: April 10, 2009, 02:52:04 pm »
Here, its not tested but it should work.

EDIT All fixed up :)

Commands are:
  • /serk - Gives you a beserk once
  • /infiserk - Turns on/off infanite beserker
Code: [Select]
var dmg: array[1..32] of single;
time: array[1..32] of integer;
 
function OnPlayerCommand(ID: byte; text: string): boolean;
var hp: integer;
begin
if getpiece(text,' ',0) = '/infiserk' then begin
if dmg[id] = 1 then begin
dmg[ID] := 4;
exit;
end;
if dmg[id] = 4 then begin
dmg[ID] := 1;
exit;
end;
end;
if getpiece(text,' ',0) = '/serk' then begin
dmg[ID] := 4;
time[ID] := 12;
end;
end;

procedure AppOnIdle(Ticks: integer);
var i: byte; hp: integer;
begin
for i := 1 to 32 do begin
if getplayerstat(i,'active') then begin
if time[i] > 0 then begin
dec(time[i],1);
DrawText(i,'Beserk  -  ' + IntToStr(time[i]),60,$FFFF0000,0.12,250,390);
end;
if time[i] = 0 then dmg[i] := 1;
end;
end;
end;

function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer):integer;
begin
result := damage*dmg[ID];
end;

procedure OnJoinGame(ID, Team: byte);
begin
dmg[ID] := 1;
time[ID] := 0;
end;code]
« Last Edit: April 12, 2009, 03:34:34 pm by Hacktank »


Offline FORBES

  • Major(1)
  • Posts: 13
  • It AlL GeTs CrAzY WhEn ThE LiGhT's Go Out !
Re: Berserk script?
« Reply #2 on: April 10, 2009, 04:13:17 pm »
thanks