-
Member
This post was very helpful. I got everything working at a basic level. I haven't been able to dig deeper into the algorithms to see what's happening, but it's very workable right now. The code is pretty clean and nicely written as well.
Thanks for this post. Would love to see updates in the future.
-
Member
I'm struggling with my addon that converts the position of the player into the pixels. It works fine most of the time but occasionally it messes up x or y coordinate and this really messes up my pathing. It appears that x and y coordinates get somehow mixed and are shown in the wrong pixel although I'm not sure if this is the case. My code for the addon is below. Its a mess as I'm new to this. This has proven really difficult for me to debug and any help is appreciated!
Code:
message('Hello World2!')
local CoordsEtc_UpdateInterval = 0.07
local timeSinceLastUpdate = 0
local CoordsEtc_position
local CoordsEtc_mapID
local CoordsEtc_eventFrame = CreateFrame("Frame")
CoordsEtc_eventFrame:RegisterEvent("ADDON_LOADED")
CoordsEtc_eventFrame:SetScript("OnEvent", function(self,event,...)
self[event](self,event,...)
end)
local suunta_frame = CreateFrame("Frame", "suuntaframe", UIParent)
suunta_frame:SetPoint("TOP"); suunta_frame:SetWidth(20); suunta_frame:SetHeight(20);
local suunta_tex = suunta_frame:CreateTexture("ARTWORK");
suunta_tex:SetAllPoints(true);
suunta_tex:SetAlpha(1);
local posx_frame = CreateFrame("Frame", "posxframe", UIParent)
posx_frame:SetPoint("TOP", 20, 0); posx_frame:SetWidth(20); posx_frame:SetHeight(20);
local posx_tex = posx_frame:CreateTexture("ARTWORK");
posx_tex:SetAllPoints(true);
posx_tex:SetAlpha(1);
local posy_frame = CreateFrame("Frame", "posyframe", UIParent)
posy_frame:SetPoint("TOP", 40, 0); posy_frame:SetWidth(20); posy_frame:SetHeight(20);
local posy_tex = posy_frame:CreateTexture("ARTWORK");
posy_tex:SetAllPoints(true);
posy_tex:SetAlpha(1);
function CoordsEtc_UpdateCoordinates()
-- CoordsEtc_mapID = C_Map.GetBestMapForUnit("player")
CoordsEtc_position = C_Map.GetPlayerMapPosition(mapID,"player")
contId, worldpos = C_Map.GetWorldPosFromMapPos(mapID,CoordsEtc_position)
suunta = GetPlayerFacing()
local x1, xx = math.modf(abs(worldpos.x) / 10)
local x2, x3 = math.modf(xx * 255)
local y1, yy = math.modf(abs(worldpos.y) / 10)
local y2, y3 = math.modf(yy * 255)
local r1, rr = math.modf(suunta * 20)
local r2, r3 = math.modf(rr * 255)
suunta_tex:SetColorTexture(r1/255, r2/255, r3, 1);
posx_tex:SetColorTexture(x1/255, x2/255, x3, 1);
posy_tex:SetColorTexture(y1/255, y2/255, y3, 1);
end
function CoordsEtc_OnUpdate(self, elapsed)
timeSinceLastUpdate = timeSinceLastUpdate + elapsed
if (timeSinceLastUpdate > CoordsEtc_UpdateInterval) then
-- Update the update time
timeSinceLastUpdate = 0
CoordsEtc_UpdateCoordinates()
end
end
function CoordsEtc_eventFrame:ADDON_LOADED()
if (not CoordinatesDB) then
CoordinatesDB = {}
CoordinatesDB["worldmap"] = true
CoordinatesDB["minimap"] = true
end
mapID = C_Map.GetBestMapForUnit("player")
CoordsEtc_eventFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
CoordsEtc_eventFrame:RegisterEvent("ZONE_CHANGED_INDOORS")
CoordsEtc_eventFrame:RegisterEvent("ZONE_CHANGED")
CoordsEtc_eventFrame:SetScript("OnUpdate", function(self, elapsed) CoordsEtc_OnUpdate(self, elapsed) end)
end
function CoordsEtc_eventFrame:ZONE_CHANGED_NEW_AREA()
mapID = C_Map.GetBestMapForUnit("player")
--CoordsEtc_UpdateCoordinates()
end
function CoordsEtc_eventFrame:ZONE_CHANGED_INDOORS()
mapID = C_Map.GetBestMapForUnit("player")
--CoordsEtc_UpdateCoordinates()
end
function CoordsEtc_eventFrame:ZONE_CHANGED()
mapID = C_Map.GetBestMapForUnit("player")
--CoordsEtc_UpdateCoordinates()
end
SLASH_TEST1 = "/test1"
SlashCmdList["TEST"] = function(msg)
print(CoordsEtc_position.x)
print(CoordsEtc_position.y)
print(suunta)
print(worldpos.x)
print(worldpos.y)
end
Could someone for example provide a very simple code for converting the coordinates to a pixel?
-
Member
Originally Posted by
fgabbert
This is a great post dude!
I've forked your addon repo and added some features to it for my own use, and then I've been writing my own version of the Node bot in Python! So far I can have it record paths and then run around and follow them.
Now I'm working on scripting the combat portion of the bot, and I had a quick question that I would love your input on:
How do you get your character to face the mob that it is attacking?? The only thing I can think of is using some channeling spell first....
You can turn on click to move and then keybind interact with target. Double tap interact with target and your character will run facing the target and attack if in range. Keybind previous target to loot your target after killing it (will run to target to loot if out of range).
-
Post Thanks / Like - 1 Thanks
Mudi (1 members gave Thanks to sandmonster90 for this useful post)
-
Member
Originally Posted by
abromide
Welcome to my long-running guide on how to make a WoW bot. This guide will be focused on teaching the community how to make a bot which runs on WoW Classic. This guide is completely open source and free.
THANK YOU abromide for sharing this guide. Ingenious idea!
Originally Posted by
sandmonster90
You can turn on click to move and then keybind interact with target. Double tap interact with target and your character will run facing the target and attack if in range. Keybind previous target to loot your target after killing it (will run to target to loot if out of range).
And thank you sandmonster90 for this very useful tip. I've been playing WoW for a long time and I didn't know about this. Very useful.
-
Active Member
WINNER OF THE BEST BOT DEVELOPER COMPETITION
5/5
This is the kind of stuff I love to see from other people on Ownedcore. Teaching people not how to bot, but actually code their own, is highly appreciated by me.
This gives people more knowledge of how things work and chance for everyone to begin their bot-programming.
I wrote about AHK and pixel color recognition for Path of Exile, and loved how first of all people told me that their life is easier with the script and secondly people helping eachother out to write better scripts.
Side-note, guys, hide your programs. Even you manage to program good human-like pixel (or any other kind of) bot, the problem is that Warden is especially detective about unknown programs and gets you flagged and you will lose your account.
Its not about technique you made bot with, its about hiding it afterwards. PID, window title, folder, file names etc.
Ps. I am not being sarcastic, this kind of threads are the most giving to the community and I actually love it. This way youth can understand programming and start to create the future of botting/hacking etc.
-
Post Thanks / Like - 1 Thanks
SirGsus (1 members gave Thanks to fonillius for this useful post)
-
Member
Thank for this tutorial, your code works nice and it's pretty clear to understand with your comments.
I wanted to undestand how bot works, pixel analysis it's a good idea, I was surpised to find out how that work.
I'm not a harcore gamer and I launch wow classic after several years to play with my friends, but I have more enjoy to retro engeniring your code rather than playing to the game.
Last edited by mechanlon; 05-05-2020 at 07:28 AM.
-
Member
thanks a lot for this great starting point. So far I decided to port the engine to C# but I struggle to find a similar function for this
getIntAtCell(cell) {
// Finding the hexidecimal color
let color = this.getColorAtCell(cell)
// Converting from base 16 (hexidecimal) to base 10 (decimal)
return parseInt(color, 16)
}
I have my own Color function that gaves me a Color. But converting it to int is what I need. Anyone who can help me out? I am really do not know what happens in the native parseInt function that is in JavaScript. Seems to put in a color string, but I do not know in which format I have to convert my color to a valid string.
A stupid toString() do not take the job
Thanks in advance
-
Member
Im planning to build a basic aura re******* for myself. How safe is this? Seems like no problems but im new to wow area. So not sure their security systems, like if they check program names or can work under a limited windows account
Edit: I wanna ask the plugin safety first. U know.. Its a plugin they can see
Last edited by karadeli; 06-01-2020 at 10:29 PM.
-
Member
Originally Posted by
Plobbi
thanks a lot for this great starting point. So far I decided to port the engine to C# but I struggle to find a similar function for this
getIntAtCell(cell) {
// Finding the hexidecimal color
let color = this.getColorAtCell(cell)
// Converting from base 16 (hexidecimal) to base 10 (decimal)
return parseInt(color, 16)
}
I have my own Color function that gaves me a Color. But converting it to int is what I need. Anyone who can help me out? I am really do not know what happens in the native parseInt function that is in JavaScript. Seems to put in a color string, but I do not know in which format I have to convert my color to a valid string.
A stupid toString() do not take the job
Thanks in advance
In case you haven't solved this already...
var color = System.Drawing.Color.Orange;
var value = color.R * 65536 + color.G * 256 + color.B;
-
Member
Thank you I got an answer in a similar topic
-
Member
When the game is not in the active window, can I get the game image through Win32 api? I try to use some methods but i only get a black image
Last edited by sunlru; 12-07-2020 at 07:58 AM.
Reason: Optional
-
Active Member
Hi everybody, I'm writing to let you know that I will not be updating this tutorial in the foreseeable future. I have passed the project onto another user who has agreed to host the repository in my stead. Glad so many of you enjoyed it.
-
Post Thanks / Like - 1 Thanks
Fufavu (1 members gave Thanks to abromide for this useful post)
-
Member
Originally Posted by
abromide
Hi everybody, I'm writing to let you know that I will not be updating this tutorial in the foreseeable future. I have passed the project onto another user who has agreed to host the repository in my stead. Glad so many of you enjoyed it.
Is the project being actively updated? I'm a developer in the security automation industry who is incredibly interested in getting started with wow automation processes, as well as anticheat evasion and mitigation. Have quite a bit of experience in those fields, but not with Blizzard.
If you can, please PM me your discord/xmpp, would love to have a quick chat with you
-
Active Member
Hi Kircher,
See above post. I'm not currently updating this project.
-
Member
Thank you very much for sharing, which is what I need