Topic: [Tutorial] How to set up a Lua-Server
How to set up a Lua-Server?
Requirements: ability to set up a normal server, the newest n-Server (Download) or use the one which comes with the Zomb-Mod ), the n-client in order to play on the server (Download ), and a Lua Mod (we will use the Zomb-Mod by Map94 in this tutorial (Download ) )
Step 1: Extract all the files
Step 2: Now make a new directory (call it "Lua-Teeworlds" or whatever u want)
Step 3: Put all the files from the server and the client into your new directory
It should look like this:
Step 4: add the mod by copying the files of the mod into your Lua-Teeworlds directory.
(Note: If the mod is not splitted in folders and there are no further instructions, just copy all mod-files into the lua folder)
Step 5: Open the autoexec.cfg in your application data folder for teeworlds
Step 6: Add the command "add_lua_file NameOfFile.lua" to bind a lua script to your server,
in this example write "add_lua_file server.lua" (which is the main lua script of the Zomb-Mod)
You can split your mod in subdirectories such as /lua/Zomb/, in order to add the file now just write the relative path from your lua folder. You can rename the .lua file in most cases too. (e.g.: "add_lua_file Zomb/main.lua").
You can add a lua file while the server is running via the rcon too.
(In order too play Zomb you have to deactivate teambalancing, and the command "add_vote "Start" lua StartRound" in your autoexec.cfg is recommened, but you can also start a round with the rcon command "lua StartRound")
Step 7: Start the Serverand be happy
Lua-documentation for server functions and events:
https://github.com/MAP94/teeworlds/blob … tation.lua