
无名转火乾坤剑意
/script y0n=y0n or false
if not y0n then
OutputMessage("MSG_SYS","自动选<乾坤剑意>开启。\n")
y0n=true
else
OutputMessage("MSG_SYS","自动选<乾坤剑意>关闭。\n")
y0n=false
end
rOnce=rOnce
if not rOnce then
J_NpcList = {}
RegisterEvent("NPC_ENTER_SCENE",function()
local tar=GetNpc(arg0)
if tar.szName=="乾坤剑意" then
J_NpcList[arg0] = tar
end
end)
RegisterEvent("NPC_LEAVE_SCENE",function()
J_NpcList[arg0] = nil
end)
RegisterEvent("RENDER_FRAME_UPDATE",function()
if not y0n then return end
local player = GetClientPlayer()
local tar = GetTargetHandle(player.GetTarget())
for tid,ttar in pairs(J_NpcList) do
if ttar and ttar.nCurrentLife > 0 and (not tar or tar.nCurrentLife < 1 or tar.szName ~= ttar.szName) then
SetTarget(TARGET.NPC,tid)
break
end
end
end)
end
/script y0n=y0n or false
if not y0n then
OutputMessage("MSG_SYS","自动选<乾坤剑意>开启。\n")
y0n=true
else
OutputMessage("MSG_SYS","自动选<乾坤剑意>关闭。\n")
y0n=false
end
rOnce=rOnce
if not rOnce then
J_NpcList = {}
RegisterEvent("NPC_ENTER_SCENE",function()
local tar=GetNpc(arg0)
if tar.szName=="乾坤剑意" then
J_NpcList[arg0] = tar
end
end)
RegisterEvent("NPC_LEAVE_SCENE",function()
J_NpcList[arg0] = nil
end)
RegisterEvent("RENDER_FRAME_UPDATE",function()
if not y0n then return end
local player = GetClientPlayer()
local tar = GetTargetHandle(player.GetTarget())
for tid,ttar in pairs(J_NpcList) do
if ttar and ttar.nCurrentLife > 0 and (not tar or tar.nCurrentLife < 1 or tar.szName ~= ttar.szName) then
SetTarget(TARGET.NPC,tid)
break
end
end
end)
end
