UnderAnder / mega-alerts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mega-alerts

A super fast Blizzard AH sniper created by Saddlebag Exchange

Please dontate to our patreon so we can keep the project running

https://www.patreon.com/indopan

Current Docker versions:

cohenaj194/mega-alerts:latest
cohenaj194/mega-alerts:1.7
cohenaj194/mega-alerts:1.6
cohenaj194/mega-alerts:1.5
cohenaj194/mega-alerts:1.4
cohenaj194/mega-alerts:1.3
cohenaj194/mega-alerts:1.2
cohenaj194/mega-alerts:1.1
cohenaj194/mega-alerts:1.0

Last Stable Version: 1.7

Alert Example

image

Software Setup

  1. Install Docker used to run the sniper

  2. Go to https://develop.battle.net/access/clients and create a client, get the blizzard oauth client and secret ids. You will use these values for the WOW_CLIENT_ID and WOW_CLIENT_SECRET later on.

image image
  1. Setup a discord channel with a webhook url for sending the alert messages You will use this for the MEGA_WEBHOOK_URL later on.

  2. Download the docker image, if on windows open a command prompt to run this.

docker pull cohenaj194/mega-alerts

Item Selection

  1. If you have specific items and prices you want, then make a json object with the item ids and prices that you want to snipe for!

This is what you will set for DESIRED_ITEMS or you can set {} if you only want to snipe pets.

  • The item ids for items you want to snipe are as the keys
  • and set the price in gold for each item as the value

For example the following looks for item id 194641 (which is the elemental lariat) for under 500k and another item for under 40k.

{"194641": 500000, "159840":40000}

Paste that into this json checker if you want to make sure your json is valid

You can find that id at the end of the undermine exchange link for the item https://undermine.exchange/#us-thrall/194641 or if you look it up on wowhead the url also has the item id https://www.wowhead.com/item=194641/design-elemental-lariat

You can also use our item id to name lookup tool, which makes this even easier.

  1. If you have specific pets and prices you want, then make a json object with the pet ids and prices that you want to snipe for!

This is what you will set for DESIRED_PETS or you can set {} if you only want to snipe regular items.

  • The pet ids for items you want to snipe are as the keys
  • and set the price in gold for each item as the value

For example the following looks for pet species id 3390 (which is the Sophic Amalgamation) for under 3K.

{"3390": 3000}

You can find that id at the end of the undermine exchange link for the item next to 82800 (which is the item id for pet cages) https://undermine.exchange/#us-suramar/82800-3390.

  1. If you want to snipe based on ilvl, leech, speed, avoidance or sockets then setup the json object for that:

We now have an extra option similar to the DESIRED_ITEMS or DESIRED_PETS for sniping items based on ilvl. This also lets you search for items with specific item levels and leech, sockets, speed or avoidance.

To enable this set the env var DESIRED_ILVL with json similar to the following. This example looks for items with over an ilvl of 360 with a speed stat:

{"ilvl": 360, "buyout": 1000, "sockets": false, "speed": true, "leech": false, "avoidance": false}

If we change this to and set "sockets": true then it will show items over an ilvl of 360 with a speed stat or a socket:

{"ilvl": 360, "buyout": 1000, "sockets": true, "speed": true, "leech": false, "avoidance": false}
  1. If you want to run locally with python or pycharm, first clone the repo or download the code. Then set all your user values in the data files under the user_data/mega json files:

Even if you are not going to run directly in python then you should still save this somewhere in a text file.

How to run the alerts

With whatever method you choose you will provide all the details the code needs in Environmental Variables. You must provide at least the following:

  • MEGA_WEBHOOK_URL
  • WOW_CLIENT_ID
  • WOW_CLIENT_SECRET
  • WOW_REGION either EU or NA
  • Then for your snipe method you must provide at least one correct json data for DESIRED_ITEMS, DESIRED_PETS or DESIRED_ILVL

We also have the following optional env vars you can add in to change alert behavior, but you dont need to as all have default values when not manually set:

  • SHOW_BID_PRICES=true Bid prices below your price limit will also be shown (default false)
  • WOWHEAD_LINK=true Uses wowhead links instead of undermine and shows pictures, but the message length will be longer (default false)
  • SCAN_TIME_MIN=-1 increase or decrease the minutes before or at the data update time to start scanning (default to keep scanning 1 min after the data updates).
  • SCAN_TIME_MAX=1 increase or decrease the minutes after the data updates to stop scanning (default to keep scanning 3 min after the data updates).
  • MEGA_THREADS=100 increase or decrease the threadcount (default to scan 48 realms at once)(more threads = faster scans, but doing more threads then realms is pointless).
  • REFRESH_ALERTS="false" if set to false then you will not see the same alert more than once (default true)
  • NO_RUSSIAN_REALMS="true" set this to true if you are on EU and do not want to get alerts from russian realms
  • ALERT_SPECIFIC_REALMS={"alert_specific_realms" = []} if set check only the specified realms, for example {"alert_specific_realms" = [1302, 3674, 3686]} there will be results only from Archimonde, Stormscale, Antonidas

