Re: [NEWBIE][CODE]Restricting Skill Usage

From: Angus Mezick (amezick@edgil.com)
Date: 01/12/99


You just need to do a check against the spell_info[] array
and look at the spell_info[SKILL_SNEAK].min_level[CLASS_THIEF] entry
and if it is <= GET_LEVEL(ch) let them run the skill. otherwise
don't and maybe do something nasty.
--Angus





Jason Ragsdale <jrags@mindspring.com> on 01/12/99 09:50:50 AM

Please respond to Circle Discussion List <CIRCLE@post.queensu.ca>



 To:      CIRCLE@post.queensu.ca

 cc:      (bcc: Angus Mezick/Edgil)



 Subject: Re:  [NEWBIE][CODE]Restricting Skill Usage









Well you could just add

if (GET_CLASS(ch) != CLASS_THIEF) {
send_to_char("What the F@#K are you trying to do!!!?!?!\r\n", ch);
return;
}

Stock circle should have a array to restrict skills to each class. It's
been a while since I have coded in stock circle so sorry I can't help
you further.
-Jason

Anthony Benjamin wrote:

> I was just looking for the function, etc. To restrict a certain skill
> to a certain class (i.e. Only thieves can use the skill sneak, so that
> if anyone except a thief types sneak, it just says Huh!?!.) All I
> really need to know is the syntax in which the function GET_CLASS
> returns my info....(if that is the right function even...)
>
> Anthony - Newbie Coder
>  benjamin@powerweb.net


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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