Loading...   

NPC Scripts are quest scripts that are attached to NPCs (most quests follow this format). NPCs will load a script on the first event that triggers them (almost always the spawn event) and they will load one and only one from the following location. Which ever it finds first in the following order:

  • ./quests/zone/npcid.lua
  • ./quests/zone/npcname.lua
  • ./quests/global/npcid.lua
  • ./quests/global/npcname.lua
  • ./quests/zone/default.lua
  • ./quests/global/default.lua

NPCs will also attempt to load a global NPC script that is attached to all NPCs from the following location:

  • ./quests/global/global_npc.lua

Lua NPC Examples