Author Topic: hello + patch  (Read 7415 times)

0 Members and 1 Guest are viewing this topic.

Offline lharc

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
hello + patch
« on: July 22, 2013, 02:15:31 am »
Hello!
I'm new to mudding. Thought I'd say hello.

I have a patch below which uses a bit in mob bitvector (bit 20). If enable the mob cant communicate (ie speak etc).
So far it only has effect on the memory attack function.

best regards!
/lharc


Code: [Select]

Date:   Sat Jul 20 10:17:26 2013 +0200

    mob communication flag

diff --git a/src/mobact.c b/src/mobact.c
index 1696cdd..2bb55ca 100644
--- a/src/mobact.c
+++ b/src/mobact.c
@@ -130,7 +130,11 @@ void mobile_activity(void)
             continue;
 
           found = TRUE;
-          act("'Hey!  You're the fiend that attacked me!!!', exclaims $n.", FALSE, ch, 0, 0, TO_ROOM);
+          if(!MOB_FLAGGED(ch, MOB_NOCOMM)){
+              act("'Hey!  You're the fiend that attacked me!!!', exclaims $n.", FALSE, ch, 0, 0, TO_ROOM);
+          }else{
+              act("$n notices you as a fiend.", FALSE, ch, 0, 0, TO_ROOM);
+          }
           hit(ch, vict, TYPE_UNDEFINED);
         }
       }
diff --git a/src/structs.h b/src/structs.h
index 379c393..758652b 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -233,8 +233,9 @@
 #define MOB_NOBLIND        17   /**< Mob can't be blinded */
 #define MOB_NOKILL         18   /**< Mob can't be attacked */
 #define MOB_NOTDEADYET     19   /**< (R) Mob being extracted */
+#define MOB_NOCOMM         20   /**< Mob can't communicate */
 
-#define NUM_MOB_FLAGS      19
+#define NUM_MOB_FLAGS      20
 
 /* Preference flags: used by char_data.player_specials.pref */
 #define PRF_BRIEF         0   /**< Room descs won't normally be shown */

Offline Jaros

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Email
Re: hello + patch
« Reply #1 on: August 04, 2013, 04:09:30 am »
Cool :) Welcome to mudding