-
Member
okay, its the uierror.lua in the Interface\AddOns\TellMeWhen\Components\IconTypes\IconType_uierror
but i have no clue how they access they message name. they dont scan of ids, nor for string from the globalstrings.lua or the exact spell name.
maybe someone with advanced knowledge could give us a hint.
Last edited by Kwapuzzi; 12-06-2019 at 07:00 PM.
-
Member
Originally Posted by
Kwapuzzi
TellMeWhen is workin! I have no fucking idea how they catch the error message, because i was not able to get any information from the api. But i will have a look on their code.
Edit2: Im dumb as fuck. Edited my downloaded addon instead of the ingame one. yeah i can wonder why absolutely nothing is working.
I think they are scanning the combat log unfiltered. If you get the event "SPELL_FAILED", you can see the reason. Never tried it but had a look at the API: COMBAT_LOG_EVENT - Wowpedia - Your wiki guide to the World of Warcraft
Edit:
You can do better, but you get the idea.
Code:
Frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
Frame:SetScript("OnEvent", function(self, event, argl, ...) Frame:calculateNewFrames(event); end);
function Frame:calculateNewFrames(event)
...
elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
local combatLogEvent = select(2, CombatLogGetCurrentEventInfo())
if(combatLogEvent == "SPELL_CAST_FAILED") then
-- The error message should be the last element
print(CombatLogGetCurrentEventInfo())
end
end
...
end
Last edited by MrNotSoBright; 12-07-2019 at 05:04 AM.
Reason: Missed a )
-
Member
Code:
local TMW = TMW
if not TMW then return end
local L = TMW.L
--local print = TMW.print
local _G = _G
local strlowerCache = TMW.strlowerCache
local Type = TMW.Classes.IconType:New("uierror")
Type.name = L["ICONMENU_UIERROR"]
Type.desc = L["ICONMENU_UIERROR_DESC"]
Type.menuIcon = "Interface\\Icons\\spell_shadow_darksummoning"
Type.AllowNoName = true
Type.hasNoGCD = true
local function UIError_OnEvent(icon, _, messageType, message)
-- TODO: consider updating this icon type to store the messageType as config instead
-- of the literal messages? Not sure if this is safe though - no indication that
-- the messageType numbers are going to be stable from patch to patch.
-- Its likely, but not a risk I want to take until we can be sure that they aren't going to shift around.
-- Plus, the configuration would have to be a massive dropdown if we were to use the IDs,
-- which is a usability nightmare. Letting the user type them in manually (and use the SUG, of course)
-- does seem better from a usability standpoint.
print(message)
end
function Type:Setup(icon)
icon.Spells = TMW:GetSpells(icon.Name, false)
icon:SetInfo("texture", Type:GetConfigIconTexture(icon))
-- Setup events and update functions.
icon:SetUpdateMethod("manual")
icon:RegisterEvent("UI_ERROR_MESSAGE")
icon:SetScript("OnEvent", UIError_OnEvent)
icon:SetUpdateFunction(UIError_OnUpdate)
icon:Update()
end
Type:Register(205)
thats their code, but i will thest yours also. thanks
-
Member
Originally Posted by
Kwapuzzi
okay, its the uierror.lua in the Interface\AddOns\TellMeWhen\Components\IconTypes\IconType_uierror
but i have no clue how they access they message name. they dont scan of ids, nor for string from the globalstrings.lua or the exact spell name.
maybe someone with advanced knowledge could give us a hint.
It's easily done in WeakAuras, should be fairly simple to port it into a standalone addon as well.
Just listen to the event "UI_ERROR_MESSAGE".
Code:
-- One way to do it.
function(object, event, message)
if (message == ERR_BADATTACKPOS) then
return true
end
end
-- Another way,
function(object, event, message)
if (message == ("Target needs to be in front of you")) then
return true
end
end
Trigger 1 - https://i.gyazo.com/e4de20f25e8bf099...1ed1c7c15d.png
Trigger 2 - https://i.gyazo.com/32f893fe3808ba49...fea0cfa81f.png
-
Post Thanks / Like - 1 Thanks
Humbleguy (1 members gave Thanks to stonebent for this useful post)
-
Active Member
Originally Posted by
Kwapuzzi
okay, its the uierror.lua in the Interface\AddOns\TellMeWhen\Components\IconTypes\IconType_uierror
but i have no clue how they access they message name. they dont scan of ids, nor for string from the globalstrings.lua or the exact spell name.
maybe someone with advanced knowledge could give us a hint.
I think that they scan for the UI error event, and then scan for the specified string, as the string can be personalized to anything at the addon interface, even foreign languages. I dont understant enough about lua, tho; but the logic says that they check the string... (orelse we would not be able to personalize)
-
Active Member
Originally Posted by
stonebent
It's easily done in WeakAuras, should be fairly simple to port it into a standalone addon as well.
Just listen to the event "UI_ERROR_MESSAGE".
Yeah!! it worked like a charm!!
Weak Aura Import String below:
Code:
!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4Q5)aEptZPkDxogBm8)Sx0NJOKxrwH(wU0)o
Last edited by Humbleguy; 12-07-2019 at 02:05 PM.
-
Active Member
any suggestions for checking if we're following a target.? not sure how to wing it in WA.
FollowUnit("unit") is what we're looking at, but not sure how to do it
-
Active Member
Originally Posted by
Uncontrolable
any suggestions for checking if we're following a target.? not sure how to wing it in WA.
FollowUnit("unit") is what we're looking at, but not sure how to do it
Easiest way would be jus just checking the pixel color where the words "following ...." are written.
In this example, you check for pixel 901x554 (windowed 1920x1057, contrast/brightness 50 and Gamma 1.0), for the yellowish colour (R=255 G=209 B=0 ), in the example.
something like:
Code:
bool checkfollow()
{
Color mycolour = getcolorat(901,554);
if (mycolour.R==255 && mycolour.G==209) return true;
return false;
}
p.s. you must do some tests yourself to check the exact coordinates and colours of your system.
Last edited by Humbleguy; 12-07-2019 at 04:12 PM.
-
Member
Originally Posted by
Uncontrolable
any suggestions for checking if we're following a target.? not sure how to wing it in WA.
FollowUnit("unit") is what we're looking at, but not sure how to do it
Maybe these 2 events will come in handy?
AUTOFOLLOW_BEGIN
AUTOFOLLOW_END
Alternatively you can check if your player/target is moving.
API GetUnitSpeed | WoWWiki | Fandom
And you check the distance to your target.
Code:
if ( CheckInteractDistance("target", 4) ) then
FollowUnit("target");
else
-- we're too far away to follow the target
end
-
Active Member
You are overthinking facing a target, just press the interact with target button (and ensure CTM is enabled in wow's settings) - you will walk to the target and in the process face it if you are not yet facing it.
Source: WoW:Interact with Target - ISBoxer
Interact with Target (IWT) is a configurable World of Warcraft hotkey. This hotkey can be set in the in-game Key Bindings window, in the Targeting section. There is no default hotkey configured for Interact with Target, it must be manually set!
The Interact with Target key binding does the same action that would otherwise be performed with a right click, including:
Attack
Loot
Open NPC window (merchant, quest giver, etc)
When combined with Click to Move, Interact with Target will also cause your character to face and move toward your target; This is an important feature for multiboxing, since it means less manual movement when doing the above activities. Your character will automatically stop moving if the action is performed (i.e. it reaches the target and "interacts"), but will not otherwise change direction or stop moving unless manually interrupted. Unfortunately, this limitation of the feature causes some undesirable side effects, especially in the cases where your target is moving, or your character otherwise slightly misses the target, because your character will continue running in that direction unless manually interrupted! Using the Interact with Target hotkey again will restart the process, where once again your character may stop moving or miss the target again, and this will continue as many times as you use the hotkey -- potentially making your character run circles around its target.
Last edited by KKira; 12-16-2019 at 03:50 AM.
-
Post Thanks / Like - 2 Thanks
Humbleguy,
0xd5d (2 members gave Thanks to KKira for this useful post)
-
Active Member
Originally Posted by
KKira
The Interact with Target key binding does the same action that would otherwise be performed with a right click, including:
Attack
Loot
Open NPC window (merchant, quest giver, etc)
.
Damn! I never knew that man, can you believe that? I was able to "handle" facing checking the UI error message "you are not facing your target" and rotating... but that was a real breakthru for me.
I finally got my bot fully functional usinc the C# language. I was able to address all the most difficult issues so far (facing was an issue still).
About the issue you said (moving targets), I guess it can be handled using a loop, that will click the target (e.g. while not in melee range), for example:
while (not in melee range)
begin
interact with target
end
for ranged classes, you just press any key after rotation.
I am very thankful for your information (its a simple thing but I was not able to find it by myself) .
As my bot is now functional (in C#), if you or anyone else has trouble addressing any issue, I am available here to explain how to deal with difficuult stuff, or simple just ask. I got methods (functions) that will solve basically any botting playing issue and I am willing to share my knowledge and algorithims. I had a real hard time solving some problems (e.g. rezzing, checking debuffs on targets or cooldowns).
My grind bot is working fine, now Im working on improve stuff (fine tune) everything, and I have some projects in mind like:
- PVP battleground bot
- Mining / herbalism bot
- Strong Iron fishing pole faring bot ($$$)
- Node fishing bot (tanaris coast)
For those that are aveerage programmers and are thinking of writing a bot, I can tell my experience:
I am an average level C# programmer. It took me 3 weeks (3 hours a day after work, weekdays, and 12h a day at weekends) to develop a fully functional pixel grind bot from zero. That meant about 120 hours of coding to get the thing ready.
So, dont be afraid to develop your own bots. It is not difficult, and now with the pixel thing, it is much easier than the old "memory address" thing.
It will take 120 hours of coding, a lot of research at Stackoverflow, but it can be done easier than you can imagine.
Last edited by Humbleguy; 12-17-2019 at 03:12 PM.
-
Member
Would this work some how while multiboxing with code alteration, especially with something like isboxer? I would like to implement a healbot for one of the characters while still utilizing the multiboxing software. I see your code requires the game to be in forcus but there must be a way for background activity because with isboxer the unfocused windows are shrunk but with the same resolution. It would be interesting to have a priest auto heal for the team.
-
Active Member
Originally Posted by
Malig
Would this work some how while multiboxing with code alteration, especially with something like isboxer? I would like to implement a healbot for one of the characters while still utilizing the multiboxing software. I see your code requires the game to be in forcus but there must be a way for background activity because with isboxer the unfocused windows are shrunk but with the same resolution. It would be interesting to have a priest auto heal for the team.
Problem would be sending keystrokes simulation or mouse clicks to a unfocused window.... I dont know how to do that without injection.
-
Member
Originally Posted by
Humbleguy
Problem would be sending keystrokes simulation or mouse clicks to a unfocused window.... I dont know how to do that without injection.
It's surely possible, just utilize the library from AutoIt
-
Member
Are you Portuguese from Portugal? Also sent you a PM