On my time away from the mud I have been spending time building and muddling through it myself. While working with wizinvis mobs that load up certain mobiles, food etc for quests I have a dungeon in the area for the crime code.
There is an if check for if in room, does this check if the MOBILE is in said room or if the PC is in said room?
If this checks that the MOBILE is in said room, how can you make the program only activate IF the PC is in the room?
The program I am trying to put on the mobile is a program that loads up breakfast at 7am and dinner at 21pm ONLY if the PC is in the dungeon. How can we accomplish this?
More questions to come, wanted to keep them seperate for easy searches =)
mob prog - how to activate only if a PC is in room
-
- Sword Grand Master
- Posts: 4708
- Joined: Tue Jul 15, 2003 9:26 pm
- Location: House of Wonder, Waterdeep
You would most likely have to use a time_prog (to make it trigger at a given time), or actually two time_prog, one for each hour.
Then, in the program, you could use a pcinroom check. I do not remember the exact syntax (nor the exact name of the check - so it might be a bit different from "pcinroom"), but you'll find it in the web lessons. This check indicates how many PCs are in the room. If that value is > 0, then there is at least one PC, and you can bring in breakfast.
Then, in the program, you could use a pcinroom check. I do not remember the exact syntax (nor the exact name of the check - so it might be a bit different from "pcinroom"), but you'll find it in the web lessons. This check indicates how many PCs are in the room. If that value is > 0, then there is at least one PC, and you can bring in breakfast.
- Japcil
- Sword Grand Master
- Posts: 1143
- Joined: Fri Jun 17, 2005 5:32 pm
- Location: Golden Oaks
- Contact:
all the feed prog really is:
a better one would be:
Code: Select all
time_prog -1
mpoload ifood
mpecho Someone shoves food from a slit in the cage.
drop ifood
Code: Select all
time _prog -1
if ovnumhere (ifood) < 1
mpoload ifood
mpecho Someone shoves food from a slit in the cage
drop ifood
endif
Last edited by Japcil on Wed Apr 18, 2007 5:28 pm, edited 1 time in total.