Re: Handy trigger

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 09/21/98


Is it just me or didn't this trigger come out with v4 of dg-scripts?  Think you
need to upgrade Erik. (either that or you need to be credited in the dg-scripts
changes file)

--Angus

______________________________ Reply Separator _________________________________
Subject:  Handy trigger
Author:  INTERNET:CIRCLE@POST.QUEENSU.CA at CSERVE
Date:    9/19/98 10:18 PM

Add MTRIG_LOAD to dg_scripts,h
Up NUM_TRIG_TYPES in same file
Add "Load" and "UNUSED" to trig_types[], wtrig_types[] etc in dg_triggers.c
Prototype this function wherever
Add load_mtrigger(mob) to do_load in act.wizard.c and in zone_reset in db.c
Be sure this is called _after_ the mob is actually placed in the room.
Add the following function to dg_triggers.c.....
int load_mtrigger(char_data * ch)
{
  trig_data *t;

  if (!SCRIPT_CHECK(ch, MTRIG_LOAD) || AFF_FLAGGED(ch, AFF_CHARM))
    return 1;

  for (t = TRIGGERS(SCRIPT(ch)); t; t = t->next) {
    if (TRIGGER_CHECK(t, MTRIG_LOAD)) {
      return script_driver(ch, t, MOB_TRIGGER, TRIG_NEW);
    }
  }

  return 1;
}

Erik Madison
ICQ #13940294
fafhrd@rotd.com


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