金戈铁马动物园吧 关注:81贴子:4,854
  • 3回复贴,共1

【新年砸罐子宏】

只看楼主收藏回复

/script
bZiDongZa = bZiDongZa or false
bZiDongZa2 = bZiDongZa2 or false
if not bZiDongZa then
Output("自动砸开启\n")
bZiDongZa = true
else
Output("自动砸关闭\n")
bZiDongZa = false
end
if not bZiDongZa2 then
RegisterEvent("NPC_ENTER_SCENE", function()
if not bZiDongZa then return end
bZiDongZa2 = true
if GetNpc(arg0).szName == "年兽陶罐" and GetCharacterDistance(GetClientPlayer().dwID,arg0) / 64 <= 4 then
SetTarget(3,arg0)
local dwID , Type = Target_GetTargetData()
if(GetNpc(dwID).szName == "年兽陶罐") then
OnUseItem(1,1)
end
end
frame_CloseMessageBox("PlayerMessageBoxCommon")
end)
end
function frame_CloseMessageBox(szName)
local frame = Station.Lookup("Topmost/MB_" .. szName)
if frame then
local btn = frame:Lookup("Wnd_All/Btn_Option1")
if btn and btn:IsEnabled() then
btn.fnAction(1)
CloseMessageBox(szName)
end
end
end


1楼2014-01-21 08:54回复


    2楼2014-01-21 09:52
    回复
      特别声明:请把小锤子放在背包第一行第二个位置


      3楼2014-01-21 10:49
      收起回复