Different ways to run mega alerts

  1. Running with docker desktop is the simplist and most stable method. It will be easiest for windows users.

In docker desktop download the image and click run to run it. It will then give you the option to add variables.

image

Click to add more variables in and put the variable names in with your values

image
  1. If you are able do run a docker run command directly on your command line then that will be even easier than option 1 as you can just save your run command and paste it in the command line.

Make sure to set WOW_REGION with either EU or NA

docker run -dit \
    --name wow-test \
    --env MEGA_WEBHOOK_URL=$MEGA_WEBHOOK_URL \
    --env WOW_CLIENT_ID=$WOW_CLIENT_ID \
    --env WOW_CLIENT_SECRET=$WOW_CLIENT_SECRET \
    --env WOW_REGION=EU \
    --env DESIRED_ITEMS='{"194641": 500000, "159840":40000}' \
    --env DESIRED_PETS='{"3390": 2700}' \
    cohenaj194/mega-alerts
  1. You can also try running with docker-compose which will automatically pick up values if you set them in the json files (mentioned in step 4 of the Item Selection section of the guide)

You can then run it with docker compose using:

docker compose up --build
  1. You can run it with python on your computer with pycharm

Make sure the required packages are installed by running:

pip3 install -r requirements.txt

Then just run the mega-alerts.py file. To do this right click the mega alerts file and click run:

Screen Shot 2023-07-11 at 1 14 40 PM
  1. Alternatively you can try to run this in kubernetes on minikube to autorestart if the pods fail

If you can run shell and python locally please run this instead of using kubernetes as you can easily exit it by hitting "control" + "c" on your keyboard:

bash auto_restart.sh

Download and start minikube with:

minikube start

Then update the https://github.com/ff14-advanced-market-search/mega-alerts/blob/main/kube-manifest.yml with your own environmental variables:

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mega-alerts
spec:
  selector:
    matchLabels:
      run: mega-alerts
  replicas: 1
  template:
    metadata:
      labels:
        run: mega-alerts
    spec:
      containers:
      - name: mega-alerts
        image: cohenaj194/mega-alerts
        env:
        - name: MEGA_WEBHOOK_URL
          value: "https://discord.com/api/webhooks/12345678/foobar"
        # EU or NA
        - name: WOW_REGION
          value: "NA"
        - name: WOW_CLIENT_ID
          value: 123456789asdfghjk
        - name: WOW_CLIENT_SECRET
          value: 123456789asdfghjk
        - name: DESIRED_ITEMS
          value: '{"194641": 500000, "159840":40000}'
        - name: DESIRED_PETS
          value: '{"3390": 2700}'

Once you do that just run:

kubectl apply -f kube-manifest.yml

To update to the latest container version of mega alerts run:

kubectl rollout restart deployment/mega-alerts

You can then view the logs with:

pod_name=$(kubectl get pods | grep -v NAME | awk '{print $1}')
kubectl logs $pod_name 

Simple Alerts

If you have trouble setting up mega alerts or making a battle.net oauth token you can use the simple-alerts.py instead.

This is slower than mega alerts and can be out of sync at times, but it only requires a discord webhook url to run.

To set this up:

  1. Add your webhook url and any extra alert times into the user_data/simple/simple-alerts.json

  2. Generate your alert json using our price alert webpage and then paste it into the user_data/simple/simple-alerts.json.

  3. Run the simple-alerts.py script:

image

Snipe by ilvl and tertiary stats

We now have an extra option similar to the DESIRED_ITEMS or DESIRED_PETS for sniping items based on ilvl. This also lets you search for items with specific item levels and leech, sockets, speed or avoidance.

To enable this set the env var DESIRED_ILVL with json similar to the following.

This example will snipe anything based on ilvl (just make sure all the stats are set to false for ilvl alone):

{
  "ilvl": 420,
  "buyout": 70000,
  "sockets": false,
  "speed": false,
  "leech": false,
  "avoidance": false,
  "item_ids": [204423, 204410]
}
image

This example looks for items with over an ilvl of 360 with a speed stat because "speed": true:

{
  "ilvl": 360,
  "buyout": 10000,
  "sockets": false,
  "speed": true,
  "leech": false,
  "avoidance": false,
  "item_ids": [204966, 204920]
}
image

If we change this and also set "sockets": true then it will show items over an ilvl of 360 with a speed stat or a socket:

{
  "ilvl": 360,
  "buyout": 10000,
  "sockets": true,
  "speed": true,
  "leech": false,
  "avoidance": false,
  "item_ids": [204948, 204951, 204965]
}
image

You can also remove the item_ids or leave it empty to snipe for all items at that ilvl:

{
  "ilvl": 360,
  "buyout": 10000,
  "sockets": false,
  "speed": false,
  "leech": false,
  "avoidance": false
}

About

License:Apache License 2.0


Languages

Language:Python 96.9%Language:Dockerfile 2.6%Language:Shell 0.4%