Hi!
Does anyone knows if there is any way of targetting one mob or character between all the mobs and PCs in the room? (Not just a pc, which I would be it would be with $r, it could be a mob or pc) And just a random mob?
Thanks!
Random PC or MOB
Re: Random PC or MOB
What specifically are you trying to accomplish?
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Re: Random PC or MOB
Rubble falling over someone's head (be either a pc or a mob)
Re: Random PC or MOB
Sorry for the delay; I was travelling.
If you have fixed mobiles in the room (mobiles whose reset location is that room and which are set with ACT_SENTINEL) then you could do something like this:
I am not sure if a rand_prog will accept the mobiles VNUM as a target. I feel that it probably will not because they are notoriously single-minded in their search for an $r target.
If you have fixed mobiles in the room (mobiles whose reset location is that room and which are set with ACT_SENTINEL) then you could do something like this:
Code: Select all
>greet_prog 100~
if rand(50)
if mobinroom(1234) > 0
mpecho Rocks fall on the first mobile, generically given the VNUM 1234.
mpmadd m1234 currhp -5
else
if mobinroom(5678) > 0
mpecho Rocks fall on the second mobile, generically given the VNUM 5678.
mpmadd m5678 currhp -5
endif
endif
else
if dex($n) > 18
mpechoat $n Rocks fall around you!
mpechoaround $n Rocks fall all around @N!
else
mpechoat $n Rocks fall upon you!
mpechoaround $n Rocks fall upon @N!
mpmadd $n currhp -5
endif
endif
~
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Re: Random PC or MOB
Lot of thanks Harroghty.