Lua Enhanced Server Module


(Zelly) #1

Hello everyone!

I have been working on a project with pure lua that enhances current ET servers.
I have been working on it alone for a few years and just recently invited purple to come help me out.

A short description of some of the many features that it has:
It is very configurable, if something isn’t already configurable it would be very easy to make it configurable.
It includes over 60 custom commands.
Has a mail system.
It has an option to register a profile to see all your stats over time. (Also used for a bunch of other stuff)

There is a lot in the project and it is constantly changing, so for more up to date information you can view the wiki on bitbucket:
https://bitbucket.org/zelly/lua-enhanced-server-mod/wiki/Home
The wiki has a feature list, command list, information about the keys, how to report bugs, how to join development and more.

I am always open to ideas to improve my project so please take a look.
Here is the home page if you want to take a look around the project: https://bitbucket.org/zelly/lua-enhanced-server-mod/overview


(twt_thunder) #2

dropped a link on our lua forum to your page, great work!
keep it up


(Zelly) #3

Thanks I check out your forums every once and a while, will try to keep up to date if anyone asks anything there.


(Micha) #4

Hi, nice work.
“PauseStart”
I read about your problem there. Why you don’t just keep setting the origin and “free” it after your own time?

Something like (not tested/just an idea)


function et_InitGame(levelTime,randomSeed,restart)
mclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )
gamestate = tonumber(et.trap_Cvar_Get( "gamestate" ))
pos = {}
waittimer = 0
	if gamestate == 0 then	
		waittimer = 1
	end
end

function et_ClientSpawn(cno,revived)
	pos[cno] = et.gentity_get(cno, "origin")
end

samplerate = 200
function et_RunFrame( levelTime )
if math.mod(levelTime, samplerate) ~= 0 then return end
        if waittimer > 0 then
		waittimer = waittimer + 1
	end
	if waittimer == 25 or waittimer == 50 or waittimer == 75 or waittimer == 100  then
		local seconds = (((125 - waittimer )*200) / 1000 )
		et.trap_SendServerCommand(-1, "chat \"^3WAIT TIMER^7: ^1"..seconds.." ^7seconds until ^3your team^7 may move. 
\"" )
		for cno=0, mclients-1, 1 do
			SetWaitPos(cno)
		end
        end
	if waittimer == 125 then
		waittimer = 0
	end
end

function SetWaitPos(target)
	if et.gentity_get(target, "sess.sessionTeam") == 1 or et.gentity_get(target, "sess.sessionTeam") == 2 then
		et.gentity_set(target, "origin", pos[target])
	end
end


(Zelly) #5

It would probably be possible but the clock would still be running during that time, so I would have to add the few seconds onto the current timelimit.

Unless there is a way to pause time through another method other than the ref pause.


(Micha) #6

