Thread: Mprog
View Single Post
Old 10-25-2002, 01:54 PM   #7
Sapphar
 
Posts: n/a
First, potential very simple fix: If your mob doesn't have dark_vision (or whatever see all type flag you toggle on your mud), you may lose the entire mprog based on one of two things happening: using a trigger that doesn't react to all PCs, regardless if the mob can see them; or if checks and actions failing because the mob is unable to see the $n.

Little trick that might be helpful. If you have an mprog that isn't functioning, often it is good to figure out just which part of it is having problems. To do this, put a "say" in after each if or else. Also put a say at the start of the mprog. If nothing happens at all, you know your trigger is faulty. If you get your first say and nothing else, your entire if check (or all of them, if there are multiple in the prog) is faulty. If something else is said by the mob but the action that follows never happens, you know the action triggered by the if check is faulty. Example:

say Mprog Trigger check. Trigger works.
If $n race = drow
say Mprog check. I have discovered you're a drow.
say Welcome to Drow City, $n.
else
say Mprog check. It appears you are not a drow.
yell Intruder! $n has enter the city!
kill $n
endif

If the problem is "kill $n", you would see your mob say this:
Drow guard guy says, "Mprog Trigger check. Trigger works."
Drow guard guy says, "Mprog check. It appears you're not a drow."

A little extensive for this small of an mprog, but such checks can be a sanity saver with more complex mprogs and starting off using them with your smaller mprogs is a great learning tool.

Sapphar

p.s. Don't forget to remove them. Nothing like having a dark, dreary slave hall, with the mobile locking a pc in chains and pushing them against the wall and then saying, "Mprog check! Gotcha!"
  Reply With Quote