New character equipment and coin

This commit is contained in:
kinther 2025-12-24 14:07:50 -08:00
parent 7c23a93b7a
commit 448cb1f7a9
4 changed files with 70 additions and 6 deletions

View file

@ -451,9 +451,9 @@ wrapped in oil-soaked cloth.
1 20 0 0 0
#150
board rumor~
the Tyr rumor board~
the Caleran rumor board~
A board with rumors has been placed here.~
OOC: This is the rumor board for the city of Tyr. Treat it as if you are overhearing
OOC: This is the rumor board for the city of Caleran. Treat it as if you are overhearing
a rumor at the bar.
~
13 0 0 0 0 0 0 0 0 0 0 0 0

View file

@ -257,13 +257,13 @@ const char *MENU =
const char *WELC_MESSG =
"\r\n"
"Welcome to tbaMUD! May your visit here be... Enlightening"
"Welcome to Miranthas! May you live long and prosper here!\r\n"
"\r\n\r\n";
const char *START_MESSG =
"Welcome. This is your new tbaMUD character! You can now earn coins,\r\n"
"gain experience, find weapons and equipment, and much more -- while\r\n"
"meeting people from around the world!\r\n";
"Welcome. This is your new Miranthas character! The world is harsh and\r\n"
"unforgiving to those that are unprepared. Take your time to explore before\r\n"
"leaving the city gates!\r\n";
/* AUTOWIZ OPTIONS */
/* Should the game automatically create a new wizlist/immlist every time someone

View file

@ -1282,6 +1282,65 @@ int enter_player_game (struct descriptor_data *d)
/* Load inventory/equipment */
load_result = Crash_load(d->character);
{
static const struct {
obj_vnum vnum;
int wear_pos;
} starting_wear[] = {
{ 153, WEAR_BACK },
{ 165, WEAR_BODY },
{ 166, WEAR_LEGS },
{ 167, WEAR_FEET },
};
static const struct {
obj_vnum vnum;
int qty;
} starting_inv[] = {
{ 142, 3 },
{ 160, 1 },
{ 121, 1 },
};
int i;
int has_eq = 0;
if (GET_LEVEL(d->character) <= 1 && GET_EXP(d->character) <= 1 &&
d->character->carrying == NULL) {
for (i = 0; i < NUM_WEARS; i++) {
if (GET_EQ(d->character, i)) {
has_eq = 1;
break;
}
}
if (!has_eq) {
for (i = 0; i < (int)(sizeof(starting_wear) / sizeof(starting_wear[0])); i++) {
struct obj_data *obj = read_object(starting_wear[i].vnum, VIRTUAL);
if (!obj) {
log("SYSERR: enter_player_game: missing starting wear obj vnum %d",
starting_wear[i].vnum);
continue;
}
equip_char(d->character, obj, starting_wear[i].wear_pos);
}
for (i = 0; i < (int)(sizeof(starting_inv) / sizeof(starting_inv[0])); i++) {
int qty = starting_inv[i].qty;
while (qty-- > 0) {
struct obj_data *obj = read_object(starting_inv[i].vnum, VIRTUAL);
if (!obj) {
log("SYSERR: enter_player_game: missing starting inventory obj vnum %d",
starting_inv[i].vnum);
break;
}
obj_to_char(obj, d->character);
}
}
add_coins_to_char(d->character, rand_number(800, 1100));
}
}
}
/* DO NOT save here — avoids clobbering Room with NOWHERE on login. */
/* login_wtrigger can remain. */
login_wtrigger(&world[IN_ROOM(d->character)], d->character);

View file

@ -359,6 +359,11 @@ static void background_string_cleanup(struct descriptor_data *d, int action)
write_to_output(d, "Background entry canceled.\r\n");
else
write_to_output(d, "Background saved.\r\n");
save_char(d->character);
write_to_output(d, "%s\r\n*** PRESS RETURN: ", motd);
STATE(d) = CON_RMOTD;
return;
}
write_to_output(d, "%s", CONFIG_MENU);