Is there a way to check what a mob is doing while it is another room from the checking program ?
For example
I want to check before using an MPTRANSFER PROGRAM whether the mob i am going to transfer is currently fighting. Otherwise i might transfer a mob out of combat which might be a bad idea.
Duranamir
Checking what a mob is doing in another room.
-
- Sword Grand Master
- Posts: 4708
- Joined: Tue Jul 15, 2003 9:26 pm
- Location: House of Wonder, Waterdeep
Yes, you can perform checks in other rooms, by simply moving the mob to those other rooms.
For example, let's say that I have a farmer mob in room 1000, and two rooms named "fields" (1001 and 1002). Let's assume that item 1009 is a scarecrow. The farmer asks the PC to place/drop a scarecrow in each of the two fields. It could use a program like this:
(no way to use "and" here)
That one works because it's a mob prog and we just make the mob move. What about object and room progs though?
They work too... because objects and room programs are actually performed by the supermob (i.e., the supermob comes to the room and runs the program); you can thus use the mpgoto commands in those cases too.
The only problem you might encounter, in the case of an object prog, is that you might not know where to have the supermob 'mpgoto' back at the end, because the object can be moved and used in any room. That's generally easy enough to find a workaround though (and you can always use mpgoto $n if you have no other solution).
For example, let's say that I have a farmer mob in room 1000, and two rooms named "fields" (1001 and 1002). Let's assume that item 1009 is a scarecrow. The farmer asks the PC to place/drop a scarecrow in each of the two fields. It could use a program like this:
Code: Select all
>greet_prog 100~
sayto $n Are you done?
~
>speech_prog yes aye~
mpgoto 1001
if ovnumhere(1009) > 0
mpgoto 1002
if ovnumhere(1009) > 0
mpgoto 1000
sayto $n Congratulations, you did it!
else
mpgoto 1000
sayto $n Liar!
endif
else
mpgoto 1000
sayto $n Liar!
endif
~
That one works because it's a mob prog and we just make the mob move. What about object and room progs though?
They work too... because objects and room programs are actually performed by the supermob (i.e., the supermob comes to the room and runs the program); you can thus use the mpgoto commands in those cases too.
The only problem you might encounter, in the case of an object prog, is that you might not know where to have the supermob 'mpgoto' back at the end, because the object can be moved and used in any room. That's generally easy enough to find a workaround though (and you can always use mpgoto $n if you have no other solution).