Lua Currency Check

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » Windower » General » Lua Currency check
Lua Currency check
 
Offline
Posts:
By 2023-04-07 14:04:55
| Edit  | Link | Quote | Reply
 
Post deleted by User.
Offline
Posts: 344
By Meeble 2023-04-07 15:01:43
Link | Quote | Reply
 
IIRC, currency data is only sent when the menu is opened, but you can request and catch the appropriate packet.


Code
local currencies = {}

windower.register_event('incoming chunk',function(id,data,modified,injected,blocked)

    if id == 0x113 then
        currencies.one = packets.parse('incoming', data)
        if debug_mode then
            log('packet 0x113')
            print('currencies.one should be populated')
        end
    end

    if id == 0x118 then
        currencies.two = packets.parse('incoming', data)
        if debug_mode then
            log('packet 0x118')
            print('currencies.two should be populated')
        end
    end

end)

function inject_0x10f()
    if debug_mode then
        print('requesting currencies 1')
    end
    local packet = packets.new('outgoing', 0x10f)
    packets.inject(packet)
end

function inject_0x115()
    if debug_mode then
        print('requesting currencies 2')
    end
    local packet = packets.new('outgoing', 0x115)
    packets.inject(packet)
end
Offline
Posts: 84
By Tathamet 2023-04-07 20:07:58
Link | Quote | Reply
 
If you're looking for something like this:



Check it out here (worst case it might point you in the right direction code wise):

https://github.com/Icydeath/ffxi-addons/blob/master/Currencies/Currencies.lua
[+]