Try this: On Fri, 26 Jul 1996, Haddixx wrote: > I am trying to implement a generic special procedure to handle > falling/transportation traps. And have hit a stumbling block. I want > the trap to trigger off a command that a character types like, 'open' > or 'close' or whatever it could be anything. The problem is that the > trap never gets activated. Here is what I have: > > SPECIAL(transport_trap) > { > int i; > if (!CMD_IS("open")) return 0; > > for (i = 0; tran_trap[i].room != -1; i++) > { > if(world[ch->in_room].number == tran_trap[i].room) > { > if(!strcmp(argument, tran_trap[i].command)) > { > switch(tran_trap[i].type) > { > case TT_TRAPDOOR: > case TT_SLIDE: > send_to_char("You fall into a trap.",ch); > char_from_room(ch); > char_to_room(ch, (real_room(tran_trap[i].new_room))); > break; > default: > break; > } > return TRUE; > } > } > } > return FALSE; > } > > Can anyone help me find out what is wrong with this procedure and why it > doesn't recognize the trigger command? > > -Haddixx > > -- > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Haddixx | -=-=-Implementor of Avalanche MUD-=-=- | > + Brian M. Menges + Running at: 143.207.31.45 8000 + > | haddixx@megamed.com | Web Page: http://www.megamed.com/~haddixx | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > +-----------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | > +-----------------------------------------------------------+ > +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST