Welcome to the Builder Academy

Question Resetting practices

More
17 Dec 2018 17:27 #8282 by Sascha
Replied by Sascha on topic Resetting practices
I'm not sure what happened but this seems to no longer work.

[ 715] Hawk's Square [ * ] [ City ][T 497 1219]
The heart of the city, the square is a large open grass area with a giant
leatherleaf tree at its center, where it provides shade for an ornate fountain.
Oversized benches seemingly made from a single piece of wood surround the
fountain, with beds of colorful flowers flowing like rivers. Several side
streets branch off further into the city.
[ Exits: n e s w ]
[728] The Founder's Monument for the City of Hawk's Gate rises from the ground.
[719] A three tiered fountain holds pools of clear water.
Vivtest the Hunter is standing here.
[726] [TRIGS] A washerwoman is here with a stack of laundry.

i1 510hp 110mn 92mv>
pracreset vivtest
That player is not here.

i1 510hp 110mn 92mv>

A Hawkguard has arrived.

i1 510hp 110mn 92mv>
pracreset washerwoman
That player is not here.


Clearly the player is in front of me, and for the washerwoman it should return "NO! Not on NPC's."

This is how the snippet currently looks in my game:
Code:
ACMD(do_pracreset) /* Removes all practiced skills, resets prac points available */ { struct char_data *victim; int i; if (*argument) { if (!(victim = get_char_vis(ch, argument, NULL, FIND_CHAR_WORLD))) { send_to_char(ch, "That player is not here.\r\n"); return; } } else { send_to_char(ch, "Reset whose practices?\r\n"); return; } if (GET_LEVEL(ch) <= GET_LEVEL(victim)) { send_to_char(ch, "Maybe that's not such a great idea.\r\n"); return; } if (IS_NPC(victim)) { send_to_char(ch, "NO! Not on NPC's.\r\n"); return; } for (i = 1; i <= MAX_SKILLS; i++) SET_SKILL(victim, i, 0); switch (GET_CLASS(victim)) { case CLASS_MAGICUSER: SET_SKILL(victim, SPELL_ARROWSOFFIRE, 5); break; case CLASS_WARRIOR: SET_SKILL(victim, SKILL_BASH, 5); break; case CLASS_HUNTER: SET_SKILL(victim, SKILL_KICK, 5); break; case CLASS_ROGUE: SET_SKILL(victim, SKILL_STEAL, 5); break; } GET_PRACTICES(victim) = 0; if (IS_MAGICUSER(victim) || IS_HUNTER(victim)) GET_PRACTICES(victim) += ((MAX(2, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim)); else GET_PRACTICES(ch) += ((MIN(2, MAX(1, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim))); send_to_char(ch, "%s", CONFIG_OK); save_char(victim); }

Any ideas?

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
18 Dec 2018 14:28 #8284 by WhiskyTest
Replied by WhiskyTest on topic Resetting practices
Code:
char arg[MAX_INPUT_LENGTH]; one_argument(argument, arg); if (*arg) { if (!(victim = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) { send_to_char(ch, "That player is not here.\r\n"); return; }

Also increase your awesome by changing the player not here message with this:
Code:
send_to_char(ch, "%s", CONFIG_NOPERSON);

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

More
18 Dec 2018 16:26 #8285 by Sascha
Replied by Sascha on topic Resetting practices
Et voila! Thanks, Whisky. :)

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
08 Jan 2019 00:30 #8292 by rudeboyrave
Replied by rudeboyrave on topic Resetting practices
nice snip, this looks handy

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

Time to create page: 0.173 seconds