Orakad Posted January 7, 2008 Share Posted January 7, 2008 Hi, I'm making a little script for the ever so popular world of warcraft since i prefere not to download anyone elses stuff I'm giving this a serious go. sofar the script looks like this CODEAutoItSetOption ("SendKeyDownDelay", 150) AutoItSetOption ("MouseClickDelay",0) While 1 Sleep(Random(1500, 2000, 1)) ;~ Clicks the npc WinWaitActive("World of Warcraft") MouseClick("right", 604, 427, 1,20) ;~ Selects battleground WinWaitActive("World of Warcraft") Sleep(Random(1000, 2000, 1)) ;~ Clicks join battle WinWaitActive("World of Warcraft") MouseClick("left", 215, 130, 1, 20) Sleep(Random(1500, 2000, 1)) ;~ Clicks Enter battle (Also release after death and cancels ressurection) WinWaitActive("World of Warcraft") MouseClick("left", 262, 580, 1, 20) Sleep(Random(1500, 2000, 1)) ;~ Clicks leave battleground when its over WinWaitActive("World of Warcraft") MouseClick("left", 800, 200, 1, 20) Sleep(Random(1500, 2000, 1)) WinWaitActive("World of Warcraft") MouseClick("left", 780, 730, 1, 20) Wend Func MyExit() Exit EndFunc And it works fine to just join a battleground stand in one spot, not go afk etc. I want to add functionality to it but im not sure how to proceed. What I want to add is a series of keystrokes that make my character move , slightly random but still in a rather straight forward direction. The trick here is that it is not supposed to move when outside a certain area. But move as much as possible more or less when inside that area. Ive been reading a bit about pixelsearch and other peoples attempts at bots on this forum but I havent found what im looking for yet. Does anyone have any ideas? I guess that if your not a wow player you might not be familiar with the situation but if you have any questions that might help you help me i will gladly be of service =) One idea i got was to use an addon that when entering the area of a battleground (when i want the character to start moving) that can display some sort of colored square and by that trigger the movement. There are minor things on the screen that doesnt appear outside of a battleground but nothing I think is distinguishing enough to detect. Thankful for any input. Link to comment Share on other sites More sharing options...
muzle6074 Posted January 7, 2008 Share Posted January 7, 2008 (edited) Hi Orakad, I'm also new to AutoIt3 and not very good at it but I also made an AFK bot. Heres mine: $szTitle = "World of Warcraft" WinWaitActive($szTitle);wait for WoW window WinMove($szTitle, "", 0, 0, 1570, 1000);move and resize WoW window While 1 For $i=Random(360, 480) to 1 Step -1 Sleep(250) $bge=PixelGetColor(790, 710) $res=PixelGetColor(740, 240) $resc=PixelGetColor(820, 235) If Hex($bge, 6) = "690505" Then;if the battle ground has ended MouseClick("Left", 790, 710, 2) MouseMove(400, 400) Exit ElseIf Hex($res, 6) = "F1C300" Then;if chracter is dead MouseClick("Left", 795, 240, 2) MouseMove(400, 400) ElseIf Hex($resc, 6) = "700100" Then;cancel resurrecting MouseClick("Left", 795, 240, 2) MouseMove(400, 400) EndIf Next Send("{SPACE}") WEnd As you can see I used pixel detection to check if my character had died or if the battleground was over. I tried using pixel search in WoW but I struggled to get it to work and I think it may be because there are many other colors of the same value on the WoW window. You can do key stroke commands to move your bot like this: Send("{w down}") Sleep (30000) Send("{w up}") I also have a question for you. How do u know where the battle master is? I see you used specific co-ords. Edited January 7, 2008 by muzle6074 Link to comment Share on other sites More sharing options...
Orakad Posted January 7, 2008 Author Share Posted January 7, 2008 Well to start the cycle i need to stand in front of the battlemaster and have him fairly zoomed in, i read somewhere that i also needed to be facing north. It was easy to get him targeted when zooming in but getting the coordinates for the buttons were a lot harder and also depends on your resolution and addons etc. So that was just a bit of trial and error really =) About your macro. The resizing of the window, does that mean that you do not play in fullscreen? I've been thinking about that and in a smaller window would be great so i can watch a movie or something if im at the computer. Can you think of anything that might be detectable with pixel detection that can tell if your inside the battleground or not? Link to comment Share on other sites More sharing options...
muzle6074 Posted January 7, 2008 Share Posted January 7, 2008 (edited) I had the window set to a certain size so that I could work with my co-ords but later I will change it to full screen. It was just easier developing the script in window mode so I didn’t have to keep Alt+Tabing EDIT: To be honest I don't know if this would make it detectable or not. I think that reading a certain pixel repeatable would just be as detectable as clicking in the same place We don't know how the warden works but people have been botting for years with big and small scripts and never been caught whilst others have been banned in a week. Edited January 7, 2008 by muzle6074 Link to comment Share on other sites More sharing options...
d0n Posted January 7, 2008 Share Posted January 7, 2008 what you guys should get is the addon called smartqueue from wowace, this will auto click join BG (just need to right click the battlemaster) and auto leave the BG when its over, this will save a lot of work imo Link to comment Share on other sites More sharing options...
muzle6074 Posted January 7, 2008 Share Posted January 7, 2008 d0n, Entering and leaving the BG is easy. Right clicking the BM isnt. Leave BG and join BG are always in the same place so you can just set co-ords. Link to comment Share on other sites More sharing options...
d0n Posted January 7, 2008 Share Posted January 7, 2008 usually people just zoom in to max and face the battlemaster to click it, i am not sure if doing pixel search would be useful here Link to comment Share on other sites More sharing options...
muzle6074 Posted January 7, 2008 Share Posted January 7, 2008 Is there a command to zoom in/out? (I know I can do it manually). Link to comment Share on other sites More sharing options...
d0n Posted January 7, 2008 Share Posted January 7, 2008 the best way i think is just to send key of your zoom in/out key bound in the game, since it is control by the game Link to comment Share on other sites More sharing options...
Orakad Posted January 8, 2008 Author Share Posted January 8, 2008 Good idea with the addon for joining etc. You wouldent happen to know your way around EEPanels or something that i might be able to use to get a colored feild shown when entering the BG? Link to comment Share on other sites More sharing options...
Orakad Posted January 8, 2008 Author Share Posted January 8, 2008 Ok I think i might have found a solution too my problem, i need to click in one spot that changes color after a bg starts and then changes back to another color afterwards. I'm rather busy at work atm but if anyone can translate that to Autoit code id be very greatful. while true move mouse to position X,Y click extract color If color is not X then do nothing else if color is X then do endif or something just of the top of my head Link to comment Share on other sites More sharing options...
Orakad Posted January 15, 2008 Author Share Posted January 15, 2008 For anyone attempting this I would strongly advise against it. Blizzard has now made public that they will work very activly to ban people that are cought with the inactive debuff too many times. As far as I can see it would be much too risky to continue using this if you cant make it refined enough to actually attack opposing players thus removing the inactive debuff. This will require alot more programming skills than I have at least so for me this is abandoned. Thanks for the feedback sofar and I'm sure I will be able to use this language again for something else than world of warcraft =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now