mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-24 03:00:13 +01:00
Added %log% command, and made capitalization up to the builders discretion in various trigedit messages. (#35)
* Added %log%, and made %send%, %echo%, etc. not force capitalization. * Fixed Previous Commit * Really fixed this time.
This commit is contained in:
parent
512fd64d65
commit
023348b0a0
8 changed files with 51 additions and 3 deletions
|
|
@ -113,7 +113,6 @@ static void sub_write_to_char(char_data *ch, char *tokens[], void *otokens[], ch
|
|||
|
||||
strcat(sb,tokens[i]);
|
||||
strcat(sb,"\n\r");
|
||||
sb[0] = toupper(sb[0]);
|
||||
send_to_char(ch, "%s", sb);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -282,6 +282,28 @@ ACMD(do_mecho)
|
|||
sub_write(p, ch, TRUE, TO_CHAR);
|
||||
}
|
||||
|
||||
ACMD(do_mlog)
|
||||
{
|
||||
char *p;
|
||||
|
||||
if (!MOB_OR_IMPL(ch)) {
|
||||
send_to_char(ch, "%s", CONFIG_HUH);
|
||||
return;
|
||||
}
|
||||
|
||||
if (AFF_FLAGGED(ch, AFF_CHARM))
|
||||
return;
|
||||
|
||||
if (!*argument)
|
||||
return;
|
||||
|
||||
p = argument;
|
||||
skip_spaces(&p);
|
||||
|
||||
mob_log(ch, p);
|
||||
|
||||
}
|
||||
|
||||
ACMD(do_mzoneecho)
|
||||
{
|
||||
int zone;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ static OCMD(do_odoor);
|
|||
static OCMD(do_osetval);
|
||||
static OCMD(do_oat);
|
||||
static OCMD(do_omove);
|
||||
static OCMD(do_olog);
|
||||
|
||||
struct obj_command_info {
|
||||
char *command;
|
||||
|
|
@ -154,6 +155,14 @@ static OCMD(do_oecho)
|
|||
obj_log(obj, "oecho called by object in NOWHERE");
|
||||
}
|
||||
|
||||
static OCMD(do_olog)
|
||||
{
|
||||
skip_spaces(&argument);
|
||||
|
||||
if (*argument)
|
||||
obj_log(obj, argument);
|
||||
}
|
||||
|
||||
static OCMD(do_oforce)
|
||||
{
|
||||
char_data *ch, *next_ch;
|
||||
|
|
@ -805,6 +814,7 @@ static const struct obj_command_info obj_cmd_info[] = {
|
|||
{ "otransform " , do_otransform, 0 },
|
||||
{ "ozoneecho " , do_ozoneecho , 0 }, /* fix by Rumble */
|
||||
{ "omove " , do_omove , 0 },
|
||||
{ "olog " , do_olog , 0 },
|
||||
{ "\n", 0, 0 } /* this must be last */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -377,11 +377,11 @@ static const char *syntax_color_replacement[SYNTAX_TERMS][2] =
|
|||
};
|
||||
|
||||
// Here you can include more commands usually used in your triggers
|
||||
#define COMMAND_TERMS 35
|
||||
#define COMMAND_TERMS 36
|
||||
static const char *command_color_replacement[COMMAND_TERMS][2] =
|
||||
{
|
||||
// Mob specific commands (25)
|
||||
{ "marena", "\tcmarena\tn" }, // 0
|
||||
{ "mlog", "\tcmlog\tn" }, // 0
|
||||
{ "masound", "\tcmasound\tn" },
|
||||
{ "mkill", "\tcmkill\tn" },
|
||||
{ "mjunk", "\tcmjunk\tn" },
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ ACMD(do_msend);
|
|||
ACMD(do_mteleport);
|
||||
ACMD(do_mtransform);
|
||||
ACMD(do_mzoneecho);
|
||||
ACMD(do_mlog);
|
||||
|
||||
/* from dg_olc.c... thinking these should be moved to oasis.h */
|
||||
void trigedit_save(struct descriptor_data *d);
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
char *name;
|
||||
int num, count, i, j, doors;
|
||||
|
||||
char *log_cmd[] = {"mlog ", "olog ", "wlog " };
|
||||
char *send_cmd[] = {"msend ", "osend ", "wsend " };
|
||||
char *echo_cmd[] = {"mecho ", "oecho ", "wecho " };
|
||||
char *echoaround_cmd[] = {"mechoaround ", "oechoaround ", "wechoaround "};
|
||||
|
|
@ -343,6 +344,8 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
snprintf(str, slen, "%s", recho[type]);
|
||||
else if (!str_cmp(var, "move"))
|
||||
snprintf(str, slen, "%s", omove[type]);
|
||||
else if (!str_cmp(var, "log"))
|
||||
snprintf(str, slen, "%s", log_cmd[type]);
|
||||
else
|
||||
*str = '\0';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ WCMD(do_wload);
|
|||
WCMD(do_wdamage);
|
||||
WCMD(do_wat);
|
||||
WCMD(do_wmove);
|
||||
WCMD(do_wlog);
|
||||
|
||||
|
||||
/* attaches room vnum to msg and sends it to script_log */
|
||||
|
|
@ -114,6 +115,16 @@ WCMD(do_wecho)
|
|||
act_to_room(argument, room);
|
||||
}
|
||||
|
||||
WCMD(do_wlog)
|
||||
{
|
||||
skip_spaces(&argument);
|
||||
|
||||
if (!*argument)
|
||||
return;
|
||||
|
||||
wld_log(room, argument);
|
||||
}
|
||||
|
||||
WCMD(do_wsend)
|
||||
{
|
||||
char buf[MAX_INPUT_LENGTH], *msg;
|
||||
|
|
@ -624,6 +635,7 @@ static const struct wld_command_info wld_cmd_info[] = {
|
|||
{ "wdamage " , do_wdamage, 0 },
|
||||
{ "wat " , do_wat, 0 },
|
||||
{ "wmove " , do_wmove , 0 },
|
||||
{ "wlog" , do_wlog , 0 },
|
||||
{ "\n", 0, 0 } /* this must be last */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ static const struct mob_script_command_t mob_script_commands[] = {
|
|||
{ "mtransform", do_mtransform , 0 },
|
||||
{ "mzoneecho", do_mzoneecho, 0 },
|
||||
{ "mfollow" , do_mfollow , 0 },
|
||||
{ "mlog" , do_mlog , 0 },
|
||||
{ "\n" , do_not_here , 0 } };
|
||||
|
||||
int script_command_interpreter(struct char_data *ch, char *arg) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue