LUACN论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
热搜: YJWOW MagicStone BoL
楼主: MTFX001

一个关于站桩大厨玩法

[复制链接]
 楼主| 发表于 2024-8-8 14:25:11 | 显示全部楼层
liubinbi2004 发表于 2024-8-8 02:04 PM
宏点了也没用 需要FS手动点交易 无法实现全自动 。。。。。

打开交易界面,单独使用的这个宏么?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-8-8 14:38:44 | 显示全部楼层
本帖最后由 MTFX001 于 2024-8-8 02:48 PM 编辑
liubinbi2004 发表于 2024-8-8 02:04 PM
宏点了也没用 需要FS手动点交易 无法实现全自动 。。。。。

把下面这个做成宏再试试
/script AcceptTrade();
/click StaticPopup1Button1
如果不能用,就不是代码和宏的问题了,如果宏能用,魔蜂却无法使用,就换个思路,把这个宏放到技能栏右下角最后一个位置,再把魔蜂代码中的
-- 接受交易
        BeeRun("/script AcceptTrade()", Unit)
-- 点击静态弹出框的第一个按钮
        BeeRun("/click StaticPopup1Button1", Unit)
换成
BeeRun("/click MultiBarBottomRightButton12")


很久前碰到过宏单独能用,放魔蜂里却用不了的情况
回复 支持 反对

使用道具 举报

发表于 2024-8-8 21:55:53 | 显示全部楼层
这个有点吊!!!!!!!!!!!
回复 支持 反对

使用道具 举报

发表于 2024-8-8 22:58:37 | 显示全部楼层
MTFX001 发表于 2024-8-8 02:38 PM
把下面这个做成宏再试试
/script AcceptTrade();
/click StaticPopup1Button1

/script AcceptTrade();
/click StaticPopup1Button1
这个宏手动点可以交易
下面的全删掉
-- 接受交易
        BeeRun("/script AcceptTrade()", Unit)
-- 点击静态弹出框的第一个按钮
        BeeRun("/click StaticPopup1Button1", Unit)
换成BeeRun("/click MultiBarBottomRightButton12")
放在技能栏12个就是最后位置 还是不能自动点交易
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-8-9 00:06:05 | 显示全部楼层
liubinbi2004 发表于 2024-8-8 10:58 PM
/script AcceptTrade();
/click StaticPopup1Button1
这个宏手动点可以交易

我去,这个就有点诡异了,/script AcceptTrade(); /click StaticPopup1Button1宏手动点击没有问题,但魔蜂中用BeeRun("/click MultiBarBottomRightButton12")调用这个宏所在按键却没有用,这~~我再研究下
回复 支持 反对

使用道具 举报

发表于 2024-8-9 09:39:04 | 显示全部楼层

评分

参与人数 1伸手费 -200 收起 理由
vshrd -200

查看全部评分

回复 支持 反对

使用道具 举报

发表于 2024-8-11 16:16:21 | 显示全部楼层
看看大佬发了什么好东西·看看大佬发了什么好东西·
回复 支持 反对

使用道具 举报

发表于 2024-8-13 16:10:10 | 显示全部楼层
思路挺好的,如果能加个付费交易的功能,岂不是可以赚点外快,哈哈
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-8-27 12:36:25 | 显示全部楼层
本帖最后由 MTFX001 于 2025-11-2 11:03 PM 编辑

这个是改进代码可以不用其他宏帮助!很方便

[Lua] 纯文本查看 复制代码
-- 完全静默版本 - 几乎无提示
local isDrinking = false
local lastActionTime = 0

local function IsEatingOrDrinking()
    local buffIndex = 1
    while true do
        local buffName = UnitBuff("player", buffIndex)
        if not buffName then break end
        if string.find(buffName, "进食") or string.find(buffName, "喝水") then
            return true
        end
        buffIndex = buffIndex + 1
    end
    return false
end

-- 自动交易功能
if TradeFrame:IsVisible() then
    BeeRun("/run for b=0,4 do for s=1,GetContainerNumSlots(b) do local l=GetContainerItemLink(b,s) if l and (string.find(l,'魔法冰川水') or string.find(l,'魔法羊角面包')) then UseContainerItem(b,s) end end end")
    TradeFrameTradeButton:Click()
    --BeeRun("/click TradeFrameTradeButton")
    --BeeRun("/script AcceptTrade()")
end

-- 自动离队功能
BeeRun("/run local w=GetItemCount('魔法冰川水')or 0 local f=GetItemCount('魔法羊角面包')or 0 if w==0 and f==0 and (GetNumPartyMembers()>0 or GetNumRaidMembers()>0) then LeaveParty() end")

local function Main()
    local currentTime = GetTime()
    if currentTime - lastActionTime < 1 then return end
    
    if IsEatingOrDrinking() then
        isDrinking = true
        return
    elseif isDrinking then
        isDrinking = false
        BeeRun("/stand")
        return
    end
    
    local manaPercentage = UnitMana("player") / UnitManaMax("player") * 100
    local waterCount = GetItemCount("魔法冰川水") or 0
    local gemCount = GetItemCount("法力刚玉") or 0
    
    if UnitCastingInfo("player") or UnitChannelInfo("player") then return end
    
    -- 蓝量管理
    if manaPercentage < 15 then
        if waterCount > 0 and not UnitAffectingCombat("player") then
            if GetUnitSpeed("player") > 0 then
                BeeRun("StrafeLeft")
                BeeRun("StrafeRight")
                return
            end
            BeeRun("/sit")
            BeeRun("/use 魔法冰川水")
            isDrinking = true
            return
        elseif BeeSpellCoolDown("唤醒") == 0 and not UnitAffectingCombat("player") then
            BeeRun("唤醒")
            return
        elseif gemCount > 0 then
            BeeRun("/use 法力刚玉")
            return
        end
    end
    
    -- 制造和造水造食
    if gemCount < 1 and BeeSpellCoolDown("制造法力宝石") == 0 then
        BeeRun("制造法力宝石")
        return
    end
    
    if GetItemCount("魔法冰川水") < 51 and BeeSpellCoolDown("造水术") == 0 then
        BeeRun("造水术")
        return
    end
    
    if GetItemCount("魔法羊角面包") < 51 and BeeSpellCoolDown("造食术") == 0 then
        BeeRun("造食术")
        return
    end
    
    lastActionTime = currentTime
end

-- 主执行逻辑:在非骑乘、非死亡、非战斗状态下执行主循环和自动交易/离队检查
if not IsMounted() and not UnitIsDead("player") and not UnitAffectingCombat("player") then
    Main()
end
回复 支持 反对

使用道具 举报

发表于 2025-6-1 15:56:55 | 显示全部楼层
谢谢大佬分享,我看看!学习一下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

小黑屋|手机版|Archiver|LUACN论坛

GMT+8, 2026-5-31 04:13 AM , Processed in 0.039254 second(s), 33 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表