[ScryMUD] SVN Commit Info r950 - trunk/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Sat Jun 16 11:34:06 PDT 2007
Author: gingon
Date: 2007-06-16 11:34:05 -0700 (Sat, 16 Jun 2007)
New Revision: 950
Modified:
trunk/mud/grrmud/server/gen_cmds.spec
trunk/mud/grrmud/server/social2.cc
trunk/mud/grrmud/server/social2.h
Log:
New socials: curl, gasp, snuggle and zombie
Modified: trunk/mud/grrmud/server/gen_cmds.spec
===================================================================
--- trunk/mud/grrmud/server/gen_cmds.spec 2007-06-12 03:22:27 UTC (rev 949)
+++ trunk/mud/grrmud/server/gen_cmds.spec 2007-06-16 18:34:05 UTC (rev 950)
@@ -220,6 +220,8 @@
cough(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
cower socials ~
cower(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
+curl socials ~
+curl(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
curse ~
curse(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
curtsey socials ~
@@ -356,6 +358,8 @@
return freeze(i, &(cooked_strs[1]), pc);
# Mortal Commands - G
+gasp socials ~
+gasp(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
gemote *emote ~
NOP
get take get ~
@@ -811,6 +815,8 @@
return sneak(pc);
snicker socials ~
snicker(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
+snuggle socials ~
+snuggle(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
sob socials ~
sob(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
splash socials ~
@@ -1047,6 +1053,9 @@
# IMM Commands - Y
# Mortal Commands - Z
+zombie socials ~
+zombie(i, &(cooked_strs[1]), pc, (*(pc.getCurRoom()))); return 0;
+
# IMM Commands - Z
zcreate ~
return zcreate(i, &(cooked_strs[1]), j, pc);
Modified: trunk/mud/grrmud/server/social2.cc
===================================================================
--- trunk/mud/grrmud/server/social2.cc 2007-06-12 03:22:27 UTC (rev 949)
+++ trunk/mud/grrmud/server/social2.cc 2007-06-16 18:34:05 UTC (rev 950)
@@ -3047,3 +3047,198 @@
pc.emote(buf);
}//else
}//tap
+
+void zombie(int i_th, const String* vict, critter& pc, room& rm) {
+ String buf(100);
+ Cell<critter*> cll(rm.getCrits());
+ critter* ptr;
+
+ if (pc.POS == POS_SLEEP) {
+ pc.show("You dream of being chased by zombies, run!\n");
+ return;
+ }
+ else if (pc.POS > POS_SIT){
+ pc.show(NOT_IN_POSN);
+ return;
+ }
+
+ if (vict->Strlen()) {
+ critter* crit_ptr =
+ rm.haveCritNamed(i_th, vict, pc);
+
+ if (!crit_ptr) {
+ pc.show("You mumble something about brains.\n");
+ pc.emote("mumbles something about brains.\n");
+ }
+ else if (crit_ptr == &pc) {
+ pc.show("You mumble something about a lack of brains.\n");
+ Sprintf(buf, "mumbles something about a lack of brains.\n");
+ emote(buf, pc, rm, TRUE);
+ }//if targ and agg is same
+ else {
+ Sprintf(buf, "You stumble up to %S and start chewing on their brains! Mmmm, tastes like people...\n",
+ name_of_crit(*crit_ptr, pc.SEE_BIT));
+ pc.show(buf);
+ Sprintf(buf, "%S stumbles up to you and starts chewing on your brains!\n",
+ name_of_crit(pc, crit_ptr->SEE_BIT));
+ buf.Cap();
+ crit_ptr->show(buf);
+
+ while ((ptr = cll.next())) {
+ if ((ptr != &pc) && (ptr != crit_ptr)) {
+ Sprintf(buf, "%S stumbles up to %S and starts chewing on their brains!\n", name_of_crit(pc, ptr->SEE_BIT), name_of_crit(*crit_ptr, ptr->SEE_BIT));
+ buf.Cap();
+ ptr->show(buf);
+ }//if
+ }//while
+ }//else
+ }//if a victim
+ else {
+ pc.show("You stumble about, mumbling something about brains.\n");
+ pc.emote("stumbles about, mumbling something about brains.\n");
+ }//else
+}//zombie
+
+void curl(int i_th, const String* vict, critter& pc, room& rm) {
+ String buf(100);
+ Cell<critter*> cll(rm.getCrits());
+ critter* ptr;
+
+ if (pc.POS == POS_SLEEP) {
+ pc.show("You curl up into a ball in your sleep.\n");
+ return;
+ }
+ else if (pc.POS > POS_SIT){
+ pc.show(NOT_IN_POSN);
+ return;
+ }
+
+ if (vict->Strlen()) {
+ critter* crit_ptr =
+ rm.haveCritNamed(i_th, vict, pc);
+
+ if (!crit_ptr) {
+ pc.show("You look lonely as you curl up in the corner.\n");
+ pc.emote("looks lonely and curls up in the corner.\n");
+ }
+ else if (crit_ptr == &pc) {
+ pc.show("You try to curl up around yourself.\n");
+ Sprintf(buf, "Tries to curl up around %s.\n", get_himself_herself(pc));
+ emote(buf, pc, rm, TRUE);
+ }//if targ and agg is same
+ else {
+ Sprintf(buf, "You curl up next to %s.\n",
+ name_of_crit(*crit_ptr, pc.SEE_BIT));
+ pc.show(buf);
+ Sprintf(buf, "%S curls up next to you.\n",
+ name_of_crit(pc, crit_ptr->SEE_BIT));
+ buf.Cap();
+ crit_ptr->show(buf);
+
+ while ((ptr = cll.next())) {
+ if ((ptr != &pc) && (ptr != crit_ptr)) {
+ Sprintf(buf, "%S curls up with %S.\n", name_of_crit(pc, ptr->SEE_BIT), name_of_crit(*crit_ptr, ptr->SEE_BIT));
+ buf.Cap();
+ ptr->show(buf);
+ }//if
+ }//while
+ }//else
+ }//if a victim
+ else {
+ pc.show("Curls up in the corner.\n");
+ pc.emote("curls up in the corner.\n");
+ }//else
+}//zombie
+
+void snuggle(int i_th, const String* vict, critter& pc, room& rm) {
+ String buf(100);
+ Cell<critter*> cll(rm.getCrits());
+ critter* ptr;
+
+ if (pc.POS == POS_SLEEP) {
+ pc.show("You snuggle with your teddybear.\n");
+ return;
+ }
+
+ if (vict->Strlen()) {
+ critter* crit_ptr =
+ rm.haveCritNamed(i_th, vict, pc);
+
+ if (!crit_ptr) pc.show("You don't see them here.\n");
+ else if (crit_ptr == &pc) {
+ pc.show("You snuggle up with yourself.\n");
+ Sprintf(buf, "snuggles up with %s.\n", get_himself_herself(pc));
+ emote(buf, pc, rm, TRUE);
+ }//if targ and agg is same
+ else {
+ Sprintf(buf, "You snuggle up with %S.\n",
+ name_of_crit(*crit_ptr, pc.SEE_BIT));
+ pc.show(buf);
+ Sprintf(buf, "%S snuggles with you.\n",
+ name_of_crit(pc, crit_ptr->SEE_BIT));
+ buf.Cap();
+ crit_ptr->show(buf);
+
+ while ((ptr = cll.next())) {
+ if ((ptr != &pc) && (ptr != crit_ptr)) {
+ Sprintf(buf, "%S snuggles with %S.\n", name_of_crit(pc, ptr->SEE_BIT), name_of_crit(*crit_ptr, ptr->SEE_BIT));
+ buf.Cap();
+ ptr->show(buf);
+ }//if
+ }//while
+ }//else
+ }//if a victim
+ else {
+ pc.show("You snuggle up under your blanket.\n");
+ Sprintf(buf, "snuggles up under %s blanket.\n", get_his_her(pc));
+ pc.emote(buf);
+ }//else
+}//zombie
+
+void gasp(int i_th, const String* vict, critter& pc, room& rm) {
+ String buf(100);
+ Cell<critter*> cll(rm.getCrits());
+ critter* ptr;
+
+ if (pc.POS == POS_SLEEP) {
+ pc.show("You dream of drowning!\n");
+ return;
+ }
+ else if (pc.POS > POS_SIT){
+ pc.show(NOT_IN_POSN);
+ return;
+ }
+
+ if (vict->Strlen()) {
+ critter* crit_ptr =
+ rm.haveCritNamed(i_th, vict, pc);
+
+ if (!crit_ptr) pc.show("You don't see them here.\n");
+ else if (crit_ptr == &pc) {
+ pc.show("You gasp in atonishment at your own actions.\n");
+ Sprintf(buf, "gasps in astonishment at %s own actions.\n", get_his_her(pc));
+ emote(buf, pc, rm, TRUE);
+ }//if targ and agg is same
+ else {
+ Sprintf(buf, "You gasp in astonishment at %S.\n",
+ name_of_crit(*crit_ptr, pc.SEE_BIT));
+ pc.show(buf);
+ Sprintf(buf, "%S in astonishment at you.\n",
+ name_of_crit(pc, crit_ptr->SEE_BIT));
+ buf.Cap();
+ crit_ptr->show(buf);
+
+ while ((ptr = cll.next())) {
+ if ((ptr != &pc) && (ptr != crit_ptr)) {
+ Sprintf(buf, "%S gasps in astonishment at %S.\n", name_of_crit(pc, ptr->SEE_BIT), name_of_crit(*crit_ptr, ptr->SEE_BIT));
+ buf.Cap();
+ ptr->show(buf);
+ }//if
+ }//while
+ }//else
+ }//if a victim
+ else {
+ pc.show("You gasp in astonishment.\n");
+ pc.emote("gasps in astonishment.\n");
+ }//else
+}//zombie
Modified: trunk/mud/grrmud/server/social2.h
===================================================================
--- trunk/mud/grrmud/server/social2.h 2007-06-12 03:22:27 UTC (rev 949)
+++ trunk/mud/grrmud/server/social2.h 2007-06-16 18:34:05 UTC (rev 950)
@@ -96,5 +96,8 @@
void duck(int i_th, const String* vict, critter& pc, room& rm);
void pet(int i_th, const String* vict, critter& pc, room& rm);
void tap(int i_th, const String* vict, critter& pc, room& rm);
-
+void zombie(int i_th, const String* vict, critter& pc, room& rm);
+void curl(int i_th, const String* vict, critter& pc, room& rm);
+void snuggle(int i_th, const String* vict, critter& pc, room& rm);
+void gasp(int i_th, const String* vict, critter& pc, room& rm);
#endif
More information about the ScryMUD
mailing list