diff options
author | smokexyz <sagunkho@hotmail.com> | 2018-06-30 04:20:03 +0100 |
---|---|---|
committer | Asheraf <acheraf1998@gmail.com> | 2018-07-24 21:41:20 +0100 |
commit | 19aa33a5f61f0996d76d19db7dbe9d81f5daa090 (patch) | |
tree | b54e07d42a58e34820e3131f750b56b7130cb461 /src/map/atcommand.c | |
parent | 78c75cade7f445231f11395a6faef9b0a55568dc (diff) | |
download | hercules-19aa33a5f61f0996d76d19db7dbe9d81f5daa090.tar.gz hercules-19aa33a5f61f0996d76d19db7dbe9d81f5daa090.tar.bz2 hercules-19aa33a5f61f0996d76d19db7dbe9d81f5daa090.tar.xz hercules-19aa33a5f61f0996d76d19db7dbe9d81f5daa090.zip |
Implementation of the official Achievement System.
Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1
Script Commands -
```
achievement_progress(<ach_id>,<obj_idx>,<progress>,<incremental?>{,<char_id>});
```
Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out.
This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules.
Does not include the title system yet.
A big thanks to -
@MishimaHaruna for constantly reviewing.
@4144 for all the support.
@Asheraf for a lot of official information.
Co-authored-by: "Dastgir" <dastgirp@gmail.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 79bd92213..6dff3f698 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -55,6 +55,7 @@ #include "map/storage.h" #include "map/trade.h" #include "map/unit.h" +#include "map/achievement.h" #include "common/cbasetypes.h" #include "common/conf.h" #include "common/core.h" @@ -1421,6 +1422,10 @@ ACMD(baselevelup) clif->updatestatus(sd, SP_BASEEXP); clif->updatestatus(sd, SP_NEXTBASEEXP); pc->baselevelchanged(sd); + + // achievements + achievement->validate_stats(sd, SP_BASELEVEL, sd->status.base_level); + if(sd->status.party_id) party->send_levelup(sd); @@ -2526,6 +2531,7 @@ ACMD(param) clif->updatestatus(sd, SP_USTR + i); status_calc_pc(sd, SCO_FORCE); clif->message(fd, msg_fd(fd,42)); // Stat changed. + achievement->validate_stats(sd, SP_STR + i, new_value); // Achievements [Smokexyz/Hercules] } else { if (value < 0) clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value. |