Forum

Results 1 to 2 of 2
  1. #1
    Join Date
    November 2018
    Posts
    1

    Want to change code from poke to message

    This code is to poke client 10x times 100x times and 1000x times
    i just want to change it from poke to message how?
    Code:
    -- TeamSpeak 3 Poke Bot LUA Script --
    -- Coded By shock --
    
    -- Set Menu's
    local MenuIDs = {
    	MENU_ID_CLIENT_1  = 1,
    	MENU_ID_CLIENT_2  = 2,
    	MENU_ID_CLIENT_3  = 3,
    	MENU_ID_CLIENT_4  = 4
    }
    
    
    -- Support Multiple LUA Menus
    local moduleMenuItemID = 0
    
    -- Poke Function
    local function onMenuItemEvent(serverConnectionHandlerID, menuType, menuItemID, selectedItemID)
    
    
    
    function platform()
        ts3.printMessageToCurrentTab(getPlatform());
    end
    
    	if menuItemID == 1
    	then
    		for x = 1, tonumber(10) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    		
    	elseif menuItemID == 2
    	then
    		for x = 1, tonumber(100) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    		
    	elseif menuItemID == 3
    	then
    		for x = 1, tonumber(1000) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    	end
    	
    	print("Poking: " .. serverConnectionHandlerID .. " " .. menuType .. " " .. menuItemID .. " " .. selectedItemID)
    	ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    end
    
    poke_events = {
    	MenuIDs = MenuIDs,
    	moduleMenuItemID = moduleMenuItemID,
    	onConnectStatusChangeEvent = onConnectStatusChangeEvent,
    	onNewChannelEvent = onNewChannelEvent,
    	onTalkStatusChangeEvent = onTalkStatusChangeEvent,
    	onTextMessageEvent = onTextMessageEvent,
    	onPluginCommandEvent = onPluginCommandEvent,
    	onMenuItemEvent = onMenuItemEvent
    }
    Last edited by dante696; November 6th, 2018 at 04:42 PM. Reason: Thread title changed... // no need to swear .... bad words replaced in code

  2. #2
    Join Date
    September 2018
    Location
    Germany
    Posts
    15
    Quote Originally Posted by 5LODY View Post
    This code is to poke client 10x times 100x times and 1000x times
    i just want to change it from poke to message how?
    Code:
    -- TeamSpeak 3 Poke Bot LUA Script --
    -- Coded By shock --
    
    -- Set Menu's
    local MenuIDs = {
    	MENU_ID_CLIENT_1  = 1,
    	MENU_ID_CLIENT_2  = 2,
    	MENU_ID_CLIENT_3  = 3,
    	MENU_ID_CLIENT_4  = 4
    }
    
    
    -- Support Multiple LUA Menus
    local moduleMenuItemID = 0
    
    -- Poke Function
    local function onMenuItemEvent(serverConnectionHandlerID, menuType, menuItemID, selectedItemID)
    
    
    
    function platform()
        ts3.printMessageToCurrentTab(getPlatform());
    end
    
    	if menuItemID == 1
    	then
    		for x = 1, tonumber(10) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    		
    	elseif menuItemID == 2
    	then
    		for x = 1, tonumber(100) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    		
    	elseif menuItemID == 3
    	then
    		for x = 1, tonumber(1000) do
    			ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    		end
    		return
    	end
    	
    	print("Poking: " .. serverConnectionHandlerID .. " " .. menuType .. " " .. menuItemID .. " " .. selectedItemID)
    	ts3.requestClientPoke(serverConnectionHandlerID, selectedItemID, "Love You ")
    end
    
    poke_events = {
    	MenuIDs = MenuIDs,
    	moduleMenuItemID = moduleMenuItemID,
    	onConnectStatusChangeEvent = onConnectStatusChangeEvent,
    	onNewChannelEvent = onNewChannelEvent,
    	onTalkStatusChangeEvent = onTalkStatusChangeEvent,
    	onTextMessageEvent = onTextMessageEvent,
    	onPluginCommandEvent = onPluginCommandEvent,
    	onMenuItemEvent = onMenuItemEvent
    }
    Change
    ts3.requestClientPoke
    to
    ts3Functions.requestSendPrivateTextMsg

    alternatively:
    ts3Functions.requestSendChannelTextMsg
    or
    ts3Functions.requestSendServerTextMsg
    for a channel- / server-message



    (Also you may have to change the variables accordingly.)
    Last edited by Keyinator; November 8th, 2018 at 10:01 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Remove permissions (Poke and Message)
    By Nk*_* in forum Permission System
    Replies: 1
    Last Post: January 18th, 2016, 09:10 AM
  2. how to disable poke dialog. and get only a message instead?
    By zenny666 in forum General Questions
    Replies: 3
    Last Post: September 12th, 2013, 03:45 PM
  3. Improve chat - Increase max message length and allow [img] BB code
    By snostorm in forum Suggestions and Feedback
    Replies: 2
    Last Post: May 4th, 2013, 03:48 AM
  4. How to view the Poke message of clients
    By giancastro in forum Server Support
    Replies: 6
    Last Post: March 8th, 2013, 07:32 AM
  5. [Resolved] Use of new line character in Host Message breaks [url] code
    By arcfault in forum Bug Reports [EN/DE]
    Replies: 4
    Last Post: November 20th, 2012, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •