找回密碼
 註冊
搜索
查看: 11560|回復: 3

Macro巨集使用教學

[複製鏈接]
發表於 2005-9-19 09:56:06 | 顯示全部樓層 |閱讀模式
一些有用的 Macro

  1。允許你在窗口和全屏狀態之間切換

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

  2。對於法師,必須要有的:將「X」換為你目前的變形術等級(下同);用它替換掉變形術技能。當你在隊伍之外時使用它會得到「你不在隊伍中。」的信息,但在隊伍中的時候其它同伴會瞭解到你將釋放的變形術目標。

  /p Sheeping >>> %t <<<
  /cast Polymorph (Rank X)

  3。作為一個術士,這是在隊伍中使用的宏:首先將目標轉為拖怪手或者坦克正在攻擊的目標,然後命令寵物向前攻擊,跟著一個虛弱詛咒。

  /assist 隊伍中的拖怪手或者坦克的名字
  /script PetAttack();
  /cast Curse of Weakness (Rank X)

  4。從背包和袋子裡切換身上的武器

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

  PickupInventoryItem( ); end

  bag# - 使用哪一個袋子的物品(0、1、2、3、4。0是背包)

  slot# - 袋子裡的位置(從0至左上)

  equip# - 16 是主要武器, 17 是副武器

  5。這個宏治療隊伍裡你指定的人,如果你不在隊伍中它會治療你自己。然後會自動將目標切換回你最後一個敵人。它同時還會使用隊聊提醒隊友你會治療哪一個人。

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

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

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

  6。加速任務顯示速度

  /script QUEST_DEscriptION_GRADIENT_CPS = 600000
  /script RegisterForSave("QUEST_DEscriptION_GRADIENT_CPS")
  /script DEFAULT_CHAT_FRAME:AddMessage("quest text will scroll faster now");

  7。消除等待接受任務的時間

  /script AcceptQuest()

  8。這個宏可以在路上自動護送玩家做任務。

  /assist [player name]
  /cast 法術(Rank X)
  /target [player name]
  /follow [player name]

  9。切換主副武器,詳情看第四條

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

  10。在沒有目標或者目標是敵人的時候給自己加增益魔法或治療。


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

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

  then

  SpellTargetUnit("player");

  end;

  TargetLastEnemy();

  11。切換雙手武器與單手+盾或者雙手揮舞武器

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

  (4,2)ickupContainerItem(4,1)ickupInventoryItem(16);else PickupContainerItem

  (4,1)ickupInventoryItem(16)ickupContainerItem(4,2)ickupInventoryItem(17);end

  12。設定「真實鼠標視野」

  /script CameraOrSelectOrMoveStart(arg1);

  想取消就再次輸入。

  13。切換近程技能欄和遠程技能欄

  /script CURRENT_ACTIONBAR_PAGE = 2;
  /script ChangeActionBarPage();
  /cast aspectofmon key (just use the left click)

  /script CURRENT_ACTIONBAR_PAGE = 1;
  /script ChangeActionBarPage();
  /cast aspectofhawk (just use the left click)

  14。牧師對隊友的一鍵加血,比如一號鍵給第一隊友加血,二號鍵給第二隊友加血,免除了還要鼠標確

  定目標的操作。依次類推,從第一個人到最後一個

  給隊友1加血:
  /script TargetUnit(GetPartyMember(1))
  CastSpellByName(Heal(Rank X)) TargetLastEnemy()

  給隊友2加血:
  /script TargetUnit(GetPartyMember(2)) CastSpellByName(Heal(Rank X)) TargetLastEnemy()

  給隊友3加血:
  /script TargetUnit(GetPartyMember(3)) CastSpellByName(Heal(Rank X)) TargetLastEnemy()

  15。一鍵解決餵養寵物:這個宏會從最左邊的袋子裡的第一個位置拿出食物餵養寵物,如果所在的位置

  沒有食物,它會自動打開袋子。

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

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

  16。術士宏

  1)如果目標生命大於20,釋放抽取生命法術,否則使用靈魂抽取。
  /script if (UnitHealth("target")>20) then CastSpellByName("Drain Life(Rank X)") else

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

  2)虛弱詛咒版本
  /script if (UnitMana("target")>0) then CastSpellByName("Curse of Tongues(Rank X)") else

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


  17.先治療自己,然後自動選中上次的敵人
  /target Pugar //選擇自己,假設自己的名字是Pugar
  /cast Lesser Heal (Rank 1) //施展次級治療rank1
  /script TargetLastEnemy(); //重新選擇剛剛選擇的敵人
  /script AttackTarget(); //攻擊,等同於右鍵點擊敵人


  18.對於一個術士很有用的宏:首先將目標轉為拖怪手或者坦克正在攻擊的目標,然後命令寵物向前攻擊

  ,跟著一個虛弱詛咒。
  /assist 隊伍中的拖怪手或者坦克的名字
  /script PetAttack();
  /cast Curse of Weakness (Rank X)

  19.等治療完之後提醒別人注意下自己有可能被怪打,不加延時的話,就沒這個效果了。
  /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.在路上自動護送朋友做任務。

  /assist [player name]
  /cast 法術(Rank X)
  /target [player name]
  /follow [player name]
 樓主| 發表於 2005-9-19 10:10:14 | 顯示全部樓層
