Need Help For A Server Setup Script

Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
<div class="IPBDescription">to quickly switch ffa/tourney mode...</div> ok here it is:


alias tournament "tmon"
alias "tmon" "rcon mp_tournamentmode 1; rcon say tournamentmode on; alias tournament tmoff"
alias "tmoff" "rcon mp_tournamentmode 0; rcon say FFA settings loaded; rcon sv_password none; alias tournament tmon"


Now from my POV, what it should do is on the first press, put tourneymode on, the server will say tournamentmode on.

The second press would put tournamentmode off, say FFA settings loaded and remove the password from the server.

But for some reason it serversays 3 times tournamentmode on or FFA settings loaded at a press, and it seems the rest doesn't do anything. does anyone know what is wrong and how to remedy to it?


until then I'll have to do everything manually <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->

Comments

  • Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
    anyone??? <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
  • Lightning_BlueLightning_Blue Sunny Domination Join Date: 2002-12-11 Member: 10647Members, Constellation, Reinforced - Silver
    edited April 2003
    yeah, er, wrong thread
  • verboseverbose Join Date: 2002-11-25 Member: 9968Members, Constellation
    There's something screwy with using multiple rcon_commands in one alias or bind. I can't get both to ever work, and I've tried nesting aliases and all kinds of other tricks. My guess is that the rcon keyword sucks up the rest of the command line, regardless of what's on it (i.e. it doesn't stop at the semicolon).
  • Eternal_BlissEternal_Bliss Join Date: 2002-11-07 Member: 7633Members, NS1 Playtester, Contributor
    edited April 2003
    sv_password none sets password to be "none". change it to sv_password ""
    no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame
  • CheesyPetezaCheesyPeteza Join Date: 2002-11-24 Member: 9784Members, NS1 Playtester, Constellation
    You have to put a load of wait commands inbetween the rcon commands. I had to do this for an admin script I made.

    alias "w8" "wait; wait; wait; wait; wait; wait; wait; wait"
    alias "w16" "w8; w8"
    alias "w64" "w16; w16; w16; w16"
    alias "w128" "w64; w64"
    alias "w256" "w128; w128"

    Try increasing wait times out until you get one to work.
  • Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
    edited April 2003
    <!--QuoteBegin--Eternal Bliss+Apr 12 2003, 06:42 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Eternal Bliss @ Apr 12 2003, 06:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> sv_password none sets password to be "none". change it to sv_password ""
    no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Im pretty sure that's wrong.. setting it to none removes the password I do believe....


    I'll try to put 100000 waits in between <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    edit: but do I have to put 256 of them??? <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
  • CheesyPetezaCheesyPeteza Join Date: 2002-11-24 Member: 9784Members, NS1 Playtester, Constellation
    I doubt it, that was just an example I have at the top of all my scripts for ease of use. I'd guess about 16 waits would probably do it.
  • Eternal_BlissEternal_Bliss Join Date: 2002-11-07 Member: 7633Members, NS1 Playtester, Contributor
    <!--QuoteBegin--Cereal_KillR+Apr 13 2003, 02:44 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Cereal_KillR @ Apr 13 2003, 02:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin--Eternal Bliss+Apr 12 2003, 06:42 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Eternal Bliss @ Apr 12 2003, 06:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> sv_password none sets password to be "none". change it to sv_password ""
    no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Im pretty sure that's wrong.. setting it to none removes the password I do believe....


    I'll try to put 100000 waits in between <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    edit: but do I have to put 256 of them??? <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Wrong, it sets the password to none.
    here:
    L 04/13/2003 - 14:59:57: Rcon: "rcon 1064088564 "**********" sv_password none" from "213.8.95.166:29365"
    "sv_password" is "none"
    and server is locked.
    L 04/13/2003 - 15:00:59: Rcon: "rcon 1064088564 "**********" sv_password """ from "213.8.95.166:29365"
    "sv_password" is ""
    and server is unlocked <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • Pebbles-TPFPebbles-TPF Join Date: 2002-11-11 Member: 8237Members, Constellation
    <!--QuoteBegin--Cereal_KillR+Apr 11 2003, 03:31 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Cereal_KillR @ Apr 11 2003, 03:31 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ok here it is:


    alias tournament "tmon"
    alias "tmon" "rcon mp_tournamentmode 1; rcon say tournamentmode on; alias tournament tmoff"
    alias "tmoff" "rcon mp_tournamentmode 0; rcon say FFA settings loaded; rcon sv_password none; alias tournament tmon"


    Now from my POV, what it should do is on the first press, put tourneymode on, the server will say tournamentmode on.

    The second press would put tournamentmode off, say FFA settings loaded and remove the password from the server.

    But for some reason it serversays 3 times tournamentmode on or FFA settings loaded at a press, and it seems the rest doesn't do anything. does anyone know what is wrong and how to remedy to it?


    until then I'll have to do everything manually <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Your general idea is correct, but there are a couple of choices that you can implement to change how to switch modes.

    1) Modify you script

    2) Make two files with scripts in them and use rcon to run them.

    This is how I would modify your script.

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias tournament "tmon"
    alias "tmon" "alias tournament tmoff";"rcon mp_tournamentmode 1; say tournamentmode on"
    alias "tmoff" "alias tournament tmon"; "rcon mp_tournamentmode 0; say FFA settings loaded; sv_password none"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    I have no idea if this will work the way it should, but it seems like the problem is that you are calling an rcon command from inside an rcon command.

    i.e.:

    rcon "rcon say Hello World"

    shouldn't produce the results you want, so I would basically strip the "excessive" rcons from your script. (as I said, I do not know if this will work)

    2) Makeing two files is considerably easier to verify that the script works.

    File 1 (called "tmon.cfg"):
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->mp_tournamentmode 1
    say "tournamentmode on"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    File 2 (called "tmoff.cfg"):
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    "mp_tournamentmode 0
    say FFA settings loaded
    sv_password ""
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Now upload these files to your ns directory/folder of your server and you can then use rcon to execute those scripts like so:

    rcon exec tmon.cfg
    rcon exec tmoff.cfg

    if you want your aliases then you can simply do this:
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias tournament "tmon"
    alias "tmon" "alias tournament tmoff; rcon exec tmon.cfg"
    alias "tmoff" "alias tournament tmon; rcon exec tmoff.cfg"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Let me know if this helps.

    <i>Pebbs</i>
  • Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
    I dropped the whole thing altogether I'll just use it manually <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Guaranteed to work

    thanks anyway...
Sign In or Register to comment.