home » builders » builder's lessons » loading quest mobs
Loading quest mobs
You want a mob to only appear when a PC is on a quest, and not be in the game all the time.
>greet_prog 100~ if mobinroom(13925) == 0 if quest(0,4,$n) == 0 if isevil($n) mpmload 13925 mpechoat $n An old bearded human steps out of the forest and hails you. mpechoaround $n An old bearded human steps out of the forest and hails $n. mpechoat $n He looks all around before whispering to you. mpechoaround $n He looks all around before whispering to $n mpforce dorgor sayto $n Greetings. mpecho The old man glances towards the huge mansion to the north before continuing. mpforce dorgor sayto $n Do you have some time to listen to me? endif endif endif ~ |
The above program is in a room. There is a mobinroom check to make sure that the mobile is not already in the room.
If you wanted the mob to load into a random room, you could put the prog onto a MOBINVIS mobile, and set it to NOWANDER, or STAY_AREA and that will vary the room that the mob is loaded up into.