After playing the World of Warcraft for such a long time, we should say that his open programming interface, in order to better resist plug-ins, blizzard opened the World of Warcraft API, under the premise of being legal, players can develop plug-ins to facilitate user games (blizzard's idea is too good. With the method of water control by Dayu, it is necessary to avoid water blocking and guide him)
The following is what I found from other places, some of which are Chinese and some have not yet been translated:
Post address: http://baike.souyo.com/baike/j/ihi/ I /start/h/htm/jhjll-h-qjoiq-h.html
By the way, I am posting a map of Warcraft, this is to view the map of Google, do the giant: http://mapwow.com/
Data and argument types (data and parameter types)
The API uses special values for some function arguments, the commonly used types are:
-
Auctionsortid-an identifier for sorting columns in the auction house.
-
Auctiontypeid-an identifier specifying which type of auction to operate on.
-
Chattypeid-an identifier for the different chat destination types.
-
Inventoryslotname-names of inventory slots.
-
Lootruleid-an identifier for the different looting rule types.
-
Playername-the name of a player.
-
Unitid-an identifier which specifies one of the units the API may reference.
1. Send messages
1.1 sendchatmessage ("message", "system", "language", "channel ")
Purpose: Send a chat message.
Parameters:
"Message": the message to be sent.
"System": the type of the chat message to be sent. If it is omitted, it can be "say". You can use:
"Say": Say
"Whisper": secret language. The name of the secret language object must be specified in the "channel" parameter. It can be used with the unitname ("unit") function.
"Channel": channel. The channel number must be specified in the "channel" parameter. If this parameter is omitted, it is "Comprehensive"
"Guild": trade unions
"Party": Team
"Raid": Group
"Yell": shouting
"Language": the language in use. It can be omitted if "channel" is not specified.
Common: "common" and "orcish". You can use "common" and "orcish" in cwow ". You can also specify other languages used in WoW. accurate language names can be obtained using the getdefaultlanguage ("unit") function.
The language specified by the parameter "language" takes effect only for the sender. The recipient will receive the message in its default language.
1.2 getdefaultlanguage ("unit ")
Purpose: return the default language used by the Unit specified by the parameter "unit ".
2. Character operations
2.1 strfind ("string", "pattern ")
Purpose: Search for the character (string) "pattern" in the string "string"
Returned value: If 2 values are found, the start position and end position are returned. If no value is found, Nil is returned.
2.2 format ("formatstring", value ,...,...)
Purpose: use value ,...,... The provided value creates a string in the format specified by formatstring.
Common formats in "formatstring:
% S: String
% D: integer
% F: Floating Point Number
3. Friend/shield
3.1 addfriend ("name ")
Purpose: Add players with specified names to the friend list.
Parameters:
"Name": name of the player, which can be obtained using the unitname ("unit") function.
3.2 addignore ("name ")
Purpose: Add players with specified names to the shield list.
3.3 delignore ("name ")
Purpose: Remove players with specified names from the shield list.
3.4 addordelignore ("name ")
Purpose: Switch the blocked status of the player with the specified name.
4. Team up
4.1 invitetoparty ("unit ")
Purpose: Invite the unit specified by the parameter "unit" to join the team.
4.2 invitebyname ("name ")
Purpose: Invite players with specified names to join the team.
4.3 uninvitefromparty ("unit ")
Purpose: remove the unit specified by the unit parameter from the team.
4.4 uninvitebyname ("name ")
Purpose: Kick players with specified names out of the team.
4.5 leaveparty ()
Role: Leave the team
4.6 unitinparty ("unit ")
Purpose: Determine whether the unit specified by the parameter "unit" is in the same team as the player.
4.7 getnumpartymembers ()
Purpose: return the number of teammates except players.
4.8 getnumraidmembers ()
Purpose: return the number of friends, including players. If no group is set, return 0.
4.9 getpartymember (N)
Purpose: return the name of the specified teammate.
Returned value: if the specified teammate does not exist, Nil is returned.
5. map location
5.1 getzonetext ()
Purpose: return the region name.
5.2 getsubzonetext ()
Purpose: return the partition name. If the player is not in a shard, a null value (not a nil value) is returned)
5.3 getminimapzonetext ()
Purpose: return the region name displayed on the small map. If the player is in a shard, it is equivalent to the getsubzonetext () function. If the player is not in a shard, it is equivalent to the getzonetext () function ()
5.4 setmaptocurrentzone ()
Purpose: set the world map to the region where the player is located.
5.5 setmapzoom (continent)
Purpose: set the world map to the mainland region specified by the continent parameter.
Parameter continent:
0: the whole world
1: kalimdo
2: Eastern kingdom
5.6 getplayermapposition ("unit ")
Purpose: return the coordinates of the unit specified by the "unit" parameter in the current map.
Parameters:
"Unit": "Player", "partyn", and "target" are available "." Target can only be used in friendly units.
Return Value: If available, two values are returned, X axis and Y axis. The return value is between 0 and 0 ~ 1. Otherwise, 0 is returned.
6. Items
6.1 pickupcontaineritem (bag, slot)
Purpose: left-click the bucket, and select the bucket in the backpack specified by the bag parameter or the bucket specified by the slot parameter.
Parameters:
Bag: ID of the backpack, 0 ~ 4. from right to left
0: rightmost backpack (16-pack at birth)
4: left-side backpack (Hunter's arrow bag and bullet bag)
Slot: ID of the backpack lattice, 1 ~ 16, from left to right, from top to bottom
1: Top, left, and grid
2: Top, left, and 2 Grids
6.2 pickupinventoryitem (ID)
Purpose: left-click the character attribute window. The parameter ID specifies the device grid.
Parameters:
ID: Number of the device Lattice
1: Header
2: Neck
3: Shoulder
4: shirt
5: chest
6: Belt
7: Leg
8: Foot
9: wrist
10: glove
11: Finger 1
12: Finger 2
13: jewelry 1
14: Jewelry 2
15: Back
16: Master
17: Deputy
18: remote weapons
6.3 usecontaineritem (bag, slot)
Purpose: Right-click the bucket, and select the bucket in the backpack specified by the bag parameter and the bucket specified by the slot parameter.
6.4 cursorhasitem ()
Purpose: Determine whether the pointer currently holds an item.
6.5 offhandhasweapon ()
Role: Determine whether the deputy is equipped with items
6.6 autoequipcursoritem ();
Purpose: automatically configure the pointer to the items currently held
6.7 deletecursoritem ()
Purpose: destroy the items currently held by the pointer.
6.8 getcontaineritemlink (bag, slot)
Purpose: return the link of the items in the backpack specified by the bag parameter and in the specified slot.
6.9 getcontaineriteminfo (bag, slot)
Purpose: return the information of items in the backpack specified by the bag parameter and in the specified slot.
6.10 isbagopen (BAG)
Purpose: Determine whether the specified backpack of the bag parameter is enabled.
6.11 togglebag (BAG)
Purpose: enable/disable the backpack specified by the bag Parameter
6.12 closebag (BAG)
Purpose: Disable the backpack specified by the bag parameter.
6.13 openbag (BAG)
Purpose: Open the backpack specified by the bag parameter.
6.14 closeallbags ()
Purpose: Disable all backpacks.
6.15 openallbags ()
Purpose: open/close all backpacks
7. Exercise
7.1 moveforwardstart ()
Purpose: move forward. It can only be stopped by the moveforwardstop () function.
7.2 moveforwardstop ()
Purpose: Stop moving forward
7.3 movebackwardstart ()
Role: Move backward
7.4 movebackwardstop ()
Purpose: Stop moving backward.
7.5 strafeleftstart ()
Role: Move left
7.6 strafeleftstop ()
Purpose: Stop moving to the left
7.7 straferightstart ()
Purpose: Move to the right
7.8 straferightstop ()
Purpose: Stop moving to the right
7.9 turnleftstart ()
Role: Turn left
7.10 turnleftstop ()
Purpose: Stop the left turn
7.11 turnrightstart ()
Purpose: rotate to the right
7.12 turnrightstop ()
Purpose: Stop turning to the right
7.13 toggleautorun ()
Purpose: enable or disable the automatic running status.
7.14 jump ()
Purpose: Skip
8. Target Selection
8.1 cleartarget ()
Purpose: Clear the selected targets.
8.2 targetunit ("unit ")
Purpose: Specify the unit as the current target.
8.3 targetbyname ("name ")
Purpose: select the player with the specified name as the current target.
8.4 targetlastenemy ()
Purpose: select the previous selected enemy as the current target.
8.5 targetlasttarget ()
Purpose: select the previously selected target as the current target.
8.6.1 targetnearestfriend ()
Purpose: The nearest friend unit is the current target.
8.6.2 targetnearestpartymember ()
Purpose: select the nearest teammate as the current target.
8.6.3 targetnearestraidmember ()
Purpose: select the nearest group member as the current target.
8.7 targetnearestenemy ()
Purpose: select the nearest enemy as the current target.
Parameter: targetnearestenemy (1): select in reverse order
8.8 second unit ("unit ")
Purpose: Select the "unit" parameter to specify the current target of the unit as its current target.
8.9 bytes byname ("name ")
Purpose: select the current target of the specified name player as the current target.
9. Target nature status
9.1 unitaffectingcombat ("unit ")
Purpose: Determine whether the unit specified by the unit parameter is in the combat status.
9.2.1 unitbuff ("unit", index)
Purpose: return the buff information of the unit specified by the parameter "unit" and the serial number specified by the index parameter.
Returned value: If the unit does not contain the Buff of the sequence number, Nil is returned. If yes, information about the buff is returned.
9.2.2 unitdebuff ("unit", index)
Purpose: return the debuff information of the specified unit and the specified sequence number of the index parameter.
9.3 unitexists ("unit ")
Purpose: Determine whether the unit specified by the "unit" parameter exists.
9.4 unitisplayer ("unit ")
Purpose: Determine whether the unit specified by the parameter "unit" is a player.
9.5.1 unitisunit ("unit", "otherunit ")
Purpose: Determine whether two units are the same.
9.5.2 unitisenemy ("unit", "otherunit ")
Role: Determine whether two units are hostile
9.5.3 unitisfriend ("unit", "otherunit ")
Purpose: Determine whether two units are friendly
9.6.1 unitinparty ("unit ")
Purpose: Determine whether the unit specified by the parameter "unit" is a teammate.
9.6.2 unitinraid ("unit ")
Purpose: Determine whether the unit specified by the parameter "unit" is a group member.
9.7.1 unitcanattack ("unit", "otherunit ")
Purpose: Determine whether the unit specified by the parameter "unit" can attack the unit specified by the parameter "otherunit ".
9.7.2 unitcanassist ("unit", "otherunit ")
Purpose: Determine whether the unit specified by the parameter "unit" supports the unit specified by the parameter "otherunit ".
9.7.3 unitcancooperate ("unit", "otherunit ")
Purpose: Determine whether the unit specified by the parameter "unit" can cooperate with the unit specified by the parameter "otherunit ".
9.8 unitname ("unit ")
Purpose: return the unit name.
Parameters:
"Unit": Specifies the unit, which can be:
"Player": players themselves
"Pet": the player's pet
"Party1", "party2", "party3", "party4": teammates from 1 to 4
"Partypet1 "~ "Partypet4": pets from teammates 1 to 4
"Raidn": n (1 ~ 40) tuanyou
"Raidpetn": n (1 ~ 40) group member's pet
"Target": the currently selected target. You can add "target" as the suffix directly after all "unit" types.
9.9 unitclassification ("unit ")
Purpose: return the "unit" parameter to specify the unit rating (elite, rare, common)
9.10.1 unitcreaturetype ("unit ")
Purpose: return the "unit" parameter to specify the species of a unit (beast ,......)
9.10.2 unitcreaturefamily ("unit ")
Purpose: return the unit parameter to specify the species of the unit (crab, Wolf, bear ,......)
9.11 unitclass ("unit ")
Purpose: return the parameter "unit" to specify the occupation (war, animal husbandry, law,…) of the unit ,......)
9.12.1 unitfactiongroup ("unit ")
Purpose: return the "unit" parameter to specify the group (Alliance and tribe) of the organization)
9.12.2 UNITRACE ("unit ")
Purpose: return the unit parameter to specify the unit race (human, Orc ,......)
9.13 unitsex
Purpose: return the unit parameter to specify the gender of the unit.
9.14 unitlevel ("unit ")
Purpose: return the "unit" parameter to specify the level of the unit.
Returned value: If the level is unknown (skeleton),-1 is returned.
9.15.1 unitmana ("unit ")
Purpose: return the current Mana (energy, anger) value of the unit specified by the "unit" parameter.
Returned value: the number of current points in the Mana (energy, anger) Value
9.15.2 unitmanamax ("unit ")
Purpose: return the "unit" parameter to specify the maximum mana (energy, anger) value of the unit.
Returned value: the maximum number of points in the Mana (energy, anger) Value
9.16.1 unithealth ("unit ")
Purpose: return the current life value of the unit specified by the "unit" parameter.
Return Value: returns the current number of points in the life value, but returns the current percentage of the life value (0 ~ 100)
9.16.2 unithealthmax ("unit ")
Purpose: return the maximum life value of the unit specified by the "unit" parameter.
Return Value: returns the maximum number of points of life. However, for "target", 100 is returned.
10. Attack/follow
10.1 attacktarget ()
Purpose: enable/disable the automatic Attack Status
10.2 petattack ()
Role: Command pet attack
10.3 followunit ("unit ")
Purpose: Follow the unit parameter.
10.4 followbyname ("name ")
Role: players who follow the specified name
11. spells
11.1 castspellbyname ("spellname (rank X )")
Purpose: cast a spell with a specified name.
11.2 castspell (spellid, spellbooktabnum)
Purpose: cast the spell at the specified position in the spell book tag specified by spellbooktabnum and the parameter spellid.
11.3 getspellcooldown (spellid, spellbooktabnum)
Purpose: return the cool-down information of the specified spell.
Return Value: two values are returned: the cool-down start time and the cool-down period. If no cool-down occurs, 0 is returned.
11.4 spellistargeting ()
Purpose: judge whether a spell is being cast and wait for the target to be selected
11.5 spellcantargetunit ("unit ")
Purpose: Determine whether the target-waiting spell can be cast to the unit specified by the parameter "unit ".
11.6 spelltargetunit ("unit ")
Purpose: cast a spell waiting for the target to be selected to the unit specified by the parameter "unit ".
11.7 spellstopcasting ()
Purpose: stop the current cast.
12. Action bar and action-related
12.1 changeactionbarpage ()
Purpose: Switch the action bar to the set value of the system global variable current_actionbar_page.
12.2 useaction (actionslot)
Purpose: Execute the action associated with the action slot specified by the actionslot parameter.
Actionslot: 1 ~ 72, 1st of the 1st actions are 1, 12th is 12, 2nd of the 1st actions are 13, 12th is 24 ,......, 6th of the 1st actions are 61 and 12th are 72. 3rd action bar is the action bar on the right, 4th action bar is the action bar on the right, 5th action bar is the action bar on the right at the bottom, and 6th Action bar is the action bar on the left at the bottom.
12.3 getactioncooldown (actionslot)
Purpose: return the cool-down information of the specified action.
Return Value: two values are returned: the cool-down start time and the cool-down period. If no cool-down occurs, 0 is returned.
12.4 getactioncount (actionslot)
Purpose: return the available quantity of the specified action (bandage, potion, etc.)
13. Pets
13.1 petattack ()
Role: Pet attack
13.2 petfollow ()
Role: Pet follow
13.3 petwait ()
Role: Pet waiting
13.4 petdismiss ()
Role: disband pets
13.5 castpetaction (petactionid)
Purpose: cast the pet skill with the specified serial number of the petactionid parameter.
13.6 getpetactioncooldown (petactionid)
Purpose: return the cool-down information of the specified pet skill.
Return Value: two values are returned: the cool-down start time and the cool-down period. If no cool-down occurs, 0 is returned.
13.7 petaggressivemode ()
Role: Set pets to Aggressive Mode
13.8 petdefensivemode ()
Role: Set pets as defense Modes
13.9 petpassivemode ()
Role: Set pets to passive mode
14. Others
14.1 gettime ()
Function: returns the internal time of the current game, in seconds.
14.2 random (lower, upper)
Purpose: return a random number.
Return Value: random number. If there is no parameter, the value is in the [0, 1) interval. If n is provided for a single parameter, the return value is in the [1, N] interval. If the two parameters lower and upper are provided, the return value is in the [lower, upper] interval.
14.3 closemerchant ()
Purpose: Close the merchant window.
14.4 getcombopoints ()
Function: returns the number of consecutive attacks.
14.5 logout ()
Purpose: log out
14.6 quit ()
Purpose: Exit
To be continued