summaryrefslogtreecommitdiff
path: root/player.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-19 01:45:30 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-19 01:45:30 -0300
commitdde4f5e8b31e2f59aabab0e1e69ae972b713ae54 (patch)
treeb7aa74253546ded89a1efc47e78feafd47ff5bb3 /player.py
parent65c5e82447405ee6544ecfddaf65d340196281bd (diff)
downloadserver-dde4f5e8b31e2f59aabab0e1e69ae972b713ae54.tar.gz
server-dde4f5e8b31e2f59aabab0e1e69ae972b713ae54.tar.bz2
server-dde4f5e8b31e2f59aabab0e1e69ae972b713ae54.tar.xz
server-dde4f5e8b31e2f59aabab0e1e69ae972b713ae54.zip
Bump experience - again.
EXP is now ruled by a table. It is starting to get annoying the number of JSON files we have. Too many files to request
Diffstat (limited to 'player.py')
-rw-r--r--player.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/player.py b/player.py
index 9fda1bc..30243d1 100644
--- a/player.py
+++ b/player.py
@@ -19,12 +19,13 @@
# Player Module (parties, inventory, and player data)
from utils import (stdout, dl_search, allunits, date_from_sql, date_from_now,
- now, compress, Player, ApTimer)
+ now, compress, Player, ApTimer, expbar)
from consts import (SQL_DELAY, SQL_SAVE_TIME, MAX_INV_SIZE, AP_REGEN_TIME_F,
Job_Swordsman, Job_Mage, Job_Assassin, Job_Archer, Job_Gunner, SQL_CLEAR,
ERR_LOGIN, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY,
ERR_BAD, ERR_OFF, ERR_ERR, CLIENTVERSION, UNSELLABLE, DOUBLE_GP, EXP_UP,
- ERR_DONE, ERR_OK, MAX_PARTIES, NO_PARTY, SUPEREVOMAT, EVO_MAT, AP_REGEN_TIME)
+ ERR_DONE, ERR_OK, MAX_PARTIES, NO_PARTY, SUPEREVOMAT, EVO_MAT, AP_REGEN_TIME,
+ INT_MAX)
import sql
import json, re #,time
from copy import copy
@@ -212,14 +213,11 @@ def clear(token, mask=SQL_CLEAR):
return
def exp_to_lvlup(level):
- # How much exp to rank up?
- nmult=50.0
- nmult+=level/35.0
- nmult+=level/10.0
- nmult+=level/6.0
- nmult+=level/2.0
- nmult=nmult**1.01
- next_exp=int(level*nmult)
+ try:
+ next_exp=expbar[level]
+ except:
+ stdout("Level %d is out of bounds" % (level))
+ next_exp=INT_MAX
#stdout("nmult is %.2f, exp needed: %d" % (nmult, next_exp))
return next_exp