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!
Code:
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);
}
}