Page 1 of 5 1 2 3 ... LastLast
Results 1 to 20 of 89

Thread: Server Clearance - Script Release

  1. #1

    Server Clearance - Script Release

    Hi everybody

    Our clan's gameserver that has been dead and empty for half a year is now finally closing down by the end of this month. Since I have invested a lot of time and effort in that server, I don't want all my work to fade away with it. That's why I decided to share it with you and release everything. We're basically talking about some ETpro-mapscripts and lua-scripts here. I'll be starting with the custom-vote-lua today, and as soon as we're done with discussing that, we'll go on with another script. That's just some basic information so you know what I'm talking about and why I'm doing that, so let's get started:

    That's what I've got so far:

    Episode I - Advanced Voting LUA
    Episode II - Clantag Protection LUA
    Episode III - Nextmap Announce LUA
    Episode IV - Connect Announce LUA
    Episode V - Axis Lab Mapscript
    Episode VI - Italy FP2 Mapscript
    Episode VII - No Pro LUA
    Episode VIII - Showmaps Client Command LUA
    Episode IX - Team Balance LUA
    Last edited by phisherman; 17th Jul 2016 at 12:06.

  2. #2

    Re: Server Clearance - Script Release

    Nice will these work on etpub and other with lua scripting?
    I'm an engineer, lets just asume I'm right...


  3. #3

    Re: Server Clearance - Script Release

    Very nice!
    There are already so many options, hard to think of any..
    After long thinking , botwar and botskill could be add.

    Mapvoting could be interessting, to let vote for nextmap ~7min before map ends. A vote which shows a selection of 5 maps, but difficult to manage the vote for more then 2 maps by f1/f2..

    I know this kind of voting system from another game, and I prefer it to what is available today in etpub.

  4. #4

    Re: Server Clearance - Script Release

    I once saw on a server, that someone could write questions on the server that people then voted yes or no on. Is there such a luascript for etpro?

  5. #5

    Re: Server Clearance - Script Release

    Well done! Really great work.

    @Avoc, it was "/callvote cointoss [message]" or like in NoQuarter "/callvote poll [message]"

  6. #6
    Answering machine stealth6's Avatar
    Join Date
    Aug 2007
    Location
    Uhm... Chair?
    Posts
    3,869
    Most Recent Awards:

    Re: Server Clearance - Script Release

    Quote Originally Posted by Avoc View Post
    I once saw on a server, that someone could write questions on the server that people then voted yes or no on. Is there such a luascript for etpro?
    Isn't this a default voting option?

    /callvote generic "Vote yes or no"

    EDIT: just tried it, but seems to be a jaymod feature
    Last edited by stealth6; 6th Jun 2011 at 10:58.

  7. #7

    Re: Server Clearance - Script Release

    Quote Originally Posted by thunderpwn View Post
    Nice will these work on etpub and other
    Partially yes, but not entirely. I created this script for NQ, but to ensure compatibility with other mods I made a list of what each command does so you can see whether or not the used commands/cvars are available for jaymod/etpub/etpro etc. Since somebody decided that [table] is a useless BBtag, you can find the list here. EDIT: DOWNLOAD REMOVED

    I would really appreciate if somebody who really knows about a certain mod could go through the list and tell me "Look this feature does work with this mod but you need to use this cvar instead of that one, and the next feature does not work at all with this mod...". That would help me a lot in making this script mod-independent because especially the wars and the bot-settings vary from mod to mod, I guess. Oh and please tell me whether or not cointoss is already built into that mod.
    Quote Originally Posted by ailmanki View Post
    After long thinking [..], botwar and botskill could be add.
    I'll sure do, but you have to enlighten me what these two options should actually do.. :p
    Last edited by phisherman; 26th Sep 2012 at 14:06.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

  8. #8

    Re: Server Clearance - Script Release

    Botwar put the bots one side, so you obtain players vs bots.

    Command is /bot botwar <botTeam> <humanTeam> <botsPerHuman> client side, !botwar etc in server side.
    Related omni-bot.cfg part (This one is the default):
    [Versus]
    BotTeam = -1
    HumanTeam = 1
    BotsPerHuman = 3

    Botskills should modify the bots skill level, from 0 to 6 if I'm not wrong... Can't find it...

  9. #9

    Re: Server Clearance - Script Release

    Mateos is right, botskill would be for changing difficulty of the bots. /bot difficulty #

    I will make a list of the commands you have there for other mods. Have to test a few, like g_knifeonly for the knifewar.
    I am curious how you implemented the voting, if its also shown where the original vote is?

  10. #10

    Re: Server Clearance - Script Release

    Quote Originally Posted by ailmanki View Post
    I am curious how you implemented the voting, if its also shown where the original vote is?
    Yes, it's not a big thing actually. The buttons simply call pre-defined polls when you hit them. And the lua script is parsing the prints on the server, and if one of the pre-defined polls pass, something happens.

    Thanks for the explanations of botwar and botskill, I'll add that. About the implementation: Botskill is not difficult, I'll just add 6 buttons, one for each difficulty. But since botwar has more than one parameter, we need something more complicated..

    I'll add a cvar or lua variable that allows the admin to set a value for <botsPerHuman>. And players can call votes on botwar and choose the team the human players shall be on. Any concern about that?
    //Ah, we need another button to disable it again..
    Quote Originally Posted by ailmanki View Post
    I will make a list of the commands you have there for other mods.
    Big thanks, this would really help me a lot. :)

    //I was thinking about maxBots: On our server, we used a range from 8-14. But the maxbots-settings differ significantly from server to server. So how can I find a solution that fits for everybody? The key might be to select percentages instead of absolute numbers. The admin would define a maxbots-setting inside the lua-script and players would just see percentages. But then players wouldnt be able to see how many bots they actually vote for..
    Last edited by phisherman; 28th Jul 2011 at 15:00.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

  11. #11

    Re: Server Clearance - Script Release

    Selecting MaxBots would open a submenu with different values?

    By pourcentage, it would need to check the maxclients cvar as 100%?

  12. #12

    Re: Server Clearance - Script Release

    I would like to bundle your scripts with ETXreaL.

  13. #13

    Re: Server Clearance - Script Release

    "ENDMAP" "g_timelimit .05"
    "THIRDPERSON MODE" (Toggle) "forcecvar cg_thirdperson [1/0]"
    "HEADSHOT MODE" (Toggle) "g_headshot [1/0]"
    "FLY MODE" (Toggle) "g_gravity [200/800]"
    "TIMELIMIT +5" "g_timelimit [+5]"
    "TIMELIMIT +10" "g_timelimit [+10]"
    "ADD BOTS" "bot maxbots [8/10/12/14]"
    "KICK BOTS" "bot maxbots -1 ; bot kickall"
    "UNLOCK TEAMS" "![un]lock [b/r]"

    NoQuarter:
    "GLOW MODE" (Toggle) "!glow" + "!glow %playername%" on every playerspawn
    "DOUBLEJUMP" (Toggle) "g_doublejump [1/0]"
    "KNIFEWAR" (Toggle) "nq_war [2053/0] ; jp_insanity [+16/-16]"
    "PANZERWAR" (Toggle) "nq_war [2057/0] ; jp_insanity [+16/-16]"
    "SNIPERWAR" (Toggle) "nq_war [2065/0] ; jp_insanity [+16/-16]"

    Jaymod (2.2.0):
    "GLOW MODE" (toggle) "g_glow [1/0]"
    "DOUBLEJUMP" (bitflag) "g_misc [+1/-1]"
    "KNIFEWAR" (Toggle) "g_knifeonly [1/0]"
    "PANZERWAR" (Toggle) "g_panzewar [1/0]"
    "SNIPERWAR" (Toggle) "g_sniperwar [1/0]"

    silEnTmod (0.3.3)
    "GLOW MODE" (toggle) "" not existing
    "DOUBLEJUMP" (bitflag) "g_misc [+1/-1]"
    "KNIFEWAR" (Toggle) "g_knifeonly [1/0]"
    "PANZERWAR" (Toggle) "g_panzewar [1/0]"
    "SNIPERWAR" (Toggle) "g_sniperwar [1/0]"
    "RIFLEWAR" (Toggle) "g_riflewar [1/0]" add this one..

    etpub (0.8.1)
    "GLOW MODE" (toggle) "" not existing according to this
    "DOUBLEJUMP" (bitflag) "g_misc [+1/-1]"
    "KNIFEWAR" (Toggle) "g_knifeonly [1/0]"
    "PANZERPARTY" (Toggle) "g_partyPanzersEnabled [1/0]"
    "SNIPERWAR" (Toggle) ""

    etpub (0.9.1)
    "GLOW MODE" (toggle) "" not existing
    "DOUBLEJUMP" (bitflag) "g_misc [+1/-1]"
    "KNIFEWAR" (Toggle) "g_knifeonly [1/0]"
    "PANZERWAR" (Toggle) "g_panzewar [1/0]"
    "PANZERPARTY" (Toggle) "g_partyPanzersEnabled [1/0]" its in docu, but I thought its not existing anymore ..
    "SNIPERWAR" (Toggle) "g_sniperwar [1/0]"
    "RIFLEWAR" (Toggle) "g_riflewar [1/0]" add this one..

    I wonder if this 'print' can be catpured with every mod, I guess when I tried I made some misstake.

  14. #14

    Re: Server Clearance - Script Release

    Quote Originally Posted by Mateos View Post
    Selecting MaxBots would open a submenu with different values?
    Exactly. If nobody comes up with a great idea I havent thought about yet, I think I'll leave it like that.
    Quote Originally Posted by Mateos View Post
    By pourcentage, it would need to check the maxclients cvar as 100%?
    No, I'll add a variable (or probably a cvar) to the lua script that defines the maxbots setting. Clients can see the absolute numbers of the corresponding percentages by hitting the "QUERY MAXBOTS SETTING"-button. It'll print the information to the console and open it. It's not professional, but it's all I can do with UIscript. If one of the maxbots-votes is called, the lua script will print a line to chat displaying the related absolute number so the other players can see it at a glance and don't have to open the console and check themselves.

    @ailmanki: Big thanks for the list! You really did me a favour with that. :) As long as nobody comes up with a list for another mod, these are going to be the only mods supported: NoQuarter/Jaymod/silEnTmod/etpub. If anybody out there wants support for other mods, please give me such a list for it!
    Quote Originally Posted by ailmanki View Post
    "THIRDPERSON MODE" (Toggle) "forcecvar cg_thirdperson [1/0]"
    "HEADSHOT MODE" (Toggle) "g_headshot [1/0]"
    Are you sure that both of them are vanillaET-features? I'm not sure about forcecvar, but according to the NQwiki g_headshot is a NQ-feature. Do all your suggested mods support g_headshot (at least bitflag 1, the rest most likely is NQ-only anyway)?
    Quote Originally Posted by ailmanki View Post
    "RIFLEWAR" (Toggle) "g_riflewar [1/0]" add this one..
    ]>added to TODO..
    Quote Originally Posted by ailmanki View Post
    "PANZERPARTY" (Toggle) "g_partyPanzersEnabled [1/0]"
    What is that? o.O
    Quote Originally Posted by ailmanki View Post
    I wonder if this 'print' can be catpured with every mod, I guess when I tried I made some misstake.
    The function is called et_Print and unfortunately there's no way I could do without it..
    Quote Originally Posted by Tr3B View Post
    I would like to bundle your scripts with ETXreaL.
    Help yourself, as soon as I'm done with it everybody's free to do with it whatever they want to. :)
    Last edited by phisherman; 28th Jul 2011 at 15:01.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

  15. #15

    Re: Server Clearance - Script Release

    oh g_headshot overlooked that one.
    etpub 0.81 - could not find a easy equivalent. Though it seems possible, there are many cvars for damage.
    g_dmg* so setting each one to 0 , and the minheadshot to something... might work - I never tried that.

    etpub 0.91, jaymod and silEnTmod share the same settings for this cvar.
    "HEADSHOT MODE" (bitmask) "g_headshot [+1/-1]"

    All these mods can do 'forcecvar'.

    for etpub 0.81 is another speciality, it has only support for omnibot 0.66, that version has no botwar cmd AFAIK.


    et_print, well no wonder I couldnt capture it, I tried capturing it by et_ConsoleCommand, now the misstake is kinda obvious ;D.

  16. #16

    Re: Server Clearance - Script Release

    Good job with the scripts, will definitely be useful for a lot of server admins

    Quote Originally Posted by Phishermans Phriend View Post
    If anybody out there wants support for other mods, please give me such a list for it!
    Well N!tmod has LUA support, so why not

    Here are the cvars and their values:

    "GLOW MODE" (Toggle) "!glow -1" (glow all players until they die) OR "!glow [name|slot#]" on every playerspawn
    "DOUBLEJUMP" (Toggle) "g_doublejump [0/1/2]" (0: Disabled, 1: Jaymod style, 2: NQ Style)
    "KNIFEWAR" (Toggle) "g_knifeonly [0/1]"
    "PANZERWAR" (Toggle) "g_war [0/1]"
    "SNIPERWAR" (Toggle) "g_war [0/2]"
    "RIFLEWAR"" (Toggle) "g_war [0/4]"
    "HEADSHOT MODE" (Bitflag) "g_headshot [0/1/2]" (0: Disabled, 1: Only headshots do damage, 2: Headshot = instagib)

  17. #17

    Re: Server Clearance - Script Release

    Phew, finally!

    I'm really sorry for the delay, but whenever I finished a feature, a new one crossed my mind that I wanted to include. But now I'm finished and I hope it's worth the work:

    Episode I - Advanced Voting LUA

    [SCREENSHOT]

    Since imho the vanilla ET vote-menu is largely useless, I decided to use LUA and a little UIscript to add some new functions. Read a detailed list of features and configuration possibilities in the .lua-file.

    I decided to ditch support for other mods and develop/release it only for NQ as this is the only mod I know and have ever worked with. I don't know about the settings of other mods, I don't know about possible missing lua entity fields, so the only thing I could do is a conversion that I would neither test nor debug. That's why I decided to let other people do it, people who know about a certain mod. The code is already there, the only problem that might arise is to understand what the hell this and that's supposed to do. If somebody out there wants to convert this script to ETpub or whatever and encounters problems concerning code understanding, please pm me and I'll tell you. I have to admit that I don't comment code, so if you need a commented version tell me too, and I'll make one.
    If you successfully converted and tested the script, please upload it here (make sure to rename the pk3 if you changed it).

    The script + pk3 was developed for NQ 1.2.9, I do not know about compatibility to other mods/older versions.

    The script has two known "bugs":
    • During BotWar, I had to find a system to stop players from joining the bot-team. Of course !lock was the first thing that came to my mind, but NQ shrubbot unlocks a team again as soon as it's empty, so I had to discard that.
      What I made instead should do the trick although it might raise a spam problem: If somebody joins the bot team, he's immediately put to spec and printed an info message. If somebody has a better idea, please tell me.
    • If Glow Mode is disabled, the players are not "unglowed". This is due to the fact that I could not find an appropriate hook to safely unglow each player. ps.eFlags is not accessible via lua, so we're stuck with this system: "Disable Glow Mode" does nothing but not !glow players on respawn, so until the players do not die, they're still glowing. If somebody knows a entity field that tells about a player's "alive"-state (alive/wounded-dead/limbo-dead), please tell me.

    @everybody who wants to dare and convert this script: I added a report about some kind of "bug" that I encountered. It's in the lua script, right below the config section. Reading it might save you a lot of anger..

    Please report any bug you might encounter and make sure to carefully read the instructions concerning configuration to avoid unwanted behaviour.

    As always, if I release sth: Everybody's free to download, share, modify and publish this script in altered form. But please, for the sake of players, rename the pk3 if you change it!!

    This work is dedicated to ailmanki, who showed so much patience. :)

    //Alternative download link, thanks shagileo

    //Edit: I've found a bug in the script that allows to make the spam-protection mechanism collapse although most likely nobody will ever notice any weird behaviour. I might release a fix for this some time.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by phisherman; 17th Jul 2016 at 12:04.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

  18. #18

    Re: Server Clearance - Script Release

    Amazing, thanks a very lot!
    Now have to upgrade() it for silEnTmod and etpub..

    For preventing team join, in etpro afaik you can capture the clientcommand "team", I think that is also how a player joins a team in other mods ("team r/b/s/..." There are quite alot keys for team defined - can't remember which but one is even random team)

    I saw in the script you use ref, to let admins access more functions. I already forgot about ref.. I dont use etpro anymore. Is there a special reason for using ref instead of shrubbot system?
    I don't know lua's nq good enough - if it allows to check for a players shrublevel.

    Interesting stuff
    Enemy-Territory ftw

  19. #19

    Re: Server Clearance - Script Release

    Quote Originally Posted by ailmanki View Post
    For preventing team join, in etpro afaik you can capture the clientcommand "team", I think that is also how a player joins a team in other mods ("team r/b/s/..." There are quite alot keys for team defined - can't remember which but one is even random team)
    I thought about this but dismissed it because of the load of possible keys. Would be worth a thought though to block all except r/b/s. Wouldn't be !put-proof though, and I've lost my trust in the server admins over the years..
    Quote Originally Posted by ailmanki View Post
    Is there a special reason for using ref instead of shrubbot system?
    ref is a vanilla ET feature and since the other votes use it as well I adopted it. It's not possible to add shrubbot !commands to the game (at least none that are documented or listed with !help). But I added console commands for all the settings so it's possible for admins to create shrubbot commands for each and allocate them to levels/admins.
    Quote Originally Posted by ailmanki View Post
    I don't know lua's nq good enough - if it allows to check for a players shrublevel.
    NQ provides the function et.G_shrubbot_level(), I don't know about other mods (which is one reason why I leave this to you ..

    //Let's keep moving..

    Episode II - Clantag Protection LUA

    On request, my next project is a lua script that is supposed to stop players from wearing clantags without permission. What I have in mind is a cycle that checks the playernames every X seconds and kicks/bans/warns/renames a player if he's wearing the tag without being listed in some kind of admin database.
    For feature requests or advice, now it's the time..
    Last edited by phisherman; 31st Jul 2011 at 19:51.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

  20. #20

    Re: Server Clearance - Script Release

    Episode II - Clantag Protection LUA

    This script provides the possibility to protect one or more clantags from being used by unpermitted persons. If a player is wearing the tag without proper permission, he is warned/informed (by default) 3 times before he is punished (by default renamed). This is fully configurable.

    Read a detailed list of features and configuration possibilities in the .lua-file.

    [SCREENSHOT]

    The script was developed for NQ 1.2.9, I do not know about compatibility to other mods/older versions.

    Please report any bug you might encounter and make sure to carefully read the instructions concerning configuration to avoid unwanted behaviour.


    -- UPDATE OCT 2013 -- VERSION 2 --
    I uploaded a new version of the script that fixes a bug where the script would occasionally warn/punish players without them wearing a reserved clantag (thanks to jemstar for reporting). This was due to lua considering certain characters "magic". Turning on plain search prevents this.
    Unless it is too much of an inconvenience, you should consider updating.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by phisherman; 17th Jul 2016 at 11:07.
    Quote Originally Posted by oveove
    critisism is not allowed as it is another way to offend someone

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •