Subscriber BECK Posted March 3, 2014 Subscriber Share Posted March 3, 2014 I looked in the docs, maybe something like this already exists but I couldn't find it. There are times when sending a PM to a group of people is very useful. On our server, if I want to communicate with my members, I just do "/m iow blah blah blah". That usually works -- UNLESS your members are in alias. It would be nice to be able to do something like: "/ml 4 message to all level 4 and above". So its the ml command. It takes a shrubbot level as the first argument and sends the private message to all players who match that level AND above. That way, I can communicate with my members without worrying to exclude people based on their name at the time. I suppose it is somewhat similar to the /ma command, but we have that exclusively for our admins. But this would be a way for even lower level members to be able to communicate only with their fellow clanmates. Like I said, if something like this already exists, I apologize for posting here, but I couldn't find it. Thanks! Hope you find this a good suggestion and something easy to implement. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 3, 2014 Management Share Posted March 3, 2014 I think this would be easiest to implement with a Lua script. You could make a custom command to shrubbot.cfg such as "ml". This command would then get directed to Lua script, which would send private message to all connected players with level higher then what you have specified. Excluding the player who issued the command. Or you could exclude the level from the command and have something like "mm", which would send it to all connected players having some specified member level and above. Specified in the script. Related linkshttp://mygamingtalk.com/wiki/index.php/Silent_Lua#G_shrubbot_level About implementing this in the shrubbot, it is rather server specific and I would rather see something more generic. Quote Link to comment Share on other sites More sharing options...
Purple Posted May 1, 2014 Share Posted May 1, 2014 This is possible. It has already been done if i'm correct, Micha has a script around for it, I may also still have it. let me know if you still need it i can for sure get it for you BECK 1 Quote Link to comment Share on other sites More sharing options...
Subscriber BECK Posted May 1, 2014 Author Subscriber Share Posted May 1, 2014 This is possible. It has already been done if i'm correct, Micha has a script around for it, I may also still have it. let me know if you still need it i can for sure get it for you Yes, way too busy atm to try and write one myself. Much appreciated! Quote Link to comment Share on other sites More sharing options...
Purple Posted May 2, 2014 Share Posted May 2, 2014 Yes, way too busy atm to try and write one myself. Much appreciated!ill post it for you in about 30 minutes gonna eat dinner real quick and get back to it. Quote Link to comment Share on other sites More sharing options...
Purple Posted May 2, 2014 Share Posted May 2, 2014 Yes, way too busy atm to try and write one myself. Much appreciated! --[[ Purple Admin Chat Version 0.1 --]] modname = "AdminChat" version = "0.1" admin_chat = "ml" min_level = 3 function et_InitGame(levelTime, randomSeed, restart) et.RegisterModname(modname .. " " .. version) maxclients = tonumber(et.trap_Cvar_Get("sv_maxclients"))-1 end function et_ClientCommand(clientNum, command) if command == admin_chat and getlevel(clientNum) then if et.trap_Argc() > 1 then local message = "" for i = 1, et.trap_Argc() - 1, 1 do message = message .. et.trap_Argv(i) .. " " end for i = 0, maxclients, 1 do sendstring = playerName(clientNum) .. " ^w(^8AdminChat^w)^8: " .. message et.trap_SendServerCommand(i, "chat \"" .. sendstring .. "\"") return 1 end end elseif command == admin_chat and not getlevel(clientNum) then et.trap_SendServerCommand(clientNum, "cpm \"^1 You Are Not Allowed To Use Admin Chat.\n\" " ) return 1 end end function getlevel(client) local lvl = et.G_shrubbot_level(client) if lvl >= min_level then return true end return nil end function playerName(id) local name = et.Info_ValueForKey(et.trap_GetUserinfo(id), "name") if name == "" then return "*unknown*" end return name end Quote Link to comment Share on other sites More sharing options...
Subscriber BECK Posted May 6, 2014 Author Subscriber Share Posted May 6, 2014 Thanks, I'll give it a try. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.