A list of LUA commands that can be added to a script. (more to come when more are known to me)
() is the place to add the ID's of the spell/sound, this list will NOT include ID's and numbers that are added inside the ()
X is NOT a real number, it is just to mark where you enter ID's of models, spells, NPCsounds and the like.
Code:
PlaySoundToSet(X) --> Plays a sound set X. (the sound is from NPC currently in the game, like Ragnaros)

CastSpell(X) --> Makes the NPC instantly cast spell X on itself.

FullCastSpell(X) --> Makes the NPC cast a spell (X) with casting time on itself.

RemoveAura(X) --> Removes spell X from the NPC.

SendChatMessage(X, XX, XXX) --> Displays a chat message.
X: A number that tells the NPC if its supposed to /yell, /say and the like.
XX: If it is in a specific language (note: 0 is universal language)
XXX: The desired text for the NPC to say.

GetHealthPct() < X then --> If the NPC's health drops below X% a new event will begin if an event is included.

RemoveEvents() --> Removes all current events from the NPC. (Use this if the NPC dies or leaves combat)

SetModel(X) --> Changes the Units model into X

SetScale(X) --> Changes the Units scale into X

FullCastSpellOnTarget(X, pUnit:XX) --> Casts a spell with casting time on a target player.
X: is the spellID
You can put these as XX:
GetMainTank() casts spell X on the player with the highest aggro.
GetRandomPlayer(0) casts spell X on a random player within range.
GetAddTank() casts spell X on the player with the second highest threat.
CastSpellOnTarget(X, pUnit:XX) --> Instantly casts a spell on a target player.
X: is the spellID
You can put these as XX:
GetMainTank() casts spell X on the player with the highest aggro.
GetRandomPlayer(0) casts spell X on a random player within range.
GetAddTank() casts spell X on the player with the second highest threat.
ClearHateList() --> Resets the NPC's threat list

:Despawn(X, XX) --> Despawns a mob after X miliseconds
X: The amount of miliseconds before the mob despawns
XX: The amount of miliseconds before it respawns

:GetName() : Returns the unit's name.
:GetX() : Returns the unit's X position.
:GetY() : Returns the unit's Y position.
:GetZ() : Returns the unit's Z position.
:GetO() : Returns the unit's orientation.
:IsPlayer() : Returns true if the unit is a player, false otherwise.
:IsCreature() : Returns true if the unit is a creature, false otherwise.
:HasFinishedQuest(questID) : Returns true or false depending on if the quest has been completed.
:GetItemCount(itemID) : Returns the number of the items a unit has.
:GetUnitBySqlId(sqlID) : Returns a unit from the sql ID.
:GetClosestPlayer() : Returns the nearest in-range unit that is a player.
:GetRandomPlayer(flags) : Returns a random in-range unit that is a player.
:GetRandomFriend() : Returns a random in-range unit that is a player and is friendly towards the current player.
:GetMainTank() : Returns the main tank (most hated).
:GetAddTank() : Returns the add tank (second most hated).
:GetTauntedBy() : Returns the player that taunted the unit.
:GetSoulLinkedWith() : Returns the unit that is set as the soul link for this unit.

:RegisterEvent() :
:SendBroadcastMessage(message) :
:SendAreaTriggerMessage(message) :
:MoveTo(x, y, z, o) : Moves the unit to the specified position.
:SpawnGameObject(entryID, x, y, z, o, duration) : Spawns a gameobject at the specified position, despawning after duration milliseconds.
:SpawnCreature(entryID, x, y, z, o, faction, duration) : Spawns a creature at a position with specified faction, despawning after duration milliseconds.
:KnockBack(dx, dy, affect1, affect2) :
:MarkQuestObjectiveAsComplete(questID, objective) : Marks an objective of a quest as complete.
:LearnSpell(spellID) : Adds a spell to a unit.
:UnlearnSpell(spellID) : Removes a spell from a unit.
:StopMovement(time) : Stops a unit from moving for time milliseconds.
:Emote(emoteID) : Tells a unit to perform an emote.
:AddItem(itemID, count) : Adds a quantity of items to a unit.
:RemoveItem(itemID, count) : Removes a quantity of items from a unit.
:CreateCustomWaypointMap() : Creates a custom waypoint map.
:CreateWaypoint(x, y, z, o, waitTime, flags, modelID) : Adds a waypoint to the custom waypoint map.
:DestroyCustomWaypointMap() : Destroys a created custom waypoint map.
:MoveToWaypoint(waypointID) : Tells a unit to move to a particular waypoint.
:SetMovementType(movementType) :
:SetCombatCapable(value) : If value is 1 the unit cannot attack.
:SetHealthPct(value) : Sets the unit's health percentage.
:SetNPCFlags(flags) : Sets the NPC flags of a unit.
:SetFaction(factionID) : Sets the faction of a unit.
:SetTauntedBy(unit) : Sets the unit that taunted the current unit.
:SetSoulLinkedWith(unit) : Sets the unit that is soul linked with this unit.
All Made By Halestorm




› See More: LUA Commands