Update RNG Lua

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » FFXI » Jobs » Ranger » update RNG lua
update RNG lua
First Page 2
 Bismarck.Cladbolg
Offline
Server: Bismarck
Game: FFXI
user: cladbolg
Posts: 44
By Bismarck.Cladbolg 2017-10-11 01:08:59
Link | Quote | Reply
 
Hi guys. I've been scouring the forums and google for any updated lua.

I cant find anything beyond 2016. Does anyone mind sharing their's?
If it takes into account Flurry 1/2 that would be awesome. Thank you.
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2017-10-11 01:42:05
Link | Quote | Reply
 
Here is my current lua. A few features/notes about it-

Keybinds: CTRL-`(key left of #1) changes preshot flurry set from flurry 1(default) to flurry 2. Sets are labeled as ".Any" for Flurry 1 sets and ".RDM" for Flurry 2 sets (as in, any mage can flurry you, only RDMs can flurry 2 you). If you don't have any flurry, the lua will default to "sets.Preshot.{weaponname}"

CTRL(minus key) changes the ranged accuracy level. TP, Barrage, and Weaponskill sets all move with the accuracy change.

CTRL(equal sign) locks or unlocks PDT set.

Now for some notes on the lua.

3 levels of preshot for every weapon- they are different because Gastraphetes has Snapshot on it and thus requires differing sets than other options. Yoichi works in the same way (although with different values) if you use one. Otherwise, the Fomalhaut preshot sets work for standard weapons.

4 accuracy options for each weapon. Default is "LowACC", then "MidACC", finally "HighACC". A 4th set of "Fodder" is the lowest accuracy set for Fomalhaut and Fail-not as they both use mainhand/offhand weapons that actually possess ranged stats, as opposed to Gastraphetes using Malevolences. TP sets have slight variances based on differences in delay of Annihilator vs. Fomalhaut, and slight differences in ranged accuracy needs of Gastraphetes and Gandiva based on mainhand/offhand choices for damage.

AM3 set for Gandiva. This set focuses on critical hit rate/damage, and automatically procs when you have AM3 active AND Gandiva equipped. Can be changed to work for Armageddon easily by changing the following lines:

Line 291, change sets.Midshot.Gandiva.AM to match the name of the weapon you want in this set.
Line 567, again change the set name to match your weapon of choice.
Line 565, change "if player.equipment.range == "Gandiva"" so that the weapon matches yours.

This is really only effective with the Empyrean weapons, but I guess there is limited use for the aftermath associated with the Relic Weapons as well.


Doubleshot sets that equip the Oshosi gear I use while Doubleshot is active.

Camouflage set that defaults while the buff is active, focusing on crit damage.

Automatically equips Hachirin-no-obi during Trueflight if you have Aurorastorm and Wildfire if you have Firestorm.

Adjusts Last Stand and Trueflight for Moonshade Earring usage, automatically swapping it out when you have more than 2249TP. This is set up if you are primarily a Fomalhaut user. If you do not use a Fomalhaut, change line 517 to read if player.tp > 2749" instead of 2249 to compensate for not having Fomalhaut's TP Bonus.

That covers the nuts and bolts. Hope it can help some people. By the way, this one has some slight changes to the version I posted last month in the Ranger sticky.
 Leviathan.Kamal
Offline
Server: Leviathan
Game: FFXI
user: kamal
Posts: 2
By Leviathan.Kamal 2017-10-29 11:58:44
Link | Quote | Reply
 
function midcast(spell,action)
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
elseif sets.WS[spell.english] then
equip(sets.WS[spell.english])
elseif spell.action_type == 'Ranged Attack' then equip(sets.Midshot)
if buffactive['Barrage'] then equip(sets.JA['Barrage'])
elseif spell.action_type == 'Ranged Attack' and buffactive['Double shot'] then
equip(sets.JA['Double shot'])
elseif spell.action_type == 'Ranged Attack' and buffactive['Camouflage'] then
equip(sets.JA['Camouflage'])




I am having hell getting the lua to work with barrage and double shot, using the JA results in the gear equip but with the buff is active it is still reverting back to preshot and midshot gear, any advice?
necroskull Necro Bump Detected! [32 days between previous and next post]
Offline
Posts: 130
By Archaide 2017-11-30 02:09:52
Link | Quote | Reply
 
Leviathan.Kamal said: »
function midcast(spell,action)
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
elseif sets.WS[spell.english] then
equip(sets.WS[spell.english])
elseif spell.action_type == 'Ranged Attack' then equip(sets.Midshot)
if buffactive['Barrage'] then equip(sets.JA['Barrage'])
elseif spell.action_type == 'Ranged Attack' and buffactive['Double shot'] then
equip(sets.JA['Double shot'])
elseif spell.action_type == 'Ranged Attack' and buffactive['Camouflage'] then
equip(sets.JA['Camouflage'])




I am having hell getting the lua to work with barrage and double shot, using the JA results in the gear equip but with the buff is active it is still reverting back to preshot and midshot gear, any advice?

I'm having the same issue, can anyone fix this? This is my first experience with gearswap and lua's. Makes a big difference on RNG for sure. And thx Celebrindal for sharing I too have been looking around for good lua to no avail until now.
 Bahamut.Ivebian
Offline
Server: Bahamut
Game: FFXI
user: Smg1388
Posts: 39
By Bahamut.Ivebian 2017-11-30 18:19:35
Link | Quote | Reply
 
In the case of double shot
function midcast is checking for sets.Midshot['weapon name'][AccArray].Doubleshot
however gearsets are written as sets.Midshot['weapon name'].Doubleshot[AccArray]

replace all instances of
.Doubleshot.MidACC with .MidACC.Doubleshot
.Doubleshot.HighACC with .HighACC.Doubleshot
.Doubleshot.Fodder with .Fodder.Doubleshot

You can find the original file by Bokura Here, which is a good base to get started.
Tip: Use command //gs showswaps to print gear changes to chat log.
[+]
Offline
Posts: 130
By Archaide 2017-11-30 19:48:42
Link | Quote | Reply
 
That's awesome thanks, I was able to fix Barrage as well.
Offline
By Nanerz 2017-12-04 22:09:49
Link | Quote | Reply
 
I'm having a problem, I have showswaps on and it's saying that it is changing from pre-shot to mid-shot but when I have my equipment window open it is not putting the pre shot set on, it's going from melee (Saying in chat that it changed to pre shot but it didn't) then it actually puts on mid shot and back to melee.
 Asura.Heeroyuy
Offline
Server: Asura
Game: FFXI
Posts: 46
By Asura.Heeroyuy 2017-12-05 01:42:13
Link | Quote | Reply
 
Gearswap is fast enough to change without physically seeing it in your equip window, if it's printing to the log, it swapped it. It won't print a specific gear to chat log if it didn't change it.
Offline
By Nanerz 2017-12-05 07:17:22
Link | Quote | Reply
 
Ok thanks.
 Asura.Sagaxi
Offline
Server: Asura
Game: FFXI
user: xXSagaXx
Posts: 112
By Asura.Sagaxi 2017-12-30 14:07:33
Link | Quote | Reply
 
-Hi Celebrindal,

Looking up trying something new lua wise, but after messing a bit with it, I still come with a question, is there a keybing to toggle weapon change (array, etc)?

Thanks!
 Bahamut.Ivebian
Offline
Server: Bahamut
Game: FFXI
user: Smg1388
Posts: 39
By Bahamut.Ivebian 2017-12-30 15:41:20
Link | Quote | Reply
 
Follow the directions here to add keybinds for Bokuras files.
[+]
necroskull Necro Bump Detected! [30 days between previous and next post]
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2018-01-29 11:16:03
Link | Quote | Reply
 
There were a few errors in the lua that I posted, and while I changed the errors in my personal lua, I never re-uploaded it to github. I've now polished off my RNG lua, so that it includes all the information in my original post above along with proper sets for all ranged RMEA weapons, including aftermath sets for Gandiva, Armageddon, Annihilator, and Gastraphetes. Also includes PDT/MDT locks, accuracy array toggle (levels are "LowACC","MidACC","HighACC", and "Aftermath"), flurry level toggle.

If this one causes problems, let me know. But this is the current lua I use.

Here is my current Ranger Lua

edit- just saw the question above about changing weapons. I have a section in the sets area that are lableled with this nomenclature- "sets.(weaponname)" (not including the parentheses) that includes the range,ammo,main and sub slots. I then have a row of macros lableled each weapon name, and the command in the macro is "/console gs equip sets.(weaponname)" and an "/echo (weaponname)" to keep me appraised. I make my RNG lockstyle set to purposely NOT include those four slots (range,ammo,main,sub) so I can visually see the weapon I'm using when I shoot.
 Asura.Patb
Offline
Server: Asura
Game: FFXI
user: Patbee
Posts: 86
By Asura.Patb 2018-01-29 16:27:19
Link | Quote | Reply
 
Leviathan.Celebrindal said: »
edit- just saw the question above about changing weapons. I have a section in the sets area that are lableled with this nomenclature- "sets.(weaponname)" (not including the parentheses) that includes the range,ammo,main and sub slots. I then have a row of macros lableled each weapon name, and the command in the macro is "/console gs equip sets.(weaponname)" and an "/echo (weaponname)" to keep me appraised. I make my RNG lockstyle set to purposely NOT include those four slots (range,ammo,main,sub) so I can visually see the weapon I'm using when I shoot.

Are these macros you manually made? I'm not seeing anything in the lua referencing weapon swapping or echo.
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2018-01-29 16:39:08
Link | Quote | Reply
 
manual macros. I create the "sets" for each weapon and corresponding main/sub slots just to simplify swapping via macros. The "/console gs" command is very potent and has many uses in vanilla macros.
necroskull Necro Bump Detected! [335 days between previous and next post]
Offline
Posts: 221
By olson2189 2018-12-30 12:16:16
Link | Quote | Reply
 
Cele, do you have a more recent updated lua you could share? It looks like this one is pre relic +3 and pre dyna neck.
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2018-12-30 13:19:37
Link | Quote | Reply
 
Just copied over my current lua to the same link- here's a fresh one:

Up to date RNG lua

Includes key pieces of Relic+3 (head/body/legs) as well as introduction of dyna neck into preshot sets. At the moment I only have +1 neck as I'm saving for some Corsair gear because my COR is getting more work these days with Dyna than my RNG does (oh he comes out, just not as frequently), but the Scout's Gorget+1 and its +3 snapshot does allow for some unique options with preshot sets. I've made some minor tweeks and will be doing more now that I've also upgraded to HQ Adhemar legs for preshot as well as midshot, adding some snap there, too.

As always, I'm sure others have great options and maybe things that are cleaner than mine, but always happy to share what I do have.
[+]
Offline
Posts: 221
By olson2189 2018-12-30 13:26:16
Link | Quote | Reply
 
Thanks! As a heads up, it looks like there are a few spots where Arc. Jerkin +1 is referenced rather than +3.
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2018-12-30 13:43:54
Link | Quote | Reply
 
olson2189 said: »
Thanks! As a heads up, it looks like there are a few spots where Arc. Jerkin +1 is referenced rather than +3.


/facepalm. Updated to fix that.
Offline
Posts: 221
By olson2189 2018-12-30 16:57:19
Link | Quote | Reply
 
I just increased your dps by at least 5% :P
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2018-12-30 18:26:03
Link | Quote | Reply
 
strangely enough it wasn't all of them-laziness on my part.
 Asura.Yoshimuru
Offline
Server: Asura
Game: FFXI
user: Yoshimuru
Posts: 26
By Asura.Yoshimuru 2019-01-16 00:21:39
Link | Quote | Reply
 
thank you
 Asura.Yoshimuru
Offline
Server: Asura
Game: FFXI
user: Yoshimuru
Posts: 26
By Asura.Yoshimuru 2019-01-16 01:50:37
Link | Quote | Reply
 
Leviathan.Celebrindal said: »
Just copied over my current lua to the same link- here's a fresh one:

Up to date RNG lua

Includes key pieces of Relic+3 (head/body/legs) as well as introduction of dyna neck into preshot sets. At the moment I only have +1 neck as I'm saving for some Corsair gear because my COR is getting more work these days with Dyna than my RNG does (oh he comes out, just not as frequently), but the Scout's Gorget+1 and its +3 snapshot does allow for some unique options with preshot sets. I've made some minor tweeks and will be doing more now that I've also upgraded to HQ Adhemar legs for preshot as well as midshot, adding some snap there, too.

As always, I'm sure others have great options and maybe things that are cleaner than mine, but always happy to share what I do have.

it won't change to melee Set after WS, any idea why ?
necroskull Necro Bump Detected! [200 days between previous and next post]
Offline
Posts: 258
By Demhar 2019-08-03 17:57:12
Link | Quote | Reply
 
hi guys,
just getting into lua and only thing i want to be automated is this part: it loads normal but its not swapping gears. Please help.
------------------------------------------------------------------
function get_sets()





-- Preshot --
sets.Preshot = {head="Orion beret +3",
neck="Scout's Gorget +2",
body="Amini caban +1",
hands="Carmine Fin. Ga. +1",
back={ name="Belenus's Cape", augments={'"Snapshot"+10',}},
waist="Yemaya Belt",
legs="Adhemar Kecks +1",}






-- Shooting Base Set --
sets.Midshot = {head="Arcadian Beret +2",
neck="Scout's Gorget +2",
ear1="Dedition Earring",
ear2="Enervating Earring",
body="Orion Jerkin +3",
hands="Adhemar Wrist. +1",
ring1="Petrov ring",
ring2="Rajas ring",
back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}},
waist="Yemaya belt",
legs="Adhemar Kecks +1",
feet="Adhe. Gamashes +1",}









function autoRA()
send_command('@wait 2.5; input /ra <t>')
end
end
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2019-08-03 18:08:43
Link | Quote | Reply
 
it'll help if you post all that you left in from my lua (re our previous conversation). I know that it's over-packed for RNGs who use a single or even two weapons and many who've tried it often delete the unnecessary parts. Its possible that even though its loading properly some section was deleted that is needed.

also: the autora function is still there from someone who suggested it to me the first day I played 99RNG. I NEVER use an autoRA any more, and certainly not this ghetto line which just uses a standard /wait. Ranged attacks don't function like that- depending on level of flurry received (none, Flurry1, Flurry2) you'll have different amounts of Rapid Shot in gear, which RANDOMLY reduces delay by different fractions, or maybe not at all if it doesn't proc. There's no way to use just a /wait command to get the most of out your pewpews.
Offline
Posts: 258
By Demhar 2019-08-03 18:15:36
Link | Quote | Reply
 
i deleted the rest.
if i want only this part what is needed to be added just to work.
 Leviathan.Celebrindal
Online
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2019-08-03 18:53:10
Link | Quote | Reply
 
if you deleted all the rest, then there's no commands left to execute the swapping of sets. (the 'function precast', 'function midcast' and other sections)

Each lua requires some form of commands to work.

In your case, if what you want your lua to do is equip a Preshot and a Midshot set, you'll need commands to do so.

add this after your sets to get preshot set to equip:

function precast(spell,action)
if spell.english == 'Ranged' then
equipSet = sets.Preshot
end


and if you want the midshot set to equip:

function midcast(spell,action)
if spell.english == 'Ranged' then
equipSet = sets.Midshot
end

That's the most bare bones way I know of doing it. If you only had 1 preshot set and 1 midshot set, the extra code for differentiating accuracy levels, flurry levels, or what buffs are active isn't going to be needed.

Again, I never confess to be a good lua coder, just enough for my own needs mostly. Hope this works, or someone else adds info to help ya out.
Offline
Posts: 258
By Demhar 2019-08-03 19:22:09
Link | Quote | Reply
 
this loaded properly but still no swaps ; ;

function get_sets()





-- Preshot --
sets.Preshot = {head="Orion beret +3",
neck="Scout's Gorget +2",
body="Amini caban +1",
hands="Carmine Fin. Ga. +1",
back={ name="Belenus's Cape", augments={'"Snapshot"+10',}},
waist="Yemaya Belt",
legs="Adhemar Kecks +1",}


function precast(spell,action)
if spell.english == 'Ranged' then
equipSet = sets.Preshot
end
end



-- Midshot --
sets.Midshot = {head="Arcadian Beret +2",
neck="Scout's Gorget +2",
ear1="Dedition Earring",
ear2="Enervating Earring",
body="Orion Jerkin +3",
hands="Adhemar Wrist. +1",
ring1="Petrov ring",
ring2="Rajas ring",
back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}},
waist="Yemaya belt",
legs="Adhemar Kecks +1",
feet="Adhe. Gamashes +1",}



function midcast(spell,action)
if spell.english == 'Ranged' then
equipSet = sets.Midshot
end
end




function autoRA()
send_command('@wait 2.5; input /ra <t>')
end
end
 
Offline
Posts:
By 2019-08-04 00:09:42
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
Offline
Posts: 258
By Demhar 2019-08-04 00:10:55
Link | Quote | Reply
 
Apes said: »
Uploaded if you ever need the file again.

Preshot/Midshot lua


Thank you so much for taking your time and making this happen! For people who just need quick preshot swap this is magical! thank you!
 
Offline
Posts:
By 2019-08-04 00:14:14
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
First Page 2