Re: docs on adding new skills

From: John Woods (JWoodsIII@AOL.COM)
Date: 06/05/98


In a message dated 98-06-05 03:21:23 EDT, ajrye@ONE.NET writes:

<< ACMD (do_stun)
  if (GET_CLASS(ch) == (CLASS_THIEF(ch);
   if (GET_SKILL(ch) == (SKILL_STUN(ch);
     GET_CLASS(ch) && GET_SKILL(ch);

 ok i am still not done my own code yet (honestly) but i am trying to
 learn. But the thing i am trying for here is making it so when the thief
 stuns a player or mob it get the POS_STUNNED and have it get a default
 duration. I know the above may be incomplete and wrong, but its the idea
 that counts right? well if there is any flames please send them to me
 personaly and not the list. Oh if anyone has any ideas how to maybe do
 this could you please post it? thanks
  >>

Sorry for the spam, and I'm probably wrong, but looks like you have a few bugs
as it is in this code.

ACMD (do_stun)
  if (GET_CLASS(ch) == (CLASS_THIEF(ch);
   if (GET_SKILL(ch) == (SKILL_STUN(ch);

should be:

ACMD (do_stun)
{
  if (GET_CLASS(ch) == CLASS_THIEF(ch)) {
   if (GET_SKILL(ch) == SKILL_STUN(ch)) {

unfortunately, I don't know enough about C to figure out what you're trying to
do in the last line. But that should probably be an if statement.
For example,
     if ((GET_CLASS(ch) == CLASS_WARRIOR) && (GET_SKILL(ch) == bla)) {
          do whatever


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



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