Welcome to the Builder Academy

Question Question or two about 'stat file <player_name>'

More
23 Jun 2013 14:59 #3218 by krell
I've ran across something recently using stat for offline players on tbaMUD and I don't know if it's a bug or if it has something to do with a target player's settings. If I stat some offline players' stats I can retrieve them, but for some other players I get a "You can't do that." message.

So, is this normal behaviour due to the target player's personal settings, or should I bug it? Thoughts?

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

More
23 Jun 2013 20:32 #3223 by Parnassus
Where did you get the names from and are the levels lower than yours? These might cause problems.

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

More
23 Jun 2013 20:43 #3224 by krell

Parnassus wrote: Where did you get the names from and are the levels lower than yours? These might cause problems.


For example, if I stat file fizban I get his stats but if I stat file your character I get the message I mentioned. I have also successfully stat filed rumble, but I was unable to successfully stat file vatiken. I have been able to successfully use stat file on players at the same level as mine...so far.

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

More
23 Jun 2013 20:57 #3225 by Vatiken
do_stat()
Code:
if (GET_LEVEL(victim) > GET_LEVEL(ch)) send_to_char(ch, "Sorry, you can't do that.\r\n");

tbaMUD developer/programmer

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

More
23 Jun 2013 21:02 #3227 by krell

Vatiken wrote: do_stat()

Code:
if (GET_LEVEL(victim) > GET_LEVEL(ch)) send_to_char(ch, "Sorry, you can't do that.\r\n");



Doh! Thanks, Vatiken.

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

More
23 Jun 2013 22:07 #3228 by krell
Why are you allowed to stat a higher level character when they're online, but you're not allowed to when they're offline?

Code:
994 } else if (is_abbrev(buf1, "player")) { 995 if (!*buf2) { 996 send_to_char(ch, "Stats on which player?\r\n"); 997 } else { 998 if ((victim = get_player_vis(ch, buf2, NULL, FIND_CHAR_WORLD)) != NULL) 999 do_stat_character(ch, victim); 1000 else 1001 send_to_char(ch, "No such player around.\r\n"); 1002 } 1003 } else if (is_abbrev(buf1, "file")) { 1004 if (!*buf2) 1005 send_to_char(ch, "Stats on which player?\r\n"); 1006 else if ((victim = get_player_vis(ch, buf2, NULL, FIND_CHAR_WORLD)) != NULL) 1007 do_stat_character(ch, victim); 1008 else { 1009 CREATE(victim, struct char_data, 1); 1010 clear_char(victim); 1011 CREATE(victim->player_specials, struct player_special_data, 1); 1012 new_mobile_data(victim); 1013 if (load_char(buf2, victim) >= 0) { 1014 char_to_room(victim, 0); 1015 if (GET_LEVEL(victim) > GET_LEVEL(ch)) 1016 send_to_char(ch, "Sorry, you can't do that.\r\n"); 1017 else 1018 do_stat_character(ch, victim); 1019 extract_char_final(victim); 1020 } else { 1021 send_to_char(ch, "There is no such player.\r\n"); 1022 free_char(victim); 1023 } 1024 }

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

Time to create page: 0.304 seconds