Skip to content

Commit

Permalink
Merge pull request #1 from Pazdikan/refactor-to-multiple-files
Browse files Browse the repository at this point in the history
Refactor to multiple files and rewrite readme
  • Loading branch information
Pazdikan authored Sep 17, 2024
2 parents f3f6545 + fff1717 commit b536aa0
Show file tree
Hide file tree
Showing 11 changed files with 321 additions and 238 deletions.
66 changes: 51 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
> [!WARNING]
> This script is designed for 1920x1080 display. If you are using a higher resolution display please set it to 1920x1080 in windows' display settings.
# AFK Script for Dead by Daylight

This script is designed to automatically farm XP and a few bloodpoints while avoiding detection:

- **Anti-AFK Proof**: Ensures consistent actions to prevent AFK kicks.
- **Banner-Proof**: Handles cases where survivors disconnect during loading screens.
- **Killer Behaviors**: Implements various killer strategies to maximize bloodpoints gain.
- **XP Gain**: Achieves up to 4000 XP per hour (excluding queue times).
- **Configurable Settings**: Includes settings for customization (more to come).
- **Testing Results**: Tested for 5 hours, yielding ~11,000 XP (queue times took half of that).




## Statistics

(still gathering)

| | Per game | Per hour (in-game) |
|-------------------------|----------|--------------------|
| XP (ex. 1st game bonus) | | |
| Bloodpoints as OTHER | | |
| Bloodpoints as TRAPPER | | |


## Behaviors

All killers follow a basic movement pattern by moving back and forth. This helps bypass the anti-AFK system introduced by BHVR, which disconnects you from the game if no movement is detected. You can still interact with survivors (e.g., hit them), but without any movement, after the game ends you'll be treated like you disconnected (no xp, and matchmaking ban).


| Killer | Actions |
|---------|--------------------------------|
| TRAPPER | - Placing and picking up traps |

# An AFK Script for Dead by Daylight

## Setup

> [!WARNING]
> This script is designed for 1920x1080 display. If you are using a higher resolution display please set it to 1920x1080 in windows' display settings.
1. Download and unpack this repository
2. Install python 3.11+
3. Install python requirements (setup.bat, first time only):
Expand All @@ -15,18 +49,20 @@ pip install -r requirements.txt
python run.py
```

## Features
- [X] Queueing
- [X] Attacking
- [X] Random Movement
- [X] Statistics
- [X] Different behaviour for different killers (for bloodpoints)
- [ ] Settings (ui + saving)

## Settings

You can configure the script's behavior in the `src/config.py` file.

| Variable | Description | Values |
|-------------|----------------------------------------------------------|----------------|
| killer | Select the killer you're using (with custom behavior) | OTHER, TRAPPER |
| xp_limit | Script will exit after gaining this much XP | 0 to disable |
| games_limit | Script will exit after playing this many games | 0 to disable |


## Bans

# Behaviors
All killers walk forward-backward and attack. Some time ago BHVR added an anti-afk system which make you "DC" after the game (so you won't get xp and bloodpoints). You can even hit survivors, but if you didn't move an inch you will get kicked.
There's no widespread evidence of players getting banned for AFK farming. Survivors often benefit from it as well (through healing, totems, etc.).

| Killer | Actions |
|-|-|
| <img src=".github/TheTrapper.webp" alt="drawing" width="150"/> | - Placing and picking up traps<br>
However, **I am not responsible for any bans** that may occur.
221 changes: 0 additions & 221 deletions run.py

This file was deleted.

29 changes: 29 additions & 0 deletions src/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from time import time
from enum import Enum

# THIS IS NOT THE CONFIGURATION YOU ARE LOOKING FOR
# SCROLL DOWN TO FIND THE CONFIGURATION FOR USERS

ss = None

State = Enum('State', ['INGAME', 'INLOBBY', 'INQUEUE'])
Killer = Enum('Killer', ['OTHER', "TRAPPER"])

current_state = State.INLOBBY

games = 0
xp = 0
total_time_in_game = 0

script_start_time = time()
game_started_at = None

# CONFIGURATION FOR USERS
# EDITING STUFF BETWEEN COMMENTS BELOW IS SAFE AND WILL NOT BREAK THE SCRIPT

killer = Killer.TRAPPER # From the list above

xp_limit = 0 # SET TO 0 TO DISABLE
games_limit = 0 # SET TO 0 TO DISABLE

# END OF CONFIGURATION
17 changes: 17 additions & 0 deletions src/core/behavior.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import config
from random import randint

import killer.universal as universal
import killer.trapper as trapper

def perform_ingame_action():
if (config.killer == config.Killer.OTHER):
universal.walk_and_attack()

elif (config.killer == config.Killer.TRAPPER):
random_action = randint(0, 5)

if random_action == 0:
universal.walk_and_attack()
else:
trapper.place_and_pick_trap()
Loading

0 comments on commit b536aa0

Please sign in to comment.