Author Topic: BigTaunts  (Read 7813 times)

0 Members and 1 Guest are viewing this topic.

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #20 on: March 21, 2009, 04:17:55 pm »
I skimmed through the script's code and I see it's well done but I have some buts ^^'. My point is that when someone (like me) have f.e. EFC and his position specified in separated lines it won't work as it should be. I'll paste here piece of my taunts file.
Code: [Select]
^<~EFC!~>
^<~On the left!~>
^<~Base HOT!~>
^<~Middle!~>
^<~Tunnel!~>
^<~High!~>
^<~Low!~>
© Furai
« Last Edit: March 21, 2009, 04:21:55 pm by Wookash »
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #21 on: March 21, 2009, 06:14:18 pm »
yes this is not implemented
maybe its possible .. you would have the script to wait untill both taunts are written

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #22 on: March 22, 2009, 02:56:20 am »
Can it possibly write whole your phrase which you wrote?
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #23 on: March 24, 2009, 12:48:30 pm »
sure .. your text is saved in the "text" variable so you just have to output "text".
i was just searching for keywords in "text"



Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #24 on: March 25, 2009, 05:04:22 am »
I see. Maybe I'll try to edit this script for my use. Of course if you don't mind.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #25 on: March 26, 2009, 01:52:44 pm »
sure do it your way :) be free to use

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #26 on: March 26, 2009, 01:54:18 pm »
Thanks. I don't know when I'll have time to do it, though.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: BigTaunts
« Reply #27 on: March 27, 2009, 12:19:36 pm »
List of things I don't like:

1. Did you hear about type named 'boolean'? It has only 2 values: true and false, and is much more light than integer.
2. http://www.nopaste.com/p/agc9H7Bb9
Maybe you don't know that but too many RegExp's are quite(much) heavy. Putting them outside the for i:= 1 to 32 loop would help...
3. There's something named "else" that can prevent server from checking 50 if's everytime someone does /piss.
4.
Code: [Select]
if RegExpMatch('^\^.*(cap|score)',lowercase(Text)) = true then
...
                 DrawText(i,'Capture now!',(60*duration),RGB(0,255,0),iheight,iposx,iposy)
Maybe "Score now!"?
5.
Code: [Select]
if (text = '/orange') then
        begin
          taunts_color := 5;
          WriteConsole(id,'BigTaunts-Color = Orange!',RGB(100,140,230));
        end;
...
if (taunts_color = 5) then
        begin
            color1 := 255;
            color2 := 150;
            color3 := 0;
        end;
What the ...? Can't you do:
Code: [Select]
if (text = '/orange') then
        begin
          color1 := 255;
          color2 := 150;
          color3 := 0;
          WriteConsole(id,'BigTaunts-Color = Orange!',RGB(100,140,230));
        end;
...and kick that variable?
Also you can use "case" instead of many ifs.
6. Why don't you use arrays in color/size/other settings?

And some good words to make you feel better even if you failed: You have some RegExp skillz :D
« Last Edit: March 27, 2009, 12:24:35 pm by Gizd »

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #28 on: March 30, 2009, 11:40:51 am »
I'll tell Timcrack , i didnt do anything about that new stuff but i see there is something that is really not necessary.
But Timcrack is new to the serverscripting and i think it's well done for that knowledge.
but thanks for your help :)

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #29 on: March 30, 2009, 12:14:25 pm »
Code: [Select]
1. Did you hear about type named 'boolean'? It has only 2 values: true and false, and is much more light than integer.
Gizd: You only need to add '= True' or '= False' if the Result is an variant, if the Result, like in RegExpMatch is an Boolean you dont need to add it.

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: BigTaunts
« Reply #30 on: March 30, 2009, 02:02:59 pm »
y0uRd34th:
He meant using integer instead of boolean in the script:
Quote
p_taunts : array[1..32] of integer;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
if (text = '/taunts') and (p_taunts[id] = 1) then
        begin
         p_taunts[id] := 0;
         WriteConsole(id,'BigTaunts disabled',RGB(100,140,230));
         end else if (text = '/taunts') and (p_taunts[id] = 0) then
                 begin
                 p_taunts[id] := 1;
                 WriteConsole(id,'BigTaunts activated!',RGB(100,140,230));
                 end;
...

When it should be
Quote
p_taunts : array[1..32] of boolean;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
  if text = '/taunts' then
  begin
    p_taunts[id] := not p_taunts[id];
    writeconsole(id,'BigTaunts '+iif(p_taunts[id],'activated','disabled')+'!',RGB(100,140,230));
  end;
...
« Last Edit: March 30, 2009, 02:06:11 pm by tk »

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #31 on: March 31, 2009, 09:11:36 am »
Oh, then ya.. He didn't had an example^^..

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: BigTaunts
« Reply #32 on: March 31, 2009, 10:49:05 am »
Oh, then ya.. He didn't had an example^^..
Yes, that's why your post is useless.

Offline dragus

  • Major(1)
  • Posts: 23
BigTaunts
« Reply #33 on: August 12, 2009, 04:45:08 am »
Heh nice script

Offline Biggles

  • Flagrunner
  • ****
  • Posts: 590
  • Mapping rotating
Re: BigTaunts
« Reply #34 on: August 12, 2009, 05:27:23 am »
Nice script I believe it could be quite useful for 6v6 games or higher, although I only read taunts when I'm waiting for the enemy to come into my base, otherwise I rather look around when i'm dead.