[Sep 25 2007] - Rumble
  Added set/not set to extra descriptions menu in oedit so a builder can tell if
  they exist or not without having to enter the extra desc menu or stat the object.
  Replaced [TRIG] flag (showvnum enabled) with [T<vnum>] to make things easier to stat.
[Sep 24 2007] - Rumble
  Added %is_pc% to return -1 for objects. (thanks Jamdog)
  Fixed do_gen_comm color bleed into last apostrophe in gossip/shout/grat/etc.
  Fixed bug where object keywords took precedence over door keywords. i.e. open door would try to open an object with keyword door. (thanks Trulight)
[Sep 23 2007] - Rumble
  Fixed minlev checks in do_grab, do_wield, and do_wear. (thanks Trulight)
  Added trigedit variables(modifiable) Hunger, Thirst, and Drunk.
[Sep 15 2007] - Rumble
  Fixed bug in unlimited drinks showing as empty. (thanks AaronGoulet)
This commit is contained in:
Rumble
2007-09-26 19:40:22 +00:00
parent 6c84a36236
commit 1f7a7b4182
25 changed files with 259 additions and 194 deletions

View File

@@ -604,6 +604,13 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%d", GET_DEX(c));
}
else if (!str_cmp(field, "drunk")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_COND(c, DRUNK) = MAX(-1, MIN(addition, 24));
}
snprintf(str, slen, "%d", GET_COND(c, DRUNK));
}
break;
case 'e':
if (!str_cmp(field, "exp")) {
@@ -682,6 +689,13 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%d", GET_HIT(c));
}
else if (!str_cmp(field, "hunger")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_COND(c, HUNGER) = MAX(-1, MIN(addition, 24));
}
snprintf(str, slen, "%d", GET_COND(c, HUNGER));
}
break;
case 'i':
if (!str_cmp(field, "id"))
@@ -970,7 +984,15 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%s", IS_NPC(c) ? "" : GET_TITLE(c));
}
case 'v':
else if (!str_cmp(field, "thirst")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_COND(c, THIRST) = MAX(-1, MIN(addition, 24));
}
snprintf(str, slen, "%d", GET_COND(c, THIRST));
}
break;
case 'v':
if (!str_cmp(field, "vnum")) {
if (subfield && *subfield) {
snprintf(str, slen, "%d", IS_NPC(c) ? (int)(GET_MOB_VNUM(c) == atoi(subfield)) : -1 );
@@ -1099,7 +1121,10 @@ o->contains) ? "1" : "0"));
else
*str = '\0';
}
break;
else if (!str_cmp(field, "is_pc")) {
strcpy(str, "-1");
}
break;
case 'n':
if (!str_cmp(field, "name"))
snprintf(str, slen, "%s", o->name);