[code][snippet] do_pull

From: Scott Warren (dswarren@MAIL.CLT.BELLSOUTH.NET)
Date: 08/16/97


Hi all,

        Here's a snippet. Add the appropriate commands in interpreter.c of
course.
What you do is add the word 'string' as an extra description to a room and this
will let you 'pull string' to turn the light on or off. You can extend this
in all sorts of ways. Ignore the 'pull pin' part. I'm working on extracting
my grenade code to share. I had this snippet in act.item.c

Good Luck and happy mudding!
Scott Warren
dswarren@bellsouth.net


- ACMD(do_pull)
- {
-
-   one_argument(argument, arg);
-
-   if (!*arg) {
-     send_to_char("Pull what?\r\n", ch);
-     return;
-   }
- /* IGNORE THIS PART FOR NOW
-   if(!str_cmp(arg,"pin")) {
-     if(GET_EQ(ch, WEAR_WIELD)) {
-       if(GET_OBJ_TYPE(GET_EQ(ch, WEAR_WIELD)) == ITEM_GRENADE) {
-         send_to_char("You pull the pin, the grenade is activated!\r\n", ch);
-         SET_BIT(GET_OBJ_EXTRA(GET_EQ(ch, WEAR_WIELD)), ITEM_LIVE_GRENADE);
-       } else
-         send_to_char("That's NOT a grenade!\r\n", ch);
-     } else
-       send_to_char("You aren't wielding anything!\r\n", ch);
-   }
   */
-   if(!str_cmp(arg, "string")) {
-     if(find_exdesc(arg, world[ch->in_room].ex_description))
-       {
-       TOGGLE_BIT(ROOM_FLAGS(ch->in_room), ROOM_DARK);
-       send_to_char("You pull the string.\r\n", ch);
-       act("$n pulls a string.", TRUE, ch, 0, 0, TO_ROOM);
-       }
-     else
-      send_to_char("You don't see that here.\r\n", ch);
-   }
-
- /* put other 'pull' options here later */
-
-  return;
- }
-
--- 1358,1360 ----


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST