diff -c -r --new-file ds2.0r28/lib/cmds/admins/mfinger.c ds2.1/lib/cmds/admins/mfinger.c
*** ds2.0r28/lib/cmds/admins/mfinger.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/admins/mfinger.c Sat Jul 8 23:30:54 2006
***************
*** 53,58 ****
void help() {
message("help", "Syntax: \n\n"
! "Allows you to get finger information from a player's site.",
this_player());
}
--- 53,63 ----
void help() {
message("help", "Syntax: \n\n"
! "Allows you to get finger information from a player's site.\n\n"
! "Note: In 1995, you could reliably expect a UNIX machine to cheerfully "
! "respond to a finger request. Now, more than 10 years later, everything "
! "is blocked, firewalled, and hardened. This command is all but useless, "
! "and is kept as a historical curiosity. Any \"bugs\" it contains will "
! "not be fixed.",
this_player());
}
diff -c -r --new-file ds2.0r28/lib/cmds/creators/colors.c ds2.1/lib/cmds/creators/colors.c
*** ds2.0r28/lib/cmds/creators/colors.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/creators/colors.c Sat Jul 8 23:30:54 2006
***************
*** 6,29 ****
int cmd() {
write(
! "%^RED%^RED\n"
! "%^GREEN%^GREEN\n"
! "%^ORANGE%^ORANGE\n"
! "%^YELLOW%^YELLOW\n"
! "%^BLUE%^BLUE\n"
! "%^CYAN%^CYAN\n"
! "%^MAGENTA%^MAGENTA\n"
! "%^BLACK%^BLACK\n"
! "%^WHITE%^WHITE\n"
! "%^B_RED%^B_RED\n"
! "%^B_GREEN%^B_GREEN\n"
! "%^B_ORANGE%^B_ORANGE\n"
! "%^B_YELLOW%^B_YELLOW\n"
! "%^B_BLUE%^B_BLUE\n"
! "%^B_CYAN%^B_CYAN\n"
! "%^B_BLACK%^B_BLACK\n"
! "%^B_WHITE%^B_WHITE%^RESET%^\n"
! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n"
);
return 1;
}
--- 6,33 ----
int cmd() {
write(
! "%^RED%^RED\t%%^^RED%%^^\n"
! "%^GREEN%^GREEN\t%%^^GREEN%%^^\n"
! "%^ORANGE%^ORANGE\t%%^^ORANGE%%^^\n"
! "%^YELLOW%^YELLOW\t%%^^YELLOW%%^^\n"
! "%^BLUE%^BLUE\t%%^^BLUE%%^^\n"
! "%^CYAN%^CYAN\t%%^^CYAN%%^^\n"
! "%^MAGENTA%^MAGENTA\t%%^^MAGENTA%%^^\n"
! "%^BLACK%^BLACK\t%%^^BLACK%%^^\n"
! "%^WHITE%^WHITE\t%%^^WHITE%%^^\n"
! "%^B_RED%^B_RED\t%%^^B_RED%%^^\n"
! "%^B_GREEN%^B_GREEN\t%%^^B_GREEN%%^^\n"
! "%^B_ORANGE%^B_ORANGE\t%%^^B_ORANGE%%^^\n"
! "%^B_YELLOW%^B_YELLOW\t%%^^B_YELLOW%%^^\n"
! "%^B_BLUE%^B_BLUE\t%%^^B_BLUE%%^^\n"
! "%^B_CYAN%^B_CYAN\t%%^^B_CYAN%%^^\n"
! "%^B_BLACK%^B_BLACK\t%%^^B_BLACK%%^^\n"
! "%^B_WHITE%^B_WHITE\t%%^^B_WHITE%%^^\n"
! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n\n"
! "Special tags: %%^^BOLD%%^^ and %%^^FLASH%%^^ and %%^^RESET%%^^\n\n"
! "You can mix and match, for example: \n"
! "%%^^B_RED%%^^%%^^CYAN%%^^%%^^BOLD%%^^%%^^FLASH%%^^Foo!%%^^RESET%%^^:"
! "%^B_RED%^%^CYAN%^%^BOLD%^%^FLASH%^Foo!%^RESET%^"
);
return 1;
}
diff -c -r --new-file ds2.0r28/lib/cmds/creators/people.c ds2.1/lib/cmds/creators/people.c
*** ds2.0r28/lib/cmds/creators/people.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/creators/people.c Tue Jul 11 18:30:58 2006
***************
*** 76,82 ****
}
screenSize = ((int*)this_player()->GetScreen())[0];
formatString = calculateFormatString(screenSize);
- // 74 '-'s.
bar = "--------------------------------------------------------------------------";
for(i = 75; i < screenSize; i++) bar += "-";
bar += "\n";
--- 76,81 ----
***************
*** 244,250 ****
string tzone;
int x, offset;
- //tzone = (string)this_player()->GetTimeZone() || local_time(time())[LT_ZONE];
tzone = query_tz();
offset = (int)TIME_D->GetOffset(tzone);
offset += EXTRA_TIME_OFFSET;
--- 243,248 ----
diff -c -r --new-file ds2.0r28/lib/cmds/players/biography.c ds2.1/lib/cmds/players/biography.c
*** ds2.0r28/lib/cmds/players/biography.c Wed Jul 5 19:58:18 2006
--- ds2.1/lib/cmds/players/biography.c Tue Jul 11 18:30:58 2006
***************
*** 93,99 ****
d2 = ({});
}
else {
- //x = x/2;
d1 = deaths[0..(x-1)];
d2 = deaths[x..];
}
--- 93,98 ----
diff -c -r --new-file ds2.0r28/lib/cmds/players/consider.c ds2.1/lib/cmds/players/consider.c
*** ds2.0r28/lib/cmds/players/consider.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/players/consider.c Tue Jul 11 18:30:58 2006
***************
*** 15,21 ****
if(sizeof(weapons)){
foreach(object weapon in weapons){
- //tc("skill level for "+identify(weapon)+": "+whom->GetSkill(weapon->GetWeaponType()+" attack")["level"]);
if(weapon->GetWeaponType() && whom->GetSkill(weapon->GetWeaponType()+" attack")){
attack_types += ({ weapon->GetWeaponType() });
score += ( whom->GetSkill(weapon->GetWeaponType()+" attack")["level"] ) * 3;
--- 15,20 ----
***************
*** 25,42 ****
if(weapon->GetHands() > 1) {
if(!(whom->GetSkill("multi-hand"))) score /= 3;
}
- //tc("weapon score: "+score);
}
if(sizeof(weapons) >1) {
if(!(whom->GetSkill("multi-weapon"))) score /= 3;
}
- //tc("final weapon score: "+score);
}
else if((whom->GetMelee())) {
if(whom->GetSkill("melee attack"))
score += (((whom->GetSkill("melee attack")["level"]) * 3));
- //tc("melee score: "+score);
}
if(!sizeof(attack_types)) attack_types = ({"blunt"});
foreach(string Type in attack_types){
--- 24,38 ----
***************
*** 70,87 ****
DamType = 0;
}
- //tc("protection: "+protection,"blue");
score += whom->GetStatLevel("speed") * 2;
- //tc("speed score: "+score);
score += whom->GetStatLevel("strength") * 3;
- //tc("strength score: "+score);
score += whom->GetMaxHealthPoints() / 15;
- //tc("hp score: "+score);
score += protection;
- //tc("score plus protection: "+score);
-
return score;
}
--- 66,77 ----
***************
*** 106,120 ****
theirscore = eventConsider(thing, this_player());
myscore = eventConsider(this_player(), thing);
- //write("Consider complete. ");
- //write("My score: "+myscore);
- //write("Their score: "+theirscore);
- //if(myscore >= theirscore) {
- // write("You have the advantage by "+(myscore - theirscore)+" points.");
- //}
- //else write("They the advantage by "+(theirscore - myscore)+" points.");
totalscore = myscore - theirscore;
- //write("totalscore: "+totalscore);
if(totalscore > 100) write("Piece of cake.");
else if(totalscore > 80) write("No problem.");
else if(totalscore > 60) write("Very easy.");
--- 96,102 ----
diff -c -r --new-file ds2.0r28/lib/cmds/players/emote.c ds2.1/lib/cmds/players/emote.c
*** ds2.0r28/lib/cmds/players/emote.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/players/emote.c Tue Jul 11 18:30:58 2006
***************
*** 33,38 ****
"Places any message you specify directly after your name. For "
"example, \"emote smiles.\" would have others see "
"\"Descartes smiles.\". Non-avatars lose a stamina point for "
! "each emote to discourage abuse.", this_player());
}
--- 33,39 ----
"Places any message you specify directly after your name. For "
"example, \"emote smiles.\" would have others see "
"\"Descartes smiles.\". Non-avatars lose a stamina point for "
! "each emote to discourage abuse.\n"
! "", this_player());
}
diff -c -r --new-file ds2.0r28/lib/cmds/players/env.c ds2.1/lib/cmds/players/env.c
*** ds2.0r28/lib/cmds/players/env.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/players/env.c Tue Jul 11 18:30:58 2006
***************
*** 6,12 ****
write("Screen: \t\t"+identify(this_player()->GetScreen()));
write("Terminal: \t\t"+this_player()->GetTerminal());
write("Brief mode: \t\t"+ ( (this_player()->GetBriefMode()) ? "on" : "off" ));
- //write("PlayerKill mode: \t"+ ( (this_player()->GetPK()) ? "on" : "off" ));
if(creatorp(this_player()))
write("Debug mode: \t\t"+ ( (this_player()->GetProperty("debug")) ? "on" : "off" ));
return 1;
--- 6,11 ----
diff -c -r --new-file ds2.0r28/lib/cmds/players/language.c ds2.1/lib/cmds/players/language.c
*** ds2.0r28/lib/cmds/players/language.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/players/language.c Wed Jul 12 13:29:17 2006
***************
*** 10,25 ****
FluencyMap[lang] = this_player()->GetLanguageLevel(lang);
}
- write("You speak:");
-
if(this_player()->GetPolyglot()){
! write("All languages with 100% proficiency.");
}
! else {
! foreach(string key, int val in FluencyMap){
! write(capitalize(key)+" with "+val+"% proficiency.");
! }
}
return 1;
--- 10,22 ----
FluencyMap[lang] = this_player()->GetLanguageLevel(lang);
}
if(this_player()->GetPolyglot()){
! write("You understand all languages with 100% proficiency.");
}
! write("You speak: ");
! foreach(string key, int val in FluencyMap){
! write(capitalize(key)+" with "+val+"% proficiency.");
}
return 1;
diff -c -r --new-file ds2.0r28/lib/cmds/players/mudlist.c ds2.1/lib/cmds/players/mudlist.c
*** ds2.0r28/lib/cmds/players/mudlist.c Wed Jul 5 19:58:18 2006
--- ds2.1/lib/cmds/players/mudlist.c Tue Jul 11 18:30:58 2006
***************
*** 66,73 ****
string msg, svc;
int val, comma = 0;
- //tc("borg: "+identify(borg));
-
mud = keys(borg)[0];
msg = "\nDetailed information on %^GREEN%^" + mud + "%^RESET%^:\n";
msg += sprintf("MUD Type: %:-6s Server: %:-20s Library: %s\n",
--- 66,71 ----
diff -c -r --new-file ds2.0r28/lib/cmds/players/newbie.c ds2.1/lib/cmds/players/newbie.c
*** ds2.0r28/lib/cmds/players/newbie.c Wed Dec 31 19:00:00 1969
--- ds2.1/lib/cmds/players/newbie.c Wed Jul 12 13:29:17 2006
***************
*** 0 ****
--- 1,18 ----
+ #include
+
+ inherit LIB_DAEMON;
+
+ int eventNoob(){
+ write("%^RED%^WHAT A NEW PLAYER SHOULD KNOW\n%^RESET%^");
+ this_player()->eventPage("/doc/help/players/handbook");
+ return 1;
+ }
+
+ mixed cmd(string str) {
+ return eventNoob();
+ }
+
+ void help() {
+ eventNoob();
+ }
+
diff -c -r --new-file ds2.0r28/lib/cmds/players/who.c ds2.1/lib/cmds/players/who.c
*** ds2.0r28/lib/cmds/players/who.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/cmds/players/who.c Wed Jul 12 20:17:44 2006
***************
*** 25,32 ****
else if(avatarp(obs[i]) ) tmp+="[%^GREEN%^AVATAR%^RESET%^]";
else if(high_mortalp(obs[i]) ) tmp+="[%^GREEN%^HIGH MORTAL%^RESET%^]";
else tmp+=sprintf("[%d]", obs[i]->GetLevel() );
! if(elderp(obs[i])) tmp+=" [%^YELLOW%^ELDER%^RESET%^]";
! if(ambassadorp(obs[i])) tmp+=" [%^YELLOW%^AMBASSADOR%^RESET%^]";
if(sizeof(obs[i]->GetShort()) < 50) {
tmp+=sprintf(" %s", obs[i]->GetShort());
}
--- 25,33 ----
else if(avatarp(obs[i]) ) tmp+="[%^GREEN%^AVATAR%^RESET%^]";
else if(high_mortalp(obs[i]) ) tmp+="[%^GREEN%^HIGH MORTAL%^RESET%^]";
else tmp+=sprintf("[%d]", obs[i]->GetLevel() );
! if(elderp(obs[i])) tmp+="[%^YELLOW%^ELDER%^RESET%^]";
! if(ambassadorp(obs[i])) tmp+="[%^YELLOW%^AMBASSADOR%^RESET%^]";
! tmp += ": ";
if(sizeof(obs[i]->GetShort()) < 50) {
tmp+=sprintf(" %s", obs[i]->GetShort());
}
diff -c -r --new-file ds2.0r28/lib/daemon/decay.c ds2.1/lib/daemon/decay.c
*** ds2.0r28/lib/daemon/decay.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/decay.c Tue Jul 11 18:30:58 2006
***************
*** 17,24 ****
corpses += find_inheritors(LIB_CORPSE);
limbs += find_inheritors(LIB_LIMB);
- //tc("eventDecay called. limbs: "+sizeof(limbs)+", corpses: "+sizeof(corpses));
-
limbs->eventDecay();
corpses->eventDecay();
--- 17,22 ----
diff -c -r --new-file ds2.0r28/lib/daemon/help.c ds2.1/lib/daemon/help.c
*** ds2.0r28/lib/daemon/help.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/help.c Tue Jul 11 18:30:59 2006
***************
*** 255,261 ****
}
if( !sizeof(syn) ) {
if( function_exists("help", load_object(file)) ) {
- //Error = "This help may be out of date.";
Error = " ";
file->help();
return 0;
--- 255,260 ----
***************
*** 438,444 ****
help = "Index: %^GREEN%^" + index + "%^RESET%^\n" +
"Topic: %^GREEN%^" + topic + "%^RESET%^\n\n" + help;
if( file_exists(DIR_RACE_HELP + "/" + topic) )
- //help += read_file(DIR_RACE_HELP + "/" + topic);
return help;
}
Error = "No such race exists.";
--- 437,442 ----
diff -c -r --new-file ds2.0r28/lib/daemon/intermud.c ds2.1/lib/daemon/intermud.c
*** ds2.0r28/lib/daemon/intermud.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/intermud.c Tue Jul 11 18:30:59 2006
***************
*** 103,109 ****
return;
}
switch(packet[0]) {
- //default : tc("Packet: "+identify(packet));
case "startup-reply":
log_file("intermud",identify(packet));
tn("INTERMUD_D: "+identify(packet),"red");
--- 103,108 ----
***************
*** 135,141 ****
}
if( packet[6] == MudList->ID ) {
tn("We don't like packet element 6. It is: "+identify(packet[6]),"red");
- //return;
tn("We will continue anyway.","red");
}
if( packet[2] != Nameservers[0][0] ) {
--- 134,139 ----
***************
*** 178,184 ****
SERVICES_D->eventReceiveChannelUserRequest(packet);
break;
case "chanlist-reply":
- // if( packet[6] == ChannelList->ID ) return;
tn("chanlist reply: "+identify(packet), "blue");
if( packet[2] != Nameservers[0][0] ) return;
ChannelList->ID = packet[6];
--- 176,181 ----
diff -c -r --new-file ds2.0r28/lib/daemon/races.c ds2.1/lib/daemon/races.c
*** ds2.0r28/lib/daemon/races.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/races.c Tue Jul 11 18:30:59 2006
***************
*** 154,162 ****
mixed array tmp_limb = allocate(4);
class Stat s;
- //tc("hello.");
- //tc("hellow");
-
res = new(class Race);
res->Resistance = ([]);
--- 154,159 ----
***************
*** 168,174 ****
if( !file_exists(file) ) error("No such file: " + file);
race = last_string_element(file,"/");
- //tc("race: "+race);
lines = explode(read_file(file), "\n");
--- 165,170 ----
***************
*** 189,220 ****
foreach(string line in explode(read_file(file),"\n")){
- //tc("line: "+line,"red");
- //tc("first_string_element: "+first_string_element(line," "),"green");
test_string = first_string_element(line," ");
if(!test_string || !sizeof(test_string)) test_string = line;
- //tc("test_string: "+test_string,"green");
-
switch(test_string){
case "FLYINGRACE":
- //tc("flying","red");
SetFlyingRace(race);
break;
case "LIMBLESSRACE":
- //tc("limbless","red");
SetLimblessRace(race);
break;
case "LIMBLESSCOMBATRACE":
- //tc("limblesscombat","red");
SetLimblessCombatRace(race);
break;
case "NONBITINGRACE":
- //tc("nonbiting","red");
SetNonBitingRace(race);
break;
--- 185,208 ----
***************
*** 237,243 ****
//TODO: This should be a Language array to handle multiple
//languages but further research is required first.
res->Language = replace_string(line, "LANGUAGE ", "");
- //tc("res->Language "+res->Language,"blue");
break;
case "RESISTANCE":
--- 225,230 ----
***************
*** 249,255 ****
case "SKILL":
tmp = explode(replace_string(line, "SKILL ", ""), ":");
- //tc("tmp: "+identify(tmp));
res->Skills[tmp[0]] = ({ tmp[1], tmp[2], tmp[3], tmp[4] });
break;
--- 236,241 ----
***************
*** 257,274 ****
tmp = ({});
s = new (class Stat);
tmp = explode(replace_string(line, "STATS ",""), ":");
- //tc("stat: "+identify(tmp),"yellow");
s->Average = copy(to_int(tmp[1]));
s->Class = copy(to_int(tmp[2]));
res->Stats[tmp[0]] = s;
- //tc("ihnfcaa: "+(res->Stats[tmp[0]])->Average,"yellow");
- //tc("ihnfcaax2: "+(res->Stats[tmp[0]])->Class,"yellow");
break;
case "LIMB":
limb = ({ ({}), ({}), ({}), ({}) });
tmp_limb = explode(replace_string(line, "LIMB ",""), ":");
- //tc("tmp_limb: "+identify(tmp_limb),"cyan");
limb[0] = tmp_limb[0];
limb[1] = (tmp_limb[1] == "0" ? 0 : tmp_limb[1]);
limb[2] = to_int(tmp_limb[2]);
--- 243,256 ----
***************
*** 277,283 ****
if( x == 0 && str != "0" ) { return GetArmor(str); }
return x;
});
- //tc("limb: "+identify(limb),"green");
res->Limbs = ({ res->Limbs..., limb });
res->Limbs += ({limb});
--- 259,264 ----
***************
*** 293,300 ****
}
}
- //tc("ok then.","blue");
-
res->Complete = 1;
if( player ) {
--- 274,279 ----
***************
*** 307,322 ****
Races[race] = res;
wtf = save_variable(Races[race]);
- //tc("wtf: "+identify(wtf),"yellow");
save_object(SAVE_RACES);
}
void RemoveRace(string race) {
validate();
wtf = save_variable(Races[race]);
- //tc("wtf: "+identify(wtf),"yellow");
map_delete(Races, race);
! if(Races[race]) //tc("wtf: "+identify(wtf),"blue");
save_object(SAVE_RACES);
}
--- 286,299 ----
Races[race] = res;
wtf = save_variable(Races[race]);
save_object(SAVE_RACES);
}
void RemoveRace(string race) {
validate();
wtf = save_variable(Races[race]);
map_delete(Races, race);
! if(Races[race])
save_object(SAVE_RACES);
}
***************
*** 419,437 ****
tmp = ({ tmp..., ({ key, val }) });
args[0] = tmp;
tmp = ({});
- //foreach(string key, class Stat stat in res->Stats){
StatMap = copy(res->Stats);
schluss = "";
foreach(schluss in keys(StatMap)){
- //tc("key: "+identify(StatMap[schluss]),"green");
- //tc("Average: "+identify(StatMap[schluss]->Average),"green");
- //tc("Class: "+identify(StatMap[schluss]->Class),"green");
tmp = ({ tmp..., ({ schluss, StatMap[schluss]->Average, StatMap[schluss]->Class }) });
- //tc("SetCharacterRace: "+identify(tmp));
}
args[1] = tmp;
args[2] = res->Language;
- //args[3] = ({ res->Sensitivity[0], res->Sensitivity[1] });
args[3] = res->Sensitivity;
args[4] = res->Skills;
}
--- 396,408 ----
diff -c -r --new-file ds2.0r28/lib/daemon/reaper.c ds2.1/lib/daemon/reaper.c
*** ds2.0r28/lib/daemon/reaper.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/reaper.c Wed Jul 12 21:34:24 2006
***************
*** 13,18 ****
--- 13,19 ----
call_out((: eventReap :), 300);
reap_dummies();
+ reap_other();
}
static void create() {
diff -c -r --new-file ds2.0r28/lib/daemon/services/channel.c ds2.1/lib/daemon/services/channel.c
*** ds2.0r28/lib/daemon/services/channel.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/daemon/services/channel.c Tue Jul 11 18:30:59 2006
***************
*** 211,217 ****
}
int RemoveChannel(string channel) {
- //if( !((int)master()->valid_apply( ({}) )) ) return 0;
tn("RemoveChannel: "+identify(channel),"green");
if( member_array(channel, (string array)INTERMUD_D->GetChannels()) == -1 ){
--- 211,216 ----
diff -c -r --new-file ds2.0r28/lib/daemon/services/who.c ds2.1/lib/daemon/services/who.c
*** ds2.0r28/lib/daemon/services/who.c Wed Jul 5 00:01:03 2006
--- ds2.1/lib/daemon/services/who.c Tue Jul 11 18:30:59 2006
***************
*** 13,26 ****
string list, *who;
object ob;
- //tc("who packet: "+identify(packet));
if( file_name(previous_object()) != INTERMUD_D ) return;
if( !packet[5] || !(ob = find_player(convert_name(packet[5]))) ) return;
list = "%^MAGENTA%^Remote who information from " + packet[2] + ":%^RESET%^\n";
foreach(who in packet[6])
list += who[0] + " (" + who[1] + " idle): " + who[2] +"\n";
- //tc("list: "+list,"blue");
- //ob->eventPage(({list}));
ob->eventPrint(list);
tn("eventReceiveWhoReply: "+identify(packet),"blue");
}
--- 13,23 ----
diff -c -r --new-file ds2.0r28/lib/daemon/stargate.c ds2.1/lib/daemon/stargate.c
*** ds2.0r28/lib/daemon/stargate.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/stargate.c Tue Jul 11 18:30:59 2006
***************
*** 27,50 ****
void eventSave(){
unguarded( (: save_object, SAVE_STARGATE, 1 :) );
- //tc("stargate daemon saved itself");
return;
}
void eventLoad(){
if (file_size(SAVE_STARGATE __SAVE_EXTENSION__) > 0){
- //tc("stargate save file exists");
unguarded( (: restore_object, SAVE_STARGATE :) );
}
- //tc("stargate daemon loaded itself");
- //tc("Stargates: "+identify(Stargates),"red");
return;
}
int SetStargate(string address, string destination){
mapping tmp = ([]);
Stargates[address] = tmp;
- //tc("Stargates: "+identify(Stargates),"yellow");
if (address == "" || destination == "") return 1;
if(sizeof(Stargates[address])) return 1;
Stargates[address]["status"] = "idle";
--- 27,45 ----
***************
*** 55,139 ****
}
mapping GetStargate(string address){
- //tc("Stargates: "+identify(Stargates),"blue");
return copy(Stargates[address]);
}
int RemoveStargate(string address){
- //tc("Stargates: "+identify(Stargates),"red");
map_delete(Stargates, address);
- //tc("Stargates: "+identify(Stargates),"cyan");
eventSave();
return 0;
}
mapping GetStargates(){
- //tc("Stargates: "+identify(Stargates),"blue");
return copy(Stargates);
}
int SetStatus(string address, string status){
- //tc("Setting status of "+status+" on "+address+".");
Stargates[address]["status"] = status;
eventSave();
return 0;
}
string GetStatus(string address){
- //tc("Stargates: "+identify(Stargates),"red");
return Stargates[address]["status"];
}
string GetDestination(string address){
string ret = Stargates[address];
- //tc("Stargates: "+identify(Stargates),"white");
if(sizeof(Stargates[address]) && sizeof(Stargates[address]["destination"]))
return Stargates[address]["destination"];
else return "";
}
string GetEndpoint(string address){
- //tc("Stargates: "+identify(Stargates),"blue");
return Stargates[address]["endpoint"];
}
int eventConnect(string from, string to){
- //tc("Stargates: "+identify(Stargates),"red");
- //tc("STARGATE_D, from: "+from+", to: "+to,"green");
if (from == to) return 0;
if (!Stargates[from] || !sizeof(Stargates[from])){
- //tc("failed to lookup status of outbound gate");
return 0;
}
if (!Stargates[to] || !sizeof(Stargates[to])){
- //tc("failed to lookup status of inbound gate");
return 0;
}
if (Stargates[from]["status"] == "idle" && Stargates[to]["status"] == "idle"){
- //tc("situation normal");
Stargates[from]["endpoint"] = to;
Stargates[from]["status"] = "outbound";
Stargates[to]["endpoint"] = from;
Stargates[to]["status"] = "inbound";
- //tc("Stargates: "+identify(Stargates));
eventSave();
return 1;
}
- //tc("exception");
return 0;
}
int eventDisconnect(string from){
string endpoint;
if(!from || from == "") return 0;
- //tc("Stargates: "+identify(Stargates),"blue");
if (!Stargates[from] || !sizeof(Stargates[from])) return 0;
--- 50,118 ----
diff -c -r --new-file ds2.0r28/lib/daemon/verbs.c ds2.1/lib/daemon/verbs.c
*** ds2.0r28/lib/daemon/verbs.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/daemon/verbs.c Sun Jul 9 19:04:26 2006
***************
*** 23,29 ****
string verb;
int i;
- //tc("/daemon/verbs: eventReloadVerbs");
if( arrayp(val) ) verbs = filter(val, (: GetValidVerb($1) :));
else if( stringp(val) ) {
if( strlen(val) > 2 && val[<2..] == ".c" ) val = val[0..<3];
--- 23,28 ----
***************
*** 51,56 ****
--- 50,63 ----
break;
}
}
+ foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) {
+ dir = DIR_SECURE_VERBS + "/" + dir;
+ if( file_size(dir) != -2 ) continue;
+ if( file_exists( dir + "/" + val + ".c") ) {
+ verbs = ({ dir + "/" + val });
+ break;
+ }
+ }
if( !verbs ) return;
}
}
***************
*** 64,69 ****
--- 71,81 ----
if( file_size(dir) == -2 )
verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :));
}
+ foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) {
+ dir = DIR_SECURE_VERBS + "/" + dir;
+ if( file_size(dir) == -2 )
+ verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :));
+ }
}
i = 0;
foreach(verb in verbs) {
***************
*** 87,101 ****
}
string GetErrorMessage(string verb) {
- //tc("/daemon/verbs: GetErrorMessage");
if( !Verbs[verb] ) return 0;
else return (string)Verbs[verb]->GetErrorMessage();
}
int GetValidVerb(string verb) {
! //tc("/daemon/verbs: GetValidVerb: verb: "+verb);
! return !strsrch(verb, DIR_VERBS);
! //key_arr = keys(GetVerbs());
}
mapping GetVerbs() { return copy(Verbs); }
--- 99,111 ----
}
string GetErrorMessage(string verb) {
if( !Verbs[verb] ) return 0;
else return (string)Verbs[verb]->GetErrorMessage();
}
int GetValidVerb(string verb) {
! if(!strsrch(verb, DIR_VERBS) || !strsrch(verb, DIR_VERBS)) return 1;
! else return 0;
}
mapping GetVerbs() { return copy(Verbs); }
diff -c -r --new-file ds2.0r28/lib/doc/CREDITS ds2.1/lib/doc/CREDITS
*** ds2.0r28/lib/doc/CREDITS Wed Jul 5 00:00:58 2006
--- ds2.1/lib/doc/CREDITS Wed Jul 12 20:17:44 2006
***************
*** 16,29 ****
Brodbane, Ashon, Shadyman, Jonez, Cecil, Daelas.
Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung,
! Aten, Metiscus, Garfield, Javelin, Alensin, Daelas,
! Zeus, Dastuun, Detah, and Nulvect for their
thoughtful comments and suggestions.
! Also: Xyzzy He Is Cool
Cratylus @ Dead Souls
! 04 Jan 2006
! updated May 2006
--- 16,33 ----
Brodbane, Ashon, Shadyman, Jonez, Cecil, Daelas.
Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung,
! Aten, Metiscus, Garfield, Javelin, Alensin, Daelas, Root,
! Kristus, Zeus, Dastuun, Detah, and Nulvect for their
thoughtful comments and suggestions.
! * Thanks to Frostmud.com for letting me test on their box.
! * Thanks to Wolfpaw.com for letting me test on their box.
!
!
! Much gratitude to playtesters: Karri, Aten, Tacitus, Kaatil, Atomic, Daelas.
+ Also: Xyzzy He Is Cool
Cratylus @ Dead Souls
! July 2006
diff -c -r --new-file ds2.0r28/lib/doc/README ds2.1/lib/doc/README
*** ds2.0r28/lib/doc/README Wed Jul 5 00:00:58 2006
--- ds2.1/lib/doc/README Wed Dec 31 19:00:00 1969
***************
*** 1,38 ****
- The Dead Souls Mud Library
- Released 18 December 2005
-
- UPGRADE NOTE: If you are upgrading from an older version of
- Dead Souls, you have to copy your old /secure/cfg/mudos.cfg somewhere
- safe first, and then restore it after you upgrade. Alternately
- you may just edit the new mudos.cfg to say what the old one said.
-
- GENERAL FAQ: http://dead-souls.net/ds-faq.html
-
- ADMIN FAQ: http://dead-souls.net/ds-admin-faq.html
-
- ED TUTORIAL: http://dead-souls.net/editor.html
-
- NEW CREATION SYSTEM: http://dead-souls.net/example.html
-
- Please read /doc/SUPPORT for details on the supportability
- of this software. Note that the Frontiers LPC Foundation does not take
- the responsibility for getting you up and running, or fixing bugs.
- This code is available to you as-is.
-
- Some years ago, Descartes @ Nightmare chose to retire his
- Nightmare mudlib from distribution. Despite various disputes over
- the years, this embargo has stood quite firm. Yet some folks felt
- that it was a fine lib, and many were sorry to see it go.
-
- This mudlib is based on that old warhorse. It is entirely
- free from those copyright problems, and can be shared.
-
- The latest files will be at
- http://sourceforge.net/project/showfiles.php?group_id=148388
-
- Please review /doc/old/README for more historical background.
-
- Have fun!
-
- - Cratylus @ Frontiers
- 18 December 2005
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/doc/RELEASE_NOTES ds2.1/lib/doc/RELEASE_NOTES
*** ds2.0r28/lib/doc/RELEASE_NOTES Wed Jul 5 20:52:28 2006
--- ds2.1/lib/doc/RELEASE_NOTES Wed Jul 12 13:29:17 2006
***************
*** 1,3 ****
--- 1,72 ----
+ ---- 2.1 ---
+ - Fixed relative include problem in QCS.
+ - Fixed memcheck.
+ - Added vis and invis to list of customizable messages with the
+ message command.
+ - Fixed bug in ls command with the -b flag.
+ - Fixed index problems in chat.c with class channels.
+ - Fixed a problem when looking at dummy items (e.g. buttons and doors).
+ - Fixed color code problem in the arch room screen.
+ - Fixed problem in look verb that caused problems looking at
+ objects that inherit LIB_DUMMY. Tons of thanks to Daelas for this save.
+ - Unused debug lines removed, general cleanup of ugly
+ or unnecessary comments.
+ - Miscellaneous tightening up of domain objects such as lowering
+ the max health of newts, etc.
+ - Miscellaneous tidying up of lib logic, such as preventing the
+ fly command to commence flight whether already flying or not.
+ - KNOWN ISSUES:
+ o The blackjack table is officially on the "I'm not fixing it" list.
+ It is left as an example of game code, but you are warned that
+ it contains some subtle and not-so-subtle errors in its calculations.
+ o addr_server.exe win32 binary removed, due to bugginess. Since
+ it hasn't been working for a while, and it was only noticed by
+ a bugtester, it's going away until post-2.1
+ o A peculiarity in grammar with multiple corpses can be seen. This is
+ partly due to a MudOS idiosyncracy which will be addressed in the future.
+ o In some cases combat events appear slighly out of order. This
+ will be addressed in a rewrite of combat objects in the future.
+
+ ---- 2.0r29 ---
+ - Fixed finger daemon to not display ip addresses to players.
+ - The verb copy now handles relative paths more gracefully.
+ - LIB_TEACHER can now know all languages with SetAllLanguages(1)
+ - Standard chairs and beds can no longer be taken when someone is using them.
+ - Fixed church elevator buttons.
+ - Fixed problem with "look at pile".
+ - Fixed problem with examining objects on surfaces.
+ - It is now also possible to look at things carried by others,
+ e.g. "look at shirt on fighter".
+ - Remote finger no longer betrays invisible people.
+ - Added sefun: alpha_strip
+ - Room descriptions now indicate which piece of furniture a creature
+ is resting on, if applicable.
+ - Objects on surfaces than can be sat or lain in are not visible
+ or accessible if someone is lying or sitting on that surface. e.g.,
+ you can't examine or get the glasses under your butt on the chair.
+ - SetMaxHealthPoints now works as one would expect. The kitchen rat
+ is invincible no more.
+ - Look at problem fixed.
+ - Bank tellers (Zoe) now do a better job of retaining the correct
+ surcharge on currency withdrawals.
+ - Added /secure/obj/glasses.c as a creation object. Since you wear them,
+ it's hard to lose them accidentally. Since few things are called "glasses",
+ they won't get in the way of creating objects. New creators will have them
+ automatically added to the table in their sample room.
+ - One may now have a smiley in front of a channel message without
+ it turning into an emote.
+ - Fixed a conflict in the parsing system.
+ - Verbified "force".
+ - Fixed vendor bugs: appraising at zero, confusion with similar items.
+ - Beefed up the answers_to sefun, to handle adjectives.
+ - Fixed a couple of bugs in the lead/follow system.
+ - Fixed null error when selling to non-vendors.
+ - Fixed a channel log bug that logged to one of two files for
+ some channels, depending on whether someone was logged on (!!).
+ - Fixed bug in meals that prevented empty bottles replacing
+ full ones.
+ - Fixed a bug in the MudOS parser that screwed up things with apostrophes.
+
---- 2.0r28 ---
- Fixed minor bug in body.c that interfered with collapsing.
- Fixed message boards.
diff -c -r --new-file ds2.0r28/lib/doc/help/creators/force ds2.1/lib/doc/help/creators/force
*** ds2.0r28/lib/doc/help/creators/force Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/creators/force Tue Jul 11 18:36:11 2006
***************
*** 0 ****
--- 1,4 ----
+ Syntax:
+
+ Allows you to command some living things to do
+ your bidding.
diff -c -r --new-file ds2.0r28/lib/doc/help/creators/plan ds2.1/lib/doc/help/creators/plan
*** ds2.0r28/lib/doc/help/creators/plan Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/creators/plan Fri Jul 7 19:41:41 2006
***************
*** 0 ****
--- 1,7 ----
+ Your plan file is the extra information others see when
+ they finger you, usually listing what your projects are
+ and what you've been up to. To modify your plan,
+ edit the .plan file in your home directory. For example,
+
+ cd
+ ed .plan
diff -c -r --new-file ds2.0r28/lib/doc/help/creators/profile ds2.1/lib/doc/help/creators/profile
*** ds2.0r28/lib/doc/help/creators/profile Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/creators/profile Fri Jul 7 19:41:41 2006
***************
*** 0 ****
--- 1,11 ----
+ Your profile is a file that contains a list of
+ instructions. When you log in, the mud will force
+ you to execute those commands. To modify what those
+ "startup commands" are, edit the .profile file in
+ your home directory. For example:
+
+ cd
+ ed .profile
+
+ Note that the mud cannot force you to do
+ certain things as a security measure.
diff -c -r --new-file ds2.0r28/lib/doc/help/players/credits ds2.1/lib/doc/help/players/credits
*** ds2.0r28/lib/doc/help/players/credits Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/players/credits Tue Jul 11 18:36:11 2006
***************
*** 0 ****
--- 1,37 ----
+ I'd like to thank the following people for their help, witting or
+ otherwise, in making the new release of Dead Souls possible:
+
+ Sine qua non: Descartes, the legion of MudOS developers, and
+ all those coders who toiled at Nightmare, and Lars Pensjö.
+ Marius for his kind permission to bundle MudOS.
+
+ Direct conributors: Haderach and his clever code and inspiration, Duuk
+ and his willingness to let me poke through his lib and
+ filch code. Great thanks to Marajin for his direct and
+ substantial contribution to the Windows port.
+ Much gratitude to Saquivor, for whom a town street is
+ now named, for getting the Windows socket code working.
+ Thanks also to the following for code donation,
+ support, and/or contribution: Tim@TimMUD, Manchi,
+ Brodbane, Ashon, Shadyman, Jonez, Cecil, Daelas.
+
+ Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung,
+ Aten, Metiscus, Garfield, Javelin, Alensin, Daelas, Root,
+ Kristus, Zeus, Dastuun, Detah, and Nulvect for their
+ thoughtful comments and suggestions.
+ Thanks to Frostmud.com for letting me test on their box.
+
+ Much gratitude to playtesters: Karri, Aten, Tacitus, Kaatil, Atomic.
+
+ Also: Xyzzy He Is Cool
+
+ The following people/organizations provided me with free products/services
+ they normally charge for that allowed me to complete this project:
+ - Wolfpaw http://wolfpaw.net/
+ - Sun Microsystems http://www.sun.com
+ Note: This does not indicate an official corporate sponsorship of
+ any kind. It is simply charity that is well appreciated.
+
+ Cratylus @ Dead Souls
+ July 2006
+
diff -c -r --new-file ds2.0r28/lib/doc/help/players/handbook ds2.1/lib/doc/help/players/handbook
*** ds2.0r28/lib/doc/help/players/handbook Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/players/handbook Wed Jul 12 13:29:17 2006
***************
*** 0 ****
--- 1,838 ----
+ chapter 1 "Introduction"
+
+ If you are unfamiliar with LPC based muds in general or Dead Souls
+ mudlib in particular, you will find this handbook valuable in
+ orienting you around what you can do and how you can do it.
+
+ Keep in mind that this handbook describes the features of a mud
+ running an unmodifed version of the lib. The mud you are on may
+ differ somewhat, though probably not extremely so.
+
+ To advance a page in a chapter, just hit "return".
+
+ Let's start with just navigating this book. Once you are done
+ reading this chapter, you can read the next chapter by typing:
+
+ %^GREEN%^read chapter 2 in handbook%^RESET%^
+
+ Make sure you wait until you are done reading this chapter,
+ though. The reason you should wait is that you are now in "reading
+ mode", which means that anything you type and send to the mud
+ is actually a command to the editing system that is displaying this
+ text.
+
+ To leave reading mode (or more accurately, pager, or ed mode)
+ you can hit "return" a bunch of times to complete the chapter, thus
+ automatically exiting the pager. Another way is to enter the
+ letter "q" (without the quotes) and then "return". That will also
+ make you stop reading.
+
+ When you are not in reading mode, you can find out the chapter
+ titles by typing:
+
+ %^GREEN%^read index in handbook%^RESET%^
+
+ You really should read the whole thing, but in case you don't, the
+ chapter titles will help as a reference to find the information you
+ need.
+
+ Something to watch out for is that if you or your environment
+ contain another handbook, the mud may not know which one you are
+ trying to read. If you get a message like "Which of the two handbooks
+ would you like to read?", you can try one or more of the following:
+
+ %^GREEN%^read index in first handbook%^RESET%^
+
+ %^GREEN%^read index in my handbook%^RESET%^
+
+ %^GREEN%^read index in my first player handbook%^RESET%^
+
+
+ \n
+ chapter 2 "Command Syntax: Doing Stuff"
+
+
+ Section 1: Manipulating Objects
+ ----------
+
+ You've already noticed that Dead Souls, like most modern LP muds,
+ uses natural-like command syntax, like:
+
+ %^GREEN%^read first handbook%^RESET%^
+
+ rather than:
+
+ %^GREEN%^read handbook 1%^RESET%^
+
+ This is because Dead Souls uses a natural language parser. It isn't
+ perfect, of course. If you try to "put all apples from box in my bag after
+ opening them" you won't see much success, but this will work:
+
+ %^GREEN%^open box%^RESET%^
+
+ %^GREEN%^open bag%^RESET%^
+
+ %^GREEN%^get apples from box%^RESET%^
+
+ %^GREEN%^put apples in bag%^RESET%^
+
+ The parser will understand "the first box" or "my second bag",
+ assuming those objects exist in your inventory or in your environment.
+
+ If you want to know what is in the box, the command is:
+
+ %^GREEN%^look in box%^RESET%^
+
+ The command "look at box" or "examine box" will usually *not* show
+ you the contents of that box. This is because normally, boxes are
+ opaque, and in the real world, just looking at a box is rarely enough
+ to see what it contains as well.
+ An exception to this rule are transparent containers (a glass
+ trophy case, perhaps) whose interior is always visible from the
+ outside.
+
+ Sometimes looking at an object reveals its contents because of
+ the nature of the object. A table, for example, can have things on it,
+ and typing:
+
+ %^GREEN%^look at table %^RESET%^
+
+ ...will usually let you know what is on it. It is also possible to
+ see what other players are carrying by just looking at them,
+ unless what they have is inside a container.
+ You'll want to remember that while you can "put apple in bag",
+ if you want to put that apple on a surface like a table, you'll
+ need to:
+
+ %^GREEN%^put apple on table%^RESET%^
+
+ You can give things to people, and they will automatically
+ accept them. However, you may not "take" or "get" things from living
+ beings. It's theirs, and it's up to them if they want to share.
+ You can try to "steal sword from fighter" if you dare, but unless
+ you have trained a lot, this is unlikely to succeed. We'll talk
+ more about training and skills in a later chapter.
+ Naturally you may also drop things you no longer need, though
+ it's nicer to your fellow mudders (and the mud's memory) to put
+ them in recycling bins so the bits can be reused.
+ Some other common object manipulation commands are:
+
+ close, donate, attack, eat, drink, listen, smell, search,
+ shoot, touch, turn.
+
+ There are many others you may find useful, but these will be
+ the ones you use most often to handle simple objects.
+
+ * A note about articles:
+
+ Dead Souls understands both definite and indefinite articles.
+ This means that you can refer to a specific apple, like so:
+
+ %^GREEN%^get the apple%^RESET%^
+
+ But you can also be unspecific. If there are a dozen
+ apples in a crate and you don't care which one you pick up:
+
+ %^GREEN%^get an apple from the crate%^RESET%^
+
+
+ Section 2: Navigation
+ ---------
+
+ Moving around here is probably much like any other mud. You
+ can expect to move mostly in cardinal directions (like north and
+ northwest), but you may sometimes need to go up, down, or out.
+ Strictly speaking, the way to do this is:
+
+ %^GREEN%^go south%^RESET%^
+
+ %^GREEN%^go out%^RESET%^
+
+ ...and so on, but this can get tedious after a while. Instead
+ of having to type in "go" plus the entire direction, the mud allows
+ you to enter shortcuts like "sw" for "go southwest" or "u" for
+ "go up".
+
+ When you enter a room, very often you will see letters in
+ brackets above the room description, like this: [n, u, out]
+ These are the "obvious exits" of that room, and help you
+ quickly find your way around without having to go through each
+ description. But remember! Just because a room has obvious exits
+ doesn't mean those are the only exits. Sometimes a room must
+ be searched to discover an exit, or there may be an exit available
+ that just doesn't happen to be very obvious.
+ If a room is dark, obvious exits may not be visible at all.
+
+ Aside from those ordinary means of travel, there are situations
+ that require more specific locomotion than just "go". These are
+ examples of the use of some other commands to get around:
+
+ %^GREEN%^jump onto road%^RESET%^
+
+ %^GREEN%^enter window%^RESET%^
+
+ %^GREEN%^climb ladder%^RESET%^
+
+ %^GREEN%^crawl east%^RESET%^ (if you are lying down and can't get up)
+
+ %^GREEN%^fly up%^RESET%^
+
+ %^GREEN%^follow thief%^RESET%^
+
+ %^GREEN%^evade hunter%^RESET%^
+
+
+ Section 3: Armor
+ -------
+
+ Now that you can manipulate objects and move around, you'll want
+ to be able to defend yourself, should the need arise. The special
+ object categories of "weapons" and "armor" should help.
+
+ Armor is an item that can be worn. That means that a pair of
+ blue jeans is considered armor, and a suit of chainmail is considered
+ armor as well. Basically, if you can wear it, it's "armor", because
+ whether it's a lot or a little, it protects you.
+ Assuming you are humanoid, you have the following limbs:
+
+ head, neck, torso, right arm, right hand, left arm,
+ left hand, right leg, right foot, left leg, left foot.
+
+ Properly coded armor must be worn on the corect limbs. Usually
+ a command like:
+
+ %^GREEN%^wear chainmail%^RESET%^
+
+ or
+
+ %^GREEN%^wear all%^RESET%^
+
+ ...will cause you to automatically wear armor where it makes
+ most sense. However, it is possible to find armor that,
+ for example, can be worn either on your neck or your torso, like
+ an amulet. If this is so, you'll need to specify where you want it.
+ There are various types of armor, like cloak, pants, glove,
+ etc. Many of them overlap. You can wear a shirt on your torso as
+ well as a cloak and combat armor, but you may not wear two of
+ the same type. If you have a robe and a cape that are both cloaks,
+ you'll have to decide which one is going on.
+ You will find that shoes and gloves are often for one of your
+ hands but not the other. Sometimes you will find shoes, or gloves
+ that don't care which appendage they occupy, but usually these
+ are simply incorrectly coded.
+
+ If you are of some exotic or non-humanoid race, you may have
+ additional limbs to consider, and humanoid armor may not work for you.
+
+
+ Section 4: Weapons
+ ---------
+
+ You may be surprised to learn that almost any manipulable object
+ can be wielded as a weapon, or thrown as a missile. You can wield
+ a can of Spam and try to kill an orc with it...and you may even succeed,
+ if you are strong and tough enough. Don't count on it, though,
+ and instead go for items that are made specifically with personal
+ security in mind.
+
+ There are four main types of weapons:
+
+ knife: knives, daggers
+ blade: like swords, and spears
+ blunt: like clubs, staves, and shillelaghs
+ projectile: things designed to be thrown, like darts or grenades
+
+ Unless it is a special device or magical item, weapons
+ must be wielded in order to be of use in combat. Some weapons,
+ like staves or pikes, may require the use of both hands. If this
+ is the case, wearing a shield may not be possible at the same time.
+ Like armor, weapons differ in quality and effectiveness. A
+ "well-crafted sword" is probably a better choice than a "small
+ rusty knife", but then again, you never know. Maybe rusty knives
+ are exactly what some monster is most vulnerable to.
+
+ Note also that, like armor, weapons wear down with use.
+ Examples of commands that involve weapons or fighting:
+
+ %^GREEN%^wield sword%^RESET%^
+
+ %^GREEN%^wield hammer in left hand%^RESET%^
+
+ %^GREEN%^wield staff in left hand and right hand%^RESET%^
+
+ %^GREEN%^unwield dagger%^RESET%^
+
+ %^GREEN%^shoot gun at otik%^RESET%^
+
+ %^GREEN%^throw dart at beggar%^RESET%^
+
+ %^GREEN%^kill all%^RESET%^ (this makes an enemy of everyone in the room)
+
+ %^GREEN%^ignore first orc%^RESET%^ (lets you concentrate on the other orcs)
+
+ %^GREEN%^ignore all%^RESET%^ (don't fight anyone in the room, even if they are attacking you)
+
+ %^GREEN%^target boss orc%^RESET%^ (this makes you ignore attacks from anyone else)
+
+ %^GREEN%^wimpy 30%^RESET%^ (this makes you run away if your health points drop below 30%)
+
+
+ Section 5: Miscellaneous Things to to with Things
+ ---------
+
+ %^GREEN%^turn on flashlight%^RESET%^
+
+ %^GREEN%^turn off flashlight%^RESET%^
+
+ %^GREEN%^strike match%^RESET%^
+
+ %^GREEN%^light torch with match%^RESET%^
+
+ %^GREEN%^extinguish match%^RESET%^
+
+ %^GREEN%^dig hole with shovel%^RESET%^
+
+ %^GREEN%^move bed%^RESET%^
+
+ %^GREEN%^search %^RESET%^ (by default searches the room)
+
+ %^GREEN%^search rocks%^RESET%^
+
+ %^GREEN%^unlock east door with silver key%^RESET%^
+
+ %^GREEN%^bait pole with worm%^RESET%^
+
+ %^GREEN%^fish with pole%^RESET%^
+
+ %^GREEN%^stop fishing%^RESET%^
+
+ %^GREEN%^drop all%^RESET%^
+
+ %^GREEN%^donate 2 silver%^RESET%^
+
+ %^GREEN%^get all%^RESET%^
+
+ %^GREEN%^get all from corpse%^RESET%^
+
+ %^GREEN%^sell first right glove to otik%^RESET%^
+
+ %^GREEN%^sell all to otik%^RESET%^
+
+ %^GREEN%^buy sword from otik%^RESET%^
+
+ %^GREEN%^buy 8 from otik%^RESET%^ (get Otik to sell you item number 8)
+
+ chapter 3 "Your Health and Abilities"
+
+ In the previous chapter you learned the basics of getting
+ around and taking care of yourself. It's important also to care
+ *for* yourself, and this chapter describes the various aspects of
+ your body's state and what abilities you may have.
+
+
+ The command that tells you almost everything you need to
+ know is "stat". This diplays a whole lot of stuff, perhaps some of
+ it completely unfamiliar. Let's start at the top, using my output
+ as an example.
+
+ First line:
+ ----------
+ %^CYAN%^Cratylus aka Cratylus the unaccomplished, level 10 male human Explorer%^RESET%^
+
+ Here you see my short name, my name with title, my level, my
+ gender, my race, and my class. Let's go over each.
+
+ * short name: What a person would use to address you. "look at cratylus",
+ for example.
+
+ * name with title: This displays my title. Creators can have whatever title
+ they want. Players can only have the titles they earn. As a player, a
+ title is usually earned when you are promoted a level or complete a
+ quest, though it is not always so on every mud.
+
+ * level: This is a measure of your overall experience, expertise, and
+ all-around game status. Being promoted a level means your skills,
+ health, and vital statistics increase. This often means you can handle
+ tougher monsters, for example, or tackle more challenging quests, learn
+ new spells, and so on.
+
+ * gender: This has no effect on your status. It is a cosmetic feature
+ of your body that is only useful to you in the social context of your
+ fellow mud players.
+
+ * race: In Dead Souls, race has nothing to do with your local genetic
+ makeup on planet Earth. In the mud, "race" refers to what one typically
+ would call "species" in real-life. An example of a race other than human
+ might be "orc" or "feline". Not all races are available for players. Once
+ you have chosen a race to play, it is in theory possible to change it, but
+ there is a nonzero chance you'll hose up your player file and lose your
+ character forever. Besides, it's up to your local admins whether race
+ changing is permitted on your mud. Different races have different
+ abilities. Elves see better in darkness, for example. Orcs are stronger
+ than some other humanoids, but dumber, too (which does affect gameplay).
+
+ * class: This can be considered an occupational specialty. In the real
+ world you have plumbers, doctors, soldiers, etc. In the mud world,
+ we can have explorers, fighters, mages, and the like. Each class brings
+ its own unique advantages and disadvantages to your gameplay. A fighter
+ can really kick more butt in melee combat than a mage, but a mage
+ gets to cast powerful spells. Explorers are a middle of the road class
+ that gives you a bit of everything without specializing in anything.
+
+
+
+ Next line:
+ ----------
+
+ %^CYAN%^Alive / Awake%^RESET%^
+
+ It is indeed possible for your virtual body to cease life functions.
+ When this happens your spirit speeds off to the land of the dead,
+ where you drift until you decide to "regenerate" and regain your
+ physical form. Except for some special magical items, anything you
+ were carrying when you died is with that dead body, so it's a good
+ idea to rush your new body back to the scene of the fatality and get
+ your stuff back before someone else grabs it. Death is not only
+ inconvenient, it also incurs major penalties on your statistics, so it
+ should be avoided.
+ It is also possible to sleep. If you are drunk and asleep, your
+ injuries will heal more quickly. It's magic, don't worry about the
+ logic behind it.
+ If you are attacked while sleeping, you will wake up. You can
+ force yourself awake, too, but it's a bit tedious.
+
+
+ Next line:
+ ---------
+
+ %^CYAN%^Health: 350/350 Magic: 560/560 Stamina: 400/400 Carry: 1184/1300%^RESET%^
+
+ In each case, the number on the left of the slash indicates the
+ current level, and the number on the right indicates what the maximum is.
+
+ health: When I am 100% healthy, I have a total of 350 hp. If my hp ever
+ reach 0 or less (!), I die. Poison and illness can cause hp's to
+ gradually decrease, and although with time my hp's will normally
+ return to 350 as I heal, poison and illness can slow down that healing
+ or even cause me to die. Injury in combat is the most common source
+ of hp loss, though spells, falls, and other adverse events can cause
+ you injury or death.
+
+ magic: I cast magic missile! Spell casting takes a toll on your magical
+ abilities, and mp measure how much magic you've got left in you at
+ any given point. Like hp, mp gradually grow back to your max if you
+ avoid spellcasting for a while.
+
+ stamina: Fighting is tough work, and swinging around swords while
+ getting bashed with hammers really takes a lot out of a guy. Therefore
+ keep an eye on this stat while you're fighting, because if it gets too
+ low you will collapse and be unable to do anything for a while.
+
+ carry: Objects have mass, and your body is of limited size and strength.
+ My carry capacity is 0 when I carry nothing, and 1300 when I can
+ carry no more. Creators are allowed to exceed their bodies' carry
+ capacity, but players cannot.
+
+
+ Next line:
+ ---------
+
+ %^CYAN%^Food: 0 Drink: 0 Alcohol: 0 Caffeine: 0 Poison: 0 %^RESET%^
+
+ These are pretty self-explanatory. Alcohol is good for healing,
+ bad for fighting. Food and drink also help speed healing. Poison
+ has the opposite effect. Caffeine can speed up your combat slightly,
+ but tends to prevent full rest.
+ You will not die from lack of food or lack of drink, but you
+ will do better with a body not starved for nutrients.
+ Your maximum load for any of these is not fixed, and varies
+ depending on many factors, such as level, endurance, etc.
+
+
+ Next line:
+ ---------
+
+ %^CYAN%^Training Points: 0 Quest Points: 0 Experience Points: 50 %^RESET%^
+
+ Training points can be cashed in with special NPC's called
+ trainers, who can help you improve some skills. A trainer that
+ specializes in fighting might be able to raise your "blade attack"
+ skill, for example. you earn training points when you are
+ promoted a level.
+
+ Quest points are awarded when you complete a quest. In
+ the default version of Dead Souls, you cannot advance past a
+ certain player level unless you earn some qp's. Read the sign
+ in the adventurers guild for more details on this.
+
+ Experience points can be awarded for various reasons: completing
+ a quest, solving a puzzle, winning a contest. Most often you
+ will receive xp after killing an NPC. The amount of xp awarded
+ will depend on the level of the NPC. Like qp, xp are needed to
+ qualify for level advancement.
+
+
+
+ Limb section:
+ ------------
+
+ Remember how wearing armor requires the right body parts?
+ Well here they are, and this is their health. You can issue the
+ "body" command for a quicker self-check.
+ Let's look at what the numbers mean with an example:
+
+ %^CYAN%^left leg (2) 160/160%^RESET%^
+
+ Obviously the first item identifies the limb in question.
+
+ The (2) is a kind of "importance score", indicating how critical
+ a body part is. If this number is (1), like the head, it means that
+ losing that limb causes immediate death.
+
+ The number on the right side of the slash indicates the hit point
+ damage you may receive on that limb before it is severed. The number
+ on the left is how many of those hits you have left.
+ It doesn't mean my leg has 160 of my hitpoints. If that were true,
+ my hit points would add up to a heck of a lot more than 350.
+ This means that if I've lost, say, 200hp fighting a troll, and
+ 159hp of those hits were on my left leg, getting hit there again means I
+ lose my left leg.
+ I would then collapse and have to crawl away to seek medical attention.
+ Wearing armor on your limbs is a great way to minimize the danger of
+ this happening.
+
+
+ Skills section:
+ --------------
+
+ Let's review skills by examining one of mine:
+
+ %^CYAN%^blade attack (1) 00% - 20/24%^RESET%^
+
+ This measures how likely I am to hit an opponent when I
+ use a blade, and how good a hit it was. The number (1) means
+ that this is a skill critical to my class. If an explorer can't
+ swing a sword, he oughta think about another line
+ of work.
+ The 00% means I have thus far earned no blade attack
+ experience toward achieving the next level of this skill.
+ The 20 is my current proficiency level.
+ The 24 is the maximum level I can reach at my current
+ player level and with my current stats.
+
+ What's all this mean? Well, if I practice a lot of blade
+ attacking, that 00% will gradually climb up to 99, and one more
+ point causes me to go from a level 20 slicer of things to a
+ level 21 slicer of things. This increases my likelihood of
+ hitting my target in the future.
+
+ Meaning, in short, practice a skill, and you'll get
+ better at it.
+
+ Of course, if my blade attack level reaches 24, I can advance
+ my blade attack skills no further until my player level rises.
+
+
+ Stats section:
+ -------------
+
+ Remember these from Dungeons & Dragons? No? Well these vital
+ statistics measure your general giftedness in that feature of your
+ body. Let's look at one of mine:
+
+ %^CYAN%^coordination (2) 42/42%^RESET%^
+
+ Coordination is one of those important stats for fighting and
+ such. The more coordinated you are, the more likely you are to hit your
+ target. The (2) indicates that this stat is important to my class,
+ but not critical. This influences its effect on my skills.
+ 42/42 means that my coordination is not currently impaired. If
+ someone cast a "stumble" spell on me, for example, this might look more
+ like 30/42, and if I were drunk, it would look very shabby indeed.
+
+ Last section:
+ ------------
+
+ "Cratylus has amassed a net worth of 11 gold." means that when you
+ add up the money in my bank accounts and the money I'm carrying,
+ converted to gold, I have 11 gold to my name. It looks bad, but gold
+ is actually quite valuable in the default Dead Souls economy.
+
+ "Money on hand: 79 dollars, 34 silver" means that this is the amount of
+ money I'm carrying. Don't forget that the amount of money you are carrying
+ affects your overall carry capacity. Gold is an especially heavy
+ currency.
+
+
+ Final notes:
+ -----------
+
+ "stat" is a great command to get thorough information about
+ yourself. It is, however, quite a screenful. Briefer reports can be
+ viewed with the following commands:
+
+ %^GREEN%^body%^RESET%^
+ %^GREEN%^skills%^RESET%^
+ %^GREEN%^stats%^RESET%^
+ %^GREEN%^score%^RESET%^
+ %^GREEN%^status%^RESET%^
+
+ chapter 4 "Quests"
+
+ Some muds don't have quests, and the fun people have is
+ through role-playing and social activities with other players.
+
+ Other muds prefer to concentrate on killing lots and lots
+ of monsters, a lot, over and over.
+
+ Quests give you a chance to problems-solve by performing some
+ series of actions that satisfies a pre-determined requirement.
+
+ For example, Dead Souls' sample town contains a quest called
+ Orcslayer. Leo the archwizard lives in the basement of the old
+ abandoned church, and he has lost a powerful magic sword called
+ "Orcslayer". If you return it to him, he will reward you with
+ experience points, quest points, and a new title you can use. To
+ complete the quest, you need to defeat the warrior orcs, penetrate
+ deep into their lair, defeat the orc shaman, and take Orcslayer from
+ his corpse, then go to the church basement and give the sword to Leo.
+
+ In this case, if you're a level 1 newbie, the orcs will massacre you
+ before you get anywhere near the shaman. So either team up with
+ friends to tackle the orcs together, or raise your level to the
+ point where you're tough enough to take them on.
+
+ To raise your level, wander around in the newbie mansion, which
+ is south of the village church.
+
+ There's lots of loot there you can sell at Otik's shop, and with the
+ cash you can then get some proper weaponry and armor.
+
+ Silver is heavy, so don't try to carry all your money around
+ all the time. Request an account from Zoe the banker and keep your
+ money there until you really need it.
+
+ There is a quest in the newbie mansion, and solving it by
+ finding the secret room will give you experience and quest points too.
+ (hint, there might be more than one secret room)
+
+ Once you have enough experience and/or points, go to
+ Dirk in the adventurers hall and "%^GREEN%^ask dirk to advance%^RESET%^".
+
+ Make sure you learn some spells from Herkimer, because if you
+ go up against a bunch of orcs in their lair, you'll want spells to
+ shield you from attacks, and spells to recover your strength after
+ combat. As a non-mage, your spell abilities will be limited at
+ lower levels, but as you gain levels you'll get better. Also, spells
+ will rarely work after you first learn them. Keep casting them,
+ even if you screw them up, so that your magic skills increase.
+
+ Also, save your money. Drinking and sleeping help you heal,
+ but not fast enough. By the time those natural processes finish
+ and you're ready for combat again, the orcs may have gotten reinforcements.
+ So if you can afford it, buy healing slips and use them at Clepius'
+ healer's guild. His treatment is expensive, but you will heal much
+ more quickly.
+
+ In the tragic event of the loss of a limb, Clepius can also magically
+ regenerate a new limb...but obviously at some great cost.
+
+ There. I've just spoiled the Orcslayer quest for you. Normally,
+ all you'd know about a quest is a cryptic clue, like the one in the
+ scroll in the adventurers guild. Instead I've just spoiled the quest
+ for you by telling you all about it. They're more fun when you have to
+ figure them out on your own, like puzzles.
+
+ Normally, spoiling quests like this is a bannable offense on
+ a mud, so if you solve a quest, keep it to yourself unless you know
+ the admins on your mud don't mind.
+ chapter 5 "Communication"
+
+ There are many ways to communicate with other players. If
+ you're in the same room as your intended listener, you can just
+ use the "say" command, like this:
+
+ %^GREEN%^say hi, crat%^RESET%^
+
+ If the message is secret, you can "whisper":
+
+ %^GREEN%^whisper to cratylus are you idle?%^RESET%^
+
+ If you want to say something that everyone in the mud can
+ hear, use the "shout" command (at the cost of a lot of stamina):
+
+ %^GREEN%^shout hey crat, wheredya go?%^RESET%^
+
+ Or, if it's an important secret and the target is not in the
+ same room as you, you can use the magical "tell" command:
+
+ %^GREEN%^tell cratylus are you mad at me or something?%^RESET%^
+
+
+ There are also special communication lines on the mud that are
+ class or role-specific. For example, if you type:
+
+ %^GREEN%^newbie does anyone know what's up with cratylus?%^RESET%^
+
+ All people who are tuned into the newbie line will get
+ your message. To see what lines are available to you, type:
+
+ %^GREEN%^lines%^RESET%^
+
+ To see who is listening to the newbie channel:
+
+ %^GREEN%^list newbie%^RESET%^
+
+ To see who is listening to some other channel on some other mud:
+
+ %^GREEN%^list otherchannel@othermud%^RESET%^
+
+
+ To enable or disable a line, just type the name of it with no message.
+
+ To see a brief history of the past few messages on a line (in
+ this case, the newbie line), type:
+
+ %^GREEN%^hist newbie%^RESET%^
+
+
+ Spamming lines is rude and probably dangerous to your character, so
+ be sure you comply with your mud's rules on lines.
+
+
+ Your mud may be on the intermud network. To find out, type the
+ command:
+
+ %^GREEN%^mudlist%^RESET%^
+
+ If a list of muds comes up, you know your mud is probably
+ on the intermud3 communication network. Dead Souls by default restricts
+ players from access to intermud channels, but you can "tell" to
+ players on other muds, if you want. If you think your friend Xyzzy
+ is online on a mud on intermud3, you can issue this command:
+
+ %^GREEN%^locate xyzzy%^RESET%^
+
+ If he's logged into a mud on i3, you will get something like:
+
+ Xyzzy was just located on Frontiers. (idle 00:03:17) [status: inactive]
+
+ You can then tell to him:
+
+ %^GREEN%^tell xyzzy@frontiers dude, what's the deal with crat lately?%^RESET%^
+
+
+ Sometimes a player or NPC does not understand your character's
+ native tongue. For example, if you are en elf, your native tongue is
+ not English, it is Edhellen. If someone talks to you in English, you
+ might see something like this:
+
+ Xyzzy says in English, "leka mifahmam, potong-hwa."
+
+ Since your character doesn't speak English, what you see is gibberish.
+ If you find a language teacher, your proficiency in the language they
+ teach you will allow you to understand more of the words you hear.
+
+ Suppose that your elf character is now 100% fluent in English.
+ If you greet a human player named Xyzzy by typing:
+
+ %^GREEN%^say hello there, xyzzy%^RESET%^
+
+ Xyzzy will probably see something like:
+
+ Noobie says in Edhellen, "pericolo temak, forshtor."
+
+ Instead, if you want to speak to a human, you'll have to type:
+
+ %^GREEN%^speak in english hello there, xyzzy%^RESET%^
+
+
+ To find out what languages you speak, type:
+
+ %^GREEN%^language%^RESET%^
+
+
+ chapter 6 "Note to New Creators"
+
+ You should probably hang on to this book for reference. If
+ you lose it, pick up a copy at the adventurers hall.
+
+ However, you need to start reading the Creators Manual. If
+ you don't have one on you, get the one in the chest in your workroom.
+
+ If you're new to coding, start with chapter 31. It'll
+ get you started with the Quick Creation System, or QCS.
+
+ Cratylus @ Frontiers
+ 04 Jan 2006
+ chapter 7 "Hints and tips"
+
+ * The "wimpy" command helps you avoid death due to inattention or
+ network lag. If you "wimpy 20", you will automatically try to escape
+ combat if your health goes below 20% of your maximum.
+
+ * "target" and "ignore" are extremely useful when fighting more than
+ one enemy. You should always target the toughest npc first, and
+ always ignore any npc who can't get up because their foot or leg
+ is severed.
+ But if they collapse due to exhaustion, it's a good idea to keep
+ beating on them, otherwise they may get back up and get healthy sooner
+ than you expect.
+
+ * By default, different races speak different languages. If someone
+ says something to you and you see no words in the same language as
+ the rest of the mud, it means they are speaking a language you do
+ not understand.
+ For example, if you are an elf, and you ask Radagast to teach
+ magic attack, you might get something like this:
+
+ Radagast exclaims in English, "embleer con boltehe oota goota nehi auch"
+
+ Even though in the real world you may speak English fluently, in
+ the mud world, you do not speak English fluently. As an elf, your
+ native tongue is Edhellen, and you may find human speech incomprehensible.
+
+ If you find a trainer to teach you English, your skills in that
+ language will need time to improve. As you get better at a language,
+ you will see fewer gibberish words.
+
+ If you are a "newbie", this does not apply to you. A newbie in the
+ default Dead Souls distribution is a player at level 4 or below. This
+ definition may be changed by your admin.
+ Newbies need all the help they can get just to survive, so they
+ are magically granted understanding of all languages, until they outgrow
+ their naivete.
+
+ If you are a student of languages in the Real World, you may
+ recognize many of the "gibberish" words used by Dead Souls to represent
+ a foreign tongue. Your understanding of these words is not useful in
+ the context of the game, however, because they are not intended to
+ convey meaning other than "non-comprehensible words".
+
+
+ * Your ability to see is affected by various things:
+
+ - A room's ambient light level
+ - Time of day
+ - Local light sources (flashlights, torches, etc)
+ - Your race's light sensitivity
+ - Magical effects
+ - Exposure to an excessive-light event
+
+ It's important to remember that a room may be too dark for
+ you to see everything in it. You might be able to see the description
+ of a room with no problem, but it may be necessary for you to
+ light a torch in order to see the treasure chest there.
+
+ In the same way that darkness can impair vision, brightness
+ can do the same. For elves, an outdoor area in bright sunlight that
+ contains additional light sources can be just as hostile to
+ vision as a dark cave with no torch would be for a human.
+ Regardless of race, a sufficiently adverse event, such as
+ a bright flash or special spell, can render you temporarily blind.
+
+ As with languages, newbies have some exemption to light-level
+ limitations.
+
+ * Mages can wield knives but are pretty much helpless with any other
+ vind of edged weapon.
diff -c -r --new-file ds2.0r28/lib/doc/help/players/password ds2.1/lib/doc/help/players/password
*** ds2.0r28/lib/doc/help/players/password Wed Dec 31 19:00:00 1969
--- ds2.1/lib/doc/help/players/password Tue Jul 11 18:36:11 2006
***************
*** 0 ****
--- 1,5 ----
+ Users can change their own passwords with the command: passwd
+
+ Admins can change someone else's password with: resetpasswd
+
+
diff -c -r --new-file ds2.0r28/lib/domains/Ylsrim/room/bazaar.c ds2.1/lib/domains/Ylsrim/room/bazaar.c
*** ds2.0r28/lib/domains/Ylsrim/room/bazaar.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/Ylsrim/room/bazaar.c Tue Jul 11 18:36:11 2006
***************
*** 8,13 ****
--- 8,18 ----
inherit LIB_ROOM;
+ int ReadSign() {
+ this_player()->more("/domains/town/txt/warning_sign.txt");
+ return 1;
+ }
+
static void create() {
object ob; // this will be used to create dummy items
***************
*** 31,52 ****
"bargain, or even in some cases, in search of trouble. "
"Kaliid Road crosses Ylsrim from the west to the east just "
"north of you, with an armory and a weapon shop straddling "
! "both sides of the bazaar. The bazaar stretches on south.");
// this is the description people see at night
SetNightLong("Though most areas of Ylsrim are peaceful right now, "
"the central bazaar is still filled with people doing "
"business, even though most of the shops are closed. "
"Kaliid Road is just north of here, and a closed armory "
"and weapons shop sit on both sides of the bazaar. "
! "The bazaar stretches south.");
// set up dummy items... the first few are simple
AddItem(({ "villager", "traveller" }),
"Both villagers and travellers are out looking for good "
"deals.");
AddItem(({ "road" }), "It leads through Ylsrim from the Great Desert "
"in the west towards more fertile land east.", ({ "kaliid" }));
// people need to enter the armory, so we need to do something special
// first create an armory dummy item
ob = new(LIB_DUMMY, ({ "armory", "shop" }),
function(string str) {
if( query_night() ) {
--- 36,61 ----
"bargain, or even in some cases, in search of trouble. "
"Kaliid Road crosses Ylsrim from the west to the east just "
"north of you, with an armory and a weapon shop straddling "
! "both sides of the bazaar. The bazaar stretches on south."
! "\n%^RED%^There is a sign here you can read.%^RESET%^");
// this is the description people see at night
SetNightLong("Though most areas of Ylsrim are peaceful right now, "
"the central bazaar is still filled with people doing "
"business, even though most of the shops are closed. "
"Kaliid Road is just north of here, and a closed armory "
"and weapons shop sit on both sides of the bazaar. "
! "The bazaar stretches south."
! "\n%^RED%^There is a sign here you can read.%^RESET%^");
// set up dummy items... the first few are simple
AddItem(({ "villager", "traveller" }),
"Both villagers and travellers are out looking for good "
"deals.");
+ AddItem(({ "sign"}), "A sign. To read it, 'read sign'.");
AddItem(({ "road" }), "It leads through Ylsrim from the Great Desert "
"in the west towards more fertile land east.", ({ "kaliid" }));
// people need to enter the armory, so we need to do something special
// first create an armory dummy item
+ SetRead("sign", (: ReadSign :) );
ob = new(LIB_DUMMY, ({ "armory", "shop" }),
function(string str) {
if( query_night() ) {
diff -c -r --new-file ds2.0r28/lib/domains/campus/adm/access.c ds2.1/lib/domains/campus/adm/access.c
*** ds2.0r28/lib/domains/campus/adm/access.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/adm/access.c Tue Jul 11 18:36:11 2006
***************
*** 1,5 ****
/* /domains/campus/adm/access.c
! * From the Nightmare V Object Library
* the access object for the campus domain
* created by Descartes of Borg 960302
*/
--- 1,5 ----
/* /domains/campus/adm/access.c
! * From the Dead Souls Object Library
* the access object for the campus domain
* created by Descartes of Borg 960302
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/adm/cache.c ds2.1/lib/domains/campus/adm/cache.c
*** ds2.0r28/lib/domains/campus/adm/cache.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/adm/cache.c Tue Jul 11 18:36:11 2006
***************
*** 1,5 ****
/* /domains/campus/adm/cache.c
! * from the Nightmare V Object Library
* room where hidden objects are stored
* created by Descartes of Borg 960302
*/
--- 1,5 ----
/* /domains/campus/adm/cache.c
! * from the Dead Souls Object Library
* room where hidden objects are stored
* created by Descartes of Borg 960302
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/adm/pod.c ds2.1/lib/domains/campus/adm/pod.c
*** ds2.0r28/lib/domains/campus/adm/pod.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/adm/pod.c Tue Jul 11 18:36:11 2006
***************
*** 1,5 ****
/* /domains/campus/adm/void.c
! * from the Nightmare V Object Library
* place where people go when their environments accidentally are
* destructed
* created by Descartes of Borg 960302
--- 1,5 ----
/* /domains/campus/adm/void.c
! * from the Dead Souls Object Library
* place where people go when their environments accidentally are
* destructed
* created by Descartes of Borg 960302
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/foodsmock.c ds2.1/lib/domains/campus/armor/foodsmock.c
*** ds2.0r28/lib/domains/campus/armor/foodsmock.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/foodsmock.c Sun Jul 9 22:06:36 2006
***************
*** 6,12 ****
static void create(){
armor::create();
SetKeyName("uniform");
! SetAdjectives( ({"food workers"}) );
SetId( ({"overalls", "smock"}) );
SetShort("a food worker's uniform");
SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance.");
--- 6,12 ----
static void create(){
armor::create();
SetKeyName("uniform");
! SetAdjectives( ({"food workers","food worker's"}) );
SetId( ({"overalls", "smock"}) );
SetShort("a food worker's uniform");
SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance.");
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/glove.c ds2.1/lib/domains/campus/armor/glove.c
*** ds2.0r28/lib/domains/campus/armor/glove.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/glove.c Tue Jul 11 18:36:12 2006
***************
*** 1,5 ****
/* /domains/Examples/armor/glove.c
! * from the Nightmare IV LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
--- 1,5 ----
/* /domains/Examples/armor/glove.c
! * from the Dead Souls LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/shield.c ds2.1/lib/domains/campus/armor/shield.c
*** ds2.0r28/lib/domains/campus/armor/shield.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/shield.c Tue Jul 11 18:36:12 2006
***************
*** 1,7 ****
/* /domains/Examples/armor/shield.c
! * from the Nightmare IV LPC Library
* an example shield
! * created by Lassondra@Nightmare
*/
#include
--- 1,7 ----
/* /domains/Examples/armor/shield.c
! * from the Dead Souls LPC Library
* an example shield
! * created by Lassondra@Dead Souls
*/
#include
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/wglove_l.c ds2.1/lib/domains/campus/armor/wglove_l.c
*** ds2.0r28/lib/domains/campus/armor/wglove_l.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/wglove_l.c Tue Jul 11 18:36:12 2006
***************
*** 1,5 ****
/* /domains/Examples/armor/glove.c
! * from the Nightmare IV LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
--- 1,5 ----
/* /domains/Examples/armor/glove.c
! * from the Dead Souls LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/wglove_r.c ds2.1/lib/domains/campus/armor/wglove_r.c
*** ds2.0r28/lib/domains/campus/armor/wglove_r.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/wglove_r.c Tue Jul 11 18:36:12 2006
***************
*** 1,5 ****
/* /domains/Examples/armor/glove.c
! * from the Nightmare IV LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
--- 1,5 ----
/* /domains/Examples/armor/glove.c
! * from the Dead Souls LPC Library
* an example glove
* created by Descartes of Borg 950408
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/wizard_hat.c ds2.1/lib/domains/campus/armor/wizard_hat.c
*** ds2.0r28/lib/domains/campus/armor/wizard_hat.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/armor/wizard_hat.c Sun Jul 9 22:06:36 2006
***************
*** 2,21 ****
#include
#include
inherit LIB_ARMOR;
static void create(){
armor::create();
! SetKeyName("wizard hat");
! SetId(({"hat","headgear"}));
! SetAdjectives(({"wizard","wizard's"}));
SetShort("a wizard's hat");
SetLong("This is a large, floppy hat with a wide brim all "+
"around it, and a conical center. It is dark blue in color, "+
"and is decorated with pictures of yellow moons and stars.");
SetMass(50);
! SetDollarCost(500);
SetDamagePoints(100);
SetArmorType(A_HELMET);
SetProtection(BLUNT, 20);
SetProtection(BLADE, 20);
SetProtection(KNIFE, 20);
}
--- 2,28 ----
#include
#include
inherit LIB_ARMOR;
+
static void create(){
armor::create();
! SetKeyName("wizard's hat");
! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) );
! SetId( ({"hat"}) );
SetShort("a wizard's hat");
SetLong("This is a large, floppy hat with a wide brim all "+
"around it, and a conical center. It is dark blue in color, "+
"and is decorated with pictures of yellow moons and stars.");
+ SetProperties(([
+ "beta" : 2,
+ ]));
SetMass(50);
! SetBaseCost("silver",500);
SetDamagePoints(100);
SetArmorType(A_HELMET);
SetProtection(BLUNT, 20);
SetProtection(BLADE, 20);
SetProtection(KNIFE, 20);
}
+ void init(){
+ ::init();
+ }
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/blue_door.c ds2.1/lib/domains/campus/doors/blue_door.c
*** ds2.0r28/lib/domains/campus/doors/blue_door.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/blue_door.c Tue Jul 11 18:36:12 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/blue_door2.c ds2.1/lib/domains/campus/doors/blue_door2.c
*** ds2.0r28/lib/domains/campus/doors/blue_door2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/blue_door2.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/blue_door3.c ds2.1/lib/domains/campus/doors/blue_door3.c
*** ds2.0r28/lib/domains/campus/doors/blue_door3.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/blue_door3.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/grate.c ds2.1/lib/domains/campus/doors/grate.c
*** ds2.0r28/lib/domains/campus/doors/grate.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/grate.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/green_door.c ds2.1/lib/domains/campus/doors/green_door.c
*** ds2.0r28/lib/domains/campus/doors/green_door.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/green_door.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/green_door2.c ds2.1/lib/domains/campus/doors/green_door2.c
*** ds2.0r28/lib/domains/campus/doors/green_door2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/green_door2.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/green_door3.c ds2.1/lib/domains/campus/doors/green_door3.c
*** ds2.0r28/lib/domains/campus/doors/green_door3.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/green_door3.c Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/plain_door.test ds2.1/lib/domains/campus/doors/plain_door.test
*** ds2.0r28/lib/domains/campus/doors/plain_door.test Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/plain_door.test Tue Jul 11 18:36:13 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/red_door.c ds2.1/lib/domains/campus/doors/red_door.c
*** ds2.0r28/lib/domains/campus/doors/red_door.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/red_door.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/red_door2.c ds2.1/lib/domains/campus/doors/red_door2.c
*** ds2.0r28/lib/domains/campus/doors/red_door2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/red_door2.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/red_door3.c ds2.1/lib/domains/campus/doors/red_door3.c
*** ds2.0r28/lib/domains/campus/doors/red_door3.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/red_door3.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/steel_door.c ds2.1/lib/domains/campus/doors/steel_door.c
*** ds2.0r28/lib/domains/campus/doors/steel_door.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/steel_door.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/steel_door2.c ds2.1/lib/domains/campus/doors/steel_door2.c
*** ds2.0r28/lib/domains/campus/doors/steel_door2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/steel_door2.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/top_stairs.c ds2.1/lib/domains/campus/doors/top_stairs.c
*** ds2.0r28/lib/domains/campus/doors/top_stairs.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/top_stairs.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/doors/u_door.c ds2.1/lib/domains/campus/doors/u_door.c
*** ds2.0r28/lib/domains/campus/doors/u_door.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/doors/u_door.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/door.c
! * from the Nightmare IV LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
--- 1,5 ----
/* /domains/Examples/etc/door.c
! * from the Dead Souls LPC Library
* an example door object connecting doorroom1.c and doorroom2.c
* created by Descartes of Borg 950411
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/ale.c ds2.1/lib/domains/campus/meals/ale.c
*** ds2.0r28/lib/domains/campus/meals/ale.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/ale.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/ale.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/etc/ale.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/bourbon.c ds2.1/lib/domains/campus/meals/bourbon.c
*** ds2.0r28/lib/domains/campus/meals/bourbon.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/bourbon.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/ale.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/etc/ale.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/gator.c ds2.1/lib/domains/campus/meals/gator.c
*** ds2.0r28/lib/domains/campus/meals/gator.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/gator.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/ale.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/etc/ale.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/ham_sand.c ds2.1/lib/domains/campus/meals/ham_sand.c
*** ds2.0r28/lib/domains/campus/meals/ham_sand.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/ham_sand.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/ale.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/etc/ale.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/milk.c ds2.1/lib/domains/campus/meals/milk.c
*** ds2.0r28/lib/domains/campus/meals/milk.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/milk.c Wed Jul 12 20:17:44 2006
***************
*** 3,15 ****
inherit LIB_MEAL;
static void create() {
meal::create();
SetKeyName("milk");
SetId("milk");
SetAdjectives(({"milk1","milk2"}));
SetShort("a carton of milk");
- SetLong("This is a little carton of grade-A milk.");
SetMass(10);
SetBaseCost("silver", 1);
SetMealType(MEAL_DRINK);
--- 3,31 ----
inherit LIB_MEAL;
+ int SetDesc(){
+ string picture;
+ int which = random(6);
+ switch(which){
+ case 0 : picture = "Ashon";break;
+ case 1 : picture = "Brodbane";break;
+ case 2 : picture = "Jonez";break;
+ case 3 : picture = "Namir";break;
+ case 4 : picture = "Javelin";break;
+ case 5 : picture = "Abby";break;
+ }
+ SetLong("This is a little carton of grade-A milk. The rear has a "+
+ "picture of "+picture+", and reads \"Have you seen me?\"");
+ return 1;
+ }
+
static void create() {
meal::create();
+ SetDesc();
SetKeyName("milk");
SetId("milk");
SetAdjectives(({"milk1","milk2"}));
SetShort("a carton of milk");
SetMass(10);
SetBaseCost("silver", 1);
SetMealType(MEAL_DRINK);
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/red_wine.c ds2.1/lib/domains/campus/meals/red_wine.c
*** ds2.0r28/lib/domains/campus/meals/red_wine.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/red_wine.c Wed Dec 31 19:00:00 1969
***************
*** 1,22 ****
- #include
- #include
-
- inherit LIB_MEAL;
-
- static void create() {
- meal::create();
- SetKeyName("red wine");
- SetId( ({"wine"}) );
- SetShort("a bottle of milk");
- SetLong("A fairly small bottle of milk from some unknown creature. It has "
- "a greyish tint to it. It would take several of these bottles to quench "
- "that deep down bodily thirst.");
- SetMass(3);
- SetMealType(MEAL_DRINK);
- SetStrength(10);
- SetMealMessages("You gulp down the bottle of milk.", "$N gulps down a small "
- "bottle of milk.");
- SetEmptyName("bottle");
- SetEmptyShort("an empty bottle");
- SetEmptyLong("A small bottle which used to contain a portion of milk.");
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/wimp_ale.c ds2.1/lib/domains/campus/meals/wimp_ale.c
*** ds2.0r28/lib/domains/campus/meals/wimp_ale.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/wimp_ale.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/ale.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/etc/ale.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/wing.c ds2.1/lib/domains/campus/meals/wing.c
*** ds2.0r28/lib/domains/campus/meals/wing.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/meals/wing.c Wed Dec 31 19:00:00 1969
***************
*** 1,29 ****
- /* /domains/Praxis/etc/ale.c
- * from Nightmare LPMud
- * created by Descartes of Borg 950603
- */
-
- #include
- #include
-
- inherit LIB_MEAL;
-
- static void create() {
- meal::create();
- SetKeyName("ale");
- SetId( ({ "bottle", "ale", "praxis ale" }) );
- SetShort("a bottle of ale");
- SetLong("A nice bottle of Lars' famous Praxis Ale.");
- SetMass(60);
- SetMealType(MEAL_FOOD);
- SetMealMessages("You eat a chicken wing. Mmm!",
- "$N enjoys a chicken wing. It looks delicious.");
- }
- void eventEat(){
- this_object()->goopy();
- return;
- }
- int goopy(){
- tell_room(environment(this_player()),"Gppy!\n");
- return 1;
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/npc/yulia.c ds2.1/lib/domains/campus/npc/yulia.c
*** ds2.0r28/lib/domains/campus/npc/yulia.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/npc/yulia.c Tue Jul 11 18:36:14 2006
***************
*** 1,5 ****
/* /domains/Praxis/npc/otik.c
! * from Nightmare LPMud
* created by Descartes of Borg 950603
*/
--- 1,5 ----
/* /domains/Praxis/npc/otik.c
! * from Dead Souls
* created by Descartes of Borg 950603
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/357case.c ds2.1/lib/domains/campus/obj/357case.c
*** ds2.0r28/lib/domains/campus/obj/357case.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/357case.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/abox.c ds2.1/lib/domains/campus/obj/abox.c
*** ds2.0r28/lib/domains/campus/obj/abox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/abox.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/bag.c ds2.1/lib/domains/campus/obj/bag.c
*** ds2.0r28/lib/domains/campus/obj/bag.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/bag.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/bench.c ds2.1/lib/domains/campus/obj/bench.c
*** ds2.0r28/lib/domains/campus/obj/bench.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/bench.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/campus/etc/stool.c
! * From the Nightmare V Object Library
* An example of a chair object
* Created by Descartes of Borg 961221
*/
--- 1,5 ----
/* /domains/campus/etc/stool.c
! * From the Dead Souls Object Library
* An example of a chair object
* Created by Descartes of Borg 961221
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/bluebox.c ds2.1/lib/domains/campus/obj/bluebox.c
*** ds2.0r28/lib/domains/campus/obj/bluebox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/bluebox.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/box.c ds2.1/lib/domains/campus/obj/box.c
*** ds2.0r28/lib/domains/campus/obj/box.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/box.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/greenbox.c ds2.1/lib/domains/campus/obj/greenbox.c
*** ds2.0r28/lib/domains/campus/obj/greenbox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/greenbox.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/key.c ds2.1/lib/domains/campus/obj/key.c
*** ds2.0r28/lib/domains/campus/obj/key.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/key.c Tue Jul 11 18:36:15 2006
***************
*** 1,5 ****
/* /domains/Midian/etc/key.c
! * from the Nightmare Object Library
* created by Descartes of Borg 960512
*/
--- 1,5 ----
/* /domains/Midian/etc/key.c
! * from the Dead Souls Object Library
* created by Descartes of Borg 960512
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/key1.c ds2.1/lib/domains/campus/obj/key1.c
*** ds2.0r28/lib/domains/campus/obj/key1.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/key1.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/Midian/etc/key.c
! * from the Nightmare Object Library
* created by Descartes of Borg 960512
*/
--- 1,5 ----
/* /domains/Midian/etc/key.c
! * from the Dead Souls Object Library
* created by Descartes of Borg 960512
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/locker.c ds2.1/lib/domains/campus/obj/locker.c
*** ds2.0r28/lib/domains/campus/obj/locker.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/locker.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/magbox.c ds2.1/lib/domains/campus/obj/magbox.c
*** ds2.0r28/lib/domains/campus/obj/magbox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/magbox.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/match.c ds2.1/lib/domains/campus/obj/match.c
*** ds2.0r28/lib/domains/campus/obj/match.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/match.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/torch.c
! * from Nightmare LPMud
* created by Descartes of Borg 951023
*/
--- 1,5 ----
/* /domains/Praxis/etc/torch.c
! * from Dead Souls
* created by Descartes of Borg 951023
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/medbag.c ds2.1/lib/domains/campus/obj/medbag.c
*** ds2.0r28/lib/domains/campus/obj/medbag.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/medbag.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/ped_button.c ds2.1/lib/domains/campus/obj/ped_button.c
*** ds2.0r28/lib/domains/campus/obj/ped_button.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/ped_button.c Tue Jul 11 18:36:16 2006
***************
*** 1,5 ****
/* /domains/campus/etc/chuch_button.c
! * From the Nightmare V Object Library
* An example dummy item that allows pressing
* Created by Descartes of Borg 961222
*/
--- 1,5 ----
/* /domains/campus/etc/chuch_button.c
! * From the Dead Souls Object Library
* An example dummy item that allows pressing
* Created by Descartes of Borg 961222
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/pedestal.c ds2.1/lib/domains/campus/obj/pedestal.c
*** ds2.0r28/lib/domains/campus/obj/pedestal.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/pedestal.c Tue Jul 11 18:36:17 2006
***************
*** 37,52 ****
objects+=({ find_object("/domains/campus/room/green_room2") });
objects+=({ find_object("/domains/campus/room/blue_room2") });
- //foreach(object thing in objects){
- // if(thing) {
- // contents = deep_inventory(thing);
- // foreach(object dummy in contents){
- //if(dummy) dummy->eventDestruct();
- // }
- //thing->eventDestruct();
- //}
- //}
-
objects = ({ find_object("/domains/campus/doors/red_door") });
objects +=({ find_object("/domains/campus/doors/green_door") });
objects +=({ find_object("/domains/campus/doors/blue_door") });
--- 37,42 ----
***************
*** 68,74 ****
int PushTheButton(){
int genrand;
gagnant = "";
- //genrand = unguarded( (: to_int(read_file("/etc/random")) :) );
genrand = random(256);
send_messages("press", "$agent_name $agent_verb the button.",
this_player(), 0, environment(this_player()));
--- 58,63 ----
***************
*** 85,91 ****
if(genrand == 0) gagnant = "red door";
if(genrand == 1) gagnant = "green door";
if(genrand == 2) gagnant = "blue door";
- //tell_object(this_player(),"gagnant: "+gagnant);
tell_room(environment(),"A voice from the pedestal says: "
"PRECOG: gagnant is: "+gagnant+".\n"
"PRECOG: genrand modulus is: "+genrand);
--- 74,79 ----
***************
*** 124,130 ****
tell_room(environment(),"A voice from the pedestal says: "
"You choose the "+str+".");
this_object()->MontyMagic(str);
- //return 1;
}
else {
tell_room(environment(),"A voice from the pedestal says: "
--- 112,117 ----
***************
*** 142,148 ****
if(str != "red door") choices += ({ "red door" });
if(str != "green door") choices += ({ "green door" });
if(str != "blue door") choices += ({ "blue door" });
- //genrand=to_int(read_file("/etc/random"));
genrand = random(256);
if( choices[1] == gagnant) which = 0;
else if( choices[0] == gagnant) which = 1;
--- 129,134 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/pedestal2.c ds2.1/lib/domains/campus/obj/pedestal2.c
*** ds2.0r28/lib/domains/campus/obj/pedestal2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/pedestal2.c Tue Jul 11 18:36:17 2006
***************
*** 35,50 ****
objects+=({ find_object("/domains/campus/room/green_room2") });
objects+=({ find_object("/domains/campus/room/blue_room2") });
- //foreach(object thing in objects){
- // if(thing) {
- // contents = deep_inventory(thing);
- // foreach(object dummy in contents){
- //if(dummy) dummy->eventDestruct();
- // }
- //thing->eventDestruct();
- //}
- //}
-
objects = ({ find_object("/domains/campus/doors/red_door2") });
objects +=({ find_object("/domains/campus/doors/green_door2") });
objects +=({ find_object("/domains/campus/doors/blue_door2") });
--- 35,40 ----
***************
*** 63,69 ****
int PushTheButton(){
int genrand;
gagnant = "";
- //genrand = unguarded( (: to_int(read_file("/etc/random")) :) );
genrand = random(256);
send_messages("press", "$agent_name $agent_verb the button.",
this_player(), 0, environment(this_player()));
--- 53,58 ----
***************
*** 80,86 ****
if(genrand == 0) gagnant = "red door";
if(genrand == 1) gagnant = "green door";
if(genrand == 2) gagnant = "blue door";
- //tell_object(this_player(),"gagnant: "+gagnant);
tell_room(environment(),"A voice from the pedestal says: "
"PRECOG: gagnant is: "+gagnant+".\n"
"PRECOG: genrand modulus is: "+genrand);
--- 69,74 ----
***************
*** 118,124 ****
tell_room(environment(),"A voice from the pedestal says: "
"You choose the "+str+".");
this_object()->MontyMagic(str);
- //return 1;
}
else {
tell_room(environment(),"A voice from the pedestal says: "
--- 106,111 ----
***************
*** 135,141 ****
if(str != "red door") choices += ({ "red door" });
if(str != "green door") choices += ({ "green door" });
if(str != "blue door") choices += ({ "blue door" });
- //genrand=to_int(read_file("/etc/random"));
genrand = random(256);
if( choices[1] == gagnant) which = 0;
else if( choices[0] == gagnant) which = 1;
--- 122,127 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/pedestal3.c ds2.1/lib/domains/campus/obj/pedestal3.c
*** ds2.0r28/lib/domains/campus/obj/pedestal3.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/pedestal3.c Tue Jul 11 18:36:17 2006
***************
*** 37,52 ****
objects+=({ find_object("/domains/campus/room/green_room2") });
objects+=({ find_object("/domains/campus/room/blue_room2") });
- //foreach(object thing in objects){
- // if(thing) {
- // contents = deep_inventory(thing);
- // foreach(object dummy in contents){
- //if(dummy) dummy->eventDestruct();
- // }
- //thing->eventDestruct();
- //}
- //}
-
objects = ({ find_object("/domains/campus/doors/red_door3") });
objects +=({ find_object("/domains/campus/doors/green_door3") });
objects +=({ find_object("/domains/campus/doors/blue_door3") });
--- 37,42 ----
***************
*** 68,74 ****
int PushTheButton(){
int genrand;
gagnant = "";
- //genrand = unguarded( (: to_int(read_file("/etc/random")) :) );
genrand = random(256);
send_messages("press", "$agent_name $agent_verb the button.",
this_player(), 0, environment(this_player()));
--- 58,63 ----
***************
*** 79,94 ****
"try again.");
return 1;
}
- //tell_room(environment(),"A voice from the pedestal says: "
- //"PRECOG: genrand is: "+genrand);
genrand = genrand % 3;
if(genrand == 0) gagnant = "red door";
if(genrand == 1) gagnant = "green door";
if(genrand == 2) gagnant = "blue door";
- //tell_object(this_player(),"gagnant: "+gagnant);
- //tell_room(environment(),"A voice from the pedestal says: "
- // "PRECOG: gagnant is: "+gagnant+".\n"
- // "PRECOG: genrand modulus is: "+genrand);
remove_action("doStay","stay");
remove_action("doSwitch","switch");
add_action("choose","choose");
--- 68,77 ----
***************
*** 124,130 ****
tell_room(environment(),"A voice from the pedestal says: "
"You choose the "+str+".");
this_object()->MontyMagic(str);
- //return 1;
}
else {
tell_room(environment(),"A voice from the pedestal says: "
--- 107,112 ----
***************
*** 142,148 ****
if(str != "red door") choices += ({ "red door" });
if(str != "green door") choices += ({ "green door" });
if(str != "blue door") choices += ({ "blue door" });
- //genrand=to_int(read_file("/etc/random"));
genrand = random(256);
if( choices[1] == gagnant) which = 0;
else if( choices[0] == gagnant) which = 1;
--- 124,129 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/podium.c ds2.1/lib/domains/campus/obj/podium.c
*** ds2.0r28/lib/domains/campus/obj/podium.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/podium.c Wed Jul 12 01:56:11 2006
***************
*** 91,96 ****
--- 91,97 ----
int eventSay(string args) {
string foo;
+ args = replace_string(args,"\n","");
if (mc == this_player()->GetKeyName()) {
this_player()->eventPrint("You say %^CYAN%^\"" + capitalize(args) + "\"");
say(this_player()->GetName() + " says %^CYAN%^\"" + capitalize(args) + "\"");
***************
*** 105,114 ****
write ("You mutter to yourself.\n") ;
return 1 ;
}
! foo = wrap((string)this_player()->GetCapName() +
! " says: %^CYAN%^\"" + capitalize(args)) ;
say (foo) ;
! write(wrap("You say: %^CYAN%^\"" + capitalize(args)));
return 1;
}
--- 106,115 ----
write ("You mutter to yourself.\n") ;
return 1 ;
}
! foo = (string)this_player()->GetCapName() +
! " says: %^CYAN%^\"" + capitalize(args)+"\"";
say (foo) ;
! write("You say: %^CYAN%^\"" + capitalize(args)+"\"");
return 1;
}
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/redbox.c ds2.1/lib/domains/campus/obj/redbox.c
*** ds2.0r28/lib/domains/campus/obj/redbox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/redbox.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/sofa.c ds2.1/lib/domains/campus/obj/sofa.c
*** ds2.0r28/lib/domains/campus/obj/sofa.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/sofa.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/campus/etc/stool.c
! * From the Nightmare V Object Library
* An example of a chair object
* Created by Descartes of Borg 961221
*/
--- 1,5 ----
/* /domains/campus/etc/stool.c
! * From the Dead Souls Object Library
* An example of a chair object
* Created by Descartes of Borg 961221
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/squirtbag.c ds2.1/lib/domains/campus/obj/squirtbag.c
*** ds2.0r28/lib/domains/campus/obj/squirtbag.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/squirtbag.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/tlocker.c ds2.1/lib/domains/campus/obj/tlocker.c
*** ds2.0r28/lib/domains/campus/obj/tlocker.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/tlocker.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/torch.c ds2.1/lib/domains/campus/obj/torch.c
*** ds2.0r28/lib/domains/campus/obj/torch.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/torch.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Praxis/etc/torch.c
! * from Nightmare LPMud
* created by Descartes of Borg 951023
*/
--- 1,5 ----
/* /domains/Praxis/etc/torch.c
! * from Dead Souls
* created by Descartes of Borg 951023
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/wlocker.c ds2.1/lib/domains/campus/obj/wlocker.c
*** ds2.0r28/lib/domains/campus/obj/wlocker.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/wlocker.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/wrack.c ds2.1/lib/domains/campus/obj/wrack.c
*** ds2.0r28/lib/domains/campus/obj/wrack.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/wrack.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/obj/yellowbox.c ds2.1/lib/domains/campus/obj/yellowbox.c
*** ds2.0r28/lib/domains/campus/obj/yellowbox.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/obj/yellowbox.c Tue Jul 11 18:36:17 2006
***************
*** 1,5 ****
/* /domains/Examples/etc/bag.c
! * from the Nightmare IV LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
--- 1,5 ----
/* /domains/Examples/etc/bag.c
! * from the Dead Souls LPC Library
* a sample bag object
* created by Descartes of Borg 950529
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/room/conf2.c ds2.1/lib/domains/campus/room/conf2.c
*** ds2.0r28/lib/domains/campus/room/conf2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/room/conf2.c Tue Jul 11 18:36:17 2006
***************
*** 42,49 ****
void init(){
::init();
- // add_action("privacy","privacy");
- // add_action("privacy","priv");
add_action("report_time","timer");
}
--- 42,47 ----
***************
*** 53,60 ****
int report_time(){
int secs = time() - timer;
- //tc("time: "+time());
- //tc("timer: "+timer);
if(!timer){
write("Privacy field is not active.");
--- 51,56 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/room/tunnel3.c ds2.1/lib/domains/campus/room/tunnel3.c
*** ds2.0r28/lib/domains/campus/room/tunnel3.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/room/tunnel3.c Tue Jul 11 18:36:18 2006
***************
*** 27,36 ****
"east":"/domains/campus/room/u_lab"]));
SetDoor("east","/domains/campus/doors/u_door");
SetObviousExits("e,w");
- // SetInventory(([
- // "/domains/campus/npc/mp" : 1,
- // ]));
- // SetProperty("no attack", 1);
}
void init(){
AddListen(({"pipe","pipes","wall","cables","cable"}) , "The pipes and "+
--- 27,32 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/room/u_lab.c ds2.1/lib/domains/campus/room/u_lab.c
*** ds2.0r28/lib/domains/campus/room/u_lab.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/room/u_lab.c Tue Jul 11 18:36:18 2006
***************
*** 39,50 ****
"sign" : "A crude, hand-drawn sign in red ink next to the portal." ]));
SetInventory(([
]));
- // SetRead((["sign":"The sign reads: Enter at your own risk! This portal leads to some "+
- // "places of questionable safety and unstable reality...you are warned!",
- // "notes" : "They are incomprehensible to you.",
- // ({"board","chalkboard"}) : "It is full of cryptic equations. Buried in the middle of one "+
- // "is 'Step 3: a miracle happens'.",
- // ]));
SetRead("sign","The sign reads: Enter at your own risk! This portal leads to some "+
"places of questionable safety and unstable reality...you are warned!");
--- 39,44 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/room/void.c ds2.1/lib/domains/campus/room/void.c
*** ds2.0r28/lib/domains/campus/room/void.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/room/void.c Tue Jul 11 18:36:18 2006
***************
*** 1,5 ****
/* /domains/campus/adm/void.c
! * from the Nightmare V Object Library
* place where people go when their environments accidentally are
* destructed
* created by Descartes of Borg 960302
--- 1,5 ----
/* /domains/campus/adm/void.c
! * from the Dead Souls Object Library
* place where people go when their environments accidentally are
* destructed
* created by Descartes of Borg 960302
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/board.c ds2.1/lib/domains/campus/weap/board.c
*** ds2.0r28/lib/domains/campus/weap/board.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/board.c Tue Jul 11 18:36:18 2006
***************
*** 1,5 ****
/* /domains/Examples/weapon/sword.c
! * from the Nightmare IV LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
--- 1,5 ----
/* /domains/Examples/weapon/sword.c
! * from the Dead Souls LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/dagger.c ds2.1/lib/domains/campus/weap/dagger.c
*** ds2.0r28/lib/domains/campus/weap/dagger.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/dagger.c Tue Jul 11 18:36:18 2006
***************
*** 1,5 ****
/* /domains/Examples/weapon/dagger.c
! * from the Nightmare IV LPC Library
* a simple dagger example, nothing fancy
* created by Descartes of Borg 950402
*/
--- 1,5 ----
/* /domains/Examples/weapon/dagger.c
! * from the Dead Souls LPC Library
* a simple dagger example, nothing fancy
* created by Descartes of Borg 950402
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/grenade.c ds2.1/lib/domains/campus/weap/grenade.c
*** ds2.0r28/lib/domains/campus/weap/grenade.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/grenade.c Tue Jul 11 18:36:19 2006
***************
*** 89,98 ****
possessive(ob)+" hand grenade!\n",ob);
detonated=2;
foreach(string limb in stuffs){
- //tc("limb: "+limb);
if(limb != "head" && limb != "torso" && limb != "neck") ob->RemoveLimb(limb,this_object());
}
- //ob->RemoveLimb("head",this_object());
ob = environment(ob);
}
if(detonated !=2) tell_room(environment(this_object()), "\nKABOOM! The grenade detonates!\n");
--- 89,96 ----
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/sharpsword.c ds2.1/lib/domains/campus/weap/sharpsword.c
*** ds2.0r28/lib/domains/campus/weap/sharpsword.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/sharpsword.c Tue Jul 11 18:36:19 2006
***************
*** 1,5 ****
/* /domains/Examples/weapon/sword.c
! * from the Nightmare IV LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
--- 1,5 ----
/* /domains/Examples/weapon/sword.c
! * from the Dead Souls LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/sword.c ds2.1/lib/domains/campus/weap/sword.c
*** ds2.0r28/lib/domains/campus/weap/sword.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/sword.c Tue Jul 11 18:36:19 2006
***************
*** 1,5 ****
/* /domains/Examples/weapon/sword.c
! * from the Nightmare IV LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
--- 1,5 ----
/* /domains/Examples/weapon/sword.c
! * from the Dead Souls LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
diff -c -r --new-file ds2.0r28/lib/domains/campus/weap/waterpistol.c ds2.1/lib/domains/campus/weap/waterpistol.c
*** ds2.0r28/lib/domains/campus/weap/waterpistol.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/campus/weap/waterpistol.c Tue Jul 11 18:36:19 2006
***************
*** 1,5 ****
/* /domains/Examples/weapon/sword.c
! * from the Nightmare IV LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
--- 1,5 ----
/* /domains/Examples/weapon/sword.c
! * from the Dead Souls LPC Library
* a simple sword example, nothing fancy
* created by Descartes of Borg 950402
*/
diff -c -r --new-file ds2.0r28/lib/domains/default/armor/badge.c ds2.1/lib/domains/default/armor/badge.c
*** ds2.0r28/lib/domains/default/armor/badge.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/armor/badge.c Sun Jul 9 22:06:36 2006
***************
*** 7,13 ****
static void create(){
armor::create();
SetKeyName("visitor pass");
! SetId(({"testchar badge","badge","pass","visitor pass"}));
SetShort("a test character Visitor's Pass");
SetLong("This clip-on plastic badge grants the wearer access to "+
"some areas typically restricted to creator staff only. Abuse of this "+
--- 7,13 ----
static void create(){
armor::create();
SetKeyName("visitor pass");
! SetId(({"testchar badge","badge","pass","visitor's pass"}));
SetShort("a test character Visitor's Pass");
SetLong("This clip-on plastic badge grants the wearer access to "+
"some areas typically restricted to creator staff only. Abuse of this "+
diff -c -r --new-file ds2.0r28/lib/domains/default/armor/wizard_hat.c ds2.1/lib/domains/default/armor/wizard_hat.c
*** ds2.0r28/lib/domains/default/armor/wizard_hat.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/armor/wizard_hat.c Sun Jul 9 22:06:36 2006
***************
*** 5,12 ****
static void create(){
armor::create();
! SetKeyName("wizards hat");
! SetAdjectives( ({"wizards", "floppy", "large", "conical", "blue"}) );
SetId( ({"hat"}) );
SetShort("a wizard's hat");
SetLong("This is a large, floppy hat with a wide brim all "+
--- 5,12 ----
static void create(){
armor::create();
! SetKeyName("wizard's hat");
! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) );
SetId( ({"hat"}) );
SetShort("a wizard's hat");
SetLong("This is a large, floppy hat with a wide brim all "+
diff -c -r --new-file ds2.0r28/lib/domains/default/creator/workroom.c ds2.1/lib/domains/default/creator/workroom.c
*** ds2.0r28/lib/domains/default/creator/workroom.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/creator/workroom.c Tue Jul 11 18:36:19 2006
***************
*** 14,20 ****
"workroom" : "It looks very nice.",
]) );
SetInventory(([
- //"/domains/campus/obj/chest.c" : 1
]));
SetObviousExits("d");
SetExits( ([ "down" : "/domains/default/room/start.c",
--- 14,19 ----
diff -c -r --new-file ds2.0r28/lib/domains/default/npc/dummy.c ds2.1/lib/domains/default/npc/dummy.c
*** ds2.0r28/lib/domains/default/npc/dummy.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/npc/dummy.c Sun Jul 9 19:04:27 2006
***************
*** 29,48 ****
evidence = "";
if(agent) evidence += "I receive damage from "+agent->GetKeyName();
if(type) {
! if(type == BLUNT ) evidence += ", damage type is BLUNT";
! if(type == BLADE ) evidence += ", damage type is BLADE";
! if(type == KNIFE ) evidence += ", damage type is KNIFE";
! if(type == WATER ) evidence += ", damage type is WATER";
! if(type == SHOCK ) evidence += ", damage type is SHOCK";
! if(type == COLD ) evidence += ", damage type is COLD";
! if(type == HEAT ) evidence += ", damage type is HEAT";
! if(type == GAS ) evidence += ", damage type is GAS";
! if(type == ACID ) evidence += ", damage type is ACID";
! if(type == MAGIC ) evidence += ", damage type is MAGIC";
! if(type == POISON ) evidence += ", damage type is POISON";
! if(type == DISEASE ) evidence += ", damage type is DISEASE";
! if(type == TRAUMA ) evidence += ", damage type is TRAUMA";
! //else evidence += ", damage type is indeterminate";
}
if(x) evidence += ", raw damage is "+x;
if(internal) evidence += ", internal variable is "+internal;
--- 29,58 ----
evidence = "";
if(agent) evidence += "I receive damage from "+agent->GetKeyName();
if(type) {
! switch(type){
! case BLUNT : evidence += ", damage type is BLUNT";break;
! case BLADE : evidence += ", damage type is BLADE";break;
! case KNIFE : evidence += ", damage type is KNIFE";break;
! case WATER : evidence += ", damage type is WATER";break;
! case SHOCK : evidence += ", damage type is SHOCK";break;
! case COLD : evidence += ", damage type is COLD";break;
! case HEAT : evidence += ", damage type is HEAT";break;
! case GAS : evidence += ", damage type is GAS";break;
! case ACID : evidence += ", damage type is ACID";break;
! case MAGIC : evidence += ", damage type is MAGIC";break;
! case POISON : evidence += ", damage type is POISON";break;
! case DISEASE : evidence += ", damage type is DISEASE";break;
! case TRAUMA : evidence += ", damage type is TRAUMA";break;
! case PIERCE : evidence += ", damage type is PIERCE";break;
! case PSIONIC : evidence += ", damage type is PSIONIC";break;
! case ANOXIA : evidence += ", damage type is ANOXIA";break;
! case DEATHRAY : evidence += ", damage type is DEATHRAY";break;
! case EMOTIONAL : evidence += ", damage type is EMOTIONAL";break;
! case SONIC : evidence += ", damage type is SONIC";break;
! case BITE : evidence += ", damage type is BITE";break;
! case OTHER : evidence += ", damage type is OTHER";break;
! default : evidence += ", damage type is UNKNOWN";break;
! }
}
if(x) evidence += ", raw damage is "+x;
if(internal) evidence += ", internal variable is "+internal;
diff -c -r --new-file ds2.0r28/lib/domains/default/npc/fighter.c ds2.1/lib/domains/default/npc/fighter.c
*** ds2.0r28/lib/domains/default/npc/fighter.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/npc/fighter.c Sat Jul 8 23:30:54 2006
***************
*** 9,23 ****
SetLong("This is a large human warrior. His pectoral muscles "+
"are clearly visible even through his armor. His face is covered in "+
"bold blue tattoos.");
! SetCustomXP(350);
SetLevel(10);
SetRace("human");
- SetClass("fighter");
SetGender("male");
SetInventory(([
"/domains/default/armor/chainmail.c" : "wear chainmail",
"/domains/default/weap/sharpsword.c" : "wield sword"
]));
SetMaxHealthPoints(550);
}
void init(){
--- 9,27 ----
SetLong("This is a large human warrior. His pectoral muscles "+
"are clearly visible even through his armor. His face is covered in "+
"bold blue tattoos.");
! SetClass("fighter");
SetLevel(10);
+ SetCustomXP(350);
SetRace("human");
SetGender("male");
SetInventory(([
"/domains/default/armor/chainmail.c" : "wear chainmail",
"/domains/default/weap/sharpsword.c" : "wield sword"
]));
+ SetCurrency( ([
+ "silver" : 100,
+ ]) );
+ SetHealthPoints(549);
SetMaxHealthPoints(550);
}
void init(){
diff -c -r --new-file ds2.0r28/lib/domains/default/npc/orc.c ds2.1/lib/domains/default/npc/orc.c
*** ds2.0r28/lib/domains/default/npc/orc.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/npc/orc.c Tue Jul 11 18:36:19 2006
***************
*** 13,19 ****
"dangerous but more hostile. ");
SetLevel(1);
SetRace("orc");
- //SetClass("fighter");
SetGender("male");
SetMaxHealthPoints(100);
SetEncounter(0);
--- 13,18 ----
diff -c -r --new-file ds2.0r28/lib/domains/default/npc/tree.c ds2.1/lib/domains/default/npc/tree.c
*** ds2.0r28/lib/domains/default/npc/tree.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/npc/tree.c Tue Jul 11 18:36:19 2006
***************
*** 11,19 ****
--- 11,21 ----
"pods are full to bursting with coins of all kinds. It would be no "+
"trouble at all to get from tree...looks like "+
"you've hit the jackpot!");
+ SetPacifist(1);
SetCanBite(0);
SetLevel(99);
SetRace("tree");
+ SetHealthPoints(99999);
SetMaxHealthPoints(99999);
}
void init(){
***************
*** 38,44 ****
write("That is too much money to get from the tree at once.\n");
return 1;
}
- //write("Currency: "+s1+" Amount: "+d1+"\n");
this_player()->AddCurrency(s1, d1);
write("You get "+d1+" "+s1+" from the money tree.");
say(this_player()->GetCapName()+" gets money from the money tree.");
--- 40,45 ----
diff -c -r --new-file ds2.0r28/lib/domains/default/obj/guide.c ds2.1/lib/domains/default/obj/guide.c
*** ds2.0r28/lib/domains/default/obj/guide.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/obj/guide.c Sun Jul 9 22:06:36 2006
***************
*** 4,12 ****
void create(){
::create();
! SetKeyName("guidebook");
SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) );
! SetAdjectives( ({"admin", "admins", "administrator", "administrators", "reference"}) );
SetShort("an Administrator's Guidebook");
SetLong("This is a reference text for Dead Souls administrators.");
SetNoCondition(1);
--- 4,12 ----
void create(){
::create();
! SetKeyName("administrator's guidebook");
SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) );
! SetAdjectives( ({"admin's", "admin", "admins", "administrator", "administrators", "reference"}) );
SetShort("an Administrator's Guidebook");
SetLong("This is a reference text for Dead Souls administrators.");
SetNoCondition(1);
diff -c -r --new-file ds2.0r28/lib/domains/default/obj/meter.c ds2.1/lib/domains/default/obj/meter.c
*** ds2.0r28/lib/domains/default/obj/meter.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/obj/meter.c Tue Jul 11 18:36:19 2006
***************
*** 28,34 ****
string subrep = "";
if(!ob) ob = this_player();
foreach(object guy in get_livings(environment(ob))){
- //x += guy->GetRadiantLight();
if(guy->GetRadiantLight())
rep += guy->GetName()+"'s radiant light is: "+guy->GetRadiantLight()+".\n";
foreach(object item in all_inventory(guy)){
--- 28,33 ----
diff -c -r --new-file ds2.0r28/lib/domains/default/room/domains_room.c ds2.1/lib/domains/default/room/domains_room.c
*** ds2.0r28/lib/domains/default/room/domains_room.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/room/domains_room.c Tue Jul 11 18:36:19 2006
***************
*** 23,34 ****
--- 23,36 ----
"Ylsrim" : "This is the entry point for the Ylsrim domain.",
"campus" : "This is the entry point for the campus domain.",
"examples" : "This is the entry point for the examples domain.",
+ "town" : "This is the entry point for the town domain.",
({ "sign" }) : "A sign you can read.",
]));
SetEnters( ([
"campus" : "/domains/campus/room/start",
"ylsrim" : "/domains/Ylsrim/room/bazaar",
"examples" : "/domains/examples/room/start.c",
+ "town" : "/domains/town/room/vill_road1",
]) );
SetProperty("no attack", 1);
SetProperty("nopeer",1);
diff -c -r --new-file ds2.0r28/lib/domains/default/room/telnet_room.c ds2.1/lib/domains/default/room/telnet_room.c
*** ds2.0r28/lib/domains/default/room/telnet_room.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/default/room/telnet_room.c Wed Jul 12 20:23:44 2006
***************
*** 37,43 ****
"Dead Souls MUD is where all new fixes and features "+
"are tested before release."+
"\n\tIf the connection "+
! "fails, email cratylus@users.sourceforge.com to ask for help. "+
"Once you connect to Dead Souls, type \"dcon\" to "+
"return to your own mud. \n\n"+
"To connect type \"connect\" \n"+
--- 37,43 ----
"Dead Souls MUD is where all new fixes and features "+
"are tested before release."+
"\n\tIf the connection "+
! "fails, email cratylus@comcast.net to ask for help. "+
"Once you connect to Dead Souls, type \"dcon\" to "+
"return to your own mud. \n\n"+
"To connect type \"connect\" \n"+
diff -c -r --new-file ds2.0r28/lib/domains/town/armor/badge.c ds2.1/lib/domains/town/armor/badge.c
*** ds2.0r28/lib/domains/town/armor/badge.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/armor/badge.c Sun Jul 9 22:06:36 2006
***************
*** 1,4 ****
--- 1,5 ----
#include
+ #include
#include
#include
inherit LIB_ARMOR;
***************
*** 6,23 ****
static void create(){
armor::create();
SetKeyName("visitor pass");
! SetId(({"testchar badge","badge","pass","visitor pass"}));
SetShort("a test character Visitor's Pass");
SetLong("This clip-on plastic badge grants the wearer access to "+
"some areas typically restricted to creator staff only. Abuse of this "+
"pass is grounds for disciplinary action. A small scribble "+
"at the bottom of the pass reads: click heels");
SetMass(10);
! SetBaseCost("silver",5000);
SetDamagePoints(100);
SetArmorType(A_AMULET);
- SetRestrictLimbs( ({"torso"}) );
SetRetainOnDeath(1);
}
void init(){
::init();
--- 7,27 ----
static void create(){
armor::create();
SetKeyName("visitor pass");
! SetId(({"testchar badge","badge","pass","visitor's pass"}));
SetShort("a test character Visitor's Pass");
SetLong("This clip-on plastic badge grants the wearer access to "+
"some areas typically restricted to creator staff only. Abuse of this "+
"pass is grounds for disciplinary action. A small scribble "+
"at the bottom of the pass reads: click heels");
+ SetProperties(([
+ "no steal" : 1,
+ ]));
SetMass(10);
! SetBaseCost(5000);
SetDamagePoints(100);
SetArmorType(A_AMULET);
SetRetainOnDeath(1);
+ SetRestrictLimbs( ({ "torso" }) );
}
void init(){
::init();
***************
*** 29,35 ****
write("There's no place like home!\n"+
"You are transported by an awesome whirlwind somewhere "+
"else...\n");
! this_player()->eventMoveLiving("/domains/town/room/road");
return 1;
}
write("You click your heels together...but feel "+
--- 33,39 ----
write("There's no place like home!\n"+
"You are transported by an awesome whirlwind somewhere "+
"else...\n");
! this_player()->eventMoveLiving(ROOM_START);
return 1;
}
write("You click your heels together...but feel "+
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/beggar.c ds2.1/lib/domains/town/npc/beggar.c
*** ds2.0r28/lib/domains/town/npc/beggar.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/beggar.c Tue Jul 11 18:36:19 2006
***************
*** 1,4 ****
--- 1,5 ----
#include
+ #include
#include
inherit LIB_SENTIENT;
***************
*** 17,23 ****
SetPacifist(1);
SetInventory(([
"/domains/town/obj/map" : 1,
- //"/domains/town/obj/cold" : 1,
]));
SetLevel(1);
SetAutoStand(0);
--- 18,23 ----
***************
*** 36,41 ****
--- 36,43 ----
object map;
if(present(ob->GetKeyName(),environment(this_object()))
&& !this_object()->GetInCombat() &&
+ member_array(ob->GetRace(),RACES_D->GetRaces(1)) != -1 &&
+ !creatorp(ob) &&
!stringp(ob->CanManipulate()) ){
eventForce("say here, you might need this");
eventForce("give my first map to "+ob->GetKeyName());
***************
*** 49,55 ****
int SayHi(object ob){
if(present(ob->GetKeyName(),environment(this_object()))
! && !this_object()->GetInCombat())
eventForce("say Hi, "+this_player()->GetName());
return 1;
}
--- 51,58 ----
int SayHi(object ob){
if(present(ob->GetKeyName(),environment(this_object()))
! && !this_object()->GetInCombat() &&
! member_array(ob->GetRace(),RACES_D->GetRaces(1)) != -1)
eventForce("say Hi, "+this_player()->GetName());
return 1;
}
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/clepius.c ds2.1/lib/domains/town/npc/clepius.c
*** ds2.0r28/lib/domains/town/npc/clepius.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/clepius.c Tue Jul 11 18:36:19 2006
***************
*** 30,42 ****
}
int CanReceive() {
- // object ob,bag;
- //bag = present("medical bag", this_object());
- // ob = previous_object();
if(present("healer token", this_object())){
- //if(bag && member_array("healer token",ob->GetId()) != -1){
- // ob->eventMove(bag);
- // }
return 0;
}
--- 30,36 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/deer.c ds2.1/lib/domains/town/npc/deer.c
*** ds2.0r28/lib/domains/town/npc/deer.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/deer.c Wed Jul 12 13:29:17 2006
***************
*** 9,14 ****
--- 9,16 ----
SetAdjectives(({"non-player", "non player"}));
SetShort("a deer");
SetLong("A Typical creature of its kind: nervous, shify, yet beautiful and graceful. This gentle herbivore just wants to eat plants and reproduce.");
+ SetWimpy(95);
+ SetPacifist(1);
SetWanderSpeed(4);
SetLevel(1);
SetMelee(1);
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/gecko.c ds2.1/lib/domains/town/npc/gecko.c
*** ds2.0r28/lib/domains/town/npc/gecko.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/gecko.c Wed Jul 12 13:29:17 2006
***************
*** 12,17 ****
--- 12,19 ----
SetLevel(1);
SetMelee(1);
SetRace("lizard");
+ SetMaxHealthPoints(10);
+ SetHealthPoints(10);
SetGender("male");
}
void init(){
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/herkimer.c ds2.1/lib/domains/town/npc/herkimer.c
*** ds2.0r28/lib/domains/town/npc/herkimer.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/herkimer.c Sat Jul 8 23:30:54 2006
***************
*** 34,40 ****
"see right through you, but the smile from beneath "+
"his white beard is reassuring.");
SetLevel(300);
! SetUnique(1);
SetRace("human");
SetGender("male");
SetClass("mage");
--- 34,40 ----
"see right through you, but the smile from beneath "+
"his white beard is reassuring.");
SetLevel(300);
! SetUnique(0);
SetRace("human");
SetGender("male");
SetClass("mage");
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/newt.c ds2.1/lib/domains/town/npc/newt.c
*** ds2.0r28/lib/domains/town/npc/newt.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/newt.c Wed Jul 12 13:29:18 2006
***************
*** 14,19 ****
--- 14,21 ----
SetLevel(1);
SetRace("amphibian");
SetClass("explorer");
+ SetHealthPoints(10);
+ SetMaxHealthPoints(10);
SetGender("male");
}
void init(){
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/orc2.c ds2.1/lib/domains/town/npc/orc2.c
*** ds2.0r28/lib/domains/town/npc/orc2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/orc2.c Sun Jul 9 19:04:27 2006
***************
*** 2,7 ****
--- 2,8 ----
inherit LIB_NPC;
+
int CheckOrc(mixed val){
if(!val) return 0;
if(!objectp(val)) return 0;
***************
*** 9,15 ****
else eventForce("growl at "+val->GetKeyName());
return 1;
}
-
static void create() {
npc::create();
SetKeyName("orc");
--- 10,15 ----
***************
*** 30,32 ****
--- 30,35 ----
]) );
}
+ void init(){
+ ::init();
+ }
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/rat.c ds2.1/lib/domains/town/npc/rat.c
*** ds2.0r28/lib/domains/town/npc/rat.c Wed Jul 5 20:52:28 2006
--- ds2.1/lib/domains/town/npc/rat.c Sat Jul 8 23:30:55 2006
***************
*** 9,16 ****
SetId( ({"rat"}) );
SetShort("a rat");
SetLong("A scruffy little dirty rat.");
- SetLevel(1);
SetRace("rodent");
SetGender("male");
SetEncounter(100);
SetMessage("come","$N scurries in.");
--- 9,17 ----
SetId( ({"rat"}) );
SetShort("a rat");
SetLong("A scruffy little dirty rat.");
SetRace("rodent");
+ SetHealthPoints(3);
+ SetMaxHealthPoints(3);
SetGender("male");
SetEncounter(100);
SetMessage("come","$N scurries in.");
***************
*** 21,26 ****
"You hear tiny munching sounds."}));
}
void init(){
- SetMaxHealthPoints(3);
::init();
}
--- 22,26 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/thief.c ds2.1/lib/domains/town/npc/thief.c
*** ds2.0r28/lib/domains/town/npc/thief.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/thief.c Wed Jul 12 01:56:11 2006
***************
*** 2,8 ****
inherit LIB_NPC;
-
static void create() {
npc::create();
SetKeyName("thief");
--- 2,7 ----
***************
*** 13,29 ****
"is obviously a thief who has snuck into the "+
"mansion and taken up residence. You seem "+
"to have caught him just after his shower.");
! SetLevel(3);
SetRace("human");
! SetClass("fighter");
SetGender("male");
SetEncounter(100);
! SetMaxHealthPoints(100);
SetInventory(([
"/domains/town/armor/towel":"wear towel",
"/domains/town/weap/brush":"wield brush",
"/domains/town/obj/safe_key":1,
]) );
}
void init(){
::init();
--- 12,29 ----
"is obviously a thief who has snuck into the "+
"mansion and taken up residence. You seem "+
"to have caught him just after his shower.");
! SetLevel(1);
SetRace("human");
! SetClass("thief");
SetGender("male");
SetEncounter(100);
! SetMaxHealthPoints(25);
SetInventory(([
"/domains/town/armor/towel":"wear towel",
"/domains/town/weap/brush":"wield brush",
"/domains/town/obj/safe_key":1,
]) );
+ SetHealthPoints(50);
}
void init(){
::init();
diff -c -r --new-file ds2.0r28/lib/domains/town/npc/zoe.c ds2.1/lib/domains/town/npc/zoe.c
*** ds2.0r28/lib/domains/town/npc/zoe.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/npc/zoe.c Sat Jul 8 23:30:55 2006
***************
*** 3,8 ****
--- 3,9 ----
inherit LIB_TELLER;
+
static void create() {
::create();
SetKeyName("zoe");
***************
*** 28,30 ****
--- 29,34 ----
SetCurrencies( ({ "dollars", "copper", "silver", "electrum", "gold", "platinum" }) );
}
+ void init(){
+ ::init();
+ }
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/couch.c ds2.1/lib/domains/town/obj/couch.c
*** ds2.0r28/lib/domains/town/obj/couch.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/couch.c Tue Jul 11 18:36:20 2006
***************
*** 23,26 ****
"faint whiff of dog urine."
]) );
}
- //mixed CanGet(object ob) { return "The toilet does not budge.";}
--- 23,25 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/ebutton1.c ds2.1/lib/domains/town/obj/ebutton1.c
*** ds2.0r28/lib/domains/town/obj/ebutton1.c Wed Jul 5 20:52:28 2006
--- ds2.1/lib/domains/town/obj/ebutton1.c Fri Jul 7 19:41:41 2006
***************
*** 15,25 ****
static void create() {
dummy::create();
! SetKeyName("button");
! SetId(({"button","one","1" }));
SetAdjectives("elevator","button","one","1");
SetShort("a button");
SetLong("It is a button that you could probably press. The numeral \"1\" "
! "is printed on it. Try: press 1 button");
SetPress((: openDoor :));
}
--- 15,25 ----
static void create() {
dummy::create();
! SetKeyName("button 1");
! SetId("button","one","1");
SetAdjectives("elevator","button","one","1");
SetShort("a button");
SetLong("It is a button that you could probably press. The numeral \"1\" "
! "is printed on it.");
SetPress((: openDoor :));
}
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/ebutton2.c ds2.1/lib/domains/town/obj/ebutton2.c
*** ds2.0r28/lib/domains/town/obj/ebutton2.c Wed Jul 5 20:52:28 2006
--- ds2.1/lib/domains/town/obj/ebutton2.c Wed Jul 12 01:56:11 2006
***************
*** 5,11 ****
int openDoor(object who) {
object car;
! send_messages("press", "$agent_name $agent_verb the second button.",
who, 0, environment(who));
car=load_object("/domains/town/room/elevator");
car->SetDoor(1);
--- 5,11 ----
int openDoor(object who) {
object car;
! send_messages("press", "$agent_name $agent_verb the button.",
who, 0, environment(who));
car=load_object("/domains/town/room/elevator");
car->SetDoor(1);
***************
*** 15,25 ****
static void create() {
dummy::create();
! SetKeyName("button");
! SetId(({"B"}));
SetAdjectives("b", "elevator","button","basement","B");
SetShort("a button");
SetLong("It is a button that you could probably press. The letter \"B\" "
! "is printed on it. Try: press b button");
SetPress((: openDoor :));
}
--- 15,25 ----
static void create() {
dummy::create();
! SetKeyName("button b");
! SetId("b","button","two","B", "button B");
SetAdjectives("b", "elevator","button","basement","B");
SetShort("a button");
SetLong("It is a button that you could probably press. The letter \"B\" "
! "is printed on it.");
SetPress((: openDoor :));
}
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/gcoinbag.c ds2.1/lib/domains/town/obj/gcoinbag.c
*** ds2.0r28/lib/domains/town/obj/gcoinbag.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/gcoinbag.c Tue Jul 11 18:36:20 2006
***************
*** 13,19 ****
SetMass(274);
SetBaseCost("silver",1);
SetMaxCarry(50);
- //AddMoney("gold",5);
SetMoney( ([
"gold" : 5,
"silver" : 15,
--- 13,18 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/pack.c ds2.1/lib/domains/town/obj/pack.c
*** ds2.0r28/lib/domains/town/obj/pack.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/pack.c Sun Jul 9 19:04:27 2006
***************
*** 10,16 ****
SetKeyName("backpack");
SetId(({"pack"}));
SetAdjectives(({"leather","soft","brown"}));
! SetShort("a soft, brown leather backpack");
SetLong("This is a medium-sized backpack made of soft brown leather. "+
"It seems suitable for carrying books around, for the busy college student. "+
"It features wide, comfortable straps for convenient wear.");
--- 10,16 ----
SetKeyName("backpack");
SetId(({"pack"}));
SetAdjectives(({"leather","soft","brown"}));
! SetShort("a soft brown leather backpack");
SetLong("This is a medium-sized backpack made of soft brown leather. "+
"It seems suitable for carrying books around, for the busy college student. "+
"It features wide, comfortable straps for convenient wear.");
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/painting.c ds2.1/lib/domains/town/obj/painting.c
*** ds2.0r28/lib/domains/town/obj/painting.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/painting.c Tue Jul 11 18:36:20 2006
***************
*** 8,14 ****
SetKeyName("painting in the room");
SetId("painting");
SetAdjectives("beautiful");
- //SetShort("a beautiful painting is on the wall");
SetLong("Try: look at painting on the wall");
SetNoCondition(1);
SetPress( ([ "default" : "Try: push painting on wall" ]) );
--- 8,13 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/rayovac.c ds2.1/lib/domains/town/obj/rayovac.c
*** ds2.0r28/lib/domains/town/obj/rayovac.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/rayovac.c Sun Jul 9 19:04:28 2006
***************
*** 2,14 ****
#include
inherit "/lib/flashlight";
-
void create(){
::create();
SetKeyName("flashlight");
! SetId( ({"fl","flashlight","light","torch","flashlite"}) );
SetAdjectives( ({"plastic","small","cheap","rayovac","Rayovac"}) );
! SetShort( "a small, plastic flashlight" );
SetLong("This is a cheap Rayovac brand flashlight.");
SetMass(20);
SetBaseCost("silver",10);
--- 2,13 ----
#include
inherit "/lib/flashlight";
void create(){
::create();
SetKeyName("flashlight");
! SetId( ({"fl","flashlight","light","torch","flashlite", "rayovac"}) );
SetAdjectives( ({"plastic","small","cheap","rayovac","Rayovac"}) );
! SetShort("a small plastic flashlight");
SetLong("This is a cheap Rayovac brand flashlight.");
SetMass(20);
SetBaseCost("silver",10);
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/simple_chair.c ds2.1/lib/domains/town/obj/simple_chair.c
*** ds2.0r28/lib/domains/town/obj/simple_chair.c Wed Dec 31 19:00:00 1969
--- ds2.1/lib/domains/town/obj/simple_chair.c Sun Jul 9 22:06:36 2006
***************
*** 0 ****
--- 1,18 ----
+ #include
+
+ inherit LIB_CHAIR;
+
+ static void create() {
+ chair::create();
+ SetKeyName("chair");
+ SetAdjectives( ({"simple", "wooden"}) );
+ SetId("chair");
+ SetShort("a wooden chair");
+ SetLong("A simple chair, made of wood, for sitting on.");
+ SetMass(150);
+ SetDollarCost(15);
+ SetMaxSitters(1);
+ }
+ void init(){
+ ::init();
+ }
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/table.c ds2.1/lib/domains/town/obj/table.c
*** ds2.0r28/lib/domains/town/obj/table.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/table.c Sun Jul 9 22:06:36 2006
***************
*** 1,11 ****
#include
- inherit LIB_STORAGE;
inherit LIB_CHAIR;
! inherit "/lib/comp/surface";
void create() {
! ::create();
SetKeyName("wooden table");
SetId( ({ "table" }) );
SetAdjectives( ({ "wood","wooden", "simple", "medium-sized" "medium sized" }) );
--- 1,11 ----
#include
inherit LIB_CHAIR;
! inherit LIB_SURFACE;
void create() {
! surface::create();
! chair::create();
SetKeyName("wooden table");
SetId( ({ "table" }) );
SetAdjectives( ({ "wood","wooden", "simple", "medium-sized" "medium sized" }) );
diff -c -r --new-file ds2.0r28/lib/domains/town/obj/torch.c ds2.1/lib/domains/town/obj/torch.c
*** ds2.0r28/lib/domains/town/obj/torch.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/obj/torch.c Sun Jul 9 19:04:28 2006
***************
*** 7,13 ****
SetKeyName("torch");
SetId( ({ "torch", "old torch", "wooden torch" }) );
SetAdjectives( ({ "old", "wooden" }) );
! SetShort("an old, wooden torch");
SetLong("An old, wooden torch with a bit of cloth wrapped around "
"one end and dipped into a flamable substance.");
SetRadiantLight(7);
--- 7,13 ----
SetKeyName("torch");
SetId( ({ "torch", "old torch", "wooden torch" }) );
SetAdjectives( ({ "old", "wooden" }) );
! SetShort("an old wooden torch");
SetLong("An old, wooden torch with a bit of cloth wrapped around "
"one end and dipped into a flamable substance.");
SetRadiantLight(7);
***************
*** 20,22 ****
--- 20,25 ----
SetBurntValue(10);
SetClass(10);
}
+ void init(){
+ ::init();
+ }
diff -c -r --new-file ds2.0r28/lib/domains/town/room/adv_guild.c ds2.1/lib/domains/town/room/adv_guild.c
*** ds2.0r28/lib/domains/town/room/adv_guild.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/adv_guild.c Sat Jul 8 23:30:55 2006
***************
*** 30,43 ****
SetInventory(([
"/domains/town/obj/bin" : 1,
"/domains/town/obj/table" : 1,
]));
SetRead( ([
({"list","scroll"}) : (: ReadScroll :),
({"instructions","sign"}) : (: ReadSign :)
]) );
- AddStuff( ({ "/domains/town/npc/dirk"
- }) );
SetProperty("no attack", 1);
ob = new("/lib/bboard");
ob->SetKeyName("chalkboard");
--- 30,42 ----
SetInventory(([
"/domains/town/obj/bin" : 1,
"/domains/town/obj/table" : 1,
+ "/domains/town/npc/dirk" : 1
]));
SetRead( ([
({"list","scroll"}) : (: ReadScroll :),
({"instructions","sign"}) : (: ReadSign :)
]) );
SetProperty("no attack", 1);
ob = new("/lib/bboard");
ob->SetKeyName("chalkboard");
diff -c -r --new-file ds2.0r28/lib/domains/town/room/bank.c ds2.1/lib/domains/town/room/bank.c
*** ds2.0r28/lib/domains/town/room/bank.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/bank.c Tue Jul 11 18:36:20 2006
***************
*** 71,83 ****
return 1;
}
- //int CanReceive(object ob) {
- // if(playerp(ob) && !creatorp(ob) ) {
- // message("info","The bank is closed for Festivus.", ob);
- // return 0;
- // }
- // return 1;
- // }
void init(){
::init();
}
--- 71,76 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/cave_entrance.c ds2.1/lib/domains/town/room/cave_entrance.c
*** ds2.0r28/lib/domains/town/room/cave_entrance.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/cave_entrance.c Wed Jul 12 01:56:12 2006
***************
*** 3,14 ****
inherit LIB_ROOM;
-
void create() {
room::create();
SetAmbientLight(30);
! SetShort("a blank room");
! SetLong("A featureless area.");
SetExits( ([
"south" : "/domains/town/virtual/forest/24,25" ,
"out" : "/domains/town/virtual/forest/24,25" ,
--- 3,13 ----
inherit LIB_ROOM;
void create() {
room::create();
SetAmbientLight(30);
! SetShort("The Empty Cave");
! SetLong("An empty cave.");
SetExits( ([
"south" : "/domains/town/virtual/forest/24,25" ,
"out" : "/domains/town/virtual/forest/24,25" ,
diff -c -r --new-file ds2.0r28/lib/domains/town/room/church.c ds2.1/lib/domains/town/room/church.c
*** ds2.0r28/lib/domains/town/room/church.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/church.c Tue Jul 11 18:36:20 2006
***************
*** 27,33 ****
"vandalism" : "You don't see any of that."
]) );
SetObviousExits("s, w");
- //AddItem(new("/domains/town/obj/church_wall"));
SetEnters( ([
"elevator" : "/domains/town/room/elevator",
]) );
--- 27,32 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/clearing.c ds2.1/lib/domains/town/room/clearing.c
*** ds2.0r28/lib/domains/town/room/clearing.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/clearing.c Tue Jul 11 18:36:20 2006
***************
*** 10,17 ****
SetLong("This is a small clearing in a path through the forest. "
"The path splits here, continuing into the valley "
"west of here. The path to the east "
- //, and also running north as a trail "
- //"deeper into the wilderness. The path to the east "
"leads back to the safety of the town.");
SetExits( ([
"west" : "/domains/town/room/valley",
--- 10,15 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/clerk.c ds2.1/lib/domains/town/room/clerk.c
*** ds2.0r28/lib/domains/town/room/clerk.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/clerk.c Tue Jul 11 18:36:21 2006
***************
*** 21,32 ****
]));
SetObviousExits("e");
AddExit("east", "/domains/town/room/thall");
- //funs
- //snuf
}
void init() {
::init();
SetSmell(([]));
SetListen(([]));
}
- //extras
--- 21,29 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/confroom.c ds2.1/lib/domains/town/room/confroom.c
*** ds2.0r28/lib/domains/town/room/confroom.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/confroom.c Tue Jul 11 18:36:21 2006
***************
*** 53,60 ****
int report_time(){
int secs = time() - timer;
- //tc("time: "+time());
- //tc("timer: "+timer);
if(!timer){
write("Privacy field is not active.");
--- 53,58 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/elevator.c ds2.1/lib/domains/town/room/elevator.c
*** ds2.0r28/lib/domains/town/room/elevator.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/elevator.c Tue Jul 11 18:36:21 2006
***************
*** 8,16 ****
SetClimate("indoors");
SetAmbientLight(30);
SetShort("Church Elevator");
! SetLong("This is the elevator in the village church. The "
! "elevator door is on the east wall. Two buttons are "
! "set into the wall next to the door.");
floor=1;
moving = 0;
closed=1;
--- 8,14 ----
SetClimate("indoors");
SetAmbientLight(30);
SetShort("Church Elevator");
! SetLong("This is the elevator in the village church. The elevator door is on the east wall. Two buttons are set into the wall next to the door, labeled '1' and 'b'.");
floor=1;
moving = 0;
closed=1;
***************
*** 71,77 ****
return 1;
}
int CanReceive(object ob) {
- //tc("verb: "+query_verb());
if(closed > 0 && query_verb() == "go"){
message("info","The elevator door is closed.", ob);
return 0;
--- 69,74 ----
***************
*** 79,85 ****
return 1;
}
int CanRelease(object ob){
! if(closed > 0 && !creatorp(ob) && query_verb() == "go" ){
message("info","The elevator door is closed.", ob);
return 0;
}
--- 76,87 ----
return 1;
}
int CanRelease(object ob){
! if(archp(ob)) {
! tell_object(ob,"%^RED%^As archwizard, you are permitted to "
! "exit the elevator at any time. Normal creators and "
! "players cannot do this.%^RESET%^\n");
! }
! if(closed > 0 && query_verb() == "go" ){
message("info","The elevator door is closed.", ob);
return 0;
}
***************
*** 114,120 ****
moving = 0;
SetFloor(callfloor);
tell_room(this_object(),"The elevator arrives at its destination.");
- //tell_room(this_object(),"A voice says \"Floor "+cardinal(floor)+".\"");
SetDoor(0);
callfloor = 0;
}
--- 116,121 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/gate.c ds2.1/lib/domains/town/room/gate.c
*** ds2.0r28/lib/domains/town/room/gate.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/gate.c Wed Jul 12 01:56:12 2006
***************
*** 1,9 ****
#include
inherit LIB_ROOM;
-
int PreExit(){
! if(this_player()->GetLevel() > 3 && !creatorp(this_player())){
if(present("gate guard",this_object())){
present("gate guard",this_object())->eventForce("say You're too big to slip by me now. You're not going to the mansion any more.");
}
--- 1,9 ----
#include
inherit LIB_ROOM;
int PreExit(){
! if(this_player()->GetLevel() > MAX_NEWBIE_LEVEL &&
! !creatorp(this_player()) && !present("testchar badge",this_player())){
if(present("gate guard",this_object())){
present("gate guard",this_object())->eventForce("say You're too big to slip by me now. You're not going to the mansion any more.");
}
***************
*** 49,61 ****
"casual entry. They are made of brick and appear old "
"and strong.",
]) );
SetExits( ([
"north" : "/domains/town/room/road1",
]) );
AddExit("south", "/domains/town/room/mansion_ext", (: PreExit :));
- AddStuff( ({
- "/domains/town/npc/mp"
- }) );
SetProperty("no attack", 1);
}
--- 49,61 ----
"casual entry. They are made of brick and appear old "
"and strong.",
]) );
+ SetInventory(([
+ "/domains/town/npc/mp" : 1,
+ ]));
SetExits( ([
"north" : "/domains/town/room/road1",
]) );
AddExit("south", "/domains/town/room/mansion_ext", (: PreExit :));
SetProperty("no attack", 1);
}
diff -c -r --new-file ds2.0r28/lib/domains/town/room/healer.c ds2.1/lib/domains/town/room/healer.c
*** ds2.0r28/lib/domains/town/room/healer.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/healer.c Tue Jul 11 18:36:21 2006
***************
*** 4,12 ****
int ReadList(){
write("AVAILABLE PROCEDURES:\n"
- //"\texcision, cost 1000:\tcut away foreign material\n"
"\thealing, cost 200:\tfacilitate rapid recovery from wounds\n"
- //"\tcuring, cost 1500:\t\tremove infections and infestations\n"
"\tregeneration, cost 1200:\tgrow back severed limbs\n"
"\n"
"Example: If you are badly hurt and need healing:\n\n"
--- 4,10 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/magic_guild.c ds2.1/lib/domains/town/room/magic_guild.c
*** ds2.0r28/lib/domains/town/room/magic_guild.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/magic_guild.c Sat Jul 8 23:30:56 2006
***************
*** 32,43 ****
SetItems( ([
({"list","list on the wall"}) : "A list of available spells",
]) );
SetRead(({"list","list on wall"}) , (: ReadList :) );
SetExits( ([
"north" : "/domains/town/room/magic_shop"
]) );
SetObviousExits("n");
- AddStuff( ({ "/domains/town/npc/herkimer" }) );
}
void init(){
--- 32,45 ----
SetItems( ([
({"list","list on the wall"}) : "A list of available spells",
]) );
+ SetInventory(([
+ "/domains/town/npc/herkimer" : 1,
+ ]));
SetRead(({"list","list on wall"}) , (: ReadList :) );
SetExits( ([
"north" : "/domains/town/room/magic_shop"
]) );
SetObviousExits("n");
}
void init(){
diff -c -r --new-file ds2.0r28/lib/domains/town/room/mansion_room10.c ds2.1/lib/domains/town/room/mansion_room10.c
*** ds2.0r28/lib/domains/town/room/mansion_room10.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/mansion_room10.c Tue Jul 11 18:36:21 2006
***************
*** 21,27 ****
"nobility, and they are rendered with an "
"eerily lifelike realism.",
]) );
- //AddStuff( ({ "/domains/town/obj/dining_table" }) );
SetInventory( ([
"/domains/town/obj/dining_table" : 1,
]) );
--- 21,26 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/mayor.c ds2.1/lib/domains/town/room/mayor.c
*** ds2.0r28/lib/domains/town/room/mayor.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/mayor.c Tue Jul 11 18:36:21 2006
***************
*** 21,32 ****
SetInventory(([ "/domains/town/npc/mayor" : 1]));
SetObviousExits("s");
AddExit("south", "/domains/town/room/thall");
- //funs
- //snuf
}
void init() {
::init();
SetSmell(([]));
SetListen(([]));
}
- //extras
--- 21,29 ----
diff -c -r --new-file ds2.0r28/lib/domains/town/room/mountain_road.c ds2.1/lib/domains/town/room/mountain_road.c
*** ds2.0r28/lib/domains/town/room/mountain_road.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/mountain_road.c Tue Jul 11 18:36:22 2006
***************
*** 18,26 ****
({"mountains","beautiful","snow-capped mountains"}) : "Beautiful "
"mountains, far off in the northern distance."
]) );
! SetExits( ([
"south" : "/domains/town/room/road",
- "north" : "/domains/test/room/start.c",
]) );
}
--- 18,25 ----
({"mountains","beautiful","snow-capped mountains"}) : "Beautiful "
"mountains, far off in the northern distance."
]) );
! SetExits( ([
"south" : "/domains/town/room/road",
]) );
}
diff -c -r --new-file ds2.0r28/lib/domains/town/room/road2.c ds2.1/lib/domains/town/room/road2.c
*** ds2.0r28/lib/domains/town/room/road2.c Wed Jul 5 00:01:11 2006
--- ds2.1/lib/domains/town/room/road2.c Sat Jul 8 23:30:56 2006
***************
*** 1,21 ****
#include
inherit LIB_ROOM;
static void create() {
room::create();
SetClimate("outdoors");
SetAmbientLight(30);
SetShort("West Village road");
! SetLong("This is a well-traveled road, leading east into town and west away from it. An old, humpbacked bridge is west of here.");
SetItems(([
({ "fort", "fortress", "fortress in the distance" }) : "It can't be seen well from here, but far north is what appears to be a large fortress built on a high plateau.",
({ "road", "roads" }) : "This is a simple east-west road that goes east into town and west away from it. Another road, paved with cobblestones, intersects here to the north and leads high toward a fortress in the distance.",
"cobblestone road" : "This is where a cobblestone road begins that is built on an steep incline and rises up as it leads north to a high plateau.",
]));
! SetExits( ([
"west" : "/domains/town/room/bridge",
"east" : "/domains/town/room/road1",
]) );
}
void init(){
--- 1,29 ----
#include
inherit LIB_ROOM;
+ string LongDesc(){
+ string desc = "This is a well-traveled road, leading east into town and west away from it. An old, humpbacked bridge is west of here.";
+ if(this_object()->GetExit("north"))
+ desc += " A road north leads up to a plateau where a fortress stands in the distance.";
+ return desc;
+ }
+
static void create() {
room::create();
SetClimate("outdoors");
SetAmbientLight(30);
SetShort("West Village road");
! SetLong((: LongDesc :));
SetItems(([
({ "fort", "fortress", "fortress in the distance" }) : "It can't be seen well from here, but far north is what appears to be a large fortress built on a high plateau.",
({ "road", "roads" }) : "This is a simple east-west road that goes east into town and west away from it. Another road, paved with cobblestones, intersects here to the north and leads high toward a fortress in the distance.",
"cobblestone road" : "This is where a cobblestone road begins that is built on an steep incline and rises up as it leads north to a high plateau.",
]));
! SetExits( ([
"west" : "/domains/town/room/bridge",
"east" : "/domains/town/room/road1",
]) );
+ if(mud_name() == "Dead Souls") AddExit("north","/domains/fort/room/f_road4.c");
}
void init(){
diff -c -r --new-file ds2.0r28/lib/lib/blank_pile.c ds2.1/lib/lib/blank_pile.c
*** ds2.0r28/lib/lib/blank_pile.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/blank_pile.c Fri Jul 7 19:41:41 2006
***************
*** 1,23 ****
#include
! inherit LIB_ITEM;
!
! private string PileType = 0;
! int PileAmount = 0;
static void create() {
! string *saveds;
! item::create();
! saveds = item::GetSave();
! saveds += ({ "PileType", "PileAmount" });
! AddSave( saveds );
SetKeyName("money");
}
string array GetId() {
string array id;
! id = item::GetId();
if( PileType ) {
if(PileType != "dollars") {
id += ({ PileType, PileAmount + " " + PileType +" coins"});
--- 1,16 ----
#include
! inherit LIB_PILE;
static void create() {
! pile::create();
SetKeyName("money");
}
string array GetId() {
string array id;
! id = pile::GetId();
if( PileType ) {
if(PileType != "dollars") {
id += ({ PileType, PileAmount + " " + PileType +" coins"});
***************
*** 30,59 ****
}
}
- varargs string GetLong(string str) {
- if( !PileAmount ) {
- return 0;
- }
- if(PileType != "dollars") {
- return PileAmount + " " + PileType + " coins.";
- }
- else return PileAmount + " " + PileType + ".";
- }
-
- int GetMass() {
- return currency_mass(PileAmount, PileType);
- }
-
- void SetPile(string str, int amt) {
- PileType = str;
- PileAmount = amt;
- parse_refresh();
- }
-
- string GetPileType() { return PileType; }
-
- int GetPileAmount() { return PileAmount; }
-
string GetShort() {
string sum;
if(!PileAmount) sum = "some";
--- 23,28 ----
***************
*** 64,130 ****
else return sum + " " + PileType ;
}
- mixed eventGetCurrency(object who, int amount, string curr) {
- string sum;
- if(!amount) amount = PileAmount;
- if( who->AddCurrency(curr, amount) == -1 ) {
- who->eventPrint("You had a problem getting the money.");
- return 1;
- }
- if(!amount) sum = "some";
- else sum = cardinal(amount);
- send_messages("get", "$agent_name $agent_verb " + sum + " " +
- curr + " " + GetShort() + ".", who, 0, environment(who));
- PileAmount -= amount;
- if( PileAmount < 1 ) {
- call_out((: Destruct :), 0);
- return 1;
- }
- SetPile(PileType, PileAmount); /* This refreshes the parser */
- return 1;
- }
-
- int eventMove(mixed dest) {
- int x;
-
- x = item::eventMove(dest);
- if( !environment() || !living(environment()) ) {
- return x;
- }
- if(environment() && living(environment()) ) {
- environment()->AddCurrency(PileType, PileAmount);
- environment()->AddCarriedMass(-this_object()->GetMass());
- SetShort(PileAmount + " " + PileType);
- //PileAmount = 0;
- call_out((: Destruct :), 0);
- return x;
- }
- }
-
- mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) {
- int amt;
-
- if( environment() != environment(this_player()) ) {
- return "#You cannot reach the money!";
- }
- if( num[0] < '0' || num[0] > '9' ) {
- return 0;
- }
- if( (amt = to_int(num)) < 1 ) {
- return "That's a totally bogus amount.";
- }
- if( curr != PileType ) {
- return "#There are no " + curr + " there, only " + PileType + ".";
- }
- if( amt > PileAmount ) {
- return "#There is not that much there.";
- }
- if( !this_player()->CanCarry(currency_mass(amt, curr)) ) {
- return "It is too heavy for you!";
- }
- return 1;
- }
-
- mixed direct_get_wrd_wrd_from_obj(string amt, string curr) {
- return direct_get_wrd_wrd_out_of_obj(amt, curr);
- }
--- 33,35 ----
diff -c -r --new-file ds2.0r28/lib/lib/body.c ds2.1/lib/lib/body.c
*** ds2.0r28/lib/lib/body.c Wed Jul 5 19:58:19 2006
--- ds2.1/lib/lib/body.c Tue Jul 11 18:36:22 2006
***************
*** 9,14 ****
--- 9,15 ----
#include
#include
+ #include
#include
#include
#include
***************
*** 68,73 ****
--- 69,80 ----
ExtraChannels = ({});
}
+ varargs mixed eventBuy(mixed arg1, mixed arg2, mixed arg3){
+ //This function will hopefully get overridden where appropriate.
+ write(capitalize(this_object()->GetShort())+" isn't buying anything from you.");
+ return 1;
+ }
+
int GetEncumbrance(){
int encumbrance = 0;
object *stuff = filter(all_inventory(this_object()), (: !($1->GetWorn()) :) );
***************
*** 198,204 ****
int eventCollapse() {
int position = GetPosition();
! foreach(object ob in all_inventory(environment(this_object()))){
if(inherits(LIB_CHAIR,ob) || inherits(LIB_BED,ob) ){
ob->eventReleaseStand(this_object());
}
--- 205,213 ----
int eventCollapse() {
int position = GetPosition();
! if(!this_object() || !environment()) return 0;
!
! foreach(object ob in all_inventory(environment())){
if(inherits(LIB_CHAIR,ob) || inherits(LIB_BED,ob) ){
ob->eventReleaseStand(this_object());
}
***************
*** 414,421 ****
string tmp = GetResistance(type);
int fp;
- //tc("agent: "+identify(agent),"yellow");
-
if( tmp == "immune") {
return 0;
}
--- 423,428 ----
***************
*** 604,620 ****
varargs int eventDie(mixed agent) {
int x;
string killer, death_annc;
! //debug(identify(agent));
! //tc("stack: "+identify(get_stack()));
!
! //if(!agent) agent = previous_object();
if(DeathEvents) return 1;
DeathEvents = 1;
if(agent && stringp(agent)) killer = agent + " ";
else {
- //tc("previous: "+identify(previous_object(-1)));
if(!agent) killer = "UNKNOWN";
else killer = agent->GetName();
}
--- 611,623 ----
varargs int eventDie(mixed agent) {
int x;
string killer, death_annc;
! object crime_scene;
if(DeathEvents) return 1;
DeathEvents = 1;
if(agent && stringp(agent)) killer = agent + " ";
else {
if(!agent) killer = "UNKNOWN";
else killer = agent->GetName();
}
***************
*** 629,641 ****
if( x ) agent->eventDestroyEnemy(this_object());
else agent->eventKillEnemy(this_object());
}
! if( environment() ) {
object *obs;
string *currs;
object ob;
string curr;
int i;
if(GetRace() == "golem") {
ob = new(LIB_CLAY);
if(GetBodyComposition()) ob->SetComposition(GetBodyComposition());
--- 632,648 ----
if( x ) agent->eventDestroyEnemy(this_object());
else agent->eventKillEnemy(this_object());
}
! crime_scene = environment();
! if( crime_scene ) {
object *obs;
string *currs;
object ob;
string curr;
int i;
+ //I'd like to move the living body out first, but for now this
+ //misfeature stays.
+ //this_object()->eventMove(ROOM_VOID);
if(GetRace() == "golem") {
ob = new(LIB_CLAY);
if(GetBodyComposition()) ob->SetComposition(GetBodyComposition());
***************
*** 645,651 ****
else ob = new(LIB_CORPSE);
ob->SetCorpse(this_object());
}
! ob->eventMove(environment());
obs = filter(all_inventory(), (: !((int)$1->GetRetainOnDeath()) :));
i = sizeof(obs);
obs->eventMove(ob);
--- 652,658 ----
else ob = new(LIB_CORPSE);
ob->SetCorpse(this_object());
}
! ob->eventMove(crime_scene);
obs = filter(all_inventory(), (: !((int)$1->GetRetainOnDeath()) :));
i = sizeof(obs);
obs->eventMove(ob);
***************
*** 1137,1146 ****
HealthPoints = 0;
if( !Dying ) {
Dying = 1;
- //tc("agent: "+identify(agent),"green");
Agent = agent;
- //tc("Agent: "+identify(Agent),"blue");
- //call_out((: eventDie, Agent :), 0);
eventDie(Agent);
}
return 0;
--- 1144,1150 ----
***************
*** 1419,1426 ****
if( !Dying ) {
Dying = 1;
Agent = agent;
- //tc("Agent: "+identify(Agent), "red");;
- //call_out( (: eventDie, Agent :), 0);
eventDie(Agent);
}
}
--- 1423,1428 ----
diff -c -r --new-file ds2.0r28/lib/lib/clay.c ds2.1/lib/lib/clay.c
*** ds2.0r28/lib/lib/clay.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/clay.c Tue Jul 11 18:36:22 2006
***************
*** 17,23 ****
tmpsave2 = surface::GetSave();
tmpsave3 = ({ "Composition","Name","Nouns","ShortDesc", "Desc","Adjectives" });
tmpsave4 = tmpsave1 + tmpsave2 + tmpsave3;
- //tc("AddSave: "+identify(tmpsave4));
AddSave( tmpsave4 );
SetKeyName("lump");
SetId( ({"lump","clay","mass"}) );
--- 17,22 ----
***************
*** 32,44 ****
}
void InitComposition(){
- //tc("made it to initcomp.","red");
SetComposition(Composition, Name, Nouns, Adjectives, ShortDesc, Desc);
}
varargs string SetComposition(string comp, string name, string *nouns, string *adjs, string short, string desc){
string tmp;
- //tc("made it to setcomp.","blue");
if(name) {
Name = name;
--- 31,41 ----
diff -c -r --new-file ds2.0r28/lib/lib/combat.c ds2.1/lib/lib/combat.c
*** ds2.0r28/lib/lib/combat.c Wed Jul 5 19:58:19 2006
--- ds2.1/lib/lib/combat.c Tue Jul 11 18:36:22 2006
***************
*** 57,62 ****
--- 57,66 ----
}
/* ***************** /lib/combat.c data functions ***************** */
+ varargs int GetMaxHealthPoints(string limb){
+ return race::GetMaxHealthPoints(limb);
+ }
+
int GetDead(){
return Dead;
}
***************
*** 418,424 ****
else {
TargetLimb = limb;
}
- //tc("chance: "+chance);
return chance;
}
--- 422,427 ----
***************
*** 445,451 ****
else {
TargetLimb = limb;
}
- //tc("chance: "+chance);
return chance;
}
else {
--- 448,453 ----
***************
*** 468,474 ****
else {
TargetLimb = limb;
}
- //tc("chance: "+chance);
return chance;
}
}
--- 470,475 ----
***************
*** 655,664 ****
else { // I hit, but how hard did I hit?
int damage_type, damage, weapon_damage, actual_damage, encumbrance;
encumbrance = this_object()->GetEncumbrance();
! //tc("encumbrance: "+encumbrance,"white");
! if(encumbrance > 200){
! //tc("feep","yellow");
! tell_object(this_object(),"You struggle to fight while heavily encumbered.");
}
eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus);
damage_type = weapon->GetDamageType();
--- 656,663 ----
else { // I hit, but how hard did I hit?
int damage_type, damage, weapon_damage, actual_damage, encumbrance;
encumbrance = this_object()->GetEncumbrance();
! if(encumbrance > 20){
! tell_object(this_object(),"You struggle to fight while carrying stuff.");
}
eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus);
damage_type = weapon->GetDamageType();
***************
*** 751,760 ****
else {
int x, encumbrance;
encumbrance = this_object()->GetEncumbrance();
! //tc("encumbrance: "+encumbrance,"white");
! if(encumbrance > 200){
! //tc("feep","blue");
! tell_object(this_object(),"You struggle to fight while heavily encumbered.");
}
// I hit, how hard?
eventTrainSkill("melee attack", pro, con, 1,
--- 750,757 ----
else {
int x, encumbrance;
encumbrance = this_object()->GetEncumbrance();
! if(encumbrance > 20){
! tell_object(this_object(),"You struggle to fight while carrying stuff.");
}
// I hit, how hard?
eventTrainSkill("melee attack", pro, con, 1,
***************
*** 952,960 ****
encumbrance = this_object()->GetEncumbrance();
if(Dead) return 0;
- //tc("encumbrance: "+encumbrance,"white");
if(encumbrance > 200){
- //tc("feep","green");
if(GetInCombat()) tell_object(this_object(),"You try to dodge while weighed down.");
}
x = race::eventReceiveDamage(agent, type, x, internal, limbs);
--- 949,955 ----
diff -c -r --new-file ds2.0r28/lib/lib/command.c ds2.1/lib/lib/command.c
*** ds2.0r28/lib/lib/command.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/command.c Sun Jul 9 19:04:28 2006
***************
*** 18,23 ****
--- 18,27 ----
private static string *SearchPath;
private static string *apostrophe_exceptions;
+ int direct_force_liv_str() { return 1; }
+ int direct_force_liv_to_str() { return 1; }
+
+
/* *************** /lib/command.c driver applies *************** */
static void create() {
***************
*** 31,37 ****
}
static string process_input(string cmd) {
- //tc(this_object()->GetName()+": "+identify(parse_command(cmd)));
return cmd;
}
--- 35,40 ----
***************
*** 42,59 ****
mixed err;
string verb, file;
- //if(ParseMe(args) == 1) return 1;
- //tc(this_object()->GetName()+" parse_command_id_list(): "+identify(parse_command_id_list()));
- //tc(this_object()->GetName()+" parse_command_plural_id_list(): "+identify(parse_command_plural_id_list()));
- //tc(this_object()->GetName()+" parse_command_adjectiv_id_list(): "+identify(parse_command_adjectiv_id_list()));
- //tc(this_object()->GetName()+" parse_command_prepos_list(): "+identify(parse_command_prepos_list()));
-
- if(sizeof(args) && member_array(query_verb(), apostrophe_exceptions) == -1)
- args = replace_string(args,"'","");
-
old_agent = this_agent(this_object());
verb = query_verb();
- //write("verb: "+verb);
if(this_player()->GetSleeping() > 0) {
if(verb != "wake") {
--- 45,52 ----
***************
*** 76,129 ****
if( (int)this_object()->GetProperty("parse debug") ) dbg = 1;
if( (int)this_object()->GetProperty("debug") ) dbg = 1;
else dbg = 0;
- //tc("command: checkpoint 1","green");
if( (err = parse_sentence(cmd, dbg)) == 1 ) {
this_agent(old_agent || 1);
return 1;
}
- //tc("command: checkpoint 2","green");
if( err ) {
- //tc("command: checkpoint 3. err: "+err,"green");
if( err == -1 ) {
- //tc("command: checkpoint 4","green");
if( !(err = (string)VERBS_D->GetErrorMessage(verb)) &&
!(err = (string)SOUL_D->GetErrorMessage(verb)) ) {
err = "Such a command exists, but no default "
"syntax is known.";
}
}
- //tc("command: checkpoint 5","green");
if( intp(err) ) /* MudOS bug */ err = "What?";
SetCommandFail(err);
}
- //tc("command: checkpoint 6","green");
message("error", GetCommandFail(), this_object());
this_agent(old_agent || 1);
return 1;
}
- //tc("command: checkpoint 7","green");
}
- //tc("command: checkpoint 8","green");
if( (err = (mixed)call_other(file, "cmd", args)) != 1 ) {
string cmd;
- //tc("command: checkpoint 9","green");
if( err ) SetCommandFail(err);
if( !args || args == "" ) cmd = verb;
else cmd = verb + " " + args;
if( (err = parse_sentence(cmd)) == 1 ) {
- //tc("command: checkpoint 10","green");
this_agent(old_agent || 1);
return 1;
}
- //tc("command: checkpoint 11","green");
if( !err ) err = GetCommandFail();
message("error", err, this_object());
this_agent(old_agent || 1);
return 1;
}
- //tc("command: checkpoint 12","green");
this_agent(old_agent || 1);
return 1;
}
--- 69,110 ----
diff -c -r --new-file ds2.0r28/lib/lib/comp/holder.c ds2.1/lib/lib/comp/holder.c
*** ds2.0r28/lib/lib/comp/holder.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/comp/holder.c Tue Jul 11 18:36:22 2006
***************
*** 36,42 ****
desc = (container::GetInternalDesc() || "");
if(this_object()->CanClose() && GetOpacity() > 33){
- //tc("GREEN LED","green");
if(this_object()->GetClosed()) desc += " It is closed. ";
else desc += " It is open. ";
}
--- 36,41 ----
***************
*** 44,59 ****
if(surfacep) desc = "On "+add_article(GetShort(), 1);
items = filter(items, (: !($1->isDummy()) && !($1->GetInvis()) :));
if( sizeof(items) ) {
- //if( GetOpacity() > 33 && !surfacep) {
- //desc = desc + " contains something.";
- //}
- //else {
if(surfacep){
desc = desc+" you see " + item_list(items) + ".";
}
else desc = desc + " contains " + item_list(items) + ".";
}
- //}
else {
if(!surfacep) desc = desc + " is completely empty.";
else desc = desc + " you see nothing.";
--- 43,53 ----
diff -c -r --new-file ds2.0r28/lib/lib/comp/seal.c ds2.1/lib/lib/comp/seal.c
*** ds2.0r28/lib/lib/comp/seal.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/comp/seal.c Tue Jul 11 18:36:23 2006
***************
*** 54,68 ****
void create() {
string *c_save, *l_save, *a_save;
- //AddSave(close::GetSave() + lock::GetSave());
c_save = close::GetSave();
l_save = lock::GetSave();
a_save = c_save + l_save;
AddSave( a_save );
- //tc("c_save: "+identify(c_save));
- //tc("l_save: "+identify(l_save));
- //tc("a_save: "+identify(a_save));
-
}
--- 54,63 ----
diff -c -r --new-file ds2.0r28/lib/lib/currency.c ds2.1/lib/lib/currency.c
*** ds2.0r28/lib/lib/currency.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/currency.c Tue Jul 11 18:36:23 2006
***************
*** 83,98 ****
string curr;
float net_worth = 0.0;
int amt;
- //tc("Currency: "+identify(Currency));
foreach(curr, amt in Currency) {
- //tc("curr: "+identify(curr),"blue");
- //tc("amt: "+identify(amt),"blue");
if(valid_currency(curr))
net_worth += amt * currency_rate(curr);
- //tc("net_worth: "+net_worth,"blue");
}
- //tc("net_worth: "+net_worth);
foreach(string bank, mapping balance in Bank) {
foreach(curr, amt in balance) {
float tmp;
--- 83,93 ----
diff -c -r --new-file ds2.0r28/lib/lib/events/get_from.c ds2.1/lib/lib/events/get_from.c
*** ds2.0r28/lib/lib/events/get_from.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/get_from.c Wed Jul 12 01:56:12 2006
***************
*** 6,39 ****
* Last modified: 96/12/22
*/
// abstract methods
int AddCarriedMass(int amount);
string GetShort();
// end abstract methods
mixed CanGetFrom(object who, object item) {
- //tc("hit CanGetFrom");
- //tc("who: "+identify(who));
- //tc("item: "+identify(item));
- //tc("this_object: "+this_object()->GetName());
if( !item ) {
- //tc("no item. about to return 0");
return 0;
}
if( environment(item) != this_object() ) {
- //tc("this item isnt in my inventory. returning 0");
return 0;
}
- // if( environment(item) != this_object() ) {
- ////tc("stack: "+get_stack());
- //tc("previous: "+identify(previous_object(-1)));
- //
- // return "#You can't do that.";
- // }
- //tc("survicved test");
if( environment(item) != this_object() ) {
- //tc("oddness");
item = present(item->GetKeyName(),this_object());
if(!item) return 0;
}
--- 6,27 ----
* Last modified: 96/12/22
*/
+ #include
+
// abstract methods
int AddCarriedMass(int amount);
string GetShort();
// end abstract methods
mixed CanGetFrom(object who, object item) {
if( !item ) {
return 0;
}
if( environment(item) != this_object() ) {
return 0;
}
if( environment(item) != this_object() ) {
item = present(item->GetKeyName(),this_object());
if(!item) return 0;
}
***************
*** 48,53 ****
--- 36,47 ----
mixed CanPutInto(object who, object item) {
object env;
+ if((inherits(LIB_SIT,item) && sizeof(item->GetSitters())) ||
+ (inherits(LIB_LIE,item) && sizeof(item->GetLiers()))){
+ write("There appears to be someone in your way.");
+ return 0;
+ }
+
if( item == this_object() ) {
return "#You cannot change the laws of physics.";
}
***************
*** 65,71 ****
mixed CanPutOnto(object who, object item) {
object env;
! if(!inherits( "/lib/comp/surface", item ) ){
return "#That isn't a load-bearing surface.";
}
if( item == this_object() ) {
--- 59,71 ----
mixed CanPutOnto(object who, object item) {
object env;
! if((inherits(LIB_SIT,item) && sizeof(item->GetSitters())) ||
! (inherits(LIB_LIE,item) && sizeof(item->GetLiers()))){
! write("There appears to be someone preventing your access.");
! return 0;
! }
!
! if(!inherits( LIB_SURFACE, item ) ){
return "#That isn't a load-bearing surface.";
}
if( item == this_object() ) {
***************
*** 86,100 ****
string msg;
int i, maxi;
! //tc("hit eventGetFrom. item is: " +identify(what),"red");
foreach(object ob in what ) {
if( environment(ob) != this_object() ) {
continue;
}
if( ob->CanGet(who) != 1 ) {
continue;
}
if( !who->CanCarry(ob->GetMass()) ) {
continue;
}
if( !ob->eventMove(who) ) {
--- 86,107 ----
string msg;
int i, maxi;
! if((inherits(LIB_SIT,this_object()) && sizeof(this_object()->GetSitters())) ||
! (inherits(LIB_LIE,this_object()) && sizeof(this_object()->GetLiers()))){
! write("There appears to be someone on there.");
! return 0;
! }
!
foreach(object ob in what ) {
if( environment(ob) != this_object() ) {
continue;
}
if( ob->CanGet(who) != 1 ) {
+ write("It would appear you can't get "+ob->GetShort()+" right now.");
continue;
}
if( !who->CanCarry(ob->GetMass()) ) {
+ write("It seems you can't carry it.");
continue;
}
if( !ob->eventMove(who) ) {
***************
*** 138,143 ****
--- 145,155 ----
}
mixed eventPutOnto(object who, object what) {
+ if((inherits(LIB_SIT,this_object()) && sizeof(this_object()->GetSitters())) ||
+ (inherits(LIB_LIE,this_object()) && sizeof(this_object()->GetLiers()))){
+ write("There appears to be someone in the way of that.");
+ return 0;
+ }
return what->eventPut(who, this_object()," onto ");
}
***************
*** 151,174 ****
}
mixed indirect_get_obj_from_obj(object item, object container) {
- //tc("stack: "+get_stack());
- //tc("item is: " +identify(item));
- //tc("container is: " +identify(container));
- //tc("this object is: "+identify(this_object()));
- //if(item) tc("item's environment is: "+identify(environment(item)));
if(!item){
- //write("That's not there.");
return 0;
}
if(environment(item) != this_object()) return 0;
- // if(!(environment(item) == this_object())){
- // item = present(item->GetKeyName(),this_object());
- //tc("item is now: " +identify(item));
- //return 0;
- // }
- //tc("about to return CanGetFrom");
return CanGetFrom(this_player(), item);
}
--- 163,174 ----
diff -c -r --new-file ds2.0r28/lib/lib/events/lie.c ds2.1/lib/lib/events/lie.c
*** ds2.0r28/lib/lib/events/lie.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/lie.c Sun Jul 9 22:06:37 2006
***************
*** 1,4 ****
--- 1,6 ----
#include
+ #include
+ inherit LIB_SIT;
private int MaxLiers = 1;
private object array Liers = ({});
***************
*** 12,27 ****
}
object array GetLiers() {
! return Liers;
}
mixed eventReceiveLay(object who) {
Liers = ({ Liers..., who });
return 1;
}
mixed eventReleaseStand(object who) {
Liers -= ({ who });
return 1;
}
--- 14,37 ----
}
object array GetLiers() {
! return copy(Liers);
}
mixed eventReceiveLay(object who) {
+ if(who->GetProperty("furniture")){
+ write("You are already using a piece of furniture.");
+ return 1;
+ }
Liers = ({ Liers..., who });
+ who->SetProperty("furniture", " on "+this_object()->GetShort());
+ who->SetProperty("furniture_object", this_object());
return 1;
}
mixed eventReleaseStand(object who) {
Liers -= ({ who });
+ Liers = filter(Liers, (: objectp($1) :) );
+ sit::eventReleaseStand(who);
return 1;
}
***************
*** 39,41 ****
--- 49,65 ----
mixed direct_lie_down_word_obj() {
return direct_lie_word_obj();
}
+
+ int CanGet(object who){
+ object *liers = this_object()->GetLiers(); if(sizeof(liers)){
+ foreach(object wer in liers){ if(!wer || environment(wer) != environment()) this_object()->eventReleaseStand(wer);
+ }
+ if(sizeof(this_object()->GetLiers())){
+ write(this_object()->GetLiers()[0]->GetName()+" is using it right now.");
+ return 0;
+ }
+ else return sit::CanGet(who);
+ }
+ else return sit::CanGet(who);
+ }
+
diff -c -r --new-file ds2.0r28/lib/lib/events/look.c ds2.1/lib/lib/events/look.c
*** ds2.0r28/lib/lib/events/look.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/look.c Sun Jul 9 20:32:28 2006
***************
*** 8,13 ****
--- 8,14 ----
#include
#include
+ #include
private mixed ExternalDesc = 0;
private int Invisible = 0;
***************
*** 173,188 ****
GetShort() + ".",
({ who, this_object() }));
}
- if(inherits(LIB_SURFACE,this_object()) ||
- this_object()->GetOpacity() < 33){
- //tempdesc = this_object()->eventShowInterior(who);
- who->eventPrint(desc);
- this_object()->eventShowInterior(who);
- }
! else {
! who->eventPrint(desc);
}
return 1;
}
--- 174,190 ----
GetShort() + ".",
({ who, this_object() }));
}
! if((!inherits(LIB_SIT,this_object()) && !inherits(LIB_LIE,this_object())) ||
! (!sizeof(this_object()->GetLiers()) && !sizeof(this_object()->GetSitters()))){
! if(inherits(LIB_SURFACE,this_object()) ||
! this_object()->GetOpacity() < 33){
! who->eventPrint(desc);
! this_object()->eventShowInterior(who);
! }
! else who->eventPrint(desc);
}
+ else who->eventPrint(desc);
return 1;
}
***************
*** 204,210 ****
--- 206,226 ----
}
mixed direct_look_at_str_on_obj(string str, object target) {
+ object dingus;
str = remove_article(lower_case(str));
+
+ if((inherits(LIB_SIT,target) && sizeof(target->GetSitters())) ||
+ (inherits(LIB_LIE,target) && sizeof(target->GetLiers()))){
+ write("There appears to be someone blocking your view.");
+ return 0;
+ }
+
+ if((inherits(LIB_SURFACE,target) || living(target)) && dingus = present(str, target)){
+ if(this_player()->GetEffectiveVision() == VISION_CLEAR){
+ return dingus->GetExternalDesc();
+ }
+ else return "#You can't quite make out its details.";
+ }
if( !Items[str] ) {
return "#There is no " + str + " on " + GetShort() + ".";
}
diff -c -r --new-file ds2.0r28/lib/lib/events/put.c ds2.1/lib/lib/events/put.c
*** ds2.0r28/lib/lib/events/put.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/put.c Sun Jul 9 19:04:28 2006
***************
*** 4,9 ****
--- 4,11 ----
* created by Descartes of Borg 960114
*/
+ #include
+
private mixed PreventPut;
// abstract methods
***************
*** 51,68 ****
varargs mixed eventPut(object who, object storage, string prep) {
int depth;
-
if(!prep || prep == "") prep = " into ";
! if(prep == " onto " && !inherits( "/lib/comp/surface", previous_object() ) ) {
who->eventPrint("That isn't a load-bearing surface.");
return 0;
}
! if(prep == " into " && inherits( "/lib/comp/surface", previous_object() ) ) {
who->eventPrint("That's a surface. Try \"put on\"");
return 0;
}
if( !eventMove(storage) ) {
who->eventPrint("There is not enough room in there!");
return 0;
--- 53,76 ----
varargs mixed eventPut(object who, object storage, string prep) {
int depth;
if(!prep || prep == "") prep = " into ";
! if(prep == " onto " && !inherits( LIB_SURFACE, previous_object() ) ) {
who->eventPrint("That isn't a load-bearing surface.");
return 0;
}
! if(prep == " into " && inherits( LIB_SURFACE, previous_object() ) ) {
who->eventPrint("That's a surface. Try \"put on\"");
return 0;
}
+ if((inherits(LIB_SIT,storage) && sizeof(storage->GetSitters())) ||
+ (inherits(LIB_LIE,storage) && sizeof(storage->GetLiers()))){
+ write("There appears to be someone blocking your access.");
+ return 0;
+ }
+
+
if( !eventMove(storage) ) {
who->eventPrint("There is not enough room in there!");
return 0;
diff -c -r --new-file ds2.0r28/lib/lib/events/read.c ds2.1/lib/lib/events/read.c
*** ds2.0r28/lib/lib/events/read.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/read.c Tue Jul 11 18:36:23 2006
***************
*** 96,102 ****
mixed ret;
mixed val = GetRead(str);
- //tc("-1");
if( arrayp(val) ) {
val = val[query_night()];
}
--- 96,101 ----
***************
*** 105,111 ****
if( functionp(val) ) {
if( functionp(val) & FP_OWNER_DESTED ) {
who->eventPrint("There was a problem with the read.");
- //tc("alpha");
return 1;
}
//The funtion being evaluated, GetRead, only takes one arg.
--- 104,109 ----
***************
*** 113,119 ****
ret = evaluate(val, str);
if(!stringp(ret)) return 1;
}
- //tc("bravo");
environment(who)->eventPrint(who->GetName() + " reads " + GetShort() + ".",
who);
if(ret) val = ret;
--- 111,116 ----
***************
*** 121,166 ****
who->eventPrint("There is nothing to read.");
return 1;
}
- //tc("charlie");
tmpfile = generate_tmp();
- //tc("tmpfile: "+tmpfile);
globalwho = who;
globalval = val;
- //tc("delta");
if(Language){
- //tc("echo");
write("The language appears to be "+capitalize(Language)+".");
}
if(!globalval){
- //tc("foxtrot");
write("You can't read that.");
return 0;
}
- //tc("0");
- //unguarded( (: write_file(tmpfile, globalval) :) );
if(Language && (this_player()->GetLanguageLevel(Language) < 100 &&
!(this_player()->GetPolyglot()))){
- //tc("1");
if(sizeof(globalval) > 4800){
- //tc("2");
globalval = "It is too long and you are too unfamiliar with the language to make sense of it.";
}
else {
- //tc("3");
globalval = translate(val, this_player()->GetLanguageLevel(Language));
}
- //tc("4");
}
else {
- //tc("6");
globalval = val;
}
- //tc("val: "+val);
- //tc("globalval: "+globalval);
unguarded( (: write_file(tmpfile, globalval,1) :) );
unguarded( (: globalwho->eventPage(tmpfile) :) );
--- 118,149 ----
diff -c -r --new-file ds2.0r28/lib/lib/events/sit.c ds2.1/lib/lib/events/sit.c
*** ds2.0r28/lib/lib/events/sit.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/events/sit.c Sun Jul 9 22:06:37 2006
***************
*** 20,35 ****
}
object array GetSitters() {
! return Sitters;
}
mixed eventReceiveSit(object who) {
Sitters = ({ Sitters..., who });
return 1;
}
mixed eventReleaseStand(object who) {
Sitters -= ({ who });
return 1;
}
--- 20,44 ----
}
object array GetSitters() {
! return copy(Sitters);
}
mixed eventReceiveSit(object who) {
+ if(who->GetProperty("furniture")){
+ write("You are already using a piece of furniture.");
+ return 1;
+ }
Sitters = ({ Sitters..., who });
+ who->SetProperty("furniture", " on "+this_object()->GetShort());
+ who->SetProperty("furniture_object", this_object());
return 1;
}
mixed eventReleaseStand(object who) {
Sitters -= ({ who });
+ Sitters = filter(Sitters, (: objectp($1) :) );
+ if(who) who->RemoveProperty("furniture");
+ if(who) who->RemoveProperty("furniture_object");
return 1;
}
***************
*** 47,49 ****
--- 56,73 ----
mixed direct_sit_down_word_obj() {
return direct_sit_word_obj();
}
+
+ int CanGet(object who){
+ object *sitters = this_object()->GetSitters();
+ if(sizeof(sitters)){
+ foreach(object wer in sitters){
+ if(!wer || environment(wer) != environment()) this_object()->eventReleaseStand(wer);
+ } if(sizeof(this_object()->GetSitters())){
+ write(this_object()->GetSitters()[0]->GetName()+" is using it right now.");
+ return 0;
+ }
+ else return 1;
+ }
+ else return 1;
+ }
+
diff -c -r --new-file ds2.0r28/lib/lib/exits.c ds2.1/lib/lib/exits.c
*** ds2.0r28/lib/lib/exits.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/exits.c Fri Jul 7 19:41:42 2006
***************
*** 82,87 ****
--- 82,91 ----
if( ob ) {
ob->SetDoor(file);
}
+
+ if(!file_exists(file) && !file_exists(file+".c")){
+ return "Door not found.";
+ }
file->eventRegisterSide(dir);
return (Doors[dir] = file);
}
diff -c -r --new-file ds2.0r28/lib/lib/fishing.c ds2.1/lib/lib/fishing.c
*** ds2.0r28/lib/lib/fishing.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/fishing.c Tue Jul 11 18:36:23 2006
***************
*** 146,154 ****
return;
}
if( !((int)pole->eventCatch(who, fish)) ) return;
- //food = new((string)fish->GetFood());
food=new(fish);
- //tc("new fish: "+identify(food),"yellow");
RemoveFishing(who);
who->AddSkillPoints("fishing", (int)fish->GetFight()+(int)fish->GetMass());
message("my_action", "You find " + (string)fish->GetShort() + " on " +
--- 146,152 ----
***************
*** 157,171 ****
(string)fish->GetShort() + " on " + (string)pole->GetShort() +
"!", this_object(), ({ who }));
if( !((int)food->eventMove(who)) ) {
- //tc("fish failed to move onto fisherman "+identify(who));
message("my_action", "You drop " + (string)food->GetShort() + "!",
who);
message("other_action", (string)who->GetName() + " drops " +
(string)food->GetShort() + "!", this_object(), ({ who }) );
food->eventMove(this_object());
}
- //tc("We weem to think all is well. The environment of "+identify(food)+" is "+
- //identify(environment(food)));
}
mixed eventStop(object who, string str) {
--- 155,166 ----
diff -c -r --new-file ds2.0r28/lib/lib/genetics.c ds2.1/lib/lib/genetics.c
*** ds2.0r28/lib/lib/genetics.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/genetics.c Tue Jul 11 18:36:23 2006
***************
*** 99,112 ****
varargs void AddStat(string stat, int base, int cls) {
int level;
- //tc("stat: "+stat+", base: "+base+", cls: "+cls,"red");
if( userp(this_object()) ) level = 1;
else level = GetLevel();
if( !stat || cls < 1 || cls > 5 ) return;
base += ((5 - cls) * random(10)) + (3 * (level + 1))/(cls * 4);
if( userp(this_object()) && base > 90 ) base = 90;
else if( base > 100 ) base = 100;
- //tc("stat: "+stat+", base: "+base+", cls: "+cls,"green");
SetStat(stat, base, cls);
}
--- 99,110 ----
***************
*** 239,285 ****
int bonus = GetVisionBonus();
int a, y, x = 0;
- //if(raw_score) tc("raw_score: "+identify(raw_score),"yellow");
- //if(location) tc("location: "+identify(location),"yellow");
-
if(raw_score && !intp(raw_score)){
- //tc("raw_score: "+identify(raw_score));
location = raw_score;
raw_score = 0;
- //tc("location: "+identify(location));
- //tc("raw_score: "+raw_score);
}
- //tc("stack2: "+get_stack(),"green");
- //if(!location) tc("NOLOC","blue");
if(location){
if(objectp(location)) env = location;
- //if(env) tc("env: "+identify(env));
if(stringp(location)){
if(!file_exists(location)) location += ".c";
if(!file_exists(location)) return 0;
env = load_object(location);
- //if(env) tc("env: "+identify(env));
if(!env) return 0;
}
}
- //if(env) tc("env: "+identify(env));
if( Blind && !raw_score) {
return VISION_BLIND;
}
if( !location ) env = environment();
- //if(env) tc("env: "+identify(env));
x = GetRadiantLight(0);
a = env->GetAmbientLight();
- //tc("x: "+x,"red");
- //tc("a: "+a);
if(x) x = x/2;
x += GetRadiantLight(a) + a;
- //tc("x: "+x,"green");
- //if(env) tc("env: "+identify(env));
l = GetLightSensitivity();
- //tc("l: "+identify(l));
l[0] -= bonus;
l[1] += bonus;
--- 237,266 ----
***************
*** 288,300 ****
}
if( x >= l[0] && x <= l[1] ) return VISION_CLEAR;
y = l[0]/3;
- //tc("y: "+y,"cyan");
- //tc("x: "+x,"blue");
if( x < y ) return VISION_TOO_DARK;
if( x < (2*y) ) return VISION_DARK;
if( x < l[0] ) return VISION_DIM;
y = l[1]/3;
- //tc("y: "+y,"yellow");
if( x < (l[1] + y) ) return VISION_LIGHT;
if( x < (l[1] + (2*y)) ) return VISION_BRIGHT;
return VISION_TOO_BRIGHT;
--- 269,278 ----
diff -c -r --new-file ds2.0r28/lib/lib/interactive.c ds2.1/lib/lib/interactive.c
*** ds2.0r28/lib/lib/interactive.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/interactive.c Sat Jul 8 23:30:58 2006
***************
*** 31,36 ****
--- 31,37 ----
private int Age, WhereBlock, Brief, LoginTime, BirthTime, RescueBit;
private string Password, Email, RealName, Rank, LoginSite, HostSite, WebPage;
+ private string globaltmp;
private mapping News;
private class marriage *Marriages;
private static int LastAge, Setup;
***************
*** 263,269 ****
lying[s]++;
}
}
- //tc(identify(shorts));
for(i=0, desc = 0, maxi = sizeof(shorts = keys(lying)); i 1 || val >1 )
desc += " are here.%^RESET%^\n";
***************
*** 299,304 ****
--- 301,307 ----
i = GetEffectiveVision();
if( i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM ) {
mapping lying = ([]), sitting = ([]), standing = ([]), flying = ([]);
+ mapping furniture = ([]);
object *obs;
string key;
int val;
***************
*** 313,320 ****
foreach(object liv in obs) {
string s = (string)liv->GetHealthShort();
int pos = (int)liv->GetPosition();
-
if( !s ) continue;
if( pos == POSITION_STANDING) standing[s]++;
else if( pos == POSITION_LYING || (int)liv->isFreshCorpse() )
lying[s]++;
--- 316,330 ----
foreach(object liv in obs) {
string s = (string)liv->GetHealthShort();
int pos = (int)liv->GetPosition();
if( !s ) continue;
+ if(liv->GetProperty("furniture")) {
+ s += "BEGIN"+random(999999)+"END";
+ }
+ if(liv->GetProperty("furniture")){
+ furniture[s] = liv->GetProperty("furniture");
+ }
+ else if(!furniture[s]) furniture[s] = 0;
+
if( pos == POSITION_STANDING) standing[s]++;
else if( pos == POSITION_LYING || (int)liv->isFreshCorpse() )
lying[s]++;
***************
*** 330,348 ****
}
desc = "";
foreach(key, val in lying) {
! if( val<2 ) desc += capitalize(key) + "%^RESET%^ is lying down.";
! else desc += capitalize(consolidate(val, key)) +
"%^RESET%^ are lying down.";
desc += "\n";
}
foreach(key, val in sitting) {
! if( val<2 )
! desc += capitalize(key) + "%^RESET%^ is sitting down.";
! else desc += capitalize(consolidate(val, key)) +
"%^RESET%^ are sitting down.";
desc += "\n";
}
foreach(key, val in standing) {
if( val<2 )
desc += capitalize(key) + "%^RESET%^ is standing here.";
else desc += capitalize(consolidate(val, key)) +
--- 340,407 ----
}
desc = "";
foreach(key, val in lying) {
! globaltmp = key;
! if(grepp(key,"BEGIN")) {
! sscanf(key,"%sBEGIN%*s",key);
! }
!
! if(lying[globaltmp]>1 && !furniture[globaltmp]){
! desc += capitalize(consolidate(val, globaltmp)) +
"%^RESET%^ are lying down.";
+ }
+ else if(lying[globaltmp]<2 && !furniture[globaltmp]){
+ desc += capitalize(key) + "%^RESET%^ is lying down.";
+ }
+ else if(furniture[globaltmp]) {
+ desc += capitalize(key) + "%^RESET%^ is lying down"+
+ ((furniture[globaltmp]) ? furniture[globaltmp] : "") +".";
+ }
+ else if(furniture[key]) {
+ desc += capitalize(key) + "%^RESET%^ is lying down"+
+ ((furniture[key]) ? furniture[key] : "") +".";
+ }
+
+
+ else {
+ desc += "wtf. i am "+key+", furniture["+globaltmp+"] is: "+furniture[globaltmp]+"\n"+
+ " furniture["+key+"] is: "+furniture[key]+", and val is: "+val;
+ }
+
desc += "\n";
}
foreach(key, val in sitting) {
! globaltmp = key;
! if(grepp(key,"BEGIN")) {
! sscanf(key,"%sBEGIN%*s",key);
! }
!
! if(sitting[globaltmp]>1 && !furniture[globaltmp]){
! desc += capitalize(consolidate(val, globaltmp)) +
"%^RESET%^ are sitting down.";
+ }
+ else if(sitting[globaltmp]<2 && !furniture[globaltmp]){
+ desc += capitalize(key) + "%^RESET%^ is sitting down.";
+ }
+ else if(furniture[globaltmp]) {
+ desc += capitalize(key) + "%^RESET%^ is sitting down"+
+ ((furniture[globaltmp]) ? furniture[globaltmp] : "") +".";
+ }
+ else if(furniture[key]) {
+ desc += capitalize(key) + "%^RESET%^ is sitting down"+
+ ((furniture[key]) ? furniture[key] : "") +".";
+ }
+
+
+ else {
+ desc += "wtf. i am "+key+", furniture["+globaltmp+"] is: "+furniture[globaltmp]+"\n"+
+ " furniture["+key+"] is: "+furniture[key]+", and val is: "+val;
+ }
desc += "\n";
}
foreach(key, val in standing) {
+ if(grepp(key,"BEGIN")) {
+ sscanf(key,"%sBEGIN%*s",key);
+ }
if( val<2 )
desc += capitalize(key) + "%^RESET%^ is standing here.";
else desc += capitalize(consolidate(val, key)) +
diff -c -r --new-file ds2.0r28/lib/lib/language.c ds2.1/lib/lib/language.c
*** ds2.0r28/lib/lib/language.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/language.c Tue Jul 11 18:36:23 2006
***************
*** 87,95 ****
key = convert_name(lang);
if( !Languages[key] ) SetLanguage(key, 0, 0);
- //tc("thing1: "+identify(Languages[key]["points"]));
Languages[key]["points"] += points;
- //tc("thing2: "+identify(Languages[key]["points"]));
Languages[key]["level"] = Languages[key]["points"];
if(Languages[key]["level"] > 100) Languages[key]["level"] = 100;
return Languages[key]["points"];
--- 87,93 ----
diff -c -r --new-file ds2.0r28/lib/lib/living.c ds2.1/lib/lib/living.c
*** ds2.0r28/lib/lib/living.c Wed Jul 5 19:58:19 2006
--- ds2.1/lib/lib/living.c Tue Jul 11 18:36:23 2006
***************
*** 46,59 ****
}
mixed direct_attack_liv() {
- //tc("got this far.");
- //tc("this_player(): "+identify(this_player()));
- //tc("this_object(): "+identify(this_object()));
if(PLAYER_KILL) return 1;
if( userp(this_player()) && userp(this_object()) ) {
- //tc("further still","green");
if( !(int)environment(this_player())->CanAttack(this_object()) ) {
- //tc("Well well well.","blue");
return "No player killing!";
}
if(this_player()->GetPK() && this_object()->GetPK()){
--- 46,54 ----
***************
*** 613,618 ****
--- 608,617 ----
return (carry::GetCarriedMass());
}
+ varargs int GetMaxHealthPoints(string limb){
+ return combat::GetMaxHealthPoints(limb);
+ }
+
int GetMaxCarry() { return combat::GetMaxCarry(); }
int SetPK(int x) { return (isPK = x); }
diff -c -r --new-file ds2.0r28/lib/lib/meal.c ds2.1/lib/lib/meal.c
*** ds2.0r28/lib/lib/meal.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/meal.c Sun Jul 9 19:04:29 2006
***************
*** 60,65 ****
--- 60,66 ----
mixed eventDrink(object who) {
mixed tmp;
int x;
+ object ob;
if( (tmp = (mixed)who->eventDrink(this_object())) != 1 ) return tmp;
if( (x = functionp(MyMessage)) && !(x & FP_OWNER_DESTED) ) {
***************
*** 75,100 ****
who->eventPrint( capitalize(mymsg) );
environment(who)->eventPrint( capitalize(othermsg), who );
}
- if( GetEmptyItem() ) {
- object ob;
! ob = new(GetEmptyItem() || LIB_ITEM);
! if( base_name(ob) == LIB_ITEM ) {
! ob->SetKeyName(GetEmptyName());
! ob->SetId( ({ GetEmptyName(), "container", "empty container" }) );
! ob->SetShort(GetEmptyShort());
! ob->SetLong(GetEmptyLong());
! ob->SetValue(10);
! ob->SetMass(100);
! ob->SetDestroyOnSell();
! }
! if( !((int)ob->eventMove(who)) ) {
! who->eventPrint("You drop " + (string)ob->GetShort() + ".");
! environment(who)->eventPrint((string)who->GetName() +
! " drops " + (string)ob->GetShort() + ".", who);
! ob->eventMove(environment(who));
! }
}
if( x = GetPoison() ) {
if( random((int)who->GetStatLevel("luck")) > 35 )
who->eventPrint("That didn't seem to taste quite right.");
--- 76,99 ----
who->eventPrint( capitalize(mymsg) );
environment(who)->eventPrint( capitalize(othermsg), who );
}
! ob = new(GetEmptyItem() || LIB_ITEM);
! if( base_name(ob) == LIB_ITEM ) {
! ob->SetKeyName(GetEmptyName());
! ob->SetId( ({ GetEmptyName(), "container", "empty container" }) );
! ob->SetShort(GetEmptyShort());
! ob->SetLong(GetEmptyLong());
! ob->SetBaseCost(1);
! ob->SetMass(10);
! ob->SetDestroyOnSell();
! }
! if( !((int)ob->eventMove(who)) ) {
! who->eventPrint("You drop " + (string)ob->GetShort() + ".");
! environment(who)->eventPrint((string)who->GetName() +
! " drops " + (string)ob->GetShort() + ".", who);
! ob->eventMove(environment(who));
}
+
if( x = GetPoison() ) {
if( random((int)who->GetStatLevel("luck")) > 35 )
who->eventPrint("That didn't seem to taste quite right.");
diff -c -r --new-file ds2.0r28/lib/lib/messages.c ds2.1/lib/lib/messages.c
*** ds2.0r28/lib/lib/messages.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/messages.c Tue Jul 11 18:36:24 2006
***************
*** 22,28 ****
switch(msg) {
case "come": case "leave": case "telin": case "telout": case "home":
case "say": case "ask": case "exclaim": case "login": case "logout":
! case "dest": case "clone":
return (Messages[msg] = str);
default: return 0;
}
--- 22,28 ----
switch(msg) {
case "come": case "leave": case "telin": case "telout": case "home":
case "say": case "ask": case "exclaim": case "login": case "logout":
! case "dest": case "clone": case "vis" : case "invis" :
return (Messages[msg] = str);
default: return 0;
}
diff -c -r --new-file ds2.0r28/lib/lib/npc.c ds2.1/lib/lib/npc.c
*** ds2.0r28/lib/lib/npc.c Wed Jul 5 19:58:20 2006
--- ds2.1/lib/lib/npc.c Tue Jul 11 18:36:24 2006
***************
*** 25,30 ****
--- 25,31 ----
inherit LIB_SAVE;
private int CustomXP, ActionChance, CombatActionChance, AutoStand, Mount;
+ private int MaximumHealth = 0;
private mixed Encounter;
private string *EnemyNames;
private static int Level, Unique;
***************
*** 606,613 ****
return GetHealthPoints();
}
int SetMaxHealthPoints(int x) {
! SetStat("durability", to_int((x-50)/10), GetStatClass("durability"));
return GetMaxHealthPoints();
}
--- 607,620 ----
return GetHealthPoints();
}
+ varargs int GetMaxHealthPoints(string limb){
+ if(MaximumHealth) return MaximumHealth;
+ else return living::GetMaxHealthPoints(limb);
+ }
+
int SetMaxHealthPoints(int x) {
! if(x) MaximumHealth = x;
! else SetStat("durability", to_int((x-50)/10), GetStatClass("durability"));
return GetMaxHealthPoints();
}
***************
*** 636,643 ****
}
varargs void SetCurrency(mixed val, int amount) {
- //tc("val: "+identify(val),"red");
- //if(amount) tc("amount: "+identify(amount),"red");
if( stringp(val) ) AddCurrency(val, amount);
else if( mapp(val) ) {
string *currs;
--- 643,648 ----
diff -c -r --new-file ds2.0r28/lib/lib/persist.c ds2.1/lib/lib/persist.c
*** ds2.0r28/lib/lib/persist.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/persist.c Tue Jul 11 18:36:24 2006
***************
*** 15,21 ****
string *flat = ({});
mixed *tmp;
- //tc("Hit eventConvertObject","red");
if( val[0] != base_name(this_object()) ) error("Invalid save string.\n");
tmp = map(Saved, (: functionp($1) ? evaluate($1, "loading") : $1 :));
foreach(mixed elem in tmp) {
--- 15,20 ----
diff -c -r --new-file ds2.0r28/lib/lib/pile.c ds2.1/lib/lib/pile.c
*** ds2.0r28/lib/lib/pile.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/pile.c Wed Jul 12 01:56:12 2006
***************
*** 10,21 ****
inherit LIB_ITEM;
! private string PileType = 0;
! private int PileAmount = 0;
static void create() {
string *saveds;
item::create();
saveds = item::GetSave();
saveds += ({ "PileType", "PileAmount" });
AddSave( saveds );
--- 10,22 ----
inherit LIB_ITEM;
! string PileType = 0;
! int PileAmount = 0;
static void create() {
string *saveds;
item::create();
+ SetNoCondition(1);
saveds = item::GetSave();
saveds += ({ "PileType", "PileAmount" });
AddSave( saveds );
***************
*** 27,42 ****
id = item::GetId();
if( PileType ) {
! id += ({ PileType, PileAmount + " " + PileType });
}
! return ({ id..., "money", "pile" });
! }
!
! varargs string GetLong(string str) {
! if( !PileAmount ) {
! return 0;
! }
! return "It is a pile of " + PileAmount + " " + PileType + ".";
}
int GetMass() {
--- 28,36 ----
id = item::GetId();
if( PileType ) {
! id += ({ PileType, PileAmount + " " + PileType, "pile of "+PileType });
}
! return ({ id..., "money", "pile", "pile of "+ PileAmount + " " + PileType });
}
int GetMass() {
***************
*** 46,51 ****
--- 40,50 ----
void SetPile(string str, int amt) {
PileType = str;
PileAmount = amt;
+ if(!PileAmount || PileAmount < 1 ){
+ SetLong("a pile of money");
+ call_out( (: eventDestruct :), 1);
+ }
+ else SetLong("It is a pile of " + PileAmount + " " + PileType + ".");
parse_refresh();
}
***************
*** 56,61 ****
--- 55,64 ----
string GetShort() {
string str = item::GetShort();
+ if(!PileAmount || PileAmount < 1 ){
+ call_out( (: eventDestruct :), 1);
+ return "a pile of money";
+ }
if( str ) {
return str;
}
***************
*** 70,76 ****
return 1;
}
send_messages("get", "$agent_name $agent_verb " + amount + " " +
! curr + " " + GetShort() + ".", who, 0, environment(who));
PileAmount -= amount;
if( PileAmount < 1 ) {
call_out((: Destruct :), 0);
--- 73,79 ----
return 1;
}
send_messages("get", "$agent_name $agent_verb " + amount + " " +
! curr + " from " + GetShort() + ".", who, 0, environment(who));
PileAmount -= amount;
if( PileAmount < 1 ) {
call_out((: Destruct :), 0);
***************
*** 84,98 ****
int x;
x = item::eventMove(dest);
! if( !living(environment()) ) {
return x;
}
- environment()->AddCurrency(PileType, PileAmount);
- environment()->AddCarriedMass(-this_object()->GetMass());
- SetShort("a pile of " + PileAmount + " " + PileType);
- PileAmount = 0;
- call_out((: Destruct :), 0);
- return x;
}
mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) {
--- 87,104 ----
int x;
x = item::eventMove(dest);
! if( environment() && !living(environment()) ) {
! return x;
! }
!
! if(environment() && living(environment())){
! environment()->AddCurrency(PileType, PileAmount);
! environment()->AddCarriedMass(-this_object()->GetMass());
! SetShort("a pile of " + PileAmount + " " + PileType);
! PileAmount = 0;
! call_out((: Destruct :), 0);
return x;
}
}
mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) {
***************
*** 122,124 ****
--- 128,138 ----
mixed direct_get_wrd_wrd_from_obj(string amt, string curr) {
return direct_get_wrd_wrd_out_of_obj(amt, curr);
}
+
+ void init(){
+ ::init();
+ if(!PileAmount || PileAmount < 1 ){
+ SetLong("some money");
+ call_out( (: eventDestruct :), 1);
+ }
+ }
diff -c -r --new-file ds2.0r28/lib/lib/player.c ds2.1/lib/lib/player.c
*** ds2.0r28/lib/lib/player.c Wed Jul 5 19:58:20 2006
--- ds2.1/lib/lib/player.c Tue Jul 11 18:36:24 2006
***************
*** 765,771 ****
}
varargs mixed GetEffectiveVision(int raw_score, mixed location) {
- //tc("stack1: "+get_stack(),"cyan");
if( newbiep(this_object()) ) return VISION_CLEAR;
else if(raw_score && location) return living::GetEffectiveVision(raw_score,location);
else if(raw_score) return living::GetEffectiveVision(raw_score);
--- 765,770 ----
diff -c -r --new-file ds2.0r28/lib/lib/props/clean.c ds2.1/lib/lib/props/clean.c
*** ds2.0r28/lib/lib/props/clean.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/props/clean.c Sat Jul 8 23:30:59 2006
***************
*** 29,35 ****
* another object, call ob->eventDestruct().
*/
static int Destruct() {
! object env;
if( !this_object() ) {
return 1;
--- 29,35 ----
* another object, call ob->eventDestruct().
*/
static int Destruct() {
! object env, furn;
if( !this_object() ) {
return 1;
***************
*** 42,47 ****
--- 42,51 ----
}
}
}
+
+ if(living(this_object()) && furn = this_object()->GetProperty("furniture_object"))
+ if(objectp(furn)) furn->eventReleaseStand(this_object());
+
remove_call_out();
destruct(this_object());
return !(this_object());
diff -c -r --new-file ds2.0r28/lib/lib/props/equip.c ds2.1/lib/lib/props/equip.c
*** ds2.0r28/lib/lib/props/equip.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/props/equip.c Tue Jul 11 18:36:24 2006
***************
*** 37,43 ****
}
static string array SetWorn(string array limbs) {
- //tc("limbs: "+identify(limbs),"cyan");
return (Worn = limbs);
}
--- 37,42 ----
***************
*** 58,65 ****
mixed eventEquip(object who, string array limbs) {
mixed tmp = who->eventWear(this_object(), limbs);
- //tc("limbs: "+identify(limbs));
-
if( tmp != 1 ) {
return tmp;
}
--- 57,62 ----
diff -c -r --new-file ds2.0r28/lib/lib/props/move.c ds2.1/lib/lib/props/move.c
*** ds2.0r28/lib/lib/props/move.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/props/move.c Tue Jul 11 18:36:25 2006
***************
*** 9,15 ****
}
int eventMove(mixed dest) {
! object ob,to;
int depth;
to=this_object();
--- 9,15 ----
}
int eventMove(mixed dest) {
! object ob,to,furn;
int depth;
to=this_object();
***************
*** 20,33 ****
int x;
x = (int)environment()->CanRelease(this_object());
- ////tc("verb: "+query_verb(),"blue");
- //tc("prev obs: "+identify(previous_object(-1)));
- //tc("stack: "+get_stack(),"blue");
- //tc("this_object: "+identify(this_object()));
- //tc("env this_object: "+identify(environment(this_object())),"blue");
- //tc("env "+identify(environment()),"blue");
- //if(dest) tc("dest: "+identify(dest));
- //tc("x: "+x,"blue");
if( !x && !archp() ) {
return 0;
}
--- 20,25 ----
***************
*** 77,81 ****
--- 69,77 ----
}
}
}
+
+ if(living(this_object()) && furn = this_object()->GetProperty("furniture_object"))
+ if(objectp(furn)) furn->eventReleaseStand(this_object());
+
return (LastEnvironment != environment());
}
diff -c -r --new-file ds2.0r28/lib/lib/race.c ds2.1/lib/lib/race.c
*** ds2.0r28/lib/lib/race.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/race.c Tue Jul 11 18:36:25 2006
***************
*** 89,96 ****
RACES_D->SetCharacterRace(race, args);
- //tc("meep: "+identify(args[4]));
-
if(sizeof(args[4])){
foreach(mixed key, mixed val in args[4]){
this_object()->AddSkill(key,atoi(val[1]));
--- 89,94 ----
***************
*** 103,109 ****
}
foreach(tmp in args[1]) {
mixt = copy(args[1]);
- //tc("mixt: "+identify(mixt),"blue");
AddStat(tmp...);
}
if( stringp(args[2]) ) {
--- 101,106 ----
diff -c -r --new-file ds2.0r28/lib/lib/sentient.c ds2.1/lib/lib/sentient.c
*** ds2.0r28/lib/lib/sentient.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/sentient.c Tue Jul 11 18:36:25 2006
***************
*** 265,277 ****
mixed eventWander() {
int fp;
- //tc("1","red");
-
if( !sizeof(WanderPath) ) {
string *sorties;
string tmp;
- //tc("2","green");
sorties = ({});
foreach(tmp in (string *)environment()->GetExits()) {
string dest, door;
--- 265,274 ----
***************
*** 332,347 ****
return;
}
if( !GetInCombat() ) { // Things to do when not in combat
- //tc("not in combat");
if( WanderSpeed ) { // Check if wandering
- //tc("wandering");
if( WanderCount >= WanderSpeed ) { // Time to wander
- //tc("time to wander");
WanderCount = 0;
eventWander();
}
else {
- //tc("not time to wander yet");
WanderCount++;
}
}
--- 329,340 ----
diff -c -r --new-file ds2.0r28/lib/lib/spell.c ds2.1/lib/lib/spell.c
*** ds2.0r28/lib/lib/spell.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/spell.c Tue Jul 11 18:36:25 2006
***************
*** 72,78 ****
tmp = tmp/this_player()->GetSkill("magic attack")["class"];
}
damage += tmp;
- //tc("spell damage: "+identify(damage));
return damage;
}
--- 72,77 ----
***************
*** 668,676 ****
continue;
}
damage = (GetDamage() * level)/100;
- //damage = GetDamage();
if(!limb) limb = "torso";
- //tc("limb: "+identify(limb));
if(grepp(identify(limb),"leg") || grepp(identify(limb),"foot")) limb = "torso";
damage = target->eventReceiveDamage(who, GetDamageType(), damage,
AutoDamage, limb);
--- 667,673 ----
diff -c -r --new-file ds2.0r28/lib/lib/stargate.c ds2.1/lib/lib/stargate.c
*** ds2.0r28/lib/lib/stargate.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/stargate.c Tue Jul 11 18:36:25 2006
***************
*** 98,105 ****
int ret;
destination = lower_case(destination);
- //tc("origin: "+origin,"white");
- //tc("destination: "+destination,"white");
if (origin == destination){
write("You attempt to dial the gate, but the last chevron does not engage");
--- 98,103 ----
***************
*** 127,153 ****
string endpoint = STARGATE_D->GetEndpoint(origin);
string e = STARGATE_D->GetDestination(origin);
string d = STARGATE_D->GetDestination(endpoint);
- //object e = load_object(STARGATE_D->GetEndpoint(origin));
- //object d;
- //if(e) d = load_object(STARGATE_D->GetDestination(STARGATE_D->GetEndpoint(origin)));
-
- //debug(sprintf("stargate_lib->eventDisconnect(%s), e=%s, d=%s", origin, e, d));
-
- // FIX: does the player Get a message if they come through the gate and then leave the room?
- //write("The chevrons on the stargate disengage and the portal disappears.");
- //say("The chevrons on the stargate disengage and the portal disappears.");
- //tell_room(d, "The chevrons on the stargate disengage and the portal disappears", ({ this_player() }));
if(d) tell_room(d, "The chevrons on the stargate disengage and the portal disappears.");
if(e) tell_room(e, "The chevrons on the stargate disengage and the portal disappears.");
- //tc("origin: "+identify(origin));
-
return STARGATE_D->eventDisconnect(origin);
}
string status(){
- //tc("origin: "+origin);
- //tc("staus: "+STARGATE_D->GetStatus(origin));
return STARGATE_D->GetStatus(origin);
}
--- 125,137 ----
***************
*** 156,173 ****
string flipside;
if (s)
{
- //tc("s: "+s);
if(STARGATE_D->GetDestination(s))
flipside = STARGATE_D->GetDestination(s);
- //tc("flipside: "+flipside);
eventConnect(s);
- //if(sizeof(flipside)) ob = find_object(flipside);
if(sizeof(flipside) && !ob) ob = load_object(flipside);
if(!ob){
write("The Stargate abruptly begins to shuts down.");
eventDisconnect();
}
- //else if(!present("stargate",find_object(flipside))) tc("wtf");
return 1;
}
--- 140,153 ----
***************
*** 243,249 ****
string displayShort(){
string stat;
stat = status();
- //tc("status: "+stat);
switch (stat)
{
case "inbound":
--- 223,228 ----
diff -c -r --new-file ds2.0r28/lib/lib/std/barkeep.c ds2.1/lib/lib/std/barkeep.c
*** ds2.0r28/lib/lib/std/barkeep.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/barkeep.c Tue Jul 11 18:36:25 2006
***************
*** 69,83 ****
mapping SetMenuItems(mapping mp) {
mapping mp2 = ([]);
- //tc("mp: "+identify(mp));
foreach(mixed key, mixed val in mp){
string *key2;
if(stringp(key)) key2 = ({ key });
else key2 = key;
mp2[key2] = val;
}
- //tc("mp2: "+identify(mp2));
- //tc("copy(mp2): "+identify(copy(mp2)));
return (MenuItems = copy(mp2));
}
--- 69,80 ----
***************
*** 130,136 ****
foreach(string *key, string val in MenuItems){
if(member_array(args,key) != -1) what = key;
}
- //tc("what: "+identify(what));
if( !(ob = load_object(MenuItems[what])) ) {
eventForce("speak I am having a problem with that item right now.");
return 1;
--- 127,132 ----
diff -c -r --new-file ds2.0r28/lib/lib/std/bed.c ds2.1/lib/lib/std/bed.c
*** ds2.0r28/lib/lib/std/bed.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/bed.c Sun Jul 9 22:06:37 2006
***************
*** 1,17 ****
#include
inherit LIB_ITEM;
- inherit LIB_SIT;
inherit LIB_LIE;
inherit LIB_SURFACE;
void create(){
! ::create();
! SetMaxSitters(4);
SetMaxLiers(2);
SetMaxCarry(300);
SetMass(1700);
}
--- 1,23 ----
#include
inherit LIB_ITEM;
inherit LIB_LIE;
inherit LIB_SURFACE;
void create(){
! item::create();
! surface::create();
!
! SetMaxLiers(4);
SetMaxLiers(2);
SetMaxCarry(300);
SetMass(1700);
}
+ int CanGet(object who){
+ if(lie::CanGet(who))
+ return item::CanGet(who);
+ else return 0;
+ }
diff -c -r --new-file ds2.0r28/lib/lib/std/chair.c ds2.1/lib/lib/std/chair.c
*** ds2.0r28/lib/lib/std/chair.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/chair.c Sun Jul 9 22:06:37 2006
***************
*** 19,22 ****
--- 19,28 ----
SetMass(500);
}
+ int CanGet(object who){
+ if(sit::CanGet(who))
+ return item::CanGet(who);
+ else return 0;
+ }
+
/* Nothing else needs to happen here */
diff -c -r --new-file ds2.0r28/lib/lib/std/corpse.c ds2.1/lib/lib/std/corpse.c
*** ds2.0r28/lib/lib/std/corpse.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/corpse.c Fri Jul 7 19:41:43 2006
***************
*** 74,80 ****
Race = who->GetRace();
Count = 1;
Fresh = 1;
! SetShort((string)who->GetShort());
SetLong("As you look closely at " + who->GetCapName() +
", you notice that " + nominative(who) +
" does not appear to be moving.");
--- 74,80 ----
Race = who->GetRace();
Count = 1;
Fresh = 1;
! SetShort("the corpse of "+(string)who->GetShort());
SetLong("As you look closely at " + who->GetCapName() +
", you notice that " + nominative(who) +
" does not appear to be moving.");
diff -c -r --new-file ds2.0r28/lib/lib/std/dummy.c ds2.1/lib/lib/std/dummy.c
*** ds2.0r28/lib/lib/std/dummy.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/dummy.c Tue Jul 11 18:36:25 2006
***************
*** 79,90 ****
move_object(ob);
if( environment() != ob ) {
str += "\nThe move was not successful";
- //tc(str,"red");
return 0;
}
else {
str += "\nThe move was successful.";
- //tc(str,"red");
return 1;
}
}
--- 79,88 ----
***************
*** 98,104 ****
if(environment()) str += "\nMy current environment is "+file_name(environment())+".";
else str += "\nI currently have no environment.";
str += "\nCall stack: "+get_stack();
- //tc(str,"blue");
enter::create();
parse_init();
--- 96,101 ----
diff -c -r --new-file ds2.0r28/lib/lib/std/item.c ds2.1/lib/lib/std/item.c
*** ds2.0r28/lib/lib/std/item.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/item.c Tue Jul 11 18:36:25 2006
***************
*** 188,201 ****
".", ({ who, target }) );
skill = (who->GetSkillLevel("projectile attack") +
who->GetStatLevel("coordination"));
- //tc("skill: "+skill);
skill -= (target->GetSkillLevel("projectile defense") +
target->GetStatLevel("agility"))/2;
- //tc("skill: "+skill);
if( GetWeaponType() != "projectile" ) {
skill = skill/2;
}
- //tc("skill: "+skill);
if( skill > random(100) + 1 ) {
who->AddSkillPoints("projectile attack",
target->GetSkillLevel("projectile defense") *
--- 188,198 ----
***************
*** 272,285 ****
}
varargs mixed direct_get_obj_from_obj(object item, mixed gamma,mixed alfa, mixed beta, mixed epsilon){
- //tc("stack: "+get_stack(),"yellow");
- //tc("i am: "+this_object()->GetName(),"yellow");
- //tc("item: "+identify(item),"yellow");
- //tc("alfa: "+identify(alfa),"yellow");
- //tc("beta: "+identify(beta),"yellow");
- //tc("gamma: "+identify(gamma),"yellow");
- //tc("type of gamma: "+typeof(gamma),"yellow");
- //tc("epsilon: "+identify(epsilon),"yellow");
if(answers_to(beta,environment(this_object()))) return 1;
return 0;
}
--- 269,274 ----
diff -c -r --new-file ds2.0r28/lib/lib/std/table.c ds2.1/lib/lib/std/table.c
*** ds2.0r28/lib/lib/std/table.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/table.c Sun Jul 9 22:06:38 2006
***************
*** 1,14 ****
#include
! inherit LIB_ITEM;
! inherit LIB_SIT;
! inherit LIB_LIE;
!
! inherit LIB_STORAGE;
! inherit LIB_SURFACE;
void create(){
! storage::create();
SetMaxSitters(2);
SetMaxLiers(1);
SetMaxCarry(500);
--- 1,11 ----
#include
! inherit LIB_BED;
void create(){
! bed::create();
! SetShort("A table");
! SetLong("A table");
SetMaxSitters(2);
SetMaxLiers(1);
SetMaxCarry(500);
***************
*** 17,20 ****
--- 14,24 ----
inventory_accessible();
}
+ void init(){
+ ::init();
+ }
+
+ int CanGet(object who){
+ return bed::CanGet(who);
+ }
diff -c -r --new-file ds2.0r28/lib/lib/std/vendor.c ds2.1/lib/lib/std/vendor.c
*** ds2.0r28/lib/lib/std/vendor.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/lib/std/vendor.c Sun Jul 9 19:04:29 2006
***************
*** 200,209 ****
list2 += ({ ( obs[counter]->GetKeyName()) });
}
}
! obs2 = ({ present(list2[0],sroom) });
! maxi = sizeof(list2);
! for(int counter = 1;counter < maxi;++counter) {
! obs2 += ({ present(list2[counter],sroom) });
}
maxi = sizeof(obs2);
i = (int)this_player()->GetScreen()[0];
--- 200,218 ----
list2 += ({ ( obs[counter]->GetKeyName()) });
}
}
! //obs2 = ({ present(list2[0],sroom) });
! //maxi = sizeof(list2);
! //for(int counter = 1;counter < maxi;++counter) {
! // obs2 += ({ present(list2[counter],sroom) });
! // }
! obs2 = ({});
! foreach(object tempob in obs){
! string *base_names = ({});
! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) });
! if(!sizeof(obs2)) {
! obs2 = ({tempob});
! }
! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob });
}
maxi = sizeof(obs2);
i = (int)this_player()->GetScreen()[0];
***************
*** 318,325 ****
cost=to_int(ob->GetBaseCost() / ECONOMY_D->__Query(LocalCurrency,"rate"));
}
else cost=to_int(floor(ob->GetBaseCost()));
! if(cost && cost > 0) x=cost;
! if(!cost || cost < 0) x = to_int(floor(GetValue(ob, this_player())));
eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will offer "
"you " + x + " " + GetLocalCurrency() + " for " +
(string)ob->GetShort());
--- 327,338 ----
cost=to_int(ob->GetBaseCost() / ECONOMY_D->__Query(LocalCurrency,"rate"));
}
else cost=to_int(floor(ob->GetBaseCost()));
! if(!cost || cost < 1){
! eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will not buy "
! "that worthless thing from you.");
! return 1;
! }
! else x=cost;
eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will offer "
"you " + x + " " + GetLocalCurrency() + " for " +
(string)ob->GetShort());
***************
*** 343,367 ****
return 0;
}
obs = all_inventory(sroom);
! maxi = sizeof(obs);
if( x = to_int(args) ) {
! list2 = ({(obs[0]->GetKeyName())});
for(int counter = 1;counter < maxi;++counter) {
! if(member_array((obs[counter]->GetKeyName()),list2) < 0) {
! list2 += ({ ( obs[counter]->GetKeyName()) });
}
}
- obs2 = ({ present(list2[0],sroom) });
maxi = sizeof(list2);
! for(int counter = 1;counter < maxi;++counter) {
! obs2 += ({ present(list2[counter],sroom) });
! }
! if((x <= 0) || (x > sizeof(obs2))) ob = 0;
! else
! ob = obs2[x-1];
!
}
else ob = present(args = lower_case(args), sroom);
if( !ob ) {
eventForce("say I have no such thing!");
return 1;
--- 356,384 ----
return 0;
}
obs = all_inventory(sroom);
! obs2 = ({});
! foreach(object tempob in obs){
! string *base_names = ({});
! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) });
! if(!sizeof(obs2)) {
! obs2 = ({tempob});
! }
! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob });
! }
! maxi = sizeof(obs2);
if( x = to_int(args) ) {
! list2 = ({(obs2[0]->GetKeyName())});
for(int counter = 1;counter < maxi;++counter) {
! if(member_array((obs2[counter]->GetKeyName()),list2) < 0) {
! list2 += ({ ( obs2[counter]->GetKeyName()) });
}
}
maxi = sizeof(list2);
! ob = obs2[x-1];
}
else ob = present(args = lower_case(args), sroom);
+ if(!ob) foreach(object tempob in obs2)
+ if(answers_to(args,tempob)) ob = tempob;
if( !ob ) {
eventForce("say I have no such thing!");
return 1;
***************
*** 436,455 ****
sroom = load_object(StorageRoom);
obs = all_inventory(sroom);
! maxi = sizeof(obs);
if(number = to_int(what)) {
number = number - 1;
! list2 = ({(obs[0]->GetKeyName())});
for(int counter = 1;counter < maxi;++counter) {
! if(member_array((obs[counter]->GetKeyName()),list2) < 0) {
! list2 += ({ ( obs[counter]->GetKeyName()) });
}
}
- obs2 = ({ present(list2[0],sroom) });
maxi = sizeof(list2);
- for(int counter = 1;counter < maxi;++counter) {
- obs2 += ({ present(list2[counter],sroom) });
- }
if((number >= 0) && (number < sizeof(obs2))) {
ob = obs2[number];
} else {
--- 453,477 ----
sroom = load_object(StorageRoom);
obs = all_inventory(sroom);
! obs2 = ({});
! foreach(object tempob in obs){
! string *base_names = ({});
! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) });
! if(!sizeof(obs2)) {
! obs2 = ({tempob});
! }
! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob });
! }
! maxi = sizeof(obs2);
if(number = to_int(what)) {
number = number - 1;
! list2 = ({(obs2[0]->GetKeyName())});
for(int counter = 1;counter < maxi;++counter) {
! if(member_array((obs2[counter]->GetKeyName()),list2) < 0) {
! list2 += ({ ( obs2[counter]->GetKeyName()) });
}
}
maxi = sizeof(list2);
if((number >= 0) && (number < sizeof(obs2))) {
ob = obs2[number];
} else {
***************
*** 457,463 ****
return 1;
}
} else {
! if( !(ob = present(what, sroom)) ) {
eventForce("say I have nothing like that to sell");
return 1;
}
--- 479,488 ----
return 1;
}
} else {
! if( !(ob = present(what, sroom)))
! foreach(object tempob in obs2)
! if(answers_to(what,tempob)) ob = tempob;
! if(!ob){
eventForce("say I have nothing like that to sell");
return 1;
}
diff -c -r --new-file ds2.0r28/lib/lib/teacher.c ds2.1/lib/lib/teacher.c
*** ds2.0r28/lib/lib/teacher.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/teacher.c Fri Jul 7 19:41:43 2006
***************
*** 14,22 ****
--- 14,33 ----
private string array TeachingLanguages;
private mapping Students;
private int commercial = 0;
+ private int AllLangs = 0;
private int teaching_fee = 50;
private string local_currency = "silver";
+ int SetAllLanguages(int i){
+ if(!i) AllLangs = 0;
+ else AllLangs = 1;
+ return AllLangs;
+ }
+
+ int GetAllLanguages(){
+ return AllLangs;
+ }
+
int GetCommercial(){
return commercial;
}
***************
*** 153,159 ****
eventForce("speak I am already teaching you!");
return 0;
}
! if( member_array(language, this_object()->GetTeachingLanguages()) == -1 ) {
eventForce("speak I know nothing about the " +capitalize(language)+" language.");
return 0;
}
--- 164,171 ----
eventForce("speak I am already teaching you!");
return 0;
}
! if( !GetAllLanguages() &&
! member_array(language, this_object()->GetTeachingLanguages()) == -1 ) {
eventForce("speak I know nothing about the " +capitalize(language)+" language.");
return 0;
}
diff -c -r --new-file ds2.0r28/lib/lib/teller.c ds2.1/lib/lib/teller.c
*** ds2.0r28/lib/lib/teller.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/teller.c Wed Jul 12 13:29:18 2006
***************
*** 22,27 ****
--- 22,29 ----
sentient::create();
BankName = "Town Trust";
LocalCurrency = "silver";
+ LocalFee = 1;
+ NonLocalFee = 5;
OpenFee = 5;
Currencies = ({ "copper", "silver", "electrum", "gold", "platinum" });
SetCommandResponses( ([
***************
*** 91,102 ****
"surcharge of %d %s.", type, charge, currency));
return amount;
}
! else if( (amount + charge) <= (int)who->GetCurrency(currency) ) {
! who->eventPrint(sprintf("The bank charges you a %s %d %s "
! "surcharge.", type, charge, currency));
! who->AddCurrency(currency, -charge);
! return amount;
! } else {
who->eventPrint(sprintf("You are unable to afford the "
"%s surcharge of %d %s.", type, charge, currency));
return 0;
--- 93,105 ----
"surcharge of %d %s.", type, charge, currency));
return amount;
}
! //else if( (amount + charge) <= (int)who->GetCurrency(currency) ) {
! // who->eventPrint(sprintf("The bank charges you a %s %d %s "
! // "surcharge.", type, charge, currency));
! //who->AddCurrency(currency, -charge);
! // return amount;
! // }
! else {
who->eventPrint(sprintf("You are unable to afford the "
"%s surcharge of %d %s.", type, charge, currency));
return 0;
***************
*** 167,173 ****
}
int eventWithdraw(object who, string currency, int amount) {
! int i, x;
x = amount;
if( amount < 1 ) {
--- 170,176 ----
}
int eventWithdraw(object who, string currency, int amount) {
! int i, x, charge;
x = amount;
if( amount < 1 ) {
***************
*** 186,201 ****
return 1;
}
if( !(amount = AddSurcharge(who, currency, amount)) ) return 1;
! if( (int)who->AddCurrency(currency, amount) < 0 ) {
eventForce("speak You are unable to carry that "
"much "+currency+"!");
! if( x > amount ) {
! who->eventPrint("The bank returns the fee.");
! who->AddCurrency(currency, (amount - x));
! }
return 1;
}
! who->AddBank(GetBankName(), currency, -amount);
who->eventPrint(sprintf("You withdraw %d %s from your account.",
amount, currency));
environment()->eventPrint(sprintf("%s withdraws some %s.",
--- 189,206 ----
return 1;
}
if( !(amount = AddSurcharge(who, currency, amount)) ) return 1;
! charge = x - amount;
! if( (int)who->AddCurrency(currency, x) < 0 ) {
eventForce("speak You are unable to carry that "
"much "+currency+"!");
! //if( x > amount ) {
! who->eventPrint("The bank credits your account with the fee.");
! //who->AddCurrency(currency, (amount - x));
! //}
return 1;
}
! who->AddCurrency(currency, -charge);
! who->AddBank(GetBankName(), currency, -x);
who->eventPrint(sprintf("You withdraw %d %s from your account.",
amount, currency));
environment()->eventPrint(sprintf("%s withdraws some %s.",
***************
*** 313,319 ****
}
sscanf(str, "%d %s", x, s1);
if( member_array(s1, Currencies) < 0 ) {
! who->eventPrint(s1 + " is not supported here!");
return 1;
}
return eventDeposit(who, s1, x);
--- 318,324 ----
}
sscanf(str, "%d %s", x, s1);
if( member_array(s1, Currencies) < 0 ) {
! who->eventPrint("That's not a valid currency.");
return 1;
}
return eventDeposit(who, s1, x);
diff -c -r --new-file ds2.0r28/lib/lib/trainer.c ds2.1/lib/lib/trainer.c
*** ds2.0r28/lib/lib/trainer.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/lib/trainer.c Tue Jul 11 18:36:26 2006
***************
*** 129,137 ****
}
int eventTrain(object who, string verb, string skill) {
- //tc("who: "+identify(who));
- //tc("verb: "+identify(verb));
- //tc("skill: "+identify(skill));
if( !who || environment(who) != environment() ) {
return 0;
}
--- 129,134 ----
diff -c -r --new-file ds2.0r28/lib/obj/stargate.c ds2.1/lib/obj/stargate.c
*** ds2.0r28/lib/obj/stargate.c Wed Jul 5 00:00:58 2006
--- ds2.1/lib/obj/stargate.c Sun Jul 9 19:04:29 2006
***************
*** 57,72 ****
seems, and i need to test some ideas before i can say "do it this way"
*/
inherit LIB_STARGATE;
! int readScreen();
void create()
{
::create();
! setOrigin("default", "/obj/room");
! // SetRead(([ ({ "screen" }) : (: readScreen :) ]) );
! // SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) );
}
void init()
--- 57,78 ----
seems, and i need to test some ideas before i can say "do it this way"
*/
+
+ #include
+ #include
+ #include
+ #include "/lib/include/stargate.h"
+
inherit LIB_STARGATE;
! int ReadScreen();
void create()
{
::create();
! SetOrigin("ORIGIN_NAME", "/ORIGIN/GOES/HERE");
! SetRead(([ ({ "screen" }) : (: ReadScreen :) ]) );
! SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) );
}
void init()
***************
*** 74,80 ****
::init();
}
! int readScreen()
{
write("stargate network status\n");
write("-----------------------\n");
--- 80,86 ----
::init();
}
! int ReadScreen()
{
write("stargate network status\n");
write("-----------------------\n");
diff -c -r --new-file ds2.0r28/lib/obj/stargate.example ds2.1/lib/obj/stargate.example
*** ds2.0r28/lib/obj/stargate.example Wed Dec 31 19:00:00 1969
--- ds2.1/lib/obj/stargate.example Sat Jul 8 23:30:59 2006
***************
*** 0 ****
--- 1,89 ----
+ #include
+ #include
+ #include "/lib/include/stargate.h"
+
+ /**
+ * based on portal.c by Brodbane - March 2006
+ *
+ * $Id: stargate.c,v 1.1 2006/04/05 05:48:39 jam Exp $
+ *
+ * The desired functionality is much like a "star gate": users dialed
+ * letters or full words that lined up with destinations. A portal opens to
+ * that destination briefly. To define destinations you must setup a
+ * constant below then add it to the switch statement in the cmdDial
+ * function. This object is crude and basic, but gets the job done.
+ *
+ * 2006-03-22, jonez
+ * - original version of this file is from Daelas@Moraelinost
+ * 2006-03-23, jonez
+ * - altered so code uses existing verbs (touch, enter) where possible. last add_action is for dial command.
+ * - added single mapping called "database" and made the "dial" command use it.
+ * - dial command no longer uses switch/case, making adding a new destination simpler
+ * - made use of SetPreventGet() / SetPreventPut()
+ * - made use of new stargate daemon
+ * - made use of LIB_STARGATE
+ * - made use of STARGATE_D
+ *
+ * IDEAS:
+ * - create a daemon that holds the stargate network [DONE]
+ * - allow for stargate failure
+ * - add dhd object
+ * - change the code so that it uses a single mapping of names and
+ * destinations, perhaps in a database file. currently an update to the
+ * object requires an update for all the objects. [DONE]
+ * - dhd skill (thanks plato)
+ * - delay when dialing gate. destination dhd lights up?
+ * - player should not be able to dial earth if earth is already connected elsewhere (need daemon) [DONE]
+ * - make use of existing verbs (enter, touch) instead of doing our own thing. [DONE]
+ * - daemon should contain a class that maps the various gates to each other. see lib/include/door.h [DONE]
+ * - shout "off world activation" into the gateroom when the gate engages.
+ * - track status as "incoming" or "outgoing".. you can only "enter" an outgoing gate (rhk) [DONE]
+ * - if room is empty, shut down the gate (rhk)
+ * - change callout time when someone goes through the gate (rhk)
+ */
+
+ /*
+ Cratylus@Dead Souls but let me give you a quick outline
+ Cratylus@Dead Souls i type dial thing
+ Cratylus@Dead Souls the thing inherits LIB_DIAL
+ Cratylus@Dead Souls which is in /lib/events/dial.c
+ Cratylus@Dead Souls and all that contains is like direct_dial_ob() return 1; this kind of thing
+ Cratylus@Dead Souls take a look at LIB_TURN
+ Cratylus@Dead Souls what LIB_DIAL does is provide the object with hooks, so it *can* be dialed
+ Cratylus@Dead Souls so, when i type dial thing, the thing goes, yeah i
+ can be dialed, and then the parser enters the can_dial and do_dial funcs
+ in the verb
+ Cratylus@Dead Souls tellya what. i'd like to work with you on this one. i think it's less straightforward than it
+ seems, and i need to test some ideas before i can say "do it this way"
+
+ */
+
+ #include
+ #include
+ #include
+ #include "/lib/include/stargate.h"
+
+ inherit LIB_STARGATE;
+
+ int ReadScreen();
+
+ void create()
+ {
+ ::create();
+ SetOrigin("ORIGIN_NAME", "/ORIGIN/GOES/HERE");
+ SetRead(([ ({ "screen" }) : (: ReadScreen :) ]) );
+ SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) );
+ }
+
+ void init()
+ {
+ ::init();
+ }
+
+ int ReadScreen()
+ {
+ write("stargate network status\n");
+ write("-----------------------\n");
+ write("\n");
+
+ }
diff -c -r --new-file ds2.0r28/lib/realms/template/area/obj/table.c ds2.1/lib/realms/template/area/obj/table.c
*** ds2.0r28/lib/realms/template/area/obj/table.c Wed Jul 5 00:01:15 2006
--- ds2.1/lib/realms/template/area/obj/table.c Sat Jul 8 23:30:59 2006
***************
*** 15,22 ****
SetMaxCarry(5000);
SetInventory( ([
MY_OBJ "/key" : 1,
]) );
}
void init(){
::init();
! }
\ No newline at end of file
--- 15,23 ----
SetMaxCarry(5000);
SetInventory( ([
MY_OBJ "/key" : 1,
+ "/secure/obj/glasses" :1,
]) );
}
void init(){
::init();
! }
diff -c -r --new-file ds2.0r28/lib/realms/template/workroom.c ds2.1/lib/realms/template/workroom.c
*** ds2.0r28/lib/realms/template/workroom.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/realms/template/workroom.c Wed Jul 12 01:56:12 2006
***************
*** 36,42 ****
SetExits( ([ "down" : "/domains/default/room/wiz_hall.c",
"east" : MY_ROOM "/sample_room"
]) );
! SetNoModify(0);
}
int ReadSign(){
--- 36,42 ----
SetExits( ([ "down" : "/domains/default/room/wiz_hall.c",
"east" : MY_ROOM "/sample_room"
]) );
! SetNoModify(1);
}
int ReadSign(){
diff -c -r --new-file ds2.0r28/lib/secure/cmds/admins/addguest.c ds2.1/lib/secure/cmds/admins/addguest.c
*** ds2.0r28/lib/secure/cmds/admins/addguest.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/admins/addguest.c Tue Jul 11 18:36:26 2006
***************
*** 4,9 ****
--- 4,10 ----
// created by Descartes of Borg 08 july 1993
#include
+ #include
#include
inherit LIB_DAEMON;
***************
*** 13,21 ****
mixed res;
int i;
! if(!(int)master()->valid_apply(({ "SECURE", "ASSIST" }))){
error("Illegal attempt to add a guest.");
- //tc("foo");
}
if(!str) {
--- 14,21 ----
mixed res;
int i;
! if(!(int)master()->valid_apply(({ PRIV_SECURE, PRIV_ASSIST }))){
error("Illegal attempt to add a guest.");
}
if(!str) {
diff -c -r --new-file ds2.0r28/lib/secure/cmds/admins/admintool.c ds2.1/lib/secure/cmds/admins/admintool.c
*** ds2.0r28/lib/secure/cmds/admins/admintool.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/admins/admintool.c Tue Jul 11 18:36:26 2006
***************
*** 1233,1241 ****
}
}
- //tc("str: "+str);
- //tc("green","green");
-
if(str == "SECURE"){
validate();
if(!members || members == "") {
--- 1233,1238 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/admins/domainadmin.c ds2.1/lib/secure/cmds/admins/domainadmin.c
*** ds2.0r28/lib/secure/cmds/admins/domainadmin.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/admins/domainadmin.c Tue Jul 11 18:36:26 2006
***************
*** 15,22 ****
return "No.";
}
- //tc("tp_array: "+identify(tmp_array),"white");
-
if(!args || args == ""){
write(this_object()->GetHelp());
return 1;
--- 15,20 ----
***************
*** 60,77 ****
rep = "(/domains/"+domain+"/) "+implode(admin_array, ":");
- //tc("rep: "+rep,"blue");
-
if(grepp(write_perms, "(/domains/"+domain+"/)")){
write_perms = replace_matching_line(write_perms, "/domains/"+domain, rep);
write_perms = replace_string(write_perms, ";\n","\n");
- //tc("write_perms: "+write_perms, "yellow");
}
else{
write_perms = replace_string(write_perms, ";\n","\n");
write_perms = newline_trim(write_perms);
write_perms += "\n(/domains/"+domain+"/) "+person+"\n";
- //tc("write_perms: "+write_perms);
}
}
--- 58,71 ----
***************
*** 82,102 ****
}
else admin_array -= ({ person });
- //tc("admin_array: "+identify(admin_array),"cyan");
- //tc("domain: "+domain,"cyan");
- //tc("erite_terms: "+write_perms,"cyan");
if(!sizeof(admin_array)){
write_perms = remove_matching_line(write_perms, "(/domains/"+domain+"/)",1);
write_perms = replace_string(write_perms, ";\n","\n");
- //tc("write_perms: "+write_perms);
}
else {
rep = "(/domains/"+domain+"/) "+implode(admin_array, ":");
- //tc("rep: "+rep,"blue");
write_perms = replace_matching_line(write_perms, "/domains/"+domain, rep);
write_perms = replace_string(write_perms, ";\n","\n");
- //tc("write_perms: "+write_perms);
}
}
--- 76,90 ----
***************
*** 105,111 ****
return 1;
}
- //tc("write_perms: "+write_perms,"green");
write_file("/secure/cfg/write.cfg", write_perms, 1);
update("/secure/daemon/master");
write("Ok.");
--- 93,98 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/admins/unrid.c ds2.1/lib/secure/cmds/admins/unrid.c
*** ds2.0r28/lib/secure/cmds/admins/unrid.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/admins/unrid.c Tue Jul 11 18:36:26 2006
***************
*** 4,9 ****
--- 4,10 ----
#include
#include
+ #include
inherit LIB_DAEMON;
***************
*** 25,31 ****
return 1;
}
this_player()->eventPrint("Unrid successful.");
! PLAYER_D->AddPlayerInfo(str);
return 1;
}
--- 26,32 ----
return 1;
}
this_player()->eventPrint("Unrid successful.");
! PLAYERS_D->AddPlayerInfo(str);
return 1;
}
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/eval.c ds2.1/lib/secure/cmds/creators/eval.c
*** ds2.0r28/lib/secure/cmds/creators/eval.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/eval.c Tue Jul 11 18:36:27 2006
***************
*** 49,71 ****
}
filename += "CMD_EVAL_TMP_FILE.c";
if(securep(previous_object())) filename = "/secure/tmp/"+previous_object()->GetKeyName()+"_CMD_EVAL_TMP_FILE.c";
- //tc("filename: "+filename);
- //tc("previous_object: "+identify(previous_object()));
- // long name so won't coincide with file already in your directory by accident
rm( filename );
if( ret = find_object( filename ) ) destruct( ret );
write_file( filename, file,1 );
- // if( err = catch( ret = (mixed)call_other( filename, "eval" ) ) )
- // write( "Error = " + err );
- // else
ret = (mixed)call_other(filename, "eval");
write( wrap( "Result = " + identify( ret ) ) );
- //rm( filename );
if( ret = find_object( filename ) ) destruct( ret );
-
- // Some muds prefer to change these lines so filename isn't deleted if
- // an error occurs. Also, if you don't have the identify() simul_efun
- // the less through dump_variable() simul_efun can be used instead.
return 1;
}
--- 49,60 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/force.c ds2.1/lib/secure/cmds/creators/force.c
*** ds2.0r28/lib/secure/cmds/creators/force.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/force.c Wed Dec 31 19:00:00 1969
***************
*** 1,53 ****
- /* /cmds/creators/force.c
- * From the Dead Souls V Object Library
- * Created by Descartes of Borg 961018
- * Version: %A%
- * Last modified: %D%
- */
-
- #include
-
- inherit LIB_DAEMON;
-
- mixed cmd(string args) {
- object who = previous_object();
- object target;
- string name, cmd;
-
- if(!args || args==""){
- who->eventPrint("Force whom to do what?");
- return 1;
- }
- if( sscanf(args, "%s to %s", name, cmd) < 1 ) {
- if(sscanf(args, "%s %s", name,cmd) < 1) {
- who->eventPrint("Force whom to do what?");
- return 1;
- }
- }
- target = present(lower_case(name),environment(who));
- if( !target ) {
- who->eventPrint("Cannot find any living thing called: " + name);
- return 1;
- }
- if(archp(target) && !archp(who)){
- who->eventPrint(target->GetName()+" shakes "+possessive(target)+
- " head and forces you to dest yourself.");
- tell_room(environment(who), who->GetName()+" dests "+objective(who)+
- "self while trying to pull a foolish joke on "+target->GetName()+".", who);
- who->eventDestruct();
- return 1;
- }
- target->eventPrint(who->GetName() + " forces you to: " + cmd);
- who->eventPrint("You force " + target->GetShort() + " to: " + cmd);
- target->eventForce(cmd);
- return 1;
- }
-
- string GetErorMessage() {
- return "Force whom to do what?";
- }
-
- string GetHelp() {
- return ("Syntax: \n\n"
- "Allows you to force a living object to take a certain action.");
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/grant.c ds2.1/lib/secure/cmds/creators/grant.c
*** ds2.0r28/lib/secure/cmds/creators/grant.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/grant.c Tue Jul 11 18:36:27 2006
***************
*** 51,55 ****
message("help", "Syntax: \n\n"
"Allows you to give other creators access to files or directories "
"under your control. The access parameter is \"read\", "
! "\"write\", or \"all\".", this_player());
}
--- 51,60 ----
message("help", "Syntax: \n\n"
"Allows you to give other creators access to files or directories "
"under your control. The access parameter is \"read\", "
! "\"write\", or \"all\".\n"
! "There is no \"ungrant\" or \"deny\" command. Delete the "
! "access file created in the subdirectory, to revoke the privileges "
! "in it."
! "",
! this_player());
}
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/indent.c ds2.1/lib/secure/cmds/creators/indent.c
*** ds2.0r28/lib/secure/cmds/creators/indent.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/indent.c Tue Jul 11 18:36:27 2006
***************
*** 28,43 ****
else {
paths = ({});
files = get_dir(this_player()->query_cwd()+"/");
- //tc("files: "+identify(files));
if(sizeof(files)) foreach(string s1 in files){
if(file_size(where + "/" +s1) == -2 ){
paths += ({ where + "/" +s1 });
- //tc("paths: "+identify(paths));
}
}
}
if(sizeof(paths)) foreach(string path in paths){
- //tc("path: "+path);
load_object("/secure/cmds/creators/lsed")->cmd(rulefile + " "+ path + "/*.c");
load_object("/secure/cmds/creators/lsed")->cmd(rulefile + " "+ path + "/*.h");
}
--- 28,40 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/locate.c ds2.1/lib/secure/cmds/creators/locate.c
*** ds2.0r28/lib/secure/cmds/creators/locate.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/locate.c Wed Dec 31 19:00:00 1969
***************
*** 1,13 ****
- #include
- #include
-
- inherit LIB_DAEMON;
-
- int cmd(string who) {
- object ob;
-
- if(!who) return notify_fail("Locate whom?\n");
- SERVICES_D->send_locate_q(who);
- message("info", "Locate query sent.", this_player());
- return 1;
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/ls.c ds2.1/lib/secure/cmds/creators/ls.c
*** ds2.0r28/lib/secure/cmds/creators/ls.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/ls.c Tue Jul 11 18:36:27 2006
***************
*** 89,95 ****
static private string display_ls(mixed targ, int aflag, int lflag, int tflag,
int nflag, int bflag, int sflag) {
string *cles;
! string ret;
int i, maxi;
if(stringp(targ) && targ == "/") targ = ([ "/" : get_dir("/", -1) ]);
--- 89,95 ----
static private string display_ls(mixed targ, int aflag, int lflag, int tflag,
int nflag, int bflag, int sflag) {
string *cles;
! string ret = "";
int i, maxi;
if(stringp(targ) && targ == "/") targ = ([ "/" : get_dir("/", -1) ]);
diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/memcheck.c ds2.1/lib/secure/cmds/creators/memcheck.c
*** ds2.0r28/lib/secure/cmds/creators/memcheck.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/cmds/creators/memcheck.c Tue Jul 11 18:36:27 2006
***************
*** 9,21 ****
inherit LIB_DAEMON;
string cmd(string unused) {
! return check_memory();
}
void help() {
message("help", "Syntax: \n\n"
! "Gives you information about leaked memory. You should see "
! "nothing at all if things are going well.\n\n"
"See also: mstatus, netstat",
this_player());
}
--- 9,32 ----
inherit LIB_DAEMON;
string cmd(string unused) {
! string ret = check_memory(1);
! string tmpfile = generate_tmp();
! write("%^RED%^The output for this command may be misleading. It is kept "+
! "as a historical curiosity, but is not necessarily reliable.%^RESET%^");
! if(sizeof(ret) < 7000) write(ret);
! else {
! write_file(tmpfile,ret);
! this_player()->eventPage(tmpfile);
! }
! rm(tmpfile);
! return "%^RED%^The output for this command may be misleading. It is kept "+
! "as a historical curiosity, but is not necessarily reliable.%^RESET%^";
}
void help() {
message("help", "Syntax: \n\n"
! "Gives you information about leaked memory. "
! "\n\n"
"See also: mstatus, netstat",
this_player());
}
diff -c -r --new-file ds2.0r28/lib/secure/daemon/chat.c ds2.1/lib/secure/daemon/chat.c
*** ds2.0r28/lib/secure/daemon/chat.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/chat.c Tue Jul 11 18:36:28 2006
***************
*** 46,59 ****
}
varargs int CanListen(object who, string canal){
- //tc("CanListen: who: "+identify(who)+", canal: "+canal);
if(RESTRICTED_INTERMUD == 0 || !RESTRICTED_INTERMUD) return 1;
if(canal && member_array(canal, local_chans) != -1) return 1;
else return imud_privp(who);
}
varargs int CanTalk(object who, string canal){
- //tc("CanListen: who: "+identify(who)+", canal: "+canal);
if(RESTRICTED_INTERMUD == 0 || !RESTRICTED_INTERMUD) return 1;
if(canal && member_array(canal, local_chans) != -1) return 1;
else return imud_privp(who);
--- 46,57 ----
***************
*** 131,136 ****
--- 129,135 ----
if(pmsg) plainmsg += pmsg;
if(pwho && pwho !="") plainmsg = pwho+" "+plainmsg;
if(pchan && pchan != "admin"){
+ chan = GetLocalChannel(chan);
unguarded( (: write_file("/log/chan/"+chan,"["+timestamp()+"] "+plainmsg+"\n") :) );
if( file_size("/log/chan/"+chan) > 200000) {
unguarded( (: rename("/log/chan/"+chan,"/log/chan/"+chan+"."+timestamp() ) :) );
***************
*** 150,156 ****
object ob = 0;
int emote;
! if(first(str,1) == ":" && sizeof(str) > 3){
if(!grepp(verb,"emote")) verb += "emote";
str = trim(replace_string(str,":","",1));
}
--- 149,157 ----
object ob = 0;
int emote;
! if(first(str,1) == ":" &&
! (member_array(str[1..1], ({ "Q", "O", "P", "D", "I", "X" })) == -1 &&
! alphap(str[1..1]) && sizeof(str) > 3)){
if(!grepp(verb,"emote")) verb += "emote";
str = trim(replace_string(str,":","",1));
}
***************
*** 211,217 ****
}
who = GetChannelList(str);
msg = "Online: " + implode(who, " ");
- //tc("msg1");
this_player()->eventPrint(msg, MSG_SYSTEM);
return 1;
}
--- 212,217 ----
***************
*** 225,231 ****
string emote_cmd, remains;
mixed array msg_data;
int i;
- //tc("we seem to think it's an emote");
if( !Channels[verb] ) {
return 0;
}
--- 225,230 ----
***************
*** 473,489 ****
}
else site = "@"+site;
if( listener == ob ) continue;
! foreach(string jerk in listener->GetMuffed()){
! //tc("suspect: "+suspect);
! //tc("site: "+site);
! //tc("jerk: "+jerk);
! //tc("msg: "+msg);
! //sscanf(tmp,"%s %s %s", foo, bar, baz);
! //if(jerk && grepp(lower_case(bar),lower_case(jerk))) ignore = 1;
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
- //tc("msg2","red");
if(!ignore && CanListen(listener,ch)) listener->eventPrint(tmp, MSG_CONV);
ignore = 0;
}
--- 472,482 ----
}
else site = "@"+site;
if( listener == ob ) continue;
! if(sizeof(listener->GetMuffed()))
! foreach(string jerk in listener->GetMuffed()){
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
if(!ignore && CanListen(listener,ch)) listener->eventPrint(tmp, MSG_CONV);
ignore = 0;
}
***************
*** 491,501 ****
if( ob && !((int)ob->GetBlocked(ch)) ) {
int ignore;
tmp = this_msg + targmsg;
! foreach(string jerk in ob->GetMuffed()){
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
- //tc("msg3","green");
if(!ignore && CanListen(ob,ch)) ob->eventPrint(tmp, MSG_CONV);
ignore = 0;
}
--- 484,494 ----
if( ob && !((int)ob->GetBlocked(ch)) ) {
int ignore;
tmp = this_msg + targmsg;
! if(sizeof(ob->GetMuffed()))
! foreach(string jerk in ob->GetMuffed()){
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
if(!ignore && CanListen(ob,ch)) ob->eventPrint(tmp, MSG_CONV);
ignore = 0;
}
***************
*** 552,566 ****
}
else site = "@"+site;
! foreach(string jerk in ob->GetMuffed()){
! //if(jerk) tc("jerk: "+jerk,"red");
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
- //tc("msg4","blue");
- //tc("who: "+who);
- //tc("suspect: "+suspect);
- //tc("site: "+site);
if(!ignore && CanListen(ob,ch)) ob->eventPrint(msg, MSG_CONV);
ignore = 0;
suspect ="";
--- 545,555 ----
}
else site = "@"+site;
! if(sizeof(ob->GetMuffed()))
! foreach(string jerk in ob->GetMuffed()){
if(jerk && lower_case(suspect) == lower_case(jerk)) ignore = 1;
if(jerk && lower_case(site) == lower_case(jerk)) ignore = 1;
}
if(!ignore && CanListen(ob,ch)) ob->eventPrint(msg, MSG_CONV);
ignore = 0;
suspect ="";
diff -c -r --new-file ds2.0r28/lib/secure/daemon/events.c ds2.1/lib/secure/daemon/events.c
*** ds2.0r28/lib/secure/daemon/events.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/events.c Tue Jul 11 18:36:28 2006
***************
*** 137,145 ****
void RemoveEvent(int i){
if( file_name(previous_object()) != SEFUN ) return;
if(sizeof(Events[i])){
- //tc("Events: "+identify(Events));
map_delete(Events, i);
- //tc("Events: "+identify(Events));
eventSave(1);
}
}
--- 137,143 ----
diff -c -r --new-file ds2.0r28/lib/secure/daemon/finger.c ds2.1/lib/secure/daemon/finger.c
*** ds2.0r28/lib/secure/daemon/finger.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/finger.c Fri Jul 7 19:41:43 2006
***************
*** 128,134 ****
else ret += "On since " + ctime(LoginTime);
}
else ret += "Last on " + ctime(LoginTime);
! if( !WhereBlock || (this_player(1) && archp(this_player(1))) )
ret += " from " + HostSite + "%^BR%^\n";
else ret += "%^BR%^\n";
mail_stat = (mapping)FOLDERS_D->mail_status(who);
--- 128,134 ----
else ret += "On since " + ctime(LoginTime);
}
else ret += "Last on " + ctime(LoginTime);
! if( this_player(1) && creatorp(this_player(1)) )
ret += " from " + HostSite + "%^BR%^\n";
else ret += "%^BR%^\n";
mail_stat = (mapping)FOLDERS_D->mail_status(who);
***************
*** 173,179 ****
}
if( !Email ) Email = "#CHANGE";
tmp = ({ CapName, GetTitle(), RealName, (Email[0] != '#' ? Email : 0),
! ctime(LoginTime), (ob && interactive(ob) ? query_idle(ob) : -1),
0, (creator ? "Creator" : "" + Level), plan });
return tmp;
}
--- 173,179 ----
}
if( !Email ) Email = "#CHANGE";
tmp = ({ CapName, GetTitle(), RealName, (Email[0] != '#' ? Email : 0),
! ctime(LoginTime), ((ob && interactive(ob) && !(ob->GetInvis())) ? query_idle(ob) : -1),
0, (creator ? "Creator" : "" + Level), plan });
return tmp;
}
diff -c -r --new-file ds2.0r28/lib/secure/daemon/master.c ds2.1/lib/secure/daemon/master.c
*** ds2.0r28/lib/secure/daemon/master.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/master.c Sun Jul 9 19:04:30 2006
***************
*** 27,32 ****
--- 27,33 ----
private static string PlayerName, rlog;
private static object NewPlayer;
private static mapping Groups, ReadAccess, WriteAccess;
+ private static string *ParserDirs = ({ "secure", "verbs", "daemon", "lib", "spells" });
void create() {
Unguarded = 0;
***************
*** 219,273 ****
else stack = ({ ob }) + previous_object(-1);
}
else i = sizeof(stack = previous_object(-1) + ({ ob }));
- //tc("me: "+identify(this_object()), "red");
- //tc("prevs: "+identify((previous_object(-1)+({ob}))), "red");
- //tc("get_stack: "+get_stack(), "white");
- //tc("oper: "+oper, "red");
while(i--) {
if(!stack[i] || stack[i] == this_object()) {
- //tc("stack check true");
continue;
}
if(file_name(stack[i]) == SEFUN) {
- //tc("sefun check true");
continue;
}
if(!(priv = query_privs(stack[i]))) {
- //tc("priv check FALSE");
return 0;
}
- //tc("priv: "+priv,"yellow");
- //tc("prevs: "+identify(previous_object(-1)));
if(!ok && oper == "read") {
- //tc("trivial read check passed");
continue;
}
privs = explode(priv, ":");
if(member_array(PRIV_SECURE, privs) != -1) {
- //tc("priv secure check true");
- //tc("prevs: "+identify(previous_object(-1)),"white");
- //tc("stack: "+get_stack(),"white");
continue;
}
if(stringp(file) && member_array(file_privs(file), privs) != -1) {
- //tc("file: "+file+", checks true");
continue;
}
- //foreach(string sub_priv in privs){
- // if(sizeof(ok) && member_array(sub_priv, ok) != -1) privcheck = 1;
- //}
- //if(ok) tc("ok: "+identify(ok));
- //tc("current ob: "+identify(stack[i]));
- //tc("privcheck: "+privcheck+"\n\n");
- //if(privcheck) continue;
if(!ok && oper == "write") {
- //tc("verde","green");
if(userp(stack[i]) && check_user(stack[i], fun, file, oper))
continue;
else return 0;
}
if(sizeof(privs & ok)) {
- //tc("azul","blue");
continue;
}
if(userp(stack[i]) && check_user(stack[i], fun, file, oper)) continue;
--- 220,251 ----
***************
*** 394,402 ****
}
int valid_object(object ob) {
! string file;
file = file_name(ob);
if( !strsrch(file, DIR_TMP) ) return 0;
else if( !strsrch(file, DIR_FTP) ) return 0;
else if( !strsrch(file, DIR_LOGS) ) return 0;
--- 372,388 ----
}
int valid_object(object ob) {
! string file, contents;
file = file_name(ob);
+ contents = read_file(base_name(ob)+".c");
+ if(strsrch(contents,"parse_add_rule") != -1
+ || strsrch(contents, "SetRules") != -1) {
+ string prefix;
+ if(!sscanf(file,"/%s/%*s",prefix)) return 0;
+ if(member_array(prefix, ParserDirs) == -1) return 0;
+ }
+
if( !strsrch(file, DIR_TMP) ) return 0;
else if( !strsrch(file, DIR_FTP) ) return 0;
else if( !strsrch(file, DIR_LOGS) ) return 0;
diff -c -r --new-file ds2.0r28/lib/secure/daemon/ping.c ds2.1/lib/secure/daemon/ping.c
*** ds2.0r28/lib/secure/daemon/ping.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/ping.c Tue Jul 11 18:36:28 2006
***************
*** 14,20 ****
int CheckOK(){
Pinging = 0;
if(!OK){
- //tc("not ok");
Retries++;
update("/daemon/intermud");
}
--- 14,19 ----
***************
*** 26,32 ****
}
Retries = 0;
- //tc("ok");
}
if(Retries == 2){
tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"
--- 25,30 ----
diff -c -r --new-file ds2.0r28/lib/secure/daemon/players.c ds2.1/lib/secure/daemon/players.c
*** ds2.0r28/lib/secure/daemon/players.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/players.c Tue Jul 11 18:36:28 2006
***************
*** 64,70 ****
if(!file_exists(player_save_file)) return;
}
- //tc("player_save_file: "+player_save_file);
user_list += ({ replace_string(last_string_element(player_save_file,"/"),".o","") }) ;
unguarded((: save_object, SAVE_PLAYER_LIST :));
}
--- 64,69 ----
diff -c -r --new-file ds2.0r28/lib/secure/daemon/snoop.c ds2.1/lib/secure/daemon/snoop.c
*** ds2.0r28/lib/secure/daemon/snoop.c Wed Jul 5 19:58:20 2006
--- ds2.1/lib/secure/daemon/snoop.c Tue Jul 11 18:36:28 2006
***************
*** 59,74 ****
string *immune;
string name;
- //tc("hello.");
if(!str) str = "foo";
str = lower_case(str);
foo = find_player(str);
if(sizeof(snoopers)){
foreach(object snoopbox in snoopers){
- //tc("snooper: "+identify(snoopbox));
- //if(snoopbox && grepp("#",file_name(snoopbox)) ) {
if(clonep(snoopbox) ) {
- //tc("snooped: "+ file_name(snoopbox)+": "+snoopbox->GetSnooped()+"\n","yellow");
}
else snoopers -= ({snoopbox});
if(snoopbox && snoopbox->GetSnooped() && snoopbox->GetSnooped() == str) {
--- 59,70 ----
***************
*** 80,104 ****
}
if(!already_watched && foo && (GLOBAL_MONITOR > 0 || member_array(str, monitored) != -1 || member_array(str, snooped) != -1 )){
if(archp(find_player(str)) && GLOBAL_MONITOR == 2) return 0;
- //tc("already watched: "+already_watched);
cloan=new("/secure/obj/snooper");
- //tc("cloning : "+identify(cloan));
cloan->eventStartSnoop(str);
}
- //tc("query_snooping: "+identify(query_snooping(cloan)));
unguarded( (: save_object, SAVE_SNOOP, 1 :) );
return 1;
}
void CheckSnooped(){
object *lusers = users();
- //if(!compare_array(lusers, prevusers) || just_loaded){
just_loaded = 0;
foreach(object user in lusers){
CheckBot(user->GetKeyName());
}
- //}
- //else CheckBot("tanstaafl");
prevusers = lusers;
}
--- 76,94 ----
***************
*** 134,140 ****
void heart_beat(){
count++;
- //tc("snoop daemon heart_beat","green");
if( !(count % 5) ) CheckSnooped();
if( !(count % 10)) {
--- 124,129 ----
***************
*** 147,153 ****
}
void reset(){
- //tc("Snoop daemon reset");
if(query_heart_beat(this_object()) < 1) set_heart_beat(60);
CheckSnooped();
}
--- 136,141 ----
***************
*** 261,267 ****
}
write("Watchers: "+identify(Watchers)+"\n");
write("snoopers: "+identify(snoopers)+"\n");
- //write("prevusers: "+identify(prevusers)+"\n");
write("snooped: "+identify(snooped)+"\n");
write("monitored: "+identify(monitored)+"\n");
return 1;
--- 249,254 ----
diff -c -r --new-file ds2.0r28/lib/secure/daemon/voting.c ds2.1/lib/secure/daemon/voting.c
*** ds2.0r28/lib/secure/daemon/voting.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/daemon/voting.c Tue Jul 11 18:36:28 2006
***************
*** 167,182 ****
eventSave();
return VOTE_SUCCESS;
}
- //tc("mapVoting[\"daycount\"]: "+mapVoting["daycount"]);
eventEndVoting();
return VOTE_SUCCESS;
}
- //message("shout", "%^YELLOW%^Election announcement:%^RESET%^ " +
- // "Only " + mapVoting["daycount"] + " " +
- //( (int)mapVoting["daycount"] > 1 ) ? "days" : "day" + " left to " +
- //( (int)mapVoting["mode"] == VOTE_MODE_VOTING )
- //? "vote for the candidates." : "nominate candidates.", users());
call_out( (: eventNextDay :), DAY );
eventSave();
return VOTE_SUCCESS;
--- 167,176 ----
***************
*** 189,203 ****
mapCouncil = ([]);
foreach( string sClass in CLASSES_D->GetClasses() ) {
- //tc("sClass: "+sClass);
mapWho = mapVoting["votes"][lower_case(sClass)];
- //tc("mapVoting: "+identify(mapVoting),"red");
- //tc("mapWho: "+identify(mapWho));
if( ! ( sizeof( asWho = keys( mapWho ) ) ) ){
- //tc("?");
- //return VOTE_SUCCESS;
}
- //tc("asWho: "+identify(asWho));
while( sizeof( asWho ) >= 2 ) {
string player1, player2;
--- 183,191 ----
***************
*** 210,219 ****
else
asWho -= ({ player1 });
}
- //tc("asWho: "+identify(asWho));
if(asWho && sizeof(asWho)) mapCouncil[lower_case(sClass)] = asWho[0];
- //tc("mapCouncil["+lower_case(sClass)+"]: "+identify(mapCouncil[lower_case(sClass)]));
}
eventSave();
--- 198,205 ----
diff -c -r --new-file ds2.0r28/lib/secure/include/dirs.h ds2.1/lib/secure/include/dirs.h
*** ds2.0r28/lib/secure/include/dirs.h Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/include/dirs.h Tue Jul 11 18:36:28 2006
***************
*** 16,21 ****
--- 16,23 ----
#define DIR_SUICIDE DIR_DATA "/suicide"
#define DIR_RID DIR_DATA "/rid"
#define DIR_SECURE_DAEMONS_SAVE DIR_DATA "/daemons"
+ #define DIR_SECURE_VERBS DIR_SECURE "/verbs"
+ #define DIR_SECURE_CREATOR_VERBS DIR_SECURE_VERBS "/creators"
#define DIR_VOTES DIR_DATA "/votes"
#define DIR_GOSSIP DIR_DATA "/gossip"
diff -c -r --new-file ds2.0r28/lib/secure/lib/connect.c ds2.1/lib/secure/lib/connect.c
*** ds2.0r28/lib/secure/lib/connect.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/lib/connect.c Wed Jul 12 13:29:18 2006
***************
*** 100,106 ****
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address (first char # for privacy)? ");
input_to((: InputEmail :), I_NOESC);
}
--- 100,106 ----
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address? ");
input_to((: InputEmail :), I_NOESC);
}
diff -c -r --new-file ds2.0r28/lib/secure/lib/connect.first ds2.1/lib/secure/lib/connect.first
*** ds2.0r28/lib/secure/lib/connect.first Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/lib/connect.first Wed Jul 12 13:29:18 2006
***************
*** 100,106 ****
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address (first char # for privacy)? ");
input_to((: InputEmail :), I_NOESC);
}
--- 100,106 ----
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address? ");
input_to((: InputEmail :), I_NOESC);
}
diff -c -r --new-file ds2.0r28/lib/secure/lib/connect.first.c ds2.1/lib/secure/lib/connect.first.c
*** ds2.0r28/lib/secure/lib/connect.first.c Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/lib/connect.first.c Wed Jul 12 13:29:18 2006
***************
*** 100,106 ****
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address (first char # for privacy)? ");
input_to((: InputEmail :), I_NOESC);
}
--- 100,106 ----
static void InputRealName(string str) {
if( !str || str == "" ) str = "Unknown";
Admin->SetRealName(str);
! receive("What is your email address? ");
input_to((: InputEmail :), I_NOESC);
}
diff -c -r --new-file ds2.0r28/lib/secure/lib/connect.real ds2.1/lib/secure/lib/connect.real
*** ds2.0r28/lib/secure/lib/connect.real Wed Jul 5 00:01:05 2006
--- ds2.1/lib/secure/lib/connect.real Wed Jul 12 13:29:18 2006
***************
*** 310,317 ****
}
Player->SetCapName(cap = capitalize(name));
receive("\nFor security reasons, " + mud_name() + " requires a valid "
! "email.\nYou can restrict this information as being admin only "
! "by preceeding it\nwith a '#' character (e.g. #user@host).\n"
"Email: \n");
input_to((: InputEmail :), I_NOESC);
}
--- 310,316 ----
}
Player->SetCapName(cap = capitalize(name));
receive("\nFor security reasons, " + mud_name() + " requires a valid "
! "email.\n"
"Email: \n");
input_to((: InputEmail :), I_NOESC);
}
diff -c -r --new-file ds2.0r28/lib/secure/lib/net/client.c ds2.1/lib/secure/lib/net/client.c
*** ds2.0r28/lib/secure/lib/net/client.c Wed Jul 5 00:01:12 2006
--- ds2.1/lib/secure/lib/net/client.c Tue Jul 11 18:36:28 2006
***************
*** 107,113 ****
}
void eventWrite(mixed val) {
- //tc("writing: "+identify(val),"red");
if( !Socket ) return;
if( Socket->Buffer ) Socket->Buffer += ({ val });
--- 107,112 ----
diff -c -r --new-file ds2.0r28/lib/secure/modules/armor.c ds2.1/lib/secure/modules/armor.c
*** ds2.0r28/lib/secure/modules/armor.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/modules/armor.c Tue Jul 11 18:36:29 2006
***************
*** 151,157 ****
}
temp_array = explode(tmp_str,"\n");
- //tc("temp_array: "+identify(temp_array));
if(!sizeof(temp_array)){
return ([]);
}
--- 151,156 ----
diff -c -r --new-file ds2.0r28/lib/secure/modules/create.c ds2.1/lib/secure/modules/create.c
*** ds2.0r28/lib/secure/modules/create.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/modules/create.c Tue Jul 11 18:36:29 2006
***************
*** 554,563 ****
}
else {
- //if(!value || value == "" ) {
- // write("This setting requires a value.");
- // return 1;
- // }
switch(out){
case "SetLong" : p_array = ({"SetShort","SetAmbientLight","SetDayLight","SetNightLight","create()","create ()","create"}); break;
case "SetDayLong" : p_array = ({"SetShort","SetAmbientLight","SetDayLight","SetNightLight","SetNightLong","SetLong","create()","create ()","create"}); break;
--- 554,559 ----
***************
*** 601,607 ****
tmpfile = generate_tmp(ob);
- //tc("stack: "+get_stack());
if(!check_privs(this_player(),filename)){
write("You do not appear to have access to this file. Modification aborted.");
--- 597,602 ----
***************
*** 642,648 ****
mixed mx;
filename = base_name(target)+".c";
- //tc("stack: "+get_stack());
if(!check_privs(this_player(),filename)){
write("You do not appear to have access to this file. Modification aborted.");
return 1;
--- 637,642 ----
***************
*** 663,671 ****
default : p_array = ({"SetLong","SetShort","SetDayLong","SetNightLong"});
}
ret = remove_matching_line(read_file(tmpfile),func);
- //tc("ret: "+ret,"red");
ret = this_object()->eventAppend(ret,p_array,"\n"+array_string+"\n");
- //tc("ret: "+ret,"green");
globaltmp = ret;
unguarded( (: write_file(global2,globaltmp,1) :) );
this_object()->eventGeneralStuff(tmpfile);
--- 657,663 ----
***************
*** 691,698 ****
map_string = func+"("+map_string+");";
filename = base_name(target)+".c";
- //tc("stack: "+get_stack());
-
if(!check_privs(this_player(),filename)){
write("You do not appear to have access to this file. Modification aborted.");
return 1;
--- 683,688 ----
***************
*** 731,737 ****
int eventAddSettings(object ob, string tmp, mapping NewMap, string func){
string filename, new_lines;
- //tc("stack: "+get_stack());
filename = base_name(ob)+".c";
if(!check_privs(this_player(),filename)){
--- 721,726 ----
***************
*** 745,758 ****
global2 = tmp;
new_lines = "\n";
foreach(string key, mixed val in NewMap){
- //if(func != "SetSkill"){
if(intp(val)) new_lines += func+"(\""+key+"\", "+val+");\n";
else new_lines += func+"(\""+key+"\", \""+val+"\");\n";
- //}
- //else {
- // if(intp(val)) new_lines += func+"(\""+key+"\", 0, "+val+");\n";
- //else new_lines += func+"(\""+key+"\", 0, \""+val+"\");\n";
- //}
}
global1 = this_object()->eventAppend(global1,({func,"SetClass","SetRace","SetLevel","SetItems","SetInventory","SetLong", "SetClosed"}),new_lines);
unguarded( (: write_file(global2, global1,1) :) );
--- 734,741 ----
diff -c -r --new-file ds2.0r28/lib/secure/modules/generic.c ds2.1/lib/secure/modules/generic.c
*** ds2.0r28/lib/secure/modules/generic.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/modules/generic.c Tue Jul 11 18:36:29 2006
***************
*** 66,74 ****
}
if(last(filename,2) != ".c") filename += ".c";
- //tc("thing: "+last_string_element(this_player()->query_cwd(),"/"), "red");
- //tc("filename: "+filename);
- //tc("check_privs: "+check_privs(this_player(), filename));
if(!this_player()->query_cwd()){
write("You have no current working directory. Please type: cd\nthen try again.");
--- 66,71 ----
***************
*** 106,112 ****
creation = "/obj/"+creation+".c";
if(file_exists(creation) && cp(creation,filename)) true();
else {
- //write("Whoops! The template object /obj/"+creation+".c doesn't exist.");
write("Creation failed.");
return 1;
}
--- 103,108 ----
***************
*** 207,212 ****
--- 203,209 ----
write("Insufficient privileges. Addition halted.");
return 1;
}
+ this_object()->eventGeneralStuff(base_name(ob)+".c");
InvMap = this_object()->QueryMap("SetInventory",ob);
if(!inherits(LIB_NPC,ob)){
diff -c -r --new-file ds2.0r28/lib/secure/modules/mapping.c ds2.1/lib/secure/modules/mapping.c
*** ds2.0r28/lib/secure/modules/mapping.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/modules/mapping.c Tue Jul 11 18:36:29 2006
***************
*** 229,237 ****
mapping SecondMap = ([]);
plural_maps = ({ "SetProperties" });
- //tc("mode: "+mode,"red");
if(stringp(value)) value = trim(replace_string(value,mode,""));
- //tc("value: "+value,"red");
if(stringp(value) && !grepp(lower_case(func),"prop") ){
if(sscanf(value,"%d",integer) != 1 &&
--- 229,235 ----
***************
*** 239,245 ****
sscanf(value,"%s %s",tmp,junk);
if(!tmp || !junk) value = 0;
else if(sscanf(junk,"%d",integer) != 1) sscanf(junk,"%d %s",integer,junk2);
- //tc("tmp: "+tmp);
if(tmp) mode += " "+tmp;
}
if(integer) value = integer;
--- 237,242 ----
***************
*** 254,262 ****
}
}
- //tc("mode: "+mode,"green");
- //tc("value: "+value,"green");
-
filename = base_name(ob)+".c";
if(!check_privs(this_player(),filename)){
write("You do not appear to have access to this file. Modification aborted.");
--- 251,256 ----
***************
*** 281,307 ****
SecondMap = this_object()->eventReadMapping(filename, ({ func }), 1);
NewMap = add_maps(FirstMap, SecondMap);
if(stringp(value) && sscanf(value,"%d",integer) == 1) {
- //integer = value;
- //NewMap[mode] = 0;
- //NewMap[mode] += integer;
- //NewMap[mode] += integer;
NewMap[mode] = integer;
}
else NewMap[mode] = value;
- //write("mapping: "+identify(NewMap));
globaltmp = generate_tmp(ob);
- //globalstr = filename;
- //unguarded( (: globalstr2 = read_file(globalstr) :) );
- //tc("globalstr: "+globalstr,"yellow");
- //tc("globaltmp: "+globaltmp,"yellow");
- //tc("globalstr2: "+globalstr2,"blue");
unguarded( (: write_file(globaltmp,globalstr2,1) :) );
if(member_array(func,plural_maps) != -1)
this_object()->eventResumeMappingChange(ob,globaltmp,copy(NewMap),func);
else this_object()->eventAddSettings(ob,globaltmp,copy(NewMap),func2);
- //write("hmm.");
- //unguarded( (: tc("new file: "+read_file(globalstr)) :) );
return 1;
}
--- 275,289 ----
***************
*** 351,361 ****
globalstr = generate_tmp();
unguarded( (: write_file(globalstr,globalstr2,1) :) );
tmp = globalstr;
- //tc(tmp+" is: "+read_file(tmp));
globalstr = filename;
globalstr2 = tmp;
- //tc("globalstr2: "+globalstr2);
- //tc("globalstr: "+globalstr);
unguarded( (: cp(globalstr2, globalstr) :) );
rm(tmp);
}
--- 333,340 ----
diff -c -r --new-file ds2.0r28/lib/secure/modules/room.c ds2.1/lib/secure/modules/room.c
*** ds2.0r28/lib/secure/modules/room.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/modules/room.c Tue Jul 11 18:36:29 2006
***************
*** 84,106 ****
if(file_exists(arg2)) new_file = arg2;
else if(strsrch(arg2,"./") != -1) {
- //tc("found dotslash");
arg2 = replace_string(arg2,"./","");
new_file = absolute_path((string)this_player()->query_cwd(), arg2);
- //tc("new_file: "+new_file);
}
else if(directory_exists(path_prefix(arg2))){
- //tc("new_file: "+new_file,"red");
new_file = arg2;
}
else if(grepp(arg2,"/")){
new_file = room_dir +"/"+ last_string_element(arg2,"/");
- //tc("new_file: "+new_file,"green");
}
else {
new_file = room_dir +"/"+ arg2;
- //tc("new_file: "+new_file,"blue");
}
if(!check_privs(this_player(),new_file)){
--- 84,101 ----
***************
*** 148,154 ****
else if(strsrch(globaltmp,"AddExit") != -1) param = "AddExit";
else if(strsrch(globaltmp,"SetLong") != -1) param = "SetLong";
else {
- //write("The room you are in is screwed up. Creation process halted.");
}
globaltmp = remove_matching_line(globaltmp,"SetObviousExits",1);
globaltmp = remove_matching_line(globaltmp,"//extras",1);
--- 143,148 ----
***************
*** 177,222 ****
mapping PointlessMap;
mapping ExitsMap = load_object(filename)->GetExitMap();
- //if(!sizeof(ExitsMap)) tc("Exitsmap is nothing");
- //else tc("ExitsMap: "+identify(ExitsMap));
-
if(file_exists(filename) && !check_privs(this_player(),filename)){
write("You do not appear to have access to this room's file. Modification aborted.");
return 1;
}
tmpfile = generate_tmp(load_object(filename));
- //tmpfile = generate_tmp();
globalstr = filename;
globaltmp = tmpfile;
unguarded( (: globalstr2 = read_file(globalstr) :) );
contents = globalstr2;
- //tc("filename: "+filename);
- //tc("contents: "+contents);
PointlessMap = ([]);
PointlessMap = load_object(filename)->GetFullExitData();
- //if(!sizeof(PointlessMap)) write("PointlessMap is nothing");
- // else write("PointlessMap: "+identify(PointlessMap));
-
- //if(file_exists(filename)) tc(filename+" exists.");
- // else tc(filename+" doesn't exist.");
-
if( member_array(dir,load_object(filename)->GetExits()) != -1
&& !functionp(PointlessMap[dir]["pre"])
&& !functionp(PointlessMap[dir]["post"]) ) {
this_object()->eventReadMapping(filename,({"SetExits"}), 1);
- //write("ExitsMap: "+identify(ExitsMap));
map_delete(ExitsMap,dir);
- //tc("ExitsMap: "+identify(ExitsMap));
map_str = "SetExits( ([ \n";
foreach( key, val in ExitsMap){
if(!functionp(PointlessMap[key]["pre"])
&& !functionp(PointlessMap[key]["post"])) map_str += "\""+key+"\" : \""+val+"\",\n";
}
map_str += "]) );";
- //write("map_str: "+map_str);
unguarded( (: globalstr2 = read_file(globalstr) :) );
contents = globalstr2;
--- 171,201 ----
***************
*** 331,351 ****
unguarded( (: this_object()->eventReadMapping(globalstr,({"SetExits"}),1) :) );
unguarded( (: this_object()->eventReadMapping(globalstr2,({"SetExits"}),1) :) );
DestExits = load_object(dest)->GetExitMap();
- //tc("\n--------\n");
unguarded( (: globaltmp = read_file(globalstr) :) );
- //write("globaltmp: "+globaltmp);
- //tc("\n--------\n");
- //write("DestExitS: "+identify(DestExits));
map_str = "SetExits("+this_object()->eventStringifyMap(DestExits)+");\n";
new_file = this_object()->eventAppend(globaltmp,({"SetItems","SetLong","SetDayLong"}),"\n"+map_str+"\n");
new_file = replace_line(new_file,({"SetShort(",");"}),"SetShort(\"copy of "+last_string_element(source,"/")+"\");");
replace_string(new_file,"\n\n\n","\n\n");
new_file = remove_matching_line(new_file, "SetDoor", 1);
- //tc("new_file: "+new_file);
- //tc("\n--------\n");
write_file(tmpsource,new_file,1);
this_object()->eventGeneralStuff(tmpsource);
--- 310,324 ----
***************
*** 383,414 ****
if(remote && member_array("out",load_object(room)->GetExits()) != -1) return 0;
- //globaltmp = remove_matching_line(globaltmp,"SetObviousExits",1);
- //globaltmp = remove_matching_line(globaltmp,"SetExits",1);
- //globaltmp = remove_matching_line(globaltmp,"SetDoor",1);
globaltmp = remove_matching_line(globaltmp,"SetEnters",1);
globaltmp = remove_matching_line(globaltmp,"//extras",1);
- //tc("remote: "+remote,"yellow");
- //tc("globalroom: "+globalroom);
- //tc("globalfile: "+globalfile);
- //tc("globaltmp: "+read_matching_line(globaltmp,"Long"));
- //unguarded( (: tc("globalfile is: "+read_matching_line(read_file(globalfile),"Long"),"red") :) );
- //unguarded( (: tc("globalroom is: "+read_matching_line(read_file(globalroom),"Long"),"red") :) );
unguarded( (: write_file(globalfile,globaltmp,1) :) );
- //players = get_livings(environment(this_player()),1);
- //load_object("/secure/cmds/creators/update")->cmd("-a "+room);
- //unguarded( (: tc("globalfile is: "+read_matching_line(read_file(globalfile),"Long"),"red") :) );
- //unguarded( (: tc("globalroom is: "+read_matching_line(read_file(globalroom),"Long"),"red") :) );
if(!remote) {
- //tc("size of globalroom: "+sizeof(read_file(globalroom)));
- //tc("size of globalfile: "+sizeof(read_file(globalfile)));
- //tc("");
eventProcessEnters(room, dir, file);
- //tc("size of globalroom: "+sizeof(read_file(globalroom)));
- //tc("size of globalfile: "+sizeof(read_file(globalfile)));
this_object()->eventCreateExit("out", file, room, 1 );
- //players->eventMove(load_object(room));
say(this_player()->GetCapName()+" waves "+possessive(this_player())+" hand and a new enter appears.");
this_object()->eventGeneralStuff(room);
}
--- 356,368 ----
***************
*** 439,492 ****
mapping PointlessMap;
mapping EntersMap = load_object(filename)->GetEnterMap();
- //if(!sizeof(EntersMap)) tc("Entersmap is nothing");
- //else tc("EntersMap: "+identify(EntersMap));
-
if(file_exists(filename) && !check_privs(this_player(),filename)){
write("You do not appear to have access to this room's file. Modification aborted.");
return 1;
}
tmpfile = generate_tmp(load_object(filename));
- //tmpfile = generate_tmp();
globalstr = filename;
globaltmp = tmpfile;
unguarded( (: globalstr2 = read_file(globalstr) :) );
contents = globalstr2;
- //tc("filename: "+filename);
- //tc("contents: "+contents);
PointlessMap = ([]);
PointlessMap = load_object(filename)->GetEnterMap();
- //if(!sizeof(PointlessMap)) write("PointlessMap is nothing");
- // else write("PointlessMap: "+identify(PointlessMap));
-
- //if(file_exists(filename)) tc(filename+" exists.");
- // else tc(filename+" doesn't exist.");
-
if( member_array(dir,load_object(filename)->GetEnters()) != -1) {
- //&& !functionp(PointlessMap[dir]["pre"]) ) {
this_object()->eventReadMapping(filename,({"SetEnters"}), 1);
- //write("EntersMap: "+identify(EntersMap));
foreach(key,val in EntersMap){
- //write("key: "+identify(key));
- //write("key: "+typeof(key));
- //write("val: "+identify(val));
- //write("val: "+typeof(val));
if(arrayp(key) && member_array(dir,key) != -1)
key_arr = key;
true();
}
map_delete(EntersMap,key_arr);
- //tc("EntersMap: "+identify(EntersMap));
map_str = "SetEnters( ([ \n";
foreach( key, val in EntersMap){
- //if(!functionp(PointlessMap[key]["pre"]))
map_str += "\""+key[0]+"\" : \""+val+"\",\n";
}
map_str += "]) );";
- //write("map_str: "+map_str);
unguarded( (: globalstr2 = read_file(globalstr) :) );
contents = globalstr2;
--- 393,425 ----
***************
*** 553,560 ****
}
PointlessMap = load_object(filename)->GetEnterMap();
- //tc("PointlessMap: "+identify(PointlessMap));
- //tc("EntersMap: "+identify(EntersMap));
map_str = "SetEnters( ([\n";
globalstr = filename;
--- 486,491 ----
***************
*** 563,577 ****
new_file = remove_matching_line(new_file,"//extras");
new_file = remove_matching_line(new_file, "AddEnter(", 1, ":)");
- //foreach( key, val in EntersMap){
- // if(!functionp(PointlessMap[key]["pre"])
- // &&!functionp(PointlessMap[key]["post"])
- // && present(key,load_object(filename)) )
- // map_str += "\""+key+"\" : \""+val+"\",\n";
- //}
-
foreach( key, val in EntersMap){
- //if(present(key[0],load_object(filename)) ) map_str += "\""+key[0]+"\" : \""+val+"\",\n";
map_str += "\""+key[0]+"\" : \""+val+"\",\n";
}
--- 494,500 ----
diff -c -r --new-file ds2.0r28/lib/secure/npc/drone.c ds2.1/lib/secure/npc/drone.c
*** ds2.0r28/lib/secure/npc/drone.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/npc/drone.c Tue Jul 11 18:36:29 2006
***************
*** 15,23 ****
void doPrint(string str1, string str2);
void validate(){
- //tc("control code: "+control_code,"green");
- //tc(" previous_object()->GetControlCode(): "+ previous_object()->GetControlCode(),"red");
- //tc("hmm. previous_object: "+identify(previous_object(-1)));
if(base_name(previous_object()) != "/secure/obj/control" ||
previous_object()->GetControlCode() != control_code){
if(ownerob){
--- 15,20 ----
***************
*** 92,98 ****
int eventDescribeEnvironment(mixed args){
dude=this_object()->GetShadowedObject();
arguments = args;
- //dude->eDE(arguments) ;
unguarded((: tell_object(ownerob,this_object()->eDE()+"\n") :));
return 1;
}
--- 89,94 ----
***************
*** 105,120 ****
if(!query_heart_beat(this_object())) this_object()->set_heart_beat(1);
if(ownerob && str != "look" && str != "l") this_object()->eventForce(str);
else if(ownerob){
- //tell_object(ownerob,"This is where the env dsc comes in.");
unguarded((: this_object()->eventDescribeEnvironment() :)) ;
- //ownerob->eventPrint(this_object()->eventDescribeEnvironment(this_object())) ;
}
else if(!ownerob) return 0;
return 1;
}
int SetOwner(string str){
- //tc("control code: "+control_code,"blue");
if(sizeof(owner) && this_object()->GetOwner() != "NONE") {
validate();
}
--- 101,113 ----
***************
*** 173,179 ****
smell = env->GetSmell();
sound = env->GetListen();
touch = env->GetTouch();
- //if(desc) eventPrint(desc, "Room DEsc");
if( smell ) desc += "%^GREEN%^\n";
if( sound ) desc += "%^CYAN%^\n";
--- 166,171 ----
diff -c -r --new-file ds2.0r28/lib/secure/obj/control.c ds2.1/lib/secure/obj/control.c
*** ds2.0r28/lib/secure/obj/control.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/obj/control.c Tue Jul 11 18:36:30 2006
***************
*** 34,40 ****
::init();
if(living(environment())) owner = environment();
else owner = 0;
- //tc("control code: "+control_code);
add_action("control","control");
add_action("release","release");
add_action("do_control","]");
--- 34,39 ----
***************
*** 136,142 ****
}
string GetControlCode(){
- //tc("previous object: "+identify(previous_object()),"white");
if(base_name(previous_object()) != "/shadows/drone") return alpha_crypt(16);
else return control_code;
}
--- 135,140 ----
diff -c -r --new-file ds2.0r28/lib/secure/obj/medtric.c ds2.1/lib/secure/obj/medtric.c
*** ds2.0r28/lib/secure/obj/medtric.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/obj/medtric.c Wed Jul 12 21:37:43 2006
***************
*** 28,34 ****
"* fscan: readout of all files inherited\t\t%^GREEN%^ONLINE%^RESET%^\n"+
"* enshadow: move a shadow to an object\t\t%^RED%^offline%^RESET%^\n"+
"* deshadow: remove all shadows from an object\t%^GREEN%^ONLINE%^RESET%^\n"+
- "* diagnose: assess health status\t\t%^GREEN%^ONLINE%^RESET%^\n"+
"* inject: insert substance into patient\t\t%^RED%^offline%^RESET%^\n"+
"* extract: remove a foreign body or substance\t%^GREEN%^ONLINE%^RESET%^ (slugs only)\n"+
"* modhealth: raise or lower health level\t%^GREEN%^ONLINE%^RESET%^\n"+
--- 28,33 ----
diff -c -r --new-file ds2.0r28/lib/secure/obj/replacer.c ds2.1/lib/secure/obj/replacer.c
*** ds2.0r28/lib/secure/obj/replacer.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/obj/replacer.c Tue Jul 11 18:36:30 2006
***************
*** 187,192 ****
write("Found string in line "+n+". Replacing with: "+a3+".\n");
this_object()->replace(line);
}
- //tc("line: "+line);
return 1;
}
--- 187,191 ----
diff -c -r --new-file ds2.0r28/lib/secure/obj/roommaker.c ds2.1/lib/secure/obj/roommaker.c
*** ds2.0r28/lib/secure/obj/roommaker.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/obj/roommaker.c Wed Dec 31 19:00:00 1969
***************
*** 1,1982 ****
- /* Roommaker by Haderach @ Frontiers
- * Sep 21 2005
- */
-
- #include
- #include
- inherit LIB_ITEM;
-
- int Begin(); // The function that gets called when the object is activated
-
- //===================
- //= Reset Functions =
- //===================
- void reset_room_header ();
- void reset_room_properties();
- void reset_room_attributes();
- void reset_temps ();
-
- //===========================
- //= Menu Printing Functions =
- //===========================
-
- int print_menu_main ();
- int print_menu_room_create();
- int print_menu_item_create();
- int print_menu_room_climate();
- int print_menu_room_properties();
- int print_menu_room_exits();
- int print_menu_room_enters();
- int print_menu_room_inventory();
- int print_menu_room_item();
- int print_menu_room_smell();
- int print_menu_room_listen();
-
- //=============================
- //= Menu Processing Functions =
- //=============================
-
- int process_default (string str);
- int process_menu_main (string str);
- int process_room_create(string str);
- int process_room_climate(string str);
- int process_room_properties(string str);
- int process_room_exits(string str);
- int process_room_enters(string str);
- int process_room_item(string str);
- int process_room_inventory(string str);
- int process_room_smell(string str);
- int process_room_listen(string str);
-
- //=============================
- //= Room Setter Functions =
- //=============================
- int set_town(string str);
- int set_short(string str);
- int set_obvious(string str);
- int set_light(string str);
- int set_long(string str);
- int set_room_exit(string str);
- int set_room_exit_helper(string str);
- int set_room_enter(string str);
- int set_room_enter_helper(string str);
- int set_room_inventory(string str);
- int set_room_inventory_helper(string str);
- int set_room_item_single(string str);
- int set_room_item_multiple(string str);
- int set_room_item_description(string str);
- int set_room_smell_single(string str);
- int set_room_smell_multiple(string str);
- int set_room_smell_description(string str);
- int set_room_listen_single(string str);
- int set_room_listen_multiple(string str);
- int set_room_listen_description(string str);
- int set_defaultdir_helper(string str);
- int set_defaultdir(string str);
- int set_defaultdir_main(string str);
- // toggle the room properties
- int toggle_attack();
- int toggle_bump();
- int toggle_steal();
- int toggle_magic();
- int toggle_paralyze();
- int toggle_teleport();
-
- //==============================
- //= Display Printing Functions =
- //==============================
- string print_room_list_for_display (mapping room_map);
- string print_properties_for_display ();
- string print_room_items_for_display ();
- string print_room_inventory_for_display ();
- string print_room_exits_for_display ();
- string print_room_enters_for_display ();
- string print_room_smells_for_display ();
- string print_room_listens_for_display ();
-
- //==============================
- //= File Printing Functions =
- //==============================
- string print_room_for_file_helper (mapping room_map);
- string print_properties_for_file ();
- string print_room_items_for_file ();
- string print_room_inventory_for_file ();
- string print_room_smells_for_file ();
- string print_room_listens_for_file ();
- string print_room_exits_for_file ();
- string print_room_enters_for_file ();
-
-
- //=============================
- //= Room Load/Save Functions =
- //=============================
- int write_to_file(string str);
- //int read_room(string str);
-
- //====================================================
- //= Initialize variables to the beginning values =
- //====================================================
-
- mapping climates = (([ "1":"indoors", "2":"temperate", "3":"arid",
- "4":"arctic", "5":"tropical", "6":"sub-tropical" ]));
- mapping room_properties_map = (([ "no attack":"0",
- "no bump":"0",
- "no steal":"0",
- "no magic":"0",
- "no paralyze":"0",
- "no teleport":"0"
- ]));
-
- mapping room_attributes_map = (([ "Town":"",
- "Climate":"",
- "Short Desc":"",
- "Long Desc (Day)":"",
- "Long Desc (Night)":"",
- "Obvious Exits":"",
- "Light Level (Day)":"30",
- "Light Level (Night)":"15" ]));
-
- mapping room_items_map = ([]);
- mapping room_inventory_map = ([]);
- mapping room_exits_map = ([]);
- mapping room_enters_map = ([]);
- mapping room_smells_map = ([]);
- mapping room_listens_map = ([]);
-
- string *multi_item_array = ({});
- string objectdescription = "";
-
- string tempdir = "";
- string prefix = "";
- string defaultdir = "";
-
- string username = ""; // the administrator's lowercase name
- string capitalname = ""; // the administrator's proper name
-
- string header = "";
- string tail = "";
- string extrafuns = "";
-
- string globalstr = "";
- string globalstr2 = "";
-
- int check_prop(mixed arg){
- if(!arg || sizeof(arg) < 1) return 0;
- else return 1;
- }
-
-
- //====================================================
- //= Main function. Creates the actual item =
- //====================================================
-
-
- static void create() {
- item::create();
- SetKeyName("Object Maker");
- SetId( ({"om", "room maker", "roommaker", "maker", "tool"}) );
- SetShort("a room maker");
- SetLong("This is a great tool for any creator.\n"
- "Type \"rmake\" to start the roommaker. Be aware that it keeps the "
- "variables that you type in within its memory. If you want to create "
- "a completely new room, simply clear the buffers. Otherwise, this "
- "roommaker can save you a lot of time if you're creating virtually "
- "similar rooms. You can simply keep writing to different file names. "
- "Hope you enjoy, and mail me with comments, questions, or bug reports.\n"
- "Documentation has been written. Just ask Haderach for it.\n");
- SetVendorType(VT_TREASURE);
- }
-
-
- //====================================================
- //= Creates the action that starts the roommaker =
- //====================================================
-
-
- void init() {
- ::init();
- add_action("Begin","rmake");
- }
-
- int Begin () {
- // Keep people who are not wizards from using this object
- if (!creatorp(environment(this_object()))) {
- write ("Your mortal mind cannot comprehend how to work this mighty object.");
- return 1;
- }
- if (strlen (username) == 0) {
- username = lower_case(environment(this_object())->GetName());
- }
- if (strlen (capitalname) == 0) {
- capitalname = environment(this_object())->GetCapName();
- }
- // Set everything to its default value.
- if (strlen (defaultdir) == 0) {
- defaultdir = "/realms/" + username + "/area/room/";
- }
-
- // Print the starting menu
- this_object()->print_menu_main();
- return 1;
- }
-
-
- //===================
- //= Reset Functions =
- //===================
-
- void reset_room_header ()
- {
- header = "/* \nFile created with Roommaker \n"
- "written by Haderach@Frontiers \n"
- "Room made by " + capitalname + "\n"
- "Date: "+ ctime(time()) + "\n"
- "WARNING! WARNING! If you edit this room by hand "
- "the room maker may be unable to read\n"
- "it properly. Hand-edit at your own risk.\n"
- "\n*/\n\n"
- "#include \n"
- "#include \"../../customdefs.h\";\n"
- "inherit LIB_ROOM;\n"
- "\n"
- "static void create() {\n"
- " room::create();\n";
- }
-
- void reset_room_properties() {
- string *propkey = keys (room_properties_map);
- int index = 0;
- while (index < sizeof (propkey)) {
- room_properties_map[propkey[index]] = "0";
- index++;
- }
- }
-
- void reset_room_attributes () {
- string *propkey = keys (room_attributes_map);
- int index = 0;
- while (index < sizeof (propkey)) {
- room_attributes_map[propkey[index]] = "";
- index++;
- }
- room_attributes_map["Light Level (Day)"] = "30";
- room_attributes_map["Light Level (Night)"] = "15";
- }
-
- void reset_everything_in_room ()
- {
- reset_room_header ();
- reset_room_properties ();
- reset_room_attributes ();
-
- room_items_map = ([]);
- room_inventory_map = ([]);
- room_exits_map = ([]);
- room_enters_map = ([]);
- room_smells_map = ([]);
- room_listens_map = ([]);
-
- reset_temps ();
-
- tail = "";
- extrafuns = "";
- }
-
- void reset_temps ()
- {
- multi_item_array = ({});
- tempdir = "";
- prefix = "";
- objectdescription = "";
- }
-
- //==============================
- //= Printing/Display Functions =
- //==============================
-
- // Utility function that other functions call
- string print_room_list_for_display (mapping room_map) {
- string display = "";
- string *roomlist = keys (room_map);
- string scounter = "";
- for (int counter = 0; counter < sizeof (roomlist); counter++) {
- scounter = (string) counter + 1;
- display += " " + scounter + ". " + roomlist[counter] + " : " + room_map[roomlist[counter]];
- if (counter + 1 < sizeof (roomlist)) {
- display += "\n";
- }
- }
- return display;
- }
-
- string print_properties_for_display () {
- string properties =
- " \"No Attack\":" + room_properties_map["no attack"] + ", \n"
- " \"No Bump\":" + room_properties_map["no bump"] + ", \n"
- " \"No Steal\":" + room_properties_map["no steal"] + ", \n"
- " \"No Magic\":" + room_properties_map["no magic"] + ", \n"
- " \"No Paralyze\":" + room_properties_map["no paralyze"] + ", \n"
- " \"No Teleport\":" + room_properties_map["no teleport"] + "\n";
- return properties;
- }
-
- string print_room_items_for_display () {
- return print_room_list_for_display (room_items_map);
- }
-
- string print_room_inventory_for_display () {
- return print_room_list_for_display (room_inventory_map);
- }
-
- string print_room_exits_for_display () {
- return print_room_list_for_display (room_exits_map);
- }
-
- string print_room_enters_for_display () {
- return print_room_list_for_display (room_enters_map);
- }
-
- string print_room_smells_for_display () {
- return print_room_list_for_display (room_smells_map);
- }
-
- string print_room_listens_for_display () {
- return print_room_list_for_display (room_listens_map);
- }
-
- string print_properties_for_file () {
- string properties = " SetProperties (([\n";
- properties +=
- " \"no attack\":" + room_properties_map["no attack"] + ", \n"
- " \"no bump\":" + room_properties_map["no bump"] + ", \n"
- " \"no steal\":" + room_properties_map["no steal"] + ", \n"
- " \"no magic\":" + room_properties_map["no magic"] + ", \n"
- " \"no paralyze\":" + room_properties_map["no paralyze"] + ", \n"
- " \"no teleport\":" + room_properties_map["no teleport"];
- properties += "]));\n";
- return properties;
- }
-
- string print_room_for_file_helper (mapping room_map) {
- string strresult = "";
- string *roomlist = keys (room_map);
- for (int counter = 0; counter < sizeof (roomlist); counter++) {
- strresult += " " + roomlist[counter] + " : " + room_map[roomlist[counter]];
- if (counter != (sizeof (roomlist) - 1)) {
- strresult += " ,\n";
- }
- }
- strresult += "]));\n";
- return strresult;
- }
-
- string print_room_items_for_file () {
- string strresult = " SetItems(([";
- strresult += print_room_for_file_helper (room_items_map);
- return strresult;
- }
-
- string print_room_inventory_for_file () {
- string strresult = " SetInventory(([";
- strresult += print_room_for_file_helper (room_inventory_map);
- return strresult;
- }
-
- string print_room_smells_for_file () {
- string strresult = " SetSmell(([";
- strresult += print_room_for_file_helper (room_smells_map);
- return strresult;
- }
-
- string print_room_listens_for_file () {
- string strresult = " SetListen(([";
- strresult += print_room_for_file_helper (room_listens_map);
- return strresult;
- }
-
- string print_room_exits_for_file () {
- string strresult = "";
- string *roomlist = keys (room_exits_map);
- for (int counter = 0; counter < sizeof (roomlist); counter++) {
- strresult += " AddExit(" + roomlist[counter] + ", " + room_exits_map[roomlist[counter]] + ");\n";
- }
- return strresult;
- }
-
- string print_room_enters_for_file () {
- string strresult = "";
- string *roomlist = keys (room_enters_map);
- for (int counter = 0; counter < sizeof (roomlist); counter++) {
- strresult += " AddEnter(" + roomlist[counter] + ", " + room_enters_map[roomlist[counter]] + ");\n";
- }
- return strresult;
- }
-
-
- //====================================================
- //= Prints the Main menu =
- //====================================================
-
- int print_menu_main() {
- write(" MAIN MENU\n"
- "================\n\n"
- "1. Create Room\n"
- "2. Load Room\n"
- "3. Set Default Directory [ " + defaultdir + " ]\n"
- "q. Quit\n\n"
- "Enter Your Choice: ");
- input_to("process_menu_main");
- return 1;
- }
-
-
- //====================================================
- //= Processes the input of the main menu selection =
- //====================================================
-
- int process_default (string str)
- {
- // This takes care of the default commands that every menu
- // should support.
- switch (str) {
- case "q":
- case "quit":
- case "exit":
- return 1;
- default:
- return 0;
- }
- return 1;
- }
-
- int process_menu_main (string str) {
- switch(str) {
- case "1": // Create Room
- this_object()->print_menu_room_create();
- return 1;
- case "2": // Load Room
- write("Enter file name within " + defaultdir + " : ");
- this_object()->reset_everything_in_room ();
- input_to("read_room");
- return 1;
- case "3": // Set Default Directory
- write("Enter default directory: ( " + defaultdir +
- " ) type c to cancel [default: " +
- (string)this_player()->query_cwd() + " ]");
- input_to("set_defaultdir_main");
- return 1;
- default:
- if (process_default (str) == 0) {
- write("Invalid choice. Try again.");
- input_to("process_menu_main");
- }
- return 1;
- }
- return 1;
- }
-
-
- //====================================================
- //= Prints the Create Room menu =
- //====================================================
-
- int print_menu_room_create () {
- write(" ROOM EDITOR\n"
- "================\n\n"
- "1. Town [ " + room_attributes_map["Town"] + " ]\n"
- "2. Climate [ " + room_attributes_map["Climate"] + " ]\n"
- "3. Properties \n" + print_properties_for_display () +
- "4. Short Desc[ " + room_attributes_map["Short Desc"] + " ]\n"
- "5. Long Desc (Day) [ " + room_attributes_map["Long Desc (Day)"] + " ]\n"
- "6. Long Desc (Night) [ " + room_attributes_map["Long Desc (Night)"] + " ]\n"
- "7. Items [ " + print_room_items_for_display () + " ]\n"
- "8. Inventory [ " + print_room_inventory_for_display () + " ]\n"
- "9. Smell [ " + print_room_smells_for_display () + " ]\n"
- "10. Listen [ " + print_room_listens_for_display () + " ]\n"
- "11. Obvious Exits [ " + room_attributes_map["Obvious Exits"] + " ]\n"
- "12. Exits [ " + print_room_exits_for_display () + " ]\n"
- "13. Light Level (Day) [ " + room_attributes_map["Light Level (Day)"] + " ]\n"
- "14. Light Level (Night) [ " + room_attributes_map["Light Level (Night)"] + " ]\n"
- "15. Enters [ " + print_room_enters_for_display () + " ]\n"
- "w. Write to File\n"
- "c. Clear Buffers\n"
- "d. Default Directory [" + defaultdir + "]\n"
- "p. Previous Menu\n\n"
- "Enter Your Choice: ");
- input_to("process_room_create");
- return 1;
- }
-
- //====================================================
- //= Processes the input from the Create Room menu =
- //====================================================
-
- int process_room_create(string str) {
- switch(str) {
- case "1":
- write("Enter name of Town: ");
- input_to("set_town");
- return 1;
- case "2":
- this_object()->print_menu_room_climate();
- return 1;
- case "3":
- this_object()->print_menu_room_properties();
- return 1;
- case "4":
- write("Enter Short Description: ");
- input_to("set_short");
- return 1;
- case "5":
- write("Enter Long Description (Day). End with q on a single line\n"
- "type load to load file as text.");
- room_attributes_map["Long Desc (Day)"] = "";
- input_to("set_long");
- return 1;
- case "6":
- write("Enter Long Description (Night). End with q on a single line.\n"
- "Type s to have same as Long Desc (Day).\n"
- "type load to load file as text.");
- room_attributes_map["Long Desc (Night)"] = "";
- input_to("set_nightlong");
- return 1;
- case "7":
- this_object()->print_menu_room_item();
- return 1;
- case "8":
- this_object()->print_menu_room_inventory();
- return 1;
- case "9":
- this_object()->print_menu_room_smell();
- return 1;
- case "10":
- this_object()->print_menu_room_listen();
- return 1;
- case "11":
- write("Enter obvious exits, separated by commas: (eg. s, w)");
- input_to("set_obvious");
- return 1;
- case "12":
- this_object()->print_menu_room_exits();
- return 1;
- case "13":
- write("Enter a new light level for the daytime: ");
- input_to("set_light");
- return 1;
- case "14":
- write("Enter a new light level for the nighttime: ");
- input_to("set_nightlight");
- return 1;
- case "15":
- this_object()->print_menu_room_enters();
- return 1;
-
- case "w":
- write("Enter filename within default directory: ( " + defaultdir +
- " ) type c to cancel [default: " + (string)this_player()->query_cwd() + " ]");
- input_to("write_to_file");
- return 1;
- case "c": // Clear
- // Reset Everything
- this_object()->reset_everything_in_room ();
- // Print out the main menu again
- this_object()->print_menu_room_create();
- return 1;
- case "d":
- write("Enter default directory: ( " + defaultdir + " ) type q to cancel");
- input_to("set_defaultdir");
- return 1;
- case "p":
- this_object()->print_menu_main();
- return 1;
- default:
- if (process_default (str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_create");
- }
- return 1;
- }
- }
-
- //====================================================
- //= Prints the Available Climates menu =
- //====================================================
-
- int print_menu_room_climate() {
- write(" Available Climates\n"
- "===================\n\n"
- "1. Indoors\n"
- "2. Temperate\n"
- "3. Arid\n"
- "4. Arctic\n"
- "5. Tropical\n"
- "6. Sub-tropical\n"
- "p. Previous Menu\n\n"
- "Enter Your Choice: ");
- input_to("process_room_climate");
- return 1;
- }
-
- //====================================================
- //= Processes the input from the Climate menu =
- //====================================================
-
- int process_room_climate(string str) {
- if(str == "p") {
- this_object()->print_menu_room_create();
- return 1;
- }
- if(climates[str]) {
- room_attributes_map["Climate"] = climates[str];
- this_object()->print_menu_room_create();
- return 1;
- }
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_climate");
- }
- return 1;
- }
-
- //====================================================
- //= Prints the Available Properties =
- //====================================================
-
- int print_menu_room_properties() {
- write(" Toggle Room Properties\n"
- "=======================\n\n"
- "1. No Attack [current: " + room_properties_map["no attack"] + "]\n"
- "2. No Bump [current: " + room_properties_map["no bump"] + "]\n"
- "3. No Steal [current: " + room_properties_map["no steal"] + "]\n"
- "4. No Magic [current: " + room_properties_map["no magic"] + "]\n"
- "5. No Paralyze [current: " + room_properties_map["no paralyze"] + "]\n"
- "6. No Teleport [current: " + room_properties_map["no teleport"] + "]\n"
- "p. Previous Menu\n\n"
- "Enter Your Choice: ");
- input_to("process_room_properties");
- return 1;
- }
-
- //====================================================
- //= Processes the input from the Properties menu =
- //====================================================
-
- int process_room_properties(string str) {
- switch(str) {
- case "1":
- this_object()->toggle_attack();
- return 1;
- case "2":
- this_object()->toggle_bump();
- return 1;
- case "3":
- this_object()->toggle_steal();
- return 1;
- case "4":
- this_object()->toggle_magic();
- return 1;
- case "5":
- this_object()->toggle_paralyze();
- return 1;
- case "6":
- this_object()->toggle_teleport();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_properties");
- }
- return 1;
- }
- }
-
- //====================================================
- //= Prints the Add Exits menu =
- //====================================================
-
- int print_menu_room_exits() {
- write(" Exits Menu\n"
- "==========\n\n"
- "1. Add to MY_ROOM\n"
- "2. Add to absolute room\n"
- "3. Remove Exit\n"
- "c. Clear Exits\n"
- "p. Return to previous menu.\n\n"
- "Enter your choice: ");
- input_to("process_room_exits");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Exits Menu =
- //====================================================
-
- int process_room_exits(string str) {
- string *exitlist = keys (room_exits_map);
- string stempindex = "";
- int exitsize = 0;
- int tempindex;
- switch(str) {
- case "1":
- write("Enter exit direction: ");
- prefix = "MY_ROOM + \"/\" +";
- input_to("set_room_exit");
- return 1;
- case "2":
- write("Enter exit direction: ");
- prefix = "";
- input_to("set_room_exit");
- return 1;
- case "3":
- exitsize = sizeof(exitlist);
- write(" Exits");
- for(int counter = 0; counter < exitsize; counter++) {
- tempindex = counter + 1;
- stempindex = (string)tempindex;
- write(stempindex + ". " + exitlist[counter] + " == > " + room_exits_map[exitlist[counter]]);
- }
- write("Enter Exit number to remove: ");
- input_to("remove_exit");
- return 1;
- case "c":
- room_exits_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_exits");
- }
- return 1;
- }
- }
-
- //====================================================
- //= Prints the Add Enters menu =
- //====================================================
-
- int print_menu_room_enters() {
- write(" Enters Menu\n"
- "==========\n\n"
- "1. Add to MY_ROOM\n"
- "2. Add to absolute room\n"
- "3. Remove Enter\n"
- "c. Clear Enters\n"
- "p. Return to previous menu.\n\n"
- "Your choice: ");
- input_to("process_room_enters");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Enters Menu =
- //====================================================
-
- int process_room_enters(string str) {
- string *enterlist = keys (room_enters_map);
- string stempindex = "";
- int entersize = 0;
- int tempindex;
- switch(str) {
- case "1":
- write("What is entered? Please remember that if what you enter here ");
- write("does not have a matching item in SetItems or AddItem, your ");
- write("room will not load until you include that item in ");
- write("the room's code.");
- prefix = "MY_ROOM + \"/\" +";
- input_to("set_room_enter");
- return 1;
- case "2":
- write("What is entered? Please remember that if what you enter here ");
- write("does not have a matching item in SetItems or AddItem, your ");
- write("room will not load until you include that item in ");
- write("the room's code.");
- prefix = "";
- input_to("set_room_enter");
- return 1;
- case "3":
- entersize = sizeof(enterlist);
- write(" Enters");
- for(int counter = 0; counter < entersize; counter++) {
- tempindex = counter + 1;
- stempindex = (string)tempindex;
- write(stempindex + ". " + enterlist[counter] + " == > " + room_enters_map[enterlist[counter]]);
- }
- write("Enter number to remove: ");
- input_to("remove_enter");
- return 1;
- case "c":
- room_enters_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_enters");
- }
- return 1;
- }
- }
-
- //====================================================
- //= Prints the Add Inventory menu =
- //====================================================
-
- int print_menu_room_inventory() {
- write(" Inventory Menu\n"
- "=====================\n\n"
- "1. Add an object from MY_NPC\n"
- "2. Add an object from MY_AREA\n"
- "3. Enter absolute path for object\n"
- "4. Remove Inventory Item\n"
- "c. Clear Inventory\n"
- "p. Return to previous menu.\n\n"
- "Enter your choice: ");
- input_to("process_room_inventory");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Inventory Menu =
- //====================================================
-
- int process_room_inventory(string str) {
- string *invlist = keys (room_inventory_map);
- int tempindex = 0;
- int invsize = 0;
- string stempindex;
- switch(str) {
- case "1":
- write("Enter filename: ");
- prefix = "MY_NPC + \"/\" +";
- input_to("set_room_inventory");
- return 1;
- case "2":
- write("Enter filename: ");
- prefix = "MY_AREA + \"/\" +";
- input_to("set_room_inventory");
- return 1;
- case "3":
- write("Enter absolute filename: ");
- prefix = "";
- input_to("set_room_inventory");
- return 1;
- case "4":
- invsize = sizeof(invlist);
- write(" Inventory Items");
- for(int counter = 0; counter < invsize; counter++) {
- tempindex = counter + 1;
- stempindex = (string)tempindex;
- write(stempindex + ". " + invlist[counter]);
- }
- write("Enter Inventory number to remove: ");
- input_to("remove_inventory");
- return 1;
- case "c":
- room_inventory_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid choice. Try again.");
- input_to("process_room_inventory");
- }
- return 1;
- }
- }
-
- //====================================================
- //= Prints the Add Item menu =
- //====================================================
-
- int print_menu_room_item() {
- write(" Items Menu\n"
- "===========\n\n"
- "1. Add a single item\n"
- "2. Add multiple items with same description\n"
- "3. Remove Item\n"
- "c. Clear Items\n"
- "p. Return to previous menu.\n\n"
- "Enter your choice: ");
- input_to("process_room_item");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Items Menu =
- //====================================================
-
- int process_room_item(string str) {
- string *roomitemlist = keys (room_items_map);
- int itemsize = 0;
- int tempindex = 0;
- int counter = -1;
- string stempindex;
- switch(str) {
- case "1":
- write("Enter item name: ");
- input_to("set_room_item_single");
- return 1;
- case "2":
- write("Enter first item: ");
- input_to("set_room_item_multiple");
- return 1;
- case "3":
- itemsize = sizeof(roomitemlist);
- write(" Items\n");
- //for(int counter = 0; counter < itemsize; counter++) {
- // tempindex = counter + 1;
- // stempindex = (string)tempindex;
- // write(stempindex + ". " + roomitemlist[counter]);
- //}
-
- foreach(string item_key in roomitemlist){
- counter ++;
- tempindex = counter +1 ;
- stempindex = (string)tempindex;
- write("size of roomitemlist is "+sizeof(roomitemlist));
- write("roomitemlist is "+identify(roomitemlist));
- write(stempindex + ". " + roomitemlist[counter]);
- }
-
- write("Enter Item number to remove: ");
- input_to("remove_item");
- return 1;
- case "c":
- room_items_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_item");
- }
- return 1;
- }
- }
-
- int remove_item(string str) {
- int index;
- string *roomitemlist = ({});
- int itemsize = -1;
- sscanf(str, "%d", index);
- if (index <= 0) {
- write("Invalid choice.");
- this_object()->print_menu_room_item();
- return 1;
- }
-
- index--;
-
- roomitemlist = keys (room_items_map);
- itemsize = sizeof(roomitemlist);
-
- if(index >= itemsize) {
- write("Invalid choice.");
- this_object()->print_menu_room_item();
- return 1;
- }
-
- map_delete (room_items_map, roomitemlist[index]);
-
- this_object()->print_menu_room_item();
- return 1;
- }
-
- //====================================================
- //= Prints the Add Smell menu =
- //====================================================
-
- int print_menu_room_smell() {
- write(" Smell Menu\n"
- "===========\n\n"
- "1. Add a single smell\n"
- "2. Add multiple smells with same description\n"
- "3. Remove Smell.\n"
- "c. Clear Smells\n"
- "p. Return to previous menu.\n\n"
- "Please rememeber to AddItem or SetItems the thing "
- "to be smelled, or your room may not load. If it's "
- "the \"default\" smell, then adding that isn't necessary.\n\n"
- "Enter your choice: ");
- input_to("process_room_smell");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Smell Menu =
- //====================================================
-
- int process_room_smell(string str) {
- string *roomsmelllist = keys (room_smells_map);
- int smellsize = 0;
- int tempindex = 0;
- string stempindex;
- switch(str) {
- case "1":
- write("Enter item name: ");
- input_to("set_room_smell_single");
- return 1;
- case "2":
- write("Enter first item: ");
- input_to("set_room_smell_multiple");
- return 1;
- case "3":
- smellsize = sizeof(roomsmelllist);
- write(" Smells\n");
- for(int counter = 0; counter < smellsize; counter++) {
- tempindex = counter + 1;
- stempindex = (string)tempindex;
- write(stempindex + ". " + roomsmelllist[counter]);
- }
- write("Enter Smell number to remove: ");
- input_to("remove_smell");
- return 1;
- case "c":
- room_smells_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_smell");
- }
- return 1;
- }
- }
-
- int remove_smell(string str) {
- int index;
- string *roomsmelllist = ({});
- int smellsize = -1;
- sscanf(str, "%d", index);
- if (index <= 0) {
- write("Invalid choice.");
- this_object()->print_menu_room_smell();
- return 1;
- }
-
- index--;
-
- roomsmelllist = keys (room_smells_map);
- smellsize = sizeof(roomsmelllist);
-
- if(index >= smellsize) {
- write("Invalid choice.");
- this_object()->print_menu_room_smell();
- return 1;
- }
-
- map_delete (room_smells_map, roomsmelllist[index]);
-
- this_object()->print_menu_room_smell();
- return 1;
- }
-
- //====================================================
- //= Prints the Add Listen menu =
- //====================================================
-
- int print_menu_room_listen() {
- write(" Listen Menu\n"
- "===========\n\n"
- "1. Add a single listen\n"
- "2. Add multiple listens with same description\n"
- "3. Remove Listen\n"
- "c. Clear Listens\n"
- "p. Return to previous menu.\n\n"
- "Please rememeber to AddItem or SetItems the thing "
- "to be listened to, or your room may not load. If it's "
- "the \"default\" listen, then adding that isn't necessary.\n\n"
- "Enter your choice: ");
- input_to("process_room_listen");
- return 1;
- }
-
- //====================================================
- //= Processes the Add Listen Menu =
- //====================================================
-
- int process_room_listen(string str) {
- string *roomlistenlist = keys (room_listens_map);
- int listensize = 0;
- int tempindex = 0;
- string stempindex;
- switch(str) {
- case "1":
- write("Enter item name: ");
- input_to("set_room_listen_single");
- return 1;
- case "2":
- write("Enter first item: ");
- input_to("set_room_listen_multiple");
- return 1;
- case "3":
- listensize = sizeof(roomlistenlist);
- write(" Listen List\n");
- for(int counter = 0; counter < listensize; counter++) {
- tempindex = counter + 1;
- stempindex = (string)tempindex;
- write(stempindex + ". " + roomlistenlist[counter]);
- }
- write("Enter Listen number to remove: ");
- input_to("remove_listen");
- return 1;
- case "c":
- room_listens_map = ([]);
- this_object()->print_menu_room_create();
- return 1;
- case "p":
- this_object()->print_menu_room_create();
- return 1;
- default:
- if (process_default(str) == 0) {
- write("Invalid Choice. Try again.");
- input_to("process_room_listen");
- }
- return 1;
- }
- }
-
- int remove_listen(string str) {
- int index;
- string *roomlistenlist = ({});
- int listensize = -1;
- sscanf(str, "%d", index);
- if (index <= 0) {
- write("Invalid choice.");
- this_object()->print_menu_room_listen();
- return 1;
- }
-
- index--;
-
- roomlistenlist = keys (room_listens_map);
- listensize = sizeof(roomlistenlist);
-
- if(index >= listensize) {
- write("Invalid choice.");
- this_object()->print_menu_room_listen();
- return 1;
- }
-
- map_delete (room_listens_map, roomlistenlist[index]);
-
- this_object()->print_menu_room_listen();
- return 1;
- }
-
- //====================================================
- //= Sets the town variable =
- //====================================================
-
- int set_attribute_helper (string str, string keyname) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- room_attributes_map[keyname] = str;
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int set_town(string str) {
- return set_attribute_helper (str, "Town");
- }
-
- //====================================================
- //= Sets the short variable =
- //====================================================
-
- int set_short(string str) {
- return set_attribute_helper (str, "Short Desc");
- }
-
- //====================================================
- //= Sets the obvious variable =
- //====================================================
-
- int set_obvious(string str) {
- return set_attribute_helper (str, "Obvious Exits");
- }
-
- //====================================================
- //= Sets the night light =
- //====================================================
-
- int set_nightlight(string str) {
- set_attribute_helper (str, "Light Level (Night)");
- }
-
- //====================================================
- //= Functions to set properties =
- //====================================================
-
- int set_light(string str) {
- set_attribute_helper (str, "Light Level (Day)");
- }
-
- int toggle_helper (string keyname) {
- if( room_properties_map[keyname] == "0" ) {
- room_properties_map[keyname] = "1";
- } else {
- room_properties_map[keyname] = "0";
- }
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int toggle_attack() {
- return toggle_helper ("no attack");
- }
-
- int toggle_bump() {
- return toggle_helper ("no bump");
- }
-
- int toggle_steal() {
- return toggle_helper ("no steal");
- }
-
- int toggle_magic() {
- return toggle_helper ("no magic");
- }
-
- int toggle_paralyze() {
- return toggle_helper ("no paralyze");
- }
-
- int toggle_teleport() {
- return toggle_helper ("no teleport");
- }
-
- //====================================================
- //= Sets the Long description =
- //====================================================
-
- int set_long_description_helper (string str, string keyname, string functionname)
- {
- string file;
- string contents;
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- if(sscanf(str, "load %s", file) == 1) {
- if(!(contents = read_file(file))) {
- write("Invalid text file.");
- this_object()->print_menu_room_create();
- return 1;
- }
- room_attributes_map[keyname] = contents;
- this_object()->print_menu_room_create();
- return 1;
- }
- if(str == "q") {
- // remove the trailing endline.
- sscanf (room_attributes_map[keyname], "%s%*(\\\\n$)", contents);
- room_attributes_map[keyname] = contents;
- this_object()->print_menu_room_create();
- return 1;
- }
- room_attributes_map[keyname] = room_attributes_map[keyname] + str + "\\n";
- input_to(functionname);
- return 1;
- }
-
- int set_long(string str) {
- return set_long_description_helper (str, "Long Desc (Day)", "set_long");
- }
-
- //====================================================
- //= Sets the Night Long description =
- //====================================================
-
- int set_nightlong(string str) {
- return set_long_description_helper (str, "Long Desc (Night)", "set_nightlong");
- }
-
- //====================================================
- //= Sets the exit =
- //====================================================
-
- int set_room_exit(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = "\"" + str + "\"";
- write("Enter room filename: ");
- input_to("set_room_exit_helper");
- return 1;
- }
-
- int set_room_exit_helper(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- room_exits_map[tempdir] = prefix + "\"" + str + "\"";
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int remove_exit(string str) {
- int index = -1;
- string *exitkeys = ({});
- sscanf(str, "%d", index);
- if (index <= 0) {
- write ("Invalid choice.");
- this_object()->print_menu_room_exits();
- return 1;
- }
-
- // decrement the index
- index--;
-
- // We have the input index and the key array
- exitkeys = keys (room_exits_map);
-
- if (index >= sizeof (exitkeys)) {
- write ("Invalid choice.");
- this_object()->print_menu_room_exits();
- return 1;
- }
-
- map_delete (room_exits_map, exitkeys[index]);
-
- this_object()->print_menu_room_exits();
- return 1;
- }
-
- //====================================================
- //= Sets the enter =
- //====================================================
-
- int set_room_enter(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = "\"" + str + "\"";
- write("Enter room filename: ");
- input_to("set_room_enter_helper");
- return 1;
- }
-
- int set_room_enter_helper(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- room_enters_map[tempdir] = prefix + "\"" + str + "\"";
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int remove_enter(string str) {
- int index = -1;
- string *enterkeys = ({});
- sscanf(str, "%d", index);
- if (index <= 0) {
- write ("Invalid choice.");
- this_object()->print_menu_room_enters();
- return 1;
- }
-
- // decrement the index
- index--;
-
- // We have the input index and the key array
- enterkeys = keys (room_enters_map);
-
- if (index >= sizeof (enterkeys)) {
- write ("Invalid choice.");
- this_object()->print_menu_room_enters();
- return 1;
- }
-
- map_delete (room_enters_map, enterkeys[index]);
-
- this_object()->print_menu_room_enters();
- return 1;
- }
-
- //====================================================
- //= Sets the inventory items =
- //====================================================
-
- int set_room_inventory(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = str;
- write("Enter number of objects to have: ");
- input_to("set_room_inventory_helper");
- return 1;
- }
-
- int set_room_inventory_helper(string str) {
- if(str == "c") {
- this_object()->print_menu_room_create();
- return 1;
- }
- room_inventory_map[prefix + "\"" + tempdir + "\""] = str;
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int remove_inventory(string str) {
- int index;
- string *invlist = ({});
- int invsize = -1;
- sscanf(str, "%d", index);
- if (index <= 0) {
- write("Invalid choice.");
- this_object()->print_menu_room_inventory();
- return 1;
- }
-
- index--;
-
- invlist = keys (room_inventory_map);
- invsize = sizeof(invlist);
-
- if(index >= invsize) {
- write("Invalid choice.");
- this_object()->print_menu_room_inventory();
- return 1;
- }
-
- map_delete(room_inventory_map, invlist[index]);
-
- this_object()->print_menu_room_inventory();
- return 1;
- }
-
- //====================================================
- //= Sets the Items =
- //====================================================
-
- int set_room_description_helper (string str, mapping room_map, string functionname) {
- string finaldescription = "";
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
-
- if(str == "q") {
- string array_string = "";
- // We need to remove the ending endline.
- sscanf (objectdescription, "%s%*(\\\\n$)", finaldescription);
- finaldescription = "\"" + finaldescription + "\"";
- write(get_stack());
- if(sizeof(multi_item_array)){
- foreach(string element in multi_item_array){
- if(array_string == "") array_string = "({";
- array_string += "\""+element+"\"";
- if(multi_item_array[sizeof(multi_item_array)-1] == element){
- array_string += "})";
- }
- else array_string += ",";
- }
- }
- if(array_string == "") array_string = tempdir;
- room_map[array_string] = finaldescription;
-
- // clear the array now
- multi_item_array = ({});
- // Clear the temp variables now.
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
-
- objectdescription = objectdescription + str + "\\n";
- input_to(functionname);
- return 1;
- }
-
- int set_room_item_single(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = "\"" + str + "\"";
- write("Enter item description. End with q on a blank line.: ");
- input_to("set_room_item_description");
- return 1;
- }
-
- int set_room_item_description(string str) {
- return set_room_description_helper (str, room_items_map, "set_room_item_description");
- }
-
- int set_room_item_multiple(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
- if(str == "q") {
- write("Enter item description. End with q on a blank line: ");
- input_to("set_room_item_description");
- return 1;
- }
- multi_item_array += ({ str });
- write("Enter next item or type q to end");
- input_to("set_room_item_multiple");
- return 1;
- }
-
- //====================================================
- //= Sets the Smells =
- //====================================================
-
- int set_room_smell_single(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = "\"" + str + "\"";
- write("Enter smell description. End with q on a blank line.: ");
- input_to("set_room_smell_description");
- return 1;
- }
-
- int set_room_smell_description(string str) {
- return set_room_description_helper (str, room_smells_map, "set_room_smell_description");
- }
-
- int set_room_smell_multiple(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
-
- if(str == "q") {
- write("Enter smell description. End with q on a blank line: ");
- input_to("set_room_smell_description");
- return 1;
- }
-
- multi_item_array += ({ str });
- write("Enter next item or type q to end");
- input_to("set_room_smell_multiple");
- return 1;
- }
-
- //====================================================
- //= Sets the Listens =
- //====================================================
-
- int set_room_listen_single(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
- tempdir = "\"" + str + "\"";
- write("Enter listen description. End with q on a blank line.: ");
- input_to("set_room_listen_description");
- return 1;
- }
-
- int set_room_listen_description(string str) {
- return set_room_description_helper (str, room_listens_map, "set_room_listen_description");
- }
-
- int set_room_listen_multiple(string str) {
- if(str == "c") {
- reset_temps ();
- this_object()->print_menu_room_create();
- return 1;
- }
-
- if(str == "q") {
- write("Enter listen description. End with q on a blank line: ");
- input_to("set_room_listen_description");
- return 1;
- }
-
- multi_item_array += ({ str });
- write("Enter next listen or type q to end");
- input_to("set_room_listen_multiple");
- return 1;
- }
-
- //====================================================
- //= Sets the default directory =
- //====================================================
-
- int set_defaultdir_helper(string str) {
- int index;
- index = strlen(str);
- if (index <= 0) {
- // The user just pressed enter. Change it to the
- // current working directory.
- defaultdir = (string)this_player()->query_cwd();
- return 1;
- }
- index--;
- if(str[index] != '/') str = str + "/";
- defaultdir = str;
- return 1;
- }
-
- int set_defaultdir(string str) {
- if(str == "c") {
- write("Change cancelled.");
- this_object()->print_menu_room_create();
- return 1;
- }
- set_defaultdir_helper (str);
- this_object()->print_menu_room_create();
- return 1;
- }
-
- int set_defaultdir_main(string str) {
- if(str == "c") {
- write("Change cancelled.");
- this_object()->print_menu_main();
- return 1;
- }
- set_defaultdir_helper (str);
- this_object()->print_menu_main();
- return 1;
- }
-
-
-
- //====================================================
- //= Writes all the stuff to the room file =
- //====================================================
-
- int write_to_file(string str) {
- if(str == "q") {
- write("Write cancelled");
- this_object()->print_menu_room_create();
- return 1;
- }
- str = defaultdir+str;
- reset_room_header ();
- globalstr = str;
- globalstr2 = header +
- //unguarded( (: write_file(globalstr, header +
- " SetTown(\"" + room_attributes_map["Town"] + "\");\n" +
- " SetClimate(\"" + room_attributes_map["Climate"] + "\");\n";
-
- if(!check_prop(room_attributes_map["Long Desc (Night)"])) {
- globalstr2 += " SetAmbientLight(" + room_attributes_map["Light Level (Day)"] + ");\n";
- }
- else {
- globalstr2 += " SetDayLight(" + room_attributes_map["Light Level (Day)"] + ");\n"+
- " SetNightLight(" + room_attributes_map["Light Level (Night)"] + ");\n";
- }
-
- globalstr2 += " SetShort(\"" + room_attributes_map["Short Desc"] + "\");\n";
-
- if(!check_prop(room_attributes_map["Long Desc (Night)"])){
- globalstr2 += " SetLong(\"" + room_attributes_map["Long Desc (Day)"] + "\");\n";
- }
- else {
-
- globalstr2 += " SetDayLong(\"" + room_attributes_map["Long Desc (Day)"] + "\");\n" +
- " SetNightLong(\"" + room_attributes_map["Long Desc (Night)"] + "\");\n";
- }
-
- globalstr2 += print_properties_for_file () +
- print_room_items_for_file () +
- print_room_inventory_for_file () +
- " SetObviousExits(\"" + room_attributes_map["Obvious Exits"] + "\");\n" +
- print_room_exits_for_file () +
- print_room_enters_for_file () +
- "//funs\n" +
- extrafuns +
- "//snuf\n" +
- "}\n" +
- "void init() {\n::init();\n" +
- print_room_smells_for_file () +
- print_room_listens_for_file () +
- "}\n" +
- "//extras\n" +
- tail;
- unguarded( (: write_file(globalstr, globalstr2, 1) :) );
-
- write("\nRoom written to: " + str + "\n");
- this_object()->print_menu_room_create();
- return 1;
- }
-
- //=================================================
- //= Room Loading Section =
- //=================================================
-
- int get_town(string str) {
- sscanf(str, "%*sSetTown(\"%s\");%*s", room_attributes_map["Town"]);
- return 1;
- }
-
- int get_climate(string str) {
- sscanf(str, "%*sSetClimate(\"%s\");%*s", room_attributes_map["Climate"]);
- return 1;
- }
-
- int get_short(string str) {
- sscanf(str, "%*sSetShort(\"%s\");%*s", room_attributes_map["Short Desc"]);
- return 1;
- }
-
- int get_daylong(string str) {
- if(sscanf(str, "%*sSetDayLong(\"%s\");%*s", room_attributes_map["Long Desc (Day)"]) == 0) {
- sscanf(str, "%*sSetLong(\"%s\");%*s", room_attributes_map["Long Desc (Day)"]);
- }
- return 1;
- }
-
- int get_nightlong(string str) {
- if(strsrch(str,"SetNightLong")){
- sscanf(str, "%*sSetNightLong(\"%s\");%*s", room_attributes_map["Long Desc (Night)"]);
- }
- return 1;
- }
-
- int get_daylight(string str) {
- if(sscanf(str, "%*sSetDayLight(%s);%*s", room_attributes_map["Light Level (Day)"]) == 0){
- sscanf(str, "%*sSetAmbientLight(%s);%*s", room_attributes_map["Light Level (Day)"]);
- }
- return 1;
- }
-
- int get_nightlight(string str) {
- if(strsrch(str,"SetNightLight")){
- sscanf(str, "%*sSetNightLight(%s);%*s", room_attributes_map["Light Level (Night)"]);
- }
- return 1;
- }
-
- void add_map_to_mapping (mapping room_map, string inputstring) {
- // We need to split up items, and add them to room_map
- string *itemlist = explode (inputstring, ", ");
- string strKey = "";
- string strValue = "";
- for (int counter = 0; counter < sizeof (itemlist); counter++) {
- strKey = "";
- strValue = "";
- sscanf (itemlist[counter], "%s:%s", strKey, strValue);
-
- //sscanf (itemlist[counter], "%*s\"%s\"%*s:%*s\"%s\"%*s", strKey, strValue);
- if (strlen (strKey) > 0) {
- room_map[strKey] = strValue;
- }
- }
- }
-
- int get_items(string str) {
- string strItems, key, val;
- string *elements;
- if(sscanf(str, "%*sSetItems(([%s]));%*s", strItems) < 1) {
- return 1;
- }
- //elements = explode(strItems," ,\\n");
- elements = explode(strItems," ,");
- if(!elements) elements = ({ strItems });
- if(!elements) {
- return 1;
- }
- foreach(string element in elements){
- if(sscanf(element, "%s : %s", key, val ) < 2) break;
- room_items_map[key] = val;
- }
- return 1;
- }
-
- int get_smell(string str) {
- string strItems = "";
- sscanf(str, "%*sSetSmell(([%s]));%*s", strItems);
- add_map_to_mapping (room_smells_map, strItems);
- return 1;
- }
-
- int get_listen(string str) {
- string strItems = "";
- sscanf(str, "%*sSetListen(([%s]));%*s", strItems);
- add_map_to_mapping (room_listens_map, strItems);
- return 1;
- }
-
- string strip_whitespaces (string str) {
- string temp = "";
- string final = "";
- sscanf (str, "%*(^ *)%s", temp);
- sscanf (temp, "%s%*( *$)", final);
- return final;
- }
-
- int get_inventory(string str) {
- string strItems = "";
- string strKey = "";
- string strValue = "";
- string *itemlist;
- sscanf(str, "%*sSetInventory(([%s]));%*s", strItems);
- // We need to split up items, and add them to room_map
- itemlist = explode (strItems, ",");
- for (int counter = 0; counter < sizeof (itemlist); counter++) {
- strKey = "";
- strValue = "";
- sscanf (itemlist[counter], "%s:%s", strKey, strValue);
- strKey = strip_whitespaces (strKey);
- strValue = strip_whitespaces (strValue);
- if (strlen (strKey) > 0) {
- room_inventory_map[strKey] = strValue;
- }
- }
- return 1;
- }
-
- int get_obviousexits(string str) {
- sscanf(str, "%*sSetObviousExits(\"%s\");%*s", room_attributes_map["Obvious Exits"]);
- return 1;
- }
-
- int get_properties(string str) {
- string fixedstring = "";
- sscanf(str,
- "%*s\"no attack\":%s,"
- "%*s\"no bump\":%s,"
- "%*s\"no steal\":%s,"
- "%*s\"no magic\":%s,"
- "%*s\"no paralyze\":%s,"
- "%*s\"no teleport\":%s]",
- room_properties_map["no attack"],
- room_properties_map["no bump"],
- room_properties_map["no steal"],
- room_properties_map["no magic"],
- room_properties_map["no paralyze"],
- room_properties_map["no teleport"]);
- if (sscanf (room_properties_map["no teleport"], "%s\n", fixedstring) == 1) {
- room_properties_map["no teleport"] = fixedstring;
- }
- return 1;
- }
-
- int get_exits(string str) {
- string *exittemp = explode(str, ";");
- string exitarguments = "";
- string strDirection = "";
- string strFile = "";
- for(int counter = 0; counter < sizeof(exittemp); counter++) {
- strDirection = "";
- strFile = "";
- sscanf(exittemp[counter], "%*sAddExit(%s)%*s", exitarguments);
- // Exit can have more than two arguments. We need to check for that
- if (sscanf(exitarguments, "\"%s\", %s,", strDirection, strFile) != 2) {
- sscanf (exitarguments, "\"%s\", %s", strDirection, strFile);
- }
- if (strlen (strDirection) > 0) {
- strDirection = "\"" + strDirection + "\"";
- room_exits_map[strDirection] = strFile;
- }
- }
- return 1;
- }
-
- int get_enters(string str) {
- string *entertemp = explode(str, ";");
- string enterarguments = "";
- string strDirection = "";
- string strFile = "";
- for(int counter = 0; counter < sizeof(entertemp); counter++) {
- strDirection = "";
- strFile = "";
- sscanf(entertemp[counter], "%*sAddEnter(%s)%*s", enterarguments);
- // Enter can have more than two arguments. We need to check for that
- if (sscanf(enterarguments, "\"%s\", %s,", strDirection, strFile) != 2) {
- sscanf (enterarguments, "\"%s\", %s", strDirection, strFile);
- }
- if (strlen (strDirection) > 0) {
- strDirection = "\"" + strDirection + "\"";
- room_enters_map[strDirection] = strFile;
- }
- }
- return 1;
- }
-
- int get_header(string str) {
- sscanf(str, "%s::create%*s", header);
- header = header + "::create();\n";
- return 1;
- }
-
- int get_tail(string str) {
- if(sscanf(str, "%*s//extras\n%s", tail) != 2) {
- tail = "";
- }
- return 1;
- }
-
- int get_extrafuns(string str) {
- if(sscanf(str, "%*s//funs\n%s//snuf%*s", extrafuns) != 3) {
- extrafuns = "";
- }
- return 1;
- }
-
- int read_room(string str) {
- string file;
- str = defaultdir+str;
-
- if(file_size(str) < 0) {
- write("Invalid file. Perhaps you forgot to add \".c\"? Please try again.");
- this_object()->print_menu_main();
- return 1;
- }
- if(!(file = read_file(str))) {
- write("A permissons error occurred. You'll have to start over.");
- this_object()->print_menu_main();
- return 1;
- }
- get_town(file);
- get_climate(file);
- get_short(file);
- get_daylong(file);
- get_nightlong(file);
- get_daylight(file);
- get_nightlight(file);
- get_items(file);
- get_smell(file);
- get_listen(file);
- get_inventory(file);
- get_obviousexits(file);
- get_properties(file);
- get_exits(file);
- get_enters(file);
- get_header(file);
- get_tail(file);
- get_extrafuns(file);
- this_object()->print_menu_room_create();
- return 1;
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/secure/obj/snooper.c ds2.1/lib/secure/obj/snooper.c
*** ds2.0r28/lib/secure/obj/snooper.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/obj/snooper.c Tue Jul 11 18:36:30 2006
***************
*** 37,43 ****
void heart_beat(){
object dude;
if(!guy || !(dude = find_player(guy))) {
- //tc("I can't find "+guy);
eventDestruct();
}
if(dude && environment(dude) && base_name(environment(dude)) == ROOM_FREEZER) eventDestruct();
--- 37,42 ----
***************
*** 56,62 ****
int eventStartSnoop(string str){
string snoopee;
if(!str || str == "") return 0;
- //tc("thingy: "+str);
snoopee = "nobody";
str = lower_case(str);
guy = str;
--- 55,60 ----
***************
*** 64,70 ****
if(!ob=find_player(str)) { write("Target not found."); return; }
unguarded((: write_file("/secure/log/adm/snoop.err",snoop(this_object(), ob)?"":guy+": snoop failed.\n") :));
if(query_snooping(this_object())) snoopee = identify(query_snooping(this_object()));
- //tc("I am: "+identify(this_object())+", and I am snooping: "+snoopee);
SNOOP_D->RegisterSnooper();
write_file("/secure/log/adm/"+str+".log","\nNEW SESSION: "+timestamp()+"\n");
return 1;
--- 62,67 ----
diff -c -r --new-file ds2.0r28/lib/secure/room/arch.c ds2.1/lib/secure/room/arch.c
*** ds2.0r28/lib/secure/room/arch.c Wed Jul 5 00:48:30 2006
--- ds2.1/lib/secure/room/arch.c Tue Jul 11 18:36:30 2006
***************
*** 19,25 ****
}
ret += "%^RED%^Muds, alive or dead, test or production, that tried Dead Souls:%^RESET%^\n";
foreach(string mud in all_dead_souls){
! ret += mud + "\t\t" +MudMap2[mud][5] + "\n";
}
ret += "\nTotal: "+sizeof(all_dead_souls);
write_file(tmpfile,ret);
--- 19,25 ----
}
ret += "%^RED%^Muds, alive or dead, test or production, that tried Dead Souls:%^RESET%^\n";
foreach(string mud in all_dead_souls){
! ret += mud + "\t\t" +MudMap2[mud][5] + "%^RESET%^\n";
}
ret += "\nTotal: "+sizeof(all_dead_souls);
write_file(tmpfile,ret);
***************
*** 57,81 ****
ret += "%^GREEN%^Muds running the current version of Dead Souls:%^RESET%^\n";
foreach(string mud in good_muds){
if(mud != "DeadSoulsWin")
! ret += mud + "\t\t" +MudMap[mud][5] + "\n";
}
}
if(!grepp(ret,"current version") || !grepp(canonical,mudlib_version())){
ret += "\n%^CYAN%^Muds running our version of Dead Souls:%^RESET%^\n";
foreach(string mud in dead_keys){
! ret += mud + "\t\t" +MudMap[mud][5] + "\n";
}
}
ret += "\n%^RED%^Muds running any version of Dead Souls:%^RESET%^\n";
foreach(string mud in all_dead_keys){
! ret += mud + "\t\t" +MudMap[mud][5] + "\n";
}
ret += "\nTotal: "+sizeof(all_dead_keys);
ret+= "\n\n%^YELLOW%^Dead Souls muds online:%^RESET%^ \n";
foreach(string mud in online_muds){
! ret += mud + "\t\t" +MudMap[mud][5] + "\n";
}
write_file(tmpfile,ret);
--- 57,81 ----
ret += "%^GREEN%^Muds running the current version of Dead Souls:%^RESET%^\n";
foreach(string mud in good_muds){
if(mud != "DeadSoulsWin")
! ret += mud + "\t\t" +MudMap[mud][5] + "%^RESET%^\n";
}
}
if(!grepp(ret,"current version") || !grepp(canonical,mudlib_version())){
ret += "\n%^CYAN%^Muds running our version of Dead Souls:%^RESET%^\n";
foreach(string mud in dead_keys){
! ret += mud + "\t\t" +MudMap[mud][5] + "%^RESET%^\n";
}
}
ret += "\n%^RED%^Muds running any version of Dead Souls:%^RESET%^\n";
foreach(string mud in all_dead_keys){
! ret += mud + "\t\t" +MudMap[mud][5] + "%^RESET%^\n";
}
ret += "\nTotal: "+sizeof(all_dead_keys);
ret+= "\n\n%^YELLOW%^Dead Souls muds online:%^RESET%^ \n";
foreach(string mud in online_muds){
! ret += mud + "\t\t" +MudMap[mud][5] + "%^RESET%^\n";
}
write_file(tmpfile,ret);
diff -c -r --new-file ds2.0r28/lib/secure/sefun/base_name.c ds2.1/lib/secure/sefun/base_name.c
*** ds2.0r28/lib/secure/sefun/base_name.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/base_name.c Tue Jul 11 18:36:30 2006
***************
*** 7,13 ****
string base_name(mixed val) {
string name, base;
int borg;
- //tc("val: "+identify(val)+", which is: "+typeof(val),"green");
if(!val) return "";
if(objectp(val)) name = file_name(val);
else if(val == "") return "";
--- 7,12 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/findobs.c ds2.1/lib/secure/sefun/findobs.c
*** ds2.0r28/lib/secure/sefun/findobs.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/findobs.c Tue Jul 11 18:36:30 2006
***************
*** 35,43 ****
if(!file_exists(arg)) return -1;
source = truncate(arg,2);
}
- //tc("source: "+source);
targets = filter(objects(), (: inherits(source, $1) :) );
- //tc("targetsize: "+sizeof(targets));
if(sizeof(targets)) return targets;
else return ({});
}
--- 35,41 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/load_object.c ds2.1/lib/secure/sefun/load_object.c
*** ds2.0r28/lib/secure/sefun/load_object.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/load_object.c Tue Jul 11 18:36:30 2006
***************
*** 18,57 ****
int update(string file){
object ob;
- //tc("previous obs: "+identify(previous_object(-1)),"red");
if(!file_exists(file)) file += ".c";
if(!file_exists(file)) return 1;
- //tc("file: "+file);
if(last(file,2) == ".c") file = truncate(file,2);
- //tc("file: "+file);
if(ob = find_object(file)) {
global_load_ob = ob;
- //tc("ob = find_object(file) is true. about to dest file.");
unguarded( (: global_load_ob->eventDestruct() :) );
}
if(find_object(file)) {
- //tc("hmmm1. it's still there. let's try to destruct it again.");
if(find_object(file)) destruct(ob);
}
if(find_object(file)) {
- //tc("hmmm2, wtf. ok let's try to reap it");
if(find_object(file)) reap_other();
}
if(find_object(file)) {
- //tc("hmmm3, well i dont get it. we're gonna give up destroying it.");
return 2;
}
- //tc("ok so it's destroyed. now let's load it.");
catch(call_other(file, "???"));
if(!find_object(file)) {
- //tc("the call_other didn't load it. odd. let's try the load_object sefun");
load_object(file);
}
if(!find_object(file)) {
- //tc("erm....wtf. it's still not loaded. fuck this.");
return 3;
}
- //tc("success!!","green");
return 4;
}
--- 18,46 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/messaging.c ds2.1/lib/secure/sefun/messaging.c
*** ds2.0r28/lib/secure/sefun/messaging.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/messaging.c Tue Jul 11 18:36:30 2006
***************
*** 343,351 ****
}
switch(words[i]) {
case "$agent_verb":
- //words[i] = pluralize(replace_string(identify(verb),"\"",""));
- //tc("verb: "+identify(verb));
- //tc("verb: "+typeof(verb));
words[i] = ""+pluralize(verb[0]);
break;
--- 343,348 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/mud_info.c ds2.1/lib/secure/sefun/mud_info.c
*** ds2.0r28/lib/secure/sefun/mud_info.c Wed Jul 5 20:52:30 2006
--- ds2.1/lib/secure/sefun/mud_info.c Tue Jul 11 18:36:31 2006
***************
*** 27,33 ****
string mudlib() { return "Dead Souls"; }
! string mudlib_version() { return "2.0r28"; }
int query_host_port() { return __PORT__; }
--- 27,33 ----
string mudlib() { return "Dead Souls"; }
! string mudlib_version() { return "2.1"; }
int query_host_port() { return __PORT__; }
diff -c -r --new-file ds2.0r28/lib/secure/sefun/query_names.c ds2.1/lib/secure/sefun/query_names.c
*** ds2.0r28/lib/secure/sefun/query_names.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/query_names.c Tue Jul 11 18:36:31 2006
***************
*** 27,32 ****
}
int answers_to(string name, object what){
if(member_array(lower_case(name),query_names(what)) != -1) return 1;
! else return 0;
}
--- 27,53 ----
}
int answers_to(string name, object what){
+ string *adjs = what->GetAdjectives();
+ string *preargs = ({});
+ string s1,s2,s3,s4;
+ int hits;
if(member_array(lower_case(name),query_names(what)) != -1) return 1;
! if(!sizeof(adjs)) return 0;
! hits = sscanf(name,"%s %s %s %s",s1, s2, s3, s4);
! if(hits < 4) hits = sscanf(name,"%s %s %s",s1, s2, s3);
! if(hits < 3) hits = sscanf(name,"%s %s",s1, s2);
! if(!hits) return 0;
! hits--;
! if(sizeof(s1)) preargs += ({s1});
! if(sizeof(s2)) preargs += ({s2});
! if(sizeof(s3)) preargs += ({s3});
! if(sizeof(s4)) preargs += ({s4});
!
! if(member_array(preargs[hits],query_names(what)) == -1) return 0;
! preargs -= ({ preargs[hits] });
!
! foreach(string prearg in preargs){
! if(member_array(prearg, adjs) == -1) return 0;
! }
! return 1;
}
diff -c -r --new-file ds2.0r28/lib/secure/sefun/reload.c ds2.1/lib/secure/sefun/reload.c
*** ds2.0r28/lib/secure/sefun/reload.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/reload.c Tue Jul 11 18:36:31 2006
***************
*** 14,21 ****
object env;
mx = 0;
- //tc("ob: "+identify(ob),"red");
-
if(!ob) return 0;
if(objectp(ob) && environment(ob)) env = environment(ob);
--- 14,19 ----
***************
*** 32,38 ****
return 0;
}
- //tc("ob: "+identify(ob),"green");
if(ob->GetDoor() && sizeof(ob->GetDoor())) ob = load_object(ob->GetDoor());
if(!file_exists(base_name(ob))) filename = base_name(ob)+".c";
--- 30,35 ----
***************
*** 45,52 ****
write("This object lacks a working init function. Please run initfix on it as soon as possible.");
}
- //tc("ob: "+identify(ob),"blue");
-
if(inherits(LIB_ROOM,ob)){
dudes = get_livings(ob,1);
if(dudes) {
--- 42,47 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/security.c ds2.1/lib/secure/sefun/security.c
*** ds2.0r28/lib/secure/sefun/security.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/security.c Tue Jul 11 18:36:31 2006
***************
*** 52,67 ****
DomainsMap[where] = admins;
}
}
- //tc("I think pretender is: "+identify(pretender)+", type: "+typeof(pretender),"yellow");
if(!sizeof(DomainsMap[domain])) return 0;
admin_array = explode(DomainsMap[domain],":");
- //tc("will I return 0?");
if(member_array(lower_case(pretender), admin_array) == -1){
- //tc("about to return 0");
return 0;
}
else {
- //tc("about to return 1");
return 1;
}
}
--- 52,63 ----
***************
*** 85,99 ****
else x= 9;
if(stringp(target) && first_string_element(target,"/",1) == "domains"){
- //tc("entered new test sub","blue");
if(sscanf(target,"/domains/%s/%s", domain, junk) == 2){
- //tc("entered subsub","blue");
- //tc("pretender: "+identify(pretender),"white");
- //tc("domain: "+identify(domain),"white");
if(domain_admin(pretender, domain)) x = 19;
}
}
- //tc("x: "+x);
if(x < 10) return 0;
if(x > 10) return 1;
}
--- 81,90 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/sefun.c ds2.1/lib/secure/sefun/sefun.c
*** ds2.0r28/lib/secure/sefun/sefun.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/sefun.c Tue Jul 11 18:36:31 2006
***************
*** 80,86 ****
#include "/secure/sefun/compare_array.c"
#include "/secure/sefun/legacy.c"
-
object find_object( string str ){
if((int)master()->valid_apply(({ "SECURE", "ASSIST", "SNOOP_D" }))) return efun::find_object(str);
if(base_name(efun::find_object(str)) == "/secure/obj/snooper") return 0;
--- 80,85 ----
***************
*** 136,145 ****
int destruct(object ob) {
string *privs;
string tmp;
- //tc("destruct sefun being called. ob is: "+identify(ob)+".","red");
- //tc("this_object is: "+identify(this_object())+".","red");
- //tc("previous objects are: "+identify(previous_object(-1))+".","yellow");
- //tc("calling stack is: "+get_stack()+".","red");
if(previous_object(0) && previous_object(0) == ob) return efun::destruct(ob);
if(!(tmp = query_privs(previous_object(0)))) return 0;
--- 135,140 ----
diff -c -r --new-file ds2.0r28/lib/secure/sefun/sefun.h ds2.1/lib/secure/sefun/sefun.h
*** ds2.0r28/lib/secure/sefun/sefun.h Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/sefun.h Fri Jul 7 19:41:43 2006
***************
*** 214,218 ****
--- 214,219 ----
int assistp(mixed guy);
int elderp(object ob);
int testp(object ob);
+ string alpha_strip(mixed arg);
#endif /* l_sefun_h */
diff -c -r --new-file ds2.0r28/lib/secure/sefun/strings.c ds2.1/lib/secure/sefun/strings.c
*** ds2.0r28/lib/secure/sefun/strings.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/secure/sefun/strings.c Tue Jul 11 18:36:31 2006
***************
*** 414,440 ****
for(i=1; !done; i++){
line = read_file(filename, i, 1);
if(!line) break;
- //write("line: "+line);
if(strsrch(line,substring) != -1 ) omit =1;
- //tc("omit: "+omit);
if(omit && last(line[0..strlen(line)-2],1,1) != ";") {
tail_search = 1;
- //write("tail_search: "+tail_search);
}
else {
tail_search = 0;
if(omit) tag_it = 1;
- //tc("tail_search: "+tail_search+", tag_it: "+tag_it+", omit: "+omit);
}
if(!omit && !tail_search) {
new_file += line;
- //write("adding the line.");
}
if(tag_it == 1){
- //tc("adding the replace");
new_file += replace+"\n";
tag_it = 0;
}
--- 414,434 ----
***************
*** 594,600 ****
else if(creatorp(this_player())) ret = homedir(this_player())+"/tmp/"+randy+time()+".tmp";
else ret = "/open/"+randy+time()+".c";
- //tc("generate_tmp ret: "+ret);
return ret;
}
--- 588,593 ----
***************
*** 608,613 ****
--- 601,620 ----
return 0;
}
+ string alpha_strip(mixed arg){
+ string raw, ret;
+ string *blown;
+ if(!arg || pointerp(arg)) return "";
+ if(!sscanf(arg,"%s",raw)) return "";
+ if(!sizeof(raw)) return "";
+ blown = explode(raw,"");
+ ret = "";
+ foreach(string element in blown){
+ if(alphap(element)) ret += element;
+ }
+ return ret;
+ }
+
int numericp(mixed arg){
string *alphabet = ({"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"});
if(intp(arg)) arg = itoa(arg);
diff -c -r --new-file ds2.0r28/lib/secure/verbs/creators/force.c ds2.1/lib/secure/verbs/creators/force.c
*** ds2.0r28/lib/secure/verbs/creators/force.c Wed Dec 31 19:00:00 1969
--- ds2.1/lib/secure/verbs/creators/force.c Sun Jul 9 19:04:30 2006
***************
*** 0 ****
--- 1,43 ----
+ #include
+
+ inherit LIB_VERB;
+
+ static void create() {
+ verb::create();
+ SetVerb("force");
+ SetRules("LIV STR", "LIV to STR");
+ SetErrorMessage("Force whom to do what?");
+ SetHelp("Syntax: \n"
+ " \n"
+ "Allows you to command some living things to do "
+ "your bidding.");
+ }
+
+ mixed can_force_liv_to_str(string str) { return 1; }
+
+ mixed can_force_liv_str(string str) {
+ return can_force_liv_to_str(str);
+ }
+
+ mixed do_force_liv_to_str(object target, string cmd) {
+ object who = this_player();
+
+ if(!who) return 0;
+ if(archp(target) && !securep(who)){
+ who->eventPrint(target->GetName()+" shakes "+possessive(target)+
+ " head and forces you to dest yourself.");
+ tell_room(environment(who), who->GetName()+" dests "+objective(who)+
+ "self while trying to pull a foolish joke on "+target->GetName()+".", who);
+ tell_player(target,who->GetName()+" tried to force you to "+cmd);
+ who->eventDestruct();
+ return 1;
+ }
+ target->eventPrint(who->GetName() + " forces you to: " + cmd);
+ who->eventPrint("You force " + target->GetShort() + " to: " + cmd);
+ target->eventForce(cmd);
+ return 1;
+ }
+
+ mixed do_force_liv_str(object ob, string str) {
+ return do_force_liv_to_str(ob, str);
+ }
diff -c -r --new-file ds2.0r28/lib/spells/restoration.c ds2.1/lib/spells/restoration.c
*** ds2.0r28/lib/spells/restoration.c Wed Dec 31 19:00:00 1969
--- ds2.1/lib/spells/restoration.c Wed Jul 12 13:29:19 2006
***************
*** 0 ****
--- 1,83 ----
+ /* /spells/restoration.c
+ * From Dead Souls LPMud
+ * Created by BillGates of Money 961204
+ * Version: @(#) restoration.c 1.2@(#)
+ * Last modified: 96/12/04
+ */
+
+ #include
+ #include
+ #include
+
+ inherit LIB_SPELL;
+
+ static void create() {
+ spell::create();
+ SetSpell("restoration");
+ SetRules("", "LIV");
+ SetSpellType(SPELL_OTHER);
+ SetRequiredMagic(75);
+ SetRequiredStamina(50);
+ SetReligions("Lintokh", "Talima", "Monodeism");
+ SetSkills(([ "faith" : 15 ]));
+ SetMagicCost(10);
+ SetDifficulty(40);
+ SetMorality(5);
+ SetHelp("Syntax: \n"
+ " \n\n"
+ "This spell allows the caster to \"refresh\" his "
+ "or her target's stamina. The amount of stamina "
+ "refreshed depends solely on the magical powers of "
+ "the caster.\n\n");
+ }
+
+ varargs int CanCast(object who, int level, string limb, object array targs) {
+ object target = targs[0];
+ string targ_rel, my_rel;
+
+ targ_rel = target->GetReligion(1);
+ my_rel = who->GetReligion(1);
+ if( !(int)target->GetUndead() ) {
+ who->eventPrint((string)target->GetName() + " is not undead!");
+ return 0;
+ }
+ if( (int)who->ClassMember("cleric") ) return 1;
+ if( targ_rel != my_rel ) {
+ send_messages("are", "$target_name $target_verb not of ",
+ "$agent_possessive faith.",
+ who, target);
+ return 0;
+ }
+ return spell::CanCast(who, level, limb, targs);
+ }
+
+ varargs int eventCast(object who, int level, string limb, object array targs) {
+ object target = targs[0];
+ int chance = level + random((int)who->GetSkillLevel("healing"));
+ if( level < (30 + random(30)) ) {
+ target->AddStaminaPoints(-(int)target->GetStaminaPoints());
+ who->AddStaminaPoints(-(int)who->GetStaminaPoints());
+ who->eventPrint("You feel utterly drained as your "
+ "spell of restoration goes awry.", target);
+ target->eventPrint("You feel a draining effect as " +
+ possessive_noun(who) + " attempt to resurrect you "
+ "goes awry.", who);
+ environment(who)->eventPrint( (string)who->GetCapName()+" and "+
+ (string)target->GetCapName()+" both double over in pain "
+ "as "+possessive_noun(who)+" spell fails.",
+ ({ who, target }) );
+ who->AddMagicPoints(-(int)who->GetMagicPoints());
+ return 0;
+ }
+
+ send_messages(({ "bring" }), "$agent_name $agent_verb "
+ "$target_name back from the dead.",
+ who, target, environment(who));
+ target->eventRevive();
+ who->AddMagicPoints(-(int)who->GetMagicPoints());
+ return 1;
+ }
+
+ int GetMagicCost() {
+ return (int)this_player()->GetMagicPoints();
+ }
diff -c -r --new-file ds2.0r28/lib/spells/resurrection.c ds2.1/lib/spells/resurrection.c
*** ds2.0r28/lib/spells/resurrection.c Wed Jul 5 00:00:59 2006
--- ds2.1/lib/spells/resurrection.c Wed Dec 31 19:00:00 1969
***************
*** 1,83 ****
- /* /spells/resurrection.c
- * From Dead Souls LPMud
- * Created by BillGates of Money 961204
- * Version: @(#) resurrection.c 1.2@(#)
- * Last modified: 96/12/04
- */
-
- #include
- #include
- #include
-
- inherit LIB_SPELL;
-
- static void create() {
- spell::create();
- SetSpell("resurrection");
- SetRules("", "LIV");
- SetSpellType(SPELL_OTHER);
- SetRequiredMagic(75);
- SetRequiredStamina(50);
- SetReligions("Lintokh", "Talima", "Monodeism");
- SetSkills(([ "faith" : 15 ]));
- SetMagicCost(10);
- SetDifficulty(40);
- SetMorality(5);
- SetHelp("Syntax: \n"
- " \n\n"
- "This spell allows the caster to \"refresh\" his "
- "or her target's stamina. The amount of stamina "
- "refreshed depends solely on the magical powers of "
- "the caster.\n\n");
- }
-
- varargs int CanCast(object who, int level, string limb, object array targs) {
- object target = targs[0];
- string targ_rel, my_rel;
-
- targ_rel = target->GetReligion(1);
- my_rel = who->GetReligion(1);
- if( !(int)target->GetUndead() ) {
- who->eventPrint((string)target->GetName() + " is not undead!");
- return 0;
- }
- if( (int)who->ClassMember("cleric") ) return 1;
- if( targ_rel != my_rel ) {
- send_messages("are", "$target_name $target_verb not of ",
- "$agent_possessive faith.",
- who, target);
- return 0;
- }
- return spell::CanCast(who, level, limb, targs);
- }
-
- varargs int eventCast(object who, int level, string limb, object array targs) {
- object target = targs[0];
- int chance = level + random((int)who->GetSkillLevel("healing"));
- if( level < (30 + random(30)) ) {
- target->AddStaminaPoints(-(int)target->GetStaminaPoints());
- who->AddStaminaPoints(-(int)who->GetStaminaPoints());
- who->eventPrint("You feel utterly drained as your "
- "spell of resurrection goes awry.", target);
- target->eventPrint("You feel a draining effect as " +
- possessive_noun(who) + " attempt to resurrect you "
- "goes awry.", who);
- environment(who)->eventPrint( (string)who->GetCapName()+" and "+
- (string)target->GetCapName()+" both double over in pain "
- "as "+possessive_noun(who)+" spell fails.",
- ({ who, target }) );
- who->AddMagicPoints(-(int)who->GetMagicPoints());
- return 0;
- }
-
- send_messages(({ "bring" }), "$agent_name $agent_verb "
- "$target_name back from the dead.",
- who, target, environment(who));
- target->eventRevive();
- who->AddMagicPoints(-(int)who->GetMagicPoints());
- return 1;
- }
-
- int GetMagicCost() {
- return (int)this_player()->GetMagicPoints();
- }
--- 0 ----
diff -c -r --new-file ds2.0r28/lib/verbs/common/mail.c ds2.1/lib/verbs/common/mail.c
*** ds2.0r28/lib/verbs/common/mail.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/common/mail.c Tue Jul 11 18:36:31 2006
***************
*** 52,57 ****
--- 52,58 ----
"object.");
return 1;
}
+ this_player()->eventPrint("%^RED%^Remember!%^RESET%^ To end a post, enter a single period on an otherwise blank line, and then hit return.");
ob->start_post(str);
return 1;
}
***************
*** 61,69 ****
" \n"
" \n\n"
" \n\n"
! "Allows you to send mail to another player on this game or "
! "to a player on another game connected to the Intermud 3 "
! "system. Without arguments, you are simply set to read your "
"mail. With arguments, you are creating mail to be sent. "
"You may only read mail in your home town. The mailer will "
"properly route any mail you send to the proper home town "
--- 62,69 ----
" \n"
" \n\n"
" \n\n"
! "Allows you to send mail to another player on this game. "
! "Without arguments, you are simply set to read your "
"mail. With arguments, you are creating mail to be sent. "
"You may only read mail in your home town. The mailer will "
"properly route any mail you send to the proper home town "
diff -c -r --new-file ds2.0r28/lib/verbs/creators/copy.c ds2.1/lib/verbs/creators/copy.c
*** ds2.0r28/lib/verbs/creators/copy.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/creators/copy.c Fri Jul 7 19:41:43 2006
***************
*** 41,47 ****
write("in your workroom.");
return 1;
}
!
if(userp(ob)){
write("No.");
return 1;
--- 41,48 ----
write("in your workroom.");
return 1;
}
! //debug("str: ",str);
! //debug("path_prefix(str): ",path_prefix(str));
if(userp(ob)){
write("No.");
return 1;
***************
*** 51,57 ****
targetfile = "";
if(last(str,2) != ".c") str += ".c";
str = absolute_path((string)this_player()->query_cwd(), str);
! if( !directory_exists(path_prefix(str)) ) return "Directory not found.";
sourcefile = base_name(ob)+".c";
targetfile = str;
--- 52,63 ----
targetfile = "";
if(last(str,2) != ".c") str += ".c";
str = absolute_path((string)this_player()->query_cwd(), str);
! //debug("str: ",str);
! //debug("path_prefix(str): ",path_prefix(str));
! if( !directory_exists(path_prefix(str)) ) {
! write("Directory not found.");
! return 1;
! }
sourcefile = base_name(ob)+".c";
targetfile = str;
***************
*** 74,80 ****
}
mixed do_copy_str(string str) {
! string tmp, new_room;
mixed source_update;
object staff;
staff = present("tanstaafl",this_player());
--- 80,86 ----
}
mixed do_copy_str(string str) {
! string str2, tmp, new_room;
mixed source_update;
object staff;
staff = present("tanstaafl",this_player());
***************
*** 84,93 ****
write("in your workroom.");
return 1;
}
if(last(str,2) != ".c") str += ".c";
! str = absolute_path((string)this_player()->query_cwd(), str);
! if( !file_exists(str) ) return "File " + str + " not found.";
else if( !(tmp = read_file(str)) || !tmp || tmp == ""){
write("Unable to read file " + str + ".");
return 1;
--- 90,115 ----
write("in your workroom.");
return 1;
}
+ //debug("str: ",str,"yellow");
+ str2 = str;
+ str = absolute_path((string)this_player()->query_cwd(), str);
+ //debug("str: ",str,"yellow");
+
+ //debug("path_prefix(str): ",path_prefix(str),"green");
if(last(str,2) != ".c") str += ".c";
! //debug("str: ",str,"yellow");
!
! if( !file_exists(str) ){
! str = path_prefix(base_name(environment(this_player())))+"/"+str2;
! if(last(str,2) != ".c") str += ".c";
! }
!
! if( !file_exists(str) ){
! write("Directory not found.");
! return 1;
! }
!
else if( !(tmp = read_file(str)) || !tmp || tmp == ""){
write("Unable to read file " + str + ".");
return 1;
diff -c -r --new-file ds2.0r28/lib/verbs/creators/delete.c ds2.1/lib/verbs/creators/delete.c
*** ds2.0r28/lib/verbs/creators/delete.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/creators/delete.c Tue Jul 11 18:36:32 2006
***************
*** 139,145 ****
write("in your workroom.");
return 1;
}
- //tc("staff: "+file_name(staff));
filename = base_name(environment(this_player()))+".c";
exits = load_object(filename)->GetExits();
--- 139,144 ----
diff -c -r --new-file ds2.0r28/lib/verbs/creators/dest.c ds2.1/lib/verbs/creators/dest.c
*** ds2.0r28/lib/verbs/creators/dest.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/creators/dest.c Tue Jul 11 18:36:32 2006
***************
*** 25,32 ****
}
mixed can_dest_str(){
- //The desting of strings is not yet supported.
- //return 1;
return 0;
}
--- 25,30 ----
***************
*** 60,66 ****
mixed do_dest_str(string str){
object *objects;
- //tc("str: "+str);
if(!objects = findobs(str)){
write("No such thing was found.");
return 1;
--- 58,63 ----
diff -c -r --new-file ds2.0r28/lib/verbs/creators/reload.c ds2.1/lib/verbs/creators/reload.c
*** ds2.0r28/lib/verbs/creators/reload.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/creators/reload.c Tue Jul 11 18:36:32 2006
***************
*** 82,88 ****
mixed do_reload_every_str(string str){
object *ob_pool = ({});
- //tc("str: "+str);
if(!archp(this_player())){
write("This verb is intended for arches only.");
--- 82,87 ----
***************
*** 101,108 ****
default : libfile = "/lib/foo";
}
- //tc("libfile: "+libfile);
-
if(!file_exists(libfile+".c")){
write("There is no such library file.");
return 1;
--- 100,105 ----
***************
*** 118,127 ****
return 1;
}
- //tc("ob_pool: "+identify(ob_pool));
-
foreach(object ob in ob_pool){
- //if(ob) tc("reloading: "+file_name(ob),"red");
if(ob) write("reloading: "+file_name(ob));
reload(ob);
}
--- 115,121 ----
diff -c -r --new-file ds2.0r28/lib/verbs/items/get.c ds2.1/lib/verbs/items/get.c
*** ds2.0r28/lib/verbs/items/get.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/items/get.c Tue Jul 11 18:36:32 2006
***************
*** 50,62 ****
}
varargs mixed can_get_obj_out_of_obj(string verb, string rule, object item, object container, mixed poo) {
- //tc("hit can_get_obj_out_of_obj","blue");
- //tc("verb: "+verb,"blue");
- //tc("rule: "+rule,"blue");
- //tc("item: "+identify(item),"blue");
- //tc("container: "+identify(container),"blue");
- //tc("container type: "+typeof(container),"blue");
- //tc("poo: "+identify(poo),"blue");
return eventCheckLight(this_player());
}
--- 50,55 ----
***************
*** 73,79 ****
}
mixed do_get_obj(object ob) {
- //tc("hit do_get_obj");
return ob->eventGet(this_player());
}
--- 66,71 ----
***************
*** 86,99 ****
}
mixed do_get_obj_out_of_obj(object ob, object storage) {
- //tc("entered do_get_obj_out_of_obj","blue");
- //tc("ob: "+identify(ob),"blue");
if(!ob) return "No object";
- //tc("storage: "+identify(storage),"blue");
if(!(environment(ob) == storage)){
- //tc("we noticed it isn't in there.","blue");
ob = present(ob->GetKeyName(), storage);
- //tc("ob: "+identify(ob),"blue");
if(!ob){
write("That's not in there.");
return "";
--- 78,86 ----
***************
*** 103,115 ****
}
mixed do_get_obj_from_obj(object ob, object storage) {
- //tc("hit do_get_obj_from_obj","blue");
return do_get_obj_out_of_obj(ob, storage);
}
mixed do_get_obs(mixed *targs) {
object *obs;
- //tc("do_get_obs");
if( !sizeof(targs) ) {
this_player()->eventPrint("There is no such thing to be taken.");
return 1;
--- 90,100 ----
***************
*** 133,139 ****
mixed do_get_obs_out_of_obj(mixed *targs, object storage) {
object *obs;
- //tc("do_get_obs_out_of_obj");
if( !sizeof(targs) ) {
this_player()->eventPrint("There is no such thing to be taken.");
return 1;
--- 118,123 ----
***************
*** 151,156 ****
}
mixed do_get_obs_from_obj(mixed *obs, object storage) {
- //tc("hit do_get_obs_from_obj");
return do_get_obs_out_of_obj(obs, storage);
}
--- 135,139 ----
diff -c -r --new-file ds2.0r28/lib/verbs/items/look.c ds2.1/lib/verbs/items/look.c
*** ds2.0r28/lib/verbs/items/look.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/items/look.c Wed Jul 12 01:56:12 2006
***************
*** 96,102 ****
varargs mixed do_look_at_obj(object ob, mixed arg) {
if(ob->GetInvis() && !archp(this_player()) &&
! base_name(ob) != LIB_DUMMY ){
write("There is no "+arg+" here.");
return 1;
}
--- 96,102 ----
varargs mixed do_look_at_obj(object ob, mixed arg) {
if(ob->GetInvis() && !archp(this_player()) &&
! base_name(ob) != LIB_DUMMY && !inherits(LIB_DUMMY,ob) ){
write("There is no "+arg+" here.");
return 1;
}
diff -c -r --new-file ds2.0r28/lib/verbs/items/put.c ds2.1/lib/verbs/items/put.c
*** ds2.0r28/lib/verbs/items/put.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/items/put.c Tue Jul 11 18:36:32 2006
***************
*** 29,37 ****
mixed can_put_obs_word_obj(object *foo1, string wrd, object foo2) {
- //tc("1");
- //tc("foo1: "+identify(foo1));
- //tc("foo2: "+identify(foo2));
if(check_light()) return this_player()->CanManipulate();
else return 0;
}
--- 29,34 ----
***************
*** 51,93 ****
mixed do_put_obs_word_obj(mixed *res, string wrd, object storage) {
object *obs;
-
- //tc("2");
obs = filter(res, (: objectp :));
- //tc("a");
if( !sizeof(obs) ) {
mixed *ua;
ua = unique_array(res, (: $1 :));
- //tc("b");
foreach(string *lines in ua) {
if(storage && storage->GetClosed())
write(capitalize(storage->GetShort())+" is closed.");
else write("That doesn't seem possible at the moment.");
return 1;
}
- //tc("c");
if(storage && storage->GetClosed())
write(capitalize(storage->GetShort())+" is closed.");
else write("That doesn't seem possible at the moment.");
return 1;
}
- //tc("d");
if(!sizeof(filter(obs, (: environment($1) == this_player() :)))){
write("You don't seem to be in possession of that.");
eligible = ({});
- //tc("1");
return 1;
}
eligible=filter(obs, (: (!($1->GetWorn()) && environment($1) == this_player()) :));
if(!sizeof(eligible)){
write("Remove or unwield items before trying to put them somewhere.");
eligible = ({});
- //tc("2");
return 1;
}
- //tc("eligible: "+identify(eligible));
if(wrd == "in" || wrd == "into") {
foreach(object ob in eligible)
storage->eventPutInto(this_player(), ob);
--- 48,81 ----
***************
*** 103,118 ****
mixed can_put_wrd_wrd_word_obj(string num, string curr,string wrd, mixed container) {
int amt;
- //tc("num: "+num);
- //tc("curr: "+curr);
- //tc("wrd: "+wrd);
- //tc("container: "+identify(container));
if( !num || !curr ) return 0;
if( (amt = to_int(num)) < 1 ) return "You cannot do that!";
- //tc("1","blue");
if( (int)this_player()->GetCurrency(curr) < amt )
return "You don't have that much " + curr + ".";
- //tc("2","green");
if(this_player()->GetLevel() < 4) {
write("Newbies cannot drop money.");
return "Newbies can't drop money.";
--- 91,100 ----
***************
*** 120,131 ****
if(wrd == "on" || wrd == "onto"){
if(container && !inherits( LIB_SURFACE, container ) ) return "#That isn't a load-bearing surface.";
}
- //tc("3","red");
if(container && container->GetClosed()){
return "#That's closed.";
}
- //tc("hmm");
- //return this_player()->CanManipulate();
if(intp(check_light())) return this_player()->CanManipulate();
else return check_light();
}
--- 102,110 ----
***************
*** 134,156 ****
mixed do_put_wrd_wrd_word_obj(string num, string curr, mixed wort, object ob) {
object pile, env;
int amt;
- //tc("ob: "+identify(ob),"yellow");
- //tc("wort: "+wort,"yellow");
if(wort == "on") wort = "onto";
if(wort == "in") wort = "into";
- //tc("wort: "+wort,"yellow");
if(wort == "onto" && !inherits( LIB_SURFACE, ob ) ) {
- //tc("wtf1");
write("That isn't a load-bearing surface.");
return 1;
}
if(wort == "into" && inherits( LIB_SURFACE, ob ) ) {
- //tc("wtf2");
write("That's a surface. Try \"put on\"");
return 1;
}
amt = to_int(num);
env = environment(this_player());
--- 113,136 ----
mixed do_put_wrd_wrd_word_obj(string num, string curr, mixed wort, object ob) {
object pile, env;
int amt;
if(wort == "on") wort = "onto";
if(wort == "in") wort = "into";
if(wort == "onto" && !inherits( LIB_SURFACE, ob ) ) {
write("That isn't a load-bearing surface.");
return 1;
}
if(wort == "into" && inherits( LIB_SURFACE, ob ) ) {
write("That's a surface. Try \"put on\"");
return 1;
}
+ if((inherits(LIB_SIT,ob) && sizeof(ob->GetSitters())) ||
+ (inherits(LIB_LIE,ob) && sizeof(ob->GetLiers()))){
+ write("There appears to be someone blocking your access.");
+ return 0;
+ }
+
amt = to_int(num);
env = environment(this_player());
diff -c -r --new-file ds2.0r28/lib/verbs/players/follow.c ds2.1/lib/verbs/players/follow.c
*** ds2.0r28/lib/verbs/players/follow.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/players/follow.c Sun Jul 9 19:04:30 2006
***************
*** 13,19 ****
::create();
SetVerb("follow");
SetRules("", "LIV");
! SetErrorMessage("Who would you like to follow?");
SetHelp("Syntax: follow\n"
" follow LIV\n"
"\n"
--- 13,19 ----
::create();
SetVerb("follow");
SetRules("", "LIV");
! SetErrorMessage("Whom would you like to follow?");
SetHelp("Syntax: follow\n"
" follow LIV\n"
"\n"
***************
*** 40,46 ****
// Format follow string.
if(this_player()->CanLead() && leader = this_player()->GetLeader()) {
tmp = "You are ";
! if(leader->GetAllowed(this_player())) tmp += "following";
else tmp += "trailing";
tmp += " " + leader->GetName() + ".\n";
}
--- 40,46 ----
// Format follow string.
if(this_player()->CanLead() && leader = this_player()->GetLeader()) {
tmp = "You are ";
! if(leader->GetFollowed(this_player())) tmp += "following";
else tmp += "trailing";
tmp += " " + leader->GetName() + ".\n";
}
***************
*** 53,59 ****
// Format lead string.
tmp += "You are leading ";
obs = map(
! filter(followers, (:this_player()->GetAllowed($1):)),
(:$1->GetName():));
size = sizeof(obs);
if(size) tmp += conjunction(obs);
--- 53,59 ----
// Format lead string.
tmp += "You are leading ";
obs = map(
! filter(followers, (:this_player()->GetFollowed($1):)),
(:$1->GetName():));
size = sizeof(obs);
if(size) tmp += conjunction(obs);
***************
*** 63,69 ****
// Format evasion string.
tmp += "You are evading ";
obs = map(
! filter(followers, (:!this_player()->GetAllowed($1):)),
(:$1->GetName():));
size = sizeof(obs);
if(size) tmp += conjunction(obs);
--- 63,69 ----
// Format evasion string.
tmp += "You are evading ";
obs = map(
! filter(followers, (:!this_player()->GetFollowed($1):)),
(:$1->GetName():));
size = sizeof(obs);
if(size) tmp += conjunction(obs);
***************
*** 82,87 ****
--- 82,88 ----
if(leader = this_player()->GetLeader()) {
leader->RemoveFollower(this_player());
this_player()->eventPrint("You stop trailing " + leader->GetName() + ".");
+ return 1;
}
if(member_array(this_player(), ob->AddFollower(this_player())) == -1)
diff -c -r --new-file ds2.0r28/lib/verbs/players/lead.c ds2.1/lib/verbs/players/lead.c
*** ds2.0r28/lib/verbs/players/lead.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/players/lead.c Sat Jul 8 23:31:00 2006
***************
*** 13,19 ****
verb::create();
SetVerb("lead");
SetRules("LIV");
! SetErrorMessage("Who would you like to lead?");
SetHelp("Syntax: lead LIVING\n"
"\n"
"Allows one to assist a living being who is "
--- 13,19 ----
verb::create();
SetVerb("lead");
SetRules("LIV");
! SetErrorMessage("Whom would you like to lead?");
SetHelp("Syntax: lead LIVING\n"
"\n"
"Allows one to assist a living being who is "
diff -c -r --new-file ds2.0r28/lib/verbs/players/news.c ds2.1/lib/verbs/players/news.c
*** ds2.0r28/lib/verbs/players/news.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/players/news.c Tue Jul 11 18:36:33 2006
***************
*** 33,39 ****
mixed do_news() { return do_news_str("general"); }
mixed do_news_str(string str) {
- //tc("The moops.");
this_player()->eventPage(DIR_NEWS + "/" + str);
return 1;
}
--- 33,38 ----
diff -c -r --new-file ds2.0r28/lib/verbs/rooms/fly.c ds2.1/lib/verbs/rooms/fly.c
*** ds2.0r28/lib/verbs/rooms/fly.c Wed Jul 5 00:01:06 2006
--- ds2.1/lib/verbs/rooms/fly.c Wed Jul 12 13:29:20 2006
***************
*** 34,39 ****
--- 34,42 ----
return "You are nowhere to begin with!";
}
+ if(this_player()->GetPosition() == POSITION_FLYING)
+ return "You are already flying.";
+
switch( env->GetMedium() ) {
case MEDIUM_LAND:
if(env->CanFly(this_player())) return this_player()->CanFly();
diff -c -r --new-file ds2.0r28/lib/www/ds-admin-faq.html ds2.1/lib/www/ds-admin-faq.html
*** ds2.0r28/lib/www/ds-admin-faq.html Wed Jul 5 00:00:59 2006
--- ds2.1/lib/www/ds-admin-faq.html Wed Jul 12 20:21:48 2006
***************
*** 401,407 ****
style="font-weight: bold; text-decoration: underline;">Everything is su-u-u-u-p-e-e-r-r-r s-s-l-o-o-o-o-w-w-w
First, make sure you are using the latest available version of
Dead Souls (check here). Older versions of Dead Souls
are known to have nasty memory leaks.
Next, see if you have runaway objects. An object can be coded
to do really unpleasant stuff like replicate itself over and
over until it brings the mud to its knees. Find out how many
objects are loaded by typing: eval return sizeof(objects())
If the count is in the thousands, and only a few people are
logged on, you may have a runaway. Most often this involves
NPC's doing stuff you didn't expect. Reset all loaded rooms
with the following command:
resetall
perhaps followed by a:Everything is su-u-u-u-p-e-e-r-r-r s-s-l-o-o-o-o-w-w-w
First, make sure you are using the latest available version of
Dead Souls (check here). Older versions of Dead Souls
are known to have nasty memory leaks.
Next, see if you have runaway objects. An object can be coded
to do really unpleasant stuff like replicate itself over and
over until it brings the mud to its knees. Find out how many
objects are loaded by typing: eval return sizeof(objects())
If the count is in the thousands, and only a few people are
logged on, you may have a runaway. Most often this involves
NPC's doing stuff you didn't expect. Reset all loaded rooms
with the following command:
resetall
perhaps followed by a:anglicize me
To make yourself fluent in all languages, type:
polyglottize me
Obviously these commands are available only to creators.
When I try to call test->SetLanguage("Bozo", 50), it sets it to 100%
Bozo is probably a newbie. If Bozo's player level is at or below
what is defined as newbie in /secure/include/config.h, then he understands
all languages at 100%. Raise his level above that, and you should see
his proficiency in that language drop to what you specified.
How do I update an .h file?
You don't, really. That's a header file, which contains code to
be included by a .c file. Only a .c file gets loaded into memory, so
to "update" an .h file, you update the .c file that includes it. In
the case of a global include, like daemons.h, you would update the
master object (also called the master daemon) thusly:
update /secure/daemon/master
Section 3: Intermud and channel stuff
anglicize me
To make yourself fluent in all languages, type:
polyglottize me
Obviously these commands are available only to creators.
When I try to call Bozo->SetLanguage("Clownish", 50), it sets it to 100%
Bozo is probably a newbie. If Bozo's player level is at or below
what is defined as newbie in /secure/include/config.h, then he understands
all languages at 100%. Raise his level above that, and you should see
his proficiency in that language drop to what you specified.
How do I update an .h file?
You don't, really. That's a header file, which contains code to
be included by a .c file. Only a .c file gets loaded into memory, so
to "update" an .h file, you update the .c file that includes it. In
the case of a global include, like daemons.h, you would update the
master object (also called the master daemon) thusly:
update /secure/daemon/master
Section 3: Intermud and channel stuff
For Dead Souls 2.0r27,
the
following fixes are available:
! - Right as I was about to release r27, someone asked an innocent
! question about bulletin boards, and I made a minor change to how they
! work to address a problem. You'd think I'd have learned my lesson about
! this sort of thing. The result is that bulletin boards don't work well
! on 2.0r27. To fix it, copy this file over
! /secure/daemon/bboard.c and this file over
! /secure/obj/arch_board.c .
--- 39,56 ----
is available
now. This patch can be applied to any version of Dead Souls
! above 2.0r20. If you plan to patch from pre- r26 to r29, you must reboot the mud between the
! installations of the separate patches.
! For Dead Souls 2.0r29,
the
following fixes are available:
diff -c -r --new-file ds2.0r28/lib/www/index.html ds2.1/lib/www/index.html
*** ds2.0r28/lib/www/index.html Wed Jul 5 00:49:19 2006
--- ds2.1/lib/www/index.html Wed Jul 12 20:35:29 2006
***************
*** 20,31 ****
The Frontiers LPC Preservation
Foundation is proud to present the release of Dead Souls 2 after a long
! period of development.
This distribution is optimized for the latest version of MudOS, and
the lib has been thoroughly updated. Extensive documentation has been
! added for players and for creators, and a Quick
! Creation System
makes world creation an absolute breeze. The download package also
includes a version that will run on Microsoft Windows.
--- 20,34 ----
The Frontiers LPC Preservation
Foundation is proud to present the release of Dead Souls 2 after a long
! period of development.
!
!
Dead Souls 2.1 release
! announcement
This distribution is optimized for the latest version of MudOS, and
the lib has been thoroughly updated. Extensive documentation has been
! added for players and for creators, and a Quick
! Creation System
makes world creation an absolute breeze. The download package also
includes a version that will run on Microsoft Windows.
***************
*** 61,72 ****
Download Links:
--- 64,76 ----
Download Links:
|
***************
*** 92,97 ****
--- 96,103 ----
Developer Plan File
Articles and
Opinions
+ General FAQ
+
|
***************
*** 100,106 ****
Verb Tutorial
Editor Tutorial
The Quick
! Creation System
Intermud 3
router
--- 106,113 ----
Verb Tutorial
Editor Tutorial
The Quick
! Creation System (aka OLC, aka QCS)
!
Intermud 3
router
***************
*** 117,130 ****
--- 124,132 ----
diff -c -r --new-file ds2.0r28/lib/www/news.html ds2.1/lib/www/news.html
*** ds2.0r28/lib/www/news.html Wed Jul 5 19:58:21 2006
--- ds2.1/lib/www/news.html Wed Jul 12 20:39:36 2006
***************
*** 19,24 ****
--- 19,176 ----
+ 12 July 06
+
+ As I suspected, someone has flown into a
+ tizzy over my revocation
+ of GPL. Their rant is
+ a perfect example of the sort of vitriol that
+ made me choose to do that in the first place.
+ Have a look at the discussion here.
+
+ The 2.1 release is going a little slower than
+ I expected. I've gotten a case of the "perfects",
+ and I keep going over and over things to make
+ sure it's all ok.
+
+ We're still on track for "sometime this week."
+
+ UPDATE:
+ W00t! I can't tell you how relieved
+ I am to be done. Dead Souls 2.1 is now available
+ for download from the front page.
+
+ If you find bugs, please tell me about it, but
+ also expect a slower schedule for the release of
+ patches. I need a break.
+
+ Patches to upgrade to 2.1 will be available
+ later today or tomorrow, as will be diffs.
+
+
+ 11 July 06
+
+ I've disposed of all the items in the todo
+ list of July 7. There is nothing wrong with
+ the stargate. The example file has been renamed
+ to avoid confusion, and to avoid it accidentally
+ going live on the stargate network.
+
+ I've killed the bugs found by the playtesters
+ in the past few days, and unless something major
+ happens, Dead Souls 2.1 will be released this week.
+
+
+ 10 July 06
+
+ Things are going just great. At this point,
+ the number and type of bug report coming in is
+ such that I'm running out of things to do. I
+ need playtesters, so please, if you get a chance,
+ log into rugose.com 6666 and
+ beat on that mud.
+ Let me know what bugs you find. Thanks!
+
+ Oh, by the way, 2.0r29 is out.
+ We're getting
+ closer and closer to 2.1!
+ W00t!
+
+
+ 07 July 06
+
+ A really surprising thing happened today. I
+ decided to reorganize my .plan file and remove
+ anything that wasn't either an important feature
+ enhancement or a bugfix. I wanted to know *exactly*
+ how close I am to releasing Dead Souls 2.1.
+
+ After slogging through and tearing out pages
+ of wishlists and maybes, this is what was left:
+
+ - fix /obj/stargate
+ - update colors with %%^^ data
+ - verbify force
+ - can't delete glass case?
+ - are people defaulting to the start room?
+ - sell machine to cat
+ - make an npc's living body go away BEFORE the corpse is moved into the
+ room
+ - make channels understand ) after : can have non emote messages after
+ - SetMaxHealth shouldn't need to be in init()
+ - help area
+ - help newbie
+ - apostrophes
+ - add damage types to dummy
+ - intergossip logging to two files?
+ - review setinventory, is addstuff necessary?
+ - Beggar says in English, "Hi, A mangy little rat."
+ - shop in the town is confusing the maglite with the cheap one.
+ - If a piece of gear is set for a "left foot" attribute, why can I also
+ wear it on my right foot?
+ - the handbook says that its easier to kill things as a mage,
+ - bug: cp sefun.c /
+ - delete mfinger
+ - SetEmptyName(), SetEmptyLong() and SetEmptyShort().
+ - install faq: if compile problems, try as root, try non 64bit amd
+ - wipe the unused tc's
+
+ That's it. Now compare the size of this list with
+ the size of stuff in the release
+ notes. That's how close
+ I am. I was shocked.
+
+ So folks, I need your help. Any bugs that have been
+ bothering you but you haven't gotten around to telling me,
+ this is the time. If you feel like knocking about the code
+ trying to break stuff, please log into the demo mud
+ at rugose.com 6666 and have at
+ it.
+
+ It's ok that you'll make the list longer. That's
+ what I *want*. I want to get these bufixes as over with
+ as possible.
+
+
+ 06 July 06
+
+ more update news:
+
+ I overlooked a couple of important things when
+ I released 2.0r27. They have been addressed in
+ 2.0r28.
+
+ There may be a compat buster here. One of the
+ things that needed fixing was a peculiar bug that
+ would generate extra corpses under unusual circumstances,
+ during combat. This bug had some relationship to
+ another combat bug that prevented the accurate
+ recording of a player's deaths.
+
+ In the end, the fixes for these two involved the
+ manipulation of persistent player variables. The
+ good news is that things now seem to work just fine,
+ and the bugs are seemingly gone.
+
+ The bad news is that since new player variables
+ are involved, you may find that test chars created
+ before an upgrade to r28 do weird things in combat...
+ like not fight.
+
+ The fix is to create new test chars.
+
+ If Dead Souls was widespread enough that that
+ there were muds out there that were open, with players,
+ I'd look into some sort of system for updating
+ older player files. Since this is not the case,
+ I expect that people will be able to tolerate this
+ minor inconvenience with minimal discomfort.
+
+
+
05 July 2006
router news:
***************
*** 132,138 ****
18 June 2006
The 2.0r26
patch is out. Anyone under that rev is
subject to having their mud compromised by any creator
at any time. Please upgrade 18 June 2006
The 2.0r26
patch is out. Anyone under that rev is
subject to having their mud compromised by any creator
at any time. Please upgrade 23
! How
do I set it up?
To
--- 56,71 ----
style="font-weight: bold;"> 23
! Is
! is "secure"?
!
! Nope. Read this: http://dead-souls.net/ds-admin-faq.html#90
! Bottom line: Don't tell secrets on the router.
!
! How
do I set it up?
To
***************
*** 75,80 ****
--- 84,107 ----
reset, your mud will be authenticated. Just be patient.
If it's been more than a day or so, email me at
<my name here>@comcast.net
+
+ To know for sure if this is the problem, change your
+ mud name to something unique and reboot. If you
+ connect to intermud, you know that was the issue.
+
+ Also note, the name is yatmim, with an M at the end
+ and not an N. It stands for
+ Yet Another TMI Mud. yatmim.
+ Lower case letters. I'll see if I can make the router
+ more forgiving of that typo.
+
+ Getting the router name wrong is the number one
+ cause of
+ errors. Also, once you get it wrong, your own client
+ cache might keep the old one, even if you change your
+ intermud client code. Make sure you purge the i3 data
+ cache before you try again.
What's the
diff -c -r --new-file ds2.0r28/lib/www/router_rules.html ds2.1/lib/www/router_rules.html
*** ds2.0r28/lib/www/router_rules.html Wed Jul 5 19:58:23 2006
--- ds2.1/lib/www/router_rules.html Sat Jul 8 23:31:01 2006
***************
*** 33,39 ****
3) The router is not up for
testing security of an I3 router. Attempting
! to exploit the router is not permitted, and not "cool". If
you find
a security weakness please email me so I can handle it
discreetly.
--- 33,39 ----
3) The router is not up for
testing security of an I3 router. Attempting
! to exploit the router is not ok, and not "cool". If
you find
a security weakness please email me so I can handle it
discreetly.
***************
*** 139,146 ****
!
!
|