updated do_set, added autoloot, autogold, autosplit, autosac, and autoassist. Removed whitespace from files. --Rumble

This commit is contained in:
Rumble 2007-02-08 19:33:11 +00:00
parent 2b53a5b375
commit 1d9cff608c
11 changed files with 675 additions and 485 deletions

View file

@ -1,18 +1,30 @@
atbaMUD is currently being developed by The Builder Academy. If you need any tbaMUD is currently being developed by The Builder Academy. If you need any
help or find any bugs please stop by: builderacademy.net 9091 help or find any bugs please stop by: builderacademy.net 9091
tbaMUD 3.51 tbaMUD 3.51
- Changed page to level 1.
- Snooping log message is now only visible by higher imms.
- Moved nohassle, holylight, showvnums, color, compact, syslog, poofin,
poofout, and autoexit to toggle <option>.
- Added "Did you mean" to unknown commands instead of Huh?!? (thanks Rhade).
- Updated do_set Alphabetically. Removed set idnum & lessons (practice still
there). Can no longer set level to 0 (thanks Fizban).
- Added autoloot, autogold, autosplit, autosac, and autoassist.
- Removed all whitespace (tabs and spaces at EOL).
- Added years to messages (thanks Rhade). - Added years to messages (thanks Rhade).
- Updated version and files to new name: tbaMUD! - Updated version and files to new name: tbaMUD!
- Renamed medit_alias and oedit_namelist to _keyword for consistency. - Renamed medit_alias and oedit_namelist to _keyword for consistency.
- Moved numerous protos only used once from .h files to appropriate .c file. - Moved numerous protos only used once from .h files to appropriate .c file
(thanks Del).
- Renamed numerous functions for clarity (mostly shop functions like copy_list - Renamed numerous functions for clarity (mostly shop functions like copy_list
to copy_shop_list, etc). to copy_shop_list, etc) (thanks Del).
- Renamed update_objects to update_all_objects so it wouldn't be confused with - Renamed update_objects to update_all_objects so it wouldn't be confused with
update_object. update_object (thanks Del).
- Renamed data to dg_data in function queue_head in dg_event.c for clarity. - Renamed data to dg_data in function queue_head in dg_event.c for clarity
- Moved function log_death_trap to a log since that is all it did anyways. (thanks Del).
- Renamed unmatched gettimeofday protos. - Moved function log_death_trap to a log since that is all it did anyways
(thanks Del).
- Renamed unmatched gettimeofday protos (thanks Del).
- Renamed oasis_copy.o and oasis_list.o to appropriate .c for CXREF_FILES. - Renamed oasis_copy.o and oasis_list.o to appropriate .c for CXREF_FILES.
- Fixed a bunch of strange bugs in objsave.c and altered build_player_index() - Fixed a bunch of strange bugs in objsave.c and altered build_player_index()
to conform to gcc 4.1 standards. This mainly consisted of removing a cast to conform to gcc 4.1 standards. This mainly consisted of removing a cast
@ -225,7 +237,7 @@ CircleMUD 3.5
- Added buildwalk and dig. - Added buildwalk and dig.
Release history: Release history:
Version 3.51 release: January, 2007 Version 3.51 release: February, 2007
Version 3.5 release: December 11, 2006 Version 3.5 release: December 11, 2006
Version 3.1 (yes, no beta pl): November 18, 2002 Version 3.1 (yes, no beta pl): November 18, 2002
Version 3.00 beta pl22 release: October 4, 2002 Version 3.00 beta pl22 release: October 4, 2002
@ -255,4 +267,4 @@ Version 2.11 release: September 19, 1993
Version 2.10 release: September 1, 1993 Version 2.10 release: September 1, 1993
Version 2.02 release: Late August 1993 Version 2.02 release: Late August 1993
Version 2.01 release: Early August 1993 Version 2.01 release: Early August 1993
Version 2.00 release: July 16, 1993 (Initial public release) Version 2.00 release: July 16, 1993 (Initial public release)

View file

