Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8bc85bd
Fields: incoming 0x056 Type is a short
Ivaar May 20, 2020
2c58428
Merge pull request #1878 from Ivaar/dev
z16 May 20, 2020
04f7b0b
ConsoleBG: Whatever
z16 May 21, 2020
2b0120c
Merge pull request #2 from Windower/dev
lili-ffxi Jun 1, 2020
6b3288a
Update fields.lua
lili-ffxi Jun 1, 2020
f6b7a95
Update xml.lua
lili-ffxi Jun 1, 2020
2fa24d5
Merge pull request #1881 from lili-ffxi/dev
z16 Jun 1, 2020
fb85ce5
Update fields.lua
lili-ffxi Jun 1, 2020
92227ed
Merge pull request #1882 from lili-ffxi/dev
z16 Jun 1, 2020
8253e48
Fix merit math in pointwatch.lua.
tim-chaplin Jun 3, 2020
5ab8797
Merge pull request #1883 from tchaplin86/dev
z16 Jun 3, 2020
731a33c
[Battlemod] Adding dmg coloring
KenshiDRK Jun 9, 2020
53ce548
Update parse_action_packet.lua
KenshiDRK Jun 9, 2020
d9b5f4a
Merge pull request #1885 from KenshiDRK/dev
z16 Jun 9, 2020
7875f11
switching to use a proper colors.lua path
Byrth Jun 12, 2020
cd2b3a2
Update MyHome.lua
lili-ffxi Jun 13, 2020
2c8fe96
Update Dimmer.lua
lili-ffxi Jun 13, 2020
0616200
Merge pull request #1887 from lili-ffxi/dev
z16 Jun 14, 2020
d5ceed8
Create position_manager.lua
lili-ffxi Jun 14, 2020
3619550
Create README.md
lili-ffxi Jun 14, 2020
8645df2
Update position_manager.lua
lili-ffxi Jun 14, 2020
ca8715d
Update position_manager.lua
lili-ffxi Jun 14, 2020
fa3dc0e
Update README.md
lili-ffxi Jun 14, 2020
0d2751c
Update README.md
lili-ffxi Jun 14, 2020
2f5f5f8
Update README.md
lili-ffxi Jun 14, 2020
27344f5
Update position_manager.lua
lili-ffxi Jun 14, 2020
13ed86f
Space after commas
lili-ffxi Jun 14, 2020
7060e1c
Merge pull request #3 from Windower/dev
lili-ffxi Jun 14, 2020
6ca7e33
Update addons.xml
lili-ffxi Jun 14, 2020
308ec1d
Merge pull request #1889 from lili-ffxi/dev
z16 Jun 14, 2020
6e9fc1b
Update position_manager.lua
lili-ffxi Jun 21, 2020
d9c9e47
Merge pull request #1891 from lili-ffxi/patch-1
z16 Jun 21, 2020
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
16 changes: 8 additions & 8 deletions addons/ConsoleBG/ConsoleBG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ require('logger')

defaults = {}
defaults.bg = {}
defaults.bg.alpha = 255
defaults.bg.alpha = 192
defaults.bg.red = 0
defaults.bg.green = 0
defaults.bg.blue = 0
defaults.pos = {}
defaults.pos.x = 1
defaults.pos.y = 25
defaults.pos.x = 0
defaults.pos.y = 0
defaults.extents = {}
defaults.extents.x = 600
defaults.extents.y = 314
defaults.extents.x = 7680
defaults.extents.y = 360

settings = config.load(defaults)

Expand Down Expand Up @@ -76,11 +76,11 @@ windower.register_event('addon command', function(command1, ...)
end
elseif (command1 == 'Position' or command1 == 'Size') then
if ((2 > argcount) or (argcount > 2)) then
error('Invalid syntax. Check the "help" command.')
error('Invalid syntax. Check the "help" command.')
else
consolesettings(command1, ...)
end

end

elseif command1 == 'help' then
Expand All @@ -94,7 +94,7 @@ windower.register_event('addon command', function(command1, ...)

else
error('Unknown command! Use the "help" command for a list of commands.')

end
end)

Expand Down
4 changes: 2 additions & 2 deletions addons/Dimmer/Dimmer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function search_item()
log_flag = false
log('Item use within 3 seconds..')
end
until ext.usable or delay > 10
until ext.usable or delay > 30
end
windower.chat.input('/item '..windower.to_shift_jis(stats[lang])..' <me>')
break;
Expand All @@ -101,4 +101,4 @@ windower.register_event('ipc message',function (msg)
if msg == 'dimmer' then
windower.chat.input('//dimmer')
end
end)
end)
2 changes: 1 addition & 1 deletion addons/MyHome/MyHome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function search_item()
log_flag = false
log('Item use within 3 seconds..')
end
until ext.usable or delay > 10
until ext.usable or delay > 30
end
windower.chat.input('/item '..windower.to_shift_jis(stats[lang])..' <me>')
break;
Expand Down
9 changes: 8 additions & 1 deletion addons/addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,15 @@
<addon>
<name>IndiNope</name>
<author>Lili</author>
<description>Block graphical effects from Geomancer's Indi- spells.</description>
<description>Blocks graphical effects from Geomancer's Indi- spells.</description>
<bugtracker>https://github.com/Windower/Lua/issues</bugtracker>
<support>https://github.com/lili-ffxi</support>
</addon>
<addon>
<name>position_manager</name>
<author>Lili</author>
<description>Allows you to set a screen position per character name. Each character will be moved to that screen position on login. Requires the WinControl plugin to be installed.</description>
<bugtracker>https://github.com/Windower/Lua/issues</bugtracker>
<support>https://github.com/lili-ffxi</support>
</addon>
</addons>
2 changes: 1 addition & 1 deletion addons/battlemod/battlemod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require 'generic_helpers'
require 'parse_action_packet'
require 'statics'

