新手求助 改了个戒律牧的 但是只能奶自己 怎么回事呢
--判断是否在团队中if GetNumRaidMembers()>0 then
--在团队里获得掉血玩家
grouptype="raid";
local RaidDX = BeeGroupMinScript('BeeRange(unit)<=40 and BeeUnitHealth(unit,"%")<100 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)
--有掉血玩家
if RaidDX
then
if BeeUnitHealth(RaidDX,"%")<20 and BeeSpellCoolDown("绝望祷言")==0 and BeeIsRun("绝望祷言",RaidDX)
then
BeeRun("绝望祷言",RaidDX);
return;
end;
if BeeUnitHealth(RaidDX,"%")<=100 and BeeIsRun("真言术:盾",RaidDX) and BeeUnitBuff("虚弱灵魂",RaidDX)<1
then
BeeRun("真言术:盾",RaidDX);
return;
end;
if BeeSpellCoolDown("苦修")==0 and BeeUnitHealth(RaidDX,"%")<80 and BeeIsRun("苦修",RaidDX)
then
BeeRun("苦修",RaidDX);
return;
elseif BeeUnitHealth(RaidDX,"%")<95 and BeeIsRun("快速治疗",RaidDX)
then
BeeRun("快速治疗",RaidDX);
return;
end;
return;
end;
else
--在小队里
grouptype="party";
--获得掉血玩家
local partyDX = BeeGroupMinScript('BeeRange(unit)<=40 and BeeUnitHealth(unit,"%")<100 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)
--有掉血玩家
if partyDX
then
if BeeUnitHealth(partyDX,"%")<20 and BeeSpellCoolDown("绝望祷言")==0 and BeeIsRun("绝望祷言",partyDX)
then
BeeRun("绝望祷言",partyDX);
return;
end;
if BeeUnitHealth(partyDX,"%")<=100 and BeeIsRun("真言术:盾",partyDX) and BeeUnitBuff("虚弱灵魂",partyDX)<1
then
BeeRun("真言术:盾",partyDX);
return;
elseif BeeUnitHealth(partyDX,"%")<80 and BeeSpellCoolDown("苦修")==0 and BeeIsRun("苦修",partyDX)
then
BeeRun("苦修",partyDX);
return;
end;
if BeeUnitHealth(partyDX,"%")<60 and BeeIsRun("强效治疗术",partyDX)
then
BeeRun("强效治疗术",partyDX);
return;
elseif BeeUnitHealth(partyDX,"%")<95 and BeeIsRun("快速治疗",partyDX)
then
BeeRun("快速治疗",partyDX);
return;
end;
return;
end;
return;
end;
新人不懂,是不是第一步获取掉血玩家时错了,只能获取到自己,所以只奶自己。
我觉得问题应该还是出在这一行吧
local RaidDX = BeeGroupMinScript('BeeRange(unit)<=40 and BeeUnitHealth(unit,"%")<100 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)
UnitCanAssist("player",unit)这里是不是可以把player删除只留unit 复制全了么?{:5_251:} 前边是不是少什么东西了 语法错误写代码的时候别乱用return
页:
[1]