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

Add support for items in shortcuts addon. #2076

Open
wants to merge 1,040 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1040 commits
Select commit Hold shift + click to select a range
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
78dfcca
July 11th, 2021 Update
Chiaia Jul 12, 2021
492797b
Update thtracker.lua
KenshiDRK Jul 12, 2021
789f37b
Battlemod update
KenshiDRK Jul 12, 2021
7dfae43
Merge pull request #2052 from KenshiDRK/thtracker
z16 Jul 13, 2021
3167158
Update statics.lua
KenshiDRK Jul 13, 2021
a03b322
Update slips.lua
KenshiDRK Jul 13, 2021
2f7c74d
Merge pull request #2054 from KenshiDRK/Slips-lib
z16 Jul 13, 2021
85ff50e
Linkshell name and color fixes
RubenatorX Jul 15, 2021
154dbf1
Merge pull request #2056 from RubenatorX/patch-7
z16 Jul 16, 2021
2e6f9b6
Update roe.lua
Jul 17, 2021
8c7d7b4
Update roe.lua
Jul 17, 2021
d283225
Update roe.lua
Jul 17, 2021
8c7b1aa
Added Nomad Moogle check.
lili-ffxi Jul 17, 2021
20a0516
Added poke to Nomad Moogles
lili-ffxi Jul 17, 2021
e05ab95
Removing leftover debug lines
lili-ffxi Jul 17, 2021
92abc7d
Typo fix
lili-ffxi Jul 17, 2021
5e21c85
Commas
lili-ffxi Jul 17, 2021
253042c
Parentheses and spaces
lili-ffxi Jul 17, 2021
735fee3
Merge pull request #2058 from lili-ffxi/patch-7
z16 Jul 17, 2021
383f893
Update roe.lua
Jul 18, 2021
06a5c67
Update roe.lua
Jul 18, 2021
e5121af
Merge pull request #2057 from ianandersonlol/patch-11
z16 Jul 18, 2021
dac29e9
Typo fix
lili-ffxi Jul 21, 2021
cf72765
Merge pull request #2060 from lili-ffxi/patch-1
Nifim Jul 21, 2021
14a0ccf
Version Bump
lili-ffxi Jul 22, 2021
9e93774
Removed Pilgrim moogle
lili-ffxi Jul 22, 2021
98b8329
Very Small Update to the Max
Chiaia Jul 23, 2021
2d3e142
Merge pull request #2061 from lili-ffxi/patch-2
Chiaia Jul 23, 2021
31b1d50
Merge pull request #2053 from KenshiDRK/battlemod
z16 Jul 23, 2021
91b906b
Added echo output as requested by a user.
Chiaia Jul 26, 2021
ac7d9cc
Treasury: Added check for item validity
z16 Jul 27, 2021
b902a24
Update craft.lua
Aug 4, 2021
9f957d7
Update README.md
Aug 4, 2021
aed7715
Merge pull request #2066 from ianandersonlol/patch-12
z16 Aug 4, 2021
d7eb005
fix flatten
RubenatorX Aug 16, 2021
f7a8373
Merge pull request #2073 from RubenatorX/patch-9
alphaONE2 Aug 16, 2021
d02d19f
Inventory Full Cannot Bid
Chiaia Sep 6, 2021
7b15fe8
Adding Levin to Slips lib
KenshiDRK Sep 7, 2021
b1d8dc6
Merge pull request #2077 from KenshiDRK/Slips-Update
z16 Sep 7, 2021
c038655
Update slips.lua
KenshiDRK Sep 15, 2021
254835f
Merge pull request #2078 from KenshiDRK/Slips-Update
z16 Sep 15, 2021
3f65070
Update setbgm.lua
funkworkz Sep 16, 2021
209a739
Fix gearswap (requires monster_skills.lua)
Byrth Sep 16, 2021
60e6d5a
fix shortcuts (requires monster_skills.lua)
Byrth Sep 16, 2021
82e6653
version bumps
Byrth Sep 16, 2021
5a233e8
Merge pull request #2079 from funkworkz/patch-2
Chiaia Sep 16, 2021
00cbce7
Merge pull request #2080 from Windower/gearswap-shortcuts-monstrosity…
z16 Sep 16, 2021
02f95fa
A few functions for decoding dialog entries
trv6 Sep 27, 2021
f04b053
Update messages and Add Low/Mid D Tower to be extracted
Chiaia Oct 1, 2021
b2ab69c
Merge pull request #2081 from trv6/dialog
z16 Oct 7, 2021
84cc1a7
change based on CHA CHA CHA's info
Byrth Oct 11, 2021
e4432cf
Merge pull request #2084 from Windower/adjust_0x01C_incoming
Byrth Oct 11, 2021
566a726
fixed comment numbering for 0x01C
Byrth Oct 11, 2021
ea338e4
Merge pull request #2085 from Windower/fix_comment_numbering
Byrth Oct 11, 2021
394ebfb
Update README.md
zetaepyon Nov 2, 2021
f774195
Master Levels Update 1
RubenatorX Nov 10, 2021
60e1e9b
Merge pull request #2091 from RubenatorX/patch-12
alphaONE2 Nov 10, 2021
0023a17
[thtracker] variable fix
KenshiDRK Nov 10, 2021
411d14f
Slips lib Update
KenshiDRK Nov 10, 2021
21b32bd
Merge pull request #2093 from KenshiDRK/Slips
Nifim Nov 10, 2021
657bd2d
Merge pull request #2092 from KenshiDRK/Thtracker
Chiaia Nov 10, 2021
6e2dbc3
Fix dupe label
Chiaia Nov 10, 2021
5ade870
Update Master Level 2
RubenatorX Nov 11, 2021
22b865b
Master Levels Update 2
RubenatorX Nov 11, 2021
ffa2cce
Master Level Update 2
RubenatorX Nov 11, 2021
cf18fa9
Master Level Update 2
RubenatorX Nov 11, 2021
39d50b3
Merge pull request #2096 from RubenatorX/patch-15
z16 Nov 12, 2021
7620dd2
the table's hex keys are interpreted as unsigned
Byrth Nov 14, 2021
410cd5e
Add support for items in shortcuts addon.
bsb002-flash-tester Sep 2, 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)
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