Re: Mob Experience

From: Dong-Young CHAE (dychae@blue.bluewave.co.kr)
Date: 04/23/96


> 
> Is there a way to have Mobs GAIN xp, everytime THEY kill something or
> someone?
> I mean there are some tough mobs out there that if in reality they would
> be gaining xp for killing that many players!
> 

in limits.c, function gain_exp(), remove that code following.
then MOBs can gain a exp, and if they have enough exp, can gain a level.

void gain_exp(struct char_data * ch, int gain)
{
  int is_altered = FALSE;
  int num_levels = 0;
  char buf[128];

  if (!IS_NPC(ch) && ((GET_LEVEL(ch) < 1 || GET_LEVEL(ch) >= LVL_IMMORT)))
    return;

******************************
  if (IS_NPC(ch)) {         |
    GET_EXP(ch) += gain;    |
    return;                 |-- remove this.
  }                         |
******************************

  if (gain > 0) {
    gain = MIN(max_exp_gain, gain);     /* put a cap on the max gain per
kill */
    GET_EXP(ch) += gain;
    while (GET_LEVEL(ch) < LVL_IMMORT &&

I also added new MOB action-bitvector "AGGR_NPC" which try to kill mob in his
room on my MUD .(but source not complete) Theres some condition for
aggressive-action. - MOB(attacker)'s HP must be at least 80% of MAX_HP of
his own, and the victim(mob)'s level must be lower than attacker.- The MOB,
set only AGGR_NPC, never kills PCs but kills other MOBs. This MOB can
gather exp and advance a new level by himself.

> has anyone ever implimented this before?
> 
> I'ld like to know what the coding on this might be like! and how would
> the mob get to train and would it know where it was in the mud to find
> its own guild to train at and what would it train.
> 

I think it's hard that mob get to train. The mob flag {Normal|Undead} is used
same location with PC's class variable. So Normal MOB is Magician to PC.
I think it must be considered first that MOBs classes.

> Well you get the point??
> 
> This is might be something FUN to code!
> But a big task I would think!
> 
> IMOP this would bring new life to mobs as we konw it!
> 
> Draco Paladine
> vistex@prysm.net
> 

I'm sorry for my stupid English.
-- 
----------------------------------------------------------------------------
% id                                  | E-Mail: dychae@blue.bluewave.co.kr
uid=0(cronos) gid=1(cronos)           |         cronos@cronos.bluewave.co.kr
% whoami                              |
who are you?                          | Phone:  051-610-0941, 051-610-0942
% shit!                               |         Bluewave Communications.
Connection closed by foreign host.    |
----------------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/18/00 PST