

But keep in mind that when AiTravel is skipped by resting, the engine doesn't check path collision, so the NPC may be teleported to a spot where it's stuck (like inside another NPC) and where it may not acknowledge that it has reached its destination, or only after a delay or when the player reenters the cell. The following isn't true if a argument is used: " When you leave a cell with an Actor that is just performing its AITravel command, or if you rest, the script will never detect the GetAIPackageDone signal". This always worked for the player, and what MCP does is extend it to work with NPCs too. Note: Morrowind Code Patch feature "Scriptable potion use" lets you make a NPC drink a potion with the Equip function instead. As always only the first object found will be targeted, so the object needs to be unique and have "references persist" ticked if the AiActivate line is called in a compiled script AiActivate doesn't work if you give a argument. It will only pick up objects in the cell does not check for objects in inventory. Just like NPCs, abilities, diseases or curses added to a creature ID by dialogue results or their local script will be added to any new instance of the creature. The note " creatures killed with curse spell effects on them cause all other creatures of that type to have the same curse on them": this has nothing to do with the creature being killed or the effect being of the Curse type. In the given example, "container"->Activate will work, but only if the container has been manually opened in the session before, and loaded within 72 hours. The addition of ", player" is simply ignored, and it does the same thing as "Activate" alone. There is no undocumented feature by specifying the player after the function ( ->Activate, player).

When looking up a function in MSFD do read beyond the description and through its notes and comments, which contain valuable information. MSFD, 9th edition, still contains a few errors (some inherited from the original Construction Set manual), but is otherwise generally correct and is the most comprehensive guide available. This file is hosted at Morrowind Modding History, and is a complete guide to how to write and edit scripts in Morrowind.
