Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to get text from chanel?

Featured Replies

 

In my server, the system will pop up the following text when botting, asking for the calculation formula and answer. In order to solve this problem, I want to make a plugin, now I need to know how to get text information and text events. Can someone help me, please

 

 

image.thumb.png.36483e554ce2a1552bca7778c13352f9.png

  • Author
4 hours ago, Droidz said:

hello, tab "Chat" this text is display? if yes in what channel?

It's the System Channel. When I turn off the System Channel Display, it's no longer displayed.

If you use lua, you can try code like 

if DEFAULT_CHAT_FRAME then 
	local c=DEFAULT_CHAT_FRAME:GetNumMessages()
	for i=1,c do
		local msg = DEFAULT_CHAT_FRAME:GetMessageInfo(i)
		if msg then
			YOUR CODE HERE
		end
	end
end

If message are display in WRobot tab "Chat" you can also use wrobot class Channel (sample: https://wrobot.eu/forums/topic/4802-mage-portal-bot/ )

 

  • Author
19 hours ago, Droidz said:

If you use lua, you can try code like 


if DEFAULT_CHAT_FRAME then 
	local c=DEFAULT_CHAT_FRAME:GetNumMessages()
	for i=1,c do
		local msg = DEFAULT_CHAT_FRAME:GetMessageInfo(i)
		if msg then
			YOUR CODE HERE
		end
	end
end

If message are display in WRobot tab "Chat" you can also use wrobot class Channel (sample: https://wrobot.eu/forums/topic/4802-mage-portal-bot/ )

 

My version of the game is 2.4.3. This statement does not work properly:DEFAULT_CHAT_FRAME:GetMessageInfo(i).I checked some plug-ins written by others.His solution is to make a wow plug-in. This event

"CHAT_MSG_SYSTEM" 

is used, and then the text is in arg1. How can wrobot extract arg1 to get the text?

  • Author
19 hours ago, Droidz said:

If you use lua, you can try code like 


if DEFAULT_CHAT_FRAME then 
	local c=DEFAULT_CHAT_FRAME:GetNumMessages()
	for i=1,c do
		local msg = DEFAULT_CHAT_FRAME:GetMessageInfo(i)
		if msg then
			YOUR CODE HERE
		end
	end
end

If message are display in WRobot tab "Chat" you can also use wrobot class Channel (sample: https://wrobot.eu/forums/topic/4802-mage-portal-bot/ )

 

--[[     Options start here     ]]
local M="CHAT_MSG_SYSTEM" 

function MS(msg)
   SendChatMessage(msg)
end
function yz() 
	if (event==M) then 
local zj=string.find(arg1, "答题时间")
    if(zj) then
          end
local s1=arg1
local zj=string.find(s1, "+")
    if(zj) then
local s=arg1
local z="+"
local y="?="
local param1, param2 = string.find(s, z) 
local m = string.len(s) 
s=string.sub(s,param2+1)
local ts = string.reverse(s)
    local param1, param2 = string.find(ts, y) 
    local m = string.len(s) - param2 + 1   
    local hou
    if (y == false) then
    	hou = string.sub(s, m+1, string.len(s)) 
    else
    	hou = string.sub(s, 1-1, m-1) 
    end
local s=arg1
local z=":"
local y="+"
local param1, param2 = string.find(s, z) 
local m = string.len(s) 
s=string.sub(s,param2+1)
local ts = string.reverse(s)
    local param1, param2 = string.find(ts, y) 
    local m = string.len(s) - param2 + 1   
    local qian
    if (strchar == false) then
    	qian = string.sub(s, m+11, string.len(s))
    else
    	qian = string.sub(s, 1+10, m-1) 
    end
print(qian,"+",hou,"=",qian+hou) 
MS(tostring(qian+hou))




    else



local s=arg1
local z="-"
local y="?="
local param1, param2 = string.find(s, z) 
local m = string.len(s) 
s=string.sub(s,param2+1)
local ts = string.reverse(s)
    local param1, param2 = string.find(ts, y) 
    local m = string.len(s) - param2 + 1   
    local hou
    if (strchar == false) then
    	hou = string.sub(s, m+1, string.len(s)) 
    else
    	hou = string.sub(s, 1-1, m-1) 
    end
local s=arg1
local z=":"
local y="-"
local param1, param2 = string.find(s, z) 
local m = string.len(s) 
s=string.sub(s,param2+1)
local ts = string.reverse(s)
    local param1, param2 = string.find(ts, y) 
    local m = string.len(s) - param2 + 1   
    local qian
    if (strchar == false) then
    	qian = string.sub(s, m+10, string.len(s)) 
    else
    	qian = string.sub(s, 1+10, m-1) 
    end
print(qian,"-",hou,"=",qian-hou) 
MS(tostring(qian-hou))

    end
	end 
end 
local F=CreateFrame("Frame") 
F:SetScript("OnEvent",yz) 
F:RegisterEvent(M)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.