Re: Newbie: Adding another param to practice?

From: George (
Date: 09/10/96

On Tue, 10 Sep 1996, Homer Simpson wrote:

>        I have changed skills in my mud, so now when you prac any skill, or
> spell you increase by 1% per prac. What i'd like to do is make it so
> people can type "prac magic missile 30" instead of pracing it 30
> individual times. How do I go about making the prac command recognise this
> extra param?

I'd say do what the cast command does, ie: prac 'magic missile' 30
and look there for how it parses it (strtok), or just take the easy
way and put the number first, prac 30 magic missile, then you just
check if the first argument is a number or not, if so take the rest
of the string as the skill to practice.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST