/************************************************
* *
* Nasty lil plague room flag *
* by Robert Little for ROM *
* "The Looking Glass" *
* http://www.TTTGames.Divineright.org *
* I ask if you use this, give me just a whee *
* bit of credit in your CREDIT section of ROM *
* This snippet was written by Drakken(me) for *
* Haven of the Embraced. Stop on by sometime :) *
************************************************/
INSTRUCTIONS:
STEP 1) IN MERC.H look for
-----------------------------------------
#define ROOM_NEWBIES_ONLY (R)
#define ROOM_LAW (S)
#define ROOM_NOWHERE (T)
*AND ADD*
#define ROOM_PLAGUE (V)
***USE ANY UNUSED LETTER YOU NEED TO***
***************************************************
STEP 2)IN TABLES.C look for
------------------------------------------
const struct flag_type room_flags[] =
{
{"dark", ROOM_DARK, TRUE},
{"no_mob", ROOM_NO_MOB, TRUE},
{"indoors", ROOM_INDOORS, TRUE},
{"private", ROOM_PRIVATE, TRUE},
{"safe", ROOM_SAFE, TRUE},
{"solitary", ROOM_SOLITARY, TRUE},
{"pet_shop", ROOM_PET_SHOP, TRUE},
{"no_recall", ROOM_NO_RECALL, TRUE},
{"imp_only", ROOM_IMP_ONLY, TRUE},
{"gods_only", ROOM_GODS_ONLY, TRUE},
{"heroes_only", ROOM_HEROES_ONLY, TRUE},
{"newbies_only", ROOM_NEWBIES_ONLY, TRUE},
{"law", ROOM_LAW, TRUE},
{"nowhere", ROOM_NOWHERE, TRUE},
*AND ADD*
{"plague", ROOM_PLAGUE, TRUE},
***MAKE SURE YOU ADD IT BEFORE***
{NULL, 0, 0}
***************************************************
STEP 3)IN ACT_MOVE.C look for
------------------------------------------------------
if (IS_SET(ch->in_room->room_flags,ROOM_LAW)
&& (IS_NPC(fch) && IS_SET(fch->act,ACT_AGGRESSIVE)))
{
act("You can't bring $N into the city.",
ch,NULL,fch,TO_CHAR);
act("You aren't allowed in the city.",
fch,NULL,NULL,TO_CHAR);
continue;
}
act( "You follow $N.", fch, NULL, ch, TO_CHAR );
move_char( fch, door, TRUE );
}
}
***AND ADD THIS DIRECTLY AFTER***
if (IS_SET (ch->in_room->room_flags, ROOM_PLAGUE) && (!IS_AFFECTED(ch,AFF_PLAGUE)))
{
spell_plague (skill_lookup ("plague"), MAX_LEVEL+100, ch, ch, TARGET_CHAR);
}
/****************************************************
*Thats all, do a compile and reboot the mud. Set a *
*room for PLAGUE and the character will have the *
*plague once they enter the room! If also checks to *
*see if they already have the plague, if they do, *
*it will not give it to them again. *
*****************************************************/