Auto RA

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » FFXI » Jobs » Ranger » Auto RA
Auto RA
 Phoenix.Capuchin
Offline
Server: Phoenix
Game: FFXI
user: Anza
Posts: 2231
By Phoenix.Capuchin 2018-06-14 01:10:40
Link | Quote | Reply
 
Leviathan.Celebrindal said: »
Until there is I'll keep shooting manually and still coming damn close to a plugin.

/highfive. As a non-autoRA Windower RNG, hell yeah. There is something to be said for the satisfaction of hanging with plugins just from being so in tune with the animations. There is also something to be said for NOT getting carpal tunnel syndrome, but I gotta get my pew pew DPS, health be damned.

I don't tend to play RNG when I'm not up to focus though...
[+]
necroskull Necro Bump Detected! [193 days between previous and next post]
 Asura.Karumac
Offline
Server: Asura
Game: FFXI
user: Karuma
Posts: 21
By Asura.Karumac 2018-12-23 19:27:04
Link | Quote | Reply
 
I am very aware this is a necro, but I wrote this really simple auto RA today and it usually works fine. It's just to save me from having to spam a macro as the OP wanted, not to press go and walk away.

It goes right into a GS lua and has no dependencies.
Code
function file_load ()
		send_command('bind f10 gs c ShootModeChange')
		ShootMode = 'Manual'
		send_command('bind numpad0 input /ra <t>')
end
--Binds the toggle to F10 and RA to numpad 0.

function file_unload ()
		send_command('unbind f10')
		send_command('unbind numpad0')
end
function self_command(command)
	if command == 'ShootModeChange' then
		if command == 'ShootModeChange' and ShootMode == 'Manual'
			then ShootMode = 'Auto'
		elseif command == 'ShootModeChange' and ShootMode == 'Auto'
			then ShootMode = 'Manual'
		end
		add_to_chat(122, "Ranged attack set to: " .. ShootMode)
	end
end
--Conatins the logic for the toggle bind.

function aftercast(spell)

	equip(sets.aftercast.engaged)
	if spell.action_type == 'Ranged Attack' and spell.interrupted == false and ShootMode == 'Auto' and player.tp<1000 then
		send_command('@wait 1.2;input /ra <t>;')
	elseif spell.type == 'WeaponSkill' and spell.interrupted == false and ShootMode == 'Auto' then
		send_command('@wait 3;input /ra <t>;')
		--add_to_chat(122, "WS")
	end
end
--All the automation is inside aftercast. Put in whatever WS you wanna use where it says Jishnu's.


Edit: I took out things that should not exist.
 Leviathan.Celebrindal
Offline
Server: Leviathan
Game: FFXI
Posts: 1578
By Leviathan.Celebrindal 2018-12-23 23:51:51
Link | Quote | Reply
 
These kinds of /wait scripts will always fall behind a very active real player or a packet-based AutoRA.

The time between /ra's is not static- that's exactly what Rapid Shot does...vary the delay. If all we had was Snapshot, then yes, it would be a standard delay between every /ra, very predictable outside of game lag. But Rapid Shot randomly reduces the delay of some variant between 2%-50%. More gear doesn't push this reduction of delay higher, just the proc rate. So there's no way with a simple /wait line to accurately predict this.

If you have an addon that is monitoring the packets of each /ra, then your plugin will see when Rapid Shot proc'ed and adjust the /wait time appropriately (simplistic guessing here, I am very far below the ability to write such things).

If you ever wish to experiment with how Rapid Shot works, just lock your gear with every key slot having as much Rapid as you can find(easier on COR to find huge chunks of Rapid w/o Snap) and little to no Snapshot, then go fire without Flurry on a static target. You'll feel that random 2-50% delay reduction a lot more if you increase your base delay, and you'll see how it fluctuates.


Lastly, bravo on the lines of code that for many will be quite sufficient.
 Asura.Karumac
Offline
Server: Asura
Game: FFXI
user: Karuma
Posts: 21
By Asura.Karumac 2018-12-24 01:49:09
Link | Quote | Reply
 
Well, you see, since it's being fired by the aftercast function of gearswap, it is looking at the packets to see when the shot fires.

Those waits in there are to account for the 1 second JA and 2-3 second WS delay that always exist.
Offline
Posts: 3
By Sheathe 2018-12-26 22:50:25
Link | Quote | Reply
 
I tried putting this in my RNG.lua to test, but it doesn't seem to work. Am I adding it into the wrong .lua file?
 Asura.Karumac
Offline
Server: Asura
Game: FFXI
user: Karuma
Posts: 21
By Asura.Karumac 2018-12-29 10:59:56
Link | Quote | Reply
 
Does your RNG lua already have an aftercast function in it?
 Leviathan.Celebrindal
Offline
Server: Leviathan
Game: FFXI
Posts: 1578
By Leviathan.Celebrindal 2018-12-29 11:04:59
Link | Quote | Reply
 
Asura.Karumac said: »
Well, you see, since it's being fired by the aftercast function of gearswap, it is looking at the packets to see when the shot fires.

Those waits in there are to account for the 1 second JA and 2-3 second WS delay that always exist.

Considering the inaccuracies with Gearswap when dealing with high lag (read: Dynamis-D), how reliable is such a function within a lua versus a separate addon?

