Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/19/14 in all areas

  1. This is a great idea. I can provide a simple example of a shrubbot command working with LUA - we have a bunch of working scripts that use this method. You can use this if you want. For the purposes of this example, the command is mycommand. It will be executed when the uses enters !mycommand in the console, assuming that player has been assigned level 2 or higher shrubbot level. 1. Create your command in the shrubbot file. Open your shrubbot.cfg file (in silent\database directory) and add the following block: [command] command = mycommand exec = mycommand [i] desc = Does something cool for people over level 2 syntax = levels = 2 3 4 5 2. Create a LUA file in your silent directory on the server. Call it mycommand.lua (or whatever name you want to give it). Begin with the following stub: function et_ConsoleCommand(command) -- if the user types !mycommand in the console if et.trap_Argv(0) == "mycommand" then -- Do your custom processing here return 1 -- Tells silEnT that this method handled this command end return 0 -- Tells silEnT that this file did not handle this command end 3. Update your server config to load the LUA file. Add or modify the following server var (lua_modules): set lua_modules "mycommand.lua" 4. Restart your server. Assuming you are shrubbot level 2 or higher, !mycommand will execute and do cool stuff.
    2 points
  2. gaoesa

    LUA et_Obituary

    Behaviour depends on the g_logOptions flag 1. http://mygamingtalk.com/wiki/index.php/Silent_Mod_Server_Cvar#g_logOptions
    2 points
  3. gaoesa

    LUA et_Obituary

    Just read the links I posted, it is very clear then. I agree that creating a Lua script is a bit more work. The reasons why we remove certain abilities that were in ETPub, has been to make the experience more consistent to players. Also, some features were pretty much experimental. Couple mistakes were made, but this is not one of those. If you are new to scripting, please read a Lua tutorial first. It will be easy then and Lua is very easy scripting language.
    1 point
  4. No I meant that the client is sending the say text inside quotes. I.e. /say "text with spaces". That makes the server interpret the full string as one parameter. So you should split the parameter using space as a delimiter and so you get what you need.
    1 point
  5. I was using these settings: set g_minAirstrikeTime 30 set g_minArtyTime 50 The values are in seconds and doesn't matter if Field ops charge bar is full, from what I understand if two field ops are on same team they can only call airstrike every 30 seconds or arty every 50 seconds regardless of charge bar. Now I can mess with their charging also, cool.
    1 point
  6. Question 1: The cvar is wrong, try "g_LTChargeTime" instead. I see that these cvars are missing from the Wiki. Question 2: If the player has PB GUID, it will be included into the ban information. If not, it will be ignored. No risks for other players. EDIT: Added the missing cvar to the Wiki: http://mygamingtalk.com/wiki/index.php/Silent_Mod_Server_Cvar#g_LTChargeTime
    1 point
×
×
  • Create New...