登录 注册

魔兽世界随机坐骑lua

主要就是几个重要的函数吧

一个:


/run print(C_MountJournal.GetMountFromSpell(SpellId))


用于获取坐骑ID

第二个:


C_MountJournal.SummonByID(Id)


很显然,召唤坐骑的主要函数

还有几个:


C_Map.GetBestMapForUnit("player")
isFlyableArea()
isSwimming()


就顾名思义,不解释(

所以最后就是这样:


local e = aura_env
local m,a,t=C_Map.GetBestMapForUnit,C_MountJournal.SummonByID,t or 0;
local sid={473,1363,781};
local gid={197,1414,836};

if m("player")==201 and IsSwimming() then
    a(373)
else
    if time()-t<60 and math.random(10)>3 then
        a(0);
    else
        if IsFlyableArea() then
            a(sid[math.random(#sid)]);
        else
            a(gid[math.random(#gid)]);
        end
        t=time();
    end
end


然后封装一下放在wa里面:


local e = aura_env
local m,a,t=C_Map.GetBestMapForUnit,C_MountJournal.SummonByID,t or 0;
local sid={473,1363,781};
local gid={197,1414,836};
if not _G[e.id.."Button"] then 
    local region = WeakAuras.GetRegion(e.id) 
    e.btn = CreateFrame("Button", e.id.."Button", region, "UIPanelButtonTemplate") 
    e.btn:SetScript("OnClick",function ()
            --print(t);
            if m("player")==201 and IsSwimming() then
                a(373)
            else
                if time()-t<60 and math.random(10)>3 then
                    a(0);
                else
                    if IsFlyableArea() then
                        a(sid[math.random(#sid)]);
                    else
                        a(gid[math.random(#gid)]);
                    end
                    t=time();
                end
            end
    end)
    e.btn:SetAllPoints(region) 
end



最后的wa就是这样


!WA:2!9z1tVTnYv84vbia6Yg7M1iBApqOIyivilyz5yN0uxarhjhf4i5LIUoTblKgroICwtod7mdLTs7Ey1PCB3vOx7fHEQiN81CZFciek6hadKd9Aq)a03muYo2njeqIV5nV3V3FM37nCH6lfUK7sUV((tiomABwm3b)RUbFyR(9fy5cNIOo(m((mcv2BNAnTRzn1HXcCzhtBFmjc3n62oXcjl0gFI8GixKe3lw)6S5YvZ1d7ZroscJk20sirCzwtcLixzSlRtQ6D7L((KmbbmhuGb2yBdumh1bthKnLvyrur527055OOs7ILMyH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X0lWrx(26a79A0S2Sy)dUFmAXgnBwZQJzlB7wp3QXUp1(svBtEf(RNfzV4kr2aIGatN6(VN6fWoUoh)NJXuNH7FZ1kT(dsJo1gQI(DdMLM9hPyPCNP90xi0AaMdvVAiS9HtCkwiYCQA58OBS3CT1zNjQL7PlR(kTCZ9kt1cFT0TH71Wz0K7raexuRKjKxWC)E(yINVmJzad52FSQ1s10bBibTOYLTcJdKKS8xbf3q33xyQ6awoPFwlNaKqOOmfqArrmjDUKkImvFisp4xFIx2XxufLCZtj00QqqWLJUlXJY44wr6pROMQNTgNZ4IUjbDnFfJfUam0rGKQkFSF0DM)5iQkNNqeQBeC7MKR7ejZzqAN6DxOZ)nhX9S39JV5D)T)X7(7)0)5F(ZN2xDdn0bcfozSqbr(OmVp9CuF3TYL71EhRA1AADSQ(nZ6Xe3t3P8dS(tpRw7WdEgCpRcF4BGojnf)xF7uOpaayMZNDIQvNOPV3kwo(yNJwXAakigNz0aeNO8vt1ewUJpI6HbPsg1DueNb1JYHQE6sRxsD2mAEu216YgHLerlwP0dkT2QLxBvp3kLF0gBT5sd(xV4)n


只要在宏里面


/click 召唤坐骑Button


即可

顺便晒一下新出的永恒时空撕裂者(

2021
07 21
上一篇
Older
评论
0
点击
36
发布
我是标题
我是文字
我是标题
我是文字
用户名
密码
用户名
密码
重复密码
努力的加载中.....