diff --git a/changelog b/changelog index c7dddc7..393901d 100644 --- a/changelog +++ b/changelog @@ -35,6 +35,10 @@ export (QQ's a zone into a tarball) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) (lots of major bugfixes too) @ +[Dec 02 2010] - Jamdog + Bug-Fix: identify command in shops was listing incorrect buy price (thanks Kam) + Added %actor.admlevel% and %actor.admlevel()% to dg-scripts + Earthquake spell now misses flying people [Dec 01 2010] - Jamdog Fixed do_cheat so that only ID 1 can get a full restoration Added zone checks for load/purge commands below admin level 3 (GrGod) diff --git a/src/act.h b/src/act.h index 79634a8..5444f4d 100644 --- a/src/act.h +++ b/src/act.h @@ -282,6 +282,7 @@ void snoop_check(struct char_data *ch); bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_name); bool AddRecentPlayer(char *chname, char *chhost, bool newplr, bool cpyplr); void set_default_admin_privs(struct char_data *ch, bool keep_old); +int get_admin_level_by_string(char *lv); /* Functions with subcommands */ /* do_date */ ACMD(do_date); diff --git a/src/dg_variables.c b/src/dg_variables.c index 13e58dc..ae0b493 100644 --- a/src/dg_variables.c +++ b/src/dg_variables.c @@ -541,7 +541,17 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig, switch (LOWER(*field)) { case 'a': - if (!str_cmp(field, "level")) { + if (!str_cmp(field, "admlevel")) { + if (subfield && *subfield) { + int al; + if ((al = get_admin_level_by_string(subfield)) >= ADMLVL_MORTAL) { + if (IS_ADMIN(c, al)) + strcpy(str, "1"); + else + strcpy(str, "0"); + } else + strcpy(str, "0"); + } else snprintf(str, slen, "%d", GET_ADMLEVEL(c)); } if (!str_cmp(field, "affect")) { diff --git a/src/magic.c b/src/magic.c index 2a4c62b..b67c110 100644 --- a/src/magic.c +++ b/src/magic.c @@ -658,7 +658,8 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype) * 2: immortals * 3: if no pk on this mud, skips over all players * 4: pets (charmed NPCs) - * 5: other players in the same group (if the spell is 'violent') */ + * 5: other players in the same group (if the spell is 'violent') + * 6: Flying people if earthquake is the spell */ if (tch == ch) continue; if (IS_ADMIN(tch, ADMLVL_IMMORT)) @@ -672,6 +673,8 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype) if (!IS_NPC(tch) && spell_info[spellnum].violent && AFF_FLAGGED(tch, AFF_GROUP) && AFF_FLAGGED(ch, AFF_GROUP) && ( ((ch->master == NULL) ? ch : ch->master) == ((tch->master == NULL) ? tch : tch->master) ) ) continue; + if ((spellnum == SPELL_EARTHQUAKE) && AFF_FLAGGED(tch, AFF_FLYING)) + continue; /* Doesn't matter if they die here so we don't check. -gg 6/24/98 */ mag_damage(level, ch, tch, spellnum, 1); diff --git a/src/shop.c b/src/shop.c index 0d2e62a..782a507 100644 --- a/src/shop.c +++ b/src/shop.c @@ -1571,7 +1571,10 @@ bool shopping_identify(char *arg, struct char_data *ch, struct char_data *keeper send_to_char(ch, "Name: %s\r\n", (obj->short_description) ? obj->short_description : ""); sprinttype(GET_OBJ_TYPE(obj), item_types, buf, sizeof(buf)); send_to_char(ch, "Type: %s\r\n", buf); - send_to_char(ch, "Weight: %d, Cost to Buy: @Y%d@n\r\n", GET_OBJ_WEIGHT(obj), sell_price(obj, shop_nr, keeper, ch)); + send_to_char(ch, "Weight: %d, Cost to Sell: %s%d%s, Cost to Buy: %s%d%s\r\n", + GET_OBJ_WEIGHT(obj), + QYEL, sell_price(obj, shop_nr, keeper, ch), QNRM, + QYEL, buy_price(obj, shop_nr, keeper, ch), QNRM); sprintbitarray(GET_OBJ_WEAR(obj), wear_bits, TW_ARRAY_MAX, buf); send_to_char(ch, "Can be worn on: %s\r\n", buf);