Is there any way of checking the status i.e. stunned sleeping etc of a mob from an object program ?. For example a weapon that does something nasty on a final hit ?.
Also can an object out of combat check the status of a mob in the same room. i know it can check for the presence of the a particular mob in the room but can it target it for further query?.
Also can 1 mob check the status of a second mob in the same room ?. I guess the first mob could check its own status and tell the second mob but i was interested to see if it can be done the other way round.
Duranamir
Checking for MOB status
Re: Checking for MOB status
If I recall correctly, according to the records in code testing, fight_prog can now be put on a weapon. Also, I believe $f would be the target that the wielder is fighting. And "if position()" checks the position of a mob -- of which, stunned is 3 -- So I *think* a fight prog would be able to be something like:Duranamir wrote:Is there any way of checking the status i.e. stunned sleeping etc of a mob from an object program ?. For example a weapon that does something nasty on a final hit ?.
Code: Select all
>fight_prog 100~
if position($f) == 3
do nasty prog stuff
Only way I could think, would be a random check (rand_prog), which would of course check continually, as long as it's out of a container or held/worn.Duranamir wrote:Also can an object out of combat check the status of a mob in the same room. i know it can check for the presence of the a particular mob in the room but can it target it for further query?.
Again, the mobs could check on each other using rand_prog, periodically checking for the status of the other mob, targeting it by the mob's name, or vnum.Duranamir wrote:Also can 1 mob check the status of a second mob in the same room ?. I guess the first mob could check its own status and tell the second mob but i was interested to see if it can be done the other way round.
Code: Select all
>rand_prog 30~
if name($r) == mMOBVNUM
if position($r) == 3
execute prog
"There is no safety for honest men except by believing all possible evil of evil men."
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki