Re: [CODE][HELP] A SpecProc Needed

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 04/28/98


On Tue, 28 Apr 1998, Quinn ShadowStalker wrote:

->anyone out there wanna help with me with something?
->
->if so read this :)

Stuff like this casts serious doubt on whether you wrote the snippets
that have been attributed to you on the snippets site.  Hm, anyone
recall Riddler (heh, how could anyone forget)?  Was it not he who
accused someone of stealing code he "wrote", when it was publically
available?  Irregardless, on to the real stuff...

->a specproc called omnislash
->it'll send to the room
-><<<<<----- OMNI-SLASH ----->>>>>
->when it goes off, it'll do 100dam to the player/mob and it'll strike them
->5 times, but I just cant figure out how to get it to work, I tried writing
->one before but I just screwed it up (Im not a big guy on specprocs)
->so if you could help me I'd be very happy, and you'd get put into my
->credits.  Thanks for the time :)

Hm, before I present the Mailer Code(tm), I'm going to inquire about
the MIB (more is better) aspect of this function.  Namely, while some
players seem to enjoy the idea of doing insnae amounts of damage and
being level 2000, wouldn't it be far more enjoyable for serious
players to have fewer levels which _mean_ something?  I mean, if
someone had to spend a month to go from level 2 to level 3, then the
level 15 people would seem like "gods" to those young ones, and level
30 people...heh.  It was like the first MUD I played, before people
finally figured out the system: level 8 people with a spell of
invisibility made everyone gasp.  Sometimes it's better to be naive
and full of bliss, than seasoned with a jaded view.  ON to the code...

-----8< Cut here >8-----

/*
 * Naming convention: specX_<name>
 * Where 'X' is: w=weapon, o=object, m=mobile, r=room
 * -dak
 */
SPECIAL(specw_omnislash)
{
  struct obj_data * obj = (struct obj_data *) me;
  struct char_data * owner = obj->worn_by;
  int num_hits = 5;

  if (!owner || EQ(owner, WEAR_WIELD) != obj)
    return FALSE;
  if (!FIGHTING(owner) || cmd || GET_POS(owner) != POS_FIGHTING)
    return FALSE;

  send_to_room("<<<<<----- OMNI-SLASH ----->>>>>\r\n",owner->in_room);
  damage(owner, FIGHTING(owner), 100, GET_OBJ_VAL(obj, 3) + TYPE_HIT);
  while (x-- && FIGHTING(owner))
    hit(owner, FIGHTING(owner), TYPE_UNDEFINED);

  return TRUE;
}

-----8< The End >8-----

You'll have to call it in perform_violence().  Of course, if you call
it right in perform_violence(), you can greatly simplify the above
code.  But I'll leave that as an exercise to the reader (I think my
weapon spells patch (wspell.diff.tgz) will help with that).

-dak : The Lakers _are_ going to sweep the Blazers...


     +------------------------------------------------------------+
     | 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