How about to get the timelimit and then add the waittime to it.
waittimetotal = xx value
timelimit = et.trap_Cvar_Get(“g_usertimelimit”)
et.trap_Cvar_Set(“g_usertimelimit”, (timelimit + waittimetotal)


(Zelly) #7

It is worth a shot, if it isn’t too buggy. Will add it to next version. Still need to clean up some things for current version.


(Destroy666) #8

SpawnWalkThorugh looks interesting, but what happens if the spawn shield ends when you’re at the same spot as another player?


(Zelly) #9

You will be inside the player, until one of you moves, and then you get kind of pushed out.


(zbzero) #10

It will be compatible with etpro?


(Zelly) #11

Short answer: not yet

I tried to, but etpro uses old lua, and so much isn’t compatible. It is possible in the future I will be able to figure out a workaround to all incompatibilities.
Right now etpro uses lua 5.0 silent etpub and noquarter use 5.1 and legacy is using 5.2 and soon to be using 5.3. So with such a big project it is very difficult to accommodate every mod, but if anyone knows how to make it work I can attempt it.

You can follow the progress on that issue here: https://bitbucket.org/zelly/lua-enhanced-server-mod/issue/15/etpro


(Micha) #12

etpub got updated to lua 5.2.1. Not sure when it will be official released but people can compile the new mod themself.
Anyways, I had the same problem because some stuff is missing or got renamed/changed.


(zbzero) #13

sorry my newbish but someone can point me to somewhere where i can read in a easy way how to compile it, im really curious!!


(Zelly) #14

I think this is what you need: https://www.assembla.com/spaces/etpub/wiki


(Dragonji) #15

[QUOTE=Micha;517833]etpub got updated to lua 5.2.1. Not sure when it will be official released but people can compile the new mod themself.
Anyways, I had the same problem because some stuff is missing or got renamed/changed.[/QUOTE]
ETPub is dead, last commit was made more than a year ago.


(Micha) #16

No it’s not, pheno is still working here and then on it. He already included nice new things. He just didn’t commited it to assembla.


(twt_thunder) #17

I can confirm this.


(Zelly) #18

Updated to 2.7.4 fixed a lot of problems that did not happen on my test server.
I brought the wiki a lot more up to date, the install page is a little more complete, I think all I need to do is explain the features a little more in detail, it is hard to keep them up to date since I change them so often.
I also added a lot more config options
If anything isn’t explained very well send me a message I will get it updated when I can.
Changes:
2.7.4

Updated config format to group related values
Updated config creation to show which values you are missing
Updated config command to not require “get” “list” and “set”
Updated config sub command “save” now will save a new config with current values and any missing values
Updated maplist command to use mapcycle cvars
Updated calculator command to not require spaces
Updated syntax highlighting to help command
Updated privatemessaging to filter through the privatemessage command
Updated the level config option to make more sense
Updated mail commands to work much better
Updated info command to contain more accurate info
Updated logs to encrypt password before it gets to logs
Updated mapents to show messages when near
Updated mail help to only show mail commands
Added an incremental team block function with config options
Added info sub command license displays license
Added mail inbox delete command
Added mail inbox empty command
Added ability to use a lightweight encrypt instead of sha1
Added a location print for more configuration
Added a bunch of new config options for each feature
Added mute overwrite command
Added strictmute in mute command
Added a wrapprint function for clients and consoles
Added authFollow to follow command
Added FreezeStart and FreezeStartTime
Added ability to freeze clients and command with it
Added a MessageFilter to filter all messages chat,command, etc.
Added et_Damage support with showdamagedealt,showname, and showweapon user keys
Added a IntermissionStart callback in Game for mods that don’t have et_Intermission
Added the ability to block the team command
Added farewells and farewellsounds for when clients disconnect from the server
Added abilty to mention players from chat
Added an isAlive function
Added xpdecay,expire options
Added sort of a ClientGibbed callback
Added Sound.TeamKillConfirm Sound.Return
Added better connectprint
Added better deathprint
Added option to use metricdistance
Added printing of nextmap on intermission
Added options for more control over balanceteam
Added a message so clients know not to use a password they are using elsewhere
Added inbox sub command to mail commands
Added ability to get help info for command using help as first argument /register help Fixed shoutcaster now disables when joining a team from spectator
Fixed chat commands returning wrong
Fixed leveltime get from wrong place
Fixed dependecy on shrubbot commands for setTeam
Fixed many sound events
Fixed many obituary / stat bugs
Fixed fieldnames for clients
Fixed getting current mapname when nextmap is nil
Fixed muting in legacy
Fixed setlevel message for non shrubbot
Fixed freeze console command
Fixed playsound partial sound command
Fixed calculator command using float values
Fixed core command return value
Fixed overwrite command return values
Removed insanity command for non shrubbot

2.7.3

Updated all commands to use a new improved format
Updated the login,logout, and register command to work in sync with command system
Updated printing of tables to better fit on screen
Updated printing of tables for long tables to print over time
Updated sound methods to be outside of playsound command
Updated no mail message to print instead of chat
Updated routines to run on levelTime again
Updated help command to look a lot better
Updated ammocheck to work off of percentages
Updated config options for debugging to debug specific sections
Updated Spec999 to a number value
Added config option to toggle adminwatch for console
Added license
Added default weapon tables for each mod
Added view for console
Added some basic et constants
Added name to user greeting
Added new RegularUserData system
Added minimal comment support to the reading of JSON files
Added help to mail commands
Added prefixes for Admin and Chat
Added options for allowing user greetings
Added option to toggle logging of colors
Added option to toggle logging full message Added 8ball command
Rewrote edit command and user keys to more easily update
Fixed config not using default value when not exist
Fixed first connection code
Fixed several Logger errors
Removed server authorization


(twt_thunder) #19

You must spread some Reputation around before giving it to Zelly again.