diff --git a/TODO.md b/TODO.md index 099a51d3..6c504ad1 100644 --- a/TODO.md +++ b/TODO.md @@ -24,6 +24,7 @@ - Spectator teams - Spectator teams sometimes stop receiving commands during live battles? - It may be possible to send spectators back to the waiting room after a non-tournament battle by sending 6xB4x05 with environment 0x19, then 6xB4x3B again; try this +- Add support for recording battles on the proxy server (both in primary and spectator teams) ## PSOBB diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 3548814a..ce0ea13e 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -625,6 +625,21 @@ static void server_command_playrec(shared_ptr c, const std::u16string& a } } +static void server_command_meseta(shared_ptr c, const std::u16string& args) { + check_is_ep3(c, true); + if (!c->options.debug) { + send_text_message(c, u"$C6This command can only\nbe run in debug mode\n(run %sdebug first)"); + return; + } + + uint32_t amount = stoul(encode_sjis(args), nullptr, 0); + c->license->ep3_current_meseta += amount; + c->license->ep3_total_meseta_earned += amount; + c->license->save(); + send_ep3_rank_update(c); + send_text_message_printf(c, "You now have\n$C6%" PRIu32 "$C7 Meseta", c->license->ep3_current_meseta); +} + //////////////////////////////////////////////////////////////////////////////// // Game commands @@ -1528,6 +1543,7 @@ static const unordered_map chat_commands({ {u"$ln", {server_command_lobby_type, proxy_command_lobby_type}}, {u"$ep3battledebug", {server_command_enable_ep3_battle_debug_menu, nullptr}}, {u"$maxlevel", {server_command_max_level, nullptr}}, + {u"$meseta", {server_command_meseta, nullptr}}, {u"$minlevel", {server_command_min_level, nullptr}}, {u"$next", {server_command_next, proxy_command_next}}, {u"$password", {server_command_password, nullptr}}, diff --git a/system/config.example.json b/system/config.example.json index f84f1808..f0fa0cbe 100644 --- a/system/config.example.json +++ b/system/config.example.json @@ -295,8 +295,10 @@ // Winning the final round is worth this much extra Meseta. "Episode3FinalRoundMesetaBonus": 300, // If this option is enabled, the jukebox in Episode 3 lobbies does not deduct - // any Meseta when a song is played. The player must still have at least 100 - // Meseta to play a song, however. + // any Meseta when a song is played. The check for 100 or more meseta happens + // client-side, however, so even if this option is enabled, the client must + // either have 100 or more Meseta or use the "Jukebox is free" Action Replay + // code to be able to play songs. "Episode3JukeboxIsFree": false, // Episode 3 battle behavior flags. When set to zero, battles behave as they