Welcome to the Builder Academy

Question How to make invis gods not show up in the attributes/score screen

More
08 Oct 2022 02:24 #10195 by Nero
I have an issue where if I invis myself using the invis 41 command but follow a player,
they can still see me following them when they select the attributes (our score screen)
I have tried a few different snippets but everything I have tried doesn't work or crashes the game so I am not sure what I am missing here.
Code:
send_to_char(ch, "@yYou are being followed by:@n\r\n");   for (lackey = ch->followers; lackey; lackey = lackey->next) {     if (AFF_FLAGGED(lackey->follower, AFF_CHARM) && (lackey->follower->master == ch)) {       follower_level = GET_LEVEL(lackey->follower);       follower_total_levels += follower_level;       num_charmed_followers++;       send_to_char(ch, "[Level %2d] %s\r\n", follower_level, GET_NAME(lackey->follower));     } else       send_to_char(ch, "          %s\r\n", GET_NAME(lackey->follower));   }   num_follower_levels_allowed = charmie_levels_allowed(ch);   max_charmies = max_charmed_followers(ch);   if (num_follower_levels_allowed > 0) {     send_to_char(ch, "@yTotal levels of charmies:@n [%2d/%2d]  @yTotal charmies:@n [%1d/%1d]%s\r\n",         follower_total_levels, num_follower_levels_allowed, num_charmed_followers, max_charmies,         ((num_charmed_followers > max_charmies) ? " (rebellion imminent)" : ""));   }   if (num_follower_levels_allowed <= 0) {     send_to_char(ch, "@yTotal levels of charmies:@n [0/0]  @yTotal charmies:@n [%1d/%1d]%s\r\n",         num_charmed_followers, max_charmies,         ((num_charmed_followers > max_charmies) ? " (rebellion imminent)" : ""));   } }

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

More
08 Oct 2022 22:32 #10196 by thomas
You are not filtering the list in the loop:
Code:
for (lackey = ch->followers; lackey; lackey = lackey->next) { + if (!IS_NPC(lackey->follower) && GET_INVIS_LEV(lackey->follower) > GET_LEVEL(ch)) + continue; if (AFF_FLAGGED(lackey->follower, AFF_CHARM) && (lackey->follower->master == ch)) { follower_level = GET_LEVEL(lackey->follower); follower_total_levels += follower_level; num_charmed_followers++; send_to_char(ch, "[Level %2d] %s\r\n", follower_level, GET_NAME(lackey->follower)); } else send_to_char(ch, " %s\r\n", GET_NAME(lackey->follower)); }

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

More
08 Oct 2022 22:42 #10197 by Nero
You make it look so easy! I feel like I should be paying you for the tremendous amount of help you have given me in getting my game setup the way I want.

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

Time to create page: 0.186 seconds