Heres a list of what is available to be used through LUA
Code:
/************************************************** **********************/
/* SCRIPT FUNCTION TABLES */
/************************************************** **********************/
Item Gossip Commands
"GossipCreateMenu" - Creates a Gossip Menu for an Item.
"GossipMenuAddItem" - Adds a Gossip Item for an Item. (Something a Player can chose from)
"GossipSendMenu" - Sends the Menu to the Player.
"GossipComplete" - Comples the Gossip. (Probably same as RemoveEvents())
"GossipSendPOI" - [P]oint [o]f [i]nteresting - Set a Mark to your Minimap
Unit Gossip Commands
"GossipCreateMenu" - Creates a Gossip Menu for an NPC.
"GossipMenuAddItem" - Adds a Gossip Item for an NPC.
"GossipSendMenu" - Sends the Menu to the Player.
"GossipComplete" - Completes the Gossip. (Probably same as RemoveEvents())
"GossipSendPOI" - [P]oint [o]f [i]nteresting - Set a Mark to your Minimap
Unit Commands
"GetName" - Gets the Player's name.
"SendChatMessage" - Send's a Chat Message to the World/Area.
"MoveTo" - Moves the NPC to the desired location on the same Map.
"SetMovementType" - Sets the movement type of the NPC.
"CastSpell" - Casts a Spell on the NPC (Itself)
"FullCastSpell" - UNUSED.
"CastSpellOnTarget" - UNUSED.
"FullCastSpellOnTarget" - Casts a Spell on the desired Target.
"SpawnCreature" - Spawns creature on the desired Position.
"SpawnGameObject" - Spawns a GameObject on the desired Position.
"GetX" - Gets the Position: X
"GetY" - Gets the Position: Y
"GetZ" - Gets the Position: Z
"GetO" - Gets the Position: O
"IsPlayer" - Returns true if the Unit is a Player. False otherwise.
"IsCreature" - Returns true if the Unit is a Creature. False otherwise.
"RegisterEvent" - Registers an Event with the name "" every "" milliseconds, "" times.
"RemoveEvents" - Removes all Events. (Used at ends of Phases, and on UnitEvents)
"SendBroadcastMessage" - Sends a Broadcast Message server-wide.
"SendAreaTriggerMessage" - Sends an AreaTrigger message, player-wide.
"KnockBack" - Knocks the Player(s) back _____ yards.
"MarkQuestObjectiveAsComplete" - Marks the Quest Objective "" as complete. (In the Character's Questlog)
"LearnSpell" - Learns the Spell "" to the Character.
"UnlearnSpell" - Unlearns the Spell "" to the Character.
"HasFinishedQuest" - Returns true if the Unit has finished the Quest "". False otherwise.
"GetItemCount" - Generates the Item Count of Item "" from the Unit.
"IsInCombat" - Returns true if the Unit is in Combat. False otherwise.
"GetMainTank" - Targets the main Tank.
"GetAddTank" - Targets the main Tank. (Bugs may occur)
"ClearThreatList" - Clears the threat list. (Aggro list, etc.)
"GetTauntedBy" - UNKOWN. (EDIT IF YOU KNOW)
"SetTauntedBy" - Sets the Unit the NPC is taunted by.
"SetSoulLinkedWith" - Sets the Unit the NPC is soullinked with. (SQL-ID)
"GetSoulLinkedWith" - UNKNOWN. (EDIT IF YOU KNOW)
"ChangeTarget" - Changes Target (EDIT IF YOU KNOW MORE INFO)
"GetHealthPct" - Gets the NPC's Health Point (%)
"SetHealthPct" - Sets the NPC's Health Points (%)
"GetManaPct" - Gets the NPC's Mana Points (%, bugs may occur)
"Despawn" - Despawns the NPC in "" milliseconds, respawning in "" milliseconds.
"GetUnitBySqlId" - Retruns a Unit from the SQL ID.
"PlaySoundToSet" - Plays a Sound, Server-wide. (Sounds found in DBC)
"RemoveAura" - Removes a Spell casted by CastSpell.
"StopMovement" - Stops all movement.
"Emote" - Performs an Emote found in the Emote C++ File.
"GetInstanceID" - UNKNOWN. (EDIT IF YOU KNOW)
"GetClosestPlayer" - Targets the Closest Player to the NPC.
"GetRandomPlayer" - Targets a Random Player.
"GetRandomFriend" - Targets a Random Friendly Unit.
"AddItem" - Adds an Item with the ID "" to the Target.
"RemoveItem" - Removes an Item with the ID "" from the Target.
"CreateCustomWaypointMap" - Creates a custom Waypoint Map for the NPC. (Allows Waypoints to be placed)
"CreateWaypoint" - Creates a Waypoint to the desired Position.
"MoveToWaypoint" - Moves the NPC to the Waypoint with the ID of "".
"DestroyCustomWaypointMap" - Destroys the custom Waypoint Map for the NPC. (Deletes all Waypoints)
"SetCombatCapable" - Sets whether Combat is enabled for the NPC.
"SetCombatMeleeCapable" - Sets whether Melee Combat is enabled for the NPC.
"SetCombatRangedCapable" - Sets whether Ranged Combat is enabled for the NPC.
"SetCombatSpellCapable" - Sets whether Spell Combat is enabled for the NPC.
"SetCombatTargetingCapable" - Sets whether Targeting is enabled for the NPC. (Makes NPC not look at the Players)
"SetNPCFlags" - Sets the NPCFlags of the Creature.
"SetModel" - Sets the Model/Display ID of the NPC.
"SetScale" - Sets the Scale of the NPC.
"SetFaction" - Sets the Faction of the NPC.
"SetStandState" - Sets the Standstate of the NPC.
"Teleport" - Teleports the NPC to the desired position.
"GetPlayerClass" - Returns the Class of the targeted Player.
"ClearThreatList" - Clears the Threat list. (Aggro list)
"WipeThreatList" - Wipes the Threat list. (Aggro list, same as ClearThreatList?)
"WipeTargetList" - Wipes the target list.
"WipeCurrentTarget" - Wipes the current target from the aggro list (Chooses a new Main Tank)
"GetHealth" - Returns how much Health Points the NPC has. (%)
"GetMaxHealth" - Returns the max Health Points the NPC has.
"SetHealth" - Sets the Health Points of the NPC. (%)
"SetMaxHealth" - Sets the max Health Points the NPC has.
"SetFieldFlags" - The same as SetUInt32/64Value (Field, Value)
GameObject Commands
"GetName" - Returns the name of the Player.
"Teleport" - Teleports the Player to the desired Position.
GameObject Gossip Commands
"GossipCreateMenu" - Creatures a Gossip Menu for the GameObject.
"GossipMenuAddItem" - Creates a Gossip Item to the Menu.
"GossipSendMenu" - Sends the Menu to the Player. (Allows the Player to see it)
"GossipComplete" - Completes the Gossip. (Same as RemoveEvents()?)
"GossipSendPOI" - [P]oint [o]f [i]nteresting - Set a Mark to your Minimap
Quote:
RandomFlags
RANDOM_ANY = 0,
RANDOM_IN_SHORTRANGE = 1,
RANDOM_IN_MIDRANGE = 2,
RANDOM_IN_LONGRANGE = 3,
RANDOM_WITH_MANA = 4,
RANDOM_WITH_RAGE = 5,
RANDOM_WITH_ENERGY = 6,
RANDOM_NOT_MAINTANK = 7
These are the RandomFlags for the NPC Command: GetRandomPlayer(#).
Quote:
Creature Events
CREATURE_EVENT_ON_ENTER_COMBAT = 1,
CREATURE_EVENT_ON_LEAVE_COMBAT = 2,
CREATURE_EVENT_ON_KILLED_TARGET = 3,
CREATURE_EVENT_ON_DIED = 4,
CREATURE_EVENT_AI_TICK = 5,
CREATURE_EVENT_ON_SPAWN = 6,
CREATURE_EVENT_ON_GOSSIP_TALK = 7,
CREATURE_EVENT_ON_REACH_WP = 8,
CREATURE_EVENT_ON_LEAVE_LIMBO = 9,
CREATURE_EVENT_PLAYER_ENTERS_RANGE = 10,
These are the UnitEvents for Registering the Script to the correct NPC.
Quote:
GameObject Events
GAMEOBJECT_EVENT_ON_SPAWN = 1,
GAMEOBJECT_EVENT_ON_USE = 2,
These are used for the GameObjectEvents used for Registering the Script to the correct GameObject.
Quote:
Gossip Events
GOSSIP_EVENT_ON_TALK = 1,
GOSSIP_EVENT_ON_SELECT_OPTION = 2,
GOSSIP_EVENT_ON_END = 3,
These are the GossipEvents used for Registering the Script to the correct Item/NPC/GameObject.
CREDITS
-- ArcEmu Dev Team (For creating ArcEmu)
-- Blackboy0 (Editing all Comments)
-- Kenuvis (SendPOI and FieldFlags)