Fail 发表于 2020-10-7 17:01:19

瓦洛兰特罗技宏代码(快采摘/快购买/后坐力)



V1.0(会增加更多的教程,只是太累了)

简单的三合一脚本

这个脚本依赖于改变M-状态和拥有G-Keys。
状态1:代理快速拾取
G1-G5选择垃圾邮件代理
状态2:快速购买武器/装甲/能力
G1-G5在开盘前要买什么?
M状态3:在飞可调反后坐力
G1=鼠标向下移动得更快
G2=鼠标向下移动较慢
G3=重置为初始值


recoil = 5 -- Change to whatever usually works best for your dpi/sens (higher number = faster pull down, 0 = nothing)

--        *FOR 1920x1080 SCREEN*
agent={}
agent["Breach"]         = {17553, 59158}
agent["Brimstone"]         = {20115, 59158}
agent["Cipher"]         = {22983, 59461}
agent["Jett"]                 = {26023, 59218}
agent["Killjoy"]         = {29062, 59461}
agent["Omen"]                 = {31384, 59461}
agent["Phoenix"]         = {34219, 59522}
agent["Raze"]                 = {37019, 59340}
agent["Reyna"]                 = {39820, 59158}
agent["Sage"]                 = {42996, 59461}
agent["Sova"]                 = {45728, 59401}
agent["Viper"]                 = {48186, 59158}
agent["LOCK_IN"]         = {32785, 52598}
-------------------------------------------------------------------
menu_items={}
menu_items["CLASSIC"]                 = {16390, 11540}
menu_items["SHORTY"]                 = {16390, 19010}
menu_items["FRENZY"]                 = {16290, 25990}
menu_items["GHOST"]                 = {16420, 33280}
menu_items["STINGER"]                 = {23730, 11960}
menu_items["SPECTRE"]                 = {23490, 20520}
menu_items["BUCKY"]                 = {23350, 32190}
menu_items["JUDGE"]                 = {23490, 40450}
menu_items["BULLDOG"]                 = {31410, 12200}
menu_items["GUARDIAN"]                 = {31070, 21440}
menu_items["PHANTOM"]                 = {31280, 30490}
menu_items["VANDAL"]                 = {31170, 40020}
menu_items["MARSHAL"]                 = {40740, 12690}
menu_items["OPERATOR"]                 = {40800, 21250}
menu_items["ARES"]                         = {40700, 32310}
menu_items["ODIN"]                         = {40700, 40140}
menu_items["LIGHT_SHIELD"]         = {49340, 16210}
menu_items["HEAVY_SHIELD"]         = {49210, 34860}
menu_items["Q_ABILITY"]         = {20590, 53690}
menu_items["E_ABILITY"]         = {32750, 53810}
menu_items["C_ABILITY"]                = {45318, 54056}
-------------------------------------------------------------------
EnablePrimaryMouseButtonEvents(true)
log= OutputLogMessage
recoil_bkup = recoil
-------------------------------------------------------------------
function OnEvent(event, arg)
        mkey_state = GetMKeyState()
        if    (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then -- Mouse G4 default Recoil toggle
                toggle = not toggle
                if toggle then log("Anti-Recoil: ENABLED\n") else log("Anti-Recoil: DISABLED\n") end
        elseif(event == "MOUSE_BUTTON_PRESSED" and arg == 1 and toggle)and recoil > 0 then Timer()
        end
        --------------------FAST PICK---------------------------------------
        if(mkey_state == 1) then
                if          (event == "G_PRESSED" and arg == 1) then
                        op = {"Breach","LOCK_IN"}
                        Pick_Agent(op)
                elseif(event == "G_PRESSED" and arg == 2) then
                        op = {"Cipher","LOCK_IN"}
                        Pick_Agent(op)
                elseif(event == "G_PRESSED" and arg == 3) then
                        op = {"Killjoy","LOCK_IN"}
                        Pick_Agent(op)
                elseif(event == "G_PRESSED" and arg == 4) then
                        op = {"Omen","LOCK_IN"}
                        Pick_Agent(op)
                elseif(event == "G_PRESSED" and arg == 5) then
                        op = {"Sova","LOCK_IN"}
                        Pick_Agent(op)
                end
        ---------------------QUICK BUY--------------------------------
        elseif(mkey_state == 2) then
                if    (event == "G_PRESSED" and arg == 1) then
                        round1 = {"GHOST"}        -- Type in ALL CAPS weapon name between quotes| Ex. { "X" }
                        Buy_Stuff(round1)
            elseif(event == "G_PRESSED" and arg == 2) then
                        round2 = {"SPECTRE","LIGHT_SHIELD"} -- Can use multiple if separated with a comma | Ex. {"X" , "Y" , "Z"}
                        Buy_Stuff(round2)
            elseif(event == "G_PRESSED" and arg == 3) then
                        round3 = {"VANDAL","HEAVY_SHIELD"}
                        Buy_Stuff(round3)
                elseif(event == "G_PRESSED" and arg == 4) then
                        round4 = {"PHANTOM","HEAVY_SHIELD"}
                        Buy_Stuff(round4)
                elseif(event == "G_PRESSED" and arg == 5) then
                        round5 = {"Q_ABILITY","E_ABILITY","C_ABILITY"}
                        Buy_Stuff(round5)
            end
        -----------------------ANTI-RECOIL-----------------------------------        Prolly dont need to touch
        elseif(mkey_state == 3) then
                if    (event == "G_PRESSED" and arg == 1) then --Accelerates anti-recoil
                        recoil = recoil+1
                        log("Recoil: "..recoil.."\n")
            elseif(event == "G_PRESSED" and arg == 2) and recoil>1 then --Decelerates anti-recoil
                        recoil = recoil-1
                        log("Recoil: "..recoil.."\n")
            elseif(event == "G_PRESSED" and arg == 3) then --Resets to initial value
                        recoil = recoil_bkup
                        log("Recoil: "..recoil.."\n")
            end
        end
end
-----------------------DONT TOUCH UNLESS YOU KNOW WAT UR DOIN-----------------
function Pick_Agent(op)
log("Picked: "..op.."\n")
        for j=1,20,1 do                         -- loops 20x (can't stop after starting in public version)
                for i=1,2,1 do
                        MoveMouseTo(agent], agent])
                        PressMouseButton(1)
                        Sleep(25)
                        ReleaseMouseButton(1)
                        Sleep(25)
                end
        end
