Some LUA Commands menu

User Tag List

Results 1 to 7 of 7
  1. #1
    abaraikenshi's Avatar Active Member
    Reputation
    39
    Join Date
    Apr 2008
    Posts
    331
    Thanks G/R
    1/1
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some LUA Commands

    Alright, first off, I DO NOT TAKE CREDIT FOR THIS LIST Aspiree posted this list at [Lua] Commands. - AC Web and I just wanted to share with the good ole guys at MMOwned.

    These are helping me get to better understand what is going on, here is the list;

    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 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
    
    :CastSpellAoF(X, Y, Z, <ID OF SPELL>) --> Makes an NPC cast a spell like Blizzard at a certain location.
    
    :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.
    :ClearHateList() : Sets the highest hate/threat to one the hate list.
    :WipeTargetList() : Clears the target list.
    :WipeCurrentTarget() : Clears the current target and targets the next highest threat.
    :GetPlayerClass() : Gets the class of current target.
    :SetFieldFlags() : Sets flags for current unit. 
    Last edited by abaraikenshi; 12-13-2008 at 06:27 PM. Reason: Change font color to white to easier read.
    Destinations unknown, I'll find my way there

    Some LUA Commands
  2. #2
    dash2007's Avatar Member
    Reputation
    1
    Join Date
    Jun 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice, rep+

  3. #3
    freakyflow's Avatar Contributor
    Reputation
    116
    Join Date
    Jan 2008
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    Saiket's Avatar Contributor
    Reputation
    146
    Join Date
    Jul 2007
    Posts
    176
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by freakyflow View Post
    That book and its website are for the addon API only. The OP's list is for private server scripting.
    AddOn developer and long time explorer.

  5. #5
    abaraikenshi's Avatar Active Member
    Reputation
    39
    Join Date
    Apr 2008
    Posts
    331
    Thanks G/R
    1/1
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, this was in response to the MMOwned Contest - Best Programmers, I was looking for useful resources and found this list so I posted it over here so others could attempt to learn
    Destinations unknown, I'll find my way there

  6. #6
    tkon's Avatar Member
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, this is really helpful. I'm interested to see if all these work. I had no idea that lua was this in depth.

  7. #7
    abaraikenshi's Avatar Active Member
    Reputation
    39
    Join Date
    Apr 2008
    Posts
    331
    Thanks G/R
    1/1
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by tkon View Post
    Wow, this is really helpful. I'm interested to see if all these work. I had no idea that lua was this in depth.
    It doesn't stop here either lol, I'm sure there are a metric ton of more commands for the Private Server scripting, but there is also AddOns that use LUA of a different type I believe. To check out how the AddOns are made, just download them from Curse or Wowinterface or whatever you use personally, and just look at the LUA files

    Hopefully this can do some good to people wanting to learn, and like I stated I take no credit for this so I don't want to be repped for it, (not trying to be an attention whore either) this was solely for learning purposes
    Destinations unknown, I'll find my way there

Similar Threads

  1. LUA Command help
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-06-2008, 05:38 PM
  2. SetSoulLinkedwith LUA Command Guide
    By mager1794 in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 07-02-2008, 04:16 PM
  3. i need some lua help please
    By runiker in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-29-2008, 07:49 AM
  4. [Request]Some lua scripts
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-28-2007, 11:59 PM
  5. Some Gm Commands Plz Help
    By LAFD in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 10-08-2007, 03:43 PM
All times are GMT -5. The time now is 10:13 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search