_addon.version = '3.25'
_addon.version = '3.26'
_addon.name = 'BattleMod'
_addon.author = 'Byrth, maintainer: SnickySnacks'
_addon.commands = {'bm','battlemod'}
Expand Down
33 changes: 24 additions & 9 deletions addons/battlemod/parse_action_packet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ function parse_action_packet(act)
for i,v in pairs(act.targets) do
for n,m in pairs(v.actions) do
if m.message ~= 0 and res.action_messages[m.message] ~= nil then
local col = res.action_messages[m.message].color
local targ = assemble_targets(act.actor,v.target,act.category,m.message)
local color = color_filt(res.action_messages[m.message].color,v.target[1].id==Self.id)
local color = color_filt(col,v.target[1].id==Self.id)
if m.reaction == 11 and act.category == 1 then m.simp_name = 'parried by'
elseif m.reaction == 12 and act.category == 1 then m.simp_name = 'blocked by'
elseif m.message == 1 then m.simp_name = 'hit'
Expand Down Expand Up @@ -188,7 +189,7 @@ function parse_action_packet(act)
elseif m.message == 437 or m.message == 438 then m.simp_name = act.action.name..' (JAs and TP)'
elseif m.message == 439 or m.message == 440 then m.simp_name = act.action.name..' (SPs, JAs, TP, and MP)'
elseif T{252,265,268,269,271,272,274,275,379,650}:contains(m.message) then m.simp_name = 'Magic Burst! '..act.action.name
elseif not act.action then
elseif not act.action then
m.simp_name = ''
act.action = {}
else m.simp_name = act.action.name or ''
Expand Down Expand Up @@ -262,7 +263,7 @@ function parse_action_packet(act)
:gsub('${item2}',color_it(act.action.item2 or 'ERROR 121',color_arr.itemcol))
:gsub('${weapon_skill}',color_it(act.action.weapon_skill or 'ERROR 114',color_arr.wscol))
:gsub('${abil}',m.simp_name or 'ERROR 115')
:gsub('${numb}',numb or 'ERROR 116')
:gsub('${numb}',col == 'D' and color_it(numb or 'ERROR 116', color_arr[act.actor.damage]) or (numb or 'ERROR 116'))
:gsub('${actor}',color_it((act.actor.name or 'ERROR 117' ) .. (act.actor.owner_name or "") ,color_arr[act.actor.owner or act.actor.type]))
:gsub('${target}',targ)
:gsub('${lb}','\7')
Expand All @@ -275,7 +276,8 @@ function parse_action_packet(act)
end
if m.has_add_effect and m.add_effect_message ~= 0 and add_effect_valid[act.category] then
local targ = assemble_targets(act.actor,v.target,act.category,m.add_effect_message)
local color = color_filt(res.action_messages[m.add_effect_message].color,v.target[1].id==Self.id)
local col = res.action_messages[m.add_effect_message].color
local color = color_filt(col,v.target[1].id==Self.id)
if m.add_effect_message > 287 and m.add_effect_message < 303 then m.simp_add_name = skillchain_arr[m.add_effect_message-287]
elseif m.add_effect_message > 384 and m.add_effect_message < 399 then m.simp_add_name = skillchain_arr[m.add_effect_message-384]
elseif m.add_effect_message > 766 and m.add_effect_message < 769 then m.simp_add_name = skillchain_arr[m.add_effect_message-752]
Expand All @@ -295,7 +297,7 @@ function parse_action_packet(act)
:gsub('${item}',act.action.item or 'ERROR 129')
:gsub('${weapon_skill}',act.action.weapon_skill or 'ERROR 130')
:gsub('${abil}',m.simp_add_name or act.action.name or 'ERROR 131')
:gsub('${numb}',numb or 'ERROR 132')
:gsub('${numb}',col == 'D' and color_it(numb or 'ERROR 132', color_arr[act.actor.damage]) or (numb or 'ERROR 132'))
:gsub('${actor}',color_it(act.actor.name,color_arr[act.actor.owner or act.actor.type]))
:gsub('${target}',targ)
:gsub('${lb}','\7')
Expand All @@ -308,20 +310,25 @@ function parse_action_packet(act)
end
if m.has_spike_effect and m.spike_effect_message ~= 0 and spike_effect_valid[act.category] then
local targ = assemble_targets(act.actor,v.target,act.category,m.spike_effect_message)
local color = color_filt(res.action_messages[m.spike_effect_message].color,act.actor.id==Self.id)
local col = res.action_messages[m.spike_effect_message].color
local color = color_filt(col,act.actor.id==Self.id)

