Skip to content
Permalink
Browse files
Initial release of the Achievement System (#2044)
* Information based on kRO patch notes.
- http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1
* Includes Title System which is integrated into the Achievement System.
* Includes RODEX integration for rewards.
* Added new atcommand reloadachievementdb.
* Added new script commands achievementinfo, achievementadd, achievementremove, achievementcomplete, and achievementexists.
Thanks to @Lux-uri, @RagnarokNova, @Lemongrass3110, and @Tokeiburu for their help!
  • Loading branch information
aleos89 committed Jul 27, 2017
1 parent 433490a commit 7f5411da072c5ed6b1fca54c076b5b9434a623f4
Showing with 8,032 additions and 55 deletions.
  1. +4 −2 .travis.yml
  2. +2 −2 3rdparty/yaml-cpp/src/contrib/graphbuilderadapter.h
  3. +4 −4 3rdparty/yaml-cpp/src/singledocparser.cpp
  4. +3 −3 Makefile.in
  5. +4 −0 conf/battle/feature.conf
  6. +5 −0 conf/msg_conf/char_msg.conf
  7. +7 −1 conf/msg_conf/map_msg.conf
  8. +78 −0 db/import-tmpl/achievement_db.yml
  9. +2,407 −0 db/pre-re/achievement_db.yml
  10. +2,407 −0 db/re/achievement_db.yml
  11. +1 −1 db/re/item_db.txt
  12. +102 −0 doc/achievements.txt
  13. +4 −1 doc/atcommands.txt
  14. +21 −0 doc/packet_interserv.txt
  15. +66 −0 doc/script_commands.txt
  16. +278 −0 npc/re/other/achievements.txt
  17. +1 −0 npc/re/scripts_athena.conf
  18. +24 −0 sql-files/main.sql
  19. +25 −0 sql-files/upgrades/upgrade_20170407.sql
  20. +2 −0 src/char/char-server.vcxproj
  21. +6 −0 src/char/char-server.vcxproj.filters
  22. +22 −7 src/char/char.cpp
  23. +1 −0 src/char/char.h
  24. +344 −0 src/char/int_achievement.c
  25. +9 −0 src/char/int_achievement.h
  26. +6 −2 src/char/int_mail.c
  27. +1 −1 src/char/int_mail.h
  28. +3 −1 src/char/inter.c
  29. +20 −10 src/common/Makefile.in
  30. +6 −0 src/common/core.cpp
  31. +16 −0 src/common/mmo.h
  32. +10 −0 src/common/sql.c
  33. +7 −0 src/common/sql.h
  34. +57 −5 src/common/yamlwrapper.cpp
  35. +7 −1 src/common/yamlwrapper.h
  36. +15 −6 src/map/Makefile.in
  37. +1,268 −0 src/map/achievement.c
  38. +135 −0 src/map/achievement.h
  39. +9 −0 src/map/atcommand.c
  40. +8 −0 src/map/battle.c
  41. +1 −0 src/map/battle.h
  42. +9 −0 src/map/chat.c
  43. +2 −0 src/map/chrif.c
  44. +183 −1 src/map/clif.c
  45. +7 −0 src/map/clif.h
  46. +2 −2 src/map/clif_packetdb.h
  47. +161 −1 src/map/intif.c
  48. +6 −0 src/map/intif.h
  49. +3 −0 src/map/map-server.vcxproj
  50. +6 −0 src/map/map-server.vcxproj.filters
  51. +3 −4 src/map/map.cpp
  52. +4 −0 src/map/mob.c
  53. +3 −0 src/map/party.c
  54. +30 −0 src/map/pc.c
  55. +15 −0 src/map/pc.h
  56. +2 −0 src/map/pet.c
  57. +146 −0 src/map/script.c
  58. +2 −0 src/map/script.h
  59. +43 −0 src/map/script_constants.h
  60. +3 −0 src/map/skill.c
  61. +4 −0 src/map/unit.c
  62. +2 −0 src/map/vending.c
@@ -27,8 +27,10 @@ before_script:
- mysql -u $DB_ROOT -e "GRANT ALL ON *.* TO '$DB_USER'@'$DB_HOST' IDENTIFIED BY '$DB_PASS';"
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -q
- sudo apt-get install gcc-4.8 -y
- sudo apt-get install g++-4.8 -y
- sudo apt-get install gcc-5 -y
- sudo apt-get install g++-5 -y
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1

script:
- ./configure $CONFIGURE_FLAGS
@@ -50,8 +50,8 @@ class GraphBuilderAdapter : public EventHandler {
struct ContainerFrame {
ContainerFrame(void* pSequence)
: pContainer(pSequence), pPrevKeyNode(&sequenceMarker) {}
ContainerFrame(void* pMap, void* pPrevKeyNode)
: pContainer(pMap), pPrevKeyNode(pPrevKeyNode) {}
ContainerFrame(void* pMap, void* pPrevKeyNode_)
: pContainer(pMap), pPrevKeyNode(pPrevKeyNode_) {}

void* pContainer;
void* pPrevKeyNode;
@@ -166,10 +166,10 @@ void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {

// check for null
if (!m_scanner.empty()) {
const Token& token = m_scanner.peek();
if (token.type == Token::BLOCK_ENTRY ||
token.type == Token::BLOCK_SEQ_END) {
eventHandler.OnNull(token.mark, NullAnchor);
const Token& token_ = m_scanner.peek();
if (token_.type == Token::BLOCK_ENTRY ||
token_.type == Token::BLOCK_SEQ_END) {
eventHandler.OnNull(token_.mark, NullAnchor);
continue;
}
}
@@ -5,10 +5,10 @@ OMAP=@OMAP@
ifeq ($(HAVE_MYSQL),yes)
ALL_DEPENDS=server tools
SERVER_DEPENDS=common login char map import
COMMON_DEPENDS=mt19937ar libconfig
COMMON_DEPENDS=mt19937ar libconfig yaml-cpp
LOGIN_DEPENDS=mt19937ar libconfig common
CHAR_DEPENDS=mt19937ar libconfig common
MAP_DEPENDS=mt19937ar libconfig common
MAP_DEPENDS=mt19937ar libconfig common yaml-cpp
else
ALL_DEPENDS=needs_mysql
SERVER_DEPENDS=needs_mysql
@@ -93,7 +93,7 @@ help:
@echo "'common' - builds object files used for the three servers"
@echo "'mt19937ar' - builds object file of Mersenne Twister MT19937"
@echo "'libconfig' - builds object files of libconfig"
@echo "'libconfig' - builds object files of yaml-cpp"
@echo "'yaml-cpp' - builds object files of yaml-cpp"
@echo "'login' - builds login server"
@echo "'char' - builds char server"
@echo "'map' - builds map server"
@@ -63,3 +63,7 @@ feature.autotrade_open_delay: 5000
// Requires: 2014-10-22bRagexe or later
// Off by default while test version is out; enable at your own risk.
feature.roulette: off

// Achievement (Note 1)
// Requires: 2015-05-13aRagexe or later
feature.achievement: on
@@ -157,3 +157,8 @@
224: -- Character Details --
225: [Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s
226: This account doesn't have characters.

// Achievements
227: GM
228: Achievement Reward Mail
229: [%s] Achievement Reward.
@@ -825,7 +825,13 @@
769: %s %s has been banned.
770: %s %s has been unbanned.

//771-899 free
//@reloadachievementdb
771: Achievement database has been reloaded.

// Achievements
772: Achievements are disabled.

//773-899 free

//------------------------------------
// More atcommands message
@@ -0,0 +1,78 @@
# This file is a part of rAthena.
# Copyright(C) 2017 rAthena Development Team
# https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Custom Achievement Database
###########################################################################
#
# Achievement Settings
#
###########################################################################
# Id - Unique achievement ID.
###########################################################################
# Group - Achievement group type. Each achievement type calls a specific
# objective check.
# Valid groups:
# AG_ADD_FRIEND
# AG_ADVENTURE
# AG_BABY
# AG_BATTLE
# AG_CHATTING
# AG_CHATTING_COUNT
# AG_CHATTING_CREATE
# AG_CHATTING_DYING
# AG_EAT
# AG_GET_ITEM
# AG_GET_ZENY
# AG_GOAL_ACHIEVE
# AG_GOAL_LEVEL
# AG_GOAL_STATUS
# AG_HEAR
# AG_JOB_CHANGE
# AG_MARRY
# AG_PARTY
# AG_ENCHANT_FAIL
# AG_ENCHANT_SUCCESS
# AG_SEE
# AG_SPEND_ZENY
# AG_TAMING
###########################################################################
# Name - Achievement name. Used when sending rewards through RODEX.
###########################################################################
# Target - A list of monster ID and count values that the achievement
# requires. The target count can also be used for achievements that keep
# a counter while not being related to monster kills.
# Capped at MAX_ACHIEVEMENT_OBJECTIVES.
###########################################################################
# Condition - A conditional statement that must be met for the achievement
# to be considered complete.
###########################################################################
# Map - A map name that is used for the AG_CHATTING type which increments
# the counter based on the player's map.
###########################################################################
# Dependent: - A list of achievement IDs that need to be completed before
# this achievement is considered complete.
###########################################################################
# Reward - A list of rewards that are given on completion. All fields are
# optional.
# ItemId: Item ID
# Amount: Amount of Item ID (default 1)
# Script: Bonus Script
# TitleId: Title ID
###########################################################################
# Score - Achievement points that are given on completion.
###########################################################################

0 comments on commit 7f5411d

Please sign in to comment.