Bots: console self-tests for fixes that needed a player

New `.playerbot selftest` commands (Commands/cs_selftest.cpp) drive an online
character, a world bot is fine, through the same server code a client reaches
and print PASS/FAIL lines a script can grep:

- quest <name> <quest> [add|accept <npc>|drop]: can it be taken, and which
  rule refuses it; gives it (start items too, or from an NPC so its accept
  script runs) and prints every objective with the bag count.
- explore <name> <quest>: moves the character into the quest's area trigger,
  then sends the client's area trigger message and reports the credit.
- explorelist: every exploration quest and whether its trigger exists.
- itemobjective <name> <quest> <item> [n]: collected quest items follow the
  bags when they are destroyed.
- npc <name> <entry> go|show|learn <spell>: the gossip menu a player gets
  (trainer, vendor, talk), goods and trainer spells; learn as the Train
  button does.
- path <name> <entry> x y z: a creature's path with floor and water under
  each point (land creatures walk on the sea bed).
- namegen <race> <sex> [n]: what the name dice gets.
- cast <name> <spell>, auras <name> [spell]: put down a bag or trap, read
  resting and auras.

New file: needs a cmake reconfigure.
This commit is contained in:
Karrz1
2026-11-12 14:36:48 +00:00
parent 5f140f6cf0
commit 68e116f392
3 changed files with 564 additions and 0 deletions
@@ -31,6 +31,7 @@
#include <algorithm>
void AddSC_playerbot_v2_commandscript();
void AddSC_playerbot_v2_selftest_commandscript();
namespace
{
@@ -440,6 +441,7 @@ void AddSC_playerbot_v2()
new playerbot_v2_group();
new playerbot_v2_guild();
AddSC_playerbot_v2_commandscript();
AddSC_playerbot_v2_selftest_commandscript();
PathGenerator::SetLiquidRouteCheck(&BotPathTouchesAvoidedLiquid);
}