diff options
author | Wushin <pasekei@gmail.com> | 2015-04-20 19:43:52 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2015-04-20 19:43:52 -0500 |
commit | b5397537f0672892ce628e2d9398abfd1d6fa724 (patch) | |
tree | cf81c681a1b905610e401005998b24ef39ac55e2 /src/map/atcommand.cpp | |
parent | 07a9d90e699f613ec97273a741811123247b2029 (diff) | |
parent | 6de4da6e4aaf636b0047bc462628917ebeb344f3 (diff) | |
download | tmwa-b5397537f0672892ce628e2d9398abfd1d6fa724.tar.gz tmwa-b5397537f0672892ce628e2d9398abfd1d6fa724.tar.bz2 tmwa-b5397537f0672892ce628e2d9398abfd1d6fa724.tar.xz tmwa-b5397537f0672892ce628e2d9398abfd1d6fa724.zip |
Merge pull request #55 from wushin/Double-Xp-On-Demand
Enable Dynamic Double Xp
Diffstat (limited to 'src/map/atcommand.cpp')
-rw-r--r-- | src/map/atcommand.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index f226706..9a35d30 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -1586,6 +1586,25 @@ ATCE atcommand_pvpoff(Session *s, dumb_ptr<map_session_data> sd, } static +ATCE atcommand_exprate(Session *s, dumb_ptr<map_session_data>, + ZString message) +{ + int rate; + + if (!extract(message, &rate) || !rate) + { + clif_displaymessage(s, + "Please, enter a rate adjustement (usage: @exprate <percent>)."_s); + return ATCE::USAGE; + } + battle_config.base_exp_rate = rate; + battle_config.job_exp_rate = rate; + AString output = STRPRINTF("All Xp at %d percent"_fmt, rate); + clif_displaymessage(s, output); + return ATCE::OKAY; +} + +static ATCE atcommand_pvpon(Session *s, dumb_ptr<map_session_data> sd, ZString) { @@ -4982,6 +5001,9 @@ Map<XString, AtCommandInfo> atcommand_info = {"pvpoff"_s, {""_s, 60, atcommand_pvpoff, "Enable PvP on your map"_s}}, + {"exprate"_s, {"<percent>"_s, + 60, atcommand_exprate, + "Set base job/exp rate"_s}}, {"pvpon"_s, {""_s, 60, atcommand_pvpon, "Disable PvP on your map"_s}}, |