/script y0n=y0n or falseif not y0n thenOutputMessage("MSG_SYS","自动选<乾坤剑意>开启。\n")y0n=trueelseOutputMessage("MSG_SYS","自动选<乾坤剑意>关闭。\n")y0n=falseendrOnce=rOnceif not rOnce thenJ_NpcList = {}RegisterEvent("NPC_ENTER_SCENE",function()local tar=GetNpc(arg0)if tar.szName=="乾坤剑意" thenJ_NpcList[arg0] = tarendend)RegisterEvent("NPC_LEAVE_SCENE",function()J_NpcList[arg0] = nilend)RegisterEvent("RENDER_FRAME_UPDATE",function()if not y0n then return endlocal player = GetClientPlayer()local tar = GetTargetHandle(player.GetTarget())for tid,ttar in pairs(J_NpcList) doif ttar and ttar.nCurrentLife > 0 and (not tar or tar.nCurrentLife < 1 or tar.szName ~= ttar.szName) thenSetTarget(TARGET.NPC,tid)breakendendend)end