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”:[ul][li]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.
[/li]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.[li]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.[/ul]
[/li]@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. [noparse]:)[/noparse]
//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.