diff options
author | chai <chaifix@163.com> | 2021-11-15 13:53:59 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-15 13:53:59 +0800 |
commit | 942a030afd348ab2e02eac8054b43e3c3a72ea48 (patch) | |
tree | a13459f39a3d2f1b533fbd1b5ab523d7a621f673 /Data/BuiltIn/Libraries/lua-addons/addons/SetTarget | |
parent | e307051a56a54c27f10438fd2025edf61d0dfeed (diff) |
*rename
Diffstat (limited to 'Data/BuiltIn/Libraries/lua-addons/addons/SetTarget')
-rw-r--r-- | Data/BuiltIn/Libraries/lua-addons/addons/SetTarget/SetTarget.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Data/BuiltIn/Libraries/lua-addons/addons/SetTarget/SetTarget.lua b/Data/BuiltIn/Libraries/lua-addons/addons/SetTarget/SetTarget.lua new file mode 100644 index 0000000..7d32772 --- /dev/null +++ b/Data/BuiltIn/Libraries/lua-addons/addons/SetTarget/SetTarget.lua @@ -0,0 +1,26 @@ +local packets = require('packets') + +_addon.name = 'SetTarget' +_addon.author = 'Arcon' +_addon.commands = {'settarget', 'st'} +_addon.version = '1.0.0.0' + +windower.register_event('addon command', function(id) + id = tonumber(id) + if id == nil then + return + end + + local target = windower.ffxi.get_mob_by_id(id) + if not target then + return + end + + local player = windower.ffxi.get_player() + + packets.inject(packets.new('incoming', 0x058, { + ['Player'] = player.id, + ['Target'] = target.id, + ['Player Index'] = player.index, + })) +end) |