end
-----------------------DONT TOUCH UNLESS YOU KNOW WAT UR DOIN-----------------
function Buy_Stuff(items)
        PressAndReleaseKey('b') -- Change to YOUR buy menu key if not default
        Sleep(50)
                for i=1,#items,1 do
                        MoveMouseTo(menu_items], menu_items])
                        log("BOUGHT: "..items.."\n")
                        PressMouseButton(1)
                        Sleep(65)
                        ReleaseMouseButton(1)
                        Sleep(65)
                end
        PressAndReleaseKey('b') -- Change to YOUR buy menu key if not default
        Sleep(50)
end
-----------------------DONT TOUCH UNLESS YOU KNOW WAT UR DOIN-----------------
function Timer()
        local time1,time2 = GetRunningTime(),0
        if (time2-time1) <= 1000 then
                repeat
                        MoveMouseRelative(0,recoil)
                        Sleep(5)
                        time2 = GetRunningTime()
                until not IsMouseButtonPressed(1) or (time2-time1) > 1000
        end
end

wiodjejduwhgow 发表于 2020-10-7 17:03:33

啥也不说了,感谢楼主分享哇!

1411149514 发表于 2021-7-1 14:45:22

可以出一个辅助吗?
页: [1]
查看完整版本: 瓦洛兰特罗技宏代码(快采摘/快购买/后坐力)