1.什麼是宏命令?
  玩過EQ的都知道一點宏的知識,比如組隊時用來告訴隊友你的行動,告訴目標等。最簡單的比如puller 常用的: /v %t過來了,大家集中火力。 法師常用的: /v 我要催眠%t,大家不要打醒他 這些宏個性鮮明,是EQ的一大樂趣之一。

  然而EQ畢竟是N年前的遊戲,宏也比較簡單,和它比起來。WOW的宏就複雜和強大的多了。它的函數就有上千種,如果都掌握,能實現許多匪夷所思的功能。

  一個宏可以完成一個相對比較複雜的命令.比如戰鬥中發佈命令,如果打字當然不算麻煩,但在戰鬥中卻很要命.浪費了時間和生命.一個簡單的宏便可以用一個鍵來完成這一切.

  2.宏命令的設置流程:
  首先,回車,再敲/MACRO。看見了吧?會彈出一個窗口,上面有New(新建宏命令)和Complete(完成宏命令)兩個按鍵。點New,又會彈出一個窗口,哇,花花綠綠的,裡面包括了WOW幾乎所有的技能圖標,隨你喜歡,隨便選一個!它就是你設置的宏命令的圖標了,給它取個名字吧!方便你用的時候好找。然後回到第一個窗口,在它上面有一個輸入菜單(別告訴我找不到…它可是佔了這個窗口的一半多…)在裡面輸入特定的內容,然後&#4067;過濾網址plete。接下來你要做的就是把這個代表你宏命令的圖標用鼠標左鍵拉到快捷欄裡,想怎麼用就怎麼用…

  3.下面就是怎樣設置宏的內容了,簡單的設置大家可以看我們網站上"基礎"篇的宏介紹.

  相信很多人都知道WOW中的斜槓"/"和表情命令.宏可以將這些命令按照自己對條件的設置串聯起來,比如:/Kneel是讓你跪下來的動作而/say就是最基礎的對話動作
  我們現在用一個宏把他們串起來:

  第一行內容:「/Kneel」
  第二行內容:「/say 如果你不嫁給我,那麼我就一輩子不起來…」 」
  這樣你的人物就會先下跪再說:"如果你不嫁給我,那麼我就一輩子不起來…"

  宏可以應用所有WOW中已經定義了的斜槓"/"和表情命令,更要命的是,宏甚至可以應用人物的魔法和技能,

  只需要在宏的定義過程中應用"/cast"命令,下面是已知的一些常用命令:

  /Assist 這是個援助進攻的命令。當你的隊伍同時面對幾個敵人時,只要點擊自己的隊友(一般是隊伍中的戰士),然後使用這個命令,你的目標就會變成戰士所選中的目標。大家集中火力消滅一個起!

  /Cast 這是個使用技能的命令。當你在宏命令裡輸入/Cast 技能名(技能等級)或者只要按住Shift同時用鼠標點擊一下你想要輸入的技能的圖標。例如當你是一個戰士,想製作一個使用戰鬥怒吼的宏時,你可以輸入/Cast Battle Shout(Rank 1)或者是直接按住Shift點擊Battle Shout這個技能的圖標。當然你可以在一個宏的不同行上輸入幾個技能,那麼當你使用這個宏時,幾個技能就會一起釋放出來,再用不著你像章魚一樣同時按下幾個鍵了 。

  %t 這個符號也許會經常出現在你的宏命令裡,它是一個代碼,代表你當前所選中的人名。例如,你在宏裡寫下這麼一句。(注意:後面要加一空格。) 「/g %t ,今天天氣真好,有沒興趣和我一起上山采蘑菇…」
  如果你點中一位名叫苯笨的玩家,那麼當你按下這個宏時,你就會說:「笨笨,今天天氣真好,有沒興趣和我一起上山采蘑菇…」

  /Target 這是一個自動選擇目標的命令,你可以在宏裡輸入/Target (xxx),那麼當你按下這個宏時,你將自動選定這個叫xxx的目標。

  /in 這是一個延時命令,時間以秒為單位.同時它不支持攻擊指令.格式:/in 3 dance 三秒後跳舞,如/in 3 dance,就是在3秒後跳舞,
  /say start!
  /in 3 say 3s later
  /in 6 say 6s later
