Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon "Better Check" created #2049

Open
wants to merge 973 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
973 commits
Select commit Hold shift + click to select a range
d46f978
Incoming Chat fix
RubenatorX Sep 10, 2020
ddcea49
Merge pull request #1936 from RubenatorX/patch-7
z16 Sep 10, 2020
04e966b
Merge pull request #1930 from GlarinAsura/GlarinAsura
z16 Sep 11, 2020
b5ba45c
[battlmod] Update new ambu message
KenshiDRK Sep 12, 2020
3d6731e
Let's report errors
RubenatorX Sep 12, 2020
2ebec94
Merge pull request #1939 from RubenatorX/patch-8
z16 Sep 12, 2020
0cb4fa4
Merge pull request #1938 from KenshiDRK/dev
Chiaia Sep 13, 2020
7cd1d71
Libs/Packets: Added proper variable length string support
z16 Sep 14, 2020
b7bddec
[translate] Update to use the packets lib
KenshiDRK Sep 14, 2020
6f1acc1
Merge pull request #1941 from KenshiDRK/dev
z16 Sep 14, 2020
845a4e8
[fields.lua] Wardrobes and Safe2 fixes
KenshiDRK Sep 16, 2020
32563d5
Update fields.lua
KenshiDRK Sep 16, 2020
bdaabf7
Update setbgm.lua
funkworkz Sep 16, 2020
14fcb65
Merge pull request #1944 from funkworkz/patch-6
z16 Sep 16, 2020
94e642f
Merge pull request #1924 from Windower/joshk6656-recipeupdates
z16 Sep 17, 2020
6d028d0
Merge pull request #1943 from KenshiDRK/dev
z16 Sep 17, 2020
f5350f3
Update packets.lua
Chiaia Sep 18, 2020
64336a7
Upgrade EPT to 2.5.0.
xurion Sep 19, 2020
9b053f7
Update craft.lua
Chiaia Oct 7, 2020
50cd319
[battlemod] Critical fix and new feature added
KenshiDRK Oct 12, 2020
1080e44
Update setbgm.lua
funkworkz Oct 12, 2020
f6d3b0d
Merge pull request #1950 from funkworkz/patch-8
z16 Oct 12, 2020
4e76eea
Merge pull request #1949 from KenshiDRK/dev
z16 Oct 12, 2020
ab45e71
[battlemod] add crafting display toggle
posimagi Oct 12, 2020
88b096f
[battlemod] fix condensetargetname toggle
posimagi Oct 12, 2020
ac0a185
Merge pull request #1951 from posimagi/battlemod-no-crafting-results
z16 Oct 12, 2020
72b756f
[translate] back to hardcoded packet, bug fix
KenshiDRK Oct 13, 2020
81260b0
Merge pull request #1952 from KenshiDRK/dev
z16 Oct 13, 2020
e85f172
Update setbgm.lua
funkworkz Oct 25, 2020
137c0e7
Merge pull request #1954 from funkworkz/patch-10
z16 Oct 25, 2020
86d935c
Update bstpet_range
Nifim Nov 9, 2020
f1ae812
Merge pull request #1960 from Windower/bstpet_range-fix
Nifim Nov 9, 2020
f4e08b1
Update static_variables.lua
Chiaia Nov 14, 2020
0b260e1
Added damaging drain msg to mydmg coloring
KenshiDRK Nov 17, 2020
96d8774
Merge pull request #1963 from KenshiDRK/dev
z16 Nov 17, 2020
7f8777c
Update traits.lua
Cellcubed Nov 19, 2020
e3306b3
Update bluguide.lua
Cellcubed Nov 19, 2020
6d361b8
Merge pull request #1969 from Cellcubed/patch-2
Nifim Nov 19, 2020
1cd59d3
Correct and Improve burden tracker
Nifim Nov 23, 2020
2d626d7
Add regulator to autoabils
Nifim Nov 23, 2020
2874d46
Update autoabils.lua
Nifim Nov 23, 2020
3c24ec3
Fix player.pet_index
dtw Nov 23, 2020
6835e21
Update id to index
dtw Nov 23, 2020
41389c3
Insure `player_id` is updated
Nifim Nov 23, 2020
7d28fda
Merge pull request #1970 from Cellcubed/patch-3
Nifim Nov 23, 2020
6923844
Merge pull request #1971 from dtw/autocontrol-v2.0-dtw
Nifim Nov 24, 2020
8674899
Improve code for getting `pet_index`
Nifim Nov 24, 2020
5f70f73
Merge pull request #1974 from Windower/autocontrol-v2.0
Nifim Nov 30, 2020
cfa6e15
correct placement of playermob definition
Nifim Dec 5, 2020
755d2a7
Autocontrol fix logged out loading
Nifim Dec 7, 2020
30ad293
Fix issue when job is not pup
Nifim Dec 7, 2020
f91b678
burden.lua fix typo
Nifim Dec 7, 2020
7700d85
autocontrol bump revision
Nifim Dec 7, 2020
e403df5
Update version on readme.md
Nifim Dec 7, 2020
644a3b7
Merge pull request #1977 from Windower/autocontrol-fix-typo
Nifim Dec 7, 2020
ad2efe6
Autocontrol: Add load event to autoabils.lua
Nifim Dec 7, 2020
4fba7a9
bump version
Nifim Dec 7, 2020
fe2b389
Bump revision
Nifim Dec 7, 2020
20a9430
Merge pull request #1978 from Windower/autocontrol-autoabils-fix
Nifim Dec 7, 2020
77b2c84
autocontrol hide burden display
Nifim Dec 8, 2020
48e7f3d
Merge pull request #1979 from Windower/autocontrol-burdentracker-hide
Nifim Dec 8, 2020
1ae26a5
Dec 9th, 2020 Update
Chiaia Dec 10, 2020
fe7d796
New Trust: Matsui-P
Chiaia Dec 11, 2020
0c76bb2
Tab ohno
Chiaia Dec 11, 2020
b5d6d82
Correct `count_to_rate` to `count_to_decay_rate`
Nifim Dec 15, 2020
17f591b
Bump autocontrol version 2.0.5
Nifim Dec 15, 2020
8bd4bc1
wardrobe 2-4
Chiaia Dec 27, 2020
94302a4
Fix use of quotes in `gs equip` and exit loop properly
RubenatorX Dec 28, 2020
6426cd0
Adding Chaosbringer
lili-ffxi Dec 31, 2020
f09151f
Merge pull request #1984 from lili-ffxi/patch-4
Chiaia Dec 31, 2020
c70e4b3
Update slips.lua
Hadin1 Jan 9, 2021
c4c160b
Merge pull request #1986 from Hadin1/patch-1
z16 Jan 9, 2021
dda6ca3
jan update changes
Chiaia Jan 15, 2021
29d6a0e
Mastery Rank
RubenatorX Jan 22, 2021
194ceff
Update craft.lua
Jan 23, 2021
a2b045b
Updated to version 2.0
lili-ffxi Jan 23, 2021
8582160
Update README.md
lili-ffxi Jan 23, 2021
425df84
Merge pull request #1992 from lili-ffxi/patch-6
z16 Jan 23, 2021
8f17534
Code cleanup
lili-ffxi Jan 23, 2021
be55431
Last second copypaste bug squash.
lili-ffxi Jan 23, 2021
16b3499
Update craft.lua
Jan 23, 2021
de61b2d
Added Cumulus Masque +1
lili-ffxi Jan 23, 2021
78fe1d2
Update Dimmer.lua
lili-ffxi Jan 23, 2021
cbe51ae
Less spaces
lili-ffxi Jan 23, 2021
5512a80
Merge pull request #1993 from lili-ffxi/patch-7
z16 Jan 24, 2021
8372e24
Merge pull request #1991 from lili-ffxi/patch-5
z16 Jan 24, 2021
ceb9ef2
Merge pull request #1990 from ianandersonlol/patch-4
z16 Jan 24, 2021
63c294d
Merge pull request #1989 from RubenatorX/patch-10
Chiaia Jan 24, 2021
5b8e331
Update slips.lua
KenshiDRK Feb 7, 2021
83073da
Merge pull request #1995 from KenshiDRK/dev
z16 Feb 7, 2021
f8d4bc4
Merge pull request #1947 from xurion/dev
z16 Feb 7, 2021
2d77f3e
Merge pull request #1983 from RubenatorX/patch-9
z16 Feb 7, 2021
7f19856
Update message_ids.lua
dtw Feb 7, 2021
b57d448
Merge pull request #1996 from dtw/pointwatch-jan21
z16 Feb 7, 2021
46caf0d
Merge pull request #1871 from AkadenTK/addons/jobchange
z16 Feb 7, 2021
b42bd9e
Yush: Added function support
z16 Feb 7, 2021
c0bcc0e
Packets fields.lua incoming `0x017` and `0x01B` for Assist Channels
RubenatorX Feb 9, 2021
05b2971
Unity Warps
Chiaia Feb 9, 2021
332c98c
Merge pull request #1998 from RubenatorX/patch-14
z16 Feb 10, 2021
780e841
Update slips.lua
KenshiDRK Feb 11, 2021
66cade8
Merge pull request #2000 from KenshiDRK/dev
z16 Feb 12, 2021
cba53dd
Fixing errors on Linkshell/Linkpearls/Pearlsacks
lili-ffxi Feb 13, 2021
c8fa161
Slips-be-fixed
Chiaia Feb 13, 2021
30b8859
Use logger instead of add_to_chat
dtw Feb 13, 2021
42ed61c
Adjust wording
dtw Feb 13, 2021
290f004
Update extdata.lua
lili-ffxi Feb 13, 2021
9cfde8c
Update extdata.lua
lili-ffxi Feb 13, 2021
c9fdaa7
Merge pull request #2001 from lili-ffxi/patch-8
z16 Feb 13, 2021
4d5c3c3
Whitespace
dtw Feb 13, 2021
4a0a241
Switch warning to notice
dtw Feb 13, 2021
24f3fb0
Use coroutine.sleep
dtw Feb 13, 2021
3b2700c
Whitespace
dtw Feb 13, 2021
116115e
Merge pull request #2003 from dtw/dtw_MacroChanger
z16 Feb 13, 2021
272ce4e
Update fields.lua
Feb 15, 2021
0d7ca0c
Merge pull request #2004 from ianandersonlol/patch-4
z16 Feb 15, 2021
93dd76e
Minor change to functions.schedule
lili-ffxi Feb 17, 2021
d2eb063
Merge pull request #2005 from lili-ffxi/patch-9
z16 Feb 17, 2021
f70c941
Bugfix
lili-ffxi Feb 19, 2021
2f6edcb
Merge pull request #2006 from lili-ffxi/patch-9
z16 Feb 19, 2021
191bc6f
Fixes for Kenshi Slip data so it doesn't break stuff.
Chiaia Mar 2, 2021
99f001f
Versions Bumps...
Chiaia Mar 2, 2021
e863250
Added mount music field to incoming 0x00A packet
teschnei Mar 7, 2021
cf0f1ae
Merge pull request #2007 from teschnei/fields-mount-music
z16 Mar 8, 2021
a827f92
[Battlemod] Singular/Plural addition
KenshiDRK Mar 13, 2021
2e28261
Typo bugfix
lili-ffxi Mar 14, 2021
3f231c0
Merge pull request #2011 from lili-ffxi/patch-1
Chiaia Mar 14, 2021
5820f92
fixing a bug
KenshiDRK Mar 17, 2021
19c6271
Add equipviewer addon
paulframe Mar 19, 2021
6160423
Five more built in item groups for Treasury.lua
kylericks Mar 24, 2021
d828596
Update Treasury.lua
kylericks Mar 24, 2021
bbdabd2
Merge pull request #2014 from kylericks/dev
z16 Mar 24, 2021
318c06c
various whitespace fixes, and author adjustment
RubenatorX Mar 24, 2021
7ed5899
comment header
RubenatorX Mar 24, 2021
a95d56f
whitespace fix
RubenatorX Mar 24, 2021
ed27828
header update
RubenatorX Mar 24, 2021
8898ee7
header update
RubenatorX Mar 24, 2021
5266cf6
header fix
RubenatorX Mar 24, 2021
840f311
header fix
RubenatorX Mar 24, 2021
f10ba66
header fix
RubenatorX Mar 24, 2021
52b8e11
Update to Treasury ReadMe.md
kylericks Mar 24, 2021
95e4697
Merge branch 'dev' of https://github.com/kylericks/Lua into dev
kylericks Mar 24, 2021
ebef7d8
Merge pull request #2015 from kylericks/dev
z16 Mar 24, 2021
380bab5
more fixes
KenshiDRK Mar 24, 2021
b6ca5b5
Update setbgm.lua
funkworkz Mar 26, 2021
42e0951
Merge pull request #2016 from funkworkz/patch-1
z16 Mar 26, 2021
adbe571
moved to main lua
RubenatorX Mar 29, 2021
4976f5e
Added bg settings and commands and other fixes
RubenatorX Mar 29, 2021
955e608
tab fixes and require parentheses
RubenatorX Mar 29, 2021
e42e631
more fixes
KenshiDRK Apr 1, 2021
4648583
equipviewer bugfix
RubenatorX Apr 12, 2021
604d288
Equipviewer Various Fixes
RubenatorX Apr 13, 2021
635318e
Equipviewer Various Fixes
RubenatorX Apr 13, 2021
96f3852
Add Equipviewer
RubenatorX Apr 13, 2021
23af758
Create README.md
RubenatorX Apr 13, 2021
2457d40
Update README.md
RubenatorX Apr 13, 2021
8d99469
Equipviewer Icon Extractor Hex Changes
RubenatorX Apr 13, 2021
7e1b699
Equipviewer finishing touches
RubenatorX Apr 13, 2021
45ed717
Update Equipviewer re-localize functions functions
RubenatorX Apr 13, 2021
c6a20d0
Merge pull request #2013 from RubenatorX/dev
z16 Apr 13, 2021
47c8acc
image fit bugfix and new game_path option
RubenatorX Apr 16, 2021
0b74ca0
equipviewer game_path fix
RubenatorX Apr 16, 2021
baacbcf
equipviewer add game_path
RubenatorX Apr 16, 2021
dbefed6
equipviewer remove extra print
RubenatorX Apr 16, 2021
0cfab9b
equipviewer remove extra print
RubenatorX Apr 16, 2021
6ea7d4b
Merge pull request #2020 from RubenatorX/patch-1
Chiaia Apr 16, 2021
04ca84c
equipviewer ffxi_path update
RubenatorX Apr 16, 2021
a6f4394
update equipviewer ffxi_path
RubenatorX Apr 16, 2021
2c9d0e6
requested changes
KenshiDRK Apr 17, 2021
a7c1546
Merge pull request #2010 from KenshiDRK/dev
z16 Apr 17, 2021
97fb5a4
Update addons.xml
Apr 18, 2021
6f9a66d
Add files via upload
ianandersonlol Apr 18, 2021
47300e2
Update addons.xml
Apr 18, 2021
21ad3ea
Update Stubborn.lua
Apr 18, 2021
0b78aeb
Update Stubborn.lua
Apr 18, 2021
3c03b0f
Update readme.md
Apr 18, 2021
dc7474d
Update refresh.lua
lili-ffxi Apr 20, 2021
f91eb07
Update refresh.lua
lili-ffxi Apr 20, 2021
c090358
Update statics.lua
lili-ffxi Apr 20, 2021
3f07f71
Update gearswap.lua
lili-ffxi Apr 20, 2021
1cebfa2
Merge pull request #2026 from lili-ffxi/patch-6
z16 Apr 20, 2021
e5f19ed
Update Stubborn.lua
May 5, 2021
9cf9d2b
Merge pull request #2024 from ianandersonlol/patch-5
z16 May 5, 2021
8bd4324
Update readme.md
May 12, 2021
3a64fda
Merge pull request #2029 from ianandersonlol/patch-6
z16 May 12, 2021
331e0c3
Add support for Gaol in JobChange
johnarnfield May 12, 2021
e4cf9e9
Merge pull request #2030 from johnarnfield/patch-3
z16 May 13, 2021
df25880
Merge pull request #2022 from RubenatorX/patch-2
z16 May 16, 2021
55b8f98
Make organizer work nearby Nomad/Pilgrim Moogles
lili-ffxi May 16, 2021
b105643
Update items.lua
lili-ffxi May 16, 2021
6c8b61f
Implemented new functions
lili-ffxi May 18, 2021
d85fff0
windower.ffxi_path game_path changes
RubenatorX May 18, 2021
5db1339
Merge pull request #2033 from RubenatorX/patch-3
z16 May 18, 2021
8834cef
Check for bag availableness.
lili-ffxi May 21, 2021
67125b9
Update Dimmer.lua
lili-ffxi May 21, 2021
b92307f
Version bump
lili-ffxi May 21, 2021
adea556
Version bump
lili-ffxi May 21, 2021
079a749
Version bump.
lili-ffxi May 21, 2021
6a4aff4
Few more tweaks
lili-ffxi May 22, 2021
1727dbd
Few more tweaks
lili-ffxi May 22, 2021
2cec3f4
Stray space
lili-ffxi May 22, 2021
144651f
Stray space
lili-ffxi May 22, 2021
d2d6865
Additional tweaks
lili-ffxi May 22, 2021
dff4790
Additional tweaks
lili-ffxi May 22, 2021
208af0d
Update fields.lua
KenshiDRK May 27, 2021
f123740
Update fields.lua
KenshiDRK May 28, 2021
8137c01
Update fields.lua
KenshiDRK May 28, 2021
99de2f3
Update action packet
KenshiDRK May 28, 2021
e642a88
Merge pull request #2035 from KenshiDRK/packet-lib
z16 May 28, 2021
886f2b7
Merge pull request #2036 from KenshiDRK/action-packet
z16 May 28, 2021
18fe5ab
Update actions.lua
KenshiDRK May 29, 2021
8b30b37
Merge pull request #2038 from KenshiDRK/actions-lib
Nifim May 29, 2021
7cabfab
Update Stubborn.lua
May 30, 2021
06f7619
Merge pull request #2039 from ianandersonlol/patch-7
z16 May 30, 2021
4bfb230
Fixes player.mp error on load
RubenatorX Jun 5, 2021
dc61272
Merge pull request #2040 from RubenatorX/patch-4
z16 Jun 5, 2021
eda1091
add additional clarity to pet display
Darkdoom22 Jun 5, 2021
320e059
add additional clarity to pet display
Darkdoom22 Jun 5, 2021
0eb3e39
remove parentheses
Darkdoom22 Jun 5, 2021
16cb3cc
Merge pull request #2041 from Darkdoom22/dev
z16 Jun 5, 2021
0de818d
Private Server Ammo disappear bandaid
RubenatorX Jun 7, 2021
6f9769d
Merge pull request #2042 from RubenatorX/patch-5
z16 Jun 7, 2021
3f3fdc7
Cap framerate on load if not in a cutscene
RubenatorX Jun 7, 2021
be70e9d
Merge pull request #2043 from RubenatorX/patch-6
z16 Jun 7, 2021
16d1fe4
June 9th 2021 Update
Chiaia Jun 10, 2021
3ff8646
Moogles are now cached and wiped on zone
lili-ffxi Jun 10, 2021
f63d708
Checking for valid_target
lili-ffxi Jun 10, 2021
0979e4f
Better check for valid_target
lili-ffxi Jun 10, 2021
b5acb93
Discussed changes
lili-ffxi Jun 10, 2021
e9af4b3
Trimming
lili-ffxi Jun 10, 2021
44daf4f
Removed extra argument and farm animals
lili-ffxi Jun 10, 2021
165d80a
Fixing Arconities
lili-ffxi Jun 10, 2021
657a54e
Final cleanup
lili-ffxi Jun 10, 2021
47a9bb3
Fixed oversight
lili-ffxi Jun 10, 2021
4bc8e2a
Version bump
lili-ffxi Jun 10, 2021
39d1a48
Merge pull request #2032 from lili-ffxi/patch-9
z16 Jun 10, 2021
95b8f72
Pulled get_bag_info out of the loop
lili-ffxi Jun 10, 2021
1ed6b39
Pulled get_bag_info out of the loop
lili-ffxi Jun 10, 2021
3342463
Using new luacore's correct bag.enabled value
lili-ffxi Jun 10, 2021
39fae0b
Switched to luacore's correct bag.enabled value
lili-ffxi Jun 10, 2021
7d282da
Merge pull request #2034 from lili-ffxi/patch-10
z16 Jun 11, 2021
62f8bea
Update slips.lua
KenshiDRK Jun 11, 2021
f7b043f
Merge pull request #2044 from KenshiDRK/slips-lib
z16 Jun 11, 2021
8ea9cd4
Extend soul_plates table
zach2good Jun 18, 2021
57c8694
Update
lili-ffxi Jun 21, 2021
7fcd3b8
Same fix, in mote libraries
lili-ffxi Jun 21, 2021
aed4210
Merge branch 'dev' into patch-2
lili-ffxi Jun 21, 2021
ffcaaae
Merge pull request #1892 from lili-ffxi/patch-2
z16 Jun 21, 2021
b9fa92c
Merge pull request #2047 from zach2good/extend_soul_plates_table
z16 Jun 21, 2021
30538bf
Create bcheck.lua
Sephodious Jun 24, 2021
a04d4de
Update bcheck.lua
Sephodious Jun 24, 2021
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
250 changes: 103 additions & 147 deletions addons/AutoRA/AutoRA.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,106 @@
--Copyright (c) 2013, Banggugyangu
_addon.author = 'Banggugyangu'
_addon.version = '3.0.0'
_addon.commands = {'autora', 'ara'}

