Identify (Minor) Spell [by Soren P. Skou]
Snippet Posted Wednesday, August 12th @ 11:28:51 PM, by George Greer in the Skills dept.
Added Dec 8, 1997. Click the link below to read it or download it.

From: "Soren P. Skou" <serces@MUD.DK>
Subject: Minor Identify

Here's a little spell.. Hope you can use it..

It's a minor Id, so Instead of Giving you all the information
"Affects you: DEX +2" and so on, then You can give out this spell
lower than the normal Identify (I have both, one at lvl 100 and one
at lvl 30).. It won't give amount's just tells the caster what it
might affect. In case it won't affect anything, it tells the caster
what it's worth. (In money_desc)

If you use it, please send me a mail, if you have any suggestions to
changes please let me know as well.. :)

---------- Snip ---------------
ASPELL(spell_minor_id)
{
 char *min_id[] = {
  "%sIt would bring %s if you sold it!\r\n",            /* NONE */
  "your physique!\r\n",                                 /* STR */
  "your speed!\r\n",                                    /* DEX */
  "your thoughts!\r\n",                                 /* INT */
  "your knowledge of things!\r\n",                      /* WIS */
  "your endurance!\r\n",                                /* CON */
  "your appearance!\r\n",                               /* CHA */
  "!CLASS!\r\n",                                        /* CLASS */
  "!LEVEL!\r\n",                                        /* LEVEL */
  "the time!\r\n",                                      /* AGE */
  "your burden of life!\r\n",                           /* WEIGHT */
  "your vertical stance!\r\n",                          /* HEIGHT */
  "your magical aura!\r\n",                             /* MANA */
  "your physical resistance!\r\n",                      /* HIT */
  "your ability to move!\r\n",                          /* MOVE */
  "your wealth!\r\n",                                   /* GOLD */
  "your conscious perception!\r\n",                     /* EXP */
  "your armor!\r\n",                                    /* AC */
  "the way you hit!\r\n",                               /* HITROLL */
  "the damage you give!\r\n",                           /* DAMROLL */
  "your ability to withstand paralysis!\r\n",           /* PARA */
  "your ability to withstand rod attacks!\r\n",         /* ROD */
  "your ability to withstand petrification!\r\n",       /* PETRI */
  "your ability to withstand breath Attacks!\r\n",      /* BREATH */
  "your ability to withstand spells!\r\n",              /* SPELL */
  "!RACES!\r\n"                                         /* RACE */
  "\n"};

 int cost = GET_OBJ_COST(obj), i, x, mes_get = 0;
 bool found = FALSE, sent = FALSE;

 if (cost == 0) cost = number(1, 1000);

 if (!obj->affected[0].modifier) {
  sprintf(buf, "%s cannot help you in any special way.\r\nBut it might
    bring %s if you sold it.\r\n", obj->short_description, money_desc(cost));
  send_to_char(buf, ch);
  return;
 }

 sprintf(buf, "%s can help you in the following way:\r\n", obj->short_descripti
on);
 for (i = 0; i < MAX_OBJ_AFFECT; i++)
   if (obj->affected[i].modifier) {
     if (number(0, 20) > GET_INT(ch) && GET_LEVEL(ch) < LVL_IMMORT)
     continue;

  switch(obj->affected[i].location) {
   case APPLY_NONE:
   case APPLY_RACE:
   case APPLY_CLASS:
   case APPLY_LEVEL:
    if (!found) {
     sprintf(buf, min_id[0], buf, money_desc(cost));
     found = TRUE;
     sent = TRUE;
    }
   break;
   default:
    mes_get = obj->affected[i].location;
    x = number(0, 1);
    sprintf(buf, "%s%s%s", buf, (x ? "it might do something about":
        "It could do something about "), min_id[mes_get]);
    sent = TRUE;
   break;
  }
 }


 if (!sent) {
  sprintf(buf, "It seems to you that %s cannot help you in any special
    way.\r\n", obj->short_description);
  send_to_char(buf, ch);
  return;
 }

 send_to_char(buf, ch);

}
---------- Snip ---------------

/Serces


<< IC Global Channel [by Quinn] | Reply | View as text | Flattened | Ignore Code [by Josh B.] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.