回復

使用道具 舉報

 樓主| 發表於 2005-9-19 10:12:05 | 顯示全部樓層
World of Warcraft Macro Guide 1.0
  by Zekrynn, zekryn@yahoo.com



-----------------------------------------
Table of Contents
-----------------------------------------

    [1] Introduction
    [2] Updates
    [3] Basics
        3a. Target
        3b. Accept Quest
    [4] Combat
        4a. Attack
        4b. Assist
        4c. Magic/Skills
    [5] Bags
        5a. Understanding location
        5b. Putting location to use
        5c. Open/Close all your bags
    [6] Equip
        6a. Understanding location
        6b. Putting location to use
    [7] Pets
        7a. Pet Attack
        7b. Target Pet's Target
        7c. Feed Pet
        7d. Warlock cast fear, pet stops
    [8] Usefull Macros
        8a. Change your Macro Page
        8b. Feed your Pet with one click
        8c. Open/Close all your bags
        8d. Change 2 handed weapon with two 1 handers/sword+shield
    [9] Contact
   [10] Copyright




-----------------------------------------
  [1] Introduction
-----------------------------------------

        When I first started World Of Warcraft, I was disappointed when I
couldn't find a good macro guide online. To my knowlege, there isn't one
source with a lot of macro info. So this guide is based up off of the
little notes I got from many sources. I hope that this guide will be of
some use to those who need the help.
        Currently there isn't anything really big, just simple stuff.
Eventually i'll add more complex macros when I get the chance.





-----------------------------------------
  [2] Updates
-----------------------------------------

  [v1.0] 2/19/05 - Put together my basic notes in order for a FAQ.





-----------------------------------------
  [3] Basics
-----------------------------------------


  3a. Target


%t

If you're lazy and don't want to type "There's a so-and-so coming" or
someone in your party has a complicated name you cant type, like "???"
or something, you can use %t. When you send a message using %t, %t will
take the place of your target. So if you make a macro "Watch out! That %t
is near!" and you're targeting a bear, it'll apear as "Watch out! That bear
is near!". Likewise if you have ??? targeted, "/tell zekryn His name is %t"
will appear "To [Zekryn]: This name is ???".



  3b. Accept Quest


/script AcceptQuest()

If you don't like sitting and waiting for a quest giver to slowly tell you
about a quest, /script AcceptQuest() will automatically accept the quest
even if the giver still babbles on.


  3c. Magic/Skills

/cast Spell name()

Change "Spell name" for the spell, and you can put the rank in the ().
Also works for any skill. For example, we want to use Arcane Shot, rank 2
in the macro. Our macro would be: /cast Arcane Shot(Rank 2)




-----------------------------------------
  [4] Combat
-----------------------------------------

  4a. Attack

/script AttackTarget();

This will start attacking the target with your weapon. Alone, useless because
it works just like the basic attack skill, but it exist to use many commands
at once with use of macros.



  4b. Assist


/assist %t
/assist #####

These two are good if your a caster/ranger and stand in the back where your
tank's back completely covers the enemy. /assist %t will change the target from
the party member you're currently targeting to the mob they're fighting. The
second one, /assist #####, replace the ##### with the players name to target
the mob whoever you have listed for #####. You can put the tank's name there
so that you can automatically target whatever the tnak is fighting


/script TargetLastEnemy();

This is pretty handy for shamans/druids. If you heal someone and the mob
you where attacking is hidden in a crowd, use this and it'll auto-target
the last enemy you where fighting
       





-----------------------------------------
  [5] Bags
