Fortnite BattlePass Automation


Download



The Story Behind The Script


"Who has the time to actually play video games anymore?"
That is the wrong question to ask.
Instead you should ask yourself, "Why should I have to play video games anymore?"

Here we have a Python script I'm particularly proud of. Its concept certainly helps dull the sting of these types of games that try to bargain for your time and attention. I made it for my Windows computer, but I believe it is pretty agnostic. I like to play Fortnite occasionally, and I had gotten in the habit of playing just often enough that I could get the BattlePass for free each season after having bought it once. I was quite happy that I was able to get the premium experiece for free. One season there was a particular character that really leapt out at me. The character in question was a futuristic cyborg-ninja-samurai type, one of those so dumb it's cool type of deals. One of the things that was availible for his character was a color palette that made him look like a negative photo with red highlights which just looked really cool to me. Unfortunatly, I forgot about Fortnite a couple of times that season and didn't really feel like spending a bunch of time playing the game. It bugged me when the season ended and I didn't have the desired color scheme. That is when I first thought about this script. It started as a hypothetical idea that I had no true plan of fleshing out.
As I thought about it, more and more I realized that I could easily make a quick script that could keep the whole process. I started taking into account every possible pop-up and keystroke necessary to keep playing game after game. My original idea was to use the "pyautogui" library to seek out certain indicators popping up on the screen and use those to determine when a button should be pressed. I was using the Thonny IDE and for some reason Thonny seems to really take issue with how I have been using certain classes. I fouund that out when I was trying to adapt the script to my sister's computer and Thonny took issue with the "keyboard" class even though the script ran perfectly in the command prompt. This further supports my belief in command line superiority! Ha ha!
I've thought about making some rewrites, and I probably ought to streamline some parts of it, but I've gotten so far works well and as the adage goes, "If it ain't broke don't fix it."
Still, someday I might make a more technologically advanced script that leverages machine vision and AI to play actual games, probably starting with the Imposter gamemode and then the Battle Royales. I've been learning about how to make an AI from scratch in Python as I never feel as though I've truly learned something unless I can make it.

How To Use The Script

  1. Just open up Fortnite like you would any other time
  2. Figure out a set of pixel coordinates that lay within the game's "START" button, I used the Snipping Tool to capture an image and took a look at the image coordintes in Photoshop.
  3. In a text editor, change the script's "startX" and "startY" variables to reflect your coordinates.
  4. Change the Fortnite Gamemode to "Imposters".
  5. With Fortnite open run the script, but make sure the Fortnite "START" button is visible and clickable.
  6. The script will now run endlessly! Go out with friends, go to bed, go to work, go on vacation and know you are getting XP all the while!
  7. When you return and wish to reap your rewards, press and hold the "Q" key until a you see a message reading, "The script is now done."




import keyboard import pyautogui import time #length 1550b #height 730 #input("Start") time.sleep(3) #input("test") #pyautogui.locateCenterOnScreen('PlayButton.png') #time.wait(30) #input("Done") """ def quitout(): if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break """ startX while True: #Stage 1 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('b') pyautogui.scroll(1) pyautogui.keyUp('b') #Stage 2 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.click(1550,730) time.sleep(7) #Stage 2.5 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('b') pyautogui.scroll(1) pyautogui.keyUp('b') #Stage 3 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('f') time.sleep(5) pyautogui.keyUp('f') #Stage 3.5 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('b') pyautogui.scroll(1) pyautogui.keyUp('b') #Stage 4.5 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('s') time.sleep(1) pyautogui.keyUp('s') pyautogui.keyDown('a') time.sleep(1) pyautogui.keyUp('a') pyautogui.keyDown('d') time.sleep(1) pyautogui.keyUp('d') #Stage 4 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('e') time.sleep(5) pyautogui.keyUp('e') #Stage 4.5 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.keyDown('b') pyautogui.scroll(1) pyautogui.keyUp('b') #Stage 5 if keyboard.is_pressed('q'): pyautogui.alert('The script is now done.') break pyautogui.press('esc') time.sleep(3) pyautogui.press('esc')


First Uploaded On: 2022-06-07