Traditional Culture Encyclopedia - Weather inquiry - WOW macro command syntax

WOW macro command syntax

I believe many people know the slash "/" and emoticon commands in WOW. Macros can connect these commands in series according to their own settings of conditions. For example: /Kneel is an action that makes you kneel down. /say is the most basic dialogue action

We now use a macro to string them together:

The content of the first line: "/Kneel"

The second Line content: "/say if you don't marry me, then I will never get up..."

In this way, your character will kneel down first and then say: "If you don't marry me, then I I will never get up..."

Macros can apply all the slash "/" and emoticon commands that have been defined in WOW. What's more terrible is that macros can even apply the character's magic and skills,

You only need to use the "/cast" command during the macro definition process. The following are some commonly used commands:

/Assist This is a command to assist the attack when your team is facing the same attack. When dealing with several enemies, just click on your teammates (usually the warriors in the team), and then use this command, and your target will become the target selected by the warrior.

< p>/Cast This is a command to use skills. When you enter /Cast the skill name (skill level) in the macro command or just hold down Shift and click the icon of the skill you want to enter. For example, when you are a Warrior, when you want to make a macro that uses Battle Shout, you can enter /Cast Battle Shout (Rank 1) or directly hold down Shift and click on the icon of the Battle Shout skill. Of course, you can enter several on different lines of a macro. skills, then when you use this macro, several skills will be released together, and you no longer need to press several keys at the same time like an octopus.

The %t symbol may appear frequently. In your macro command, it is a code that represents the name of the person you are currently selecting. For example, you write this sentence in the macro (note: add a space after it.) "/g %t, the weather is really nice today. , are you interested in going up the mountain to pick mushrooms with me..."

If you click on a player named Benben, then when you click this macro, you will say: "Benben, The weather is really nice today, are you interested in going up the mountain to pick mushrooms with me..."

/Target This is a command to automatically select a target. You can enter /Target (xxx) in the macro, then when you press When you download this macro, you will automatically select the target called xxx.

/in This is a delay command, the time is in seconds. At the same time, it does not support attack commands. Format: /in 3. dance dance in three seconds, such as /in 3 dance, dance in 3 seconds,

/say start!

/in 3 say 3s later

/in 6 say 6s later

Two: Advanced Tutorial

Some useful Macros

1. Allows you to switch between windowed and full-screen states

/script SetCVar("gxWindow", 1 - GetCVar("gxWindow"));

/console gxRestart

< p>2. For mages, you must have: Replace "X" with your current Polymorph level (the same below); use it to replace the Polymorph skill. Using it when you are outside the party will result in a "You are not in the party." message, but when in the party other companions will know the target of your Polymorph spell.

/p Sheeping >>> %t<<<

/cast Polymorph (Rank X)

3. As a warlock, this is the macro to use in a team: first change the target to the drag monster or the target that the tank is attacking, then order the pet to attack forward, followed by a Weakening Curse.

/assist The name of the attacker or tank in the team

/script PetAttack();

/cast Curse of Weakness (Rank X)

p>

4. Switch weapons on the body from backpacks and bags

/script if ( not CursorHasItem() ) then PickupContainerItem(, );

PickupInventoryItem( ); end

bag# - which bag of items to use (0, 1, 2, 3, 4.

0 is the backpack)

slot# - the position in the bag (from 0 to the upper left)

equip# - 16 is the main weapon, 17 is the secondary weapon

5. This macro heals the person you specify in the party, if you are not in the party it will heal yourself. The target will then automatically switch back to your last enemy. It also uses team chat to remind teammates who you're healing.

/script if (UnitName("target") ~=nil and UnitIsFriend("player","target")) then

CastSpellByName("Heal(Rank X)") SendChatMessage("Incoming Heal to %T", "Party") else

TargetUnit("player") CastSpellByName("Heal(Rank X)") TargetLastEnemy(); end

6. Accelerate task display speed

/script QUEST_DEscriptION_GRADIENT_CPS = 600000

/script RegisterForSave("QUEST_DEscriptION_GRADIENT_CPS")

/script DEFAULT_CHAT_FRAME:AddMessage("quest text will scroll faster now");

7. Eliminate time waiting to accept a task

/script AcceptQuest()

8. This macro can automatically escort players on the road to complete tasks.

/assist [player name]

/cast spell (Rank X)

/target [player name]

/follow [ player name]

9. Switch between primary and secondary weapons, see article 4 for details

/script PickupInventoryItem(16); PickupInventoryItem(17);

10. Add buff magic or healing to yourself when there is no target or the target is an enemy.

CastSpellByName("Spell Name(Rank X)");

if ((SpellIsTargeting()) and (not UnitIsFriend("player","target")))

