FutureProg functions

setnpcai

Characterscomputer function, computer program, standard futureprog

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.
ParameterTypeDescription
npc Character The NPC to change.
ai Number An existing AI definition ID.
enabled Boolean Whether the NPC should have that AI.