Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion addons/Clock/Clock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ config.register(settings, redraw)

clock:show()

utc_diff = os.difftime(os.time(), os.time(os.date('!*t', os.time())))
local function get_timezone_offset(ts)
ts = ts or os.time()
local utcdate = os.date("!*t", ts)
local localdate = os.date("*t", ts)
localdate.isdst = false -- this is the trick
return os.difftime(os.time(localdate), os.time(utcdate))
end

utc_diff = get_timezone_offset()

windower.register_event('prerender', function()
local utc_now = os.time() - utc_diff
Expand Down
11 changes: 6 additions & 5 deletions addons/GearSwap/packet_parsing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ parse.i[0x037] = function (data)
end
end
end]]

-- Info provided by Akaden
vana_offset = os.time() - (((data:unpack("I",0x41)*60 - data:unpack("I",0x3D)) % 0x100000000) / 60)

local indi_byte = data:byte(0x59)
if indi_byte%128/64 >= 1 then
local temp_indi = _ExtraData.player.indi
Expand Down Expand Up @@ -457,7 +459,7 @@ parse.i[0x063] = function (data)
for i=1,32 do
local buff_id = data:unpack('H',i*2+7)
if buff_id ~= 255 and buff_id ~= 0 then -- 255 is used for "no buff"
local t = data:unpack('I',i*4+0x45)/60+572662306+1009810800
local t = data:unpack('I',i*4+0x45)/60
newbuffs[i] = setmetatable({
name=res.buffs[buff_id].name,
buff=copy_entry(res.buffs[buff_id]),
Expand All @@ -467,15 +469,14 @@ parse.i[0x063] = function (data)
},
{__index=function(t,k)
if k and k=='duration' then
return rawget(t,'time')-os.time()
return rawget(t,'time')-os.time()+(vana_offset or 0)
else
return rawget(t,k)
end
end})
end
end
if seen_0x063_type9 then

-- Look for exact matches
for n,new in pairs(newbuffs) do
newbuffs[n].matched_exactly = nil
Expand Down Expand Up @@ -556,7 +557,7 @@ parse.i[0x063] = function (data)
end
end
end

table.reassign(_ExtraData.player.buff_details,newbuffs)
for i=1,32 do
player.buffs[i] = (newbuffs[i] and newbuffs[i].id) or nil
Expand Down
1 change: 1 addition & 0 deletions addons/GearSwap/statics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ slot_map.back = 15
gearswap_disabled = false
seen_0x063_type9 = false
delay_0x063_v9 = false
vana_offset = 572662306+1009810800
not_sent_out_equip = {}
command_registry = Command_Registry.new()
equip_list = {}
Expand Down
2 changes: 1 addition & 1 deletion addons/Trusts/Trusts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function check_exist()
local get_party = windower.ffxi.get_party()
for i=1,5 do
local member = get_party['p'..i]
if member then
if member and member.mob then
if member.mob.spawn_type == 14 then
party[member.name] = member.mob.models[1]
table.insert(party_ind,member.name)
Expand Down
5 changes: 3 additions & 2 deletions addons/gametime/gametime.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright © 2013-2016, Omnys of Valefor
-- Copyright © 2013-2016, 2022, Omnys of Valefor
-- All rights reserved.

-- Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -26,7 +26,7 @@

_addon.name = 'gametime'
_addon.author = 'Omnys'
_addon.version = '0.6'
_addon.version = '0.7'
_addon.commands = {'gametime','gt'}

require('chat')
Expand Down Expand Up @@ -287,6 +287,7 @@ end
windower.register_event('time change', function(new, old)
gt.hours = (new / 60):floor()
gt.minutes = new % 60
gt.dectime = timeconvert(gt.hours..':'..gt.minutes)
gt.gtt:update(gt)
end)

