mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-21 15:04:07 +01:00
[Jun 11 2008] - Rumble
Added notification via prompt for new MOTD and news entries. (thanks Jamdog) Added all option to the restore command. (thanks Jamdog) Added new trigger variable hasattached. (thanks Fizban)
This commit is contained in:
parent
c486097e81
commit
cfe59d3e04
14 changed files with 169 additions and 7 deletions
|
|
@ -669,6 +669,14 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
else
|
||||
snprintf(str, slen, "%d", char_has_item(subfield, c));
|
||||
}
|
||||
else if (!str_cmp(field, "hasattached")) {
|
||||
if (!(subfield && *subfield) || !IS_NPC(c))
|
||||
*str = '\0';
|
||||
else {
|
||||
i = atoi(subfield);
|
||||
snprintf(str, slen, "%d", trig_is_attached(SCRIPT(c), i));
|
||||
}
|
||||
}
|
||||
else if (!str_cmp(field, "hisher"))
|
||||
snprintf(str, slen, "%s", HSHR(c));
|
||||
|
||||
|
|
@ -1118,6 +1126,14 @@ o->contains) ? "1" : "0"));
|
|||
else
|
||||
strcpy(str, "0");
|
||||
}
|
||||
else if (!str_cmp(field, "hasattached")) {
|
||||
if (!(subfield && *subfield))
|
||||
*str = '\0';
|
||||
else {
|
||||
i = atoi(subfield);
|
||||
snprintf(str, slen, "%d", trig_is_attached(SCRIPT(o), i));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
if (!str_cmp(field, "id"))
|
||||
|
|
@ -1309,6 +1325,14 @@ o->contains) ? "1" : "0"));
|
|||
else
|
||||
*str = '\0';
|
||||
}
|
||||
else if (!str_cmp(field, "hasattached")) {
|
||||
if (!(subfield && *subfield))
|
||||
*str = '\0';
|
||||
else {
|
||||
i = atoi(subfield);
|
||||
snprintf(str, slen, "%d", trig_is_attached(SCRIPT(r), i));
|
||||
}
|
||||
}
|
||||
else if (!str_cmp(field, "zonenumber"))
|
||||
snprintf(str, slen, "%d", zone_table[r->zone].number);
|
||||
else if (!str_cmp(field, "zonename"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue