FutureProg functions
setnpcai
setnpcai overload 1
Boolean setnpcai(Character npc, Number ai, Boolean enabled)
Available in
- computer function
- computer program
- standard futureprog
Adds or removes an existing AI on an NPC instance, persisting the change without changing its template. Returns false for an invalid NPC or AI.
| Parameter | Type | Description |
|---|---|---|
npc |
Character |
The NPC to change. |
ai |
Number |
An existing AI definition ID. |
enabled |
Boolean |
Whether the NPC should have that AI. |