local actor = act.actor
if m.spike_effect_message == 14 then
m.simp_spike_name = 'from counter'
elseif T{33,606}:contains(m.spike_effect_message) then
m.simp_spike_name = 'counter'
actor = v.target[1] --Counter dmg is done by the target, fix for coloring the dmg
elseif m.spike_effect_message == 592 then
m.simp_spike_name = 'missed counter'
elseif m.spike_effect_message == 536 then
m.simp_spike_name = 'retaliation'
actor = v.target[1] --Retaliation dmg is done by the target, fix for coloring the dmg
elseif m.spike_effect_message == 535 then
m.simp_spike_name = 'from retaliation'
else
m.simp_spike_name = 'spikes'
actor = v.target[1] --Spikes dmg is done by the target, fix for coloring the dmg
end

local msg = simplify_message(m.spike_effect_message)
Expand All @@ -332,7 +339,7 @@ function parse_action_packet(act)
:gsub('${item}',act.action.item or 'ERROR 144')
:gsub('${weapon_skill}',act.action.weapon_skill or 'ERROR 145')
:gsub('${abil}',m.simp_spike_name or act.action.name or 'ERROR 146')
:gsub('${numb}',numb or 'ERROR 147')
:gsub('${numb}',col == 'D' and color_it(numb or 'ERROR 147', color_arr[actor.damage]) or (numb or 'ERROR 147'))
:gsub((simplify and '${target}' or '${actor}'),color_it(act.actor.name,color_arr[act.actor.owner or act.actor.type]))
:gsub((simplify and '${actor}' or '${target}'),targ)
:gsub('${lb}','\7')
Expand Down Expand Up @@ -460,7 +467,7 @@ end

function player_info(id)
local player_table = windower.ffxi.get_mob_by_id(id)
local typ,owner,filt,owner_name
local typ,dmg,owner,filt,owner_name

if player_table == nil then
return {name=nil,id=nil,is_npc=nil,type='debug',owner=nil, owner_name=nil,race=nil}
Expand All @@ -471,10 +478,13 @@ function player_info(id)
typ = i
if i == 'p0' then
filt = 'me'
dmg = 'mydmg'
elseif i:sub(1,1) == 'p' then
filt = 'party'
dmg = 'partydmg'
else
filt = 'alliance'
dmg = 'allydmg'
end
end
end
Expand All @@ -485,11 +495,13 @@ function player_info(id)
typ = 'other_pets'
filt = 'other_pets'
owner = 'other'
dmg = 'otherdmg'
for i,v in pairs(windower.ffxi.get_party()) do
if type(v) == 'table' and v.mob and v.mob.pet_index and v.mob.pet_index == player_table.index then
if i == 'p0' then
typ = 'my_pet'
filt = 'my_pet'
dmg = 'mydmg'
end
owner = i
owner_name = showownernames and '(' .. v.mob.name .. ')'
Expand All @@ -498,6 +510,7 @@ function player_info(id)
if i == 'p0' then
typ = 'my_fellow'
filt = 'my_fellow'
dmg = 'mydmg'
end
owner = i
owner_name = showownernames and '(' .. v.mob.name .. ')'
Expand All @@ -507,6 +520,7 @@ function player_info(id)
else
typ = 'mob'
filt = 'monsters'
dmg = 'mobdmg'

if filter.enemies then
for i,v in pairs(Self.buffs) do
Expand All @@ -531,10 +545,11 @@ function player_info(id)
else
typ = 'other'
filt = 'others'
dmg = 'otherdmg'
end
end
if not typ then typ = 'debug' end
return {name=player_table.name,id=id,is_npc = player_table.is_npc,type=typ,filter=filt,owner=(owner or nil), owner_name=(owner_name or nil),race = player_table.race}
return {name=player_table.name,id=id,is_npc = player_table.is_npc,type=typ,damage=dmg,filter=filt,owner=(owner or nil), owner_name=(owner_name or nil),race = player_table.race}
end

