Hi Apoc, it's me again lol
The value of HAPPY_TIME represents the number of ticks left in the happy bonus.
So, all you have to do, is print only that value in show_happyhour() in act.other.c. Something like this:
Code:
static void show_happyhour(struct char_data *ch)
{
char happyexp[80], happygold[80], happyqp[80], happydmg[80];
if ((IS_HAPPYHOUR) || (GET_LEVEL(ch) >= LVL_GRGOD))
{
sprintf(happyqp, "%s+%d%%%s to Questpoints per quest\r\n", CCYEL(ch, C_NRM), HAPPY_QP, CCNRM(ch, C_NRM));
sprintf(happygold, "%s+%d%%%s to Gold gained per kill\r\n", CCYEL(ch, C_NRM), HAPPY_GOLD, CCNRM(ch, C_NRM));
sprintf(happyexp, "%s+%d%%%s to Experience per kill\r\n", CCYEL(ch, C_NRM), HAPPY_EXP, CCNRM(ch, C_NRM));
sprintf(happydmg, "%s+%d%%%s to Damage\r\n", CCYEL(ch, C_NRM), HAPPY_DMG, CCNRM(ch, C_NRM));
send_to_char(ch, "tbaMUD Happy Hour!\r\n"
"------------------\r\n"
"%s%s%s%sTime Remaining: %d ticks left.\r\n",
(IS_HAPPYEXP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyexp : "",
(IS_HAPPYGOLD || (GET_LEVEL(ch) >= LVL_GOD)) ? happygold : "",
(IS_HAPPYQP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyqp : "",
(IS_HAPPYDMG || (GET_LEVEL(ch) >= LVL_GOD)) ? happydmg: "",
HAPPY_TIME);
}
else
{
send_to_char(ch, "Sorry, there is currently no happy hour!\r\n");
}
}
If you wish to include both then it could be something like this:
Code:
static void show_happyhour(struct char_data *ch)
{
char happyexp[80], happygold[80], happyqp[80], happydmg[80];
int secs_left;
if ((IS_HAPPYHOUR) || (GET_LEVEL(ch) >= LVL_GRGOD))
{
if (HAPPY_TIME)
secs_left = ((HAPPY_TIME - 1) * SECS_PER_MUD_HOUR) + next_tick;
else
secs_left = 0;
sprintf(happyqp, "%s+%d%%%s to Questpoints per quest\r\n", CCYEL(ch, C_NRM), HAPPY_QP, CCNRM(ch, C_NRM));
sprintf(happygold, "%s+%d%%%s to Gold gained per kill\r\n", CCYEL(ch, C_NRM), HAPPY_GOLD, CCNRM(ch, C_NRM));
sprintf(happyexp, "%s+%d%%%s to Experience per kill\r\n", CCYEL(ch, C_NRM), HAPPY_EXP, CCNRM(ch, C_NRM));
sprintf(happydmg, "%s+%d%%%s to Damage\r\n", CCYEL(ch, C_NRM), HAPPY_DMG, CCNRM(ch, C_NRM));
send_to_char(ch, "tbaMUD Happy Hour!\r\n"
"------------------\r\n"
"%s%s%s%sTime Remaining: %s%d%s hours %s%d%s mins %s%d%s secs (%d ticks)\r\n",
(IS_HAPPYEXP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyexp : "",
(IS_HAPPYGOLD || (GET_LEVEL(ch) >= LVL_GOD)) ? happygold : "",
(IS_HAPPYQP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyqp : "",
(IS_HAPPYDMG || (GET_LEVEL(ch) >= LVL_GOD)) ? happydmg: "",
CCYEL(ch, C_NRM), (secs_left / 3600), CCNRM(ch, C_NRM),
CCYEL(ch, C_NRM), (secs_left % 3600) / 60, CCNRM(ch, C_NRM),
CCYEL(ch, C_NRM), (secs_left % 60), CCNRM(ch, C_NRM),
HAPPY_TIME);
}
else
{
send_to_char(ch, "Sorry, there is currently no happy hour!\r\n");
}
}
Both examples have a blatant disregard for color or formatting whatsoever, so sorry about that hehe
Also, in both examples you'll still see the message "Happy Hour Time set to 20 ticks (0 hours 25 mins and 0 secs)" when you turn happy hour on. Not sure if you also wanted to change that, so I'll wait.