Author Topic: BigTaunts  (Read 6824 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
BigTaunts
« on: March 14, 2009, 01:08:30 pm »
Script Name: BigTaunts
Script Description: Server recognizes taunts of playes and draws them in DrawText for the Team
Original Author(s): Idea by Timcrack , made by DrThrax
Core Version: 2.6.0
Code:
just a snippet
Quote
if RegExpMatch('efc|enemyflagcarrier|enemy flagger|enemies flag|enemies flagger|enemy flag',lowercase(Text)) = true then
   begin
         for i := 1 to 32 do
            begin
            if GetPlayerStat(i,'Team') = GetPlayerStat(id,'Team') then
                 begin
                 if RegExpMatch('down|low|lower|bottom|downside',lowercase(Text)) = true
                    then DrawText(i,'[EFC]^lower^Way!',(60*DURATION),iif(GetPlayerStat(i,'Team') = Alpha,RGB(255,0,0),RGB(0,0,255)),HEIGTH,POSX,POSY)
                 if RegExpMatch('mid|middle',lowercase(Text)) = true
                    then DrawText(i,'[EFC]^middle^Way!',(60*DURATION),iif(GetPlayerStat(i,'Team') = Alpha,RGB(255,0,0),RGB(0,0,255)),HEIGTH,POSX,POSY)
                 if RegExpMatch('up|upper|high|roof|upsided',lowercase(Text)) = true
                    then DrawText(i,'[EFC]^upper^Way!',(60*DURATION),iif(GetPlayerStat(i,'Team') = Alpha,RGB(255,0,0),RGB(0,0,255)),HEIGTH,POSX,POSY)
                 end;
                 end;
         end;

Script recognizes most of the efc , ffc , incomings , free flags , full base , clear and cap taunts.
The server will then answer with a standard text like in the example above with "[EFC]^upper^Way".
The player is able to set these DrawTextes on or of with "/taunts".
Maybe it can help the team to communicate in a better way:



Code:http://www.nopaste.com/p/aiodslJlS

kind regards , Thrax


« Last Edit: March 14, 2009, 01:11:26 pm by Dr.Thrax »

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: BigTaunts
« Reply #1 on: March 14, 2009, 01:42:11 pm »
Hey really good idea =) I like it.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #2 on: March 14, 2009, 03:00:59 pm »
Ya really good Idea, Good Work :D, now all will see it where EFC is..

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: BigTaunts
« Reply #3 on: March 14, 2009, 03:34:16 pm »
i guess its set that only your team see them

Im chill like that

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #4 on: March 15, 2009, 04:26:00 am »
Why not reading the script first before making useless Posts? :D
Code: [Select]
         for i := 1 to 32 do
            begin
            if GetPlayerStat(i,'Team') = GetPlayerStat(id,'Team') then
                 begin

Offline el,goog

  • Major(1)
  • Posts: 30
  • Ingame Name: SCP
Re: BigTaunts
« Reply #5 on: March 15, 2009, 04:42:30 am »
This could be very useful.
I find that sometimes during intensed battles (yes i do play soldat too much) I don't read what people are writing. I guess I'm getting to old..  :'(
ǝןqıssod ƃuıɥʇʎɹǝʌǝ ǝןƃooƃ

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: BigTaunts
« Reply #6 on: March 15, 2009, 08:58:19 am »
Why not reading the script first before making useless Posts? :D
Code: [Select]
         for i := 1 to 32 do
            begin
            if GetPlayerStat(i,'Team') = GetPlayerStat(id,'Team') then
                 begin
No, this will make it so it shows for everybody on i's team.. going through all players, checking if player i's team is the same as the speaker's team

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #7 on: March 15, 2009, 09:10:34 am »
ye only your team is able to see your big taunts because its the only way it makes sense ^^

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #8 on: March 15, 2009, 09:20:59 am »
DorkeyDear: That i wanted to tell him -.-
Dr.Thrax: Ya^^ Would be funny if the other Team see it and your team not Oo (no sense^^)

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: BigTaunts
« Reply #9 on: March 15, 2009, 10:02:19 am »
Very good concept, this could be extended to stuff like 'incoming' and 'base hot' as well. edit : oops..