function get_spell(act)
Expand Down
2 changes: 1 addition & 1 deletion addons/blist/blist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _addon.version = '1.2.0.1'

require 'tables'
require 'strings'
require 'colors'
require 'chat/colors'
local config = require 'config'
require 'logger'

Expand Down
6 changes: 3 additions & 3 deletions addons/libs/packets/fields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ fields.outgoing[0x0C0] = L{
-- /makelinkshell
fields.outgoing[0x0C3] = L{
{ctype='unsigned char', label='_unknown1'}, -- 04
{ctype='unsigned char', label='Linkshell Numbger'}, -- 05
{ctype='unsigned char', label='Linkshell Number'}, -- 05
{ctype='data[2]', label='_junk1'} -- 05
}

Expand Down Expand Up @@ -2641,7 +2641,7 @@ fields.incoming[0x056] = function (data, type)
end

func.incoming[0x056].type = L{
{ctype='int', label='Type', fn=e+{'quest_mission_log'}} -- 24
{ctype='short', label='Type', fn=e+{'quest_mission_log'}} -- 24
}

func.incoming[0x056][0x0080] = L{
Expand Down Expand Up @@ -3408,7 +3408,7 @@ fields.incoming[0x0E0] = L{
-- Party Member List
fields.incoming[0x0E1] = L{
{ctype='unsigned short', label='Party ID'}, -- 04 For whatever reason, this is always valid ASCII in my captured packets.
{ctype='unsigned short', label='_unknown1', const=0x0080}, -- 06 Likely contains information about the current chat mode and vote count
{ctype='unsigned short', label='_unknown1', const=0x8000}, -- 06 Likely contains information about the current chat mode and vote count
}

-- Char Info
Expand Down
2 changes: 1 addition & 1 deletion addons/libs/xml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ function table.to_xml(t, indentlevel)
end
if type(val) == 'table' and next(val) then
str = str..indent..'<'..key..'>\n'
str = str..table.to_xml(val, indentlevel + 1)..'\n'
str = str..table.to_xml(val, indentlevel + 1)
str = str..indent..'</'..key..'>\n'
else
if type(val) == 'table' then
Expand Down
6 changes: 3 additions & 3 deletions addons/pointwatch/pointwatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ function exp_msg(val,msg)
elseif msg == 371 or msg == 372 then
lp.registry[t] = (lp.registry[t] or 0) + val
lp.current = lp.current + val
if lp.current + val >= lp.tnm and lp.number_of_merits ~= lp.maximum_merits then
if lp.current >= lp.tnm and lp.number_of_merits ~= lp.maximum_merits then
-- Merit Point gained!
lp.number_of_merits = lp.number_of_merits + math.min(math.floor(lp.current/lp.tnm),lp.maximum_merits)
lp.number_of_merits = math.min(lp.number_of_merits + math.floor(lp.current/lp.tnm),lp.maximum_merits)
lp.current = lp.current%lp.tnm
else
-- If a merit point was not gained,
lp.current = math.min(lp.current+val,lp.tnm-1)
lp.current = math.min(lp.current,lp.tnm-1)
end
end
update_box()
Expand Down
31 changes: 31 additions & 0 deletions addons/position_manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Position Manager

Set and save screen position per-character.

Command: `//pm set <pos_x> <pos_y> [name]`

`pos_x` and `pos_y` are obligatory and must be numbers.
`name` is optional. If no name is provided, settings will be saved for the current character.
`:all` is a special name that can be used to set the default position.

**Note**: Characters are only moved after they're logged in. The `:all` position will be used for the character login screen as well.

### Examples:
`//pm set 0 0`
Will set your _current_ character to the position X: 0, Y: 0.

`//pm set 0 60 :all`
Will set the default positioning for all characters to X: 0 and Y: 60 (the height of the Windows 10 taskbar with 150% UI scaling.), and delete all other character-specific settings.

`//pm set 1920 0 Yourname`
Will set the default position for the character called "Yourname" to X: 1920 and Y: 0.
This will make the character appear on the secondary screen that is to the right of the main screen - useful for multi-screen setups.

`//pm set Yourmain 0 40`
`//pm set Youralt 800 40`
Will set your main to X: 0, Y: 40, and your alt to the X: 800, Y: 40.
If your laptop screen is 1600px wide, and your instances are both set at 800x600, this will put them side by side.

**Warning:** the `all` name will delete every other character-specific settings that are already saved! It's best to use it only once after you install the addon, to set default position for non-specified characters.

Enjoy.
Loading