mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Added sanity checks to zedit new. (Can no longer make zones that include negative vnums, also get the proper message when you have 3 of the 4 arguments.)
You can now put objects in and remove objects from closed containers as an imm with nohassle. You can now walk through closed doors as an imm with nohassle on. You can now open locked containers and doors without unlocking them as an immortal with nohassle. You can now examine the contents of closed containers as an imm with nohassle. Made zedit new add the .qst file to the index file. Fixed various qedit related bugs. (thanks Mirad and Jamdog) Removed deprecated "murder" code. When pkill is on players can now order charmed mobs to attack other players. Fixed 'toggle automap'. Added a sacrifice command instead of their being autosac only. Also replaced Zizazat's name with more generic "The Gods" as it had obviously been ported from CWG previously. Fixed Warning relating to Automap.
This commit is contained in:
parent
d568dd3d42
commit
22ca85c4a5
16 changed files with 54 additions and 48 deletions
13
changelog
13
changelog
|
@ -3,6 +3,19 @@ help, find any bugs, or have ideas for improvement please stop by TBA at
|
|||
telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble
|
||||
|
||||
tbaMUD 3.56
|
||||
[Aug 10 2008] - Fizban
|
||||
Added sanity checks to zedit new. (Can no longer make zones that include negative vnums, also get the proper message when you have 3 of the 4 arguments.)
|
||||
You can now put objects in and remove objects from closed containers as an imm with nohassle.
|
||||
You can now walk through closed doors as an imm with nohassle on.
|
||||
You can now open locked containers and doors without unlocking them as an immortal with nohassle.
|
||||
You can now examine the contents of closed containers as an imm with nohassle.
|
||||
Made zedit new add the .qst file to the index file.
|
||||
Fixed various qedit related bugs. (thanks Mirad and Jamdog)
|
||||
Removed deprecated "murder" code.
|
||||
When pkill is on players can now order charmed mobs to attack other players.
|
||||
Fixed 'toggle automap'.
|
||||
Added a sacrifice command instead of their being autosac only. Also replaced Zizazat's name with more generic "The Gods" as it had obviously been ported from CWG previously.
|
||||
Fixed Warning relating to Automap.
|
||||
[Aug 03 2008] - Rumble
|
||||
You can now see your own communications while sleeping for gos, auc, gra, etc. (thanks Drefs)
|
||||
changed str_and_map to use target_room instead of IN_ROOM(ch). (thanks Vatiken)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Clean-up provided by seqwith.
|
||||
|
||||
# C compiler to use
|
||||
CC = @CC@
|
||||
CC = gcc
|
||||
|
||||
# Any special flags you want to pass to the compiler
|
||||
MYFLAGS = @MYFLAGS@
|
||||
|
|
|
@ -171,7 +171,6 @@ extern const char *cmd_door[];
|
|||
/* do_hit */
|
||||
ACMD(do_hit);
|
||||
#define SCMD_HIT 0
|
||||
#define SCMD_MURDER 1
|
||||
/* Functions without subcommands */
|
||||
ACMD(do_assist);
|
||||
ACMD(do_bash);
|
||||
|
|
|
@ -463,6 +463,8 @@ void look_at_room(struct char_data *ch, int ignore_brief)
|
|||
struct room_data *rm = &world[IN_ROOM(ch)];
|
||||
room_vnum target_room;
|
||||
|
||||
target_room = IN_ROOM(ch);
|
||||
|
||||
if (!ch->desc)
|
||||
return;
|
||||
|
||||
|
@ -547,7 +549,7 @@ static void look_in_obj(struct char_data *ch, char *arg)
|
|||
send_to_char(ch, "There's nothing inside that!\r\n");
|
||||
else {
|
||||
if (GET_OBJ_TYPE(obj) == ITEM_CONTAINER) {
|
||||
if (OBJVAL_FLAGGED(obj, CONT_CLOSED))
|
||||
if (OBJVAL_FLAGGED(obj, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
|
||||
send_to_char(ch, "It is closed.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "%s", fname(obj->name));
|
||||
|
@ -1107,9 +1109,7 @@ ACMD(do_who)
|
|||
int max_level;
|
||||
int count; /* must always start as 0 */
|
||||
} rank[] = {
|
||||
{ "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0},
|
||||
{ "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 },
|
||||
{ "\n", 0, 0, 0 }
|
||||
|
||||
};
|
||||
|
||||
skip_spaces(&argument);
|
||||
|
@ -1290,7 +1290,8 @@ ACMD(do_who)
|
|||
send_to_char(ch, " (Configuration Edit)");
|
||||
if (d->connected == CON_HEDIT)
|
||||
send_to_char(ch, " (Help edit)");
|
||||
|
||||
if (d->connected == CON_QEDIT)
|
||||
send_to_char(ch, " (Quest Edit)");
|
||||
if (PRF_FLAGGED(tch, PRF_BUILDWALK))
|
||||
send_to_char(ch, " (Buildwalking)");
|
||||
if (PRF_FLAGGED(tch, PRF_AFK))
|
||||
|
@ -1883,7 +1884,7 @@ ACMD(do_toggle)
|
|||
"Autoassist disabled.\r\n",
|
||||
"Autoassist enabled.\r\n"},
|
||||
{"screenwidth", 0, 0, "\n", "\n"},
|
||||
{"automap", PRF_AUTOMAP, 0,
|
||||
{"automap", PRF_AUTOMAP, 1,
|
||||
"You will no longer see the mini-map.\r\n",
|
||||
"You will now see a mini-map at the side of room descriptions.\r\n"},
|
||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||
|
@ -2135,10 +2136,9 @@ ACMD(do_toggle)
|
|||
send_to_char(ch, "Value for %s must either be 'on' or 'off'.\r\n", tog_messages[toggle].command);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
send_to_char(ch, "Sorry, automap is currently disabled.\r\n");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!*arg2) {
|
||||
TOGGLE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
|
|
|
@ -121,7 +121,7 @@ ACMD(do_put)
|
|||
send_to_char(ch, "You don't see %s %s here.\r\n", AN(thecont), thecont);
|
||||
else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER)
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
else if (OBJVAL_FLAGGED(cont, CONT_CLOSED))
|
||||
else if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
|
||||
send_to_char(ch, "You'd better open it first!\r\n");
|
||||
else {
|
||||
if (obj_dotmode == FIND_INDIV) { /* put <obj> <container> */
|
||||
|
@ -215,7 +215,7 @@ void get_from_container(struct char_data *ch, struct obj_data *cont,
|
|||
|
||||
obj_dotmode = find_all_dots(arg);
|
||||
|
||||
if (OBJVAL_FLAGGED(cont, CONT_CLOSED))
|
||||
if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
|
||||
act("$p is closed.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
else if (obj_dotmode == FIND_INDIV) {
|
||||
if (!(obj = get_obj_in_list_vis(ch, arg, NULL, cont->contains))) {
|
||||
|
@ -1537,7 +1537,7 @@ ACMD(do_sac)
|
|||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe Gods ignore your sacrifice.\r\n", GET_OBJ_SHORT(j));
|
||||
break;
|
||||
case 2:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nZizazat gives you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe gods give you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
GET_EXP(ch) += (2*GET_OBJ_COST(j));
|
||||
break;
|
||||
case 3:
|
||||
|
|
|
@ -331,7 +331,7 @@ int perform_move(struct char_data *ch, int dir, int need_specials_check)
|
|||
return (0);
|
||||
else if ((!EXIT(ch, dir) && !buildwalk(ch, dir)) || EXIT(ch, dir)->to_room == NOWHERE)
|
||||
send_to_char(ch, "Alas, you cannot go that way...\r\n");
|
||||
else if (EXIT_FLAGGED(EXIT(ch, dir), EX_CLOSED)) {
|
||||
else if (EXIT_FLAGGED(EXIT(ch, dir), EX_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE))) {
|
||||
if (EXIT(ch, dir)->keyword)
|
||||
send_to_char(ch, "The %s seems to be closed.\r\n", fname(EXIT(ch, dir)->keyword));
|
||||
else
|
||||
|
@ -601,7 +601,8 @@ ACMD(do_gen_door)
|
|||
IS_SET(flags_door[subcmd], NEED_LOCKED))
|
||||
send_to_char(ch, "Oh.. it wasn't locked, after all..\r\n");
|
||||
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) &&
|
||||
IS_SET(flags_door[subcmd], NEED_UNLOCKED))
|
||||
IS_SET(flags_door[subcmd], NEED_UNLOCKED) &&
|
||||
(GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
|
||||
send_to_char(ch, "It seems to be locked.\r\n");
|
||||
else if (!has_key(ch, keynum) && (GET_LEVEL(ch) < LVL_GOD) &&
|
||||
((subcmd == SCMD_LOCK) || (subcmd == SCMD_UNLOCK)))
|
||||
|
|
|
@ -54,8 +54,7 @@ ACMD(do_assist)
|
|||
act("You can't see who is fighting $M!", FALSE, ch, 0, helpee, TO_CHAR);
|
||||
/* prevent accidental pkill */
|
||||
else if (!CONFIG_PK_ALLOWED && !IS_NPC(opponent))
|
||||
act("Use 'murder' if you really want to attack $N.", FALSE,
|
||||
ch, 0, opponent, TO_CHAR);
|
||||
send_to_char(ch, "You cannot kill other players.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "You join the fight!\r\n");
|
||||
act("$N assists you!", 0, helpee, 0, ch, TO_CHAR);
|
||||
|
@ -82,19 +81,9 @@ ACMD(do_hit)
|
|||
} else if (AFF_FLAGGED(ch, AFF_CHARM) && (ch->master == vict))
|
||||
act("$N is just such a good friend, you simply can't hit $M.", FALSE, ch, 0, vict, TO_CHAR);
|
||||
else {
|
||||
if (!CONFIG_PK_ALLOWED) {
|
||||
if (!IS_NPC(vict) && !IS_NPC(ch)) {
|
||||
if (subcmd != SCMD_MURDER) {
|
||||
send_to_char(ch, "Use 'murder' to hit another player.\r\n");
|
||||
return;
|
||||
} else {
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(vict) && !IS_NPC(ch))
|
||||
check_killer(ch, vict);
|
||||
}
|
||||
}
|
||||
if (AFF_FLAGGED(ch, AFF_CHARM) && ch->master && !IS_NPC(ch->master) && vict && !IS_NPC(vict))
|
||||
return; /* you can't order a charmed pet to attack a
|
||||
* player */
|
||||
}
|
||||
|
||||
if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
|
||||
hit(ch, vict, TYPE_UNDEFINED);
|
||||
WAIT_STATE(ch, PULSE_VIOLENCE + 2);
|
||||
|
@ -108,7 +97,7 @@ ACMD(do_kill)
|
|||
char arg[MAX_INPUT_LENGTH];
|
||||
struct char_data *vict;
|
||||
|
||||
if (GET_LEVEL(ch) <= LVL_IMPL || IS_NPC(ch)) {
|
||||
if (GET_LEVEL(ch) < LVL_IMMORT || IS_NPC(ch) || !PRF_FLAGGED(ch, PRF_NOHASSLE)) {
|
||||
do_hit(ch, argument, cmd, subcmd);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "interpreter.h"
|
||||
#include "handler.h"
|
||||
#include "db.h"
|
||||
#include "screen.h"
|
||||
#include "spells.h"
|
||||
#include "act.h"
|
||||
|
||||
|
|
|
@ -279,6 +279,7 @@ const char *connected_types[] = {
|
|||
"Social edit",
|
||||
"Trigger edit",
|
||||
"Help edit",
|
||||
"Quest edit",
|
||||
"\n"
|
||||
};
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ ACMD(do_masound)
|
|||
IN_ROOM(ch) = was_in_room;
|
||||
}
|
||||
|
||||
/* lets the mobile kill any player or mobile without murder*/
|
||||
/* lets the mobile kill any player or mobile */
|
||||
ACMD(do_mkill)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
|
|
|
@ -576,7 +576,7 @@ static void dam_message(int dam, struct char_data *ch, struct char_data *victim,
|
|||
send_to_char(ch, CCNRM(ch, C_CMP));
|
||||
|
||||
/* damage message to damagee */
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT)
|
||||
if (GET_LEVEL(victim) >= LVL_IMMORT)
|
||||
send_to_char(victim, "@R(%d)", dam);
|
||||
buf = replace_string(dam_weapons[msgnum].to_victim,
|
||||
attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
|
||||
|
@ -687,7 +687,7 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
|||
return (0);
|
||||
|
||||
/* You can't damage an immortal! */
|
||||
if (!IS_NPC(victim) && (GET_LEVEL(victim) >= LVL_IMMORT))
|
||||
if (!IS_NPC(victim) && ((GET_LEVEL(victim) >= LVL_IMMORT) && PRF_FLAGGED(victim, PRF_NOHASSLE)))
|
||||
dam = 0;
|
||||
|
||||
if (victim != ch) {
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "db.h"
|
||||
#include "quest.h"
|
||||
#include "genolc.h"
|
||||
#include "genzon.h"
|
||||
#include "genzon.h" /* for create_world_index */
|
||||
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
|
|||
fclose(fp);
|
||||
|
||||
/* Update index files. */
|
||||
create_world_index(vzone_num, "qst");
|
||||
create_world_index(vzone_num, "zon");
|
||||
create_world_index(vzone_num, "wld");
|
||||
create_world_index(vzone_num, "mob");
|
||||
|
|
|
@ -249,6 +249,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "rcopy" , "rcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_REDIT },
|
||||
{ "roomflags", "roomflags", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_SHOWVNUMS },
|
||||
|
||||
{ "sacrifice", "sac" , POS_RESTING , do_sac , 0, 0 },
|
||||
{ "say" , "s" , POS_RESTING , do_say , 0, 0 },
|
||||
{ "score" , "sc" , POS_DEAD , do_score , 0, 0 },
|
||||
{ "scopy" , "scopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_SEDIT },
|
||||
|
|
|
@ -593,7 +593,7 @@ void char_from_furniture(struct char_data *ch);
|
|||
STATE(d) == CON_ZEDIT || STATE(d) == CON_SEDIT || \
|
||||
STATE(d) == CON_CEDIT || STATE(d) == CON_PLAYING || \
|
||||
STATE(d) == CON_TRIGEDIT || STATE(d) == CON_AEDIT || \
|
||||
STATE(d) == CON_HEDIT)
|
||||
STATE(d) == CON_HEDIT || STATE(d) == CON_QEDIT)
|
||||
|
||||
/** Defines if it is ok to send a message to ch. */
|
||||
#define SENDOK(ch) (((ch)->desc || SCRIPT_CHECK((ch), MTRIG_ACT)) && \
|
||||
|
|
15
src/zedit.c
15
src/zedit.c
|
@ -39,7 +39,8 @@ ACMD(do_oasis_zedit)
|
|||
{
|
||||
int number = NOWHERE, save = 0, real_num;
|
||||
struct descriptor_data *d;
|
||||
char *buf3;
|
||||
char *stop;
|
||||
char sbot[MAX_STRING_LENGTH];
|
||||
char buf1[MAX_STRING_LENGTH];
|
||||
char buf2[MAX_STRING_LENGTH];
|
||||
|
||||
|
@ -48,7 +49,7 @@ ACMD(do_oasis_zedit)
|
|||
return;
|
||||
|
||||
/* Parse any arguments. */
|
||||
buf3 = two_arguments(argument, buf1, buf2);
|
||||
stop = one_argument(two_arguments(argument, buf1, buf2), sbot);
|
||||
|
||||
/* If no argument was given, use the zone the builder is standing in. */
|
||||
if (!*buf1)
|
||||
|
@ -73,16 +74,16 @@ ACMD(do_oasis_zedit)
|
|||
return;
|
||||
}
|
||||
} else if (GET_LEVEL(ch) >= LVL_IMPL) {
|
||||
if (str_cmp("new", buf1) || !buf3 || !*buf3)
|
||||
if (str_cmp("new", buf1) || !stop || !*stop)
|
||||
send_to_char(ch, "Format: zedit new <zone number> <bottom-room> "
|
||||
"<upper-room>\r\n");
|
||||
else {
|
||||
char sbot[MAX_INPUT_LENGTH], stop[MAX_INPUT_LENGTH];
|
||||
if (atoi(stop) < 0 || atoi(sbot) < 0) {
|
||||
send_to_char(ch, "Zones cannot contain negative vnums.\r\n");
|
||||
return;
|
||||
}
|
||||
room_vnum bottom, top;
|
||||
|
||||
skip_spaces(&buf3);
|
||||
two_arguments(buf3, sbot, stop);
|
||||
|
||||
number = atoidx(buf2);
|
||||
if (number < 0)
|
||||
number = NOWHERE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue