From bfcd39f77570475df7dfd43b98589fb3d6a3148a Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 7 Jun 2013 14:37:05 -0700 Subject: [PATCH] Created Lua Parser (markdown) --- Lua-Parser.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Lua-Parser.md diff --git a/Lua-Parser.md b/Lua-Parser.md new file mode 100644 index 0000000..35e01e5 --- /dev/null +++ b/Lua-Parser.md @@ -0,0 +1,36 @@ +The Lua Parser is a quest parser for EQEmu that uses the Lua embedded programming language. + +We use Lua 5.1 so the [Lua 5.1 Manual](http://www.lua.org/manual/5.1/manual.html) applies. Section 2 is a bit of a dense read but may be of particular interest to those just getting started with Lua. + +## Table of Contents +* [NPC Scripts](#npc-scripts) +* [Player Scripts](#player-scripts) +* [Item Scripts](#item-scripts) +* [Spell Scripts](#spell-scripts) +* [Encounter Scripts](#encounter-scripts) + + +### NPC Scripts +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 + + +### Player Scripts + + +### Item Scripts + + +### Spell Scripts + + +### Encounter Scripts \ No newline at end of file