LUA
- Last edited 9 years ago by I need to Update My Profile
Contents
The LUA Scripting System
We have chosen LUA as our script engine for EQ2Emulator. Things like Quests, Spawn movement or interaction, Spells, and Zone-wide events are scripted in LUA using custom functions specific to the emulator core. Below you will find a list of current EQ2Emulator LUA Functions with links to what they do and examples of how to use them.
You will quickly see that the ease of the LUA Scripting language and it's tight integration with EQ2Emulator make our server extremely dynamic and customizable.
LUA Functions
Our LUA Functions list is broken into several categories for clarity of functionality. More functions are added often, so check back if you are looking for something that you need for your scripts.
Get Functions
This set of functions will GET info from the World or Database for use within any LUA script
Developer: LethalEncounter, Scatman
Set Functions
This set of functions will SET info in the World or Database from within any LUA script
Developer: LethalEncounter, Scatman
Quest Functions
These functions are for use within Quest scripts, and are some of the more complex LUA Functions in the EQ2Emulator.
Developer: LethalEncounter, Scatman
UpdateQuestTaskGroupDescription
Spell Functions
These functions are used within Spell scripts to generate the expected effect of casting spells or using abilities.
Developer: LethalEncounter
SPECIAL NOTE ABOUT SPELL FUNCTIONS:
Many spells simply alter an existing stat of one kind or another to yourself or a target, so there are not very many "spell functions" to speak of. SpellDamage is one of the few, since buffing, debuffing, or slowing (etc) a target are done through the SET Functions inside a Spell Script.
Spawn Functions
These are functions that normally go into SpawnScripts for interacting with NPCs or other types of Spawns.
Developer: LethalEncounter, Scatman
General Functions
These are general functions that are either to set/retrieve player or target data, or get references to nearby objects.
Developer: LethalEncounter, Scatman
Conclusion
LUA functions are added often, usually when we discover some new way that SOE does their spawns, quests or other content. If you find you are unable to achieve your goal in your scripting, it is possible you need a LUA function added. You can either choose to develop your own LUA function and submit it to the core Devs for inclusion, or post your requirements in the Feature Request forum for a script dev to add to the server.