EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Suggestion for #showskills command (https://www.eqemulator.org/forums/showthread.php?t=11043)

r2d2atemyhomework 12-27-2003 06:54 AM

Suggestion for #showskills command
 
Since the Skills button on the Inventory window is apparently broken I made an addition to the #showskills command which gives more meaningful output. If you add the code below, it will print out the names of the skills along with their subscript and value:

In skills.h, add before the #endif:
Code:

extern char const *const skills_list[HIGHEST_SKILL+1];
In command.cpp, add after "#include command.h":
Code:

// initialize extern skills_list found in skills.h
char const *const skills_list[HIGHEST_SKILL+1] = {        "1H Blunt",
                                                                                                        "1H Slashing",
                                                                                                        "2H Blunt",
                                                                                                        "2H Slashing",
                                                                                                        "Abjure",
                                                                                                        "Alteration",
                                                                                                        "Apply Poison",
                                                                                                        "Archery",
                                                                                                        "Backstab",
                                                                                                        "Bind Wound",
                                                                                                        "Bash",
                                                                                                        "Block",
                                                                                                        "Brass Instruments",
                                                                                                        "Channeling",
                                                                                                        "Conjuration",
                                                                                                        "Defense",
                                                                                                        "Disarm",
                                                                                                        "Disarm Traps",
                                                                                                        "Divination",
                                                                                                        "Dodge",
                                                                                                        "Double Attack",
                                                                                                        "Dragon Punch",
                                                                                                        "Duel Wield",
                                                                                                        "Eagle Strike",
                                                                                                        "Evocation",
                                                                                                        "Feign Death",
                                                                                                        "Flying Kick",
                                                                                                        "Forage",
                                                                                                        "Hand To Hand",
                                                                                                        "Hide",
                                                                                                        "Kick",
                                                                                                        "Meditate",
                                                                                                        "Mend",
                                                                                                        "Offense",
                                                                                                        "Parry",
                                                                                                        "Pick Lock",
                                                                                                        "Piercing",
                                                                                                        "Riposte",
                                                                                                        "Round Kick",
                                                                                                        "Safe Fall",
                                                                                                        "Sense Heading",
                                                                                                        "Singing",
                                                                                                        "Sneak",
                                                                                                        "Specialize Abjure",
                                                                                                        "Specialize Alteration",
                                                                                                        "Specialize Conjuration",
                                                                                                        "Specialize Divination",
                                                                                                        "Specialize Evocation",
                                                                                                        "Pick Pockets",
                                                                                                        "Stringed Instruments",
                                                                                                        "Swimming",
                                                                                                        "Throwing",
                                                                                                        "Tiger Claw",
                                                                                                        "Tracking",
                                                                                                        "Wind Instruments",
                                                                                                        "Fishing",
                                                                                                        "Make Poison",
                                                                                                        "Tinkering",
                                                                                                        "Research",
                                                                                                        "Alchemy",
                                                                                                        "Baking",
                                                                                                        "Tailoring",
                                                                                                        "Sense Traps",
                                                                                                        "Blacksmithing",
                                                                                                        "Fletching",
                                                                                                        "Brewing",
                                                                                                        "Alcohol Tolerance",
                                                                                                        "Begging",
                                                                                                        "Jewelry Making",
                                                                                                        "Pottery",
                                                                                                        "Percussion Instruments",
                                                                                                        "Intimidation",
                                                                                                        "Berserking",
                                                                                                        "Taunt" };

Change the yellow line in the command_showskills method of command.cpp:
void command_showskills(Client *c, const Seperator *sep)
{
Client *t=c;

if(c->GetTarget() && c->GetTarget()->IsClient())
t=c->GetTarget()->CastToClient();

c->Message(0, "Skills for %s", t->GetName());
for (int i=0; i<74; i++)
c->Message(0, "Skill %s [%d] is at [%d]", skills_list[i], i, t->GetSkill(i));
}



If anyone can think of a better place to initialize the extern let me know. Also, does anyone know why the Skills button doesn't work? I'm sure it's already a known issue however I couldn't find anything on the forums about it and I do not see it implemented in the source, although Dye, Face and AA are all easily found.

Eglin 12-27-2003 09:06 AM

Someone came up w/ the clever solution of putting static info like that into the eq xml interface files. You'll have to search for the post, since I can't remember who did it or the details of the solution. Probably a better solution, though.


All times are GMT -4. The time now is 09:15 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.