Esempio n. 1
0
File: clan.c Progetto: verias/SRMud
/* clan channels */
void do_clantalk( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    DESCRIPTOR_DATA *d;

    if (!is_clan(ch))
    {
	send_to_char("You aren't in a clan.\n\r",ch);
	return;
    }
    if ( argument[0] == '\0' )
    {
      if (IS_SET(ch->comm,COMM_NOCLAN))
      {
        send_to_char("Clan channel is now ON\n\r",ch);
        REMOVE_BIT(ch->comm,COMM_NOCLAN);
      }
      else
      {
        send_to_char("Clan channel is now OFF\n\r",ch);
        SET_BIT(ch->comm,COMM_NOCLAN);
      }
      return;
    }

        if (IS_SET(ch->comm,COMM_NOCHANNELS))
        {
         send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
          return;
        }

        REMOVE_BIT(ch->comm,COMM_NOCLAN);
	  if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);

      sprintf( buf, "You clan '%s'{x\n\r", argument );
      send_to_char( buf, ch );
      sprintf( buf, "$n clans '%s'{x", argument );
    for ( d = descriptor_list; d != NULL; d = d->next )
    {
        if ( d->connected == CON_PLAYING &&
			is_same_clan(ch,d->character) &&
	     is_same_clan(ch,d->character) &&
         !IS_SET(d->character->comm,COMM_NOCLAN) &&
	     !IS_SET(d->character->comm,COMM_QUIET) )
        {
            act_new("$n clans '$t'{x",ch,argument,d->character,TO_VICT,POS_DEAD);
        }
		if(IS_SET(d->character->comm,COMM_ALLCLAN) &&
			d->connected == CON_PLAYING &&
             d->character != ch
			 && !is_same_clan(d->character, ch))
		{
			send_to_one(d->character,"[ %s ] %s clans '%s'{x",clan_table[ch->clan].name,ch->name,
				argument);
		}
    }

    return;
}
Esempio n. 2
0
void do_afk ( CHAR_DATA *ch, char *argument)
{
    // unswitched mobs can't be afk
    if (IS_UNSWITCHED_MOB(ch)) {
	send_to_char("No.\n\r", ch);
        return;
    }

    if (!IS_NULLSTR(argument)) {
    // so you can change your afk message without turning afk off
	REMOVE_BIT(ch->act, PLR_AFK);
    }

    if (IS_SET(ch->act, PLR_AFK)) {
       act("$n has returned from being AFK.",ch,NULL,NULL,NULL,NULL,TO_ROOM,SENSE_SIGHT);
       send_to_char("AFK mode removed.\n\r", ch);
       REMOVE_BIT(ch->act, PLR_AFK);
    } else {
	if(IS_NULLSTR(argument)) {
	    act("$n has gone AFK.",ch,NULL,NULL,NULL,NULL,TO_ROOM,SENSE_SIGHT);
	    send_to_char( "You are now in AFK mode.\n\r", ch);
	} else {
	    act("$n has gone AFK ($t).",ch,NULL,NULL,argument,NULL,TO_ROOM,SENSE_SIGHT);
	    send_to_char( "You are now in AFK mode.\n\r", ch);
	}
	SET_BIT(ch->act, PLR_AFK);
    }
}
Esempio n. 3
0
void do_fixhead( CHAR_DATA *ch, char *argument )
{
    char arg1[MSL];
    CHAR_DATA *victim;

    argument = one_argument( argument, arg1 );
    victim = get_char_world(ch, arg1);

    if ( arg1[0] == '\0' )
    {
        send_to_char("Syntax: fixhead <player name>\n\r",ch);
        return;
    }
    if (victim == NULL)
    {
        send_to_char("They must be playing.\n\r", ch);
        return;
    }
    if (IS_NPC(victim))
    {
        send_to_char("Not on NPC's\n\r", ch);
        return;
    }

    if ( !IS_HEAD(victim,LOST_HEAD) )
        return stcf(ch,"They're not a head!\n\r");

    REMOVE_BIT(victim->loc_hp[0],LOST_HEAD);
    REMOVE_BIT(victim->affected_by,AFF_POLYMORPH);
    if ( victim->morph ) free_string(victim->morph);
    stcf(ch,"%s has been fixed.\n\r",victim->name);
    stcf(victim,"You have been fixed!\n\r");
}
Esempio n. 4
0
void do_approve( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *ach;
    char buf[MAX_STRING_LENGTH];

    ach = get_char_world( ch, argument );
    if ( ach == NULL || IS_NPC( ach ) )
    {
	send_to_char( "No such character to approve.\n\r", ch );
	return;
    }

    if ( !IS_SET( ach->act, PLR_REVIEWING ) )
    {
	send_to_char( "That character is not being reviewed.\n\r", ch );
	return;
    }

    REMOVE_BIT( ach->act, PLR_REJECTED );
    REMOVE_BIT( ach->act, PLR_UNAPPROVED );

    sprintf( buf, "rm -f %s%s", REJECTED_DIR, capitalize( ach->name ) );
    system( buf );
    sprintf( buf, "rm -f %s%s", UNAPPROVED_DIR, capitalize( ach->name ) );
    system( buf );

    save_char_obj( ach );
    do_quit( ach, "" );

    send_to_char( "Character approved.\n\r", ch );
    return;
}
Esempio n. 5
0
uint8_t DHT::getStatus(void) {
    // If temperature is at an extreme, set to warning...
    if (_lastTemperature > 100 || _lastTemperature < 60) {
        REMOVE_BIT(_status, STATUS_TEMP_GOOD);
        ADD_BIT(_status, STATUS_TEMP_WARN);
        // If temperature is really extreme, set to alert...
        if (_lastTemperature > 110 || _lastTemperature < 40) {
            REMOVE_BIT(_status, STATUS_TEMP_WARN);
            ADD_BIT(_status, STATUS_TEMP_ALRT);
        }
    }

    // If humidity is low, set to warning...
    if (_lastHumidity < 60) {
        REMOVE_BIT(_status, STATUS_HUMI_GOOD);
        ADD_BIT(_status, STATUS_HUMI_WARN);
        // If humidity is extreme, set to alert...
        if (_lastHumidity < 20) {
            REMOVE_BIT(_status, STATUS_HUMI_WARN);
            ADD_BIT(_status, STATUS_HUMI_ALRT);
        }
    }

    return (_status);
}
Esempio n. 6
0
void do_infravision( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;

    if (!IS_CLASS(ch, CLASS_DROID))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }

    if (ch->pcdata->powers[CYBORG_FACE] < 1)
    {
        send_to_char("You need at least 1 implant on your face to use your unholy sight.\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[CYBORG_FACE] > 2)
    {
        if (IS_SET(ch->act, PLR_HOLYLIGHT))
        {
            REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->act, PLR_HOLYLIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    else if (ch->pcdata->powers[CYBORG_FACE] == 2)
    {
        if (IS_SET(ch->affected_by, AFF_SHADOWSIGHT) && IS_SET(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT))
        {
            REMOVE_BIT(ch->affected_by, AFF_SHADOWSIGHT);
            REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->affected_by, AFF_SHADOWSIGHT);
            SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    else if ((ch->pcdata->powers[CYBORG_FACE] == 1))
    {
        if (IS_SET(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT))
        {
            REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    return;
}
Esempio n. 7
0
File: send.c Progetto: verias/SRMud
void do_quote( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    DESCRIPTOR_DATA *d;
 
    if (argument[0] == '\0' )
    {
      if (IS_SET(ch->comm,COMM_NOQUOTE))
      {
        send_to_char("{hQuote channel is now ON.{x\n\r",ch);
        REMOVE_BIT(ch->comm,COMM_NOQUOTE);
      }
      else
      {
        send_to_char("{hQuote channel is now OFF.{x\n\r",ch);
        SET_BIT(ch->comm,COMM_NOQUOTE);
      }
    }
    else  /* quote message sent, turn quote on if it isn't already */
    {
        if (IS_SET(ch->comm,COMM_QUIET))
        {
          send_to_char("You must turn off quiet mode first.\n\r",ch);
          return;
        }
 
        if (IS_SET(ch->comm,COMM_NOCHANNELS))
        {
          send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
          return;
 
        }
 
      REMOVE_BIT(ch->comm,COMM_NOQUOTE);
 
	  if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);

      sprintf( buf, "{hYou quote '{H%s{h'{x\n\r", argument );
      send_to_char( buf, ch );
      for ( d = descriptor_list; d != NULL; d = d->next )
      {
        CHAR_DATA *victim;
 
        victim = d->original ? d->original : d->character;
 
        if ( d->connected == CON_PLAYING &&
             d->character != ch &&
             !IS_SET(victim->comm,COMM_NOQUOTE) &&
             !IS_SET(victim->comm,COMM_QUIET) )
        {
          act_new( "{h$n quotes '{H$t{h'{x",
                   ch,argument, d->character, TO_VICT,POS_SLEEPING );
        }
      }
    }
}
Esempio n. 8
0
void do_spiderform( CHAR_DATA *ch, char *argument ) 
{
	char arg[MAX_INPUT_LENGTH];
	char buf[MAX_STRING_LENGTH];
 
	argument = one_argument(argument,arg);

	if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) ||!IS_SET(ch->pcdata->powers[1], DPOWER_SPIDERFORM))
	{send_to_char("Huh?\n\r", ch );
	return;}

	if (IS_AFFECTED(ch, AFF_POLYMORPH)) 
      {
	send_to_char("You can't spiderform while changed.\n\r", ch );
	return;
      }

      if (IS_SET(ch->newbits,NEW_DFORM))
      {
	sprintf(buf, "$n morphs back into %s.", GET_PROPER_NAME(ch));
        act(buf, ch, NULL, NULL, TO_ROOM);
        stc("You return to your normal form.\n\r", ch);
        free_string(ch->morph);
        ch->morph = str_dup("");
        ch->hitroll -= 400;
        ch->damroll -= 400;
        ch->armor   += 1000;
        REMOVE_BIT(ch->newbits,NEW_DFORM);
	REMOVE_BIT(ch->newbits,THIRD_HAND);
	REMOVE_BIT(ch->newbits,FOURTH_HAND);
        WAIT_STATE(ch, 7);
        return;   
      }

      else if (!IS_SET(ch->newbits,NEW_DFORM))
      {
	
	act("You mutate into a giant spider.",ch,NULL,NULL,TO_CHAR);
        act("$n mutates into a giant spider.",ch,NULL,NULL,TO_ROOM);
        sprintf(buf,"%s the giant mylochar",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->hitroll += 400;
        ch->damroll += 400;
        ch->armor   -= 1000;
        SET_BIT(ch->newbits,NEW_DFORM);
	SET_BIT(ch->newbits,THIRD_HAND);
	SET_BIT(ch->newbits,FOURTH_HAND);
	return;
    }

	return;
}
Esempio n. 9
0
void RemHatred( struct char_data *ch, unsigned short bitv)
{
  if( IS_PC( ch ) )
  { 
    return;
  }

  REMOVE_BIT(ch->hatefield, bitv);
  if (!ch->hatefield)
    REMOVE_BIT(ch->specials.act, ACT_HATEFUL);
}
Esempio n. 10
0
void do_enmity(CHAR_DATA *ch, char *argument)
{
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    CHAR_DATA *victim1;
    CHAR_DATA *victim2;

    argument = one_argument( argument, arg1 );
    argument = one_argument( argument, arg2 );

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_TANARRI))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_EMNITY))
    {
        send_to_char("you don't have that power yet.\n\r",ch);
        return;
    }
    if ((victim1 = get_char_room(ch, NULL, arg1)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if ((victim2 = get_char_room(ch, NULL, arg2)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (IS_NPC(victim1) || IS_NPC(victim2))
    {
        send_to_char("Not on NPC's\n\r",ch);
        return;
    }
    do_say(ch,"Xenus, Morkain, Hau!");
    if (number_percent() > 60)
    {
        SET_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_kill(victim1, victim2->pcdata->switchname);
        REMOVE_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim1);
    if (number_percent() > 60)
    {
        SET_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_kill(victim2, victim1->pcdata->switchname);
        REMOVE_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim2);
    WAIT_STATE(ch,24);
    return;
}
Esempio n. 11
0
void do_cubeform( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;

    if (!IS_CLASS(ch, CLASS_DROID) )
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }

    if (ch->pcdata->powers[CYBORG_BODY] < 5)
    {
        send_to_char("You must have level 5 body.\n\r",ch);
        return;
    }

    if ( IS_SET(ch->newbits, NEW_CUBEFORM))
    {
        REMOVE_BIT(ch->newbits, NEW_CUBEFORM);
        REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
        act( "$n turns into a spider droid.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You turn into your normal form.\n\r",ch);
        ch->damroll -=250;
        ch->hitroll -=250;
        free_string(ch->morph);
        ch->morph=str_dup("");
        return;
    }

    if (ch->move < 2000 || ch->mana < 2000)
    {
        send_to_char("You need 2000 mana and 2000 move to make yourself an avatar of Lloth.\n\r",ch);
        return;
    }

    else
    {
        act( "$n eyes flicker as an evil presence enter it's body.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You let the essence of Lloth invade your body.\n\r",ch);
        SET_BIT(ch->newbits, NEW_CUBEFORM);
        SET_BIT(ch->affected_by, AFF_POLYMORPH);
        sprintf(buf,"%s the avatar of Lloth",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->move -= 2000;
        ch->mana -= 2000;
        ch->damroll +=250;
        ch->hitroll +=250;
        return;
    }
    return;
}
Esempio n. 12
0
File: send.c Progetto: verias/SRMud
void do_shout( CHAR_DATA *ch, char *argument )
{
    DESCRIPTOR_DATA *d;

    if (argument[0] == '\0' )
    {
      	if (IS_SET(ch->comm,COMM_SHOUTSOFF))
      	{
            send_to_char("You can hear shouts again.\n\r",ch);
            REMOVE_BIT(ch->comm,COMM_SHOUTSOFF);
      	}
      	else
      	{
            send_to_char("You will no longer hear shouts.\n\r",ch);
            SET_BIT(ch->comm,COMM_SHOUTSOFF);
      	}
      	return;
    }

    if ( IS_SET(ch->comm, COMM_NOSHOUT) )
    {
        send_to_char( "You can't shout.\n\r", ch );
        return;
    }
 
    REMOVE_BIT(ch->comm,COMM_SHOUTSOFF);

    WAIT_STATE( ch, 12 );

	if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);


    act( "{tYou shout '$T'{x", ch, NULL, argument, TO_CHAR );
    for ( d = descriptor_list; d != NULL; d = d->next )
    {
	CHAR_DATA *victim;

	victim = d->original ? d->original : d->character;

	if ( d->connected == CON_PLAYING &&
	     d->character != ch &&
	     !IS_SET(victim->comm, COMM_SHOUTSOFF) &&
	     !IS_SET(victim->comm, COMM_QUIET) ) 
	{
	    act("{t$n shouts '$t'{x",ch,argument,d->character,TO_VICT);
	}
    }

    return;
}
Esempio n. 13
0
void do_gfavor( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_LOVE] < 2)
    {
        send_to_char("God does not love you enough to grant his divine favor.\n\r",ch);
        return;
    }
    if (ch->alignment != 1000) ch->alignment = 1000;
    if (IS_SET(ch->newbits, NEW_CUBEFORM))
    {
        REMOVE_BIT(ch->newbits, NEW_CUBEFORM);
        REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
        act( "$n turns into a human.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You turn into your normal form.\n\r",ch);
        ch->damroll -=400;
        ch->hitroll -=400;
        free_string(ch->morph);
        ch->morph=str_dup("");
        return;
    }
    if (ch->move < 2000 || ch->mana < 2000)
    {
        send_to_char("You need 2000 mana and 2000 move to make yourself a true angel.\n\r",ch);
        return;
    }
    else
    {
        act( "$n transforms into an angel.",ch,NULL,NULL,TO_ROOM);
        send_to_char("God is with you, your now one of his divine.\n\r",ch);
        SET_BIT(ch->newbits, NEW_CUBEFORM);
        SET_BIT(ch->affected_by, AFF_POLYMORPH);
        sprintf(buf,"%s the angel",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->move -= 2000;
        ch->mana -= 2000;
        ch->damroll +=400;
        ch->hitroll +=400;
        return;
    }
    return;
}
Esempio n. 14
0
void do_darkness(CHAR_DATA *ch, char *argument) 
{
	bool blah = FALSE;

	if (IS_NPC(ch)) return;

	if ((!IS_CLASS(ch, CLASS_DROW) && !IS_CLASS(ch, CLASS_DROID))
        || (!IS_SET(ch->pcdata->powers[1], DPOWER_DARKNESS) && !IS_CLASS(ch, CLASS_DROID)))
        {
	do_vampdarkness(ch,argument);
	return;}

	if (ch->fight_timer>0) {
	  send_to_char("Not until your fighttimer expires.\n\r",ch);
	  return;
	}

	if (IS_SET(ch->newbits, NEW_DARKNESS)) {
	send_to_char("You banish your globe of darkness.\n\r", ch );
	act("The globe of darkness around $n disappears.",ch,NULL,NULL,TO_ROOM);
	REMOVE_BIT(ch->newbits, NEW_DARKNESS);
	if (ch->in_room != NULL)
	if (IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
	REMOVE_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
	return;
	}

	if (ch->mana < 500) {
	send_to_char("You don't have enough mana to summon the darkness.\n\r",ch );
	return;}

	send_to_char("You summon a globe of darkness.\n\r", ch );
	act("$n summons a globe of darkness.",ch,NULL,NULL,TO_ROOM);
	ch->mana -= 500;
	if (IS_SET(ch->extra, TIED_UP)) {
		REMOVE_BIT(ch->extra, TIED_UP);
		blah = TRUE;}

	if (IS_AFFECTED(ch, AFF_WEBBED)) {
		REMOVE_BIT(ch->affected_by, AFF_WEBBED);
		blah = TRUE;}

	if (blah) send_to_char("The darkness sets you free.\n\r", ch );		

	SET_BIT(ch->newbits, NEW_DARKNESS);
	if (!IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
	SET_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
	return;
}
Esempio n. 15
0
int
do_pass_remort_test(struct creature *ch)
{
    int i;

    // Wipe thier skills
    for (i = 1; i <= MAX_SKILLS; i++)
        SET_SKILL(ch, i, 0);

    do_start(ch, false);

    REMOVE_BIT(PRF_FLAGS(ch),
        PRF_NOPROJECT | PRF_ROOMFLAGS | PRF_HOLYLIGHT | PRF_NOHASSLE |
        PRF_LOG1 | PRF_LOG2 | PRF_NOWIZ);

    REMOVE_BIT(PLR_FLAGS(ch), PLR_HALT | PLR_INVSTART | PLR_MORTALIZED |
        PLR_OLCGOD);

    GET_INVIS_LVL(ch) = 0;
    GET_COND(ch, DRUNK) = 0;
    GET_COND(ch, FULL) = 0;
    GET_COND(ch, THIRST) = 0;

    // Give em another gen
    if (GET_REMORT_GEN(ch) == 10)
        account_set_quest_points(ch->account, ch->account->quest_points + 1);
    else
        GET_REMORT_GEN(ch)++;

    // At gen 1 they enter the world of pk, like it or not
    if (GET_REMORT_GEN(ch) >= 1 && RAW_REPUTATION_OF(ch) <= 0)
        gain_reputation(ch, 5);
    // Whack thier remort invis
    GET_WIMP_LEV(ch) = 0;       // wimpy
    GET_TOT_DAM(ch) = 0;        // cyborg damage

    // Tell everyone that they remorted
    char *msg = tmp_sprintf("%s completed gen %d remort test",
        GET_NAME(ch), GET_REMORT_GEN(ch));
    mudlog(LVL_IMMORT, BRF, false, "%s", msg);

    REMOVE_BIT(ch->in_room->room_flags, ROOM_NORECALL);

    // Save the char and its implants but not its eq
    creature_remort(ch);

    return 1;
}
Esempio n. 16
0
void do_halo( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 2)
    {
        send_to_char("You haven't gotten your halo yet.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO);
        act("Your halo flickers and disappears.", ch, NULL, NULL, TO_CHAR);
        act("$n's halo flickers and disappears.", ch, NULL, NULL, TO_ROOM );
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO);
    act("A halo appears over your head.", ch, NULL, NULL, TO_CHAR);
    act("A halo appears over $n's head.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 17
0
void do_awings( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 1)
    {
        send_to_char("Your don't have wings yet.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS);
        act("You fold your wings back into your body.", ch, NULL, NULL, TO_CHAR);
        act("$n fold $s wings back into $s body.", ch, NULL, NULL, TO_ROOM );
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS);
    act("You spread your wings.", ch, NULL, NULL, TO_CHAR);
    act("$n spread $s wings.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 18
0
void do_spiritform( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_PEACE] < 2)
    {
        send_to_char("Your not peaceful enough.\n\r",ch);
        return;
    }
    if (has_timer(ch)) return;
    if (IS_AFFECTED(ch, AFF_ETHEREAL))
    {
        REMOVE_BIT(ch->affected_by, AFF_ETHEREAL);
        act("You regain your form and become solid.",  ch, NULL, NULL, TO_CHAR);
        act("$n regains $s form and becomes solid again.",  ch, NULL, NULL, TO_ROOM);
        return;
    }
    SET_BIT(ch->affected_by, AFF_ETHEREAL);
    act("You transform into pure spiritual matter.", ch, NULL, NULL, TO_CHAR);
    act("$n glows and fades into a form of pure energy.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 19
0
void do_gsenses( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_LOVE] < 1)
    {
        send_to_char("God does not love you enough to grant you sight.\n\r",ch);
        return;
    }
    if (IS_SET(ch->act, PLR_HOLYLIGHT))
    {
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char("Your holy vision fades.\n\r", ch);
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You see through God's own eyes.\n\r", ch );
    }
    return;
}
Esempio n. 20
0
bool spec_executioner( CHAR_DATA *ch )
{
	char buf[MSL]={'\0'};
	CHAR_DATA *victim;
	CHAR_DATA *v_next;
	char *crime;

	if ( !IS_AWAKE(ch) || ch->fighting != NULL )
	return FALSE;

	crime = "";
	for ( victim = ch->in_room->people; victim != NULL; victim = v_next )
	{
	v_next = victim->next_in_room;

	if ( !IS_NPC(victim) && IS_SET(victim->act, PLR_KILLER) 
	&&   can_see(ch,victim))
		{ crime = "KILLER"; break; }

	if ( !IS_NPC(victim) && IS_SET(victim->act, PLR_THIEF) 
	&&   can_see(ch,victim))
		{ crime = "THIEF"; break; }
	}

	if ( victim == NULL )
	return FALSE;

	sprintf( buf, "%s is a %s!  PROTECT THE INNOCENT!  MORE BLOOOOD!!!", victim->name, crime );
	REMOVE_BIT(ch->comm,COMM_NOSHOUT);
	do_function(ch, &do_yell, buf );
	multi_hit( ch, victim, TYPE_UNDEFINED );
	return TRUE;
}
Esempio n. 21
0
void die(struct char_data *ch)
{
  gain_exp(ch, -(GET_EXP(ch) / 2));
  if (!IS_NPC(ch))
    REMOVE_BIT(PLR_FLAGS(ch), PLR_KILLER | PLR_THIEF);
  raw_kill(ch);
}
Esempio n. 22
0
void do_magicsight( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_WIZARD))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (IS_CLASS(ch, CLASS_WIZARD) && ch->pcdata->powers[WL_SKILLS] < 2)
    {
        stc("You can't do that yet.\n\r",ch);
        return;
    }
    if ( IS_SET(ch->act, PLR_HOLYLIGHT) )
    {
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "#CYour senses return to normal.\n\r", ch );
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "#CYour #sm#sa#sg#si#sc#sa#sl #Csenses increase to incredible proportions.\n\r", ch );
    }

    return;
}
Esempio n. 23
0
void do_fryballs( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;

    if ( !argument[0] )
        return stcf(ch,"Who should fry balls?\n\r");

    if ( !(victim = get_char_world(ch,argument)) )
        return stcf(ch,"They're not here!\n\r");

    if ( IS_NPC(victim) )
        return stcf(ch,"Not on NPC's.\n\r");

    if ( !IS_SET(victim->extra, EXTRA_FRYBALLS) )
    {
        SET_BIT(victim->extra, EXTRA_FRYBALLS);
        stcf(ch,"%s is now frying balls.\n\r",victim->name);
    }
    else
    {
        REMOVE_BIT(victim->extra, EXTRA_FRYBALLS);
        stcf(ch,"%s is no longer frying balls.\n\r",victim->name);
    }

}
Esempio n. 24
0
bool spec_auth( CHAR_DATA * ch )
{
  CHAR_DATA *victim = NULL;
  CHAR_DATA *v_next = NULL;
  char buf[MAX_STRING_LENGTH];

  for( victim = ch->in_room->first_person; victim; victim = v_next )
  {
    v_next = victim->next_in_room;

    if( IS_NPC( victim )
	|| !IS_SET( victim->pcdata->flags, PCFLAG_UNAUTHED ) )
      continue;

    victim->pcdata->auth_state = 3;
    REMOVE_BIT( victim->pcdata->flags, PCFLAG_UNAUTHED );
    if( victim->pcdata->authed_by )
      STRFREE( victim->pcdata->authed_by );
    victim->pcdata->authed_by = QUICKLINK( ch->name );
    snprintf( buf, MAX_STRING_LENGTH,
	      "%s has graduated the academy.", victim->name );
    to_channel( buf, CHANNEL_MONITOR, "Monitor", ch->top_level );
    if( victim->pcdata->clan )
      victim->pcdata->clan->members++;
  }

  return FALSE;
}
Esempio n. 25
0
//
// makes an exit token, and parses options. Returns NULL if there's bad options
PARSE_TOKEN *parse_token_exit(const char *options) {
  // make it
  PARSE_TOKEN *token = newParseTokenDescriptive(PARSE_TOKEN_EXIT, options);

  // search for options
  while(*options != '\0') {
    if(!strncasecmp(options, ".multiple", 9)) {
      options = options + 9;
      token->all_ok = TRUE;
    }
    else if(!strncasecmp(options, ".invis_ok", 9)) {
      options = options + 9;
      REMOVE_BIT(token->scope, FIND_SCOPE_VISIBLE);
    }
    else if(*options == '(' && endswith(options, ")"))
      break;
    // didn't recognize the option
    else {
      deleteParseToken(token);
      token = NULL;
      break;
    }
  }

  return token;
}
Esempio n. 26
0
void do_gpeace( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_PEACE] < 1)
    {
        send_to_char("Your not peaceful enough.\n\r",ch);
        return;
    }
    if (has_timer(ch)) return;
    if (IS_AFFECTED(ch, AFF_PEACE))
    {
        REMOVE_BIT(ch->affected_by, AFF_PEACE);
        act("Time to punish the unbelievers.",  ch, NULL, NULL, TO_CHAR);
        act("$n looks wicked.",  ch, NULL, NULL, TO_ROOM);
        return;
    }
    SET_BIT(ch->affected_by, AFF_PEACE);
    act("The almighty hand of God protects you from further harm.", ch, NULL, NULL, TO_CHAR);
    act("$n smiles, seems God is on $s side.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 27
0
void do_eyeforaneye( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 5)
    {
        send_to_char("Your not ready to punish the sinners.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_EYE))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_EYE);
        act("The sinners have paid for their sin, you send a prayer of thanks to God.", ch, NULL, NULL, TO_CHAR);
        act("$n's prays to $s god, thanking for the opportunity to punish the sinners.", ch, NULL, NULL, TO_ROOM);
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_EYE);
    act("#CTime to punish the wicked and the sinful.#n", ch, NULL, NULL, TO_CHAR);
    act("$n grins wickedly, and a smile of pleasure crosses $s lips.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 28
0
void do_angelicaura( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_HARMONY] < 2)
    {
        send_to_char("Your not in contact with your inner harmonies.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_AURA))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_AURA);
        act("Your angelic aura fades.", ch, NULL, NULL, TO_CHAR);
        act("$n looks less powerful.", ch, NULL, NULL, TO_ROOM);
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_AURA);
    act("Your angelic auras flickers into existance.", ch, NULL, NULL, TO_CHAR);
    act("$n smiles, the power of God is running through $s body.", ch, NULL, NULL, TO_ROOM);
    return;
}
Esempio n. 29
0
void mobile_activity(void)
{
   char buf[256];
	register struct char_data *ch;
	struct char_data *tmp_ch;
	struct obj_data *obj, *best_obj, *worst_obj;
	int door, found, max, min;

	extern int no_specials;

	void do_move(struct char_data *ch, char *argument, int cmd);
	void do_get(struct char_data *ch, char *argument, int cmd);

	for (ch = character_list; ch; ch = ch->next)
		if (IS_MOB(ch))
		{
			/* Examine call for special procedure */
			if (IS_SET(ch->specials.act, ACT_SPEC) && !no_specials) {
				if (!mob_index[ch->nr].func) {
					sprintf(buf, "Non-Existing MOB[%d] SPEC procedure (mobact.c)",mob_index[ch->nr].virtual);
					log(buf);
					REMOVE_BIT(ch->specials.act, ACT_SPEC);
				} else {
			   	if ((*mob_index[ch->nr].func)	(ch, 0, ""))
		      		continue;
				}
			}
Esempio n. 30
0
bool spec_police_attack(CHAR_DATA * ch)
{
	CHAR_DATA *victim;
	CHAR_DATA *v_next;
	int vip;
	char buf[MAX_STRING_LENGTH];

	if (!IS_AWAKE(ch) || ch->fighting)
		return FALSE;

	for (victim = ch->in_room->first_person; victim; victim = v_next) {
		v_next = victim->next_in_room;
		if (IS_NPC(victim))
			continue;
		if (!can_see(ch, victim))
			continue;
		if (number_bits(1) == 0)
			continue;
		for (vip = 0; vip < 32; vip++)
			if (IS_SET(ch->vip_flags, 1 << vip)
			    && IS_SET(victim->pcdata->wanted_flags, 1 << vip)) {
				sprintf(buf, "Hey you're wanted on %s!",
					planet_flags[vip]);
				do_say(ch, buf);
				REMOVE_BIT(victim->pcdata->wanted_flags,
					   1 << vip);
				multi_hit(ch, victim, TYPE_UNDEFINED);
				return TRUE;
			}

	}

	return FALSE;

}