-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
70 lines (57 loc) · 2.04 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from datetime import timedelta
class Config(object):
ADMIN_UIDS = [613732]
# https://web.simple-mmo.com/town-hall/stats
# NOTE: ALWAYS ROUND DOWN
NUM_PLAYERS = 615000
PVP_RANGES = [5, 30, 100, 100, 200]
# Generate one with os.urandom(24).hex()
SECRET_KEY = "secret-key"
SQLALCHEMY_ECHO = False
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://" + "smmo:smmo@localhost" + "/data"
SQLALCHEMY_TRACK_MODIFICATIONS = False
PROPAGATE_EXCEPTIONS = True
# used to query levels and authentication
SMMO_SERVER_API_KEY = "api-key"
# if True, performing a query reduces balance
ENFORCE_BALANCE = True
QUERY_BALANCE_COST = 2
# duration required for task assignment to be considered obsolete
CLEAN_TASKS_DELTA = timedelta(minutes=5)
LOGIN_REQUEST_MOTTO_LENGTH = 6
LOGIN_REQUEST_DELTA = timedelta(minutes=5)
HIT_URL = "https://web.simple-mmo.com/user/attack/"
# Time after hit when pending task should be scheduled
HIT_REFRESH_DELTA = timedelta(minutes=2)
# login expiry (set to False for no delta)
LOGIN_DELTA = False
BYPASS_MOTTO_CHECK = False
MAX_BATCH_SIZE = 60
# number of guilds
MAX_JOB_GUILDS = 20
MAX_QUERY_RESULTS = 50
# % of mining tasks allocated to unregistered uids
NEW_MINING_RATIO = 0.8
RANDOMIZE_NEW_MINING = True
RANDOMIZE_OLD_MINING = True
# cache future mining results
MINING_BUFFER = 400
# enable simultaneous mining in several tabs
MULTIPLE_MINING = True
# required time to halve additional weight
DECAY_TIME = timedelta(weeks=1)
BASE_WEIGHT = 1.0
AGE_FACTOR = timedelta(weeks=4)
# create a new task for a player when processed (when health < 0.5)
REFRESH_PLAYER = True
NUM_LEADERBOARD = 20
CLIENT_CONFIG = {
"BATCH_SIZE": 10,
"SMMO_DELAY": (60 / 38) * 1000,
"API_DELAY": 1000,
"AJAX_TIMEOUT": 30000,
# for access_token and form settings
"COOKIE_EXPIRY": 365,
# for SearchListener UserScript
"AUTO_SEARCH_DELAY": 300000,
}