@ -951,7 +951,7 @@ when done type /fi to format with indent.
See also: TEXT-EDITOR See also: TEXT-EDITOR
#31 #31
BUFFERS DEFINES MAXSIZE MAX_SIZE MAXBUFFERS PAGE_LENGTHS MAX_BUFFERS BUFFERS DEFINES MAXSIZE MAX_SIZE MAXBUFFERS MAX_BUFFERS
define MAX_SOCK_BUF (24 * 1024) /* Size of kernel's sock buf */ define MAX_SOCK_BUF (24 * 1024) /* Size of kernel's sock buf */
define MAX_PROMPT_LENGTH 96 /* Max length of prompt */ define MAX_PROMPT_LENGTH 96 /* Max length of prompt */
@ -1111,7 +1111,7 @@ MAILING - Player is writing mail
CSH - Player needs to be crash-saved CSH - Player needs to be crash-saved
SITEOK - Player has been site-cleared SITEOK - Player has been site-cleared
NOSHOUT - Player in not on the shout channel NOSHOUT - Player in not on the shout channel
NOSHOUT - Player is not on the gossip channel NOGOS - Player is not on the gossip channel
NOTITLE - Player not allowed to set title NOTITLE - Player not allowed to set title
DELETED - Player deleted - space reusable DELETED - Player deleted - space reusable
LOADRM - Player uses nonstandard loadroom LOADRM - Player uses nonstandard loadroom
@ -2476,8 +2476,9 @@ The following are valid fields:
Field Level Required Who Value Type Description Field Level Required Who Value Type Description
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
afk LVL_BUILDER BOTH NUMBER AFK flag
ac LVL_BUILDER BOTH NUMBER Armor class ac LVL_BUILDER BOTH NUMBER Armor class
age LVL_BUILDER BOTH NUMBER Character's age age LVL_GOD BOTH NUMBER Character's age
align LVL_BUILDER BOTH NUMBER Alignment align LVL_BUILDER BOTH NUMBER Alignment
bank LVL_BUILDER PC NUMBER Gold in bank bank LVL_BUILDER PC NUMBER Gold in bank
brief LVL_GOD PC BINARY Brief mode brief LVL_GOD PC BINARY Brief mode
@ -2489,7 +2490,7 @@ damroll LVL_BUILDER BOTH NUMBER Damage modifier
deleted LVL_IMPL PC BINARY DELETED flag deleted LVL_IMPL PC BINARY DELETED flag
dex LVL_BUILDER BOTH NUMBER Dexterity dex LVL_BUILDER BOTH NUMBER Dexterity
drunk LVL_BUILDER BOTH MISC Drunkenness drunk LVL_BUILDER BOTH MISC Drunkenness
exp LVL_BUILDER BOTH NUMBER Experience points exp LVL_GOD BOTH NUMBER Experience points
frozen LVL_FREEZE PC BINARY FROZEN flag frozen LVL_FREEZE PC BINARY FROZEN flag
gold LVL_BUILDER BOTH NUMBER Gold (On hand) gold LVL_BUILDER BOTH NUMBER Gold (On hand)
height LVL_BUILDER BOTH NUMBER Height height LVL_BUILDER BOTH NUMBER Height
@ -2501,8 +2502,8 @@ int LVL_BUILDER BOTH NUMBER Intelligence
invis LVL_GOD PC NUMBER Invisible (level) invis LVL_GOD PC NUMBER Invisible (level)
invstart LVL_BUILDER PC BINARY Invisible Start invstart LVL_BUILDER PC BINARY Invisible Start
killer LVL_GOD PC BINARY KILLER flag killer LVL_GOD PC BINARY KILLER flag
lessons LVL_BUILDER PC NUMBER #100 of practices lessons LVL_GOD PC NUMBER # of practices
level LVL_IMPL BOTH NUMBER Level level LVL_GRGOD BOTH NUMBER Level
loadroom LVL_BUILDER PC MISC Room to load in loadroom LVL_BUILDER PC MISC Room to load in
mana LVL_BUILDER BOTH NUMBER Current mana mana LVL_BUILDER BOTH NUMBER Current mana
maxhit LVL_BUILDER BOTH NUMBER Max HP maxhit LVL_BUILDER BOTH NUMBER Max HP
@ -2512,18 +2513,18 @@ move LVL_BUILDER BOTH NUMBER Current movement
nodelete LVL_GOD PC BINARY Undeletable flag nodelete LVL_GOD PC BINARY Undeletable flag
nohassle LVL_GOD PC BINARY NOHASSLE flag nohassle LVL_GOD PC BINARY NOHASSLE flag
nosummon LVL_BUILDER PC BINARY NOSUMMON flag nosummon LVL_BUILDER PC BINARY NOSUMMON flag
nowizlist LVL_GOD PC BINARY Not Wizlistable flag nowizlist LVL_GRGOD PC BINARY Not Wizlistable flag
olc LVL_GRGOD PC MISC Zone to OLC olc LVL_GRGOD PC MISC Zone to OLC
passwd LVL_IMPL PC MISC Player password passwd LVL_IMPL PC MISC Player password
poofin LVL_IMMORT PC MISC Poofin poofin LVL_IMMORT PC MISC Poofin
poofout LVL_IMMORT PC MISC Poofout poofout LVL_IMMORT PC MISC Poofout
practices LVL_BUILDER PC NUMBER #100 of practices practices LVL_GOD PC NUMBER # of practices
quest LVL_GOD PC BINARY QUESTING flag quest LVL_GOD PC BINARY QUEST flag
race LVL_BUILDER BOTH MISC Race h/e/g/a/b/m/w/t/d/r/s race LVL_BUILDER BOTH MISC Race h/e/g/a/b/m/w/t/d/r/s
room LVL_IMPL BOTH NUMBER Move to room room LVL_IMPL BOTH NUMBER Move to room
roomflag LVL_GOD PC BINARY ROOMFLAGS flag showvnum LVL_GOD PC BINARY ShowVnums
sex LVL_GOD BOTH MISC Sex sex LVL_GOD BOTH MISC Sex
siteok LVL_GOD PC BINARY SITEOK flag siteok LVL_GOD PC BINARY SITEOK
str LVL_BUILDER BOTH NUMBER Strength str LVL_BUILDER BOTH NUMBER Strength
stradd LVL_BUILDER BOTH NUMBER Additional STR (18/xx) stradd LVL_BUILDER BOTH NUMBER Additional STR (18/xx)
thief LVL_GOD PC BINARY THIEF flag thief LVL_GOD PC BINARY THIEF flag
@ -2723,7 +2724,7 @@ Usage: wizhelp
Gives a list of the special commands available at your level. Gives a list of the special commands available at your level.
The following wizard commands are implemented with level in the brackets: The following wizard commands are implemented with level in the brackets:
[31]; [32]advance [32]aedit [31]at [31]attach [33]ban [31]buildwalk [31]; [33]advance [32]aedit [31]at [31]attach [33]ban [31]buildwalk
[34]cedit [32]checkload [33]copyover [31]date [32]dc [31]detach [31]dig [34]cedit [32]checkload [33]copyover [31]date [32]dc [31]detach [31]dig
[31]echo [34]export [32]file [32]force [33]freeze [32]gecho [31]goto [31]echo [34]export [32]file [32]force [33]freeze [32]gecho [31]goto
[31]handbook [33]hcontrol [32]hedit [34]helpcheck [31]holylight [31]imotd [31]invis [31]handbook [33]hcontrol [32]hedit [34]helpcheck [31]holylight [31]imotd [31]invis
@ -7743,6 +7744,31 @@ head and legs X2.
See also: MEDIT-AC See also: MEDIT-AC
#31 #31
TOGGLES CONFIGURE SETTINGS
Usage: toggle
toggle <option> <argument>
TOGGLE shows you the current values of various toggles available on the MUD.
This command can also be used to change these values, if used with the correct
argument. When a toggle is set, it will be saved in that state until the next
time you change it. Level IMP toggle includes:
SlowNameserver: OFF Trackthru Doors: ON
Buildwalk: OFF NoWiz: OFF ClsOLC: OFF
NoHassle: ON Holylight: ON ShowVnums: ON
Syslog: normal
Hit Pnt Display: OFF Brief: OFF Summonable: OFF
Move Display: OFF Compact: ON Quest: OFF
Mana Display: OFF NoTell: OFF NoRepeat: OFF
AutoExits: OFF NoShout: OFF Wimpy: OFF
NoGossip: OFF NoAuction: OFF NoGrats: OFF
AutoLoot: ON AutoGold: ON AutoSplit: ON
AutoSac: ON AutoAssist: ON AFK: OFF
Pagelength: 32 Color: off
See also: DISPLAY, NOSHOUT, NOSUMM, NOTELL, QUEST, REPEAT, WIMP
#0
TELEPORTERS TELEPORTERS
Usage: teleport <zone> Usage: teleport <zone>
@ -8218,14 +8244,14 @@ ASSIST
Usage: ASSIST <person in need> Usage: ASSIST <person in need>
If Joe is being beaten senseless by a poodle and you feel brave enough to help If Joe is being beaten senseless by a poodle and you feel brave enough to help
him, type ASSIST JOE to hit the poodle. Note that the poodle will keep him, type ASSIST JOE to hit the poodle. Note that the poodle will keep
hitting Joe; assist only makes you start to fight whomever the person you are hitting Joe; assist only makes you start to fight whomever the person you are
assisting is fighting. assisting is fighting.
> assist Joe > assist Joe
See also: FLEE, KILL, RESCUE See also: AUTOASSIST, FLEE, KILL, RESCUE
#0 #0
QUESTIONS QUESTIONS
@ -9105,25 +9131,36 @@ Thirst and Hunger are modified by objects in units of hours. So an object
with 24 drink units will quench thirst for 24 hours. Same for food. with 24 drink units will quench thirst for 24 hours. Same for food.
Immortals never become hungry, thirsty or full. Immortals never become hungry, thirsty or full.
#0 #0
EMOTES : GEMOTES GMOTES EMOTICONS EMOTIONS EMOTES : EMOTIONS
Usage: emote <message> Usage: emote <message>
: <message> : <message>
gemote <message>
Show people what you're feeling. The shorthand for emote is ":". Show people what you're feeling. The shorthand for emote is ":".
"emote <string>" will display your name, then the string. "emote <string>" will display your name, then the string.
Example: Example:
If your name is "Helt", If your name is "Rhade",
> emote is feeling very sad today. > emote is feeling very sad today.
will display: will display:
Helt is feeling very sad today. Rhade is feeling very sad today.
gemote does the same thing except over the gossip channel. So not just the people See also: SOCIALS, GEMOTE
in your room see it, everyone on the gossip channel does. Please don't abuse this. #0
GEMOTES GMOTES EMOTICONS
See also: SOCIALS Usage: gemote <social>
Allows you to perform socials over gossip for everyone on the gossip channel
to see.
Example:
If your name is "Manivo",
> gemote spork Shamra
will display:
Gossip: Manivo sporks Shamra ruthlessly.
See also: SOCIALS, EMOTE
#0 #0
ENTER ENTER
@ -9189,7 +9226,7 @@ Examples:
See also: GROUP, SNEAK See also: GROUP, SNEAK
#0 #0
GET TAKE LOOT GET TAKE-ALL-CORPSE LOOT
"Get" and "take" are exactly the same and can be used interchangeably. "Get" and "take" are exactly the same and can be used interchangeably.
@ -9204,12 +9241,12 @@ it up. 'get' can also be used to extract items from containers.
Examples: Examples:
> get sword corpse > get sword corpse
> get all corpse > take all corpse
> get all all.bag > get all all.bag
> get all.bread all.bag > take all.bread all.bag
> get all 2.corpse (to retrieve items from the second corpse in a room) > get all 2.corpse (to retrieve items from the second corpse in a room)
See also: DROP, PUT See also: DROP, PUT, AUTOLOOT, AUTOGOLD
#0 #0
GIVE PAY BRIBE GIVE PAY BRIBE
@ -10461,7 +10498,7 @@ the same room with you, and you type SPLIT 100, you will give each of the
other 4 group members 20 coins each. (100 coins is split 5 ways; you keep other 4 group members 20 coins each. (100 coins is split 5 ways; you keep
your share and give everyone else their share). your share and give everyone else their share).
See also: FOLLOW, GROUP See also: AUTOSPLIT, FOLLOW, GROUP
#0 #0
STEAL STEAL
@ -10501,21 +10538,66 @@ Usage: toggle
TOGGLE shows you the current values of various toggles available on the MUD. TOGGLE shows you the current values of various toggles available on the MUD.
This command can also be used to change these values, if used with the correct This command can also be used to change these values, if used with the correct
argument. When a toggle is set, it will be saved in that state until the next argument. When a toggle is set, it will be saved in that state until the next
time you change it. Level IMP toggle includes: time you change it.
SlowNameserver: OFF Trackthru Doors: ON
Buildwalk: OFF NoWiz: OFF ClsOLC: OFF
NoHassle: ON Holylight: ON ShowVnums: ON
Syslog: normal
Hit Pnt Display: OFF Brief: OFF Summonable: OFF Hit Pnt Display: OFF Brief: OFF Summonable: OFF
Move Display: OFF Compact: ON Quest: OFF Move Display: OFF Compact: ON Quest: OFF
Mana Display: OFF NoTell: OFF NoRepeat: OFF Mana Display: OFF NoTell: OFF NoRepeat: OFF
AutoExits: ON NoShout: OFF Wimpy: OFF AutoExits: OFF NoShout: OFF Wimpy: OFF
NoGossip: OFF NoAuction: OFF NoGrats: OFF NoGossip: OFF NoAuction: OFF NoGrats: OFF
AFK: OFF Pagelength: 45 Color: on AutoLoot: ON AutoGold: ON AutoSplit: ON
AutoSac: ON AutoAssist: ON AFK: OFF
Pagelength: 23 Color: off
See also: DISPLAY, NOSHOUT, NOSUMM, NOTELL, QUEST, REPEAT, WIMP See also: DISPLAY, NOSHOUT, NOSUMM, NOTELL, QUEST, REPEAT, WIMP
#0 #0
AUTOGOLD
Usage: toggle autogold
Enables you to automatically take the gold from any mob you kill. This will
not take any equipment or objects.
See Also: TOGGLE, TAKE
#0
AUTOSACRIFICE SACRIFICE
Usage: toggle autosac
Enables you to automatically sacrifice any mob you kill. If you do not have
autoloot and autoloot enabled the objects and gold will also be sacrificed.
See Also: TOGGLE
#0
AUTOLOOT
Usage: toggle autoloot
Enables you to automatically "take all corpse" from any mob you kill. You
will loot everything, this includes cursed objects, until you can no longer
carry anymore weight. If this happens and you also have autosac enabled the
items you can't pick up will be sacrificed with the mob.
See Also: TOGGLE, TAKE, SPLIT
#0
AUTOSPLIT
Usage: toggle autosplit
Enables you to automatically split the money from any mob you kill with your
fellow group members.
See Also: TOGGLE, GROUP
#0
AUTOASSIST
Usage: toggle autoassist
Enables you to automatically assist a fellow group member when they are
attacked without having to manually type "assist."
See Also: TOGGLE, ASSIST
#0
TRACK TRAIL TRACK TRAIL
Usage: track [target] Usage: track [target]
@ -10780,7 +10862,7 @@ DELETE SUICIDE
select the option to delete your character. select the option to delete your character.
#0 #0
SEARCH FLY PEEK SCAN WHOIS OOC AUTOGOLD AUTOSACRIFICE AUTOLOOT AUTOSPLIT OUT-OF-CHARACTER DUALWIELD DUAL-WIELD SINGING REMORTS RECLASS CLANS SWIMMING COMPARE IEDIT LANGUAGES PERCENT-LOADING PERCENTAGE-LOADING IDENTIFY CLONES CLONING CLANS MUSIC SEARCH FLY PEEK SCAN WHOIS OOC OUT-OF-CHARACTER DUALWIELD DUAL-WIELD SINGING REMORTS RECLASS CLANS SWIMMING COMPARE IEDIT LANGUAGES PERCENT-LOADING PERCENTAGE-LOADING IDENTIFY CLONES CLONING CLANS MUSIC
Not implemented. Not implemented.
@ -10828,7 +10910,7 @@ People may go linkless for many reasons:
They might not log off correctly They might not log off correctly
#0 #0
PAGELENGTHS PAGELENGTHS PAGE_LENGTHS
Usage: toggle pagelength [#] Usage: toggle pagelength [#]
@ -10923,7 +11005,7 @@ n - normal
@gg - green@n @GG - bright green@n @22 - background green@n @gg - green@n @GG - bright green@n @22 - background green@n
@cc - cyan@n @CC - bright cyan@n @33 - background cyan@n @cc - cyan@n @CC - bright cyan@n @33 - background cyan@n
@rr - red@n @RR - bright red@n @44 - background red@n @rr - red@n @RR - bright red@n @44 - background red@n
@mm - magenta@n @MM - bright magenta@n @55 - background magneta@n @mm - magenta@n @MM - bright magenta@n @55 - background magenta@n
@yy - yellow@n @YY - bright yellow@n @66 - background yellow@n @yy - yellow@n @YY - bright yellow@n @66 - background yellow@n
@ww - white@n @WW - bright white@n @77 - background white@n @ww - white@n @WW - bright white@n @77 - background white@n
@ -11583,7 +11665,7 @@ The Builder Academy
Code Base: [Circlemud] 3.1 Code Base: [Circlemud] 3.1
Latest CircleMUD with OasisOLC and DG Scripts Latest CircleMUD with OasisOLC and DG Scripts
Site: builderacademy.net 9091 [206.123.75.138] Site: builderacademy.net 9091 [206.123.75.138]
Admin Email: rumble@builderacademy.net Admin Email: rumble@@builderacademy.net
Theme: Teaching Builders, CircleMUD and DG Scripts development Theme: Teaching Builders, CircleMUD and DG Scripts development
http://www.builderacademy.net/ http://www.builderacademy.net/
telnet://builderacademy.net:9091 telnet://builderacademy.net:9091

View file

@ -2,7 +2,7 @@
Welcome to Welcome to
C I R C L E M U D 3 . 5 T B A M U D 3 . 5 1
"We addict players for their own enjoyment." "We addict players for their own enjoyment."
Created by Jeremy Elson Created by Jeremy Elson

View file

@ -1817,7 +1817,14 @@ ACMD(do_toggle)
" NoAuction: %-3s " " NoAuction: %-3s "
" NoGrats: %-3s\r\n" " NoGrats: %-3s\r\n"
" AFK: %-3s " " AutoLoot: %-3s "
" AutoGold: %-3s "
" AutoSplit: %-3s\r\n"
" AutoSac: %-3s "
" AutoAssist: %-3s "
" AFK: %-3s\r\n"
" Pagelength: %-3d " " Pagelength: %-3d "
" Color: %s \r\n ", " Color: %s \r\n ",
@ -1841,7 +1848,14 @@ ACMD(do_toggle)
ONOFF(PRF_FLAGGED(ch, PRF_NOAUCT)), ONOFF(PRF_FLAGGED(ch, PRF_NOAUCT)),
ONOFF(PRF_FLAGGED(ch, PRF_NOGRATZ)), ONOFF(PRF_FLAGGED(ch, PRF_NOGRATZ)),
ONOFF(PRF_FLAGGED(ch, PRF_AUTOLOOT)),
ONOFF(PRF_FLAGGED(ch, PRF_AUTOGOLD)),
ONOFF(PRF_FLAGGED(ch, PRF_AUTOSPLIT)),
ONOFF(PRF_FLAGGED(ch, PRF_AUTOSAC)),
ONOFF(PRF_FLAGGED(ch, PRF_AUTOASSIST)),
ONOFF(PRF_FLAGGED(ch, PRF_AFK)), ONOFF(PRF_FLAGGED(ch, PRF_AFK)),
GET_PAGE_LENGTH(ch), GET_PAGE_LENGTH(ch),
types[COLOR_LEV(ch)]); types[COLOR_LEV(ch)]);
return; return;
@ -1918,6 +1932,21 @@ ACMD(do_toggle)
{"syslog", -1, LVL_IMMORT, "\n", "\n"}, {"syslog", -1, LVL_IMMORT, "\n", "\n"},
{"wimpy", -1, 0, "\n", "\n"}, {"wimpy", -1, 0, "\n", "\n"},
{"pagelength", -1, 0, "\n", "\n"}, {"pagelength", -1, 0, "\n", "\n"},
{"autoloot", PRF_AUTOLOOT, 0,
"Autoloot disabled.\r\n",
"Autoloot enabled.\r\n"},
{"autogold", PRF_AUTOGOLD, 0,
"Autogold disabled.\r\n",
"Autogold enabled.\r\n"},
{"autosplit", PRF_AUTOSPLIT, 0,
"Autosplit disabled.\r\n",
"Autosplit enabled.\r\n"},
{"autosac", PRF_AUTOSAC, 0,
"Autosac disabled.\r\n",
"Autosac enabled.\r\n"},
{"autoassist", PRF_AUTOASSIST, 0,
"Autoassist disabled.\r\n",
"Autoassist enabled.\r\n"},
{"\n", -1, -1, "\n", "\n"} /* must be last */ {"\n", -1, -1, "\n", "\n"} /* must be last */
}; };
@ -2027,8 +2056,6 @@ ACMD(do_toggle)
if (!*arg2) { if (!*arg2) {
TOGGLE_BIT(PRF_FLAGS(ch), tog_messages[toggle].toggle); TOGGLE_BIT(PRF_FLAGS(ch), tog_messages[toggle].toggle);
result = (PRF_FLAGGED(ch, tog_messages[toggle].toggle)); result = (PRF_FLAGGED(ch, tog_messages[toggle].toggle));
// send_to_char(ch, "Value must either be 'on' or 'off'.\r\n");
// return;
} else if (!strcmp(arg2, "on")) { } else if (!strcmp(arg2, "on")) {
SET_BIT(PRF_FLAGS(ch), tog_messages[toggle].toggle); SET_BIT(PRF_FLAGS(ch), tog_messages[toggle].toggle);
result = 1; result = 1;

View file

@ -986,7 +986,7 @@ ACMD(do_eat)
do_drink(ch, argument, 0, SCMD_SIP); do_drink(ch, argument, 0, SCMD_SIP);
return; return;
} }
if ((GET_OBJ_TYPE(food) != ITEM_FOOD) && (GET_LEVEL(ch) <= LVL_BUILDER)) { if ((GET_OBJ_TYPE(food) != ITEM_FOOD) && (GET_LEVEL(ch) < LVL_IMMORT)) {
send_to_char(ch, "You can't eat THAT!\r\n"); send_to_char(ch, "You can't eat THAT!\r\n");
return; return;
} }
@ -1522,3 +1522,70 @@ ACMD(do_remove)
perform_remove(ch, i); perform_remove(ch, i);
} }
} }
ACMD(do_sac)
{
char arg[MAX_INPUT_LENGTH];
struct obj_data *j, *jj, *next_thing2;
one_argument(argument, arg);
if (!*arg) {
send_to_char(ch, "Sacrifice what?\n\r");
return;
}
if (!(j = get_obj_in_list_vis(ch, arg, NULL, world[IN_ROOM(ch)].contents)) && (!(j = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))) {
send_to_char(ch, "It doesn't seem to be here.\n\r");
return;
}
if (!CAN_WEAR(j, ITEM_WEAR_TAKE)) {
send_to_char(ch, "You can't sacrifice that!\n\r");
return;
}
act("$n sacrifices $p.", FALSE, ch, j, 0, TO_ROOM);
switch (rand_number(0, 5)) {
case 0:
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
GET_GOLD(ch) += 1;
break;
case 1:
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)));
GET_EXP(ch) += (2*GET_OBJ_COST(j));
break;
case 3:
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive %d experience points.\r\n", GET_OBJ_SHORT(j), GET_OBJ_COST(j));
GET_EXP(ch) += GET_OBJ_COST(j);
break;
case 4:
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins.\r\n", GET_OBJ_COST(j));
GET_GOLD(ch) += GET_OBJ_COST(j);
break;
case 5:
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins\r\n", (2*GET_OBJ_COST(j)));
GET_GOLD(ch) += (2*GET_OBJ_COST(j));
break;
default:
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
GET_GOLD(ch) += 1;
break;
}
for (jj = j->contains; jj; jj = next_thing2) {
next_thing2 = jj->next_content; /* Next in inventory */
obj_from_obj(jj);
if (j->carried_by)
obj_to_room(jj, IN_ROOM(j));
else if (IN_ROOM(j) != NOWHERE)
obj_to_room(jj, IN_ROOM(j));
else
assert(FALSE);
}
extract_obj(j);
}

File diff suppressed because it is too large Load diff

View file

@ -199,11 +199,11 @@ const char *preference_bits[] = {
"CLS", "CLS",
"BLDWLK", "BLDWLK",
"AFK", "AFK",
"UNUSED1", "AUTOLOOT",
"UNUSED2", "AUTOGOLD",
"UNUSED3", "AUTOSPLIT",
"UNUSED4", "AUTOSAC",
"UNUSED5", "AUTOASSIST",
"\n" "\n"
}; };

View file

@ -32,6 +32,10 @@ extern struct message_list fight_messages[MAX_MESSAGES];
/* External procedures */ /* External procedures */
char *fread_action(FILE *fl, int nr); char *fread_action(FILE *fl, int nr);
ACMD(do_flee); ACMD(do_flee);
ACMD(do_get);
ACMD(do_split);
ACMD(do_sac);
ACMD(do_assist);
int backstab_mult(int level); int backstab_mult(int level);
int thaco(int ch_class, int level); int thaco(int ch_class, int level);
int ok_damage_shopkeeper(struct char_data *ch, struct char_data *victim); int ok_damage_shopkeeper(struct char_data *ch, struct char_data *victim);
@ -683,6 +687,11 @@ int skill_message(int dam, struct char_data *ch, struct char_data *vict,
*/ */
int damage(struct char_data *ch, struct char_data *victim, int dam, int attacktype) int damage(struct char_data *ch, struct char_data *victim, int dam, int attacktype)
{ {
long local_gold = 0;
char local_buf[256];
struct char_data *tmp_char;
struct obj_data *corpse_obj, *coin_obj, *next_obj;
if (GET_POS(victim) <= POS_DEAD) { if (GET_POS(victim) <= POS_DEAD) {
/* This is "normal"-ish now with delayed extraction. -gg 3/15/2001 */ /* This is "normal"-ish now with delayed extraction. -gg 3/15/2001 */
if (PLR_FLAGGED(victim, PLR_NOTDEADYET) || MOB_FLAGGED(victim, MOB_NOTDEADYET)) if (PLR_FLAGGED(victim, PLR_NOTDEADYET) || MOB_FLAGGED(victim, MOB_NOTDEADYET))
@ -839,7 +848,33 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
if (MOB_FLAGGED(ch, MOB_MEMORY)) if (MOB_FLAGGED(ch, MOB_MEMORY))
forget(ch, victim); forget(ch, victim);
} }
/* Cant determine GET_GOLD on corpse, so do now and store */
if (IS_NPC(victim)) {
local_gold = GET_GOLD(victim);
sprintf(local_buf,"%ld", (long)local_gold);
}
die(victim, ch); die(victim, ch);
if (IS_AFFECTED(ch, AFF_GROUP) && (local_gold > 0) && PRF_FLAGGED(ch, PRF_AUTOSPLIT) ) {
generic_find("corpse", FIND_OBJ_ROOM, ch, &tmp_char, &corpse_obj);
if (corpse_obj) {
for (coin_obj = corpse_obj->contains; coin_obj; coin_obj = next_obj) {
next_obj = coin_obj->next_content;
if (CAN_SEE_OBJ(ch, coin_obj) && isname("coin", coin_obj->name))
extract_obj(coin_obj);
}
do_split(ch,local_buf,0,0);
}
/* need to remove the gold from the corpse */
} else if (!IS_NPC(ch) && (ch != victim) && PRF_FLAGGED(ch, PRF_AUTOGOLD)) {
do_get(ch, "all.coin corpse", 0, 0);
}
if (!IS_NPC(ch) && (ch != victim) && PRF_FLAGGED(ch, PRF_AUTOLOOT)) {
do_get(ch, "all corpse", 0, 0);
}
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOSAC)) {
do_sac(ch,"corpse",0,0);
}
return (-1); return (-1);
} }
return (dam); return (dam);
@ -976,6 +1011,7 @@ void hit(struct char_data *ch, struct char_data *victim, int type)
void perform_violence(void) void perform_violence(void)
{ {
struct char_data *ch; struct char_data *ch;
struct follow_type *k;
for (ch = combat_list; ch; ch = next_combat_list) { for (ch = combat_list; ch; ch = next_combat_list) {
next_combat_list = ch->next_fighting; next_combat_list = ch->next_fighting;
@ -1002,6 +1038,19 @@ void perform_violence(void)
continue; continue;
} }
for (k = ch->followers; k; k=k->next) {
/* should followers auto-assist master? */
if (!IS_NPC(k->follower) && !FIGHTING(k->follower) && PRF_FLAGGED(k->follower,
PRF_AUTOASSIST) && (IN_ROOM(k->follower) == IN_ROOM(ch)))
do_assist(k->follower, GET_NAME(ch), 0, 0);
}
/* should master auto-assist followers? */
if (ch->master && PRF_FLAGGED(ch->master, PRF_AUTOASSIST) &&
FIGHTING(ch) && !FIGHTING(ch->master) &&
(IN_ROOM(ch->master) == IN_ROOM(ch)))
do_assist(ch->master, GET_NAME(ch), 0, 0);
hit(ch, FIGHTING(ch), TYPE_UNDEFINED); hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
if (MOB_FLAGGED(ch, MOB_SPEC) && GET_MOB_SPEC(ch) && !MOB_FLAGGED(ch, MOB_NOTDEADYET)) { if (MOB_FLAGGED(ch, MOB_SPEC) && GET_MOB_SPEC(ch) && !MOB_FLAGGED(ch, MOB_NOTDEADYET)) {
char actbuf[MAX_INPUT_LENGTH] = ""; char actbuf[MAX_INPUT_LENGTH] = "";

View file

@ -397,7 +397,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "peace" , "pe" , POS_DEAD , do_peace , LVL_BUILDER, 0 }, { "peace" , "pe" , POS_DEAD , do_peace , LVL_BUILDER, 0 },
{ "pick" , "pi" , POS_STANDING, do_gen_door , 1, SCMD_PICK }, { "pick" , "pi" , POS_STANDING, do_gen_door , 1, SCMD_PICK },
{ "practice" , "pr" , POS_RESTING , do_practice , 1, 0 }, { "practice" , "pr" , POS_RESTING , do_practice , 1, 0 },
{ "page" , "pag" , POS_DEAD , do_page , LVL_IMMORT, 0 }, { "page" , "pag" , POS_DEAD , do_page , 1, 0 },
{ "pardon" , "pardon" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_PARDON }, { "pardon" , "pardon" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_PARDON },
{ "policy" , "pol" , POS_DEAD , do_gen_ps , 0, SCMD_POLICIES }, { "policy" , "pol" , POS_DEAD , do_gen_ps , 0, SCMD_POLICIES },
{ "pour" , "pour" , POS_STANDING, do_pour , 0, SCMD_POUR }, { "pour" , "pour" , POS_STANDING, do_pour , 0, SCMD_POUR },
@ -619,8 +619,23 @@ void command_interpreter(struct char_data *ch, char *argument)
if (GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level) if (GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level)
break; break;
if (*complete_cmd_info[cmd].command == '\n') if (*complete_cmd_info[cmd].command == '\n') {
send_to_char(ch, "Huh?!?\r\n"); int found = 0;
send_to_char(ch, "Huh!?!\r\n");
for (cmd = 0; *cmd_info[cmd].command != '\n'; cmd++) {
if (*arg != *cmd_info[cmd].command || cmd_info[cmd].minimum_level > GET_LEVEL(ch))
continue;
if (levenshtein_distance(arg, (char *) cmd_info[cmd].command) <= 2) {
if (!found) {
send_to_char(ch, "\r\nDid you mean:\r\n");
found = 1;
}
send_to_char(ch, " %s\r\n", cmd_info[cmd].command);
}
}
}
else if (!IS_NPC(ch) && PLR_FLAGGED(ch, PLR_FROZEN) && GET_LEVEL(ch) < LVL_IMPL) else if (!IS_NPC(ch) && PLR_FLAGGED(ch, PLR_FROZEN) && GET_LEVEL(ch) < LVL_IMPL)
send_to_char(ch, "You try, but the mind-numbing cold prevents you...\r\n"); send_to_char(ch, "You try, but the mind-numbing cold prevents you...\r\n");
else if (complete_cmd_info[cmd].command_pointer == NULL) else if (complete_cmd_info[cmd].command_pointer == NULL)

View file

@ -218,6 +218,11 @@
#define PRF_CLS (1 << 23) /* Clear screen in OLC */ #define PRF_CLS (1 << 23) /* Clear screen in OLC */
#define PRF_BUILDWALK (1 << 24) /* Build new rooms while walking ? */ #define PRF_BUILDWALK (1 << 24) /* Build new rooms while walking ? */
#define PRF_AFK (1 << 25) /* AFK flag */ #define PRF_AFK (1 << 25) /* AFK flag */
#define PRF_AUTOLOOT (1 << 26) /* Loot everything from a corpse */
#define PRF_AUTOGOLD (1 << 27) /* Loot gold from a corpse */
#define PRF_AUTOSPLIT (1 << 28) /* Split gold with group */
#define PRF_AUTOSAC (1 << 29) /* Sacrifice a corpse */
#define PRF_AUTOASSIST (1 << 30) /* Auto-assist toggle */
/* Affect bits: used in char_data.char_specials.saved.affected_by */ /* Affect bits: used in char_data.char_specials.saved.affected_by */
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */

View file

@ -420,7 +420,7 @@ void update_pos(struct char_data *victim);
GET_OBJ_VAL((obj), 3) == 1) GET_OBJ_VAL((obj), 3) == 1)
#define CAN_WEAR(obj, part) OBJWEAR_FLAGGED((obj), (part)) #define CAN_WEAR(obj, part) OBJWEAR_FLAGGED((obj), (part))
#define GET_OBJ_SHORT(obj) ((obj)->short_description)
/* compound utilities and other macros **********************************/ /* compound utilities and other macros **********************************/