Jump to content
News Ticker
  • Minecraft Server 1.19 is Live!
  • Monster Hunter Sunbreak Out Now!
  • WoW Season 4 Starting 8/2/2022

Awesome_Taco

Administrators
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by Awesome_Taco

  1. Added quick script to prevent afk auto logout. Try at your own risk. Not sure if this would be detected as a bot.
  2. Welcome to coding with Taco. Here are the requirements: Python 3.7 pip install opencv-python pip install PyAutoGUI The code editor I use is VS Code or VS Studio , you can use whatever you like. The goals: Open Battle.net Select WoW (I will not be going over switching from WoW to WoW Classic, but you should be able to understand how to do that from this tutorial) Hit the play button Select the Server And accept the full warning message if present. Might seem tough but it is easier than you would expect. First, lets go through the process the script will have to go. Take screenshots of every step and save them. Open battle net, select the game, hit the play button, wait for connection, select the server, accept the warning. Create your new python file. Set your imports We are going to want to import: import os import time import pyautogui Now as a requirement above, I mention opencv-python. PyAutoGUI will use it on its own without you having to import to script. So now the easy part. Open Battle.Net. File your file location for Battle.net. You can right click on the icon and open file location. Mine is here: C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe We will use the import os to launch/bring to the front Battle.net os.startfile('C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe') We can run the script to make sure it opens Battle.Net to see if it works. Now, we are going to want to wait maybe two seconds to make sure it opens. Waiting is also called sleeping. So we will put: time.sleep(2) The script will wait 2 seconds. Now, we are going to want to edit our first photo. We want to get the image from the side bar like this: Save the image as something understandable like WoWButton.png Now back to the script! PyAutoGUI is going to be doing all the hard work here. PyAutoGUI has a function to find an image on the screen called locationOnScreen, simple right? # Gray Scale to remove colors to make it easier to match # .9 Confidence just because the background color noise wowIcon = pyautogui.locateOnScreen('WoWButton.png', grayscale=True, confidence=.9) wowIcon will equal the position on screen the image is found. If you print it to the console, you will see top, bottom, left, right with the cords on screen. We will want to make sure it clicks in the center of the button. So we got to center it and then get what those mouseX and mouseY cords will be: # Center the mouse wowIcon = pyautogui.center(wowIcon) wowIconx, wowIcony = wowIcon Again, PyAutoGUI is doing all the hard work. Now, you just got to click on it: #Click! pyautogui.click(wowIconx, wowIcony) Now, not everything will just let you click on it without the mouse moving. I'd imagine it is because they want to make it harder for bots. An easy fix and one that was needed when selecting the server is by moving the mouse. This can be done like this: # Find the server name serverName = pyautogui.locateOnScreen('serverIcon.png', grayscale=True, confidence=.9) # Center it! serverName = pyautogui.center(serverName) # and well click it. serverNamex, serverNamey = serverName pyautogui.moveTo(serverNamex + 1, serverNamey + 1) time.sleep(.5) pyautogui.click(serverNamex, serverNamey) So like before, we created an image of the server name: Then we found it, moved the mouse to the location. I made it move 1 pixel higher on the x and y just so there is some more movement when clicking. The delay isn't really needed but makes it seem more human. Attached is the full script with a batch file. You can use the task scheduler to launch the script at a specific time or just to make it open quicker while you do something else. I hope you learned something! Attached is the script to prevent AFK disconnect. Try at your own risk. I am not sure if this will be detected as a bot. import time import random import pyautogui def Forward(): return pyautogui.press('w') def Back(): return pyautogui.press('s') def Left(): return pyautogui.press('a') def Right(): return pyautogui.press('d') switcher = { 0: Forward, 1: Back, 2: Left, 3: Right } def direction(argument? # Get the function from switcher dictionary func = switcher.get(argument, "nothing") # Execute the function return func() while True: time.sleep(random.randint(1,10)) pyautogui.press('space') time.sleep(random.randint(1,10)) direction(random.randint(0,3)) Updated.zip Press Space.py
  3. I was bored at work and saw a nice challenge of putting together (a not so hard) puzzle for the new TeamSpeak 5. On their twitter: https://twitter.com/teamspeak There are puzzle images of what we are to believe is the next teamspeak UI. I thought it would be fun to have Python do the work for me. So it is quick and dirty but should still make sense. from PIL import Image, ImageChops image_one = Image.open('1.jpg') image_two = Image.open('2.jpg') image_three = Image.open('3.jpg') image_four = Image.open('4.jpg') image_five = Image.open('5.jpg') image_six = Image.open('6.jpg') image_seven = Image.open('7.jpg') image_eight = Image.open('8.jpg') image_nine = Image.open('9.jpg') image_ten = Image.open('10.jpg') diff = ImageChops.difference(image_one, image_two) diff2 = ImageChops.difference(diff, image_three) diff3 = ImageChops.difference(diff2, image_four) diff4 = ImageChops.difference(diff3, image_five) diff5 = ImageChops.difference(diff4, image_six) diff6 = ImageChops.difference(diff5, image_seven) diff7 = ImageChops.difference(diff6, image_eight) diff8 = ImageChops.difference(diff7, image_nine) diff9 = ImageChops.difference(diff8, image_ten) diff10 = ImageChops.invert(diff9) diff10.save('diff.jpg') They have 10 images at the time I wrote this, so we are missing 2 more. I named them in order, not really necessary, you can create an empty folder and just have it open all images in directory with a loop. Here is the result:
  4. Server Name Minecraft Function Restart
  5. Hello! This thread is for the server restarter. If there is an issue with a game. Just post the game name from the list. Please don't add anything else to it. Post below is an example, only post the name of the game from the list. Game server list: ....
  6. How did it go? Did you place where you expected? I got placed 3076 after winning all 10 placements!
  7. How does overwatch look in 21:9 on it?
  8. It was alright, I liked the flow of the book better. The movie focused on trying to hype people for the future of vr/ar.
  9. www.youtube.com/watch?v=GL7Yu1o82pI Hope to try this with some free time tomorrow.
  10. http://animecruzers.io/read-manga/
  11. Look's like he is going against Beerus.
  12. April 7th! If you can't wait. You can read it here: http://ww2.readmha.com/
  13. Welcome to coding with Taco! Let's start the new project. This project will pull information from https://min-api.cryptocompare.com and get us the information we want on RavenCoin. I have chosen this website because they hold historical information and would be cool to see in the app. (On top of it being free as CoinMarketCap will start charging for use of the API) Creating the new Project. Uses Permissions
  14. I have the game and will try this tonight.
  15. From the last logo attempt, they all look great. I think the sniper one would work best though. It isn't too large and it is clean without being to much.
  16. I was thinking this was for the switch >.<
  17. https://reddit.com/r/moirarollouts

Popular Topics

About us

Warpigs is a semi-hardcore multi game community, for both MMOs and other genres. Our core, which has largely remained the same, started back in 2014. Warpigs first got started in Wildstar and has since branched out to several other game including, Black Desert Online, Overwatch, Heroes of the Storm as some of our most active games. We also have a strong internal following for both Dauntless and Ashes of Creation.
 

Warpigs function as a tight knit family-esque guild, which is not to say that our conversations are G-rated. Quite the opposite, but when you're one of us, we've got your back. Words fly pretty freely, and I'm always of the opinion that if you play an MMO, or any game with a social player base, you need thick skin and know not to take things personally. With that being said, we are a well organised and have a fairly mature membership, and as such we offer a very stable guild that we hope will be here for many more years to come.
 

Warpigs are dedicated to a friendly, team focused, fun-loving gaming environment where every member is important and not just a number on a roster. We seek to foster long term friendships among members and enhance the online gaming experience by virtue of those friendships.

×
×
  • Create New...