If I were you I'd FIRST check the player saying 'down/middle/up' and THEN start the loop for displaying it to the whole team. Right now everytime someone mentions a flag carrier you'll be calling RegExpMatch 96 times. Also you could add the RegExp condition '^\^' to make sure the text starts with ^ and thus is for team only:
Code: [Select]
RegExpMatch('^\^.*(efc|enemyflagcarrier|enemy flagger|enemies flag|enemies flagger|enemy flag)',lowercase(Text)) or
Code: [Select]
if RegExpMatch('^\^', lowercase(Text)) then begin
  if RegExpMatch('efc|enemyflagcarrier|enemy flagger|enemies flag|enemies|flagger|enemy flag',lowercase(Text)) then begin

I might one day 'steal' this idea, that is if you wont mind ;)
« Last Edit: March 15, 2009, 11:43:31 am by JFK »
Come join: EliteCTF
Listen to: My Music

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #10 on: March 15, 2009, 10:33:38 am »
How about making it that it would enlarge every team chat?
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline el,goog

  • Major(1)
  • Posts: 30
  • Ingame Name: SCP
Re: BigTaunts
« Reply #11 on: March 17, 2009, 01:50:29 am »
How about making it that it would enlarge every team chat?

hmmm... what happens if people said something at the same time and what if two people were talking to each other (team chat) in a pub?
ǝןqıssod ƃuıɥʇʎɹǝʌǝ ǝןƃooƃ

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: BigTaunts
« Reply #12 on: March 17, 2009, 02:16:39 am »
Should it check whether they are in spec or not?
I'm not sure if you can draw text to specs
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #13 on: March 17, 2009, 08:40:30 am »
you could add that thing , yes:
Quote
If (RegExpMatch('...',lowercase(Text)) = true) and (GetPlayerStat(id,'Team') < 3 ) then begin ...

or 


If (RegExpMatch('...',lowercase(Text)) = true) and (GetPlayerStat(id,'Team') < 5 ) then begin ...



Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: BigTaunts
« Reply #14 on: March 18, 2009, 07:40:46 am »
How about making it that it would enlarge every team chat?

hmmm... what happens if people said something at the same time and what if two people were talking to each other (team chat) in a pub?
I'm just trying to bypass problem of using proper syntax to make this big taunts work. I wish it was showing exact enlarged taunt of mine. Could it possibly check if phrase has word EFC in it?
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline tehsnipah

  • Veteran
  • *****
  • Posts: 1093
  • Koreanah Snipah
Re: BigTaunts
« Reply #15 on: March 18, 2009, 04:07:50 pm »
That... Is... Awesome!!!!! Since they don't have voice, those big letters will get players the attention!
"Prudence is good when pulling the trigger on a heavy firearm. It's all or nothing. So is life, wouldn't you say?"

Offline scarface09

  • Veteran
  • *****
  • Posts: 1153
  • Arsenal Supporter For Life
Re: BigTaunts
« Reply #16 on: March 19, 2009, 04:10:58 pm »
Wouldn't it get annoying or take up space when fighting in combat so you can't see your enemy?
Football is the other face of the world. If you don't like it, then you can get the hell out!

Offline Xxypher

  • Veteran
  • *****
  • Posts: 1319
  • Soldat Veteran.
Re: BigTaunts
« Reply #17 on: March 20, 2009, 11:03:17 am »
I would love to see this in Hexer.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: BigTaunts
« Reply #18 on: March 20, 2009, 02:51:37 pm »
Good idea Xxhyper! Why you don't write it on Hexerpage instead of here? Maybe you've done it already^^

Offline Dr.Thrax

  • Major
  • *
  • Posts: 70
    • Lostgalaxy.de
Re: BigTaunts
« Reply #19 on: March 21, 2009, 01:34:02 pm »
Here an update of Timcrack himself

he changed some things you mentioned and added the possibility to change size , color and position of your individual taunts:


http://www.nopaste.com/p/aNyYsvJv5

kind regards , Drthrax and Timcrack

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.