How Evil Is _special?

ElectricSheepElectricSheep Join Date: 2003-04-21 Member: 15716Members
<div class="IPBDescription">One ban later and a little relieved</div> I was saying on a server tonight that special could do anything. Someone then asked if it could make coffee,so I set a _special script that would say make coffee repeatedly. The anti-spam filter kicked me immediately. Curious as to what this script actually did, I tried it on a listen server that I made. It repeated make coffee at a moderate rate. Then, being the curious one as I am, I removed the waits from the script. The result? Steam crashed. I then wondered if this was crashing my steam, or the server I made, or both. If it DID make servers crash, it could be abused horribly. Since a listen server would crash if my steam crashed anyway, I found a relatively empty dedicated server and asked the two people on it to come back if it crashed. Upon executing the script my steam crashed, but, luckily upon coming back the server I saw that it had in fact, not crashed. As I was asking if the server crashed or if the words make coffee had been spammed, the server admin banned me, something for which I really can't blame him because I kind of did try to crash the server, in the name of discovery of course. While what I did didn't actually affect the server (I think) what I was saying made the admin assume that I was trying to crash the server, which I was I guess. So I guess I'll have to stay banned from that server since in retrospect I really diserved that banning. It seemed like I was autobanned by a server modification, like I got a message saying server crash attempted and ban imminent. Which would be bad cause it would mean that _special scripts CAN impact server performance, giving lamers a very powerful weapon.

So I am releaved that special scripts can't (AFAIK) crash servers, I now have a question. What CAN a _special script do? What can't it do? I know it can make repeating commands, what can these be used for? Essentially, what make _special scripts so bad? I apologize for kind of trying to crash the server I was on, and to the 2 people who were on it at the time. I was really worried about what special could do in the hands of someone who would want to crash a busy server, so I acted brashly out of the interest to know. The script was )in case you were interested)


alias specialpist "-attack2;say make coffee;+attack2;"
alias "+pist" "alias _special specialpist; +attack2;"
alias "-pist" "alias _special; -attack2;"

A very simple change to a _special pistol script someone posted earlier. While I'm not new to HL scripting, I have no idea how this _special command works, other than where the repeating command should go. This particular script when +pist is bound to a key and that key is pressed crashes steam. So to reiterate what I said, I thought I'd found an abusable way to crash servers, I tried to find out and got banned for it, now I want to know what _special scripts can and can't do. Again I'd like to apologize on my own behalf to whatever server it was I was on. I wasn't thinking clearly and was genuinely worried about what could be done with _special scripts.

Comments

  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    It executes the command within the script on every "tick" of the Half-Life engine or every frame you render on screen, not quite sure which. This can lead to a pistol being fired like an automatic weapon at the maximum RoF, due the the attack command being spammed at Half-Life on a single keypress. Or lead to perfect bunnyhopping as you will jump the exact instant that you hit the floor with the jump command being spammed.

    You can also make something that makes you strafe side to side which will increase your running speed quite considerably (only really useful as a marine as aliens can bhop which gives you a larger increase in speed).
  • a_civiliana_civilian Likes seeing numbers Join Date: 2003-01-08 Member: 12041Members, NS1 Playtester, Playtest Lead
    edited September 2004
    Running the command +attack2 causes the game to run the command _special. It is actually just like "alias +attack2 _special", except for one thing. It allows other commands to be run at the same time, rather than queuing them up. This means it does not lock you up.
  • T_AliT_Ali Join Date: 2002-11-06 Member: 7315Members
    edited September 2004
    I'm going to hazard a guess that since TFC was a core valve development, the oddity of _special ended up in all HL mods as a result of TFC.

    Reason?

    "special" was a tfc command that caused each of the player classes in TFC to perform a different action, one either unique to their class or central to their function, or both.

    It made an engineer produce a build list. It made a soldier reload his weapon. If you were a demoman (explosive-themed class for TFC virgins), he'd detonate his remote pipebombs. And so on.

    There were other ways to perform these special tasks as well. In many cases, they had their own command (+reload, detpipe). In other cases, they could be performed using "+attack2".

    Ah ha!

    More:

    Special was a very special command as you can see. One of the things that made it was unique was that it had to perform in a variety of contexts. HL commands have two basic forms:

    1) They occur instaneously and discretely. There is no need to turn them on and off. Example: "kill" (causes suicide).

    2) They occur over time, and therefore need an "on" and and "off"state. Example:
    "+forward". "+forward" is actually a simpler way of saying "+forward/-forward", a command pair that typifies these "over time" commands. Unless you are making your own scripts however, you usually only see the "+command" half of the equation. Reason? When you bind a key to "+command", HL *automatically* executes "-command" when you release the key.

    The real power of HL scripts (such as it is, HL overall has weak scripts believe it or not) could be found in making custom commands that had *different* + and - forms. Like this:

    alias +ar "use tf_weapon_autorifle; wait; +attack"
    alias -ar "-attack; lastinv"
    bind mouse2 "+ar"

    That's a simple TFC script that changes to a specific weapon and begins firing it when you press mouse2. When you let up on mouse2, it stops firing and returns to the last weapon used.

    The point of special was so you could have a single convenient button bound that would do something useful for any class (9 classes meant many different commands needed).

    So...

    Special needed to perform in *both* of the above contexts. It needed to sometimes "fire and forget" a command, but it ALSO needed to be able to continually perform a command until it's button was released, WITHOUT utilizing a +command/-command syntax. So special really was special. See where this is going? It was a command that was allowed to loop, and more importantly, break out of the loop (try to make a loop with aliases and you'd never break out it, and HL would lock up).

    So, naturally, you'd want to prevent people from overwriting this command. You could no more alias something to "special" than you could to "forward".

    The supposition is that it was possible to alias things to "special" by way of "_special" due to some poor string parsing somewhere, but this hasn't been definitively shown to the best of my knowledge. Sorta looks like it though don't it? Whatever the reason, it works. Aliasing some commands to _special overwrites the real special command (it would cause use of "special" in TFC to stop working), and gives you a single powerful, interruptable looping alias.

    Taddaaa. The story of _special.
  • ZiGGYZiGGY Join Date: 2003-01-19 Member: 12479Members
    if you make a special script to spam weapons in marine start Im guessing that would crash the server :S
  • the_x5the_x5 the Xzianthian Join Date: 2004-03-02 Member: 27041Members, Constellation
    <!--QuoteBegin-ZiGGY^+Sep 8 2004, 06:04 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (ZiGGY^ @ Sep 8 2004, 06:04 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> if you make a special script to spam weapons in marine start Im guessing that would crash the server :S <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Not necessarily, but you'd have to be pretty stupid to do that.

    **** like that will get you banned anywhere.
Sign In or Register to comment.