B1uscr34m

Teamspeak TS 3 TS3 Plugin LUA Script - mtG Checker Script

Nov 18th, 2014
236
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function mtGChecker(serverConnectionHandlerID)
  2.     local mtGCheckerPrefix = "[mtGChecker]"
  3.     local oldNick = ts3.getClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME)
  4.     -- ts3.printMessageToCurrentTab("SID: "..serverConnectionHandlerID)
  5.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Lore")
  6.     -- wsleep(0.1)
  7.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  8.     if error == ts3errors.ERROR_client_nickname_inuse then
  9.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Lore ist gerade online![/color][/b]")
  10.     elseif error ~= ts3errors.ERROR_ok then
  11.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Lore ist gerade offline![/color][/b]")
  12.     else
  13.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Lore unbekannt![/color][/b]")
  14.     end
  15.     wsleep(0.1)
  16.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Kev")
  17.     -- wsleep(0.1)
  18.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  19.     if error == ts3errors.ERROR_client_nickname_inuse then
  20.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Kev ist gerade online![/color][/b]")
  21.     elseif error ~= ts3errors.ERROR_ok then
  22.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Kev ist gerade offline![/color][/b]")
  23.     else
  24.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Kev unbekannt![/color][/b]")
  25.     end
  26.     wsleep(0.1)
  27.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, "Sling")
  28.     -- wsleep(0.1)
  29.     local error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  30.     if error == ts3errors.ERROR_client_nickname_inuse then
  31.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=red]Sling ist gerade online![/color][/b]")
  32.     elseif error ~= ts3errors.ERROR_ok then
  33.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=green]Kev ist gerade offline![/color][/b]")
  34.     else
  35.         ts3.printMessageToCurrentTab(mtGCheckerPrefix.." [b][color=grey]Onlinestatus von Kev unbekannt![/color][/b]")
  36.     end
  37.     wsleep(0.1)
  38.     ts3.setClientSelfVariableAsString(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_NICKNAME, oldNick)
  39.     -- wsleep(0.1)
  40.     ts3.flushClientSelfUpdates(serverConnectionHandlerID)
  41. end
RAW Paste Data