Bamfin/bamfout

Posted by Zeno on Tue 18 Jan 2005 04:55 PM — 4 posts, 10,368 views.

USA #0
Bamfin/bamfouts are setup in a way I really don't like. If the user is invis, no one will see the bamfin/out, even if they are a higher level. After installing ghost and incognito, it's even worse now, since the bamfin shows up when ghosted, so ghosting has no point.

Bamfout setup:
    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
    {
        if (ch->pcdata && ch->pcdata->bamfout[0] != '\0')
            act( AT_IMMORT, "$T", ch, NULL, ch->pcdata->bamfout ,  TO_ROOM );
        else
            act( AT_IMMORT, "$n $T", ch, NULL, "disappears in a brilliant flash of light.",  TO_ROOM);
    }

/* Old bamfout code  -Zeno
    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
        act( AT_IMMORT, "$n $T", ch, NULL,
            (ch->pcdata && ch->pcdata->bamfout[0] != '\0')
            ? ch->pcdata->bamfout : "leaves in a swirling mist.",  TO_ROOM );
*/


Bamfin setup:
    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
    {
        if (ch->pcdata && ch->pcdata->bamfin[0] != '\0')
        {
            act( AT_IMMORT, "$T", ch, NULL, ch->pcdata->bamfin ,  TO_ROOM );
        }
        else
        {
            act( AT_IMMORT, "$n $T", ch, NULL, "appears in a brilliant flash of light.", TO_ROOM );
        }
    }

/*  Old bamfin code  -Zeno
    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
        act( AT_IMMORT, "$n $T", ch, NULL,
            (ch->pcdata && ch->pcdata->bamfin[0] != '\0')
            ? ch->pcdata->bamfin : "appears in a swirling mist.", TO_ROOM );
*/


Changing TO_ROOM to TO_CANSEE makes it so the bamfin/out still shows up, but the user name is replaced with "Someone" which is useless.

Does anyone see a way around this so bamfin will work so those above the invis user will see the bamfin/out? Is it understood what I want to do? I'd rather not do a for loop just for this.
USA #1
Just to be clear, you're trying to have the bamfin/out appear when somebody is wizinvis, but only to people who could normally see that person while wizinvis?

I'm afraid you'd need a forloop for that, where you act TO_CHAR, if the current act flags don't do it.
USA #2
Yes, correct.

Argh. It's easy to a forloop, but don't want to do one because I'd have to deal with ghost, incog, invis, and so on. Arghhhh. -.-
USA #3
I suppose you could always add an extra flag to act, or modify the cansee flag. Sure, it'll be a pain, but at least then you only do it once and you can use it everywhere. You'll have to be careful to not introduce new 'features' by accident, though. :)