p>

then

SpellTargetUnit("player");

end;

TargetLastEnemy();

11. Switch between two-handed weapons and one-handed + shield or two-handed weapons

/script PickupInventoryItem(17);if(CursorHasItem()) then PickupContainerItem

(4,2);PickupContainerItem(4 ,1);PickupInventoryItem(16);else PickupContainerItem

(4,1);PickupInventoryItem(16);PickupContainerItem(4,2);PickupInventoryItem(17);end

12 . Set "real mouse field of view"

/script CameraOrSelectOrMoveStart(arg1);

Enter again if you want to cancel.

13.

Switch the short-range skill bar and the long-range skill bar

/script CURRENT_ACTIONBAR_PAGE = 2;

/script ChangeActionBarPage();

/cast aspectofmonkey (just use the left click)

/script CURRENT_ACTIONBAR_PAGE = 1;

/script ChangeActionBarPage();

/cast aspectofhawk (just use the left click)

< p>14. The priest can increase the health of his teammates with one click. For example, the No. 1 key can increase the health of the first teammate, and the No. 2 key can increase the health of the second teammate. This eliminates the need to use the mouse to determine the target. And so on, from the first person to the last one

Add health to teammate 1:

/script TargetUnit(GetPartyMember(1))

CastSpellByName(Heal (Rank p>

Increase health to teammate 3:

/script TargetUnit(GetPartyMember(3)) CastSpellByName(Heal(Rank X)) TargetLastEnemy()

15. One-click solution to feed pets: This macro will take out food from the first position in the leftmost bag to feed pets. If there is no food in that position, it will automatically open the bag.

/script if (not PlayerFrame.inCombat) then if (not GetContainerItemLink(4, 1)) then

OpenBag(4); else CastSpellByName("Feed Pet"); PickupContainerItem (4, 1); end end

16. Warlock Macro

1) If the target's life is greater than 20, release the life extraction spell, otherwise use soul extraction.

/script if (UnitHealth("target")>20) then CastSpellByName("Drain Life(Rank X)") else

CastSpellByName("Drain Soul(Rank 2)" ) end;

2) Curse of Weakness version

/script if (UnitMana("target")>0) then CastSpellByName("Curse of Tongues(Rank X)") else < /p>

CastSpellByName("Curse of Weakness(Rank X)") end;

17. Heal yourself first, and then automatically select the last enemy

/target Pugar //Choose yourself, assuming your name is Pugar

/cast Lesser Heal (Rank 1) //Cast Lesser Heal rank1

/script TargetLastEnemy(); //Reselect The enemy just selected

/script AttackTarget(); //Attack, equivalent to right-clicking the enemy

18. A very useful macro for a warlock: first change the target to a drag monster hand or the target the tank is attacking, and then orders the pet to attack forward

, followed by a Weakening Curse.

/assist The name of the attacker or tank in the team

/script PetAttack();

/cast Curse of Weakness (Rank X)

p>

19. After the treatment is completed, remind others that you may be hit by monsters. If you don’t add a delay, this effect will be lost.

/p healing %T, need 3s, don"t run away

/cast heal (rank 1)

/in 4 p cured %T 300HP ,please notice the enemies turn on me^_^

20. Automatically escort friends to complete tasks on the road

/assist [player name]

/cast. Spells (Rank You can check the macro function library in these two places:

] /index.php/World_of_Warcraft_API

The use of the function is relatively simple, and it is easier for those who have learned programming to get started. Basic The usage is to add /script before the function. For example,

/script CURRENT_ACTIONBAR_PAGE = X;

/script ChangeActionBarPage();

is your shortcut. Turn the column to page X.

There are many functions in the function library that are very useful and convenient, such as opening all bags at once:

/script OpenAllBags();

Coordinated closing Bag functions and macros that close all bags at once can also be implemented:

/script CloseBag(0);

/script CloseBag(1);

/script CloseBag(2);

/script CloseBag(3);

/script CloseBag(4);

How about next time you sell something You won’t be opening and closing packages one by one, right?

Using functions is not the scariest thing. The scary thing is that WOW's macros can be judged using conditions. Take a look at the following two:

/script if ( GetComboPoints() >= 3 ) then CastSpellByName("Rip(Rank 2)"); else if (

UnitMana("player") >= 40 ) then CastSpellByName("Rake(Rank 1)"); end end

p>

It is said that this macro containing if and then can allow thieves to automatically use skills based on combo points (not tested). It also uses the call of the character's MANA value. Isn't it scary? There is also this macro for finding spells:

function GetSpellIdByItsName(myWantedSpell, myWantedRank)

local spellId = 1;

local spellBook = "spell";

p>