require('functions')
local config = require('config')

local defaults = {
HaltOnTp = true,
Delay = 1.5
}

local settings = config.load(defaults)

local auto = false
local player_id

windower.send_command('bind ^d ara start')
windower.send_command('bind !d ara stop')

local shoot = function()
windower.send_command('input /shoot <t>')
end

local start = function()
auto = true
windower.add_to_chat(17, 'AutoRA STARTING~~~~~~~~~~~~~~')

shoot()
end

local stop = function()
auto = false
windower.add_to_chat(17, 'AutoRA STOPPING ~~~~~~~~~~~~~~')
end

local haltontp = function()
settings.HaltOnTp = not settings.HaltOnTp

if settings.HaltOnTp then
windower.add_to_chat(17, 'AutoRA will halt upon reaching 1000 TP')
else
windower.add_to_chat(17, 'AutoRA will no longer halt upon reaching 1000 TP')
end
end

local check = function()
if not auto then
return
end

local player = windower.ffxi.get_player()
if not player or not player.target_index then
return
end

if player.vitals.tp >= 1000 and settings.HaltOnTp then
auto = false
windower.add_to_chat(17, 'AutoRA HALTING AT 1000 TP ~~~~~~~~~~~~~~')
elseif player.status == 1 then
shoot()
end
end

