[Script] Autohotkey AFK PVP Script menu

User Tag List

Page 1 of 25 12345 ... LastLast
Results 1 to 15 of 365
  1. #1
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,942
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    [Script] Autohotkey AFK PVP Script

    I made this quick script. It uses pixel detection for all of its logic. You WILL need to create images for this script!
    What It Does:
    1. Queue
    2. Accept Queue
    3. Sit Still
    4. ??
    5. Profit

    How to use:
    1. Download/Install AutoHotkey (AutoHotkey)
    2. Copy/paste script into *.ahk file (optional)
    3. Screenshot the images to be searched for (the hardest part)
    4. Place them in the same directory as the script
    6. Run the script
    7. ??
    8. Profit

    How to create your images: (Examples of mine at 1620 x 1080 on a cleric here http://imgur.com/a/ne5SM)
    KEEP IN MIND THAT IT NEEDS TO BE THE INSIDES OF THINGS, FOR EXAMPLE WHEN I SAY GLORY ICON, I MEAN THE INSIDE OF IT... NOT THE ENTIRE THING. THINGS AROUND THE PICTURES YOU TAKE COULD CHANGE DUE TO TRANSPARENCY AND INCLUDING SOME OF THE BACKGROUND.
    queueAvailable.png - Crop a portion of the glory Icon on the left side of the PVP queue
    joinButton.png - Crop a part of the join button that includes the words/and or symbol
    groupFinder.png - Crop a part of blue helmet thing on the popup
    inMatch.png - Crop a part of the grey-ish swirly thing that is above the team scores (appears after match starts) [http://imgur.com/RYjAONd]
    matchDone.png - Crop a part of the exit button with at least some of the letters included
    inParty.png - Crop a portion of the circle that surrounds the players faces (preferably one that doesn't get covered by some player models, like the part below where the class symbol is
    isLeader.png - Crop the middle portion of the crown when you are leader (or anywhere really).
    transferButton.png - Crop a part of the word Transfer from the button.
    canInvoke.png - Crop part of the sun (like the center that changes, where a time would be) WHEN you are actually at a bonfire and can invoke.

    Keep in mind, what you crop for these images is completely up to you. They are basically just a way for the bot to search for the buttons and to figure out which step you are currently on (in-game, needing to queue up... etc)

    Troubleshooting:
    Typically, if it is not detecting a button, it means your images are wrong. Here are some signs of which it is.

    Spamming K - Your queueAvailable is wrong.
    Sits at queue menu and never queues - Your joinButton is wrong.
    Doesn't accept queue - Your groupFinder is wrong.
    Continually tries to join queue while in a match - Your inMatch is wrong.
    Does not leave the match - Your matchDone is wrong.
    Does not leave group - Either your playerPortrait or leaveParty is wrong
    ----If you don't right click, it is playerPortrait. Either the top left corner of your image is not right-clickable, or it isn't recognizing it.
    ----If you right click, but don't click leave party, your leaveParty is wrong.
    Never clicks changeInstance - Your change instance is wrong.
    Won't transfer servers - Your transferButton is wrong.
    Is not trying to kick people - The code is commented out, or your isLeader/inParty is wrong.
    Right clicks people to kick them, but doesn't. - Your kickPlayer is wrong. k
    If it keeps spamming M - Maybe your companion is out and it still thinks you are in a party. Dismiss it.


    If none of these are your problems... like if it seems to recognize it, but it is going too fast (or too slow) feel free to edit the Sleep values. They are in milliseconds, so multiply the number of seconds you want by 1000.


    Known Bugs:
    -Doesn't handle a bugged queue (i.e. you don't get pulled in; but are still in group)
    -Don't think the exit button works (No idea why?)

    Special Notes:
    I have done almost no scripting with AutoHotkey, so bear with the horrendous code. Maybe I will try and clean it up if this is popular enough.

    Changelog:
    1.4: Added in the ability to invoke, added a (hopeful) fix to the empty transfer but, and probably random stability improvements.
    1.3.1: Will activate the window for anti-afk if not already active (and return to previous window)
    1.3: Script now uses some chat commands
    1.2.5: The script will no longer run on other windows named "Neverwinter" (like this forum)
    1.2.4: Sometimes didn't leave party when bugged. Should be fixed.
    1.2.3: Fixed (again) the bugged queue problem.
    1.2.2: Fixed some problems with running forward and clicking portrait (thanks bobbish for pointing out this artifact!)
    1.2.1: Oops! Forgot to add a mouse click for clicking the change instance button.
    1.2: Hopefully fixed bugged queue problem. Also added the ability to remove all players from party if leader (the code is commented out)
    1.1.5: The Anti-AFK script no longer fires when out of party.
    1.1.4: Made leaving the party a critical section. I beleive this will stop it from interrupting leaving the party with the Anti-AFK script.
    1.1.3: Fixed the Anti-AFK script
    1.1.2: Moves the mouse after queuing. Fixes when not actually pulled in queue (i.e. bugged queue).
    1.1.1: Made lots of changes.
    1.1: Made everything work with ImageSearch
    1.0 Original Release

    Code:
    SetTimer, Jump, 60000
    acceptedQueue = 0
    Loop {
    
    IfWinActive, ahk_class CrypticWindowClassDX0
    {
    ; Is the game already over?
    ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 matchDone.png 
    if(ErrorLevel = 0) {
    	critical, on
    	MouseClick left, foundX, foundY
    	Sleep 15000
    	sendToChat("/Team_Leave")
    	Sleep 200
    	critical, off
    }
    else {
    
    	; Are we in a game already?
    	ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 inMatch.png
    	if (ErrorLevel = 0)
    	{
    		acceptedQueue = 0;
    		;Be a dick and kick everyone from the party if we are leader
    		;ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 isLeader.png
    		;if(ErrorLevel = 0) {
    		;	critical,on
    			
    		;	ImageSearch, partyX, partyY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 inParty.png
    		;	if(ErrorLevel = 0) {
    		;		Send {Alt}
    		;		Sleep 100
    		;		MouseClick right, partyX, partyY
    		;		Sleep 3000
    		;		ImageSearch, kickX, kickY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 kickPlayer.png
    		;		MouseClick left, kickX, kickY
    		;	}
    		;	critical,off
    		;}
    	}
    	else {
    		ImageSearch, partyX, partyY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 inParty.png
    		if(ErrorLevel = 0) {
    			sendToChat("/ChangeInstance")
    			Sleep 1000
    			ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 transferButton.png
    			if(ErrorLevel = 0) {
    				acceptedQueue = 0
    				critical,on
    				MouseClick left, foundX, foundY
    				Sleep 500
    				Send {Escape}
    				Sleep 15000
    				critical,off
    			}
    			if(acceptedQueue = 0) {
    				sendToChat("/Team_Leave")
    				Sleep 200
    			}
    		}
    		else {
    			; Has the queue popped?
    			ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 groupFinder.png
    			if (ErrorLevel = 0) {
    				sendToChat("/Clickwindowbutton_1")
    				acceptedQueue = 1
    				Sleep 15000
    			}
    			else {
    				; Do we need to queue up?
    				ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 queueAvailable.png
    				if (ErrorLevel = 0) {
    					; Arbitrary 50 here. Just to make sure it doesn't detect the other join buttons.
    					ImageSearch, buttonX, buttonY, foundX, foundY-50, %A_ScreenWidth%, %A_ScreenHeight%, *30 joinButton.png
    					if(ErrorLevel = 0) {
    						MouseClick left, buttonX, buttonY
    						Sleep 3000
    						MouseMove 0, 0
    					}
    				}
    				else {
    					; Can't find queue button, Try opening up queue
    					sendToChat("/queue")
    					Sleep 3000
    				}
    			}
    		}
    	}
    }
    }
    }
    return
    
    Jump:
    critical, on
    wasntActive = 0
    IfWinNotActive, ahk_class CrypticWindowClassDX0
    {
    	wasntActive = 1
    	WinActivate, ahk_class CrypticWindowClassDX0
    	WinWaitActive, ahk_class CrypticWindowClassDX0
    }
    
    Send {Space}
    ; Temp fix here... dunno why its not detecting me ingame
    Sleep 75
    Send {Space down}
    Sleep 75
    Send {Space up}
    
    ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *30 canInvoke.png
    if(ErrorLevel = 0) {
    	Send {Control down}
    	Sleep 200
    	Send i
    	Sleep 200
    	Send {Control up}
    	Sleep 7000
    }
    
    if(wasntActive = 1) { 
    	Send !{Tab}
    	Sleep 1000
    }
    critical, off
    return
    
    sendToChat(msg) {
    IfWinActive, ahk_class CrypticWindowClassDX0
    {
    	critical, on
    	Send {Enter}
    	Sleep 200
    	Send %msg%
    	Sleep 200
    	Send {Enter}
    	critical, off
    }
    }
    Previous Version: http://pastie.org/private/qx6qxtnbn19pknm17gzbrg
    Last edited by Sychotix; 05-31-2013 at 01:48 PM.

    [Script] Autohotkey AFK PVP Script
  2. #2
    de4thwish's Avatar Active Member
    Reputation
    20
    Join Date
    Mar 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks will try when servers back up.

  3. #3
    Zulajayim's Avatar Banned
    Reputation
    7
    Join Date
    Oct 2012
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds good but im unfortunately totally newbie at ahk. I think i cant configure it properly. But will try it.

  4. #4
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,942
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Its simple really. You only have to edit the values up at the top. This are basically the coordinates for both where you need to click, and the pixels it needs to search for. Autohotkey has a "window spy" type thing that will give you all this information. All you need to do is put your mouse over it.

  5. #5
    Brack752's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, thank you for getting most of this script running however I'm having trouble located which icons you need to get the coords for:

    What did I use for my pixels?
    queueAvailable - The PVP symbol on the queue screen
    groupFinder - The blue helmet thing on the top left of it
    inMatch - I TRIED (unsuccessfully) to use the microphone/speaker things next to the character portraits
    matchDone - I used the yellow border around the button or reward; I forget.


    For instance, your script says the following and let me see if I have this right:

    (This is the PVP icon on the "Queue" (K hotkey) to the left of the PVP join button?)
    queueAvailableX = 293
    queueAvailableY = 488
    queueAvailableColorID = 0x54341F

    (This is the join button to the right of the icon with the coords above?)
    joinButtonX = 666
    joinButtonY = 484

    (What Blue helmet icon? I can only see the character icon which is 'C' by default and brings up the character pane with your stats on it)
    groupFinderX = 555
    groupFinderY = 143
    groupFinderColorID = 0xB89A61

    (As stated above, you tried to get this working and was unsuccessful so can I remove this or?)
    inMatchX = 130
    inMatchY = 92
    inMatchColorID = 0xC2C2C2

    (This is the pane that comes up says "You lost, you suck"?)
    matchDoneX = 501
    matchDoneY = 629
    matchDoneColorID = 0x468CA6

    (This is the button below the pane that comes up when you have lost to leave?)
    matchDoneButtonX = 670
    matchDoneButtonY = 553

    (I have moved my portrait so I'm guessing I need to change this as well?)
    portraitX = 69
    portraitY = 81
    leaveX = 127
    leaveY = 127


    Thank you in advanced matey <3.

  6. #6
    Zestro's Avatar Active Member
    Reputation
    57
    Join Date
    May 2012
    Posts
    166
    Thanks G/R
    6/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sychotix View Post
    Its simple really. You only have to edit the values up at the top. This are basically the coordinates for both where you need to click, and the pixels it needs to search for. Autohotkey has a "window spy" type thing that will give you all this information. All you need to do is put your mouse over it.
    AHK is horrible for what you want it to do Sychotix, you should really give Blue Eye Macro a try. I wrote up a script in like 10 min which joins queue/leaves arena/leaves party/rejoins queue.

    I'm not sure if links are allowed here so not posting a direct link but you seem resourceful enough to find out what i'm talking about and delve into it.

  7. #7
    Zulajayim's Avatar Banned
    Reputation
    7
    Join Date
    Oct 2012
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think we are really welcome all release.

    But if you make an other one, try to make a new topic to it
    And thanks for the help. Sychotix

  8. #8
    outlaws2's Avatar Member
    Reputation
    1
    Join Date
    Jun 2012
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Sychotix and thanks for your job

    He press "k"
    I have to add
    else {
    ; Can't find queue button, Try opening up queue
    Send k
    MouseClick left, joinButtonX, joinButtonY
    Sleep 3000
    }
    For tagging

    Once on queue, it's like he thinks he is not on the queue ( he repeat pressing k and he doesnt accept the queue when it pop ( groupFinderX & groupFinderY right ? ))

  9. #9
    freddeee's Avatar Sergeant
    Reputation
    1
    Join Date
    Jun 2012
    Posts
    38
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will try this later, have looking for something like this!

  10. #10
    Thiefh's Avatar Private
    Reputation
    1
    Join Date
    May 2013
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Youtube tut for noobs like me?

    Edit; Copy pasted it but coordinates all wrong;D
    Last edited by Thiefh; 05-14-2013 at 09:20 AM.

  11. #11
    ragother's Avatar Member
    Reputation
    1
    Join Date
    May 2013
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Zestro View Post
    AHK is horrible for what you want it to do Sychotix, you should really give Blue Eye Macro a try. I wrote up a script in like 10 min which joins queue/leaves arena/leaves party/rejoins queue.

    I'm not sure if links are allowed here so not posting a direct link but you seem resourceful enough to find out what i'm talking about and delve into it.
    can you post the code?

  12. #12
    Maxflax's Avatar Member
    Reputation
    3
    Join Date
    Jul 2012
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ragother View Post
    can you post the code?
    Yeah please do share it =)

  13. #13
    Blankz's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    84
    Thanks G/R
    0/0
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried working on an autoit script but no luck i can't find the correct pixels. I wish i knew more about reading memory values in a game.

  14. #14
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,942
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I have added pictures in order to help those who have trouble creating the scripts for this.

    Also, I think AutoHotkey is sufficient for this project; especially since I already have (mostly) working code in it.

  15. #15
    Maxflax's Avatar Member
    Reputation
    3
    Join Date
    Jul 2012
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have one 95 working script using Blue eye, fool proof, Problem is i can´t figure out why the keystrokes or the mouse-clicks wont work. =(
    If someone can enlighten me i will post the full thing after i stress test it some.

Page 1 of 25 12345 ... LastLast

Similar Threads

  1. [Script] Autohotkey AFK PVP Script
    By Sychotix in forum Neverwinter
    Replies: 316
    Last Post: 05-27-2013, 01:53 AM
  2. LFM: AFK PvP Farm / Mindflayer (EU)
    By x942i1 in forum Neverwinter
    Replies: 10
    Last Post: 05-13-2013, 09:51 AM
  3. WoW AFK-PvP Script - Question
    By AkaMAtzi in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 04-16-2010, 07:16 AM
  4. auto it anti-afk pvp bot
    By Beastslayer in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 05-04-2007, 02:19 PM
  5. How to AFK PVP
    By clarabow in forum World of Warcraft Bots and Programs
    Replies: 4
    Last Post: 03-28-2007, 01:08 PM
All times are GMT -5. The time now is 01:05 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search