local spellName, rankName;

spellName, rankName = GetSpellName(spellId, spellBook);

while (spellName ) do

if ( ( spellName == myWantedSpell ) and ( ( not myWantedRank ) or ( rankName = myWantedRank

) ) ) then return spellId; end

spellName, rankName = GetSpellName(spellId, spellBook); < /p>

end

return -1;

end

You can define functions yourself, and also use loops such as while and do. Didn’t it make you think of N possible applications?

Unfortunately, there seems to be no official delay macro currently, so it is impossible to use multiple delayed skills in combat (skills without delay can be used at the same time), similar to The function of changing other weapons - using skills or spells - changing weapons back cannot be realized.

(The so-called using macros to realize that the Sword and Shield Warrior changes the two-handed weapon MS and then changes it back is not feasible), but using COSMOS Friends can use /in to delay non-combat commands. For example,

/in 3 say hi will say hi after 3 seconds.

/in 6 /script MoveForwardStart(arg1);

It will run forward after 6 seconds.

Although spells and skills cannot be delayed using the /in command, this is already very powerful. For example, you can program macros for various movements, such as turning around, etc. It is estimated to be essential in PVP.

The following is a macro written by a player for a soldier with two-handed weapons to automatically escape:

/script UseContainerItem(0, 2);ActionButtonDown(11);ActionButtonUp(11);ActionButtonDown

/script p>

(12);ActionButtonUp(12);

/cast Thunder Clap(Rank 1);

/script TurnLeftStart(arg1);

/in 1 /script TurnLeftStop(arg1);ToggleAutoRun();

Conditions for using this macro: Put the recovery medicine in the second space of the big bag, and the 11th and 12th shortcut bars are one order respectively. A quick way to hold a shield in hand.

After using this macro, the character automatically drinks the healing potion, equips the shield, uses Thunder Clap (these three actions are performed at the same time), turns 180 degrees backward, and then turns on the automatic running button to escape. Among them, skills and so on can be modified according to needs. How about it, isn’t it an exaggeration, haha.

There are also some useful macros:

Switch equipment,

Two hands to switch to one hand and change the second shortcut bar, shortcut bars 11 and 12 respectively. It is a shortcut for one hand and one shield

/script ActionButtonDown(11);ActionButtonUp(11);ActionButtonDown(12);ActionButtonUp(12);

/script CURRENT_ACTIONBAR_PAGE = 2 ;

/script ChangeActionBarPage();

Switch between two hands with one hand and switch back to the first shortcut bar. Shortcut bar 12 is a shortcut for weapons in both hands

/ script ActionButtonDown(12);ActionButtonUp(12);

/script CURRENT_ACTIONBAR_PAGE = 1;

/script ChangeActionBarPage();

The following is another article< /p>

Author: Return to Honor

Source: 17173

Macros are only an auxiliary means. I hope that through the following explanation, everyone can easily edit their own macros .

Let’s first look at the structure of the macro:

/script

if (UnitHealthMax(target)>80)

then

CastSpellByName(''Fireball (Level 4)'')

SendChatMessage(''Cast Fireball on %T'', ''EMOTE'')

else

CastSpellByName(''Arcane Missile (Level 2)'')

SendChatMessage(''Use Arcane Missile on %T'', ''EMOTE'') < /p>

This is a macro without delay function. The macro with delay function will be explained later.

The first sentence /script declares the beginning of the function. This sentence is required. The Chinese meaning of the entire macro is

If the health value of the target you selected is greater than 80, perform a level 4 fireball and inform the people around you that you used this action on the target.

< p>%t represents the target. Otherwise, level 2 missiles will be executed to inform people around you that you used this action on the target.

It is worth noting that for example, the EMOTE in SendChatMessage(''Use fireball on %T'', ''EMOTE'') will change if you switch to party

It is only within the team visible.

The function used in this example:

UnitHealthMax(target) returns the target health value

Similarly, this example does not need to be judged, just do it

/script

CastSpellByName(''Fireball (Level 4)'')

SendChatMessage(''Cast Fireball on %T'', ''EMOTE'') < /p>

Note that this article focuses on introducing ideas!

The following are some commonly used macros

MoveBackwardStart moves backward, and is written as MoveBackwardStart(). Note that the ; sign after each sentence is not necessary, it is mainly a habit.

MoveBackwardStop Stop moving backward

StrafeLeftStart Move left

StrafeLeftStop Stop moving left

StrafeRightStart Move right

StrafeRightStop Stop moving right

ToggleAutoRun Run forward

TurnLeftStart Turn left

TurnLeftStop Stop turning left

TurnRightStart Turn right

p>

TurnRightStop Stop turning right

jump() jump