Re: Various cool Problems !

From: Rasdan (rasdan@PEAK.ORG)
Date: 09/01/97

> now that part is oki ...but all you folks can guess that the spec_proc will
> do this if thingy every TICK until the players killed the mage, so my very
> sharp
> brain very fast thought, Ahhh let put in a counter there !!!
> like
> int counter;
> ~~~cut
> if (get_hit(ch) <50 && counter <1)
> ~~cut
> counter = 1;
> Understand my thoughts ?! how do i make so that it only will jump into this
> if thingy once, ie only loads the mob once ??
Just make a char flag that is set when the mob is loaded, if this flag is
set, don't load:


if (!AFF_FLAGGED(ch, AFF_NO_LOAD_MOB) && GET_HIT(ch) < 50) {
  vict = read_mobile(VNUM, VIRTUAL);
  char_to_room(vict, ch->in_room);

Where vict is declared at beginning of function, and VNUM is whatever mob
you need.

Note that you will need to remove this flag, I would suggest probably
doing it on login, so that they only have this power once per login, or
you could do it in the functions in weather.c (not sure which one, my
weather.c is so different), by looking through the character list and
removing the flag like this:
  for (ch = character_list; ch; ch = ch->next) {

> Next problem is !
> I have flagged the loaded mob with a couple of AFF, like sanc, charm,
> no probs there
> but how do i tell the loaded mob to start fight the character that fights
> his master (the mage)
> and also i need something like that the loaded mob will RESCUE the mage so
> that  the loaded mob will take all the hits while the mage heals up a bit.

  if (FIGHTING(ch))
    hit(vict, FIGHTING(ch), TYPE_UNDEFINED);

>     mob = read_mobile(mob, 3062);  /* Insert the Stone Golem Here */
> ^^^ how do i change the mob .. i always get PUFF loaded ...

read_mobile requires two different arguments, the first being the number
of the mob (either real or vnum), and the second telling it what type of
mob to load (VIRTUAL or REAL).

  I have done so much,
  with so little,                         James C. Thomas Jr.
  for so long,                                 Rasdan
  That I can do anything                Head Coder of Finality!
  with nothing.
Finality is based upon CircleMUD 3.0, check us out:

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

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