302hp 232m 490mv> owfind wield [ 3005] An executioner's axe [ 3020] A dagger [ 3021] A small sword [ 3022] A long sword [ 3124] A long sword [ 3350] A standard issue sword [ 3351] A standard issue dagger [ 3352] A standard issue mace [ 3700] A sub issue mace [ 3701] A sub issue dagger [ 3702] A sub issue sword
<302hp 232m 490mv> owfind waist [ 3362] A standard issue belt [ 3712] A sub issue belt
/* * Yeah, so iterating over all vnum's takes 10,000 loops. * Get_obj_index is fast, and I don't feel like threading another link. * Do you? * – Furey */ for (int vn = 0; nMatch < ObjectPrototype::top_obj; vn++) { if ((pObjIndex = get_obj_index (vn)) != NULL) { nMatch++; if (pObjIndex->wear_flags & item_worn) { found = true; snprintf (buf, sizeof buf, "[%5d] %s\r\n", pObjIndex->vnum, capitalize (pObjIndex->short_descr).c_str()); buf1.append(buf); } } } if (!found) { send_to_char ("Nothing like that in hell, earth, or heaven.\r\n"); return; } send_to_char (buf1); return; }
At this point I guess it's better to leave it as "etc." because so many similar optimizations are possible. I think it's worth this post though to emphasize how much power is built-in that can be unleashed to greatly aid admins or imms who might want to be able to see certain sets of items, rooms or mobiles for game balance, style or related purposes. I'll probably develop as many that make sense and at that point maybe they can go into a code release. Expanding commands is probably only so useful and could wind up making a list that's harder to remember than entering basic commands. A higher goal would be making an OLC, which takes some programmers way longer than others.
[ 3005] An executioner's axe
[ 3020] A dagger
[ 3021] A small sword
[ 3022] A long sword
[ 3124] A long sword
[ 3350] A standard issue sword
[ 3351] A standard issue dagger
[ 3352] A standard issue mace
[ 3700] A sub issue mace
[ 3701] A sub issue dagger
[ 3702] A sub issue sword
<302hp 232m 490mv> owfind waist
[ 3362] A standard issue belt
[ 3712] A sub issue belt
<302hp 232m 490mv>
At this point I guess it's better to leave it as "etc." because so many similar optimizations are possible. I think it's worth this post though to emphasize how much power is built-in that can be unleashed to greatly aid admins or imms who might want to be able to see certain sets of items, rooms or mobiles for game balance, style or related purposes. I'll probably develop as many that make sense and at that point maybe they can go into a code release.
Expanding commands is probably only so useful and could wind up making a list that's harder to remember than entering basic commands. A higher goal would be making an OLC, which takes some programmers way longer than others.