Пример #1
0
STATUS semBTake(SEM_ID semId, int timeout)
{
	int level;
	int status;

	/* TODO ISR no be allowed */

again:
	level = intLock();

	if(!IS_CLASS(semId, semClassId))
	{
		intUnlock(level);
		return (ERROR);
	}

	if(NULL == semId->semOwner)
	{
		semId->semOwner = (RAIN_TCB*)taskIdCurrent;
		intUnlock(level);

		return (OK);
	}

	/* semId have been take by other task */
	kernelState = TRUE;
	intUnlock(level);

	if(OK != kernelPendQPut(&semId->qHead, timeout))
	{
		kernelExit();

		return (ERROR);
	}

	/* test for interrupt in kernelState=TRUE of semGive */
	/*{
		int j = 1000000;
		while(j >= 0)
		{
			j--;
		}
	}*/
	
	if(RESTART == (status = kernelExit()))
	{
		goto again;
	}

	return (status);
}
Пример #2
0
void do_touchofgod(CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];
    int dam;

    argument = one_argument( argument, arg );
    dam = number_range(100,200);

    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] < 4)
    {
        send_to_char("You cannot channel the will of God yet.\n\r",ch);
        return;
    }
    if ((victim = get_char_room(ch, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (IS_NPC(victim))
    {
        send_to_char("Not on mobiles.\n\r",ch);
        return;
    }
    if (is_safe(ch,victim)) return;
    if (victim == ch)
    {
        send_to_char("That doesn't seem like a good idea.\n\r",ch);
        return;
    }
    WAIT_STATE(ch, 18);
    hurt_person(ch, victim, dam);
    act("You grab $N by the forehead and channel God's justice into $S body.",ch,NULL,victim,TO_CHAR);
    act("$n grabs you by your forehead and sends a prayer to God, DAMN THAT HURT.",ch,NULL,victim,TO_VICT);
    act("$n grabs $N by the forehead and sends a prayer to God.",ch,NULL,victim,TO_NOTVICT);
    if (number_range(1,3) == 1)
    {
        if (victim->position == POS_FIGHTING) stop_fighting(victim,TRUE);
        act("$N screams in pain and drops to the ground as God's justice wrecks $S body.",ch,NULL,victim,TO_CHAR);
        act("AARGH!!! The pain is to much, you drop to the ground.",ch,NULL,victim,TO_VICT);
        act("$N screams in agony and falls to the ground.",ch,NULL,victim,TO_NOTVICT);
        victim->position = POS_STUNNED;
    }
    return;
}
Пример #3
0
void do_lloth( CHAR_DATA *ch, char *argument )
{
  char buf[MAX_STRING_LENGTH];
  CHAR_DATA *gch;
  
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_DROW) && !IS_CLASS(ch, CLASS_DROID) )
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  send_to_char("#p          -*-  The Church of Lloth  -*-#n\n\r",ch);
  send_to_char("#7[#pName                #7] [#p  Hp   #7] [#p Mana  #7] [#p Move  #7] [#p Gen  #7 ]#n\n\r",ch);
  for ( gch = char_list; gch != NULL; gch = gch->next)
  {
    if (IS_NPC(gch)) continue;
    if (!IS_CLASS(gch, CLASS_DROW) && !IS_CLASS(gch, CLASS_DROID)) continue;
    sprintf( buf,"#7[%-20s] [%-7d] [%-7d] [%-7d] [%-7d]#n\n\r",
    capitalize( gch->name ), gch->hit, gch->mana, gch->move, gch->generation);
    send_to_char( buf, ch );
  }
  return;
}
Пример #4
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;
}
Пример #5
0
void do_skyforge( CHAR_DATA *ch, char *argument )
{
    OBJ_INDEX_DATA *pObjIndex;
    OBJ_DATA *obj;
    int vnum = 0;



    if (IS_NPC(ch)) return;

   	if(!IS_IMMORTAL(ch))
	{
    if (!IS_CLASS(ch, CLASS_SKYBLADE))
    {
        send_to_char("What?\n\r",ch);
        return;
    }
	}

    if (ch->pcdata->powers[SKYBLADE_MAGIC] < 1)
    {
    		send_to_char("You haven't mastered enough of the magic ability yet.\n\r",ch);
         return;
    }
    if ( ch->practice < 250 )
    {
        send_to_char("You don't have the 250 primal needed.\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[SKYBLADE_MAGIC] == 1) vnum = 33178;
    if (ch->pcdata->powers[SKYBLADE_MAGIC] >= 2) vnum = 33179;
    if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL)
    {
    send_to_char("Missing object, please inform a God .\n\r",ch);
    return;
    }

    if( !IS_IMMORTAL(ch) )
	{
		ch->practice -= 250;
	}
    obj = create_object(pObjIndex, 50);
    SET_BIT(obj->spectype, SITEM_SKYBLADE);
    obj->questowner = str_dup(ch->pcdata->switchname);
    obj->ownerid = ch->pcdata->playerid;
    obj_to_char(obj, ch);
    act("$p falls from the heavens and lands before you.",ch,obj,NULL,TO_CHAR);
    act("$p falls from the heavens and lands before $n.",ch,obj,NULL,TO_ROOM);
    return;
}
Пример #6
0
void do_entropy (CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    ROOM_INDEX_DATA *location;
    CHAR_DATA *victim;

    one_argument (argument, arg);
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_WIZARD))
    {
        send_to_char("Huh?\n\r", ch );
        return;
    }
    if ((victim = get_char_world(ch, arg)) == NULL)
    {
        send_to_char("Teleport to whom?\n\r", ch );
        return;
    }
    if (IS_SET(victim->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "You can't find it's room.\n\r",ch);
        return;
    }
    if (IS_IMMUNE(victim, IMM_TRAVEL) && !IS_NPC(victim))
    {
        send_to_char("I don't think they want you to do that.\n\r",ch);
        return;
    }
    if (IS_SET(ch->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "Your room is not connected to the astral plane.\n\r",ch);
        return;
    }
    location = victim->in_room;
    if (ch->mana < 250)
    {
        send_to_char("You don't have the mana to cast teleport.\n\r", ch );
        return;
    }
    act("You utter a single powerword.", ch, NULL, NULL, TO_CHAR);
    act("$n utters a strange sounding word and disappers.", ch, NULL, NULL, TO_ROOM);
    ch->mana -= 250;
    char_from_room(ch);
    char_to_room(ch, location);
    do_look(ch, "auto");
    act("You materialize.", ch, NULL, NULL, TO_CHAR);
    act("$n suddenly appear from out of nowhere.", ch, NULL, NULL, TO_ROOM);
    return;
}
Пример #7
0
void do_kanzuite( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;

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

    if (IS_CLASS(ch, CLASS_NINJA) && ch->pcdata->powers[NPOWER_SORA] < 5 )
    {
        send_to_char("You have not learned the Sora principle to 5.\n\r", ch);
        return;
    }

    else if (ch->move < 500)
    {
        send_to_char("You don't have 500 move to increase your awareness.\n\r", ch);
        return;
    }

    if ( IS_SET(ch->act, PLR_HOLYLIGHT) )
    {
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You're senses return to normal.\n\r", ch );
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You're senses increase into incredible proportions.\n\r", ch );
        ch->move -= 500;
    }

    return;
}
Пример #8
0
STATUS semFlushDefer(SEM_ID semId)
{
    if(!IS_CLASS(semId, semClassId))
    {
        return (ERROR);
    }

    if(NULL == semFlushTbl[semId->semType & SEM_TYPE_MASK])
    {
        return (ERROR);
    }

    workQAdd1 (semFlushDeferTbl [semId->semType], (int) semId);

    return (OK);
}
Пример #9
0
void do_sinsofthepast( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];

    argument = one_argument( argument, arg );

    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] < 3)
    {
        send_to_char("Your not ready to punish the sinners.\n\r",ch);
        return;
    }
    if ((victim = get_char_room(ch, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    /*  if (IS_NPC(victim))
      {
        send_to_char("Not on mobiles.\n\r",ch);
        return;
      }*/
    if (is_safe(ch,victim)) return;
    if (victim == ch)
    {
        send_to_char("That doesn't seem like a good idea.\n\r",ch);
        return;
    }
    send_to_char("#RYou burn them with the fires of hell!#n\n\r",ch);
    if (!IS_AFFECTED(victim, AFF_FLAMING)) SET_BIT(victim->affected_by, AFF_FLAMING);
    send_to_char("#LTheir body is wrecked by poison!#n\n\r",ch);
    if (!IS_AFFECTED(victim, AFF_POISON)) SET_BIT(victim->affected_by, AFF_POISON);
    send_to_char("#CGod's fury upon them for they have truly sinned!!!#n\n\r",ch);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    WAIT_STATE(ch,12);
    return;
}
Пример #10
0
void do_enrage(CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;

    argument = one_argument( argument, arg );

    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_ENRAGE))
    {
        send_to_char("you don't have that power yet.\n\r",ch);
        return;
    }

    if ((victim = get_char_room(ch, NULL, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (victim == ch)
    {
        send_to_char("Your unable to enrage yourself.\n\r", ch);
        return;
    }
    if (IS_NPC(victim) || victim->level < 3)
    {
        send_to_char("Not on them\n\r",ch);
        return;
    }
    do_say(ch, "Kara, Kara, Xenos!");
    if (number_percent() > 40)
    {
        SET_BIT(victim->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_berserk2(victim,"");
        REMOVE_BIT(victim->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim);
    WAIT_STATE(ch,18);
    return;
}
Пример #11
0
void do_focus(CHAR_DATA *ch, char *argument)
{
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_SAMURAI))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (ch->pcdata->powers[SAMURAI_FOCUS] < 10)
  {
    send_to_char("You cannot focus your weaponcontrol any more.\n\r",ch);
    return;
  }
  ch->pcdata->powers[SAMURAI_FOCUS] -= number_range(1, ch->pcdata->powers[SAMURAI_FOCUS]);
  send_to_char("You focus your control, letting the battle slow to a halt.\n\r",ch);
  WAIT_STATE(ch, 8);
  return;
}
Пример #12
0
int msgQReceive(FAST MSG_Q_ID msgQId, char* buffer, UINT maxNBytes, int timeout)
{
	FAST MSG_NODE* pMsg;
	FAST int bytesReturned;

	/* TODO int restrict */

	if((int)maxNBytes < 0)
	{
		return (ERROR);
	}

	TASK_LOCK();
restart:
	if(!IS_CLASS(msgQId, msgQClassId))
	{
		TASK_UNLOCK();
		return (ERROR);
	}

	pMsg = (MSG_NODE*)qJobGet(msgQId, &msgQId->msgQ, timeout);

	if(pMsg == (MSG_NODE*)NONE)
	{
		/* timeout recalc */
		goto restart;
	}

	if(pMsg == NULL)
	{
		msgQId->recvTimeouts++;
		TASK_UNLOCK();
		return (ERROR);
	}

	bytesReturned = MIN(pMsg->msgLength, maxNBytes);
	memcpy(buffer, MSG_NODE_DATA(pMsg), bytesReturned);

	qJobPut(msgQId, &msgQId->freeQ, &pMsg->node, Q_JOB_PRI_DONT_CARE);

	TASK_UNLOCK();

	return (bytesReturned);
}
Пример #13
0
void do_wyrmroar(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;
  char arg[MAX_INPUT_LENGTH];
  one_argument (argument, arg);

  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_SKYBLADE))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (ch->pcdata->powers[SKYBLADE_SKILLS] < 9)
  {
    send_to_char("You have not mastered the skills ability enough yet.\n\r",ch);
    return;
  }
  if (!TIME_UP(ch, TIMER_WYRM_ROAR))
  {
    send_to_char("Your throat is still sore from the last time.\n\r",ch);
    return;
  }
  if (( victim = get_char_room(ch, NULL, arg)) == NULL)
  {
    if (ch->fighting == NULL)
    {
    send_to_char("Yes release the roar of the wyrm, but at who?\n\r",ch);
    return;
    }
    else victim = ch->fighting;
  }
  if (victim == ch)
  {
    send_to_char("Quit that stupid ass.\n\r",ch);
    return;
  }
  if (is_safe(ch, victim)) return;
  SET_TIMER(ch, TIMER_WYRM_ROAR, 6);
  WAIT_STATE(victim, 18);
  act("$n roars with the power of the wyrm, stunning you in place.",ch,NULL,victim,TO_VICT);
  act("$n roars with the power of the wyrm, stunning $N in place.", ch, NULL, victim, TO_NOTVICT);
  act("You roar with the power of the wyrm, stunning $N in place.", ch, NULL, victim, TO_CHAR);
  return;
}
Пример #14
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, arg1)) == NULL)
  {
    send_to_char("They are not here.\n\r", ch);
    return;
  }
  if ((victim2 = get_char_room(ch, 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) do_kill(victim1, victim2->pcdata->switchname);
  else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim1);
  if (number_percent() > 60) do_kill(victim2, victim1->pcdata->switchname);
  else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim2);
  WAIT_STATE(ch,24);
  return;
}
Пример #15
0
void do_fightdance(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

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

	if (IS_SET(ch->newbits, NEW_FIGHTDANCE)) {
	send_to_char("You will no longer dance The Dance of Lloth.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_FIGHTDANCE);
	}
	else {
	send_to_char("You will start dancing The Dance of Lloth while fighting.\n\r", ch );
	SET_BIT(ch->newbits, NEW_FIGHTDANCE);
	}

	return;
}
Пример #16
0
void do_booming(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;
  char arg[MAX_INPUT_LENGTH];

  argument = one_argument( argument, arg );

  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_BOOMING))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if ((victim = get_char_room(ch, arg)) == NULL)
  {
    send_to_char("They are not here.\n\r", ch);
    return;
  }
  if (IS_NPC(victim)) one_hit(ch,victim, gsn_booming, 1);
  else
  {
    if (victim == ch)
    {
      send_to_char("That doesn't seem like a good idea.\n\r",ch);
      return;
    }
    one_hit(ch,victim, gsn_booming, 1);
    if (victim->position == POS_FIGHTING && number_range(1,4)==2)
    {
      send_to_char("Your booming voice stuns your opponent.\n\r",ch);
      send_to_char("The pain is to much, and you drop to the ground.\n\r",victim);
      stop_fighting(victim,TRUE);
      victim->position = POS_STUNNED;
    }
  }
  WAIT_STATE(ch,12);
  return;
}
Пример #17
0
void KinectGrabber_Rawlog2::grab()
{
    static bool grabbed; grabbed=false;

    while(!grabbed)
    {
        //Read observations until we get a CObservation3DRangeScan
        mrpt::slam::CObservationPtr obs;
        do
        {
            try
            {
                *dataset >> obs;
            }
            catch (std::exception &e)
            {
                throw std::runtime_error( std::string("\nError reading from dataset file (EOF?):\n")+std::string(e.what()) );
            }
        } while (!IS_CLASS(obs,CObservation3DRangeScan));

        // We have one observation:
        currentObservationPtr = CObservation3DRangeScanPtr(obs);
        currentObservationPtr->load(); // *Important* This is needed to load the range image if stored as a separate file.

        if (currentObservationPtr->hasRangeImage &&
            currentObservationPtr->hasIntensityImage)
        {
            //Retain the point cloud of the current frame
            currentObservationPtr->project3DPointsFromDepthImageInto(*currentColouredPointCloudPtr, false /* without obs.sensorPose */);
            currentColouredPointCloudPtr->width=640*480;
            currentColouredPointCloudPtr->height=1;

            //Retain the RGB image of the current frame
            cv::Mat currentRGBImg_aux((IplImage *) currentObservationPtr->intensityImage.getAs<IplImage>());
            currentIntensityImage=currentRGBImg_aux;

            //Retain the timestamp of the current frame
            currentTimeStamp = currentObservationPtr->timestamp;

            grabbed=true;
        }
    }
}
Пример #18
0
void do_drowhate(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

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

	if (IS_SET(ch->newbits, NEW_DROWHATE)) {
	send_to_char("You calm your hatred.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_DROWHATE);
	}
	else {
	send_to_char("You invoke your hatred for others.\n\r", ch );
	SET_BIT(ch->newbits, NEW_DROWHATE);
	}

	return;
}
Пример #19
0
void do_darktendrils(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

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

	if (IS_SET(ch->newbits, NEW_DARKTENDRILS)) {
	send_to_char("Your tendrils of darkness disappear.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_DARKTENDRILS);
	}
	else {
	send_to_char("You call forth dark tendrils to attack your foes.\n\r", ch );
	SET_BIT(ch->newbits, NEW_DARKTENDRILS);
	}

	return;
}
Пример #20
0
/* syntax : magics
 * shows all class powers in effect
 */
void do_magics (CHAR_DATA *ch, char *argument)
{
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_MAGE))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (IS_ITEMAFF(ch, ITEMA_MAGESHIELD))
    send_to_char("* Your skin is covered in a layer of mystical energies.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_BEAST))
    send_to_char("* Your inner beast is in control of your actions.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_STEELSHIELD))
    send_to_char("* Your skin is solid steel.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_DEFLECTOR))
    send_to_char("* A shield hovers in the air, defending you.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_ILLUSIONS))
    send_to_char("* Several images of you stand by your side.\n\r",ch);
  return;
}
Пример #21
0
void do_drowfire( CHAR_DATA *ch, char *argument ) {

    CHAR_DATA *victim;
    char arg [MAX_INPUT_LENGTH];
    int sn;
    int level;
    int spelltype;

	argument = one_argument(argument, arg);

	if (IS_NPC(ch)) return;

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

    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
        send_to_char( "They aren't here.\n\r", ch );
        return;
    }

    if ( ch == victim )
    {
        send_to_char( "Not on yourself.\n\r", ch );
        return;
    }

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

    if ( ( sn = skill_lookup( "drowfire" ) ) < 0 ) return;
    spelltype = skill_table[sn].target;
    level = ch->spl[spelltype] * 1.5;
    (*skill_table[sn].spell_fun) ( sn, level, ch, victim );
    WAIT_STATE( ch, 12 );
	ch->mana = ch->mana - 100;
    return;
}
Пример #22
0
void do_drowshield(CHAR_DATA *ch, char *argument)
{

	if (IS_NPC(ch)) return;

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

    if (!IS_IMMUNE(ch,IMM_SHIELDED) )
    {
        send_to_char("You shield your aura from those around you.\n\r",ch);
        SET_BIT(ch->immune, IMM_SHIELDED);
        return;
    }
    send_to_char("You stop shielding your aura.\n\r",ch);
    REMOVE_BIT(ch->immune, IMM_SHIELDED);


	return;
}
Пример #23
0
void do_drowsight(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;
	
	if (!IS_CLASS(ch, CLASS_DROW) || !IS_SET(ch->pcdata->powers[1],DPOWER_DROWSIGHT)) {
	send_to_char("Huh?\n\r", ch );
	return;}

    if ( IS_SET(ch->act, PLR_HOLYLIGHT) )
    {   
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "Your senses return to normal.\n\r", ch );
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "Your senses increase to incredible proportions.\n\r", ch);
    }

	return;
}
Пример #24
0
void do_samseye( CHAR_DATA *ch, char *argument )
{
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_SAMURAI))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  
  if (IS_SET(ch->act, PLR_HOLYLIGHT))
  {
    REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
    send_to_char("Your minds eye closes and you see the world as mortals do.\n\r", ch);
  }
  else
  {
    SET_BIT(ch->act, PLR_HOLYLIGHT);
    send_to_char( "You meditate and open your minds eye to the world.\n\r", ch );
  }
  return;
}
Пример #25
0
void do_stuntubes( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;

    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 || ch->pcdata->powers[CYBORG_LIMBS] < 5 )
    {
        send_to_char("You need level 5 implants on your legs and body to use this.\n\r",ch);
        return;
    }

    if (ch->move < 1000)
    {
        stc("You need 1000 move to do that.\n\r",ch);
        return;
    }

    if ( ( victim = ch->fighting ) == NULL )
    {
        send_to_char( "You aren't fighting anyone.\n\r", ch );
        return;
    }
    WAIT_STATE( ch,     12);
    ch->move -= 1000;

    one_hit(ch,victim,gsn_stuntubes,1);
    one_hit(ch,victim,gsn_stuntubes,1);
    one_hit(ch,victim,gsn_stuntubes,1);
    if (!IS_AFFECTED(victim, AFF_POISON))
        SET_BIT(victim->affected_by, AFF_POISON);
    if (!IS_AFFECTED(victim, AFF_FLAMING))
        SET_BIT(victim->affected_by, AFF_FLAMING);
    return;
}
Пример #26
0
void do_tornado(CHAR_DATA *ch, char *argument)
{  
  CHAR_DATA *ich;
  CHAR_DATA *ich_next;

  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_TORNADO))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if (ch->mana < 1500)
  {
    send_to_char("You need more mana to summon a storm.\n\r",ch);
    return;
  }
  send_to_char("You summon a supernatural storm.\n\r",ch);
  ich_next = ch->in_room->people;
  ich = ich_next;
  while (ich_next != NULL)
  {
    ich_next = ich->next_in_room;
    if (ich != ch && IS_AFFECTED(ich, AFF_FLYING))
    {
      if (is_safe(ch,ich)) break;
      one_hit(ch,ich,gsn_lightning,1);
      one_hit(ch,ich,gsn_lightning,1);
    }
    ich = ich_next;
  }
  ch->mana -= 1500;
  WAIT_STATE(ch, 12);
  return;
}
Пример #27
0
void do_heal ( CHAR_DATA *ch, char *argument ) 
{
        if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) || (!IS_SET(ch->special,SPC_DROW_CLE) && ch->generation > 2)) 
            {
		send_to_char("Huh?\n\r", ch );
		return;
            }

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

	ch->mana = ch->mana - 750;
	ch->hit = ch->hit + ch->spl[BLUE_MAGIC]*3;
	if (ch->hit > ch->max_hit) ch->hit = ch->max_hit;
	send_to_char("Lloth heals you.\n\r",ch);
	act("$n is healed by Lloth.",ch,NULL,NULL,TO_ROOM);
	WAIT_STATE(ch, 12);
	return;
}
Пример #28
0
void do_wizardsight( CHAR_DATA *ch, char *argument )
{
    char      arg [MAX_INPUT_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;
    if ( IS_CLASS(ch, CLASS_WIZARD) && ch->pcdata->powers[WL_SKILLS] < 1 )
    {
        stc("You need level 1 in Wizard Skills\n\r",ch);
        return;
    }
    if (IS_AFFECTED(ch,AFF_SHADOWSIGHT) )
    {
        send_to_char("You can no longer see between planes.\n\r",ch);
        REMOVE_BIT(ch->affected_by, AFF_SHADOWSIGHT);
        return;
    }
    send_to_char("You can now see between planes.\n\r",ch);
    SET_BIT(ch->affected_by, AFF_SHADOWSIGHT);
    return;
}
Пример #29
0
void do_infernal(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *ich;
  CHAR_DATA *ich_next;

  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_TANARRI) && !IS_CLASS(ch, CLASS_LICH))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_FLAMES) && IS_CLASS(ch, CLASS_TANARRI))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if (ch->pcdata->powers[CON_LORE] < 2 && IS_CLASS(ch, CLASS_LICH))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if (ch->mana < 2000)
  {
    if (IS_CLASS(ch, CLASS_TANARRI)) send_to_char("You need more mana to summon the infernal flames of the abyss.\n\r",ch);
    else send_to_char("Not enough mana.\n\r",ch);
    return;
  }
  if (IS_CLASS(ch, CLASS_TANARRI)) send_to_char("You summon the infernal flames of the abyss.\n\r",ch);
  else send_to_char("You mutter an incantation and a fireball flies from your hands.\n\r",ch);
  ich_next = ch->in_room->people;
  ich = ich_next;
  while (ich_next != NULL)
  {  
    ich_next = ich->next_in_room;
    if (ich != ch)
    {  
      if (is_safe(ch,ich)) break;
      one_hit(ch,ich,gsn_fireball,1);
      one_hit(ch,ich,gsn_fireball,1);
    }  
    ich = ich_next;
  }  
  ch->mana -= 2000;
  WAIT_STATE(ch, 12);
  return;
}  
Пример #30
0
void do_earthquake(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *ich;
  CHAR_DATA *ich_next;
  
  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_EARTHQUAKE))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if (ch->mana < 1000)
  {
    send_to_char("You need more mana to summon an earthquake.\n\r",ch);
    return;
  }
  send_to_char("You summon an earthquake.\n\r",ch);
  ich_next = ch->in_room->people;
  ich = ich_next;
  while (ich_next != NULL)
  {
    ich_next = ich->next_in_room;
    if (ich != ch && !IS_AFFECTED(ich, AFF_FLYING))
    {
      if (is_safe(ch,ich)) break;
      one_hit(ch,ich,32,1);
    }
    ich = ich_next;
  }
  ch->mana -= 1000;
  WAIT_STATE(ch, 12);
  return;
}