9. MOB TRANSFORM AND HEAL
The script below makes the mob transform into a bigger and tougher mob,
when it drops below 80% of its hitpoints. The - before the vnum ensures
that the new mob is at full hp. This means that you can make a mob
virtually unkillable, by just loading itself with a negative vnum, each
time it drops below a certain point. It should be used with restraint,
since it is extremely frustrating to the player, but can be practical
on Quest mobs that you don't want to put in a peaceful room.
Hitprc 80
Commands:
if !%activated%
eval activated 1
global activated
wait 3 s
%echo% The kitten begins to mutate!
wait 2 s
%echo% DEVOLVING INTO...
wait 2 s
%echo% ... A LIONESS!!
%echo The lioness roars at you!
mtransform -203
end
The following script will make a mob transform itself in five different
shapes - it starts out with the mob 1200, then changes to 1201, when
it reaches 70% hit, then changes to 1202 when it reaches 70% the second
time etc. Each new mob is at full hp, and the fight will continue as
if nothing happened. (You will have to make all 5 mobs in OLC of course).
if !(%stop_transform%)
switch %self.vnum%
case 1200
%echo% The wizard transform to a lion!
mtransform 1201
break
case 1201
%echo% The wizard transform to a Dragon!
mtransform 1202
break
case 1202
%echo% The wizard transform to a Fire Flame!
mtransform 1203
break
case 1203
%echo% The wizard transform to a Demon!
mtransform 1204
break
case 1204
%echo% The wizard returns to his original shape!
mtransform 1200
set stop_transform 1
global stop_transform
break
default
break
done
The following script will make the mob transform into itself with full
hitpoints. This script is extremely irritating for the players, so
don't misuse it. Basically it should only be used for Quest mobs, which
are supposed to be unkillable.
%echo% {cWIt is impossible to kill <Whoever>, you'd better give it up.{c0
mtransform -%self.vnum%
Another way to make a mob heal itself during a fight would be the line:
%damage% %self% -100000