windower.register_event('action', function(action)
if auto and action.actor_id == player_id and action.category == 2 then
check:schedule(settings.Delay)
end
end)

windower.register_event('addon command', function(command)
command = command and command:lower() or 'help'

if command == 'start' then
start()
elseif command == 'stop' then
stop()
elseif command == 'shoot' then
shoot()
elseif command == 'reload' then
setDelay()
elseif command == 'haltontp' then
haltontp()
elseif command == 'help' then
windower.add_to_chat(17, 'AutoRA v' .. _addon.version .. 'commands:')
windower.add_to_chat(17, '//ara [options]')
windower.add_to_chat(17, ' start - Starts auto attack with ranged weapon')
windower.add_to_chat(17, ' stop - Stops auto attack with ranged weapon')
windower.add_to_chat(17, ' haltontp - Toggles automatic halt upon reaching 1000 TP')
windower.add_to_chat(17, ' help - Displays this help text')
windower.add_to_chat(17, ' ')
windower.add_to_chat(17, 'AutoRA will only automate ranged attacks if your status is "Engaged". Otherwise it will always fire a single ranged attack.')
windower.add_to_chat(17, 'To start auto ranged attacks without commands use the key: Ctrl+D')
windower.add_to_chat(17, 'To stop auto ranged attacks in the same manner: Atl+D')
end
end)

