[Jul 03 2008] - Rumble

Fixed lib/messages to properly display skill, spell, and damage messages. (thanks T
ink)
[Jun 28 2008] - Rumble
  Added player ability to cancel queued commands. i.e. player spammed kick while figh
ting but needs to flee so they type '--' to cancel so they can flee. (thanks Jamdog)
This commit is contained in:
Rumble 2008-07-02 22:55:56 +00:00
parent 66d4a9d3eb
commit 2053b2d4a8
8 changed files with 81 additions and 80 deletions

View file

@ -1963,6 +1963,14 @@ static int process_input(struct descriptor_data *t)
t->history_pos = 0;
}
/* The '--' command flushes the queue. */
if ( (*tmp == '-') && (*(tmp+1) == '-') && !(*(tmp+2)) )
{
write_to_output(t, "All queued commands cancelled.\r\n");
flush_queues(t); /* Flush the command queue */
return (1); /* No need to process the -- command any further, so quit back out */
}
if (!failed_subst)
write_to_q(tmp, &t->input, 0);

View file

@ -854,7 +854,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%d", GET_PRACTICES(c));
}
else if (!str_cmp(field, "pref")) {
else if (!str_cmp(field, "pref") && IS_NPC(c)) {
if (subfield && *subfield) {
int pref = get_flag_by_name(preference_bits, subfield);
if (pref != NOFLAG && PRF_FLAGGED(c, pref))

View file

@ -69,7 +69,7 @@ void perform_mob_level_list(struct char_data * ch, char *arg)
mob_level = atoi(arg);
if (mob_level < 0 || mob_level >= LVL_IMMORT) {
if (mob_level < 0 || mob_level > 99) {
send_to_char(ch, "Invalid mob level!\r\n");
return;
}