| 1 | ::FULL COMMAND LISTING:: |
|---|
| 2 | |
|---|
| 3 | :Global |
|---|
| 4 | PerformIngameSpawn(type,entry,map,x,y,z,o,facOrScale,dur [,eq1,eq2,eq3,instanceId]) *- Fixed to work correctly all round. |
|---|
| 5 | |
|---|
| 6 | GetPlayer(name) *- Fixed possible world crash. |
|---|
| 7 | GetLuaEngine() +- Returns what engine the server is using. Should be LuaHypArc. |
|---|
| 8 | GetLuaEngineVersion() +- Returns what version LuaHypArc on the server is. |
|---|
| 9 | GetGameTime() +- Returns server time in seconds. |
|---|
| 10 | ReloadTable(tablename) +- Reloads table tablename. |
|---|
| 11 | Rehash() +- Rehashes server config files. |
|---|
| 12 | ReloadLuaEngine() +- Reloads the Lua engine & scripts. |
|---|
| 13 | RegisterServerHook(event, functionName) +- Registers a server hook event. Further documentation included. |
|---|
| 14 | logcol(colourVal) +- Sets the colour of the next print() message: |
|---|
| 15 | FOREGROUND_BLUE = 1 // text color contains blue. |
|---|
| 16 | FOREGROUND_GREEN = 2 // text color contains green. |
|---|
| 17 | FOREGROUND_RED = 4 // text color contains red. |
|---|
| 18 | FOREGROUND_INTENSITY = 8 // text color is intensified (brightened). |
|---|
| 19 | //these can be added together, for example 1+8 = bright blue. |
|---|
| 20 | GetPlayersInWorld() +- Returns a table containing all the players in the world. |
|---|
| 21 | GetPlayersInMap(mapId) +- Returns a table containing all the players in map mapId. |
|---|
| 22 | GetPlayersInZone(zoneId) +- Returns a table containing all the players in zone zoneId. |
|---|
| 23 | RegisterTimedEvent(funcName, delay, repeats) +- Registers a world timed event, similar to RegisterEvent. |
|---|
| 24 | GetArcemuRevision() +- Returns the server's ArcEmu revision number. |
|---|
| 25 | SendPvPCaptureMessage(zoneId, message) +- Sends a PvP-capture style message to zoneId. |
|---|
| 26 | WorldDBQueryTable(query) +- Performs a query. Results are returned as a table in the form t[row][col]. |
|---|
| 27 | CharDBQueryTable(query) +- Same as above, but for the Char DB. |
|---|
| 28 | WorldDBQuery(query [,colnum, rownum]) +- Performs a query. rownum and colnum are optional, should only be used to |
|---|
| 29 | CharDBQuery(query [,colnum, rownum]) specify what col/row to get returned values from (SELECT statements) |
|---|
| 30 | |
|---|
| 31 | SendMail(type,senderGuid,receivrGuid,subject,body,money,codAmt,itemRawGuid,stationeryId) +- Sends a mail message with specified parameters. |
|---|
| 32 | type can be: |
|---|
| 33 | NORMAL = 0 |
|---|
| 34 | COD = 1 |
|---|
| 35 | AUCTION = 2 |
|---|
| 36 | stationery: |
|---|
| 37 | MAIL_STATIONERY_TEST1 = 1, |
|---|
| 38 | MAIL_STATIONERY_TEST2 = 41, |
|---|
| 39 | MAIL_STATIONERY_GM = 61, |
|---|
| 40 | MAIL_STATIONERY_AUCTION = 62, |
|---|
| 41 | MAIL_STATIONERY_VALENTINES = 64, |
|---|
| 42 | MAIL_STATIONERY_XMAS = 65 |
|---|
| 43 | |
|---|
| 44 | GetTaxiPath(path_id) +- Returns the Taxi object for a path from the DBCs, with id path_id. |
|---|
| 45 | RegisterDummySpell(entry, funcName) +- entry must be a spell id with a "dummy", "script effect" or "send events" effect. funcName is the function |
|---|
| 46 | that will trigger when that spell is cast. |
|---|
| 47 | SetDBCSpellVar(entry, var [,subindex], value) +- Similar to Spell:SetVar, but this sets vars by entry id, rather than by individual spell objects. |
|---|
| 48 | GetDBCSpellVar(entry, var [,subindex]) +- Retrieves a spell var based on spell entry id. |
|---|
| 49 | |
|---|
| 50 | :Items |
|---|
| 51 | Item:GetEntryId() *- Now fixed and working correctly. |
|---|
| 52 | Item:GetName() +- Returns Item's name. |
|---|
| 53 | Item:GetSpellId(index) +- Returns Item's index'th spell Id. 0 means the first spell on the item. |
|---|
| 54 | Item:GetSpellTrigger(index) +- Returns Item's index'th spell's trigger type. 0 means the first spell on the item. |
|---|
| 55 | USE = 0 |
|---|
| 56 | ON_EQUIP = 1 |
|---|
| 57 | CHANCE_ON_HIT = 2 |
|---|
| 58 | SOULSTONE = 4 |
|---|
| 59 | LEARNING = 6 |
|---|
| 60 | Item:GetGUID() +- Gets Item's GUID. |
|---|
| 61 | Item:AddLoot(itemid,mincount,maxcount,ffa_loot) +- Adds loot with described parameters to Item. Good to use with SendLootWindow. |
|---|
| 62 | Item:GetItemLink() +- Returns a string containing Item's item link. |
|---|
| 63 | Item:SetByteValue(index,index1,value) +- Modifies the specified byte value of Item. |
|---|
| 64 | Item:GetByteValue(index,index1) +- Gets the specified byte value of Item. |
|---|
| 65 | Item:GetItemLevel() +- Returns the item level. |
|---|
| 66 | Item:GetRequiredLevel() +- Returns the required level. |
|---|
| 67 | Item:GetBuyPrice() +- Returns the buy price. |
|---|
| 68 | Item:GetSellPrice() +- Returns the sell price. |
|---|
| 69 | Item:RepairItem() +- Repairs Item. |
|---|
| 70 | Item:GetMaxDurability() +- Returns Item's max durability. |
|---|
| 71 | Item:GetDurability() +- Returns Item's current durability. |
|---|
| 72 | Item:HasEnchantment() +- Returns true if Item has an enchantment. |
|---|
| 73 | Item:ModifyEnchantmentTime(slot,duration) +- Modifies Item's enchantment in slot to duration. |
|---|
| 74 | Item:SetStackCount(count) +- Sets the number of stacked Items to count. |
|---|
| 75 | Item:IsContainer() +- Returns true if Item is a bag. |
|---|
| 76 | Item:GetContainerItemCount(id) +- Returns how many items with the specified id are within Item. Item must be a bag. |
|---|
| 77 | Item:GetEquippedSlot() +- Returns the slot that Item is equipped in, or -1 if not equipped. See Plyr:GetEquippedItemBySlot. |
|---|
| 78 | Item:GetObjectType() +- Returns "Item". |
|---|
| 79 | |
|---|
| 80 | :GameObjects |
|---|
| 81 | THE FOLLOWING UNIT FUNCTIONS HAVE BEEN PORTED FOR GAMEOBJECT USE: |
|---|
| 82 | GetLandHeight |
|---|
| 83 | SetZoneWeather |
|---|
| 84 | GetDistanceYards |
|---|
| 85 | PhaseSet |
|---|
| 86 | PhaseAdd |
|---|
| 87 | PhaseDelete |
|---|
| 88 | GetPhase |
|---|
| 89 | CastSpellOnTarget |
|---|
| 90 | InitPacket |
|---|
| 91 | AddDataToPacket |
|---|
| 92 | SendPacketToSet |
|---|
| 93 | SendPacketToZone |
|---|
| 94 | SendPacketToInstance |
|---|
| 95 | SendPacketToWorld |
|---|
| 96 | AddLoot |
|---|
| 97 | GetInstanceOwner |
|---|
| 98 | GetDungeonDifficulty |
|---|
| 99 | SetDungeonDifficulty |
|---|
| 100 | SetByteValue |
|---|
| 101 | GetByteValue |
|---|
| 102 | GetSpawnId |
|---|
| 103 | GetAreaId |
|---|
| 104 | PLEASE SEE THEIR USAGE IN ":Units" SECTION. |
|---|
| 105 | GObj:Update() +- Despawns and respawns Gobj. |
|---|
| 106 | GObj:SetPosition(x,y,z,o) +- Moves GObj to the specified position. |
|---|
| 107 | GObj:GetObjectType() +- Returns "GameObject". |
|---|
| 108 | |
|---|
| 109 | :Units |
|---|
| 110 | PACKETS - PLEASE SEE ABOVE FOR FURTHER INFORMATION. |
|---|
| 111 | Unit:SendPacket(packet, self) +- Sends the packet to the nearby units. if self is true, the packet will also be sent to Unit. |
|---|
| 112 | Plyr:SendPacketToGroup(packet) +- Sends the packet to Plyr's group. Please see above for full info. |
|---|
| 113 | Plyr:SendPacketToGuild(packet) +- Sends the packet stored in buffer_index to Plyr's guild. Please see above for full info. |
|---|
| 114 | Plyr:SendPacketToPlayer(packet) +- Sends the packet to Plyr. Please see above for full info. |
|---|
| 115 | Unit:SendPacketToZone(packet,zone_id) +- Sends the packet to Zone zone_id. Please see above for full info. |
|---|
| 116 | Unit:SendPacketToInstance(packet,instance_id) +- Sends the packet to Instance instance_id. Please see above for full info. |
|---|
| 117 | Unit:SendPacketToWorld(packet) +- Sends the packet to the world. Please see above for full info. |
|---|
| 118 | PHASES - PLEASE SEE ABOVE FOR FURTHER INFORMATION. |
|---|
| 119 | Unit:PhaseSet(newphase [,save]) +- Sets the phase of Unit to newphase. save is optional, if 1 and Unit is not a player, it will save to DB. |
|---|
| 120 | Unit:PhaseAdd(newphase [,save]) +- Unit becomes a member of newphase. save is as above. |
|---|
| 121 | Unit:PhaseDelete(phase [,save]) +- Removes phase from Unit. save is as above. |
|---|
| 122 | +-Also mapped to SetPhase, AddToPhase and DeletePhase respectively. |
|---|
| 123 | Unit:GetPhase() +- Returns Unit's current phase. |
|---|
| 124 | Plyr:PlaySoundToPlayer(sound_id) +- Plays sound_id to Plyr only. |
|---|
| 125 | Plyr:GetDuelState() +- Returns the player's duel state: |
|---|
| 126 | DUEL_STATE_REQUESTED = 0 |
|---|
| 127 | DUEL_STATE_STARTED = 1 |
|---|
| 128 | DUEL_STATE_FINISHED = 2 (Default) |
|---|
| 129 | Unit:SetPosition(x,y,z [,o]) +- Instantly relocates the Unit to the specified x,y,z, optional orientation. |
|---|
| 130 | Unit:CastSpellOnTarget(spell_id,target) *- Now working as intended, at long last. Just like CastSpell, with a target. |
|---|
| 131 | Unit:GetLandHeight(x,y) +- Get the Z of the land at (x,y). Requires V-Maps to work correctly. |
|---|
| 132 | Unit:QuestAddStarter(quest_id) +- Makes Unit a quest starter for quest_id. |
|---|
| 133 | Unit:QuestAddFinisher(quest_id) +- Makes Unit a quest finisher for quest_id. |
|---|
| 134 | Plyr:SetPlayerSpeed(speed) +- Sets the speed of Plyr (0-255). |
|---|
| 135 | Plyr:GiveHonor(amount) +- Adds amount of honour to Plyr. |
|---|
| 136 | Plyr:SetBindPoint(x,y,z,map_id,zone_id) +- Sets Plyr's Hearthstone to x,y,z in zone_id, map_id. |
|---|
| 137 | Plyr:SoftDisconnect() +- Logs out Plyr. |
|---|
| 138 | Unit:SetZoneWeather(zone_id,type,density) +- Sets the weather of zone_id to type, and density (0.3-2.0). |
|---|
| 139 | WEATHER_TYPE_NORMAL = 0, // NORMAL (SUNNY) |
|---|
| 140 | WEATHER_TYPE_FOG = 1, // FOG |
|---|
| 141 | WEATHER_TYPE_RAIN = 2, // RAIN |
|---|
| 142 | WEATHER_TYPE_HEAVY_RAIN = 4, // HEAVY_RAIN |
|---|
| 143 | WEATHER_TYPE_SNOW = 8, // SNOW |
|---|
| 144 | WEATHER_TYPE_SANDSTORM = 16 // SANDSTORM |
|---|
| 145 | Plyr:SetPlayerWeather(type,density) +- Sets the weather for Plyr ONLY. See above for other arguments. |
|---|
| 146 | Plyr:PlayerSendChatMessage(type,lang,msg) +- Forces Plyr to send a chat message. See existing SendChatMessage function for other arguments. |
|---|
| 147 | Unit:GetDistanceYards(target) +- Gets the distance between Unit and target in yards. |
|---|
| 148 | Unit:VendorAddItem(item_id,amount,extcost) +- Adds amount items with entry item_id and extended cost extcost to Unit. |
|---|
| 149 | Unit:VendorRemoveItem(item_guid) +- Removes the item item_guid from the vendor. Note this is NOT entry id. Recommend function below. |
|---|
| 150 | Unit:VendorRemoveAllItems() +- Removes all the items from the vendor Unit. |
|---|
| 151 | Unit:CreatureHasQuest(quest_id) +- Returns true if Unit has quest quest_id. |
|---|
| 152 | Plyr:SendBattlegroundWindow(bg_id) +- Sends a battleground window for bg_id to Plyr. |
|---|
| 153 | BATTLEGROUND_ALTERAC_VALLEY = 1, |
|---|
| 154 | BATTLEGROUND_WARSONG_GULCH = 2, |
|---|
| 155 | BATTLEGROUND_ARATHI_BASIN = 3, |
|---|
| 156 | BATTLEGROUND_ARENA_2V2 = 4, |
|---|
| 157 | BATTLEGROUND_ARENA_3V3 = 5, |
|---|
| 158 | BATTLEGROUND_ARENA_5V5 = 6, |
|---|
| 159 | BATTLEGROUND_EYE_OF_THE_STORM = 7, |
|---|
| 160 | BATTLEGROUND_STRAND_OF_THE_ANCIENT = 9, |
|---|
| 161 | BATTLEGROUND_ISLE_OF_CONQUEST = 30 |
|---|
| 162 | Plyr:SendVendorWindow(unit) +- Sends Plyr unit's vendor window. Note that this isn't an entry id. |
|---|
| 163 | Plyr:SendTrainerWindow(unit) +- Same as above, except with a Trainer window. |
|---|
| 164 | Plyr:SendInnkeeperWindow(unit) +- Same as above, except with an innkeeper bind. |
|---|
| 165 | Plyr:SendBankWindow(unit) +- Same as above, except with a bank window. |
|---|
| 166 | Plyr:SendAuctionWindow(unit) +- Same as above, except with an auction house window. |
|---|
| 167 | Plyr:GetInventoryItem(bag_slot,slot) +- Returns the item object in Plyr's bag bag_slot and slot number slot. |
|---|
| 168 | Plyr:GetInventoryItemById(item_id) +- Returns the item object in Plyr's inventory with entry item_id. |
|---|
| 169 | Plyr:GetPrimaryCombatTarget() +- Returns Plyr's combat target. Should use instead of old GetTarget. |
|---|
| 170 | Unit:MoveRandomArea(x1,y1,z1,x2,y2,z2,o2) +- Moves Unit to a random point in the area. |
|---|
| 171 | Plyr:SendLootWindow(GUID, loot_type) +- Sends Plyr the loot window of the object identified by GUID. |
|---|
| 172 | Loot type MUST be |
|---|
| 173 | 1-creature, regular |
|---|
| 174 | 2-creature, skinning |
|---|
| 175 | 3-creature, pickpocketing |
|---|
| 176 | 4-go, regular (includes fishing schools) |
|---|
| 177 | 5-go, herbalism/mining |
|---|
| 178 | 6-item, regular/milling/prospecting/disenchanting |
|---|
| 179 | Unit:AddLoot(itemid,mincount,maxcount,ffa_loot) +- Adds a loot item with the described parameters to Unit. Good to use for SendLootWindow or dynamic loot. |
|---|
| 180 | Unit:SetPacified(true) +- Set true to 1 to pacify the Unit. 0 to un-pacify. Good for players. |
|---|
| 181 | VEHICLE FUNCTIONS - EXPERIMENTAL |
|---|
| 182 | Unit:SpawnVehicle(entry,x,y,z,o,faction,duration [,phase]) +- Spawns a creature as a vehicle with described parameters. Returns the vehicle spawned. |
|---|
| 183 | Plyr:SetVehicle(vehicle, seat) +- Sets Plyr's vehicle, and their seat position - a number. Set to -1 for auto-choose. |
|---|
| 184 | Plyr:GetVehicle() +- Returns the Unit for Plyr's current vehicle. |
|---|
| 185 | Plyr:RemoveFromVehicle() +- Removes Plyr from their vehicle. |
|---|
| 186 | Plyr:GetVehicleSeat() +- Returns what seat Plyr is sitting in. |
|---|
| 187 | Unit:IsVehicle() +- Returns true if Unit is a vehicle, false otherwise. |
|---|
| 188 | Unit:GetPassengerCount() +- Returns the current amount of passengers in the vehicle Unit. |
|---|
| 189 | Unit:MoveVehicle(x,y,z,o) +- Moves the vehicle Unit (with all passengers) to defined position. |
|---|
| 190 | Plyr:SetPlayerLock(Yes) +- Locks the player from all control. Yes should be true or false. False unlocks the player. |
|---|
| 191 | Plyr:MovePlayerTo(x,y,z,o,type [,speed]) +- Forces a player to move to x,y,z,o. Speed is optional. |
|---|
| 192 | type must be: |
|---|
| 193 | 0 - walk |
|---|
| 194 | 256 - teleport |
|---|
| 195 | 4096 - run |
|---|
| 196 | 12288 - fly |
|---|
| 197 | Plyr:IsGm() +- Returns true if Plyr is a GM. |
|---|
| 198 | Plyr:GetGroupPlayers() +- Returns a table similar to GetInRangePlayers() but containing Plyr's group members. |
|---|
| 199 | Unit:GetDungeonDifficulty() +- Returns the Unit's current dungeon difficulty: |
|---|
| 200 | Unit:SetDungeonDifficulty(difficulty) +- Sets the Unit's dungeon difficulty: |
|---|
| 201 | MODE_NORMAL_10MEN = 0, |
|---|
| 202 | MODE_NORMAL_25MEN = 1, |
|---|
| 203 | MODE_HEROIC_10MEN = 2, |
|---|
| 204 | MODE_HEROIC_25MEN = 3 |
|---|
| 205 | Plyr:GetGroupLeader() +- Returns Plyr's group's leader. |
|---|
| 206 | Plyr:SetGroupLeader(player, silent) +- Set's Plyr's group's leader to player. Set silent to true if you don't want the usual announcement. |
|---|
| 207 | Plyr:AddGroupMember(player [,subgroup]) +- Adds player to Plyr's group, subgroup is optional. |
|---|
| 208 | Plyr:IsGroupFull() +- Returns true if Plyr's group is full. |
|---|
| 209 | Plyr:IsGroupedWith(target) +- Returns true if target is in Plyr's group. |
|---|
| 210 | Plyr:GetTotalHonor() +- Returns Plyr's total honor. |
|---|
| 211 | Plyr:GetHonorToday() +- Returns Plyr's honor today. |
|---|
| 212 | Plyr:GetHonorYesterday() +- Returns Plyr's honor for yesterday. |
|---|
| 213 | Plyr:GetArenaPoints() +- Returns Plyr's arena points. |
|---|
| 214 | Plyr:AddArenaPoints(amt) +- Adds amt of arena points to Plyr. |
|---|
| 215 | Plyr:AddLifetimeKills(amt) +- Adds amt of lifetime kills to Plyr. |
|---|
| 216 | Plyr:GetInRangePlayersWithAura(spellId) +- Returns a table of in range players with spellId as an aura. |
|---|
| 217 | Unit:GetGender() +- Returns 0-male or 1-female. |
|---|
| 218 | Unit:SetGender(gender) +- Sets the gender of unit. Works on players - requires relog to take effect. |
|---|
| 219 | Plyr:GetGroupType() +- Returns Plyr's group type: |
|---|
| 220 | GROUP_TYPE_PARTY = 0, |
|---|
| 221 | GROUP_TYPE_RAID = 1, |
|---|
| 222 | Plyr:ExpandToRaid() +- Expands Plyr's group to a raid. |
|---|
| 223 | Plyr:GetGuildId() +- Returns Plyr's guild id. |
|---|
| 224 | Plyr:GetGuildRank() +- Returns Plyr's rank in his guild. |
|---|
| 225 | Plyr:SetGuildRank(rank) +- Set's Plyr's rank in his guild to rank. |
|---|
| 226 | Plyr:IsInGuild() +- Returns true if Plyr is in a guild, false otherwise. |
|---|
| 227 | Plyr:SendGuildInvite(recipient) +- Makes Plyr send recipient an invite to their guild. |
|---|
| 228 | Plyr:DemoteGuildMember(target) +- Makes Plyr demote target. |
|---|
| 229 | Plyr:PromoteGuildMember(target) +- Makes Plyr promote target. |
|---|
| 230 | Plyr:SetGuildMotd(newMotd) +- Makes Plyr set the guild message of the day. |
|---|
| 231 | Plyr:GetGuildMotd() +- Returns Plyr's guild's message of the day. |
|---|
| 232 | Plyr:SetGuildInformation(newInfo) +- Makes Plyr set the guild information to newInfo. |
|---|
| 233 | Plyr:AddGuildMember(target) +- Adds target to Plyr's guild. |
|---|
| 234 | Plyr:RemoveGuildMember(target) +- Removes target from Plyr's guild. |
|---|
| 235 | Plyr:SetPublicNote(target, note) +- Makes Plyr set the public note of target to note. |
|---|
| 236 | Plyr:SetOfficerNote(target, note) +- Makes Plyr set the officer note of target to note. |
|---|
| 237 | Plyr:DisbandGuild() +- Disbands Plyr's guild. |
|---|
| 238 | Plyr:ChangeGuildMaster(target) +- Changes Plyr's guild leader to target. |
|---|
| 239 | Plyr:SendGuildChatMessage(message,isOfficerChat)+- Plyr sends a guild chat message. Set isOfficerChat to true to make it an officer chat message. |
|---|
| 240 | Plyr:SendGuildLog(target) +- Sends Plyr's guild log to target. |
|---|
| 241 | Plyr:GuildBankDepositMoney(amount) +- Makes Plyr deposit an amount of money into the guild bank. |
|---|
| 242 | Plyr:GuildBankWithdrawMoney(amount) +- Makes Plyr withdraw an amount of money from the guild bank. |
|---|
| 243 | Plyr:Jump(height) +- Makes Plyr jump with specified height. Experimental. |
|---|
| 244 | Unit:GetInstanceOwner() +- Returns the owner of the instance Unit is currently in. |
|---|
| 245 | Plyr:GetGmRank() +- Returns Plyr's GM rank as a string, eg. 'z' or 'az'. |
|---|
| 246 | Unit:SetByteValue(index,index1,value) +- Modifies the specified byte value of Unit. |
|---|
| 247 | Unit:GetByteValue(index,index1) +- Gets the specified byte value of Unit. |
|---|
| 248 | Plyr:IsPvPFlagged() +- Returns true if Plyr is PvP flagged. |
|---|
| 249 | Plyr:IsFFAPvPFlagged() +- Returns true if Plyr is free-for-all PvP flagged. |
|---|
| 250 | Plyr:GetGuildLeader() +- Returns the name of Plyr's guild's leader. |
|---|
| 251 | Plyr:GetGuildMemberCount() +- Returns the number of people in Plyr's guild. |
|---|
| 252 | Unit:CanAttack(target) +- Returns true if Unit can attack target. |
|---|
| 253 | Unit:GetInRangeFriends() *- Now working as intended. |
|---|
| 254 | Unit:GetInRangeEnemies() +- Returns Unit's in range enemies. |
|---|
| 255 | Unit:GetInRangeUnits() +- Returns all units near Unit. |
|---|
| 256 | Unit:IsFriendly(obj) +- Returns true if Unit is friendly to obj, false otherwise. |
|---|
| 257 | Unit:IsInPhase(phase) +- Returns true if Unit is in phase. |
|---|
| 258 | Unit:HasFlag(index, flag) +- Returns true if the Unit has UInt32Value at index and flag. |
|---|
| 259 | Plyr:GetPlayerMovementVector() +- Returns Plyr's movement vector in table x,y,z,o. Experimental. |
|---|
| 260 | Plyr:UnsetKnownTitle(id) +- Removes the title with id from Plyr. |
|---|
| 261 | Unit:SetMovementFlags(flag) +- Sets the way the unit moves. |
|---|
| 262 | flag must be: |
|---|
| 263 | 0 - walk |
|---|
| 264 | 1 - run |
|---|
| 265 | 2 - fly |
|---|
| 266 | Plyr:Repop() +- Forces the player to spirit release to the nearest graveyard. |
|---|
| 267 | Plyr:GetEquippedItemBySlot(slot) +- Gets the item Plyr has equipped in the specified slot. |
|---|
| 268 | slot must be: |
|---|
| 269 | HEAD 0 |
|---|
| 270 | NECK 1 |
|---|
| 271 | SHOULDERS 2 |
|---|
| 272 | BODY 3 |
|---|
| 273 | CHEST 4 |
|---|
| 274 | WAIST 5 |
|---|
| 275 | LEGS 6 |
|---|
| 276 | FEET 7 |
|---|
| 277 | WRISTS 8 |
|---|
| 278 | HANDS 9 |
|---|
| 279 | FINGER1 10 |
|---|
| 280 | FINGER2 11 |
|---|
| 281 | TRINKET1 12 |
|---|
| 282 | TRINKET2 13 |
|---|
| 283 | BACK 14 |
|---|
| 284 | MAINHAND 15 |
|---|
| 285 | OFFHAND 16 |
|---|
| 286 | RANGED 17 |
|---|
| 287 | TABARD 18 |
|---|
| 288 | Unit:EventChat(type,language,message,delay) +- Makes the Unit send a chat message in delay milliseconds. |
|---|
| 289 | Plyr:ResetTalents() +- Resets Plyr's talent points. |
|---|
| 290 | Plyr:SetTalentPoints(spec, newValue) +- Sets Plyr's talent points to newValue. spec must be 0 or 1, identifying which spec to modify. |
|---|
| 291 | Plyr:GetTalentPoints(spec) +- Returns how many talent points Plyr has. spec must be 0 or 1, identifying which spec to modify. |
|---|
| 292 | Unit:GetSpawnId() +- Returns the Unit's spawn id ("Sql id" from .npc info). |
|---|
| 293 | Plyr:GetGuildMembers() +- Returns a table containing the names of the players in Plyr's guild. |
|---|
| 294 | Plyr:TakeHonor(amt) +- Removes amt of honor from Plyr. |
|---|
| 295 | Plyr:RemoveArenaPoints(amt) +- Removes amt of arena points from Plyr. |
|---|
| 296 | Unit:GetAreaId() +- Returns Unit's current area (subzone) id. Requires V-Maps. |
|---|
| 297 | Plyr:ResetPetTalents() +- Resets Plyr's pet's talents. |
|---|
| 298 | Unit:IsDazed() +- Returns true if Unit is dazed/ensnared. |
|---|
| 299 | Unit:GetAura(slot) +- Returns the ID of the aura on Unit in the specified slot. |
|---|
| 300 | Unit:IsRooted() +- Returns true if Unit us rooted. |
|---|
| 301 | Unit:HasAuraWithMechanic(id) +- Returns true if Unit has an aura containing the specified mechanic. |
|---|
| 302 | Unit:HasNegativeAura() +- Returns true if Unit has a negative aura. |
|---|
| 303 | Unit:HasPositiveAura() +- Returns true if Unit has a positive aura. |
|---|
| 304 | Unit:GetClosestEnemy() +- Returns the closest enemy to Unit. |
|---|
| 305 | Unit:GetClosestFriend() +- Returns the closest friend to Unit. |
|---|
| 306 | Plyr:StartTaxi(Taxi, mount_id) *- Modified to use the Taxi system, and mounts them on the set display id. |
|---|
| 307 | Plyr:IsOnTaxi() +- Returns true if Plyr is on a taxi. |
|---|
| 308 | Plyr:GetTaxi() +- Returns the Taxi object that Plyr is currently on, or nil if not on a taxi. |
|---|
| 309 | Unit:GetObjectType() +- Returns "Player" if Unit is a player, "Unit" for NPCs. |
|---|
| 310 | Unit:GetPower([type]) +- Returns the amount of power Unit has of type. If type is left out, it uses the Unit's current power type. |
|---|
| 311 | POWER_TYPE_MANA = 0, |
|---|
| 312 | POWER_TYPE_RAGE = 1, |
|---|
| 313 | POWER_TYPE_FOCUS = 2, |
|---|
| 314 | POWER_TYPE_ENERGY = 3, |
|---|
| 315 | POWER_TYPE_HAPPINESS = 4, |
|---|
| 316 | POWER_TYPE_RUNES = 5, |
|---|
| 317 | POWER_TYPE_RUNIC_POWER = 6 |
|---|
| 318 | Unit:GetMaxPower([type]) +- Returns the amount of max power Unit can have. type is as above. |
|---|
| 319 | Unit:GetPowerPct([type]) +- Returns percentage of power unit has. type is as above. |
|---|
| 320 | Unit:SetMaxPower(amount, [type]) +- Sets Unit's max power. type is as above. This MUST be set when using a non-default power type. |
|---|
| 321 | (Note: Rage and Runic power's default internal maximum is 1000, displays as 100 in-game) |
|---|
| 322 | Unit:SetPowerPct(amount, [type]) +- Sets Unit's power as a percentage of its max. type is as above. |
|---|
| 323 | Unit:SetPower(amount, [type]) +- Sets Unit's power. type is as above. |
|---|
| 324 | |
|---|
| 325 | Unit:CreateCustomWaypoint(id,x,y,z,o,waittime,movementflags,modelid) +- This command creates waypoints for the creature GIVEN an id rather than generated one. movementflags are 0x0 for walk, 0x100 for run ... etc the rest is self explanatory |
|---|
| 326 | Unit:DeleteWaypoints() +- Does just, erases all waypoints the unit has. |
|---|
| 327 | Plyr:LearnSpells(lua_table) +- lua_table must be an array of spell ids. The function will teach Plyr each of those spells. |
|---|
| 328 | ex. |
|---|
| 329 | function LearnSpellz(player) |
|---|
| 330 | local spellz = {1,2,3,4,5,6,7} |
|---|
| 331 | player:LearnSpells(spellz) |
|---|
| 332 | end |
|---|
| 333 | |
|---|
| 334 | :Packets |
|---|
| 335 | LuaPacket:CreatePacket(opcode, size) +- Returns a new packet object with the specified opcode and size. |
|---|
| 336 | Pakt:GetOpcode() +- Returns Pakt's opcode. |
|---|
| 337 | Pakt:GetSize() +- Returns Pakt's size. |
|---|
| 338 | |
|---|
| 339 | Pakt:ReadByte() +- Reads an int8 from Pakt. |
|---|
| 340 | Pakt:ReadUByte() +- Reads an uint8 from Pakt. |
|---|
| 341 | Pakt:ReadShort() +- Reads an int16 from Pakt. |
|---|
| 342 | Pakt:ReadUShort() +- Reads an uint16 from Pakt. |
|---|
| 343 | Pakt:ReadLong() +- Reads an int32 from Pakt. |
|---|
| 344 | Pakt:ReadULong() +- Reads an uint32 from Pakt. |
|---|
| 345 | Pakt:ReadFloat() +- Reads a float from Pakt. |
|---|
| 346 | Pakt:ReadDouble() +- Reads a double from Pakt. |
|---|
| 347 | Pakt:ReadGUID() +- Reads an uint64 from Pakt. |
|---|
| 348 | |
|---|
| 349 | Pakt:WriteByte(val) +- Writes an int8 to Pakt. |
|---|
| 350 | Pakt:WriteUByte(val) +- Writes an uint8 to Pakt. |
|---|
| 351 | Pakt:WriteShort(val) +- Writes an int16 to Pakt. |
|---|
| 352 | Pakt:WriteUShort(val) +- Writes an uint16 to Pakt. |
|---|
| 353 | Pakt:WriteLong(val) +- Writes an int32 to Pakt. |
|---|
| 354 | Pakt:WriteULong(val) +- Writes an uint32 to Pakt. |
|---|
| 355 | Pakt:WriteFloat(val) +- Writes a float to Pakt. |
|---|
| 356 | Pakt:WriteDouble(val) +- Writes a double to Pakt. |
|---|
| 357 | Pakt:WriteGUID(val) +- Writes an uint64 to Pakt. |
|---|
| 358 | Pakt:GetObjectType() +- Returns "Packet". |
|---|
| 359 | |
|---|
| 360 | :TAXI |
|---|
| 361 | LuaTaxi:CreateTaxi() +- Returns a new Taxi object. |
|---|
| 362 | Taxi:GetNodeCount() +- Returns the number of nodes in the path Taxi. |
|---|
| 363 | Taxi:AddPathNode(mapid,x,y,z[,index]) +- Adds a node to Taxi, with set coords. When index is removed the node is appended to the path, otherwise |
|---|
| 364 | inserted at the given index. |
|---|
| 365 | Taxi:GetId() +- Returns the ID of a Taxi path. Note custom paths have no ID. |
|---|
| 366 | Taxi:GetObjectType() +- Returns "TaxiPath". |
|---|
| 367 | |
|---|
| 368 | :SPELLS |
|---|
| 369 | Spell:GetCaster() +- Returns the caster of the spell. Can return a Unit, Item or GObj. |
|---|
| 370 | Spell:GetEntry() +- Returns the entry ID of the spell. |
|---|
| 371 | Spell:IsDuelSpell() +- Returns true if the spell was cast in a duel. |
|---|
| 372 | Spell:GetSpellType() +- Returns the type of the spell: |
|---|
| 373 | SPELL_DMG_TYPE_NONE = 0, |
|---|
| 374 | SPELL_DMG_TYPE_MAGIC = 1, |
|---|
| 375 | SPELL_DMG_TYPE_MELEE = 2, |
|---|
| 376 | SPELL_DMG_TYPE_RANGED = 3 |
|---|
| 377 | Spell:GetSpellState() +- Returns the state of the spell: |
|---|
| 378 | SPELL_STATE_NULL = 0, |
|---|
| 379 | SPELL_STATE_PREPARING = 1, |
|---|
| 380 | SPELL_STATE_CASTING = 2, |
|---|
| 381 | SPELL_STATE_FINISHED = 3, |
|---|
| 382 | SPELL_STATE_IDLE = 4 |
|---|
| 383 | Spell:Cancel() +- Cancels the spell. |
|---|
| 384 | Spell:Cast(check) +- Casts the spell. Set check to true if you want to check if the spell is castable, or false to force cast. |
|---|
| 385 | Spell:CanCast() +- Returns true if the spell is castable. |
|---|
| 386 | Spell:Finish() +- Finishes the spell, used post-casting. |
|---|
| 387 | Spell:GetTarget() +- Returns the target of the spell. Can return a Unit, Item or GObj. |
|---|
| 388 | Spell:IsStealthSpell() +- Returns true if the spell grants some kind of stealth. |
|---|
| 389 | Spell:IsInvisibilitySpell() +- Like IsStealthSpell but for invisibility. |
|---|
| 390 | Spell:GetPossibleEnemy([range]) +- Returns the GUID of a possible unit enemy of the spell. range is optional. |
|---|
| 391 | Spell:GetPossibleFriend([range]) +- Same as above but for a friendly target. |
|---|
| 392 | Spell:HasPower() +- Returns true if the caster has enough power to cast the spell. |
|---|
| 393 | Spell:IsAspect() +- Returns true if the spell is a hunter Aspect spell. |
|---|
| 394 | Spell:IsSeal() +- Returns true if the spell is a paladin Seal spell. |
|---|
| 395 | Spell:GetObjectType() +- Returns "Spell". |
|---|
| 396 | Spell:SetVar(var [,subindex], value) +- var is a string referring to a parameter of Spell. subindex is optional; used when the variable you are |
|---|
| 397 | setting has sub indexes. value is what you want to set it to. Returns true on success, false on failure. |
|---|
| 398 | Spell:GetVar(var [,subindex]) +- See above, but returns the value on success or nil on failure. |
|---|
| 399 | Spell:ResetVar(var) +- Resets the specified var to the DBC original. Returns true on success, false on failure. |
|---|
| 400 | Spell:ResetAllVars() +- Resets all of Spell's vars to the DBC originals. Returns true on success, false on failure. |
|---|
| 401 | |
|---|
| 402 | :QUERYRESULT |
|---|
| 403 | QResult:GetColumn(colNum) +- Returns a field object (see below) based on the column number given, errors if colNum is greater than max columns |
|---|
| 404 | e.x Usage: |
|---|
| 405 | local qres = WorldDBQuery(...) |
|---|
| 406 | local field = qres:GetColumn(0) |
|---|
| 407 | print(field:GetString()) |
|---|
| 408 | QResult:NextRow() +- Makes QResult fetch the next row of the result set. Returns true on success, false otherwise. |
|---|
| 409 | QResult:GetColumnCount() +- Returns the number of columns in QResult. |
|---|
| 410 | QResult:GetRowCount() +- Returns the number of rows in QResult. |
|---|
| 411 | |
|---|
| 412 | :FIELD |
|---|
| 413 | Field:GetString() +- Returns the cstring data that this field holds. |
|---|
| 414 | Field:GetByte() +- Returns the signed byte that this field holds |
|---|
| 415 | Field:GetUByte() +- Returns the unsigned byte that this field holds. |
|---|
| 416 | Field:GetBool() +- Returns the boolean that this field holds. |
|---|
| 417 | Field:GetShort() +- Returns the signed short that this field holds. |
|---|
| 418 | Field:GetUShort() +- Returns the unsigned short that this field holds. |
|---|
| 419 | Field:GetLong() +- Returns the signed long that this field holds. |
|---|
| 420 | Field:GetULong() +- Returns the unsigned long that this field holds. |
|---|
| 421 | Field:GetGUID() +- Returns the guid number that this field holds. |
|---|