Skip to content
8 changes: 6 additions & 2 deletions addons/EmpyPopTracker/EmpyPopTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
_addon.name = 'Empy Pop Tracker'
_addon.author = 'Dean James (Xurion of Bismarck)'
_addon.commands = { 'ept', 'empypoptracker' }
_addon.version = '2.2.1'
_addon.version = '2.2.2'

config = require('config')
res = require('resources')
Expand Down Expand Up @@ -70,6 +70,10 @@ defaults.colors.pool = {}
defaults.colors.pool.red = 255
defaults.colors.pool.green = 170
defaults.colors.pool.blue = 0
defaults.colors.bg = {}
defaults.colors.bg.red = 0
defaults.colors.bg.green = 0
defaults.colors.bg.blue = 0
defaults.colors.bgall = {}
defaults.colors.bgall.red = 0
defaults.colors.bgall.green = 75
Expand Down Expand Up @@ -286,7 +290,7 @@ EmpyPopTracker.update = function()
if generated_info.has_all_pops then
EmpyPopTracker.text:bg_color(EmpyPopTracker.settings.colors.bgall.red, EmpyPopTracker.settings.colors.bgall.green, EmpyPopTracker.settings.colors.bgall.blue)
else
EmpyPopTracker.text:bg_color(EmpyPopTracker.settings.text.red, EmpyPopTracker.settings.text.green, EmpyPopTracker.settings.text.blue)
EmpyPopTracker.text:bg_color(EmpyPopTracker.settings.colors.bg.red, EmpyPopTracker.settings.colors.bg.green, EmpyPopTracker.settings.colors.bg.blue)
end
if EmpyPopTracker.settings.visible then
EmpyPopTracker.text:visible(true)
Expand Down
6 changes: 5 additions & 1 deletion addons/GearSwap/flow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ function equip_sets_exit(swap_type,ts,val1)
-- Item use packet handling here
if bit.band(val1.target.spawn_type, 2) == 2 and find_inventory_item(val1.id) then
-- 0x36 packet
command_registry[ts].proposed_packet = assemble_menu_item_packet(val1.target.id,val1.target.index,val1.id)
if val1.target.distance <= 6 then
command_registry[ts].proposed_packet = assemble_menu_item_packet(val1.target.id,val1.target.index,val1.id)
else
windower.add_to_chat(67, "Target out of range.")
end
elseif find_usable_item(val1.id) then
-- 0x37 packet
command_registry[ts].proposed_packet = assemble_use_item_packet(val1.target.id,val1.target.index,val1.id)
Expand Down
7 changes: 6 additions & 1 deletion addons/GearSwap/triggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ windower.register_event('outgoing text',function(original,modified,blocked,ffxi,
-- Item use packet handling here
if bit.band(spell.target.spawn_type, 2) == 2 and find_inventory_item(spell.id) then
--0x36 packet
command_registry[ts].proposed_packet = assemble_menu_item_packet(spell.target.id,spell.target.index,spell.id)
if spell.target.distance <= 6 then
command_registry[ts].proposed_packet = assemble_menu_item_packet(spell.target.id,spell.target.index,spell.id)
else
windower.add_to_chat(67, "Target out of range.")
return true
end
elseif find_usable_item(spell.id) then
--0x37 packet
command_registry[ts].proposed_packet = assemble_use_item_packet(spell.target.id,spell.target.index,spell.id)
Expand Down
25 changes: 16 additions & 9 deletions addons/boxdestroyer/boxdestroyer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,20 @@ _addon.author = 'Seth VanHeulen (Acacia@Odin)'

require('pack')
require('tables')
require('chat')

-- load message constants

require('messages')

-- config

config = require('config')
defaults = {
HighlightResult: false,
HighlightColor: 36,
}

-- global constants

default = {
Expand Down Expand Up @@ -257,9 +266,9 @@ end

function display(id, chances)
if #box[id] == 90 then
windower.add_to_chat(207, 'possible combinations: 10~99')
windower.add_to_chat(207, 'Possible combinations: 10~99')
else
windower.add_to_chat(207, 'possible combinations: ' .. table.concat(box[id], ' '))
windower.add_to_chat(207, 'Possible combinations: ' .. table.concat(box[id], ' '))
end
local remaining = math.floor(#box[id] / math.pow(2, (chances - 1)))
if remaining == 0 then
Expand All @@ -273,22 +282,20 @@ function display(id, chances)
local printed = false
for _,v in pairs(box[id]) do
if math.floor(v/10) == v%10 then
windower.add_to_chat(207, 'best guess: %d (%d%%)':format(v, 1 / remaining * 100))
windower.add_to_chat(207, 'Best guess: %d (%d%%)':format(v, 1 / remaining * 100))
printed = true
break
end
end
if not printed then
windower.add_to_chat(207, 'best guess: %d (%d%%)':format(box[id][math.ceil(#box[id] / 2)], 1 / remaining * 100))
windower.add_to_chat(207, 'Best guess: %d (%d%%)':format(box[id][math.ceil(#box[id] / 2)], 1 / remaining * 100))
end
else
windower.add_to_chat(207, 'best guess: %d (%d%%)':format(box[id][math.ceil(#box[id] / 2)], 1 / remaining * 100))
local clue_value,guess_value = calculate_odds(id,chances)
if clue_value > guess_value and remaining ~= 1 then
windower.add_to_chat(207, 'boxdestroyer recommends examining the chest')
else
windower.add_to_chat(207, 'boxdestroyer recommends guessing %d':format(box[id][math.ceil(#box[id] / 2)]))
end
local result = clue_value > guess_value and remaining ~= 1 and 'examining the chest' or 'guessing ' .. '%d':format(box[id][math.ceil(#box[id] / 2)])
local formatted_result = settings.HighlightResult and result:color(settings.HighlightColor) or result
windower.add_to_chat(207, 'boxdestroyer recommends ' .. formatted_result .. '.')
end

end
Expand Down
10 changes: 5 additions & 5 deletions addons/libs/packets/fields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,7 @@ fields.incoming[0x061] = L{
{ctype='unsigned char', label='Main Hand iLevel'}, -- 56
{ctype='unsigned char', label='_unknown5'}, -- 57 Always 00 for me
{ctype='bit[5]', label='Unity ID'}, -- 58 0=None, 1=Pieuje, 2=Ayame, 3=Invincible Shield, 4=Apururu, 5=Maat, 6=Aldo, 7=Jakoh Wahcondalo, 8=Naja Salaheem, 9=Flavira
{ctype='bit[5]', label='_unknown5'}, -- 58 Danger, 00ing caused my client to crash
{ctype='bit[5]', label='Unity Rank'}, -- 58 Danger, 00ing caused my client to crash
{ctype='bit[16]', label='Unity Points'}, -- 59
{ctype='bit[6]', label='_unknown6'}, -- 5A No obvious function
{ctype='unsigned int', label='_junk1'}, -- 5B
Expand Down Expand Up @@ -2917,8 +2917,8 @@ func.incoming[0x063][0x03] = L{
{ctype='unsigned short', label='_unknown2'}, -- 0E 00 00
{ctype='unsigned short', label='_unknown3'}, -- 10 76 00
{ctype='unsigned short', label='Infamy'}, -- 12
{ctype='unsigned int', label='_unknown2'}, -- 14 00s
{ctype='unsigned int', label='_unknown3'}, -- 18 00s
{ctype='unsigned int', label='_unknown4'}, -- 14 00s
{ctype='unsigned int', label='_unknown5'}, -- 18 00s
{ctype='data[64]', label='Instinct Bitfield 1'}, -- 1C See below
-- Bitpacked 2-bit values. 0 = no instincts from that species, 1 == first instinct, 2 == first and second instinct, 3 == first, second, and third instinct.
{ctype='data[128]', label='Monster Level Char field'}, -- 5C Mapped onto the item ID for these creatures. (00 doesn't exist, 01 is rabbit, 02 is behemoth, etc.)
Expand Down Expand Up @@ -2960,8 +2960,8 @@ fields.incoming[0x065] = L{
{ctype='float', label='Y'}, -- 0C
{ctype='unsigned int', label='ID', fn=id}, -- 10
{ctype='unsigned short', label='Index', fn=index}, -- 14
{ctype='unsigned char', label='_unknown1'}, -- 16 1 observed. May indicate repositoning type.
{ctype='unsigned char', label='_unknown2'}, -- 17 Unknown, but matches the same byte of a matching spawn packet
{ctype='unsigned char', label='Animation'}, -- 16
{ctype='unsigned char', label='Rotation'}, -- 17
{ctype='data[6]', label='_unknown3'}, -- 18 All zeros observed.
}

Expand Down