现在已经有了一个组队的相互操作角本,不过据说只是在美F和欧F可以用,因为需要打魔法的名称,这个CNWOW里面是不同的,也许汉化过之后就可以了,HUHU,我会尽快练个魔法辅助职业测试一下看.
下面是它的代码 下载可以到http://www.curse-gaming.com/mod.php?addid=463
回头我们慢慢分析,HUHU
WhisperCast_Version = 2.1
— Recode by Sarris of Blackhand, originally by Valconeye
— Original BestBuff by Gello
BINDING_HEADER_WHISPERCAST="WhisperCast";
BINDING_NAME_WHISPERCAST="Cast";
BINDING_NAME_WHISPERCAST_SHOW="Show/Hide Gui";
local CHAT_RED = "|cFFFF0000"
local CHAT_GREEN = "|cFF00FF00"
local CHAT_END = "|r"
— main spell queue
WhisperCast = { min=1, next=1, n=0 };
— saved variable
WhisperCast_Profile = {}
— loaded with current players spells
WhisperCast_Spells = nil;
— unit names of people in my current group/raid
WhisperCast_Group = {}
local WhisperCast_defaultProfile = {
[‘profileversion’] = 1,
[‘enable’] = 1,
[‘minimize’] = 0,
[‘failures’] = 4, — failures before a spell is dequeued
[‘failuregracetime’] = 1, — second between counted failures
[‘grouponly’] = 1,
[‘restrictcombat’] = 1,
[‘mainalpha’] = 1,
[‘backalpha’] = 0.6,
[‘match’] = "start",
};
WhisperCast_SpellLibrary = {
— Priest Buffs
PRIEST = {
["Power Word: Fortitude"] = {
trigger = { "fort", "fortitude", "stam", "stamina" },
level = 1,
rank = { 1, 12, 24, 36, 48, 60 } },
["Prayer of Fortitude"] = {
trigger = { "group fort", "group fortitude", "group stam", "group stamina" },
level = 48,
rank = { 48, 60 } },
["Shadow Protection"] = {
trigger = { "shadow" },
level = 30,
rank = { 30, 42, 56 } },
["Divine Spirit"] = {
trigger = { "spirit" },
level = 40,
rank = { 40, 42, 54 } },
["Power Word: Shield"] = {
trigger = { "shield" },
level = 6,
rank = { 6, 12, 18, 24, 30, 36, 42, 48, 54, 60 },
combat = true },
["Dispel Magic"] = {
trigger = { "dispel" },
level = 18,
rank = { 18 —[[only use rank 1, 36]] },
combat = true },
["Abolish Disease"] = {
trigger = { "disease" },
level = 24,
combat = true },
["Fear Ward"] = {
trigger = { "fear", "ward" },
level = 20,
combat = true },
},
— Mage Buff
MAGE = {
["Arcane Intellect"] = {
trigger = { "ai", "int" },
level = 1,
rank = { 1, 14, 28, 42, 56 } },
["Arcane Brilliance"] = {
trigger = { "group ai", "group int", "brilliance" },
level = 46,
rank = { 46 } },
["Dampen Magic"] = {
trigger = { "dampen" },
level = 12,
rank = { 12, 24, 36, 48, 60 } },
["Amplify Magic"] = {
trigger = { "amplify" },
level = 18,
rank = { 18, 30, 42, 54 } },
["Remove Lesser Curse"] = {
trigger = { "curse" },
level = 16,
combat = true },
},
— Druid buffs
DRUID = {
["Mark of the Wild"] = {
trigger = { "mark", "motw" },
level = 1,
rank = { 1, 10, 20, 30, 40, 50, 60 } },
["Gift of the Wild"] = {
trigger = { "gift", "group mark", "gotw" },
level = 50,
rank = { 50, 60 } },
["Thorns"] = {
trigger = { "thorns" },
level = 6,
rank = { 6, 14, 24, 34, 44, 54 } },
["Remove Curse"] = {
trigger = { "curse" },
level = 22,
combat = true },
["Abolish Poison"] = {
trigger = { "disease" },
level = 26,
combat = true },
},
— Paladin buffs
PALADIN = {
["Blessing of Might"] = {
trigger = { "might" },
level = 4,
rank = { 4, 12, 22, 32, 42, 52 } },
["Blessing of Wisdom"] = {
trigger = { "wisdom" },
level = 14,
rank = { 14, 24, 34, 44, 54 },
combat = true },
["Blessing of Freedom"] = {
trigger = { "freedom" },
level = 18 },
["Blessing of Light"] = {
trigger = { "light" },
level = 40,
rank = { 40, 50, 60 } },
["Blessing of Sacrifice"] = {
trigger = { "sacrifice" },
level = 46,
rank = { 46, 54 } },
["Blessing of Kings"] = {
trigger = { "kings" },
level = 40 },
["Blessing of Salvation"] = {
trigger = { "salvation" },
level = 26 },
["Blessing of Sanctuary"] = {
trigger = { "sanctuary" },
level = 10,
rank = { 10, 30, 40, 50, 60 } },
["Cleanse"] = {
trigger = { "cleanse", "dispel" },
level = 32,
combat = true },
["Purify"] = {
trigger = { "purify", "poison", "disease" },
level = 18,
combat = true },
},
SHAMAN = {
["Cure Poison"] = {
trigger = { "poison" },
level = { 26 },
combat = true },
["Cure Disease"] = {
trigger = { "disease" },
level = { 40 },
combat = true },
},
};
— chat frame where queue messages go
local WhisperCast_messages = DEFAULT_CHAT_FRAME;
— keep track of if we are in combat
local WhisperCast_playerInCombat = false
local function WhisperCast_getQueueTextColor(cast)
if ( WhisperCast_Profile.restrictcombat == 1 and
WhisperCast_playerInCombat and
not WhisperCast_Spells[cast["spell"]].combat ) then
return "|cFF909090","|r", false;
else
if ( cast["fail"] ) then
return "|cFF00FF00","|r|cFFFF0000 (fail "..cast["fail"]..")|r", true;
else
return "|cFF00FF00","|r",true;
end
end
end
未完