返回列表 發帖

[遊戲資訊] 常用巨集指令

1.Action Functions (快捷鍵)
GetActionCooldown(slot) - This returns the cooldown values of the specified action..
取得快捷鍵冷卻時間
GetActionCount(slot) - Get the count (bandage/potion/etc) for an action, returns 0 if none or not applicable.
取得快捷鍵數量(如繃帶數量,藥劑數量等..)
GetActionText(slot) - Get the text label (macros, etc) for an action, returns nil if none.
取得快捷鍵名稱
GetActionTexture(slot) - Gets the texture path for the specified action.
取得快捷鍵名稱(ICON)
IsActionInRange(slot) - Test if an action is in range (1=yes, 0=no, nil=not applicable).
判斷快捷鍵技能在範圍內
IsAttackAction(slot) - Return 1 if an action is an 'attack' action (flashes during combat), nil otherwise.
判斷快捷鍵攻擊
IsAutoRepeatAction(slot) - Return 1 if an action is auto-repeating, nil otherwise
判斷快捷鍵自動重覆
IsUsableAction(slot) - Return 1 if an action can be used at present, nil otherwise.
判斷快捷鍵可使用
IsConsumableAction(slot) - Return 1 if an action is consumable (i.e. has a count), nil otherwise.
判斷快捷鍵是消耗品
IsEquippedAction(slot) - Return 1 if an action is equipped (i.e. connected to an item that must be equipped), nil otherwise.
判斷快捷鍵裝備中
UseAction(slot, {checkCursor {,onSelf} } - This instructs the interface to use the action associated with the specified ID, optionally on the player (regardless of target).
使用快捷鍵

2.Activity Functions (動作)
AttackTarget() - Attacks the targetted unit.
攻擊目標

3.Buff/Debuff Functions (增/損益)
UnitBuff("unit", index [, showCastable]) - Retrieves info about a buff of a certain unit.
單位增益效果(回傳值是增益效果ICON名(英文字串))同樣ICON時,名稱一樣!!
UnitDebuff("unit", index [, showDispellable]) - Retrieves info about a debuff of a certain unit.
單位非增益效果(回傳值有2個,第1個是損益效果ICON名(英文字串),第2個是同一損益效果的累加數目)

4.Communication Functions (會話)
SendChatMessage(text,{,type} {,language} {,targetPlayer}) - Sends a chat message.
傳送訊息

5.Container/Bag Functions (容器/背包)
PickupContainerItem(index,slot)
拾起(點選)背包物品
PutItemInBag(inventoryId)
物品放入背包
UseContainerItem(bag,slot) - Uses an item located in bag# and slot#.
使用背包物品

6.Cursor Functions (游標功能)
AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
自動裝備游標上物品
CursorHasItem() - Returns true if the cursor currently holds an item
判斷游標是否有物品
EquipCursorItem(x)
裝備游標上物品到X
PickupContainerItem(index,slot)
拾起(點選)背包物品
PickupInventoryItem(index)
拾起(點選)裝備(X)物品
PutItemInBag(inventoryId)
物品放入背包
UseInventoryItem(slot) - Use an item in a specific inventory slot.
使用裝備(X)的物品
GetAuctionItemLink("type", index) - Returns a link string for the specified auction item.
取得物品連結
GetZoneText() - Returns the zone text (e.g. "Stormwind City").
取得目前所在地區名稱

7.Pet Functions (寵物功能)
CastPetAction(index) - Cast the corresponding pet skill.
施放寵物快捷鍵(X)
GetPetActionCooldown(index) - Returns cooldown information for the pet action at the specificed pet action bar slot.
取得寵物快捷鍵冷卻時間
GetPetActionsUsable() - Returns a value indicating if the player's pet's actions can be used at this time.
取得寵物快捷鍵使用情況
GetPetHappiness() - Returns the pet's happiness, damage percentage, and loyalty gain rate.
取得寵物快樂度(3==125%;2==100%;1==75%)
PetAggressiveMode() - Set your pet in aggressive mode.
寵物攻擊模式
PetDefensiveMode() - Set your pet in defensive mode.
寵物防禦模式
PetPassiveMode() - Set your pet into passive mode.
寵物被動模式
PetAttack() - Instruct your pet to attack your target.
寵物攻擊目標
IsPetAttackActive() - Returns true if the pet is currently attacking.
判斷寵物是否在攻擊
PetStopAttack() - Stop the attack of the pet.
寵物停止攻擊
PetFollow() - Instruct your pet to follow you.
指示寵物跟隨
PetWait() - Instruct your pet to remain still.
指示寵物等待


8.Spell Functions (技能)
CastSpell(spellID, "bookType") - Cast the specified spell by ID. spellbookTab is "spell" or "pet".
施放技能(技能ID,技能書)技能書:spell(玩家)或pet(寵物)
CastSpellByName("name") - Cast the specified spell by display name. *UPDATE* - Works! - (6/14/05 by nubious)
施放技能(技能名稱)
GetShapeshiftFormInfo(index) - Retrieves information about an available ShapeshiftForm or Stance.
取得目前姿態資訊(例如:戰士戰姿=1;戰士防姿=2;戰士狂姿=3)
GetSpellCooldown(spellID, "bookType") - ?.
取得技能冷卻時間
GetTrackingTexture() - Return the texture of the current tracking buff, if one is active.
取得目前雷達ICON名稱
IsCurrentCast(id, "bookType")
判斷目前是否使用某技能(ID)
GetSpellTexture(spellID, "bookType")
取得技能ICON名稱

spell awaiting target:指目前已施放技能,但技能在準備選擇施法對象

SpellCanTargetUnit("unit") - Returns true if the spell awaiting target selection can be cast on the specified unit.
判斷目前施放的技能可施放在選定的目標上;(使用說明:先施法,但未選定對象時使用)
SpellIsTargeting() - Returns true if a spell has been cast and is awaiting target selection.
判斷目前有技能準備施放(游標選擇對象)
SpellStopCasting() - Stops the current spellcast.
停止目前施法技能
SpellStopTargeting() - Cancels the spell awaiting target selection.
取消目前施法的對象
SpellTargetUnit("unit") - Casts the spell awaiting target selection on the specified unit.
施放技能到指定單位

9.字串:
format(formatstring{,value,...}) - Return a formatted string using values passed in.
格式: EX: t=string;i=1; format("This is a test %s %d",t,i)==>This is a test string 1
strfind(string,pattern{,init{,plain}}) - Look for match of pattern in string, optionally from specific location or using plain substring.
判斷字串是否有某特定字串
tonumber - Return a number if string is a valid number, or return nil.
變為數字
tostring - Convert a number to a string.
變為字串

10.Unit Functions(單位)
AssistUnit("unit") - Instructs your character to assist the specified unit.
協助攻擊,指定單位
CheckInteractDistance("unit",distIndex)
檢查指定單位是否在某個距離之內(28碼=4,5碼=1)
TargetUnit("unit") - Target the unit.
指定目標
UnitAffectingCombat("unit") - Determine if the unit is in combat or has aggro. (returns nil if "false" and 1 if "true")
判斷目標在戰鬥中
UnitBuff("unit", index) - Retrieves info about a buff of a certain unit.
取得特定目標增益效果
UnitCanAssist("unit", "otherUnit") - Returns true if the first unit can assist the second, false otherwise.
判斷特定單位可協助攻擊
UnitCanAttack("unit", "otherUnit") - Returns true if the first unit can attack the second, false otherwise.
判斷特定單位可以攻擊
UnitClass("unit") - Returns the class name of the specified unit (e.g., "Warrior" or "Shaman").
取得特定單位的類別
UnitClassification("unit") - Returns the classification of the specified unit (e.g., "elite" or "worldboss").
取得特定單位的級別(精英或BOSS或一般)
UnitDebuff("unit", index) - Retrieves info about a debuff of a certain unit.
取得特定單位損益效果
UnitExists("unit") - Returns true if the specified unit exists, false otherwise.
取得特定單位是否有目標
UnitHealth("unit") - Returns the current health, in points, of the specified unit.
取得特定單位的血量(非隊友時,以百分比來表示,隊友或自己則以實際血量表示)
UnitHealthMax("unit") - Returns the maximum health, in points, of the specified unit.
取得特定單位的最大血量(非隊友時,以百分比來表示,隊友或自己則以實際血量表示)
UnitMana("unit") - Returns the current mana (or energy,rage,etc), in points, of the specified unit.
取得特定單位MP(非隊友時,以百分比來表示,隊友或自己則以實際MP表示)(戰士:表怒氣;盜賊:表精力;法師:表魔力)
UnitManaMax("unit") - Returns the maximum mana (or energy,rage,etc), in points, of the specified unit.
取得特定單位最大MP(非隊友時,以百分比來表示,隊友或自己則以實際MP表示)
UnitInParty("unit") - Returns true if the unit is a member of your party.
特定單位是否在隊伍中
UnitInRaid("unit") - Returns true if the specified unit is in your raid, false otherwise.
特定單位是否在團隊中
UnitIsCharmed("unit") - Returns true if the specified unit is charmed, false otherwise.
特定單位是否被被迷住
UnitIsEnemy("unit", "otherUnit") - Returns true if the specified units are enemies, false otherwise.
特定單位是否是敵人
UnitIsFriend("unit", "otherUnit") - Returns true if the specified units are friends (PC of same faction or friendly NPC), false otherwise.
特定單位是否是友軍
UnitLevel("unit") - Returns the level of a unit.
取得特定單位等級
UnitName("unit") - Returns the name of a unit.
取得特定單位名稱

感謝大大分享

TOP

感謝大大分享~~~~

TOP

返回列表 回復 發帖
論 壇 聲 明 本討論區是以即時上載留言的方式運作,本站對所有留言的真實性、完整性及立場等,不負任何法律責任。而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性。由於討論區是受到「即時留言」運作方式所規限,故不能完全監察所有即時留言,若讀者發現有留言出現問題,請聯絡我們。本站有權刪除任何留言及拒絕任何人士留言,同時亦有不刪除留言的權利。切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。本網站保留一切法律權利。