April 1, 20197 yr 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
April 3, 20197 yr Author It's the System Channel. When I turn off the System Channel Display, it's no longer displayed.
April 3, 20197 yr 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.
April 4, 20197 yr 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/ )
April 5, 20197 yr 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?
April 5, 20197 yr 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