Skip to content
Menu
Adventures in Game Design
  • MUDs
  • Tabletop
  • Community
Adventures in Game Design
Dragon Horde

Snippet – Adding Bank Balance to Worth

Posted on 2019-02-132019-02-20

In the stock DOT codebase, if a player types WORTH the game does not include the player’s bank balance in the displayed information. Here’s how to add it to your game:

act_info.cpp

In void do_worth BELOW this piece of code:

if (IS_NPC(ch))
{
ch->printlnf( "You have %ld gold and %ld silver.",
ch->gold,ch->silver);
return;
}

add this:

if(ch->bank){
ch->printlnf( "Bank Account:  %ld", ch->bank);}

Never miss an update!

Subscribe to Adventures in Game Design

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2021 Adventures in Game Design | Powered by WordPress and Superb Themes!