|
auto RA plugin help
By zerowing 2019-08-07 15:54:24
Hello, I am trying to modify the existing AutoRA to check for ammo and automatically WS when 1000 tp for skilling up. I managed to get the WS part to work but it stops after performing the weapon skill. I have haltontp disabled. Im a noob to LUA code so could anyone point me in the right direction? I would really appreciate it. Thank you :) Code _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 ws = function()
windower.send_command('input /ws "Detonator" <t>')
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 then
shoot()
else
ws()
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 == 'ws' then
ws()
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
--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 <addon name> 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 <your name> 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.
By Jetackuu 2019-08-07 19:54:06
There isn't an autora plugin.
By zerowing 2019-08-07 19:58:48
wow ty where did you find this? do I save this in addons with a filename and then lua load "filename" ingame? sry im rly new to this
By Galkapryme 2019-09-06 04:49:45
Can I assume such a plugin/addon is generally only useful for skilling up or WS trials? seems like a good way to get too much hate, then yer stuck until you turn the lua off.
Server: Asura
Game: FFXI
Posts: 35
By Asura.Korgull 2019-09-06 08:39:32
You can configure it to stop at 1k or 3k tp, then it'll stop to let you WS manually.
Can be useful for skillups, but i found manual input to be faster.
Hello, I am trying to modify the existing AutoRA to check for ammo and automatically WS when 1000 tp for skilling up. I managed to get the WS part to work but it stops after performing the weapon skill. I have haltontp disabled. Im a noob to LUA code so could anyone point me in the right direction? I would really appreciate it. Thank you :) Code _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 ws = function()
windower.send_command('input /ws "Detonator" <t>')
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 then
shoot()
else
ws()
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 == 'ws' then
ws()
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
--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 <addon name> 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 <your name> 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.
|
|