From: Frollo Subject: New Practice command An improved way of listing spells/skills/languages (This snippet might work nicely with my languages snip) Again, might want to mess with the &c and &n and stuff... i'm real lazy, if you havn't noticed...don't really wanna take em out :) ---spec_procs.c--- void list_skills(struct char_data * ch) { extern char *spells[]; extern struct spell_info_type spell_info[]; int i, x; sprintf(buf, "&c---------------------------------[ LANGUAGE ]------------------ ---------------\r\n"); x = 0; for (i = MIN_LANGUAGES; i < MAX_SKILLS; i++) { if (GET_LEVEL(ch) >= spell_info[i].min_level[(int)GET_CLASS(ch)]) { x++; sprintf(buf, "%s%20.20s &w(&c%2d%%&w)&c%s", buf, spells[i], GET_SKILL(ch, i), x == 3 ? "\r\n" : ""); if (x == 3) x = 0; } } sprintf(buf, "%s%s----------------------------------[ SKILLS ]----------------- -----------------\r\n", buf, x != 3 ? "\r\n" : ""); x = 0; for (i = MAX_SPELLS ; i < MIN_LANGUAGES; i++) { if (GET_LEVEL(ch) >= spell_info[i].min_level[(int)GET_CLASS(ch)]) { x++; sprintf(buf, "%s%20.20s &w(&c%2d%%&w)&c%s", buf, spells[i], GET_SKILL(ch, i), x == 3 ? "\r\n" : ""); if (x == 3) x = 0; } } sprintf(buf, "%s%s----------------------------------[ SPELLS ]----------------- -----------------\r\n", buf, x != 3 ? "\r\n" : ""); x = 0; for (i = 1; i < MAX_SPELLS; i++) { if (GET_LEVEL(ch) >= spell_info[i].min_level[(int)GET_CLASS(ch)]) { x++; sprintf(buf, "%s%20.20s &w(&c%2d%%&w)&c%s", buf, spells[i], GET_SKILL(ch, i), x == 3 ? "\r\n" : ""); if (x == 3) x = 0; } } if (x != 3) strcat(buf,"\r\n"); if (!GET_PRACTICES(ch)) sprintf(buf, "%sYou have no practice sessions remaining.\r\n",buf); else sprintf(buf, "%sYou have %d practice session%s remaining.\r\n", buf, GET_PRACTICES(ch), (GET_PRACTICES(ch) == 1 ? "" : "s")); send_to_char(buf, ch); }