Re: [Circle] [Admin/Code] Fly Spell

From: Erik (madison@nevada.edu)
Date: 11/07/96


On Thu, 7 Nov 1996, Brian Guilbault wrote:

> Guys-
> 
> I have added flying to my mud now and everything went according to plan 
> (eventually...but you know how that goes). Anyway, the spell has led to 
> an admin question and a coding question.
> 
> The admin question is this: To those of you who have imped flying, what 
> do you do when a char's flying spell wears off when they are in a flying 
> room? The way I plan to do it is is deal damage to the character if they 
> are in a normal room (they can't fly indoors, but can anywhere else). 
> But in a FLYING room, what do you do with them? You can't really say, 
> "You fall on the ground" when there is no ground, and outright killing 
> them seems a bit harsh. Anyway just curious.

  Our code only allows no_ground rooms, if there is a down exit 
associated with it. So, losing fly while in one of those rooms, simply 
passes the player on to another custom function we have, falling_char(). 
This counts the number of rooms a players falls down, increasing the 
speed for each one, and finally calculates a percentage of damage they 
will take. We use percentage, as its only fair that a level 1 has the 
same chance at death as a level 30+.

> 
> The coding question: Is there a function built in someplace that checks 
> the duration left on spells? I know about the wear-off messages, but I'd 
> like to send a message to char when time left on fly is 2, and 1, and 
> then finally do the damage or whatever when it reaches 0. I imagine I 
> could write something with a few str_cmp lines but I was just wondering 
> if it already does this someplace because I can't seem to find anything.
> 
  
  Our wear_off system is completely event driven, so I couldn't aid you 
directly, but it should be rather easy to fathom yourself. Find the part 
of the code that sends the wear off message itself. It's bound to have 
some type of counter, that sends the message when it reaches 0. Simply 
send a warning from there, if the counter reaches 1-2.


> Thanks for your help,
> 
>    -Brian
> 
> P.S.--> I will post my fly code to the list and the ftp site when it's 
> done in case anyone wants it. 
> 
> 
> 
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> Brian Guilbault - GMI Engineering Institute
> E-mail: guil9964@gmi.edu, dante@i-55.com
> WWW: http://apollo.gmi.edu/~guil9964
> QuarantineMUD: Telnet to exit1.i-55.com 4000
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
> 
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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