Welcome to the Builder Academy

Question Is this possible with Set_skill?

More
13 Jul 2025 21:24 #10791 by wlessard1
Is it possible to GIVE a character a skill that is not in their class listing?

Is it complicated? 

For what I am doing, I was able to give do_goto to everyone at top level, not with set_skill. But that is a command so probably not applicable here.

Any suggestions, not necessarily code but where to find it.

Thanks
Bill

Just a guy coding a mud at home for no reason but the challenge.

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

More
13 Jul 2025 21:46 #10792 by JTP
You can do that with a trigger

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

More
13 Jul 2025 21:55 #10793 by wlessard1
I am building remort code. I have the remorts working, now I would like to add skills to characters when they remort.

Inspired by Nukefire.

Just a guy coding a mud at home for no reason but the challenge.

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

More
13 Jul 2025 22:03 #10794 by wlessard1
Reading through the code, it seems GET_SKILL might do the trick.

Looking through the code to see if I can figure out how to do it if will work.

Just a guy coding a mud at home for no reason but the challenge.

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

More
14 Jul 2025 11:38 #10795 by wlessard1
Get_skill doesn't work either.

Just a guy coding a mud at home for no reason but the challenge.

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

More
14 Jul 2025 11:45 #10796 by JTP
Maybe this can help you

From circlemud.org


ACMD(do_skillset)
{
char *skip_spaces(char *string);

extern char *spells[];
extern struct char_data *mob_proto;
struct char_data *vict;
char name[100], buf2[100], buf[100], help[MAX_STRING_LENGTH];
int skill, field, value, i, qend, index;

argument = one_argument(argument, name);

if (!*name) { /* no arguments. print an informative text */
send_to_char("Syntax: skillset <name> '<skill>' <value>\n\r", ch);
strcpy(help, "Skill being one of the following:\n\r");
for (i = 0; *spells != '\n'; i++) {
sprintf(help + strlen(help), "%18s", spells);
if (i % 4 == 3) {
strcat(help, "\n\r");
send_to_char(help, ch);
*help = '\0';
}
}
if (*help)
send_to_char(help, ch);
send_to_char("\n\r", ch);
return;
}

if (!(vict = get_char_vis(ch, name))) {
send_to_char("No living thing by that name.\n\r",ch);
return;
}

argument = skip_spaces(argument);

/* If there is no chars in argument */
if (!(*argument)) {
send_to_char("Skill name expected.\n\r",ch);
return;
}

if (*argument != '\'') {
send_to_char("Skill must be enclosed in: ''\n\r",ch);
return;
}

/* Locate the last quote && lowercase the magic words (if any) */

for (qend=1; *(argument+qend) && (*(argument+qend) != '\'') ; qend++)
*(argument+qend) = LOWER(*(argument+qend));

if (*(argument+qend) != '\'') {
send_to_char("Skill must be enclosed in: ''\n\r",ch);
return;
}

/* if ((skill = old_search_block(argument, 1, qend - 1, spells, 0)) < 1) { */

/* If you don't have find_skill_num() uncomment the line above
and then comment out the next three lines of code. */

strcpy(help, (argument + 1));
help[qend - 1] = 0;
if ((skill = find_skill_num(help)) <= 0) {
send_to_char("Unrecognized skill.\n\r",ch);
return;
}

argument += qend+1; /* skip to next parameter */
argument = one_argument(argument, buf);

if (!*buf) {
send_to_char("Learned value expected.\n\r",ch);
return;
}

value = atoi(buf);
if (value < 0) {
send_to_char("Minimum value for learned is 0.\n\r",ch);
return;
}

if (value > 100) {
send_to_char("Max value for learned is 100.\n\r",ch);
return;
}

if (!vict->skills) {
send_to_char("You can't set NPC skills.\n\r", ch);
return;
}

sprintf(buf2,"%s changes %s's '%s' to %d.",GET_NAME(ch),GET_NAME(vict),
spells[skill - 1],value);
syslog(buf2, BRF, -1, TRUE);
if (IS_NPC(vict) && (vict->nr > -1) &&
(vict->skills == mob_proto[vict->nr].skills)) {
CREATE(vict->skills, char, MAX_SKILLS);
for (index = 0; index < MAX_SKILLS; index++)
SET_SKILL(vict, index, GET_SKILL(&mob_proto[vict->nr], index));
}

SET_SKILL(vict, skill, value);

sprintf(buf2,"You change %s's '%s' to %d.\n\r" , GET_NAME(vict),
spells[skill - 1], value);
send_to_char(buf2, ch);
}

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

Time to create page: 0.241 seconds