-----------------------------------------


  5a. Understanding location


First, let me explain how to figure the location of each of your items. Say
we have a potion in the bottom most right hand corner of your Green Sack.
Lets look down at our tool bar. After our Latency bar, we have 5 slots for
bags. The numbers go backwards:

|| [4] [3] [2] [1] [0]

As you can see, our Backpack is 0. It will always be 0, since you can't move it.
Now we see that our Backpack ID # is 0, Our Small Pouch is 1, Bag 2, Green Sack 3,
and our small quiver is 4. So, we know our potion is in the green bag. So for
location so far, we have (3,#). I said it's in the bottom most right hand corner,
so looking at our Green sack, we can see that is 10. Our potion's location is (3,10).


Bag 0                    Bag 1
O---- Backpack ----O    O--Small Pouch ----O
|                  |    |                  |
| [ 1][ 2][ 3][ 4] |    |         [ 1][ 2] |
| [ 5][ 6][ 7][ 8] |    | [ 3][ 4][ 5][ 6] |
| [ 9][10][11][12] |    O------------------O
| [13][14][15][16] |
O------------------O

Bag 2                     Bag 3

O--- Small Bag ----O    O--- Green Sack ---O
|                  |    |                  |
| [ 1][ 2][ 3][ 4] |    |         [ 1][ 2] |
| [ 5][ 6][ 7][ 8] |    | [ 3][ 4][ 5][ 6] |
O------------------O    | [ 7][ 8][ 9][10] |
                         O------------------O
Bag 4

O-- Small Quiver --O
|                  |
|         [ 1][ 2] |
| [ 3][ 4][ 5][ 6] |
O------------------O


  5b. Putting Location to Use


/script PickupContainerItem(#,#);

So you know how to find location, how can we use it? If you place our location of
our potion in /script PickupContainerItem(#,#);, then when we use this macro, our
potion then appears on our cusor.


  5c. Open/Close all your bags

/script ToggleBag(0);
/script ToggleBag(1);
/script ToggleBag(2);
/script ToggleBag(3);
/script ToggleBag(4);

This is a handy little macro. When you run this, it will open all your bags. If you
press it again, it'll close them all. Basically this just reverses what you have so
if you have bag 1 and 2 open, and 0, 3, and 4 close, using this macro will close 1
and 2, and open 0, 3 and 4.



-----------------------------------------
  [6] Equip
-----------------------------------------

  6a. Understanding location

Like bags, each spot in your equip window has a numbered location.


  ___
(   )=======Zekryn=========[x]      0. Ammo
|----------------------------|      1. Head
|----------------------------|      2. Neck
|[ 1] |                | [10]|      3. Shoulders
|[ 2] |                | [ 6]|      4. Shirt
|[ 3] |                | [ 7]|      5. Chest
|[15] |                | [ 8]|      6. Waist
|[ 5] |                | [11]|      7. Legs
|[ 4] |                | [12]|      8. Feet
|[19] |                | [13]|      9. Wrist
|[ 9] |                | [14]|     10. Hands
|     ------------------     |     11. Finger
|      [16][17][18]<-[0]     |     12. Finger
|----------------------------|     13. Trinket
   [~~~] [~~~] [~~~]                14. Trinket
                                    15. Back
                                    16. Main Hand
                                    17. Off Hand
                                    18. Ranged Weapon
                                    19. Tabard

  6b Putting Location to Use

/script PickupInventoryItem(#);

This is best paired with the bag use. The script above will equip
whatever is on your mouse to the item selected. For example we're
using a Sword and have an axe in our backpack (location 0,1).
Looking back, we can take:

/script PickupContainerItem(#,#); <- put in item location, 0,1
/script PickupInventoryItem(#);   <- put in equip location, 16


Now we have:
/script PickupContainerItem(0,1)
/script PickupInventoryItem(16);

Now when we press this macro, it'll replace our sword with the axe.
The sword will be placed where our axe was, so if we press it again,
our axe will be replaced with the sword!





-----------------------------------------
  [7] Pets
-----------------------------------------

  7a. Pet Attack

/script PetAttack();

I find this useful as a Hunter. I have this in a macro attached with
Concussive Shot so that when I use it, my pet attacks.


  7b. Target Pet's Target

/script TargetUnitsPet("layer");

This will simply target what your pet is targeting.




  7c. Feed Pet

/cast Feed Pet


This works just like the ability feed pet, but.. If you add Item Location..


/cast Feed Pet

/script PickupContainerItem (0,1)

This will automatically feed your pet the item in Backpack, slot 1. It's
very useful, as I dont have to search for the right food, then click my pet.



   7d. Warlock cast fear, pet stops.

/cast Fear(Rank #)
/script PetFollow();

I know it can be troublesome to cast fear and have your demon break it right
away. So, heres a simple macro to prevent it. Using this, you'll cast Fear
and your pet will turn and sit beside you.






-----------------------------------------
  [8] Useful Macros
-----------------------------------------

First and foremost, most of the macros came from here:
http://forums.worldofwarcraft.co ... T=2739&



  8a. Change your Macro page

/script CURRENT_ACTIONBAR_PAGE = X;
/script ChangeActionBarPage();

Change X to the Page.



  8b. Feed Pet

/cast Feed Pet


This works just like the ability feed pet, but.. If you add Item Location..


/cast Feed Pet

/script PickupContainerItem (0,1)

This will automatically feed your pet the item in Backpack, slot 1. It's
very useful, as I dont have to search for the right food, then click my pet.



  8c. Open/Close all your bags

/script ToggleBag(0);
/script ToggleBag(1);
/script ToggleBag(2);
/script ToggleBag(3);
/script ToggleBag(4);

This is a handy little macro. When you run this, it will open all your bags. If you
press it again, it'll close them all. Basically this just reverses what you have so
if you have bag 1 and 2 open, and 0, 3, and 4 close, using this macro will close 1
and 2, and open 0, 3 and 4.



  8d. Change 2 handers for 1hd+shield/2 1handers (By Darkhorn)

/script PickupInventoryItem(17);if(CursorHasItem()) then PickupContainerItem(4,2);
PickupContainerItem(4,1)ickupInventoryItem(16);else PickupContainerItem(4,1);
PickupInventoryItem(16)ickupContainerItem(4,2)ickupInventoryItem(17);end

this should be all one line.

Put your main hand item in left most bag upper left slot, offhand item to the right
of it. put your 2h weapon in your inventory. Now this button will swap the two sets
back and forth.



-----------------------------------------
  [9] Contact
-----------------------------------------
        If you find a problem with my macros, have an idea, or have a question
you can e-mail me at
Zekryn@yahoo.com. I'll try to help you to the best of my
abilities. I play on Gorefiend as a Troll Hunter, also by the name of Zekryn.



-----------------------------------------
  [10] Copyright
-----------------------------------------
Copyright 2005 by Zekryn, zekryn@yahoo.com

World of Warcraft copyright 2004 by Blizzard Entertainment.
http://www.blizzard.com/

This may be not be reproduced under any circumstances except for personal, private use.
It may not be placed on any web site other than GameFAQs.com or Gamerhelp.com or
otherwise distributed publicly without advance written permission. Use of this guide
on any other web site or as a part of any public display is strictly prohibited, and
a violation of copyright.

Reference: http://www.gamerhelp.com/pc/WorldofWarcraft/103000.shtml
回復

使用道具 舉報

 樓主| 發表於 2005-9-19 10:24:22 | 顯示全部樓層
簡而言之,巨集(marco)就是一個使用blizzard預先設置好的一系列命令或函數來實現一個有限的功能。
最強大的莫過於可以實現條件判斷。

********       **********         **************         *************

2.0.1 巨集是否合法?用巨集會被封號麼?

請注意2.0.0回答裡面紅色的部分,既然使用blizzard預先設置好的一系列命令或函數,哪還會不合法麼?

********       **********         **************         *************

2.0.2 巨集的運行機制是怎樣的

事實上,巨集裡面的所有語句都是在同一時間被當成是一個整體同時運行的,而不是一行接著一行像我們想像的那樣運行

其實世界上沒有一台電腦可以把所有代碼當作一個整體來執行即使看上去是那樣的,電腦都是按順序執行的。
上面的意思就是說巨集不會在等第一行執行完以後再去執行第二行,第二行和第三行之間也是一樣。中間是不停頓的,所以看上去就像被當作一個整體去執行。

********       **********         **************         *************

2.0.3 如何使得我的巨集施展出來的時候可以自動說對象的名字?

%t這個變量可以使得你的巨集說出你所選擇的對象的名字,比如

/說 你好啊,%t

當你選擇 夢幻飛天無敵小豬 這個玩家的時候,使用這個巨集結果就是

你說: 你好啊, 夢幻飛天無敵小豬

********       **********         **************         *************

2.0.4 巨集的數量有限制麼?

每個角色只能建立18個marco。而且就我所知不可以超過18。

********       **********         **************         *************

2.0.5 巨集裡面如何選定隊友,自己或者敵人?

巨集裡面每個角色都是有代號的,現列舉如下:

"player" 玩家自己
   
"pet"  玩家的寵物

"party1" 1號隊友

"party2" 2號隊友

......

"partypetN"  第N個隊友的寵物 (N 可以是 1,2,3, or 4) (1.5.0新加,國服暫時沒有)

"raidN" 第N個團隊夥伴 (N 可以是 1,2,3,...,40)

"raidpetN" 第N個團隊夥伴的寵物  (N 可以是 1,2,3,...,40)  (1.5.0新加,國服暫時沒有)

"target" 被選中的目標

"mouseover" 鼠標正在劃過或剛剛劃過的目標

下面的值只能用於一些特殊場合:
"npc" or "NPC"  玩家正在與之交互的NPC

比如說需要引用2號隊友的生命值,就用  UnitHealth("party2") 就可以了

********       **********         **************         *************

2.0.6 巨集的寫作有什麼格式?

你可以使用給定的命令去完成一個巨集,比如/說,/施放

這些都是有英文的,比如上面兩個,你可以寫成/say,/cast

有的可以簡寫成 /say 寫成 /s

當你要用到函數的時候(一般後面會有一個括號,比如UnitMana()),需要用 /script 開頭。

比如釋放一個技能,你可以寫成 /cast 真言術:盾(等級1) ; 也可以寫成 /script CastSpellByName("真言術:盾(等級1)")

********       **********         **************         *************
2.1~2.2 實際使用方面的疑難


2.1.0 我如何在一個巨集裡釋放法術?

使用 /施放  這個命令。 例如 /施放 恢復(等級1)

最簡單的在你的巨集裡面寫入正確技能的方法是,當你編輯一個巨集的時候打開你的 技能窗口,然後shift+左鍵點擊相應技能。這樣就會自動在宏編輯窗口裡面添加 /施放 你選擇的技能  

********       **********         **************         *************

2.1.1 我能否在一個巨集裡面使用很多技能?比如說(牧師為例)一個 MB,一個Pain,再來一個MF

不可以!原因是巨集是不可以延遲的!但是你施放一個法術以後再施放一個法術,你必須等待其間的公共冷卻時間(1.2秒~1.5秒)結束以後,才可以施展第二個法術。

不過你仍然可以做一些不需要等待的事情。比如,施放一個法術然後進行攻擊。或者使用物品(只要他們有獨立的冷卻時間)

不過你仍然不可以做兩個之間需要等待的動作!

當然你會說,如果我要使用的第一個技能是瞬法法術,沒有公共冷卻時間呢?
告訴你,結果是,仍然不可以!哈哈

附錄:
再擴展一點點

(1)會觸發公共冷卻時間的技能:
釋放一個法術或者技能

(2)不會觸發公共冷卻時間的技能:
在聊天窗口裡面說話
進入攻擊模式
命令你的寵物攻擊
使用一個物品

巨集只可以做第一個列表裡面的一件事,但是卻可以做很多第二個列表裡面的事情

2.2.4里面有關於這個問題更詳細的解釋

********       **********         **************         *************

2.1.2 我如何設定一個巨集或者一段腳本使得當我遇到什麼情況的時候自動施展技能?

你不可以!現在的wow裡沒有辦法自動施展法術或技能。你只能在觸發一個硬件事件(hardware event)的時候才可以施展一個技能,(比如說,鼠標鍵被按下或者鍵盤上某個按鍵被按下)。此外,這個hardware event必須觸發一個法術或者技能,否則也無法釋放。

你可以嘗試使用在一段時間以後使用CastSpellByName()去釋放法術,但是這個法術不會被釋放。

********       **********         **************         *************

2.1.3 我可以在一個巨集裡等待一小段時間然後再施展宏的剩餘部分麼?(以及對/in的解釋)

不可以,完全不可能。看看2.1.1的解釋。

附錄:

不過當你安裝cosmos(一個著名的國外UI)的時候,你倒是可以的,比如

/in 5
/說 你好,
/說 小豬!

在5秒之後你將會說「你好」。不過你會立刻說「小豬」。
/in 不是一個宏延遲指令,它只是簡單的讓你在一段時間之後再去施展一個技能。

不過很遺憾的是,你不可以用 /in 去釋放一個法術,施展一個技能,或者運行一個宏,這都歸咎於2.1.2里面所說的hardware event限定。所以,/in的功能是很有限的,你只能用它去說話,或者使用物品,僅此而已。

我不一開始就說這個命令的原因是因為99%的時候人們都想在宏裡來個暫停,以使得它們可以在同一個宏裡再釋放一個法術,或者換裝備然後再使用一個技能。即使用了cosmos的 /in 這些仍然是不可行的!

********       **********         **************         *************

2.1.4     我如何在巨集裡面使用一個急救繃帶?

你如果想給自己使用繃帶的話,不用編寫巨集,直接使用它或者拖進你的動作條裡面。

如果你想再做其他一些事情,以下是你所需要的代碼
/target 你的名字
/script UseContainerItem(Bag#, Item#);
/script TargetLastEnemy();


bag# (0-4):
是背包(Bag)的編號
背包欄從右到左依次是 4,3,2,1,0

Item# (1-16)
格子編號取決於你的包的大小,一般都是從左往右,從上往下(一行接一行) 比如
6格包
____1   2
3  4   5   6

16格包
1  2  3  4
5  6  7  8
9  ......

********       **********         **************         *************

2.1.5 我可以對我的隊友施展一個增益法術而且不失去我當前的目標麼?

可以,,,,

只需要簡單得這樣做:
/施放 真言術:盾(等級 1)
/target 隊友的名字

當你在沒有選定一個友方目標的時候就施展增益法術的時候,這個技能將會進入 選擇模式(注意光標的變化)

下一個選定的命令(/target)(不管是寫代碼或者按鍵)告訴這個技能施展在誰的身上。
但是不會改變你的目標!

用另外一種方法來實現:
/target 隊友的名字
/施放 真言術:盾(等級 1)
/script LastTarget()

會改變你的目標,進入自動攻擊模式而且會使得盜賊失去他們的技能點

********       **********         **************         *************

2.1.6 盜賊如何切換雙手武器,比如說從 匕首/匕首 切換到 劍/錘 ?

這裡是我的巨集(把手上的匕首/匕首 切換到 背包裡面的 劍/錘 )
當然,只要是單手武器都可以切換,僅僅是一個位置問題,我們所做的只是從一個地方拿起一個東西和另外一個未知的東西互換位置,而不管它的類型。

這裡要用到兩個命令:
1. PickupInventoryItem(xx) [從主手武器位置禍福手武器位置一個武器]

2. PickupContainerItem(x, y) [和上面不同之處在於是從背包裡面拿]

參數的解釋:
1. PickupInventoryItem(xx)
[x填寫16代表主手武器位置, 17代表副手武器位置]

2. PickupContainerItem(x, y)
[x 是背包編號。 y代表格子編號。通過寫入不同的x,y值,你可以表示不同的物品。]

具體位置和數字的關係請參見2.1.4的解釋


巨集:

/script PickupInventoryItem(16);
/script PickupContainerItem(0, 1);
/script PickupInventoryItem(17);
/script PickupContainerItem(0, 2);

Enjoy!(2.2.5有這個兩個函數使用的另外的一個例子)

********       **********         **************         *************

2.1.7 在一個巨集裡面如何使我的寵物攻擊選定的目標
請使用如下代碼:
/script PetAttack();

********       **********         **************         *************

2.1.8 我可以建立一個巨集以使用副手武器麼?

可以!

/script UseInventoryItem(GetInventorySlotInfo("SecondaryHandSlot"));

這段代碼將會激活你所裝備的副手武器

********       **********         **************         *************

2.1.9 如何在一個巨集裡選定隊友1或者隊友5

/target party1 將會選定1號隊友  party2將會選定2號隊友,一直到5
party1 就是隊友1個代號,可以用在其他任何你想要選中1號隊友的指令裡面

********       **********         **************         *************

2.2.1 如何在一個巨集裡面引用目標的各項屬性,比如說生命值,法力,性別,等級等等,,,

UnitHealth("unit")     目標生命值(HP)
UnitHealthMax("unit")  目標生命最大值
UnitMana("unit")       目標法力值(mana)
UnitSex("unit")    顯示目標的性別(Sex)
UnitLevel("unit")  顯示目標的等級(LV)

unit的值請參照2.0.4

其他更多的函數請參考http://www.wowwiki.com/World_of_Warcraft_API

********       **********         **************         *************

2.2.2 我如何協助我的寵物進行攻擊?

你可以寫一個這樣的巨集去協助你的寵物

/script AssistUnit("pet");

這個將會鎖定你的寵物正在鎖定的目標。如果你的寵物沒有鎖定任何目標,這個宏就會什麼也不做。
如果你的寵物死了,你將會受到這個信息「我需要一個目標」
我不喜歡聽電腦對我嘮叨這句話,所以一個稍微簡潔一點的宏是......

/script if UnitExists("pet") then AssistUnit("pet"); end

修正了上面那個缺點,當你使用宏的時候你的寵物已經死了,你也不會收到那條信息。

********       **********         **************         *************

2.2.3 如何協助我的隊友進行攻擊或者選中我自己?

/script AssistUnit("party2");

這將會協助隊伍裡的2號隊友進行攻擊。如果你不在隊伍裡面你將會受到一條消息「我需要一個目標」

/script AssistUnit("小豬");
這個marco將會協助一個叫做小豬的人進行攻擊,如果沒有 小豬 這個人,,,,,,

/script TargetUnit("player");
這個巨集會選擇你自己。當你想對自己施放某個法術的時候就會很有用。

********       **********         **************         *************

2.2.4 我可以用marco從A姿態切換到B姿態,使用B姿態的技能然後再返回A姿態麼?

絕對不可以!

已經說了很多次了,我再說一次!

「按一個鍵,使用一個技能」 這是一個雷打不動的規矩!
違反這個規矩就是外掛功能!
如果你被抓到違反規定,你就會被BAN ACC(封帳號)。
你的宏不工作是因為他根本不應該這樣做!
客戶端可以很好地制止一部分違反規定的行為。

cosmos提供的 /in 並沒有違反規定,因為它不能用於延時去釋放一個技能。

以戰士的3種姿態來說,姿態切換都是瞬發的,但是都有一個1秒的公共冷卻時間。
你不可以用1個鍵去觸發兩個技能。

2.1.1里面有關於這個問題更多的解釋

********       **********         **************         *************

2.2.5 如何切換身上的裝備?

我寫了一個marco使得我可以切換我的鞋子。
我有兩雙鞋子,一雙可以加快我的行走速度,一雙則用於戰鬥。

代碼是這樣的:

/script PickupInventoryItem(8);
/script PickupContainerItem(4,7);
/script UseContainerItem(4,13);

第一個命令,PickupInventoryItem(N),將會定位到你角色裝備欄裡某個需要切換裝備的地方(根據N的取值不同來實現指定不同的位置).而例子裡面所使用的8將會告訴電腦我要切換的是腳部的裝備.

第二行用到了PickupContainerItem()。這個激活了背包裡面所要切換的東西 (我的例子裡就是4,13這個地方的裝備) 這個例子裡面將會和宏裡面第一行PickupInevtoryItem(8) 所指定的裝備進行切換。
(背包的編號請參見2.1.4)

最後1句話使用了我背包裡(4,13)這個位置的一樣東西。(Camus註:這個人說是上馬)

一個宏就可以實現換鞋子然後上馬,不騎馬的時候使用一次,就會把鞋子切換回來。

一些注意事項:

(1)你必須把所要切換的東西很精確的放在背包的某個位置,而且不可以卻移動它,不然這個宏就不會執行。

(2)當你和一個賣東西的NPC說話的時候,你將會自動下馬,你將會穿著你的加速靴下馬。換句話說,當你再一次使用這個宏的時候,你將會穿著你的戰鬥用鞋上馬,不過並不像聽上去那麼糟,你可以再你上馬的時候再次使用這個宏,就切換回來了(因為你在上馬的時候不會上馬)或者你也可以在跑的時候使用一次這個宏,因為跑動的時候也不會上馬,你就又會回到一開頭的狀態了。

2.1.6有這兩個函數使用的一個例子。
Reference: http://game.177happy.com/bbs/dispbbs.asp?boardID=24&ID=41&page=1
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-4-30 10:30 , Processed in 0.019152 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表