Object aff_flag check

  • Benson
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago - 2 years 11 months ago #8079 by Benson
Object aff_flag check was created by Benson
Hi everyone! I'm trying to figure out how to make the game check for an object affect type for worn objects each time a command is entered. In this game I think it looks like every command is passed through interpreter.c's void command_interpreter. In this code I see it removing hide each time a command is entered, but I am trying to code in eq that has a perm_hide affect. I have all the affect stuff in, and even did an argument without an eq check to see if I was on the money in code and was able to make it re-hide my char every time a command was entered, and this is exactly what I wanted.

my problem is being able to get the game to identify if the object is affect flagged or not. Here's what I have currently, but obviously it doesnt work. Please, can someone help a noob! :)
void command_interpreter(struct char_data *ch, char *argument)
{
  int cmd, length, i;
  char *line;
  char arg[MAX_INPUT_LENGTH];
  struct obj_data *obj;

  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
  
      for (i = 0; i < NUM_WEARS; i++) {
        if (GET_EQ(ch, i) && OBJAFF_FLAGGED(obj, AFF_HIDE)) {
          SET_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
        }
	}
Last edit: 2 years 11 months ago by thomas. Reason: removed double formatting

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #8081 by WhiskyTest
Replied by WhiskyTest on topic Object aff_flag check
Change 'obj' to 'GET_EQ(ch, i)'

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds