[ScryMUD] SVN Commit Info r709 - in branches/version-2-1/mud: . grrmud/help_filter grrmud/server lib/containers lib/log
scrymud at wanfear.com
scrymud at wanfear.com
Wed Nov 24 17:57:08 PST 2004
Author: eroper
Date: 2004-11-24 17:57:05 -0800 (Wed, 24 Nov 2004)
New Revision: 709
Modified:
branches/version-2-1/mud/MakeInclude.bh
branches/version-2-1/mud/grrmud/help_filter/help2html.C
branches/version-2-1/mud/grrmud/server/BugEntry.cc
branches/version-2-1/mud/grrmud/server/SkillSpell.cc
branches/version-2-1/mud/grrmud/server/audit.cc
branches/version-2-1/mud/grrmud/server/battle.cc
branches/version-2-1/mud/grrmud/server/classes.cc
branches/version-2-1/mud/grrmud/server/code_gen.cc
branches/version-2-1/mud/grrmud/server/command2.cc
branches/version-2-1/mud/grrmud/server/command4.cc
branches/version-2-1/mud/grrmud/server/command5.cc
branches/version-2-1/mud/grrmud/server/const.cc
branches/version-2-1/mud/grrmud/server/critter.cc
branches/version-2-1/mud/grrmud/server/ez_skll.cc
branches/version-2-1/mud/grrmud/server/grrmud.cc
branches/version-2-1/mud/grrmud/server/login.cc
branches/version-2-1/mud/grrmud/server/object.cc
branches/version-2-1/mud/grrmud/server/olc2.cc
branches/version-2-1/mud/grrmud/server/room.cc
branches/version-2-1/mud/grrmud/server/spells.cc
branches/version-2-1/mud/grrmud/server/wep_skll.cc
branches/version-2-1/mud/lib/containers/list2.h
branches/version-2-1/mud/lib/log/LogStream.h
Log:
Ported the following changesets from the main-line (trunk)
667:668 compiler issues (gcc3.x) multi-line string lit.'s, etc.
670:672 compiler issues (gcc3.x) see above or orig. commit log
687:688 pending commands vs. spam
690:693 gold split bug-fix, list closed doors as being closed
fixed typo in "circle"
Again, all bets are off on compilers older than gcc 3.x
--Khaav
Modified: branches/version-2-1/mud/MakeInclude.bh
===================================================================
--- branches/version-2-1/mud/MakeInclude.bh 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/MakeInclude.bh 2004-11-25 01:57:05 UTC (rev 709)
@@ -15,7 +15,7 @@
# NOTE: Use these variables if you are using EGCS and glibc 5
CCFLAGS = -g -D_GNU_SOURCE $(BG_NEW_GCC_TEMPLATES) $(GUIDING_DECLS) $(HUGE_OBJECTS) \
- -Wall -I$(MUD_HOME)/include
+ -Wall -Wno-deprecated -I$(MUD_HOME)/include
LDLIBS = -lm -lstring2 -lbitfield -lcrypt #-lnsl # -lsocket
Modified: branches/version-2-1/mud/grrmud/help_filter/help2html.C
===================================================================
--- branches/version-2-1/mud/grrmud/help_filter/help2html.C 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/help_filter/help2html.C 2004-11-25 01:57:05 UTC (rev 709)
@@ -23,8 +23,9 @@
#include <iostream.h>
#include <stdlib.h>
#include <string2.h>
-#include <strstream.h>
+#include <sstream>
+
#ifndef FALSE
#define FALSE 0
#define TRUE 1
@@ -116,7 +117,7 @@
if (line[8] == ':')
strt = 9;
- istrstream ss(line + strt);
+ my_sstream ss(line + strt);
while (ss) {
ss >> tmp;
if (strlen(tmp) == 0) {
@@ -218,23 +219,23 @@
else {
ofstream targ_file(argv[1]);
if (!targ_file) {
- cout << "Can't open targ file." << endl;
- cout << USAGE << endl;
+ cout << "Can't open targ file." << endl;
+ cout << USAGE << endl;
}
else {
- //First, lets create the top portion of the HTML output file.
- targ_file << "
-<html>
-<title>ScryMUD Help</title>
-<BODY TEXT=\"#3366AA\" BGCOLOR=\"#FFFFFF\" LINK=\"#AA7700\" VLINK=\"#AA7700\" ALINK=\"#FF0000\">
-<P>
-<h2><center> Help on commands for ScryMUD </center><P>
-" << endl;
- // Now, a list of all topics available...
- targ_file << "
-<center>
-<table width=80 border=3>
-<caption align=top><strong>Help Topics</strong></caption><h4>" << endl;
+ //First, lets create the top portion of the HTML output file.
+ targ_file <<
+ "<html>\n"
+ "<title>ScryMUD Help</title>\n"
+ "<BODY TEXT=\"#3366AA\" BGCOLOR=\"#FFFFFF\" LINK=\"#AA7700\" VLINK=\"#AA7700\" ALINK=\"#FF0000\">\n"
+ "<P>\n"
+ "<h2><center> Help on commands for ScryMUD </center><P>\n"
+ << endl;
+ // Now, a list of all topics available...
+ targ_file <<
+ "<center>\n"
+ "<table width=80 border=3>\n"
+ "<caption align=top><strong>Help Topics</strong></caption><h4>" << endl;
for (int i = 2; i<argc; i++) {
//grab each name
Modified: branches/version-2-1/mud/grrmud/server/BugEntry.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/BugEntry.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/BugEntry.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -350,8 +350,8 @@
String buf(200);
if (!reports.isEmpty()) {
- dafile << "\n<table width=\"95%\" border=3>
-<caption align=top><strong>";
+ dafile << "\n<table width=\"95%\" border=3>\n"
+ "<caption align=top><strong>";
}
else {
dafile << "<center><b>\n";
@@ -531,37 +531,35 @@
ofstream dafile(tmp_name);
if (dafile) {
- dafile << "
-<HTML>
-<HEAD>
- <TITLE> " << coll_name << " </TITLE>
-</HEAD>
-<BODY BGCOLOR=\"#FFFFFF\">
+ dafile << endl
+ << "<HTML>" << endl
+ << "<HEAD> " << endl
+ << "<TITLE> " << coll_name << " </TITLE>" << endl
+ << "</HEAD>" << endl
+ << "<BODY BGCOLOR=\"#FFFFFF\">" << endl
+ << endl
+ << "<CENTER>" << endl
+ << "<H2>" << endl
+ << "<a href=http://scry.wanfear.com>ScryMUD "
+ << coll_name << "</a></H2></CENTER><P>" << endl
+ << "This is an automagically generated list of <b>" << coll_name << "</b> entries"
+ << "from ScryMUD.<P>" << endl
+ << " <center>\n"
+ "<a href=\"#open\">Open Issues</a> \n"
+ "<a href=\"#assigned\">Assigned Issues</a> \n"
+ "<a href=\"#retest\">Issues to Retest</a> \n"
+ "<a href=\"#closed\">Closed Issues</a>\n"
+ "<a href=\"#defer\">Deferred Issues</a>\n"
+ "</center><P>\n";
-<CENTER>
-<H2>
-<a href=http://scry.wanfear.com>ScryMUD "
- << coll_name << "</a></H2></CENTER><P>
-
-This is an automagically generated list of <b>" << coll_name << "</b> entries
-from ScryMUD.<P>
-
-<center>
-<a href=\"#open\">Open Issues</a>
-<a href=\"#assigned\">Assigned Issues</a>
-<a href=\"#retest\">Issues to Retest</a>
-<a href=\"#closed\">Closed Issues</a>
-<a href=\"#defer\">Deferred Issues</a>
-</center><P>
-";
-
Cell<BugEntry*> cll(bugs);
BugEntry* ptr;
- dafile << "<center>
-<a name=\"open\"></a>
-<h2><u>Open Issues</u></h2><br>
- <table width=\"100%\"border=3>\n";
+ dafile << "<center>\n"
+ "<a name=\"open\"></a>\n"
+ "<h2><u>Open Issues</u></h2><br>\n"
+ "<table width=\"100%\"border=3>\n";
+
while ((ptr = cll.next())) {
if (ptr->getState() == BugEntry::open) {
dafile << "<tr><td>\n";
@@ -570,10 +568,11 @@
}
}//while
- dafile << "</table><P>
-<a name=\"assigned\"></a>
-<h2><u>Assigned Issues</u></h2>
- <table width=\"100%\"border=3>\n";
+ dafile << "</table><P>\n"
+ "<a name=\"assigned\"></a>\n"
+ "<h2><u>Assigned Issues</u></h2>\n"
+ "<table width=\"100%\"border=3>\n";
+
bugs.head(cll);
while ((ptr = cll.next())) {
if (ptr->getState() == BugEntry::assigned) {
@@ -583,10 +582,11 @@
}
}//while
- dafile << "</table><P>
-<a name=\"retest\"></a>
-<h2><u>Issues In Retest</u></h2>
- <table width=\"100%\"border=3>\n";
+ dafile << "</table><P>\n"
+ "<a name=\"retest\"></a>\n"
+ "<h2><u>Issues In Retest</u></h2>\n"
+ "<table width=\"100%\"border=3>\n";
+
bugs.head(cll);
while ((ptr = cll.next())) {
if (ptr->getState() == BugEntry::retest) {
@@ -597,10 +597,11 @@
}//while
- dafile << "</table><P>
-<a name=\"defer\"></a>
-<h2><u>Issues that have been Deferred</u></h2>
- <table width=\"100%\"border=3>\n";
+ dafile << "</table><P>\n"
+ "<a name=\"defer\"></a>\n"
+ "<h2><u>Issues that have been Deferred</u></h2>\n"
+ "<table width=\"100%\"border=3>\n";
+
bugs.head(cll);
while ((ptr = cll.next())) {
if (ptr->getState() == BugEntry::defer) {
@@ -610,10 +611,11 @@
}
}//while
- dafile << "</table><P>
-<a name=\"closed\"></a>
-<h2><u>Closed Issues</u></h2>
- <table width=\"100%\"border=3>\n";
+ dafile << "</table><P>\n"
+ "<a name=\"closed\"></a>\n"
+ "<h2><u>Closed Issues</u></h2>\n"
+ "<table width=\"100%\"border=3>\n";
+
bugs.head(cll);
while ((ptr = cll.next())) {
if (ptr->getState() == BugEntry::closed) {
@@ -623,10 +625,10 @@
}
}//while
- dafile << "</table></center>\n\n<hr>
-<ADDRESS>
-Generated by:<A HREF=\"mailto:greear at cyberhighway.net\">ScryMUD Admin</A>
-</ADDRESS></body></html>\n";
+ dafile << "</table></center>\n\n<hr>\n"
+ "<ADDRESS>\n"
+ "Generated by:<A HREF=\"mailto:greear at cyberhighway.net\">ScryMUD Admin</A>\n"
+ "</ADDRESS></body></html>\n";
dafile << flush;
dafile.close();
Modified: branches/version-2-1/mud/grrmud/server/SkillSpell.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/SkillSpell.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/SkillSpell.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -251,14 +251,14 @@
if (retval) {
if (!retval->isInUse()) {
Sprintf(buf,
- "ERROR: Tried to return non-existant scroll: %i in get_number_of_scroll.\n",
- retval);
+ "ERROR: Tried to return non-existant scroll: %i in get_number_of_scroll.\n",
+ retval);
mudlog.log(ERROR, buf);
return NULL;
}//if
if (!retval->isScroll()) {
- Sprintf(buf, "ERROR: Tried to return scroll that was NOT a
-scroll: %i in get_number_of_scroll.\n", retval->getIdNum());
+ Sprintf(buf, "ERROR: Tried to return scroll that was NOT a \n"
+ "scroll: %i in get_number_of_scroll.\n", retval->getIdNum());
mudlog.log(ERROR, buf);
return NULL;
}//if
@@ -434,27 +434,27 @@
String SSCollection::generateHtml() {
String retval(5000);
- retval = "
-<HTML>
-<HEAD>
- <TITLE> SKILLS SPELLS List </TITLE>
-</HEAD>
-<BODY TEXT=\"#3366AA\" BGCOLOR=\"#FFFFFF\" LINK=\"#AA7700\" VLINK=\"#AA7700\"
-ALINK=\"#FF0000\">
+ retval = "\n"
+"<HTML>\n"
+"<HEAD>\n"
+" <TITLE> SKILLS SPELLS List </TITLE>\n"
+"</HEAD>\n"
+"<BODY TEXT=\"#3366AA\" BGCOLOR=\"#FFFFFF\" LINK=\"#AA7700\" VLINK=\"#AA7700\"\n"
+"ALINK=\"#FF0000\">\n"
+"\n"
+"<CENTER>\n"
+"<H2>\n"
+"<FONT COLOR=\"#FFCC00\">Skills and Spells</FONT></H2></CENTER>\n"
+"This is a list of skills and spells that have been added to the official\n"
+"list of skills and spells for ScryMUD. Not all of these have been written\n"
+"into the game yet, but I'm working on it. It became clear to me that we\n"
+"need more, and a better structure as well. I will comment this first one\n"
+"so you can get a feal for what the list means. The general ideas is that\n"
+"you must first gain all the prerequisites for a skill or spell before you\n"
+"can learn it. Thus, we can determine the range of skills and spells a person\n"
+"can learn by limiting the prerequisites we give them upon login for the\n"
+"first time.<P>";
-<CENTER>
-<H2>
-<FONT COLOR=\"#FFCC00\">Skills and Spells</FONT></H2></CENTER>
-This is a list of skills and spells that have been added to the official
-list of skills and spells for ScryMUD. Not all of these have been written
-into the game yet, but I'm working on it. It became clear to me that we
-need more, and a better structure as well. I will comment this first one
-so you can get a feal for what the list means. The general ideas is that
-you must first gain all the prerequisites for a skill or spell before you
-can learn it. Thus, we can determine the range of skills and spells a person
-can learn by limiting the prerequisites we give them upon login for the
-first time.<P>";
-
//Lets make an index!!
SortedPtrList<String> lst;
for (int i = 0; i<NUMBER_OF_SKILL_SPELLS; i++) {
@@ -463,8 +463,8 @@
}//if
}//for
- retval.Append("<center><table width=80 border=3>
-<caption align=top><strong>ScryMUD Skills and Spells</strong></caption><h4>\n\n");
+ retval.Append("<center><table width=80 border=3>\n"
+ "<caption align=top><strong>ScryMUD Skills and Spells</strong></caption><h4>\n\n");
Cell<String*> cll(lst);
String* ptr;
@@ -504,12 +504,12 @@
}//if
}//for
- retval.Append("\n\n
-<ADDRESS>
-Generated by:<A HREF=\"mailto:greear at cyberhighway.net\">Grock</A>
-</ADDRESS>
-</BODY>
-</HTML>\n");
+ retval.Append("\n\n\n"
+"<ADDRESS>\n"
+"Generated by:<A HREF=\"mailto:greear at cyberhighway.net\">Grock</A>\n"
+"</ADDRESS>\n"
+"</BODY>\n"
+"</HTML>\n");
return retval;
}//generateHtml
Modified: branches/version-2-1/mud/grrmud/server/audit.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/audit.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/audit.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -43,10 +43,10 @@
#include <stdlib.h>
-char* usage = "audit [file] [type] [arg1 arg2 ...]
-Supported types:
- OBJ [address in hex: eg. 0xAABBccDd]
-";
+char* usage = "audit [file] [type] [arg1 arg2 ...]\n"
+"Supported types:\n"
+" OBJ [address in hex: eg. 0xAABBccDd]\n"
+"\n";
int core_dump(const char* msg) {
cerr << "Dumping core on purpose: " << msg << endl;
Modified: branches/version-2-1/mud/grrmud/server/battle.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/battle.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/battle.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -1398,15 +1398,15 @@
Sprintf(buf, "the tattered skin of %S", Top(vict.names));
ptr->short_desc = buf;
Sprintf(buf, "The tattered skin of %S lies here.",
- Top(vict.names));
+ Top(vict.names));
ptr->in_room_desc = buf;
Sprintf(buf,
-"This large piece of %s skin was recently hacked from the corpse of %S.
-You wonder why anyone would want the skin of a %s, but perhaps it is just
-a trophy--a symbol of %S's defeat.\n",
- get_race_name(vict.RACE),
- name_of_crit(vict, ~0), get_race_name(vict.RACE),
- name_of_crit(vict, ~0));
+ "This large piece of %s skin was recently hacked from the corpse of %S.\n"
+ "You wonder why anyone would want the skin of a %s, but perhaps it is just\n"
+ "a trophy--a symbol of %S's defeat.\n",
+ get_race_name(vict.RACE),
+ name_of_crit(vict, ~0), get_race_name(vict.RACE),
+ name_of_crit(vict, ~0));
ptr->long_desc = buf;
corpse->obj_proc->obj_spec_data_flags.turn_on(2);
}//if
Modified: branches/version-2-1/mud/grrmud/server/classes.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/classes.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/classes.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -104,26 +104,26 @@
}
case 'h':
case 'u': {
- cout << "ScryMUD Usage:
--l --log_level bitfield (add up the integer values listed below)
- DIS = 1, //disasters
- ERR = 2, //errors
- WRN = 4, //warnings
- INF = 8, //info
- TRC = 16, //function trace
- DBG = 32, //debug
- SEC = 64, // log security violations
- DB = 128, // READ or WRITE to NVDS
- XMT = 256, // Server to client comm.
- INP = 512, // Input from clients.
- SCRIPT = 1024, //Scripting specific
- PARSE = 2048, //PARSE specific
- DBG2 = 4096, //More verbose than debug.
- ALL = 65535 = ~(0) // all
--p --port Specify server port
--v --version Print out build/version information.
--h --help Print this message.
--u --usage Print this message.\n\n";
+ cout << "ScryMUD Usage:\n"
+ "-l --log_level bitfield (add up the integer values listed below)\n"
+ " DIS = 1, //disasters\n"
+ " ERR = 2, //errors\n"
+ " WRN = 4, //warnings\n"
+ " INF = 8, //info\n"
+ " TRC = 16, //function trace\n"
+ " DBG = 32, //debug\n"
+ " SEC = 64, // log security violations\n"
+ " DB = 128, // READ or WRITE to NVDS\n"
+ " XMT = 256, // Server to client comm.\n"
+ " INP = 512, // Input from clients.\n"
+ " SCRIPT = 1024, //Scripting specific\n"
+ " PARSE = 2048, //PARSE specific\n"
+ " DBG2 = 4096, //More verbose than debug.\n"
+ " ALL = 65535 = ~(0) // all\n"
+ "-p --port Specify server port\n"
+ "-v --version Print out build/version information.\n"
+ "-h --help Print this message.\n"
+ "-u --usage Print this message.\n\n";
do_shutdown = TRUE;
exit(0);
break;
Modified: branches/version-2-1/mud/grrmud/server/code_gen.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/code_gen.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/code_gen.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -37,36 +37,34 @@
int __cell_cnt;
char* header =
-"//
-//ScryMUD Server Code
-//Copyright (C) 1998 Ben Greear
-//
-// NOTE: This code was autogenerated by the code_gen.cc program. If you
-// need to make modifications, do it there! --BLG
-//
-//This program is free software; you can redistribute it and/or
-//modify it under the terms of the GNU General Public License
-//as published by the Free Software Foundation; either version 2
-//of the License, or (at your option) any later version.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License
-//along with this program; if not, write to the Free Software
-//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)
-// greearb at agcs.com
-//
-//
-// NOTE: This code was autogenerated by the code_gen.cc program. If you
-// need to make modifications, do it there! --BLG
+"//\n"
+"//ScryMUD Server Code\n"
+"//Copyright (C) 1998 Ben Greear\n"
+"//\n"
+"// NOTE: This code was autogenerated by the code_gen.cc program. If you\n"
+"// need to make modifications, do it there! --BLG\n"
+"//\n"
+"//This program is free software; you can redistribute it and/or\n"
+"//modify it under the terms of the GNU General Public License\n"
+"//as published by the Free Software Foundation; either version 2\n"
+"//of the License, or (at your option) any later version.\n"
+"//\n"
+"//This program is distributed in the hope that it will be useful,\n"
+"//but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+"//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+"//GNU General Public License for more details.\n"
+"//\n"
+"//You should have received a copy of the GNU General Public License\n"
+"//along with this program; if not, write to the Free Software\n"
+"//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"
+"//\n"
+"// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)\n"
+"// greearb at agcs.com\n"
+"//\n"
+"//\n"
+"// NOTE: This code was autogenerated by the code_gen.cc program. If you\n"
+"// need to make modifications, do it there! --BLG\n";
-";
-
int core_dump(const char* msg) {
cerr << "ERROR: " << msg << endl;
exit(1);
@@ -91,6 +89,7 @@
char junk[200];
String tmp_lang(50);
String tmp_val;
+ String tmp_val_fixed;
clear();
@@ -119,8 +118,22 @@
<< ":- Exiting." << endl;
exit(2);
}//if
- vals.append(new LVPair(tmp_lang, tmp_val));
+ // Yes, someone shoot me, at least the output will be purdies!
+ {
+ tmp_val_fixed.Clear();
+ unsigned int i;
+ for(i=0;i<tmp_val.Strlen();i++) {
+ if ( tmp_val.charAt(i) == '\n' ) {
+ tmp_val_fixed.append("\\n\"\n \"");
+ } else {
+ tmp_val_fixed.append(tmp_val.charAt(i));
+ }
+ }
+ } // end of shoot me isolation because I'm lazy
+
+ vals.append(new LVPair(tmp_lang, tmp_val_fixed));
+
dafile >> tmp_lang;
}//while
return 0;
@@ -325,14 +338,15 @@
// NOTE: If you change the language enum below, you will need to
// modify the LanguageEntry code, especially the NUM_LANGUAGES #define
// and the getConstArray() method. --BEN
- of_h << "
-#ifndef __INCLUDE_AUTOGEN_LANGUAGE_H__
-#define __INCLUDE_AUTOGEN_LANGUAGE_H__
+ of_h << "\n"
+ "#ifndef __INCLUDE_AUTOGEN_LANGUAGE_H__\n"
+ "#define __INCLUDE_AUTOGEN_LANGUAGE_H__\n"
+ "\n"
+ "#include <string2.h>\n"
+ "\n"
+ "// I expect this may grow.\n"
+ "enum LanguageE {\n";
-#include <string2.h>
-
-// I expect this may grow.
-enum LanguageE {\n";
for (int j = 0; j<NUM_LANGUAGES; j++) {
of_h << " " << languages[j] << "," << endl;
}
@@ -358,24 +372,27 @@
}
of_h << "};//CSentryE enum\n\n";
- of_h << "
-class CSHandler {
-public:
- static const char* getString(CSentryE which_string, LanguageE language);
-};
+ of_h << "\n"
+ "class CSHandler {\n"
+ "public:\n"
+ " static const char* getString(CSentryE which_string, LanguageE language);\n"
+ "};\n"
+ "\n"
+ "\n"
+ "#endif\n\n";
-#endif\n\n";
of_h << flush;
// Done with .h file, lets start on the .cc file
of_cc << header;
- of_cc << "
-#include \"lang_strings.h\"
+ of_cc << "\n"
+ "\n"
+ "#include \"lang_strings.h\"\n"
+ "\n"
+ "const char* language_strings[LS_ENTRIES][LS_PER_ENTRY] = {\n";
-const char* language_strings[LS_ENTRIES][LS_PER_ENTRY] = {\n";
-
for (int i = 0; i<cnt; i++) {
of_cc << " /* " << language_entries[i]->getEnumName() << " */" << endl;
of_cc << language_entries[i]->getConstArray();
@@ -387,18 +404,18 @@
of_cc << "}; //language_strings\n\n";
- of_cc << "
-const char* CSHandler::getString(CSentryE which_string, LanguageE language) {
- const char* retval = language_strings[(int)(which_string)][(int)(language)];
- if (retval) {
- return retval;
- }
- else {
- // Default to English...
- // TODO: Be smarter here, ie Portuguese defaults to Spanish??
- return language_strings[(int)(which_string)][0];
- }//else
-}//getString\n\n";
+ of_cc << endl <<
+ "const char* CSHandler::getString(CSentryE which_string, LanguageE language) {\n"
+ " const char* retval = language_strings[(int)(which_string)][(int)(language)];\n"
+ " if (retval) {\n"
+ " return retval;\n"
+ " }\n"
+ " else {\n"
+ " // Default to English...\n"
+ " // TODO: Be smarter here, ie Portuguese defaults to Spanish??\n"
+ " return language_strings[(int)(which_string)][0];\n"
+ " }//else\n"
+ "}//getString\n\n";
of_cc << flush;
@@ -417,37 +434,37 @@
// add the starting stuff.
cmd_enum.Append("enum CmdId {\n");
- cmd_instantiations.Append("#define ADD_NEW_CMD cmds_collection.addCmdSpecifierNoCreate
+ cmd_instantiations.Append(
+ "#define ADD_NEW_CMD cmds_collection.addCmdSpecifierNoCreate\n"
+ "void initCmdsCollection() { \n");
-void initCmdsCollection() { \n");
-
exe_cmds.Append("//Add a few #defines to cut down on the huge file size!\n\n");
- exe_cmds.Append("
-#define CODE_GEN_EXE_HEADER \
-String& str1, String& str2, String& str3, String& str4, \
-String& str5, int i, int j, int k, int l, int m, int n,\
-int& is_dead, critter& pc, critter* c_script_owner, \
-room* r_script_owner, String* cooked_strs, int* cooked_ints, \
-int do_sub, int sanity, int was_ordered
-\n");
+ exe_cmds.Append("\n"
+ "#define CODE_GEN_EXE_HEADER "
+ "String& str1, String& str2, String& str3, String& str4, "
+ "String& str5, int i, int j, int k, int l, int m, int n, "
+ "int& is_dead, critter& pc, critter* c_script_owner, "
+ "room* r_script_owner, String* cooked_strs, int* cooked_ints, "
+ "int do_sub, int sanity, int was_ordered"
+ "\n");
+
// Hopefully, a smart compiler will get rid of this test. It's
// here to keep the compiler from complaining about un-used variables.
// --BLG
- exe_cmds.Append("
-#define CODE_GEN_VAR_TEST_IF \
-1 || &str1 || &str2 || &str3 || &str4 || &str5 || i || j || k || l \
-|| m || n || is_dead || &pc ||c_script_owner || r_script_owner \
-|| cooked_strs || cooked_ints || do_sub || sanity || was_ordered\n\n");
+ exe_cmds.Append("\n"
+ "#define CODE_GEN_VAR_TEST_IF "
+ "1 || &str1 || &str2 || &str3 || &str4 || &str5 || i || j || k || l "
+ "|| m || n || is_dead || &pc ||c_script_owner || r_script_owner "
+ "|| cooked_strs || cooked_ints || do_sub || sanity || was_ordered\n\n");
- exe_cmds.Append("
-class ExeCmd {
-public:
- virtual int execute(CODE_GEN_EXE_HEADER) = 0; //pure virtual
-};\n");
+ exe_cmds.Append("\n"
+ "class ExeCmd {\n"
+ "public:\n"
+ " virtual int execute(CODE_GEN_EXE_HEADER) = 0; //pure virtual\n"
+ "};\n");
-
cmd_array.Append("void initCmdsArray() {\n");
@@ -512,17 +529,18 @@
if (!done_exe_already) {
cmd_count++;
- Sprintf(tmp, "
-class ExeCmd_%S : public ExeCmd {
-public:
- int execute(CODE_GEN_EXE_HEADER) {
- if (CODE_GEN_VAR_TEST_IF) {
- %S
- } else return 0;
- }//execute
-};//ExeCmd\n",
- &(cmd_input.aliases[0]), &(cmd_input.cmd));
+ Sprintf(tmp, "\n"
+ "class ExeCmd_%S : public ExeCmd {\n"
+ "public:\n"
+ " int execute(CODE_GEN_EXE_HEADER) {\n"
+ " if (CODE_GEN_VAR_TEST_IF) {\n"
+ " %S\n"
+ " } else return 0;\n"
+ " }//execute\n"
+ "};//ExeCmd\n",
+ &(cmd_input.aliases[0]), &(cmd_input.cmd));
+
exe_cmds.Append(tmp);
// Now, lets add the code that will place this in an array.
@@ -541,32 +559,32 @@
// Now, have read everything in..lets put the code together.
of_h << header;
- of_h << "
-#ifndef __INCLUDE_AUTOGEN_CMD_H__
-#define __INCLUDE_AUTOGEN_CMD_H__
+ of_h << "\n"
+ "#ifndef __INCLUDE_AUTOGEN_CMD_H__\n"
+ "#define __INCLUDE_AUTOGEN_CMD_H__\n"
+ "\n"
+ "#include \"ar_skll.h\"\n"
+ "#include \"cr_skll.h\"\n"
+ "#include \"social2.h\"\n"
+ "#include \"ez_skll.h\"\n"
+ "#include \"dam_skll.h\"\n"
+ "#include \"misc.h\"\n"
+ "#include \"misc2.h\"\n"
+ "#include \"commands.h\"\n"
+ "#include \"command2.h\"\n"
+ "#include \"command3.h\"\n"
+ "#include \"command4.h\"\n"
+ "#include \"command5.h\"\n"
+ "#include \"spells.h\"\n"
+ "#include \"skills.h\"\n"
+ "#include \"olc.h\"\n"
+ "#include \"olc2.h\"\n"
+ "#include \"socials.h\"\n"
+ "#include \"classes.h\"\n"
+ "#include \"wep_skll.h\"\n"
+ "#include \"parse.h\"\n"
+ "#include \"script.h\"\n\n";
-#include \"ar_skll.h\"
-#include \"cr_skll.h\"
-#include \"social2.h\"
-#include \"ez_skll.h\"
-#include \"dam_skll.h\"
-#include \"misc.h\"
-#include \"misc2.h\"
-#include \"commands.h\"
-#include \"command2.h\"
-#include \"command3.h\"
-#include \"command4.h\"
-#include \"command5.h\"
-#include \"spells.h\"
-#include \"skills.h\"
-#include \"olc.h\"
-#include \"olc2.h\"
-#include \"socials.h\"
-#include \"classes.h\"
-#include \"wep_skll.h\"
-#include \"parse.h\"
-#include \"script.h\"\n\n";
-
of_cc << header;
of_cc << "#include \"code_gen.h\"\n";
of_cc << "#include \"parse.h\"\n";
Modified: branches/version-2-1/mud/grrmud/server/command2.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/command2.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/command2.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -435,11 +435,19 @@
dr_ptr->isSecretWhenOpen())) {
dest = abs(dr_ptr->destination);
if (pc.isImmort()) { //if immortal, show extra info
- Sprintf(buf, "%s[%i] ", abbrev_dir_of_door(*dr_ptr),
+ Sprintf(buf, "%s[%i]", abbrev_dir_of_door(*dr_ptr),
dest);
+ if ( dr_ptr->isClosed() ) {
+ buf.Append("(closed)");
+ }
+ buf.Append(" ");
}//if
else {
- Sprintf(buf, "%s ", abbrev_dir_of_door(*dr_ptr));
+ Sprintf(buf, "%s", abbrev_dir_of_door(*dr_ptr));
+ if ( dr_ptr->isClosed() ) {
+ buf.Append("(closed)");
+ }
+ buf.Append(" ");
}//else
reg_disp.Append(buf);
Modified: branches/version-2-1/mud/grrmud/server/command4.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/command4.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/command4.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -2829,14 +2829,14 @@
if (vict->Strlen() == 0) {
show("NOTE: some of these may be restricted from you.\n", pc);
show("These are your choices, range is in parentheses:\n", pc);
- show("toggle_flag:
+ show("toggle_flag:\n"
+ "\n"
+ "0 open exit, basically no door, 1 is_mag_lockable, 2 is_closed, 3 is_locked,\n"
+ "4 is_pickable, 5 is_lockable, 6 mag_locked (spell only can open it),\n"
+ "7 is_destructable, 8 is_closeable, 9 is_flippable, \n"
+ "11 is_unopenable (other than normal reasons)\n"
+ "12 is_vehicle_exit, 13 is_secret, 14 is_blocked, 16 hidden_when_open.\n\n", pc);
-0 open exit, basically no door, 1 is_mag_lockable, 2 is_closed, 3 is_locked,
-4 is_pickable, 5 is_lockable, 6 mag_locked (spell only can open it),
-7 is_destructable, 8 is_closeable, 9 is_flippable,
-11 is_unopenable (other than normal reasons)
-12 is_vehicle_exit, 13 is_secret, 14 is_blocked, 16 hidden_when_open.\n\n", pc);
-
show("vis_bit (web page has definitions)\n", pc);
show("key_num (0, MAX_ITEM_NUM)\n", pc);
show("token_num (0, MAX_ITEM_NUM)\n", pc);
Modified: branches/version-2-1/mud/grrmud/server/command5.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/command5.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/command5.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -225,8 +225,8 @@
int ln;
const char* usage =
-"USAGE: color [text_type] [color]
-See 'help color' for more information.\n";
+ "USAGE: color [text_type] [color]\n"
+ "See 'help color' for more information.\n";
if (pc.isPc()) {
ln = max(var.Strlen(), 3);
@@ -399,8 +399,8 @@
return -1;
}
- pc.show("These scripts are defined for this mob, the actual scripts
-may be seen by using the stat_script [mob_num] [script_index] command.\n\n");
+ pc.show("These scripts are defined for this mob, the actual scripts\n"
+ "may be seen by using the stat_script [mob_num] [script_index] command.\n\n");
return do_list_scripts(mob_list[mob_num], pc);
}
@@ -2477,12 +2477,12 @@
return 0;
}
- Sprintf(buf, "ScryMUD version: %s
-Built on: %s
-On Machine: %s
-By: %s\n\n",
- BuildInfo::getVersion(), BuildInfo::getBuildDate(),
- BuildInfo::getBuildMachine(), BuildInfo::getBuilder());
+ Sprintf(buf, "ScryMUD version: %s\n"
+ "Built on: %s\n"
+ "On Machine: %s\n"
+ "By: %s\n\n",
+ BuildInfo::getVersion(), BuildInfo::getBuildDate(),
+ BuildInfo::getBuildMachine(), BuildInfo::getBuilder());
pc.show(buf);
Sprintf(buf, "Listening on port: %i\n", config.port);
Modified: branches/version-2-1/mud/grrmud/server/const.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/const.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/const.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -604,61 +604,61 @@
char* login_prompts[] = {
"\nEnter thy name: ",
- /* for new players */
-
+ /* for new players */
+
//"\n\x9B\x4D\x31\x32\x68\nChoose a Password: ",
//"\n\x9B\x4D\x31\x32\x68\nEnter your password again for verification: ",
"\nChoose a Password (Will be Echoed): ",
- "\nEnter your password again for verification: ",
- "(M)ale, (F)emale, or (N)euter: ",
- "\n\nSelection of Classes: \n
- Your class may affect your stats and will have an influence on
- the skills you are able to acquire.
- Warrior (1)
- Sage (2)
- Wizard (3)
- Ranger (4)
- Thief (5)
- Cleric (7)
- Bard (8)
- Necromancer (9)
+ "\nEnter your password again for verification: ",
+ "(M)ale, (F)emale, or (N)euter: ",
+ "\n\nSelection of Classes: \n\n"
+ " Your class may affect your stats and will have an influence on\n"
+ " the skills you are able to acquire.\n"
+ " Warrior (1) \n"
+ " Sage (2)\n"
+ " Wizard (3)\n"
+ " Ranger (4)\n"
+ " Thief (5)\n"
+ " Cleric (7)\n"
+ " Bard (8)\n"
+ " Necromancer (9)\n"
+ "\n"
+ " Enter 'help' or (0) for descriptions of the classes.\n"
+ "\n"
+ " Your choice is: ",
+ /* for non-new players */
- Enter 'help' or (0) for descriptions of the classes.
+ //"\n\x9B\x31\x32\x68\nEnter your password: ",
+ "\nEnter your password (Will be echoed): ",
- Your choice is: ",
- /* for non-new players */
+ "\nChoose your Race, or you can choose help on the races.\n"
+ "\n"
+ " Race Help on Race\n"
+ " Human (1) (101)\n"
+ " Anitre (2) (102)\n"
+ " Darkling (4) (104)\n"
+ " Dwarf (7) (107)\n"
+ " Ogrue (9) (109)\n"
+ " Elf (11) (111)\n"
+ "\n"
+ " Your choice: ",
- //"\n\x9B\x31\x32\x68\nEnter your password: ",
- "\nEnter your password (Will be echoed): ",
-
- "\nChoose your Race, or you can choose help on the races.
+ /* case 6 */
+ "\n"
+ "Choose your preferred language:\n"
+ "Lengua:\n"
+ "\n"
+ " English (0)\n"
+ " Espanol (1)\n"
+ " Portugues (2)\n"
+ " Italian (3)\n"
+ " Serbian (4)\n"
+ " German (5)\n"
+ " Polish (6)\n"
+ "\n"
+ " Your choice:\n"
+ " Selection: "
- Race Help on Race
- Human (1) (101)
- Anitre (2) (102)
- Darkling (4) (104)
- Dwarf (7) (107)
- Ogrue (9) (109)
- Elf (11) (111)
-
- Your choice: ",
-
- /* case 6 */
- "
-Choose your preferred language:
-Lengua:
-
- English (0)
- Espanol (1)
- Portugues (2)
- Italian (3)
- Serbian (4)
- German (5)
- Polish (6)
-
- Your choice:
- Selection: "
-
}; //login_prompts
// This race was never defined good enough to add.
@@ -668,620 +668,619 @@
/* data for OLC */
char* olc_prompts[] = {
-/* 0 */
-"\n\nWhich do you wish to create: \n
-(1)object, (2)critter, (3)room, (4)door, (5)quit, (6)vehicle\n",
-
-/* 1 */ /* here is output for the object. */
-"\nInput the object_num:
-If you don't know, guess, the system will suggest one.\n",
+ /* 0 */
+ "\n\nWhich do you wish to create: \n\n"
+ "(1)object, (2)critter, (3)room, (4)door, (5)quit, (6)vehicle\n",
-/* 2 */
-"\nInput a name, one word, '~', by itself, terminates.
-Example: garland rose ~\n",
+ /* 1 */ /* here is output for the object. */
+ "\nInput the object_num: \n"
+ "If you don't know, guess, the system will suggest one.\n",
-/* 3 */
-"\nInput the short description.
-Example: a garland\n",
+ /* 2 */
+ "\nInput a name, one word, '~', by itself, terminates.\n"
+ "Example: garland rose ~\n",
-/* 4 */
-"\nInput the in_room_description, do capitalize:
-Example: A short sword sits here rusting.\n",
+ /* 3 */
+ "\nInput the short description.\n"
+ "Example: a garland\n",
-/* 5 */
-"\nInput the long description, '~', ON LINE BY ITSELF, terminates:
-Example:
- You see a sparsely descripted object lying here.
-~\n",
+ /* 4 */
+ "\nInput the in_room_description, do capitalize:\n"
+ "Example: A short sword sits here rusting.\n",
-/* 6 */
-"\nTime to set obj_flags. The number of the flag will toggle it,
-a -1 terminates.
+ /* 5 */
+ "\nInput the long description, '~', ON LINE BY ITSELF, terminates:\n"
+ "Example:\n"
+ " You see a sparsely descripted object lying here.\n"
+ "~\n",
-0 no_rest, 1 !evil, 2 !neutral, 3 !good, 4 !donate, 5 !drop, 6 !remove,
-7 !mortal, 8 !imm, 9 !demi, 10 !god, 11 !Warrior, 12 !sage, 13 !wizard,
-14 !ranger, 15 !thief, 16 !alchemist, 17 !cleric, 18 !bard, 19 !mob, 20 !pc
+ /* 6 */
+ "\nTime to set obj_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "0 no_rest, 1 !evil, 2 !neutral, 3 !good, 4 !donate, 5 !drop, 6 !remove, \n"
+ "7 !mortal, 8 !imm, 9 !demi, 10 !god, 11 !Warrior, 12 !sage, 13 !wizard, \n"
+ "14 !ranger, 15 !thief, 16 !alchemist, 17 !cleric, 18 !bard, 19 !mob, 20 !pc\n"
+ "\n"
+ "21 not worn, 22 head, 23 neck, 24 neck, 25 around body, 26 arms, 27 wrist1,\n"
+ "28 wrist2, 29 hands, 30 wielded, 31 held, 32 light, 33 body, 34 belt,\n"
+ "35 legs, 36 feet, 37 finger1, 38 finger2, 39 shield,\n"
+ "\n"
+ "40 not a weapon, 41 slash, 42 smash, 43 pierce, 44 whip, 45 needs_ammo,\n"
+ "46 dart_thrower, 47 bow, 48 dart, 49 arrow, 50 junk, 51 wand, 52 potion,\n"
+ "53 scroll, 54 container, 55 coins, 56 armor, 57 weapon, 58 light_source,\n"
+ "59 canteen, 60 liquid, 61 food, 62 boat, \n"
+ "63 has_spec_proc_data { flag for scrolls, potions, wands...}\n"
+ "64 toolbox, 65 cauldron, 66 pen, 67 (DO NOT USE),\n"
+ "68 (DO NOT USE), 69 parchment (for scribing), 71 (DO NOT USE),\n"
+ "72 herb, 73 vend_machine, 74 bulletin_board, 75 is_butcherable,\n"
+ "76 has_obj_script, 77 is_two_handed 78 !necromancer\n"
+ "\n"
+ "\n"
+ "*** If you're making a weapon, please consider flagging a flag between\n"
+ " 41 and 49 inclusive. This will help determine damage messages.\n"
+ "*** Remember to flag 63 if you want spec procs. ***\n",
-21 not worn, 22 head, 23 neck, 24 neck, 25 around body, 26 arms, 27 wrist1,
-28 wrist2, 29 hands, 30 wielded, 31 held, 32 light, 33 body, 34 belt,
-35 legs, 36 feet, 37 finger1, 38 finger2, 39 shield,
+ /* 7 */
+ "\nEnter all these extras at once please:\n"
+ " \n"
+ "(1)charges or light_count, (2)times rechargeable (wands), \n"
+ "(3)load percentage, (4)max_in_game, \n"
+ "(5)weight(lbs), (6)dice_sides, \n"
+ "(7)dice_count, (8)level\n"
+ "Example: 0 0 25 15 5 3 2 5\n"
+ "\n"
+ "WARNING: if you make the object too powerful it will be deleted.\n"
+ "7d4 is the max, and most should fall well under that.\n",
-40 not a weapon, 41 slash, 42 smash, 43 pierce, 44 whip, 45 needs_ammo,
-46 dart_thrower, 47 bow, 48 dart, 49 arrow, 50 junk, 51 wand, 52 potion,
-53 scroll, 54 container, 55 coins, 56 armor, 57 weapon, 58 light_source,
-59 canteen, 60 liquid, 61 food, 62 boat,
-63 has_spec_proc_data { flag for scrolls, potions, wands...}
-64 toolbox, 65 cauldron, 66 pen, 67 (DO NOT USE),
-68 (DO NOT USE), 69 parchment (for scribing), 71 (DO NOT USE),
-72 herb, 73 vend_machine, 74 bulletin_board, 75 is_butcherable,
-76 has_obj_script, 77 is_two_handed 78 !necromancer
+ /* 8 */
+ "\nEnter all these cur_stats at once please:\n"
+ "\n"
+ "vis_bit (To calculate add flags up:\n"
+ " {2 invis, 4 hidden, 8 god_invis1},\n"
+ "price, (for comparison: a good sword 4d4 should be around 3k)\n",
+ /* 9 */
+ "\nReading in bag_specific information. First, the bag_flags.\n"
+ "The number of the flag will toggle it, a -1 terminates.\n"
+ "\n"
+ "0 NULL, 1 NULL, 2 is_closed, 3 is_locked, 4 is_pickable, 5 is_mag_lockable,\n"
+ "6 is_mag_locked, 7 is_destructable, 8 is_corpse (probably shouldn't use)\n"
+ "9 is_NON_closeable, 10 player_owned, 17 consumes_key\n",
-*** If you're making a weapon, please consider flagging a flag between
- 41 and 49 inclusive. This will help determine damage messages.
-*** Remember to flag 63 if you want spec procs. ***\n",
+ /* 10 */
+ "\nEnter all of these bag data at once please:\n"
+ "\n"
+ "(1)key number (zero if no key), \n"
+ "(2)maximum weight(lbs) NOTE: this is ITSELF plus its INVENTORY\n"
+ "(3)percentage weight (normal is 100), \n"
+ "(4)time till it disolves, (probably should make this -1)\n",
-/* 7 */
-"\nEnter all these extras at once please:
-
-(1)charges or light_count, (2)times rechargeable (wands),
-(3)load percentage, (4)max_in_game,
-(5)weight(lbs), (6)dice_sides,
-(7)dice_count, (8)level
-Example: 0 0 25 15 5 3 2 5
+ /* 11 */
+ "\nEnter any spells the item is to be Affected By:\n"
+ "spell number, followed by duration; -1 for duration is permanent.\n"
+ "A -1 for spell number terminates. None in yet, choose -1.\n",
-WARNING: if you make the object too powerful it will be deleted.
-7d4 is the max, and most should fall well under that.\n",
+ /* 12 */
+ "\nEnter the item's inventory, all at once, but ONLY IF ITS A CONTAINER:\n"
+ "A -1 will terminate. Also, make sure the item exists! 'olist' can help\n"
+ "you figure out which you want to use.\n"
+ "Example: 1 6 5 -1\n",
-/* 8 */
-"\nEnter all these cur_stats at once please:
+ /* 13 */
+ "\nNow for the Stat Affects:\n"
+ "stat number, followed by the change; A -1 for stat number terminates.\n"
+ "Example: 2 3 -1\n"
+ "Here are the stats you can fiddle with:\n"
+ "\n"
+ "1 str, 2 int, 3 con, 4 cha, 5 wis, 6 dex, 7 hit, 8 dam, 9 ac, 10 attacks,\n"
+ "11 pause_count, 15 hp, 16 mana, 17 mov, 18 align, 19 level, 23 hp_max,\n"
+ "24 mana_max, 25 mov_max, 27 damage_received_modifier, 28 damage_given_modifier,\n"
+ "29 heat_resis, 30 cold_resis, 31 elect_resis, 32 spell_resis, 35 bare_hand_dice_count, \n"
+ "36 bare_hand_dice_sides, 37 hp_regen, 38 mana_regen, 39 mov_regen,\n"
+ "100 hunger, 101 thirst, 102 drugged.\n"
+ "\n"
+ "WARNING: Once again, moderation is needed, if it is too extreme it will be\n"
+ " deleted. This is NOT a twink MUD!\n",
-vis_bit (To calculate add flags up:
- {2 invis, 4 hidden, 8 god_invis1},
-price, (for comparison: a good sword 4d4 should be around 3k)\n",
+ /* 14 */
+ "\nTime to set obj_proc_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "0 consume_teleport, 1 (DO NOT USE, cannot be set here)\n"
+ "2 has_skin, 3 consume_poison, 11 has_head\n"
+ "\n"
+ "Other spells that it can CAST will be specified later.\n",
-/* 9 */
-"\nReading in bag_specific information. First, the bag_flags.
-The number of the flag will toggle it, a -1 terminates.
+ /* more obj prompts below */
-0 NULL, 1 NULL, 2 is_closed, 3 is_locked, 4 is_pickable, 5 is_mag_lockable,
-6 is_mag_locked, 7 is_destructable, 8 is_corpse (probably shouldn't use)
-9 is_NON_closeable, 10 player_owned, 17 consumes_key\n",
+ //*********************************************************************//
+ ///*********************** critter prompts *************************///
+ //*********************************************************************//
-/* 10 */
-"\nEnter all of these bag data at once please:
+ /* 15 */ /* here is output for the object. */
+ "\nInput the critter number: \n"
+ "If you don't know which one, try one, the game will suggest another if \n"
+ "its bad.\n",
-(1)key number (zero if no key),
-(2)maximum weight(lbs) NOTE: this is ITSELF plus its INVENTORY
-(3)percentage weight (normal is 100),
-(4)time till it disolves, (probably should make this -1)\n",
+ /* 16 */
+ "\nInput a name, one word, '~', by itself, terminates.\n"
+ "Example: guard portal ~\n",
-/* 11 */
-"\nEnter any spells the item is to be Affected By:
-spell number, followed by duration; -1 for duration is permanent.
-A -1 for spell number terminates. None in yet, choose -1.\n",
+ /* 17 */
+ "\nInput the short description.\n"
+ "Example: a portal guard\n",
-/* 12 */
-"\nEnter the item's inventory, all at once, but ONLY IF ITS A CONTAINER:
-A -1 will terminate. Also, make sure the item exists! 'olist' can help
-you figure out which you want to use.
-Example: 1 6 5 -1\n",
+ /* 18 */
+ "\nInput the in_room_description, do capitalize:\n"
+ "Example: A portal guard leans against the door.\n",
-/* 13 */
-"\nNow for the Stat Affects:
-stat number, followed by the change; A -1 for stat number terminates.
-Example: 2 3 -1
-Here are the stats you can fiddle with:
+ /* 19 */
+ "\nInput the long description, '~', ON LINE BY ITSELF, terminates:\n"
+ "Example: \n"
+ " You see a vague person standing here.\n"
+ "~\n",
-1 str, 2 int, 3 con, 4 cha, 5 wis, 6 dex, 7 hit, 8 dam, 9 ac, 10 attacks,
-11 pause_count, 15 hp, 16 mana, 17 mov, 18 align, 19 level, 23 hp_max,
-24 mana_max, 25 mov_max, 27 damage_received_modifier, 28 damage_given_modifier,
-29 heat_resis, 30 cold_resis, 31 elect_resis, 32 spell_resis, 35 bare_hand_dice_count,
-36 bare_hand_dice_sides, 37 hp_regen, 38 mana_regen, 39 mov_regen,
-100 hunger, 101 thirst, 102 drugged.
+ /* 20 */
+ "\nTime to set crit_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "[3] is_flying, [5] can_climb, [6] gos, [7] yell, [8] gratz, [9] auc,\n"
+ "[10] shout, [11] say, [12] tell, [13] NULL, [17] is_sneak, \n"
+ "[19] can_dive, [22] is_hide\n",
-WARNING: Once again, moderation is needed, if it is too extreme it will be
- deleted. This is NOT a twink MUD!\n",
+ /* 21 */ // long data
+ "\nEnter all these data at once please:\n"
+ " \n"
+ "(1)gold (2)exp worth (lev 15 mob ~= 4k, lev 20 ~= 10k)\n"
+ "(3)bank_gold (Zero is normal)\n"
+ "\n"
+ "Example: 566 2225 0\n",
-/* 14 */
-"\nTime to set obj_proc_flags. The number of the flag will toggle it,
-a -1 terminates.
+ /* 22 */ //first 15 short_cur_stats
+ "\nEnter all 15 of these short_cur_stats at once please:\n"
+ "\n"
+ "(1)position {0 stand, 1 sit, 2 rest, 3 sleep, 4 med, 5 stun, 6 dead, 7 prone}\n"
+ "(2)str, (3)int, (4)con, (5)cha, (6)wis, (7)dex, (8)hit, (9)dam, (10)ac,\n"
+ "(11)attacks per round, (12)pause_count {0 is good}, \n"
+ "(13)sex {0 female, 1 male, 2 neuter}\n"
+ "(14)class, {1 Warrior, 2 Sage, 3 Wizard, 4 Ranger, 5 Thief, 6 Alchemist, \n"
+ " {7 Cleric, 8 Bard, 9 Necromancer}\n"
+ "(15)race, {1 human, 2 anitre, 3 avintre, 4 darkling, 5 drow,\n"
+ " 6 dragon, 7 dwarf, 8 ironclad, 9 ogrue, 10 rocktroll,\n"
+ " 11 elf, 12 faerie, 13 entity, 14 sombrian, 15 undead,\n"
+ " 16 animal, 17 monster}\n",
-0 consume_teleport, 1 (DO NOT USE, cannot be set here)
-2 has_skin, 3 consume_poison, 11 has_head
+ /* 23, second 15 short_cur_stats */
+ "\nEnter all 15 of these short_cur_stats at once please:\n"
+ "\n"
+ "(1)hp, (2)mana, (3)mov, (4)align, (5)level, \n"
+ "(6) hometowns: which zone# is the mob from??}\n"
+ "(7)wimpy (8)practices, (9)hp_max, (10)mana_max, (11)mov_max, \n"
+ "(12)type_of_mob: {2 mob}, (13)damage_received_modifier (100 is normal),\n"
+ "(14)damage_given_modifier (100 is normal), (15)heat_resis\n",
-Other spells that it can CAST will be specified later.\n",
+ /* 24, rest of short_cur_stats */
+ "\nEnter all of these short_cur_stats at once please:\n"
+ "\n"
+ " {0 is very resistant, 100 not very resistant }\n"
+ "\n"
+ "(1)cold_resis, (2)elect_resis, (3)spell_resis\n"
+ "(4)religion { 0 none, 1 fire, 2 ice, 3 air, 4 earth, 5 beast, 6 blade }\n"
+ "(5)NULL, (6)bare_hand_dice_count, (7)bare_hand_dice_sides, (8)hp_regen, \n"
+ "(9)mana_regen, (10)mov_regen, (11)NULL, (12)naked_weight, (13)fall_to (enter zero),\n"
+ "\n"
+ "Remember, you should enter zero's for NULL fields, they may one day\n"
+ "be defined and zero will be default.\n",
-/* more obj prompts below */
+ /* 25, cur_stats */
+ "\n(1)vis_bit: add these up:\n"
+ " {1 dark, 2 invis, 4 hidden, 8 god_invis1}\n"
+ "(2)see_bit: add these up:\n"
+ " {0 normal, 1 dark, 2 invis, 4 hidden,\n"
+ " 8 god_invis1, 16 god_invis2, 32 detect_link_dead}\n"
+ "(3)in_room: 0 is just fine here.\n",
-//*********************************************************************//
-///*********************** critter prompts *************************///
-//*********************************************************************//
+ /* 26 eq */
+ "\nEnter eq in (item#, posn) pairs. Negative one terms.\n"
+ "Example: 8 1 -1 Make sure item exists btw.\n"
+ "\n"
+ "Positions: 1 head, 2 neck, 3 neck, 4 around body, 5 arms, 6 wrist, 7 wrist,\n"
+ "8 hands, 9 wielded, 10 held, 11 light, 12 body, 13 belt, 14 legs,\n"
+ "15 feet, 16 finger, 17 finger, 18 shield. DO NOT USE ZERO.\n",
-/* 15 */ /* here is output for the object. */
-"\nInput the critter number:
-If you don't know which one, try one, the game will suggest another if
-its bad.\n",
+ /* 27 affected by */
+ "\nEnter any spells the mob is to be Affected By:\n"
+ "spell number, followed by duration; -1 for duration is permanent.\n"
+ "A -1 for spell number terminates.\n"
+ "\n"
+ "NOTE: Check slist for a list of spells.\n",
-/* 16 */
-"\nInput a name, one word, '~', by itself, terminates.
-Example: guard portal ~\n",
+ /* 28 inventory */
+ "\nEnter the mob's inventory, all at once is fine.\n"
+ "A -1 will terminate. Also, make sure the item exists!\n"
+ "Example: 1 6 5 -1\n",
-/* 17 */
-"\nInput the short description.
-Example: a portal guard\n",
+ /* 29 mob_data: max_in_game, skin_num*/
+ "\nEnter the max number of these mobs to be loaded in the game \n"
+ "simultaneously AND the object number of the skin, if it has one. If\n"
+ "it does not have a skin, enter a zero\n"
+ "\n"
+ "Example: 4 0\n",
-/* 18 */
-"\nInput the in_room_description, do capitalize:
-Example: A portal guard leans against the door.\n",
+ /* 30 mob_data flags */
+ "\nTime to set mob_data_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "0 has_proc_data, (teacher, shopkeeper, discuss, bow, curse, give procs,\n"
+ " PERSONALITY),\n"
+ "1 scavenge, 2 wander, 5 edible_corpse, 6 is_banker, 7 is_sessile,\n"
+ "8 !homing, 10 !victim_flee, 16 has_skin. \n",
-/* 19 */
-"\nInput the long description, '~', ON LINE BY ITSELF, terminates:
-Example:
- You see a vague person standing here.
-~\n",
+ /* 31 spec_data: int1 */
+ "\nIf mob is to be a sentinel, give direction guarding:\n"
+ "{1 east, 2 west, 3 north, 4 south, 5 southeast, 6 northeast, 7 northwest,\n"
+ " 8 southwest, 9 up, 10 down}\n"
+ "\n"
+ "The mob will not let anyone pass through the door guarded. You can specify\n"
+ "it to let certain classes/races past with the next bitfield.\n"
+ "\n"
+ "If it is not a sentinel, enter zero.\n"
+ "\n"
+ "So you should enter:\n"
+ "[1] sentinal direction\n"
+ " These next 4 range in value from -10 to 10, they specify the mobs BEHAVIOR!\n"
+ "[2] skill_violence (how often should the mob use skills, -10 never, 10 always)\n"
+ "[3] benevolence (-10 very aggressive, 10 very peaceful)\n"
+ "[4] defensiveness (-10 must hurt others, 10 maximum self preservation)\n"
+ "[5] bad_assedness (-10 super wimp, 10 Snake Pliskin)\n"
+ "[6] social_awareness (-10 who cares, 10 I'll save the world!)\n"
+ "\n"
+ "NOTE: Zero is default value for all (but you must enter SOMETHING).\n",
-/* 20 */
-"\nTime to set crit_flags. The number of the flag will toggle it,
-a -1 terminates.
+ /* 32 proc_data: proc_data_flags */
+ "\nTime to set proc_data flags. The number of the flag will toggle it,\n"
+ "a -1 terminates. You don't have to set any flags if you don't want to.\n"
+ "\n"
+ "1 is_shopkeeper, 2 is_teacher,\n"
+ "3 let_same_class_pass, 4 let_same_race_pass (these are used with sentinels),\n"
+ "5 has_mob_give_proc, 6 has_mob_say_proc (discuss), 7 has_mob_bow_proc,\n"
+ "8 has_mob_curse_proc, 9 do_procs_with_same_race_only, 10 same_align,\n"
+ "11 same_class\n",
-[3] is_flying, [5] can_climb, [6] gos, [7] yell, [8] gratz, [9] auc,
-[10] shout, [11] say, [12] tell, [13] NULL, [17] is_sneak,
-[19] can_dive, [22] is_hide
-",
+ /* 33 shopkeeper, markup, buy% */
+ "\nEnter all these at once:\n"
+ "(1)markup_percentage (2)buy_percentage\n"
+ "(For example: 50 would be half, 200 would be twice.)\n"
+ "(3) open_time (4)close_time (military)\n",
-/* 21 */ // long data
-"\nEnter all these data at once please:
-
-(1)gold (2)exp worth (lev 15 mob ~= 4k, lev 20 ~= 10k)
-(3)bank_gold (Zero is normal)
+ /* 34 shopkeeper: shop_data_flags */
+ /* NOTE: Don't reuse the first 3, were buy, sell, list procs */
+ "\nTime to set shop_data flags. The number of the flag will toggle it,\n"
+ "a -1 terminates. Choose at least one buy, sell, and offer proc. More\n"
+ "may be defined later, for now your choice is easy!\n"
+ "\n"
+ "Choose what type of eq it trades in:\n"
+ "46 dart_thrower, 47 bow, 48 dart, 49 arrow,\n"
+ "50 junk, 51 wands, 52 potions, 53 scrolls, 54 containers,\n"
+ "56 armor, 57 weapons, 58 lights, 59 canteens, 61 foods, 62 boats,\n"
+ "64 toolbox, 65 cauldron, 66 pen, 67 construct_component,\n"
+ "68 concoct_component, 69 parchment(blank for scribing).\n"
+ "\n"
+ "Note: You can choose more than one.\n",
-Example: 566 2225 0\n",
+ /* 35 shopkeeper: perm_inv */
+ "\nNow enter any items (numbers) that the shopkeeper will ALWAYS be selling.\n"
+ "A negative one terminates.\n"
+ "Example: 8 -1\n",
-/* 22 */ //first 15 short_cur_stats
-"\nEnter all 15 of these short_cur_stats at once please:
+ /* 36 teacher: teach_data_flags */
+ "\nTime to set teach_data flags. The number of the flag will toggle it,\n"
+ "a -1 terminates. Choose what classes it will teach to:\n"
+ "\n"
+ "1 Warrior, 2 Sage, 3 Wizard, 4 Ranger, 5 Thief, 6 Alchemist, 7 Cleric, 8 Bard, 9 Necromancer\n"
+ "\n"
+ "Note: You can choose more than one.\n",
-(1)position {0 stand, 1 sit, 2 rest, 3 sleep, 4 med, 5 stun, 6 dead, 7 prone}
-(2)str, (3)int, (4)con, (5)cha, (6)wis, (7)dex, (8)hit, (9)dam, (10)ac,
-(11)attacks per round, (12)pause_count {0 is good},
-(13)sex {0 female, 1 male, 2 neuter}
-(14)class, {1 Warrior, 2 Sage, 3 Wizard, 4 Ranger, 5 Thief, 6 Alchemist,
- {7 Cleric, 8 Bard, 9 Necromancer}
-(15)race, {1 human, 2 anitre, 3 avintre, 4 darkling, 5 drow,
- 6 dragon, 7 dwarf, 8 ironclad, 9 ogrue, 10 rocktroll,
- 11 elf, 12 faerie, 13 entity, 14 sombrian, 15 undead,
- 16 animal, 17 monster}\n",
+ /***********************************************************************/
+ /* 37 THIS IS AN OBJECT PROMPT FOR COMPONENTS */
+ /* Should no longer be used btw. */
+ "\nEnter the these construct data:\n"
+ "\n"
+ "(1) target_object (what it can be constructed into)\n"
+ "(2) item1 (these items are fellow components, zero is NULL value)\n"
+ "(3) item2 (4) item3 (5) item4 (6) item5.\n",
-/* 23, second 15 short_cur_stats */
-"\nEnter all 15 of these short_cur_stats at once please:
-(1)hp, (2)mana, (3)mov, (4)align, (5)level,
-(6) hometowns: which zone# is the mob from??}
-(7)wimpy (8)practices, (9)hp_max, (10)mana_max, (11)mov_max,
-(12)type_of_mob: {2 mob}, (13)damage_received_modifier (100 is normal),
-(14)damage_given_modifier (100 is normal), (15)heat_resis\n",
+ //**********************************************************************//
+ //************************** room prompts ****************************//
+ //**********************************************************************//
-/* 24, rest of short_cur_stats */
-"\nEnter all of these short_cur_stats at once please:
+ /* 38 */
+ "\nInput the room number (enter 1 for next available room): ",
- {0 is very resistant, 100 not very resistant }
+ /* 39 */
+ "\nInput a name, one word, '~' terminates. Note: This will rarely be seen.\n"
+ "Example: temple ~\n",
-(1)cold_resis, (2)elect_resis, (3)spell_resis
-(4)religion { 0 none, 1 fire, 2 ice, 3 air, 4 earth, 5 beast, 6 blade }
-(5)NULL, (6)bare_hand_dice_count, (7)bare_hand_dice_sides, (8)hp_regen,
-(9)mana_regen, (10)mov_regen, (11)NULL, (12)naked_weight, (13)fall_to (enter zero),
+ /* 40 */
+ "\nInput the short description, you SHOULD capitalize:\n"
+ "Example: The temple of Garland\n",
-Remember, you should enter zero's for NULL fields, they may one day
-be defined and zero will be default.\n",
+ /* 41 */
+ "\nInput the long description, '~', ON LINE BY ITSELF, terminates:\n"
+ "Example: You see a non-descript room.\n",
-/* 25, cur_stats */
-"\n(1)vis_bit: add these up:
- {1 dark, 2 invis, 4 hidden, 8 god_invis1}
-(2)see_bit: add these up:
- {0 normal, 1 dark, 2 invis, 4 hidden,
- 8 god_invis1, 16 god_invis2, 32 detect_link_dead}
-(3)in_room: 0 is just fine here.\n",
+ /* 42 */
+ "\nTime to set room_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "0 no_rest, 1 !imm, 2 !god, 3 is_perm_dark, 4 weather, 5 !ranged_communication, 6 !mag_exit,\n"
+ "7 is_haven, 8 !pk, 9 !magic, 10 !mob, 11 !potions, 12 !staffs, 13 !mort\n"
+ "14 normally_dark, 15 river/small lake, 16 ocean/big lake, 17 swamp,\n"
+ "18 need_fly, 19 need_boat, 20 need_climb, 24 !magic_entry,\n"
+ "25 !vehicles (vehicles can't drive here), 26 is_cramped (!HUGE),\n"
+ "27 !ranged combat, 28 need_dive_ability, 30 can_camp 33 !mob_wander,\n"
+ "34 !foreign_mob_wander\n",
-/* 26 eq */
-"\nEnter eq in (item#, posn) pairs. Negative one terms.
-Example: 8 1 -1 Make sure item exists btw.
+ /* 43 */ // cur_stats data
+ "\nEnter all these data at once please:\n"
+ " \n"
+ "(1)vis_bit {0 NORMAL, 1 dark, 2 invis, 4 hidden, 8 god_invis1,\n"
+ " 16 god_invis2}\n"
+ "(2)movement cost(in movement points)\n",
-Positions: 1 head, 2 neck, 3 neck, 4 around body, 5 arms, 6 wrist, 7 wrist,
-8 hands, 9 wielded, 10 held, 11 light, 12 body, 13 belt, 14 legs,
-15 feet, 16 finger, 17 finger, 18 shield. DO NOT USE ZERO.\n",
+ /* 44 affected by */
+ "\nEnter any spells the room is to be Affected By:\n"
+ "spell number, followed by duration; -1 for duration is permanent.\n"
+ "A -1 for spell number terminates. Probably want to just enter -1.\n",
-/* 27 affected by */
-"\nEnter any spells the mob is to be Affected By:
-spell number, followed by duration; -1 for duration is permanent.
-A -1 for spell number terminates.
+ /* 45 inventory */
+ "\nEnter the room's inventory, all at once is fine.\n"
+ "A -1 will terminate. Also, make sure the item exists!\n"
+ "Example: 1 6 5 -1\n",
-NOTE: Check slist for a list of spells.\n",
+ /* 46 direction */
+ "\nEnter the distance, and the direction of the exit TO this new room.\n"
+ "Do not abbreviate, example: 0 north or 2 northwest or 1 up...\n"
+ "\n"
+ "NOTE: distance is a unit of battle rounds. This lasts about 2 seconds.\n"
+ "For each distance unit you give, the mover will be paused for this amount\n"
+ "of time, just as the skill 'bash' works on this and other muds.\n",
-/* 28 inventory */
-"\nEnter the mob's inventory, all at once is fine.
-A -1 will terminate. Also, make sure the item exists!
-Example: 1 6 5 -1\n",
-/* 29 mob_data: max_in_game, skin_num*/
-"\nEnter the max number of these mobs to be loaded in the game
-simultaneously AND the object number of the skin, if it has one. If
-it does not have a skin, enter a zero
+ //**********************************************************************//
+ //************************** door prompts ****************************//
+ //**********************************************************************//
-Example: 4 0\n",
+ /* 47 */
+ "\nInput the door number: ",
-/* 30 mob_data flags */
-"\nTime to set mob_data_flags. The number of the flag will toggle it,
-a -1 terminates.
+ /* 48 */
+ "\nInput door names, following the example, '~' terminates\n"
+ "Example: east door oak # oak door west ~\n"
+ " ^^^^ ^^^^^^^^ ^ ^^^^^^^^ ^^^^\n"
+ " dir names separater names opposite side's dir\n",
-0 has_proc_data, (teacher, shopkeeper, discuss, bow, curse, give procs,
- PERSONALITY),
-1 scavenge, 2 wander, 5 edible_corpse, 6 is_banker, 7 is_sessile,
-8 !homing, 10 !victim_flee, 16 has_skin. \n",
+ /* 49 */
+ "\nInput the long description, '~', ON LINE BY ITSELF, terminates:\n"
+ "Example: You see a non-descript door.\n",
-/* 31 spec_data: int1 */
-"\nIf mob is to be a sentinel, give direction guarding:
-{1 east, 2 west, 3 north, 4 south, 5 southeast, 6 northeast, 7 northwest,
- 8 southwest, 9 up, 10 down}
+ /* 50 */
+ "\nTime to set door_flags. The number of the flag will toggle it,\n"
+ "a -1 terminates.\n"
+ "\n"
+ "1 mag_lockable, 2 is_closed, 3 is_locked, 4 is_pickable, 5 is_lockable,\n"
+ "6 mag_locked, 7 is_destructable, 8 is_closeable, \n"
+ "11 !open (by pc or mob, used for vehicle doors),\n"
+ "12 is_exit_from_vehicle (to the outside), 13 is_secret\n"
+ "16 secret_when_open_too, 17 consumes_key, 18 !passdoor\n",
-The mob will not let anyone pass through the door guarded. You can specify
-it to let certain classes/races past with the next bitfield.
+ /* 51 vis_bit, token_num, key_num */
+ "\nInput all of these at once please:\n"
+ "\n"
+ "Add these up to get the door's vis_bit:\n"
+ "(1)vis_bit {0 NULL, 1 dark, 2 invis, 4 hidden, 8 god_invis1,\n"
+ " 16 god_invis2}\n"
+ "(2) token_number (zero if no token needed, for vehicle doors mostly)\n"
+ "(3) key_number (zero if no key needed)\n",
-If it is not a sentinel, enter zero.
+ /* 52 vehicle::route */
+ "Please enter the flags for this vehicle. Entering the number of the\n"
+ "flag toggles it. When complete, enter -1.\n"
+ "\n"
+ "0 is_self_guided, 1 is_stealthy (arrival un-announced), 2 unlimited_fuel,\n"
+ "3 can_fly, 4 can_climb, 5 can_float, 6 can_dive,\n"
+ "7 can_see_out (show room descs to passengers) \n"
+ "\n",
-So you should enter:
-[1] sentinal direction
- These next 4 range in value from -10 to 10, they specify the mobs BEHAVIOR!
-[2] skill_violence (how often should the mob use skills, -10 never, 10 always)
-[3] benevolence (-10 very aggressive, 10 very peaceful)
-[4] defensiveness (-10 must hurt others, 10 maximum self preservation)
-[5] bad_assedness (-10 super wimp, 10 Snake Pliskin)
-[6] social_awareness (-10 who cares, 10 I'll save the world!)
+ /* 53 fuel, time_between_stops, cur_fuel, max_fuel */
+ "\nEnter all these at once please:\n"
+ "NOTE: Consider fuel units to be equal to movement points in size.\n"
+ "NOTE: For unlimited fuel, you should toggle the appropriate flag (2).\n"
+ "\n"
+ "(1) time_between_stops (in mini_ticks/battle rounds, how fast it moves, 5-10)\n"
+ "(2) current fuel (What the vehicle starts out with.)\n"
+ "(3) max_fuel (What is the maximum amount of fuel it can hold.)\n",
-NOTE: Zero is default value for all (but you must enter SOMETHING).\n",
+ /* 54 vehicle::number, */
+ "\nInput the vehicle number: ",
-/* 32 proc_data: proc_data_flags */
-"\nTime to set proc_data flags. The number of the flag will toggle it,
-a -1 terminates. You don't have to set any flags if you don't want to.
+ /* 55 proc_data: give_proc */
+ "\nPlease enter the object number that should TRIGGER this proc when given to\n"
+ "the mob. Example: 55. \n"
+ "Note that this object should be created already as usual.\n",
-1 is_shopkeeper, 2 is_teacher,
-3 let_same_class_pass, 4 let_same_race_pass (these are used with sentinels),
-5 has_mob_give_proc, 6 has_mob_say_proc (discuss), 7 has_mob_bow_proc,
-8 has_mob_curse_proc, 9 do_procs_with_same_race_only, 10 same_align,
-11 same_class\n",
+ /* 56 proc_data: say_proc (discuss) */
+ "\nPlease input the topic for this conversation. For example, if you won't\n"
+ "this discussion to be triggered upon a 'discuss history <this_mob>', you would\n"
+ "enter 'history' here. The quotes are NOT NEEDED. Remember: only an\n"
+ "exact match (case insensitive of course) will allow the discussion to take\n"
+ "place, so you will probably want to keep it simple.\n"
+ "\n"
+ "Example: history\n",
-/* 33 shopkeeper, markup, buy% */
-"\nEnter all these at once:
-(1)markup_percentage (2)buy_percentage
-(For example: 50 would be half, 200 would be twice.)
-(3) open_time (4)close_time (military)\n",
+ /* 57 proc_data: bow_proc */
+ "\nPlease enter the message the person is to see when they bow to this mob.\n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "Example, for some priest: \n"
+ "\n"
+ "The priest tells you 'You're attitude is encouraging, you should go discuss\n"
+ "the brotherhood with the abbot in Elden Noir.'\n",
-/* 34 shopkeeper: shop_data_flags */
-/* NOTE: Don't reuse the first 3, were buy, sell, list procs */
-"\nTime to set shop_data flags. The number of the flag will toggle it,
-a -1 terminates. Choose at least one buy, sell, and offer proc. More
-may be defined later, for now your choice is easy!
+ /* 58 proc_data: curse_proc: message */
-Choose what type of eq it trades in:
-46 dart_thrower, 47 bow, 48 dart, 49 arrow,
-50 junk, 51 wands, 52 potions, 53 scrolls, 54 containers,
-56 armor, 57 weapons, 58 lights, 59 canteens, 61 foods, 62 boats,
-64 toolbox, 65 cauldron, 66 pen, 67 construct_component,
-68 concoct_component, 69 parchment(blank for scribing).
+ "\nPlease enter the message you would like shown to the person who will\n"
+ "'curse' this mob. TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "Example, for some priest:\n"
+ "\n"
+ "The priest scowls and says, 'Perhaps THIS will teach you to respect the powers\n"
+ "of good!'\n"
+ "\n"
+ "The priest may then transport the person somewhere...Hell perhaps??\n",
-Note: You can choose more than one.\n",
+ /* 59 spec_data: say proc, response */
+ "\nNow enter the response to this topic of discussion. \n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "For example, for a priest and \'brotherhood\' for a topic:\n"
+ "\n"
+ "The abbot tells you, \'So you wish to join our brotherhood eh? Consider\n"
+ "yourself an accolyte, but if you truly wish to gain favor, bring me a root of\n"
+ "the Golden Seal plant for my healing potions. It grows in poplar shaded\n"
+ "groves in the mountains to the east.\'\n"
+ "\n"
+ "Perhaps this priest will also have a give proc for the herb...\n",
-/* 35 shopkeeper: perm_inv */
-"\nNow enter any items (numbers) that the shopkeeper will ALWAYS be selling.
-A negative one terminates.
-Example: 8 -1\n",
+ /* 60 proc_data: give_proc correct_msg */
+ "\nPlease enter the message to be shown upon a CORRECT gift.\n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "Example for an abbot: \n"
+ "\n"
+ "The abbot smiles and says, \'Thanks, because of your worthy quest I will tell\n"
+ "you something of the lore of herbs.\'\n"
+ "\n"
+ "Then perhaps the abbot will teach a skill/spell 'herb lore' or something.\n",
-/* 36 teacher: teach_data_flags */
-"\nTime to set teach_data flags. The number of the flag will toggle it,
-a -1 terminates. Choose what classes it will teach to:
+ /* 61 proc_data: bow_proc skill_name */
+ "\nIf you wish to have the mob give the player a skill/spell, enter that here.\n"
+ "Example: begging\n"
+ " \n"
+ "Perhaps a skill an old begger would give a kind soul?\n"
+ "If you don\'t want anything, please enter NA or na for not applicable.\n",
-1 Warrior, 2 Sage, 3 Wizard, 4 Ranger, 5 Thief, 6 Alchemist, 7 Cleric, 8 Bard, 9 Necromancer
-Note: You can choose more than one.\n",
+ /* 62 proc_data: curse_proc skill_name */
+ "\nIf you wish to have the mob give the player a skill/spell, enter that here.\n"
+ "Example: ancient tongues\n"
+ "\n"
+ "Perhaps a skill a crusty old geezer would give a young upstart that shows\n"
+ "courage, if not tact. Then perhaps the geezer would transport him to some\n"
+ "evil place?\n"
+ "If you don't want anything, please enter NA or na for not applicable.\n",
-/***********************************************************************/
-/* 37 THIS IS AN OBJECT PROMPT FOR COMPONENTS */
-/* Should no longer be used btw. */
-"\nEnter the these construct data:
+ /* 63 proc_data: say_proc skill_name */
+ "\nIf you wish to have the mob give the player a skill/spell, enter that here.\n"
+ "Example: history \n"
+ "\n"
+ "Perhaps a skill a sage would give to a serious student?\n"
+ "If you don\'t want anything, please enter NA or na for not applicable.\n",
-(1) target_object (what it can be constructed into)
-(2) item1 (these items are fellow components, zero is NULL value)
-(3) item2 (4) item3 (5) item4 (6) item5.\n",
+ /* 64 proc_data: give_proc skill_name */
+ "\nIf you wish to have the mob give the player a skill/spell, enter that here.\n"
+ "\n"
+ "Example: herb lore\n"
+ "\n"
+ "If you don\'t want anything, please enter NA or na for not applicable.\n",
+ /* 65 proc_data: bow_proc, obj_num */
+ "\nPlease enter the number of the object the mob is to give to who ever\n"
+ "bows to him/her. If you don\'t want anything to be given, enter ZERO (0).\n"
+ "Example: 82 \n",
-//**********************************************************************//
-//************************** room prompts ****************************//
-//**********************************************************************//
+ /* 66 proc_data: curse_proc, obj_num */
+ "\nPlease enter the number of the object the mob is to give to who ever\n"
+ "curses him/her. If you don\'t want anything to be given, enter ZERO (0).\n"
+ "Example: 66 \n",
-/* 38 */
-"\nInput the room number (enter 1 for next available room): ",
+ /* 67 proc_data: say_proc, obj_num */
+ "\nPlease enter the number of the object the mob is to give to who ever\n"
+ "discusses this topic. If you don\'t want anything to be given, enter ZERO (0).\n"
+ "Example: 0 \n",
-/* 39 */
-"\nInput a name, one word, '~' terminates. Note: This will rarely be seen.
-Example: temple ~\n",
+ /* 68 proc_data: give_proc, obj_num */
+ "\nPlease enter the number of the object the mob is to give to who ever\n"
+ "gives the RIGHT gift. If you don\'t want anything to be given, enter ZERO (0).\n"
+ "Example: 24 \n",
-/* 40 */
-"\nInput the short description, you SHOULD capitalize:
-Example: The temple of Garland\n",
+ /* 69 proc_data: bow_proc, trans_to_room */
+ "\nPlease enter the number of the room the mob is to transport the person who \n"
+ "bows to him/her to. \n"
+ "If you don\'t want the person transported anywhere, enter ZERO (0).\n"
+ "Example: 0 \n",
-/* 41 */
-"\nInput the long description, '~', ON LINE BY ITSELF, terminates:
-Example: You see a non-descript room.\n",
+ /* 70 proc_data: curse_proc, trans_to_room */
+ "\nPlease enter the number of the room the mob is transport the person who \n"
+ "curses him/her to. \n"
+ "If you don\'t want the person transported anywhere, enter ZERO (0).\n"
+ "Example: 666 \n",
-/* 42 */
-"\nTime to set room_flags. The number of the flag will toggle it,
-a -1 terminates.
+ /* 71 proc_data: say_proc, trans_to_room */
+ "\nPlease enter the number of the room which the mob is to transport the\n"
+ "person who discusses the given topic. \n"
+ "If you don\'t want the person transported anywhere, enter ZERO (0).\n"
+ "Example: 1492 \n",
-0 no_rest, 1 !imm, 2 !god, 3 is_perm_dark, 4 weather, 5 !ranged_communication, 6 !mag_exit,
-7 is_haven, 8 !pk, 9 !magic, 10 !mob, 11 !potions, 12 !staffs, 13 !mort
-14 normally_dark, 15 river/small lake, 16 ocean/big lake, 17 swamp,
-18 need_fly, 19 need_boat, 20 need_climb, 24 !magic_entry,
-25 !vehicles (vehicles can't drive here), 26 is_cramped (!HUGE),
-27 !ranged combat, 28 need_dive_ability, 30 can_camp 33 !mob_wander,
-34 !foreign_mob_wander\n",
+ /* 72 proc_data: give_proc, trans_to_room */
+ "\nPlease enter the number of the room which the mob is transport the person\n"
+ "to who gives the CORRECT gift. \n"
+ "If you don\'t want the person transported anywhere, enter ZERO (0).\n"
+ "Example: 1492 \n",
-/* 43 */ // cur_stats data
-"\nEnter all these data at once please:
-
-(1)vis_bit {0 NORMAL, 1 dark, 2 invis, 4 hidden, 8 god_invis1,
- 16 god_invis2}
-(2)movement cost(in movement points)\n",
+ /* 73 proc_data: say_proc, prompt for another? */
+ "\nWould you like to add another discussion topic? Yes(1) No(0)\n"
+ "Example: 0 \n",
-/* 44 affected by */
-"\nEnter any spells the room is to be Affected By:
-spell number, followed by duration; -1 for duration is permanent.
-A -1 for spell number terminates. Probably want to just enter -1.\n",
-
-/* 45 inventory */
-"\nEnter the room's inventory, all at once is fine.
-A -1 will terminate. Also, make sure the item exists!
-Example: 1 6 5 -1\n",
+ /* 74 proc_data: give_proc, wrong_gift_msg */
+ "\nPlease enter the message you would like the player to see if he/she gives\n"
+ "a wrong item to this mob. \n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "\n"
+ "Example: Thanks, but what I really need is a silver dragon scale. \n",
-/* 46 direction */
-"\nEnter the distance, and the direction of the exit TO this new room.
-Do not abbreviate, example: 0 north or 2 northwest or 1 up...
-NOTE: distance is a unit of battle rounds. This lasts about 2 seconds.
-For each distance unit you give, the mover will be paused for this amount
-of time, just as the skill 'bash' works on this and other muds.\n",
+ /* 75 proc_data: wrong_align_msg */
+ "\nPlease enter the message you would like a player of the wrong alignment \n"
+ "(as specified by flags set earlier (or not set)) to see.\n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "\n"
+ "Example: The priest frowns and tells you, 'If I wasn't a peaceful man\n"
+ "I'd banish your petulant soul to the nine rings of Hell!!' \n",
+ /* 76 proc_data: wrong_class_msg */
+ "\nPlease enter the message you would like a player of the wrong class \n"
+ "(as specified by flags set earlier (or not set)) to see.\n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "\n"
+ "Example: The wizzard laughs and says, 'Why would I want to talk to one of\n"
+ "your profession?'\n",
-//**********************************************************************//
-//************************** door prompts ****************************//
-//**********************************************************************//
+ /* 77 proc_data: wrong_race_msg */
+ "\nPlease enter the message you would like a player of the wrong race \n"
+ "(as specified by flags set earlier (or not set)) to see.\n"
+ "TERMINATE with a ~ on a LINE BY ITSELF!\n"
+ "\n"
+ "Example: The dwarf laughs and says, 'You kind are not welcome in our\n"
+ "hallowed tunnels.'\n",
-/* 47 */
-"\nInput the door number: ",
+ /* 78 obj_spec_proc: skin_num */
+ "\nPlease enter the number of the object that is to be the skin.\n\n",
-/* 48 */
-"\nInput door names, following the example, '~' terminates
-Example: east door oak # oak door west ~
- ^^^^ ^^^^^^^^ ^ ^^^^^^^^ ^^^^
- dir names separater names opposite side's dir\n",
+ /* 79 casts_these_spells */
+ "\nNow enter the level of the spell it will cast, and the spell number it\n"
+ "will cast. You can find the spell_numbers via the 'slist' command.\n"
+ "A negative one (-1) terminates. (LEVEL SPELL_NUM) pairs, level first.\n"
+ "\n"
+ "Example: 30 10 -1 /* This would make it cast a level 30 'web' spell. */\n"
-/* 49 */
-"\nInput the long description, '~', ON LINE BY ITSELF, terminates:
-Example: You see a non-descript door.\n",
-/* 50 */
-"\nTime to set door_flags. The number of the flag will toggle it,
-a -1 terminates.
-
-1 mag_lockable, 2 is_closed, 3 is_locked, 4 is_pickable, 5 is_lockable,
-6 mag_locked, 7 is_destructable, 8 is_closeable,
-11 !open (by pc or mob, used for vehicle doors),
-12 is_exit_from_vehicle (to the outside), 13 is_secret
-16 secret_when_open_too, 17 consumes_key, 18 !passdoor\n",
-
-/* 51 vis_bit, token_num, key_num */
-"\nInput all of these at once please:
-
-Add these up to get the door's vis_bit:
-(1)vis_bit {0 NULL, 1 dark, 2 invis, 4 hidden, 8 god_invis1,
- 16 god_invis2}
-(2) token_number (zero if no token needed, for vehicle doors mostly)
-(3) key_number (zero if no key needed)\n",
-
-/* 52 vehicle::route */
-"Please enter the flags for this vehicle. Entering the number of the
-flag toggles it. When complete, enter -1.
-
-0 is_self_guided, 1 is_stealthy (arrival un-announced), 2 unlimited_fuel,
-3 can_fly, 4 can_climb, 5 can_float, 6 can_dive,
-7 can_see_out (show room descs to passengers)
-\n",
-
-/* 53 fuel, time_between_stops, cur_fuel, max_fuel */
-"\nEnter all these at once please:
-NOTE: Consider fuel units to be equal to movement points in size.
-NOTE: For unlimited fuel, you should toggle the appropriate flag (2).
-
-(1) time_between_stops (in mini_ticks/battle rounds, how fast it moves, 5-10)
-(2) current fuel (What the vehicle starts out with.)
-(3) max_fuel (What is the maximum amount of fuel it can hold.)\n",
-
-/* 54 vehicle::number, */
-"\nInput the vehicle number: ",
-
-/* 55 proc_data: give_proc */
-"\nPlease enter the object number that should TRIGGER this proc when given to
-the mob. Example: 55.
-Note that this object should be created already as usual.\n",
-
-/* 56 proc_data: say_proc (discuss) */
-"\nPlease input the topic for this conversation. For example, if you won't
-this discussion to be triggered upon a 'discuss history <this_mob>', you would
-enter 'history' here. The quotes are NOT NEEDED. Remember: only an
-exact match (case insensitive of course) will allow the discussion to take
-place, so you will probably want to keep it simple.
-
-Example: history\n",
-
-/* 57 proc_data: bow_proc */
-"\nPlease enter the message the person is to see when they bow to this mob.
-TERMINATE with a ~ on a LINE BY ITSELF!
-Example, for some priest:
-
-The priest tells you 'You're attitude is encouraging, you should go discuss
-the brotherhood with the abbot in Elden Noir.'\n",
-
-/* 58 proc_data: curse_proc: message */
-
-"\nPlease enter the message you would like shown to the person who will
-'curse' this mob. TERMINATE with a ~ on a LINE BY ITSELF!
-Example, for some priest:
-
-The priest scowls and says, 'Perhaps THIS will teach you to respect the powers
-of good!'
-
-The priest may then transport the person somewhere...Hell perhaps??\n",
-
-/* 59 spec_data: say proc, response */
-"\nNow enter the response to this topic of discussion.
-TERMINATE with a ~ on a LINE BY ITSELF!
-For example, for a priest and \'brotherhood\' for a topic:
-
-The abbot tells you, \'So you wish to join our brotherhood eh? Consider
-yourself an accolyte, but if you truly wish to gain favor, bring me a root of
-the Golden Seal plant for my healing potions. It grows in poplar shaded
-groves in the mountains to the east.\'
-
-Perhaps this priest will also have a give proc for the herb...\n",
-
-/* 60 proc_data: give_proc correct_msg */
-"\nPlease enter the message to be shown upon a CORRECT gift.
-TERMINATE with a ~ on a LINE BY ITSELF!
-Example for an abbot:
-
-The abbot smiles and says, \'Thanks, because of your worthy quest I will tell
-you something of the lore of herbs.\'
-
-Then perhaps the abbot will teach a skill/spell 'herb lore' or something.\n",
-
-/* 61 proc_data: bow_proc skill_name */
-"\nIf you wish to have the mob give the player a skill/spell, enter that here.
-Example: begging
-
-Perhaps a skill an old begger would give a kind soul?
-If you don\'t want anything, please enter NA or na for not applicable.\n",
-
-
-/* 62 proc_data: curse_proc skill_name */
-"\nIf you wish to have the mob give the player a skill/spell, enter that here.
-Example: ancient tongues
-
-Perhaps a skill a crusty old geezer would give a young upstart that shows
-courage, if not tact. Then perhaps the geezer would transport him to some
-evil place?
-If you don't want anything, please enter NA or na for not applicable.\n",
-
-/* 63 proc_data: say_proc skill_name */
-"\nIf you wish to have the mob give the player a skill/spell, enter that here.
-Example: history
-
-Perhaps a skill a sage would give to a serious student?
-If you don\'t want anything, please enter NA or na for not applicable.\n",
-
-/* 64 proc_data: give_proc skill_name */
-"\nIf you wish to have the mob give the player a skill/spell, enter that here.
-
-Example: herb lore
-
-If you don\'t want anything, please enter NA or na for not applicable.\n",
-
-/* 65 proc_data: bow_proc, obj_num */
-"\nPlease enter the number of the object the mob is to give to who ever
-bows to him/her. If you don\'t want anything to be given, enter ZERO (0).
-Example: 82 \n",
-
-/* 66 proc_data: curse_proc, obj_num */
-"\nPlease enter the number of the object the mob is to give to who ever
-curses him/her. If you don\'t want anything to be given, enter ZERO (0).
-Example: 66 \n",
-
-/* 67 proc_data: say_proc, obj_num */
-"\nPlease enter the number of the object the mob is to give to who ever
-discusses this topic. If you don\'t want anything to be given, enter ZERO (0).
-Example: 0 \n",
-
-/* 68 proc_data: give_proc, obj_num */
-"\nPlease enter the number of the object the mob is to give to who ever
-gives the RIGHT gift. If you don\'t want anything to be given, enter ZERO (0).
-Example: 24 \n",
-
-/* 69 proc_data: bow_proc, trans_to_room */
-"\nPlease enter the number of the room the mob is to transport the person who
-bows to him/her to.
-If you don\'t want the person transported anywhere, enter ZERO (0).
-Example: 0 \n",
-
-/* 70 proc_data: curse_proc, trans_to_room */
-"\nPlease enter the number of the room the mob is transport the person who
-curses him/her to.
-If you don\'t want the person transported anywhere, enter ZERO (0).
-Example: 666 \n",
-
-/* 71 proc_data: say_proc, trans_to_room */
-"\nPlease enter the number of the room which the mob is to transport the
-person who discusses the given topic.
-If you don\'t want the person transported anywhere, enter ZERO (0).
-Example: 1492 \n",
-
-/* 72 proc_data: give_proc, trans_to_room */
-"\nPlease enter the number of the room which the mob is transport the person
-to who gives the CORRECT gift.
-If you don\'t want the person transported anywhere, enter ZERO (0).
-Example: 1492 \n",
-
-/* 73 proc_data: say_proc, prompt for another? */
-"\nWould you like to add another discussion topic? Yes(1) No(0)
-Example: 0 \n",
-
-/* 74 proc_data: give_proc, wrong_gift_msg */
-"\nPlease enter the message you would like the player to see if he/she gives
-a wrong item to this mob.
-TERMINATE with a ~ on a LINE BY ITSELF!
-
-Example: Thanks, but what I really need is a silver dragon scale. \n",
-
-
-/* 75 proc_data: wrong_align_msg */
-"\nPlease enter the message you would like a player of the wrong alignment
-(as specified by flags set earlier (or not set)) to see.
-TERMINATE with a ~ on a LINE BY ITSELF!
-
-Example: The priest frowns and tells you, 'If I wasn't a peaceful man
-I'd banish your petulant soul to the nine rings of Hell!!' \n",
-
-/* 76 proc_data: wrong_class_msg */
-"\nPlease enter the message you would like a player of the wrong class
-(as specified by flags set earlier (or not set)) to see.
-TERMINATE with a ~ on a LINE BY ITSELF!
-
-Example: The wizzard laughs and says, 'Why would I want to talk to one of
-your profession?'\n",
-
-/* 77 proc_data: wrong_race_msg */
-"\nPlease enter the message you would like a player of the wrong race
-(as specified by flags set earlier (or not set)) to see.
-TERMINATE with a ~ on a LINE BY ITSELF!
-
-Example: The dwarf laughs and says, 'You kind are not welcome in our
-hallowed tunnels.'\n",
-
-/* 78 obj_spec_proc: skin_num */
-"\nPlease enter the number of the object that is to be the skin.\n\n",
-
-/* 79 casts_these_spells */
-"\nNow enter the level of the spell it will cast, and the spell number it
-will cast. You can find the spell_numbers via the 'slist' command.
-A negative one (-1) terminates. (LEVEL SPELL_NUM) pairs, level first.
-
-Example: 30 10 -1 /* This would make it cast a level 30 'web' spell. */\n"
-
-
}; //olc prompts
Modified: branches/version-2-1/mud/grrmud/server/critter.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/critter.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/critter.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -1953,11 +1953,20 @@
if (d > 0) {
Cell<critter*> cll(GROUPEES);
critter* ptr;
-
+
+ d = 0;
while ((ptr = cll.next())) {
+ if( ptr->getCurRoomNum() == getCurRoomNum() ) {
+ d++;
+ }
+ };
+
+ GROUPEES.head(cll);
+
+ while ((ptr = cll.prev())) {
if (ptr->getCurRoomNum() == getCurRoomNum()) {
ptr->GOLD += amt / d;
-
+
if (do_msg) {
Sprintf(buf, "%S splits %i coins, your share is: %i\n", getName(*ptr), amt, amt/d);
ptr->show(buf);
@@ -3394,8 +3403,8 @@
}//
else {
Sprintf(tmp_str,
- "ERROR: trying to load non-existant obj: %i,
- in critter's: %S eq.\n", i, &short_desc);
+ "ERROR: trying to load non-existant obj: %i, "
+ "in critter's: %S eq.\n", i, &short_desc);
mudlog.log(ERROR, tmp_str);
}//else
}//else
@@ -4022,7 +4031,7 @@
String targ(200);
// Conversion buf for longs, NOTE: update append() method --Khaav
String conv_buf(20);
- int source_len = PROMPT_STRING.Strlen();
+ unsigned int source_len = PROMPT_STRING.Strlen();
if (! isAFK() ) {
for (i = 0; i < source_len; ) {
@@ -4143,8 +4152,23 @@
} else {
targ.Append("< AFK > ");
}
- targ.Append(pc->input);
+ // Instead of spamming out all the pending commands, be nice about it
+ {
+ String tmp;
+ unsigned int i;
+
+ tmp.Clear();
+ for(i=0;i<pc->input.Strlen();i++) {
+ if ( pc->input.charAt(i) == '\n' ) {
+ tmp.append(";");
+ } else {
+ tmp.append(pc->input.charAt(i));
+ } // else
+ } // for
+ targ.Append(tmp);
+ }
+
if (! isUsingClient()) {
targ.Append(go_ahead_str);
}
Modified: branches/version-2-1/mud/grrmud/server/ez_skll.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/ez_skll.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/ez_skll.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -404,10 +404,10 @@
return 0;
}//if
else {
- pc.show("You entwine yourself in the powers of nature, binding
- yourself to the earth's embrace.\n");
+ pc.show("You entwine yourself in the powers of nature, binding\n"
+ "yourself to the earth's embrace.\n");
}//else
-
+
/* it lasts untill mana runs out, or the player moves */
pc.affected_by.pushFront(new stat_spell_cell(spell_num, -1));
return 0;
Modified: branches/version-2-1/mud/grrmud/server/grrmud.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/grrmud.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/grrmud.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -569,16 +569,16 @@
cout << "On machine: " << BuildInfo::getBuildMachine() << endl;
cout << "By: " << BuildInfo::getBuilder() << endl << endl;
- cout << "Welcome to SryMUD server by Ben Greear.
-This server and it's accompanying client, Hegemon, is distributed
-under the GNU General Public License (GPL). See the License file
-for more information.
+ cout << "Welcome to SryMUD server by Ben Greear.\n"
+ "This server and it's accompanying client, Hegemon, is distributed\n"
+ "under the GNU General Public License (GPL). See the License file\n"
+ "for more information.\n"
+ "\n"
+ "Be sure to check the log files in the ./log directory if you have\n"
+ "any strange occurances.\n"
+ "\n"
+ "--Ben Greear (greear at cyberhighway.net, greearb at agcs.com)\n\n";
-Be sure to check the log files in the ./log directory if you have
-any strange occurances.
-
---Ben Greear (greear at cyberhighway.net, greearb at agcs.com)\n\n";
-
srand(time(0));
config.read("grrmud.cfg");
Modified: branches/version-2-1/mud/grrmud/server/login.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/login.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/login.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -863,14 +863,14 @@
pc.show(CTAG_ENGAGE_CLIENT(HEGEMON));
}
else {
- pc.show("You're prompt is on by default, but as Hegemon displays
-bar graphs anyway, you may wish to change your prompt. I suggest the
-command: prompt %N\n");
+ pc.show("You're prompt is on by default, but as Hegemon displays\n"
+ "bar graphs anyway, you may wish to change your prompt. I suggest the\n"
+ "command: prompt %N\n");
}
show("Welcome to the Game.\n\n", pc);
look(1, &NULL_STRING, pc); //autolook
show("\r\nIf your screen is 'stair-stepped', type: toggle carriage\n",
- pc);
+ pc);
pc.save(); //make sure they have a Pfile
Modified: branches/version-2-1/mud/grrmud/server/object.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/object.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/object.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -1677,8 +1677,8 @@
void object::listScripts(critter& pc) {
String buf(500);
- buf.Append("These scripts are defined for this object, the actual scripts
-may be seen by using the stat_room_script [rm_num] [script_index] command.\n\n");
+ buf.Append("These scripts are defined for this object, the actual scripts\n"
+ "may be seen by using the stat_room_script [rm_num] [script_index] command.\n\n");
pc.show(buf);
Modified: branches/version-2-1/mud/grrmud/server/olc2.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/olc2.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/olc2.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -961,10 +961,10 @@
pc.PC_FLAGS.turn_on(13);
OLC_MOB->setNotComplete();
- show("You now have the ability to somewhat change this mob. Be careful
-that you don't add a proc that is ALREADY THERE. This will result in
-strange things. It should NOT be fatal however, so you can just remove
-the proc later with the appropriate command(s).\n", pc);
+ show("You now have the ability to somewhat change this mob. Be careful\n"
+ "that you don't add a proc that is ALREADY THERE. This will result in \n"
+ "strange things. It should NOT be fatal however, so you can just remove\n"
+ "the proc later with the appropriate command(s).\n", pc);
pc.setMode(MODE_OLC);
return 0;
}//add_proc
@@ -979,8 +979,8 @@
if (pc.PC_FLAGS.get(13)) {
- show("You must complete your current project. You are in a special
-case of OLC.\n", pc);
+ show("You must complete your current project. You are in a special\n"
+ "case of OLC.\n", pc);
return -1;
}//if
//log("About to delete.\n");
@@ -1760,8 +1760,8 @@
obj_list[vict->OBJ_NUM] = *vict; //operator overload!!
obj_list[vict->OBJ_NUM].IN_LIST = NULL;
- show("OK, object as been saved as is.
- Aosave will make the changes permanent.\n", pc);
+ show("OK, object as been saved as is.\n"
+ "Aosave will make the changes permanent.\n", pc);
return 0;
}//obj_save
Modified: branches/version-2-1/mud/grrmud/server/room.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/room.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/room.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -2688,8 +2688,8 @@
void room::listScripts(critter& pc) {
String buf(500);
- buf.Append("These scripts are defined for this room, the actual scripts
-may be seen by using the stat_room_script [rm_num] [script_index] command.\n\n");
+ buf.Append("These scripts are defined for this room, the actual scripts\n"
+ "may be seen by using the stat_room_script [rm_num] [script_index] command.\n\n");
pc.show(buf);
Modified: branches/version-2-1/mud/grrmud/server/spells.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/spells.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/spells.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -610,8 +610,8 @@
return -1;
}//if
- show("**WOW**, as you step into the next room you encounter a strange
-silvery curtain of....energy!\n", pc);
+ show("**WOW**, as you step into the next room you encounter a strange "
+ "silvery curtain of....energy!\n", pc);
emote("blinks out of sight!", pc, ROOM, TRUE);
retval = relocate_within_zone(pc, is_dead, sanity, FALSE);
emote("materializes in front of you!", pc, ROOM, TRUE); //in new room now
Modified: branches/version-2-1/mud/grrmud/server/wep_skll.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/wep_skll.cc 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/grrmud/server/wep_skll.cc 2004-11-25 01:57:05 UTC (rev 709)
@@ -143,7 +143,7 @@
Sprintf(buf, "circles and places %S in %S's back.",
weap_name, name_of_crit(vict, ~0));
emote(buf, pc, ROOM, TRUE, &vict);
- Sprintf(buf, "You circle and place %S in %S's back.",
+ Sprintf(buf, "You circle and place %S in %S's back.\n",
weap_name, name_of_crit(vict, pc.SEE_BIT));
show(buf, pc);
}//else
Modified: branches/version-2-1/mud/lib/containers/list2.h
===================================================================
--- branches/version-2-1/mud/lib/containers/list2.h 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/lib/containers/list2.h 2004-11-25 01:57:05 UTC (rev 709)
@@ -600,12 +600,12 @@
protected:
friend class List<T>;
- List<T>::Node *node;
+ typename List<T>::Node *node;
List<T>* in_lst;
virtual void insertBefore (const T& data) {
Assert((int)node);
- List<T>::Node *N = new List<T>::Node;
+ typename List<T>::Node *N = new typename List<T>::Node;
if (!N) {
mudlog.log(ERROR, "ERROR, out of Memory trying to allocate a cell.\n");
exit (101);
@@ -627,7 +627,7 @@
/* INSTERT_AFTER-- Insert an item into a list after a given cell. */
virtual void insertAfter(const T& data) {
Assert((int)node);
- List<T>::Node *N = new List<T>::Node;
+ typename List<T>::Node *N = new typename List<T>::Node;
N->item = data;
N->prev = node;
N->next = node->next;
@@ -640,7 +640,7 @@
List<>, and that takes care of keeping other Cell<> iterators
cleaned up. */
virtual T lose() {
- class List<T>::Node* node_ptr = node;
+ typename List<T>::Node* node_ptr = node;
node->prev->next = node->next;
node->next->prev = node->prev;
Modified: branches/version-2-1/mud/lib/log/LogStream.h
===================================================================
--- branches/version-2-1/mud/lib/log/LogStream.h 2004-11-24 19:31:46 UTC (rev 708)
+++ branches/version-2-1/mud/lib/log/LogStream.h 2004-11-25 01:57:05 UTC (rev 709)
@@ -25,11 +25,22 @@
// roll logs after a certain amount of usage, and it's verbosity
// level can be adjusted on the fly.
-#include <strstream.h>
-#include <iostream.h>
-#include <fstream.h>
+/*
+#ifdef HAVE_NEW_IOSTREAMS
+#include <sstream>
+typedef std::stringstream my_sstream;
+#else
+#include <strstream>
+typedef strstream my_sstream;
+#endif
+*/
+#include <sstream>
+typedef std::stringstream my_sstream;
+
+#include <iostream>
+#include <fstream>
#include <stdlib.h>
-#include <string.h>
+#include <string>
#include <stdio.h>
#ifndef LOG_STREAM_INCLUDE
@@ -66,7 +77,7 @@
LogStream& endl(LogStream& lstr);
-class LogStream : public ofstream {
+class LogStream : public std::ofstream {
protected:
char* filename;
int log_level;
@@ -111,6 +122,7 @@
}
close();
+ clear();
if (fname) {
filename = strdup(fname);
@@ -118,7 +130,7 @@
open(filename);
}
else {
- open(filename, ios::app);
+ open(filename, std::ios::app);
}
//cout << "Opening log-str -:" << filename << ":-\n";
@@ -130,6 +142,7 @@
sofar = 0;
if (file_action & OVERWRITE) {
close();
+ clear();
char buf[strlen(filename) * 2 + 100];
sprintf(buf, "mv -f %s %s.old", filename, filename);
system(buf);
@@ -156,7 +169,7 @@
}
LogStream& operator<< (const char* msg) {
- *((ofstream*)this) << msg;
+ *((std::ofstream*)this) << msg;
sofar += strlen(msg);
if (sofar > max_logfile_sz) {
rollFile();
@@ -165,79 +178,79 @@
}//operator overload
LogStream& operator<< (const void* ptr) {
- *((ofstream*)this) << ptr;
+ *((std::ofstream*)this) << ptr;
sofar += 4; //guess how long it might be...
return *this;
}
LogStream& operator<< (short int i) {
- *((ofstream*)this) << i;
+ *((std::ofstream*)this) << i;
sofar += 4; //guess how long it might be...
return *this;
}
LogStream& operator<< (unsigned char i) {
- *((ofstream*)this) << i;
+ *((std::ofstream*)this) << i;
sofar += 1; //guess how long it might be...
return *this;
}
LogStream& operator<< (char i) {
- *((ofstream*)this) << i;
+ *((std::ofstream*)this) << i;
sofar += 1; //guess how long it might be...
return *this;
}
LogStream& operator<< (unsigned short int i) {
- *((ofstream*)this) << i;
+ *((std::ofstream*)this) << i;
sofar += 4; //guess how long it might be...
return *this;
}
LogStream& operator<< (int i) {
- *((ofstream*)this) << i;
+ *((std::o