Byrth / Lua-Byrth

Lua Addons and Scripts
3 stars 2 forks source link

can you add automation skill stats to gearswap's player.skills #436

Closed smd111 closed 6 years ago

smd111 commented 7 years ago

here is the code for it(from my gearswap include)

    elseif id == 0x044 and skillwatch then --grabs data for skillup watch(pup)
        local packet = packets.parse('incoming', data)
        if packet['Job'] == 0x12 then-- 04
            gearswap.player.skills.automaton_melee_level = packet['Current Melee Skill']-- 70
            gearswap.player.skills.automaton_archery_level = packet['Current Ranged Skill']-- 74
            gearswap.player.skills.automaton_magic_level = packet['Current Magic Skill']-- 78
            triggered = true
        end

i included the locations for everything in the packet according to fields.lua (--##)

this packet also gives all automaton stats as well as MON data (but its still unknown what most of it does)

smd111 commented 7 years ago

for gearswap it needs to be

parse.i[0x044] = function (data)
    if data:unpack('C',0x05) == 0x12 then
        player.skills.automaton_melee = data:unpack('H',0x71)
        player.skills.automaton_archery = data:unpack('H',0x75)
        player.skills.automaton_magic = data:unpack('H',0x79)
    end
end
Byrth commented 6 years ago

This is the same as the other request, so I am going to close it.