Byrth / Lua-Byrth

Lua Addons and Scripts
3 stars 2 forks source link

in regurads to gearswap.lua line 491 #432

Closed smd111 closed 6 years ago

smd111 commented 8 years ago

im not sure if this will help you or not in gearswap.lua line 490 you have

    elseif id == 0x044 then
        -- No idea what this is doing

this is what i use to get the automation skill levels

    elseif id == 0x044 and skillwatch then --grabs data for skillup watch(pup)
        local packet = packets.parse('incoming', data)
        if packet['Job'] == 0x12 then
            local auto_skill ={[1]={'Current Melee Skill','Max Melee Skill','Automaton Melee Capped','Automaton Melee Level'},
                               [2]={'Current Ranged Skill','Max Ranged Skill','Automaton Archery Capped','Automaton Archery Level'},
                               [3]={'Current Magic Skill','Max Magic Skill','Automaton Magic Capped','Automaton Magic Level'}}
            for _,v in ipairs(auto_skill) do
                if packet[v[1]] == packet[v[2]] then
                    reg_event.skill[v[3]] = true
                else
                    reg_event.skill[v[3]] = false
                end
                reg_event.skill[v[4]] = packet[v[1]]
            end
            triggered = true
        end
Byrth commented 6 years ago

Closing this after referencing it in the more general issue above.