鉴于最近在使用多玩宏碰到了很多判断上的问题,所以不得已只好自己用官方的API写。以下是练技能宏,直接修改要练的技能名即可。有蓝职业蓝少于200可以自动打坐。
/script
player=GetClientPlayer()
function GetCDTime(skillId)
bOnCD,currentCDTime,totalCDTime=player.GetSkillCDProgress(skillId,player.GetSkillLevel(skillId))
return currentCDTime/16 end
function IsSkillOK(skillId) return
GetCDTime(skillId)==0 end
function GetSkillIdByName(szSkillName) for k,v in
pairs(player.GetAllSkillList()) do if Table_GetSkillName(k,v)==szSkillName then
return k end end return -1 end
function CastSkillIfReady(skillId)
if(IsSkillOK(skillId)) then OnAddOnUseSkill(skillId) end end
function
CastSkills(skillNames) for i,v in ipairs(skillNames) do
CastSkillIfReady(GetSkillIdByName(v)) end end
function
CancelBuffById(buffId) for i,v in ipairs(player.GetBuffList()) do
if(v.dwID==buffId) then player.CancelBuff(v.nIndex) end end end
if(player.nCurrentMana<200) then
if(player.bFightState) then
player.StopCurrentAction() else OnAddOnUseSkill(17) end
else
if(player.nCurrentMana==player.nMaxMana) then
CancelBuffById(103) end
if(player.nMoveState==MOVE_STATE.ON_STAND)
then
local
skillNames={"春泥护花","芙蓉并蒂","傍花随柳","玉石俱焚","兰摧玉折","清心静气"}
CastSkills(skillNames)
end
end