Expand Down
116 changes: 58 additions & 58 deletions addons/libs/packets/fields.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion addons/libs/slips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ slips.items = {
[slips.storages[19]] = L{27715, 27866, 27716, 27867, 278, 281, 284, 3680, 3681, 27859, 28149, 27860, 28150, 21107, 21108, 27625, 27626, 26693, 26694, 26707, 26708, 27631, 27632, 26705, 26706, 27854, 27855, 26703, 26704, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 21097, 21098, 26717, 26718, 26728,26719,26720,26889,26890, 21095, 21096, 26738, 26739, 26729, 26730, 26788, 26946, 27281, 27455, 26789, 3698, 20713, 20714, 26798, 26954, 26799, 26955, 3706, 26956, 26957, 3705, 26964, 26965, 27291, 26967, 27293, 26966, 27292, 26968, 27294, 21153, 21154, 21086, 21087, 25606, 26974, 27111, 27296, 27467, 25607, 26975, 27112, 27297, 27468, 14195, 14830, 14831, 13945, 13946, 14832, 13947, 17058, 13948, 14400, 14392, 14393, 14394, 14395, 14396, 14397, 14398, 14399, 11337, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 15819, 15820, 15821, 15822, 15823, 15824, 15825, 15826, 3670, 3672, 3661, 3595, 3665, 3668, 3663, 3674, 3667, 191, 28, 153, 151, 198, 202, 142, 134, 137, 340, 341, 334, 335, 337, 339, 336, 342, 338, 3631, 3632, 3625, 3626, 3628, 3630, 3627, 3633, 3629, 25632, 25633, 25604, 25713, 27325, 25714, 27326, 3651, 25711, 25712, 10925, 10948, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 25657, 25756, 25658, 25757, 25909}, -- 192
[slips.storages[20]] = L{26740, 26898, 27052, 27237, 27411, 26742, 26900, 27054, 27239, 27413, 26744, 26902, 27056, 27241, 27415, 26746, 26904, 27058, 27243, 27417, 26748, 26906, 27060, 27245, 27419, 26750, 26908, 27062, 27247, 27421, 26752, 26910, 27064, 27249, 27423, 26754, 26912, 27066, 27251, 27425, 26756, 26914, 27068, 27253, 27427, 26758, 26916, 27070, 27255, 27429, 26760, 26918, 27072, 27257, 27431, 26762, 26920, 27074, 27259, 27433, 26764, 26922, 27076, 27261, 27435, 26766, 26924, 27078, 27263, 27437, 26768, 26926, 27080, 27265, 27439, 26770, 26928, 27082, 27267, 27441, 26772, 26930, 27084, 27269, 27443, 26774, 26932, 27086, 27271, 27445, 26776, 26934, 27088, 27273, 27447, 26778, 26936, 27090, 27275, 27449, 26780, 26938, 27092, 27277, 27451, 26782, 26940, 27094, 27279, 27453}, -- 110
[slips.storages[21]] = L{26741, 26899, 27053, 27238, 27412, 26743, 26901, 27055, 27240, 27414, 26745, 26903, 27057, 27242, 27416, 26747, 26905, 27059, 27244, 27418, 26749, 26907, 27061, 27246, 27420, 26751, 26909, 27063, 27248, 27422, 26753, 26911, 27065, 27250, 27424, 26755, 26913, 27067, 27252, 27426, 26757, 26915, 27069, 27254, 27428, 26759, 26917, 27071, 27256, 27430, 26761, 26919, 27073, 27258, 27432, 26763, 26921, 27075, 27260, 27434, 26765, 26923, 27077, 27262, 27436, 26767, 26925, 27079, 27264, 27438, 26769, 26927, 27081, 27266, 27440, 26771, 26929, 27083, 27268, 27442, 26773, 26931, 27085, 27270, 27444, 26775, 26933, 27087, 27272, 27446, 26777, 26935, 27089, 27274, 27448, 26779, 26937, 27091, 27276, 27450, 26781, 26939, 27093, 27278, 27452, 26783, 26941, 27095, 27280, 27454}, -- 110
[slips.storages[22]] = L{25639, 25715, 25638, 3707, 3708, 21074, 26406, 25645, 25726, 25648, 25649, 25650, 25758, 25759, 25672, 25673, 282, 279, 280, 268, 25670, 25671, 26520, 25652, 25669, 22017, 22018, 25586, 25587, 10384, 10385, 22019, 22020, 25722, 25585, 25776, 25677, 25678, 25675, 25679, 20668, 20669, 22069, 25755, 3722, 21608, 3713, 3714, 3715, 3717, 3727, 3728, 20577, 3726, 20666, 20667, 21741, 21609, 3723, 26410, 26411, 25850, 21509, 3725, 3720, 21658, 26524, 20665, 26412, 21965, 21966, 21967, 25774, 25838, 25775, 25839, 3724, 3721, 21682, 22072, 21820, 21821, 23731, 26517, 23730, 20573, 20674, 21742, 21860, 22065, 22039, 22124, 22132, 3719, 3738, 26518, 27623, 21867, 21868, 22283, 26516, 20933, 20578, 20568, 3739, 20569, 20570, 22288, 26352, 23737, 22282, 3740, 0, 26545, 21977, 21978, 3742, 26519, 26514, 26515, 3743, 21636, 23753, 23754, 54, 25910, 20571, 23790, 23791, 26489, 22153, 22154, 20574, 20675, 21743, 21861, 22066, 3748, 21638, 23800, 23801, 3749, 3750, 22045, 22046, 3751}, -- 146 SE Skipped an index hence the 0 as one of the items
[slips.storages[22]] = L{25639, 25715, 25638, 3707, 3708, 21074, 26406, 25645, 25726, 25648, 25649, 25650, 25758, 25759, 25672, 25673, 282, 279, 280, 268, 25670, 25671, 26520, 25652, 25669, 22017, 22018, 25586, 25587, 10384, 10385, 22019, 22020, 25722, 25585, 25776, 25677, 25678, 25675, 25679, 20668, 20669, 22069, 25755, 3722, 21608, 3713, 3714, 3715, 3717, 3727, 3728, 20577, 3726, 20666, 20667, 21741, 21609, 3723, 26410, 26411, 25850, 21509, 3725, 3720, 21658, 26524, 20665, 26412, 21965, 21966, 21967, 25774, 25838, 25775, 25839, 3724, 3721, 21682, 22072, 21820, 21821, 23731, 26517, 23730, 20573, 20674, 21742, 21860, 22065, 22039, 22124, 22132, 3719, 3738, 26518, 27623, 21867, 21868, 22283, 26516, 20933, 20578, 20568, 3739, 20569, 20570, 22288, 26352, 23737, 22282, 3740, 0, 26545, 21977, 21978, 3742, 26519, 26514, 26515, 3743, 21636, 23753, 23754, 54, 25910, 20571, 23790, 23791, 26489, 22153, 22154, 20574, 20675, 21743, 21861, 22066, 3748, 21638, 23800, 23801, 3749, 3750, 22045, 22046, 3751, 26490, 26546, 22047, 22048, 22049}, -- 151 SE Skipped an index hence the 0 as one of the items
[slips.storages[23]] = L{25659, 25745, 25800, 25858, 25925, 25660, 25746, 25801, 25859, 25926, 25663, 25749, 25804, 25862, 25929, 25664, 25750, 25805, 25863, 25930, 25665, 25751, 25806, 25865, 25931, 25666, 25752, 25807, 25866, 25932, 25661, 25747, 25802, 25860, 25927, 25662, 25748, 25803, 25861, 25928, 25667, 25753, 25808, 25867, 25933, 25668, 25754, 25809, 25868, 25934, 25579, 25779, 25818, 25873, 25940, 25580, 25780, 25819, 25874, 25941, 25590, 25764, 25812, 25871, 25937, 25591, 25765, 25813, 25872, 25938, 25581, 25781, 25820, 25875, 25942, 25582, 25782, 25821, 25876, 25943, 25588, 25762, 25810, 25869, 25935, 25589, 25763, 25811, 25870, 25936, 25583, 25783, 25822, 25877, 25944, 25584, 25784, 25823, 25878, 25945, 25574, 25790, 25828, 25879, 25946, 25575, 25791, 25829, 25880, 25947, 25576, 25792, 25830, 25881, 25948, 25577, 25793, 25831, 25882, 25949, 25578, 25794, 25832, 25883, 25950, 26204, 26205, 26206, 26207, 26208, 25569, 25797, 25835, 25886, 25953, 25573, 25796, 25834, 25885, 25952, 25570, 25798, 25836, 25887, 25954, 25572, 25795, 25833, 25884, 25951, 25571, 25799, 25837, 25888, 25955, 26211, 26210, 26212, 26209, 26213, 21863, 22004, 21744, 21272, 20576, 21761, 26409, 22070, 21681, 22005, 21745, 22068, 21759, 21770, 22067, 21680, 22071}, --177
[slips.storages[24]] = L{23040, 23107, 23174, 23241, 23308, 23041, 23108, 23175, 23242, 23309, 23042, 23109, 23176, 23243, 23310, 23043, 23110, 23177, 23244, 23311, 23044, 23111, 23178, 23245, 23312, 23045, 23112, 23179, 23246, 23313, 23046, 23113, 23180, 23247, 23314, 23047, 23114, 23181, 23248, 23315, 23048, 23115, 23182, 23249, 23316, 23049, 23116, 23183, 23250, 23317, 23050, 23117, 23184, 23251, 23318, 23051, 23118, 23185, 23252, 23319, 23052, 23119, 23186, 23253, 23320, 23053, 23120, 23187, 23254, 23321, 23054, 23121, 23188, 23255, 23322, 23055, 23122, 23189, 23256, 23323, 23056, 23123, 23190, 23257, 23324, 23057, 23124, 23191, 23258, 23325, 23058, 23125, 23192, 23259, 23326, 23059, 23126, 23193, 23260, 23327, 23060, 23127, 23194, 23261, 23328, 23061, 23128, 23195, 23262, 23329, 23062, 23129, 23196, 23263, 23330}, --115
[slips.storages[25]] = L{23375, 23442, 23509, 23576, 23643, 23376, 23443, 23510, 23577, 23644, 23377, 23444, 23511, 23578, 23645, 23378, 23445, 23512, 23579, 23646, 23379, 23446, 23513, 23580, 23647, 23380, 23447, 23514, 23581, 23648, 23381, 23448, 23515, 23582, 23649, 23382, 23449, 23516, 23583, 23650, 23383, 23450, 23517, 23584, 23651, 23384, 23451, 23518, 23585, 23652, 23385, 23452, 23519, 23586, 23653, 23386, 23453, 23520, 23587, 23654, 23387, 23454, 23521, 23588, 23655, 23388, 23455, 23522, 23589, 23656, 23389, 23456, 23523, 23590, 23657, 23390, 23457, 23524, 23591, 23658, 23391, 23458, 23525, 23592, 23659, 23392, 23459, 23526, 23593, 23660, 23393, 23460, 23527, 23594, 23661, 23394, 23461, 23528, 23595, 23662, 23395, 23462, 23529, 23596, 23663, 23396, 23463, 23530, 23597, 23664, 23397, 23464, 23531, 23598, 23665}, --115
Expand Down
35 changes: 0 additions & 35 deletions addons/pointwatch/FIXING POINTWATCH.txt

This file was deleted.

4 changes: 0 additions & 4 deletions addons/pointwatch/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ Text Box Commands:
* bg_transparency <number> - Changes the background transparency. Number should be between 0 and 1
** pos_x, pos_y, pad, transparency, alpha, and bg_alpha are also valid commands and are documented in the texts library.

Other Commands:
* message_printing - See FIXING POINTWATCH.txt in this directory for a full explanation.



Strings Options:
The two strings options in settings.xml are loaded as Lua code and run accordingly,
Expand Down
17 changes: 7 additions & 10 deletions addons/pointwatch/pointwatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ packet_handlers = {
[0x02A] = function(org) -- Resting message
local p = packets.parse('incoming',org)
local zone = 'z'..windower.ffxi.get_info().zone
if settings.options.message_printing then
print('Message ID: '..bit.band(p['Message ID'], 16383))
end


if messages[zone] then
local msg = bit.band(p['Message ID'], 16383)
for i,v in pairs(messages[zone]) do
Expand Down Expand Up @@ -132,9 +129,12 @@ packet_handlers = {
lp.number_of_merits = p['Merit Points']
lp.maximum_merits = p['Max Merit Points']
elseif p['Order'] == 5 then
local job = windower.ffxi.get_player().main_job_full
cp.current = p[job..' Capacity Points']
cp.number_of_job_points = p[job..' Job Points']
local player = windower.ffxi.get_player()
if player then
local job = player.main_job_full
cp.current = p[job..' Capacity Points']
cp.number_of_job_points = p[job..' Job Points']
end
end
end,
[0x110] = function(org)
Expand Down Expand Up @@ -211,9 +211,6 @@ windower.register_event('addon command',function(...)
windower.send_command('lua u pointwatch')
elseif first_cmd == 'reset' then
initialize()
elseif first_cmd == 'message_printing' then
settings.options.message_printing = not settings.options.message_printing
print('Pointwatch: Message printing is '..tostring(settings.options.message_printing)..'.')
elseif first_cmd == 'eval' then
assert(loadstring(table.concat(commands, ' ')))()
end
Expand Down
5 changes: 1 addition & 4 deletions addons/pointwatch/statics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ default_settings = {
green = 255,
blue = 255
}
},
options = {
message_printing = false,
},
}
}

-- Approved textbox commands:
Expand Down