Again, I'm not nearly accomplished on the programming/writing end of things (hell, my training is as a professional Bassoonist lmao), I'm just going off of experiences here and personal testimony.
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 826
By Shiva.Arislan 2018-12-29 11:20:52
Link | Quote | Reply
 
AutoRA whatever, to each his own... but that ***where it automatically WS for you is just plain dangerous.
[+]
 Asura.Karumac
Offline
Server: Asura
Game: FFXI
user: Karuma
Posts: 21
By Asura.Karumac 2018-12-29 11:27:48
Link | Quote | Reply
 
I'm sure a separate addon would have the same lag issues.

And yeah I should probably not leave the auto WS part in there on here. That is a bit dangerous to put in the wild. It's only there because the original auto RA function didn't have an easy off button so I couldn't WS.

The latest version now instead waits at some TP threshold, and auto RAs after the player uses a WS command.
necroskull Necro Bump Detected! [139 days between previous and next post]
 Bahamut.Sixty
Offline
Server: Bahamut
Game: FFXI
user: Kvaal
Posts: 5
By Bahamut.Sixty 2019-05-17 07:53:23
Link | Quote | Reply
 
If you do use a macro, with capped snapshot etc. will a /wait 1 put your midshot gear on in time?
Offline
Posts: 159
By Cronnus 2019-05-17 08:00:10
Link | Quote | Reply
 
Bahamut.Sixty said: »
If you do use a macro, with capped snapshot etc. will a /wait 1 put your midshot gear on in time?

Not always. Especially if rapid shot procs. I cant speak for windower but ashita seems to be spot on for changing perfectly. I'm sure windower is the same greatness. But in game macro it will definitely fail here and there.
 Bahamut.Sixty
Offline
Server: Bahamut
Game: FFXI
user: Kvaal
Posts: 5
By Bahamut.Sixty 2019-05-17 08:21:32
Link | Quote | Reply
 
I'm guessing there's no way around that? Like dropping the wait would just mess up
Offline
Server: Excalibur
Game: FFXIV
user: misacat
Posts: 2972
By Nadleeh Sakurai 2019-05-17 10:10:38
Link | Quote | Reply
 
you could say...
it was an...
Au'Ra ?

Offline
Posts: 6552
By Afania 2019-05-17 11:17:11
Link | Quote | Reply
 
Bahamut.Sixty said: »
I'm guessing there's no way around that? Like dropping the wait would just mess up

Do not use wait 1 for any of the snapshot/FC gears. It will mess up because 1 sec is too damn long.

Use /equip item /Ra or /ma then /equipset for FC/snapshot.
 Bahamut.Sixty
Offline
Server: Bahamut
Game: FFXI
user: Kvaal
Posts: 5
By Bahamut.Sixty 2019-05-17 13:35:43
Link | Quote | Reply
 
As in 2 macros per shot?
Offline
Posts: 2291
By eliroo 2019-05-17 13:41:01
Link | Quote | Reply
 
Your macro should be

Line 1 : /equipset preshot
Line 2 : /ra <t>
Line 3 : /equipset midshot
Offline
Posts: 9
By Kvaal 2019-05-17 13:43:41
Link | Quote | Reply
 
Ah that makes sense, thanks. And in game that wont overlap gear or anything? In the way the game sends packages it will do one set then the other?
 Bahamut.Sixty
Offline
Server: Bahamut
Game: FFXI
user: Kvaal
Posts: 5
By Bahamut.Sixty 2019-05-17 13:51:55
Link | Quote | Reply
 
Yeah, only get command error with that and I stay in preshot
 Asura.Chaostaru
Offline
Server: Asura
Game: FFXI
Posts: 686
By Asura.Chaostaru 2019-05-17 13:58:57
Link | Quote | Reply
 
just use a pre made cor/rng gearswap lua and copy/paste your gear in there.

it'll handle all of that and more.
Offline
Posts: 6552
By Afania 2019-05-17 21:20:04
Link | Quote | Reply
 
eliroo said: »
Your macro should be

Line 1 : /equipset preshot
Line 2 : /ra <t>
Line 3 : /equipset midshot

No, this is not how it works.....Thats not what I said.

Afania said: »
Use /equip item /Ra or /ma then /equipset for FC/snapshot.

/equip body snapshot gear
/equip head snapshot gear
/equip legs snapshot gear
(Add as many line as you need here)
/ra <t>
/equipset midshot set

The idea is that there are no 1 sec lag between /equip item, unlike /equipset. So you can build macros and swap gears as often as you like within 1 sec as long as there are less than 1 /equipset used.

I do my fc/preshot and "swap to hybrid when I see mob red line" gear this way. /equip item is the only command that will let me swap gears this often. Without windower, avoid using 2 equipset in short time at all cost.


Bahamut.Sixty said: »
As in 2 macros per shot?

You will need 2 minimium without 3rd pt tool, but I use 3 in dyna D to avoid lag. Ive found that in alliance content or dyna D /ra <t> line often wont run with too many lines before it.

In ambuscade 2 macro works. I generally click 1st macro(snapshot one) right after a shot, but before next /ra can be used. Then click my 2nd one as soon as next /ra window open.
[+]