Author Topic: Script of renewal of health  (Read 1704 times)

0 Members and 1 Guest are viewing this topic.

Offline Detector

  • Major
  • *
  • Posts: 55
Script of renewal of health
« on: June 21, 2007, 03:20:52 pm »
Script of renewal of health,
I think this is sometimes better then just god script.


Code: [Select]
procedure AppOnIdle(Ticks: integer);
begin
   if Ticks mod (60 * 1) = 0 then begin
     DoDamage(NameToID('The Wasted!Det'),-10);
   end;
end;
« Last Edit: June 22, 2007, 10:04:51 am by Detector »
Read.Only.

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Need Script of renewal of health
« Reply #1 on: June 21, 2007, 03:29:58 pm »
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
  if (Text = '!renewal') then
  DoDamage(ID,-(150-GetPlayerStat(ID,'Health')));
end;
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Detector

  • Major
  • *
  • Posts: 55
Re: Need Script of renewal of health
« Reply #2 on: June 22, 2007, 03:28:46 am »
No, i mean after some damage health will restore Automatically.
How to do that?

Quote
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
  if (Text = '!renewal') then
  DoDamage(ID,-(150-GetPlayerStat(ID,'Health')));
end;

   
Hexer server is use this script too)
Read.Only.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Need Script of renewal of health
« Reply #3 on: June 22, 2007, 04:20:17 am »
Code: [Select]
procedure AppOnIdle(Ticks: integer)
var i: byte;
begin
  for  i:=1 to 32 do
    DoDamage(i,-3);
end;

this will restore 2% health for each player each second.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Detector

  • Major
  • *
  • Posts: 55
Re: Need Script of renewal of health
« Reply #4 on: June 22, 2007, 05:38:27 am »
wow, thank you!!!


Date Posted: 22 June 2007, 08:22:49
how i can do that Health will restore for current player?
Read.Only.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Need Script of renewal of health
« Reply #5 on: June 22, 2007, 06:50:08 am »
I'm moving this out of Scripting Releases

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Need Script of renewal of health
« Reply #6 on: June 22, 2007, 09:09:00 am »
what do you mean by current player?
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Detector

  • Major
  • *
  • Posts: 55
Re: Need Script of renewal of health
« Reply #7 on: June 22, 2007, 10:03:43 am »
I did it already, thank you for help.

I mean this

Code: [Select]
procedure AppOnIdle(Ticks: integer);
begin
   if Ticks mod (60 * 1) = 0 then begin
     DoDamage(NameToID('The Wasted!Det'),-10);
   end;
end;

FliesLikeABrick
Please move it back, the question is closed/
« Last Edit: June 22, 2007, 10:05:45 am by Detector »
Read.Only.