Everquest Update Script
EverQuest update script.
- Working as of 7/03/2021 23:35 GMT
So this a script I made to automate a rare but annoying process. Project1999 is an EverQuest private server that aims to be as close as it can to the original game when it came out in 1999. It only adds in the first two expansions after the base game Ruins of Kunark
and Scars of Velious
.
Every so often the developers of the server add an update which is a .zip file available on the website which contains a bunch of files you copy into the EverQuest directory and overwrite the old ones. This script automates that.
The script itself.
The script itself is written in python with no external libraries meaning that it will run on any machine with python3+ installed and on any OS as it’s not using anything specific to Linux distros or Windows.
An issue I faced is that the .zip file on the website is named P99Files with two numbers appended to the end, this obviously changes every update. I solved this using regex in the script here: re.findall('http://www.project1999.com/files/P99Files\d+.zip', forumpage)
the d+
part looks for one or more digits on the end of that filename and if it maches it will attempt to download it.
You will need to change eq_directory
before you run the script and point it to the root of your EverQuest directory.
Here it is:
#!/usr/bin/python3
import requests
import zipfile
import re
import os
eq_directory = "/PATH/TO/GAME"
def update_everquest():
forumpage = requests.get('https://www.project1999.com/forums/showthread.php?t=2651').text
download_link = re.findall('http://www.project1999.com/files/P99Files\d+.zip', forumpage)
print("Attempting to download the update files from project1999.com...")
r = requests.get(download_link[0])
file_name = eq_directory + 'update.zip'
if r.status_code == 200:
print("Success!")
elif r.status_code == 404:
print("Unable to fetch the files..")
print("Saving the file to " + file_name)
with open(file_name, "wb") as code:
code.write(r.content)
print("Unzipping the .zip file in the directory.")
with zipfile.ZipFile(file_name, 'r') as zip_ref:
zip_ref.extractall(eq_directory)
print("Deleting the update.zip file from the directory.")
os.remove(file_name)
print("EverQuest spellfiles updated")
update_everquest()
GNU/Linux Install/Usage.
Python 3 really should be installed on any modern linux distro these days, if not then install it with your package manager. Try run this in the terminal to see if it is indeed there.
$ python3
Python 3.6.8 (default, Apr 16 2020, 01:36:27)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
If you see something that looks like whats above it’s installed.
Type exit()
or press CTRL+D
to exit out of that.
To run the script save it as a file and name it whatever you want then make sure you have set eq_directory
to where EQ is installed on your machine. I named mine updateeq
.
Make it executable and run with the following:
$ chmod +x updateeq
$ ./updateeq
Alternatively you can run:
python3 updateeq
Windows Install/Usage.
NOTE: The images are small due to the formatting on my blog, please right click and open them in a new tab to zoom in.
Windows does not have Python installed by default so we need to grab it from Python and download the latest version which at this time of writing is 3.8.6.
Grab the Windows x86-64 executable installer
for AMD64
wait for it to download and double click it. When installing on the first screen MAKE SURE to hit Install Python 3.8 to PATH
we need this for the next step afterwards. Example:
After that is installed go and copy the source code from above and paste it into a text document for now but make sure you save it as a .py
file. I called mine updateeq.py
. You should see Windows automatically turn it into a python file and put the Python logo next to it.
Next right click the windows logo in the bottom left aka the start menu and open powershell as administrator. We are going to use powershell to install a missing module (requests) as for some reason the Windows build of python doesn’t add it by default. Go figure.
Type in pip install requests
hit enter and watch it install.
After that right click the source code file we saved before and open it in IDLE which is Pythons editor that comes with the installer. You should see something like the following:
After that is done we need to point our script to where EverQuest is saved. In my case I don’t actually run the game on Windows so on my Windows test machine I don’t have a copy but I can still demonstrate by just dumping the files into the Administrator’s Documents folder.
The variable eq_directory
in the code needs to be edited. On Windows you will need to append a slash to every backslash in Python’s source code. I set mine to C:\\Users\\Administrator\\Documents\\
but please change yours to where the root of the Everquest directory is.
Hit Run at the top of IDLE and run the module. You should see the Python 3.8.6 Shell open and start to download the files. Ignore my first run in the screenshot as I didn’t change the directory beforehand.
If I actually had the game client here it would now be updated however these are just the extracted files proving that it works.