windower.register_event('load', 'login', 'logout', function()
local player = windower.ffxi.get_player()
player_id = player and player.id
end)

--Copyright © 2013, Banggugyangu
--All rights reserved.

--Redistribution and use in source and binary forms, with or without
Expand All @@ -23,149 +125,3 @@
--ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


windower.register_event('load',function ()

version = '2.1.2'
delay = 0
RW_delay = 0
Ammo_delay = 0
retrn = 0
halt_on_tp = true
windower.send_command('unbind ^d')
windower.send_command('unbind !d')
windower.send_command('bind ^d ara start')
windower.send_command('bind !d ara stop')
windower.send_command('alias ara lua c autora')

end)

function start()
windower.add_to_chat(17, 'AutoRA STARTING~~~~~~~~~~~~~~')
player = windower.ffxi.get_player()
if player.status == 1 then
auto = 1
elseif player.status == 0 then
auto = 0
end
shoot()
end

function stop()
windower.add_to_chat(17, 'AutoRA STOPPING ~~~~~~~~~~~~~~')
auto = 0
end

function shoot()
windower.send_command('input /shoot <t>')
end

function shootOnce()
windower.send_command('input /shoot <t>')
end

--Function Author: Byrth
function split(msg, match)
local length = msg:len()
local splitarr = {}
local u = 1
while u <= length do
local nextanch = msg:find(match,u)
if nextanch ~= nil then
splitarr[#splitarr+1] = msg:sub(u,nextanch-match:len())
if nextanch~=length then
u = nextanch+match:len()
else
u = lengthlua
end
else
splitarr[#splitarr+1] = msg:sub(u,length)
u = length+1
end
end
return splitarr
end

function haltontp()

if halt_on_tp == true then
windower.add_to_chat(17, 'AutoRA will no longer halt upon reaching 1000 TP')
halt_on_tp = false
elseif halt_on_tp == false then
windower.add_to_chat(17, 'AutoRA will halt upon reaching 1000 TP')
halt_on_tp = true
end

end

windower.register_event('action',function (act)
local actor = act.actor_id
local category = act.category
local player = windower.ffxi.get_player()

if ((actor == (player.id or player.index))) then
if category == 2 then
if player.vitals['tp'] < 1000 then
if auto == 1 then
if player.status == 1 then
auto = 1
elseif player.status == 0 then
auto = 0
return
end
end
if auto == 1 then
windower.send_command('@wait 1.5;input /shoot <t>')
elseif auto == 0 then
end
else
if halt_on_tp == true then
windower.add_to_chat(17, 'AutoRA HALTING AT 1000 TP ~~~~~~~~~~~~~~')
return
else
if auto == 1 then
if player.status == 1 then
auto = 1
elseif player.status == 0 then
auto = 0
return
end
end
if auto == 1 then
windower.send_command('@wait 1.5;input /shoot <t>')
elseif auto == 0 then
end
end
end
end
end
end)

--Function Designer: Byrth
windower.register_event('addon command',function (...)
local term = table.concat({...}, ' ')
local splitarr = split(term,' ')
if splitarr[1]:lower() == 'start' then
start()
elseif splitarr[1]:lower() == 'stop' then
stop()
elseif splitarr[1]:lower() == 'shoot' then
shoot()
elseif splitarr[1]:lower() == 'reload' then
setDelay()
elseif splitarr[1]:lower() == 'haltontp' then
haltontp()
elseif splitarr[1]:lower() == 'help' then
windower.add_to_chat(17, 'AutoRA v'..version..'commands:')
windower.add_to_chat(17, '//ara [options]')
windower.add_to_chat(17, ' start - Starts auto attack with ranged weapon')
windower.add_to_chat(17, ' stop - Stops auto attack with ranged weapon')
windower.add_to_chat(17, ' haltontp - Toggles automatic halt upon reaching 1000 TP')
windower.add_to_chat(17, ' help - Displays this help text')
windower.add_to_chat(17, ' ')
windower.add_to_chat(17, 'AutoRA will only automate ranged attacks if your status is "Engaged". Otherwise it will always fire a single ranged attack.')
windower.add_to_chat(17, 'To start auto ranged attacks without commands use the key: Ctrl+d')
windower.add_to_chat(17, 'To stop auto ranged attacks in the same manner: Atl+d')
end
end)
83 changes: 83 additions & 0 deletions addons/BCheck/bcheck.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
--[[
Copyright © 2021, Sephodious
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Better Check nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Sephodious BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

inspired by Battlemod (Byrth) from Windower and Checker (atom0s & Lolwutt) from Ashita
]]--

_addon.name = 'Better Check'
_addon.author = 'Sephodious' -- Rubenator basically wrote this with me, thanks again
_addon.version = '1.0'

-- sets local variables and requires
local packets = require ('packets')
local message_data = require ('resources').action_messages
require('chat')
require('sets')

-- sets local tables
local valid_message_ids = S{170,171,172,173,174,175,176,177,178}
local mchal = {'Very Weak':color(259),'Inredibly Easy Prey':color(259),'Easy Prey':color(259),'A Decent Challenge':color(2),'Evenly Matched':color(53),'Tough':color(159),'Very Tough':color(124),'Incredibly Tough':color(167)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this table (and mstat as well) into multiple lines, just so the colors are more easily adjustable. This could also be made configurable via settings, so every user can define their own colors, but it's fine for the first version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo on IEP - Inredibly should be Incredibly.
Is there a reason for changing "Too Weak to be Worthwhile" to "Very Weak"? I understand that some of the other slight changes are probably to allow for a more natural flowing sentence, but Too Weak... fits fine as it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to match in-game terms imo.

local mstat = {'high evasion and defense','high evasion','high evasion but low defense','high defense','base defense and evasion','low defense','low evasion but high defense','low evasion','low evasion and defense'}


-- uses incoming chunk so that we can block standard /check text
windower.register_event('incoming chunk',function (id,original,modified,injected,blocked)

-- ignores packets that don't begin with 29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it ignores packets that don't have ID 0x029 :)

if id == 0x029 then

local mobinfo = packets.parse('incoming', original)
local message_id = mobinfo['Message']

-- tests message_id against valid_message_ids to ensure this only fires off if they match
if valid_message_ids:contains(message_id) then

local target = windower.ffxi.get_mob_by_id(mobinfo['Target']) or {name=('Unknown')} -- gets mob name
local lvl = mobinfo['Param 1']

-- gets mob level
if lvl > 0x7FFFFFFF then
lvl = -1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using something like '?' would be better than -1, I feel that would just be confusing for non-technical people who don't know that -1 is sometimes used as a dummy value.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 is in line with the behavior of battlemod. The value is used to describe the mobs one would fight at level 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still feels wrong unless -1 is the actual value reported. Speaking of which, what is the actual value?

Copy link
Collaborator

@RubenatorX RubenatorX Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2147483649 (0x80000001)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry nvm its reporting 4294967295 (0xFFFFFFFF) which is twos compliment for -1

Copy link
Collaborator

@RubenatorX RubenatorX Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay so Sephodious, we talked it over and if you require('bit') with the rest of your requires... and then instead of doing...

            local lvl = mobinfo['Param 1']
            
            -- gets mob level
            if lvl > 0x7FFFFFFF then
                lvl = -1
            end

Just do

local lvl = bit.tobit(mobinfo['Param 1']) -- convert unsigned int to signed int

end

local chal = mchal[mobinfo['Param 2'] - 63]
local stat = mstat[message_id - 170]

windower.add_to_chat(5, "The [%s] is (Lvl.%s), has ~%s~ and seems like its {%s}":format(target.name:color(2), tostring(lvl):color(213), stat:color(1), chal))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"seems like its" -> "seems like it's"

return true -- blocks standard /check message

-- sets output for NMs
else if (message_id == 249) then
local target = windower.ffxi.get_mob_by_id(mobinfo['Target']) or {name=('Unknown')}

windower.add_to_chat(2, "[%s] Their power is over 9000!! (Impossible to gauge)":format(target.name:color(167)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if many people would appreciate that line 😅 Probably better to just use a neutral text, like Impossible to gauge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lol'd . IDK how I feel about this one. Arcon makes a point but these add-ons are made by the community and a little personal flavor text never hurt anyone. Its not like we're some real project.

return true -- blocks standard /check message

end
end
end
end)
25 changes: 25 additions & 0 deletions addons/BattleStations/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright © 2018, Sjshovan (Apogee)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Battle Stations nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Sjshovan (Apogee) BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading