[ScryMUD] SVN Commit Info r737 - branches/version-2-1/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Sun Dec 5 22:16:23 PST 2004
Author: eroper
Date: 2004-12-05 22:16:22 -0800 (Sun, 05 Dec 2004)
New Revision: 737
Modified:
branches/version-2-1/mud/grrmud/server/ez_skll.cc
branches/version-2-1/mud/grrmud/server/ez_skll.h
branches/version-2-1/mud/grrmud/server/gen_cmds.spec
Log:
Added "unguard" command. This takes no parameters, it just stops guarding
anyone that you may have been guarding.
Stopped "guard" from emote'ing to the room. How would anyone know that you've
suddenly decided to protect someone? (yeah, it's probably debatable, stance,
etc.)
Added "cd" as an alias to "goto". I tend to use "man,ls" since they work and I
kept finding myself trying to "cd rnum"
--Khaav
Modified: branches/version-2-1/mud/grrmud/server/ez_skll.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/ez_skll.cc 2004-12-06 04:30:43 UTC (rev 736)
+++ branches/version-2-1/mud/grrmud/server/ez_skll.cc 2004-12-06 06:16:22 UTC (rev 737)
@@ -280,15 +280,40 @@
Sprintf(buf, "You start guarding %S.\n", name_of_crit(vict, pc.SEE_BIT));
show(buf, pc);
- Sprintf(buf, "starts guarding %S.", name_of_crit(vict, ~0));
- emote(buf, pc, ROOM, TRUE, &vict);
Sprintf(buf, "%S starts guarding you. You feel much safer!!\n",
name_of_crit(pc, vict.SEE_BIT));
vict.show(buf);
return 0;
}//do_guard
+int unguard(critter& pc) {
+ String buf(100);
+ if ( !pc.temp_crit ) {
+ Sprintf(buf, "You aren't guarding anyone.\n");
+ pc.show(buf);
+ return -1;
+ }
+
+ if (!pc.GUARDING) {
+ Sprintf(buf, "You aren't guarding anyone.\n");
+ pc.show(buf);
+ return -1;
+ }
+
+ Sprintf(buf, "You stop guarding %S.\n", name_of_crit(*(pc.GUARDING), pc.SEE_BIT));
+ pc.show(buf);
+
+ Sprintf(buf, "%S stops guarding you.\n", name_of_crit(pc,
+ pc.GUARDING->SEE_BIT));
+ pc.GUARDING->show(buf);
+
+ pc.GUARDING->GUARDED_BY = NULL;
+ pc.GUARDING = NULL;
+
+ return 0;
+}//unguard
+
int picklock(int i_th, const String* vict, critter& pc) {
int skill_num = PICKLOCK_SKILL_NUM;
door* dr;
Modified: branches/version-2-1/mud/grrmud/server/ez_skll.h
===================================================================
--- branches/version-2-1/mud/grrmud/server/ez_skll.h 2004-12-06 04:30:43 UTC (rev 736)
+++ branches/version-2-1/mud/grrmud/server/ez_skll.h 2004-12-06 06:16:22 UTC (rev 737)
@@ -39,6 +39,7 @@
int guard(int i_th, const String* vict, critter& pc);
int do_guard(critter& vict, critter& pc);
+int unguard(critter& pc);
int shield(int i_th, const String* vict, critter& pc, int was_ordered);
int do_shield(critter& vict, critter& pc);
int rescue(int i_th, const String* vict, critter& pc);
Modified: branches/version-2-1/mud/grrmud/server/gen_cmds.spec
===================================================================
--- branches/version-2-1/mud/grrmud/server/gen_cmds.spec 2004-12-06 04:30:43 UTC (rev 736)
+++ branches/version-2-1/mud/grrmud/server/gen_cmds.spec 2004-12-06 06:16:22 UTC (rev 737)
@@ -394,7 +394,7 @@
return gag(i, &(cooked_strs[1]), pc);
gain_exp ~
return scr_gain_exp(i, pc, was_ordered);
-goto ~
+goto cd goto ~
return _goto(i, &(cooked_strs[1]), pc);
# Mortal Commands - H
@@ -917,6 +917,8 @@
return up(pc, *(pc.getCurRoom()), is_dead);
ungroup ~
return pc.doUngroup(i, &(cooked_strs[1]));
+unguard ~
+return unguard(pc);
unlock ~
return unlock(i, &(cooked_strs[1]), pc);
unwield remove ~
More information about the ScryMUD
mailing list