Re: Mob Problems.... Mob probs.. heh, Thats funny ;)

From: Jimmy Brians (f_t_p_7_7_7@HOTMAIL.COM)
Date: 09/09/98

Any chance room affect spells will ever be part of
stock circle?  It is a nice addition that doesn't
alter how anything else works.

Well, room affect spells are extremely easy to code in, just fyi. I've
done about 50 room things and it gets easier every day. A simple for
statement will do it :

for (vict = world[ch->in_room].people; vict; vict = next_v) {
    next_v = vict->next_in_room
    thing_to_do_to_vict(vict); }

which is how its done for fireball more or less, i use a simpler way

for (vict = world[ch->in_room].people; vict; vict =
vict->next_in_room) {
    stuff_to_do_to_vict(vict); }

in both of these, vict and next_v  are struct char_data's. And it will
do  "stuff_to_do_to_vict" to every person in the room, including you. If
you need more help on this, if i was wrong, or if you like my simple
coding, feel free to write for more help.

-SandMan, Master Koder, KombatMUD ( 1234)

Get Your Private, Free Email at

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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