各位大佬,请问这种魔改的私服,技能是带颜色的,如何设置时间到了就补这个BUFF。
用了这个补BUFF的函数没用呢,这个技能是私服自己魔改的,请问可以设置这个技能时间到了,自动补充吗,用ID最好,求大佬指导:
方法一、用技能名字无效。
if BeePlayerBuffTime("登神!战斗怒吼!")<=0 then
BeeRun("/cast 登神!战斗怒吼!")
end
方法二、用技能ID也无效。
if BeePlayerBuffTime("338020")<=0 then
BeeRun("/cast 338020")
end
大佬,我在魔蜂的WowBee.Function.lua文件中插入了您的代码:
function BeeBuffTime(ID)
local rt= -1
for i=1,40 do
name,rank,icon,count,dispelType,duration, expirationTime, source, isStealable,_,spellId=UnitBuff("player",i)
if ID==spellId then
rt=expirationTime-GetTime()
break
end
end
return rt end
但发现魔蜂没法点启动了捏。
然后函数是用下面这个吗?
if BeeBuffTime(338020)<0 then BeeRun(338020) end