Author Topic: Killer_v1.1  (Read 1817 times)

0 Members and 1 Guest are viewing this topic.

Offline Rag

  • Major(1)
  • Posts: 18
Killer_v1.1
« on: January 02, 2009, 04:10:06 am »
Script Name:  Killer_v1
Script Description: Simple script (my 1st)- kills everybody or selected team..
Original Author: Rag
Compile Test:  Passed
Core Version: 2.6.3
Hosted by: Soldat Central

Full Description: Usefull for all gamemodes (CTF, TM, DM, HTF, etc..)

Commands:   For Players:   !killer   - just info that script is On/Off
                    For Admins:
                      /killer         - turn script On/Off
                      /killall         - kill all living Players on server
                      /killA          - kill all living Players in Alpha team
                      /killB          - kill all living Players in Bravo team
                      /killC          - kill all living Players in Charlie team
                      /killD          - kill all living Players in Delta team
                      /killN          - kill all living Players in None(0) team -[Deathmatch]

Sample of script:
Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
if (Text = '/killer') then
begin
if (scriptOn=0) then
begin
scriptOn:=1;
WriteConsole(0,'"Killer" has been Enabled. Watch out!', maincolor);
WriteLn('"Killer" has been turned ON.');
end
else
begin
scriptOn:=0;
WriteConsole(0,'"Killer" has been diasbled. Uff.', maincolor);
WriteLn('"Killer" has been turned OFF');
end;
end;
.......

______________________________________________________________



______________________________________________________________


Change Log 1.0 -> 1.1
- just shortened (it's got about 160 lines less than lastest version)


I'm waiting for your comments. I'll think about update it and add some stuff. If I made a mistake, I'm sorry for my english- It's not very good.

Thx for small help to iDante, Danmer and Vyka^^.
« Last Edit: January 03, 2009, 08:05:33 pm by Rag »

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Killer_v1
« Reply #1 on: January 02, 2009, 04:28:37 am »
(First hrhr^^) It's working great :) No Problems or something^^ Good work!

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Killer_v1
« Reply #2 on: January 02, 2009, 04:29:11 am »
Why did you make 5 almost the same procedures when it can be done using one? Also 100 lines in OnCommand function can be written using 15 lines. The whole script has 350 lines but easily can have 80 with the same result.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Killer_v1
« Reply #3 on: January 02, 2009, 04:30:27 am »
Don't forget that this his first script is tk ;)

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Killer_v1
« Reply #4 on: January 02, 2009, 05:35:44 am »
Aye tk is correct. There is mass repetition here that could easilly be cut. For instance, instead of having a procedure KillA, KillB, KillC, KillD, KillN, why not have Kill(team: byte) and use that instead?

Other than that, props to you for creating a working script, and I hope to see more. Feel free to ask questions at #soldat.devs on quakenet, it's where the cool people stay.
« Last Edit: January 02, 2009, 05:37:29 am by iDante »

Offline Rag

  • Major(1)
  • Posts: 18
Re: Killer_v2
« Reply #5 on: January 03, 2009, 07:56:19 pm »
Ok i've  updated it.. Now I'll think about add smth