Spaekona Coat Gearswap

Langues: JP EN DE FR
users online
Forum » FFXI » Jobs » Black Mage » Spaekona coat gearswap
Spaekona coat gearswap
Offline
Posts: 121
By hamany9 2017-01-21 02:49:03
Link | Citer | R
 
How to make it so i can toggle spaekona coat on/off with a button?

heres my lua:

-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
mote_include_version = 2

-- Load and initialize the include file.
include('Mote-Include.lua')
end


-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()

end

-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------

-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'MagicBurst', 'Resistant', 'Proc')
state.IdleMode:options('Normal', 'PDT')

state.MagicBurst = M(false, 'Magic Burst')

lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}

gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}

-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
send_command('bind @` gs c activate MagicBurst')

select_default_macro_book()
end

-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------

---- Precast Sets ----

-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +2"}

sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}

-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}


-- Fast cast sets for spells

sets.precast.FC = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation earring",
body="Merlinic jubbah",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo pants",feet="Merlinic crackows"}

sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})

sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})

sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris", ear1="Mendicant's earring", back="Pahtli Cape"})

sets.precast.FC.Curaga = sets.precast.FC.Cure

-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Hagondes Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Icesoul Ring",
back="Refraction Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {ammo="Dosis Tathlum",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
back="Toro Cape",waist="Thunder Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}


---- Midcast Sets ----

sets.midcast.FastRecast = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation earring",
body="Merlinic jubbah",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo pants",feet="Merlinic crackows"}

sets.midcast.Cure = {main="Lathi",sub="Niobid strap",
head="Amalric coif",neck="Colossus's Torque",ear2="Loquacious Earring",ear1="Etiolation earring",
body="Annointed kalasiris",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Gishdubar sash",legs="Lengo Pants",feet="Medium's Sabots"}

sets.midcast.Curaga = sets.midcast.Cure

sets.midcast['Enhancing Magic'] = {
neck="Colossus's Torque",
body="Manasa Chasuble",hands="Ayao's Gages",
legs="Portent Pants"}

sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})

sets.midcast['Enfeebling Magic'] = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Merlinic jubbah",hands="Jhakri cuffs +1",ring1="Irrwisch Ring",ring2="Sangoma Ring",
back="Taranus's Cape",waist="Rumination sash",legs="Jhakri Slops +1",feet="Medium's sabots"}

sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']

sets.midcast['Dark Magic'] = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Merlinic jubbah",hands="Jhakri cuffs +1",ring1="Evanescence ring",ring2="Sangoma Ring",
back="Taranus's Cape",waist="Luminary sash",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast.Drain = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Merlinic jubbah",hands="Jhakri cuffs +1",ring1="Evanescence ring",ring2="Sangoma Ring",
back="Taranus's Cape",waist="Fucho-no-obi",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast.Aspir = sets.midcast.Drain

sets.midcast.Stun = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Merlinic jubbah",hands="Jhakri cuffs +1",ring1="Evanescence ring",ring2="Sangoma Ring",
back="Taranus's Cape",waist="Luminary sash",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast.BardSong = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Merlinic jubbah",hands="Jhakri cuffs +1",ring1="Evanescence ring",ring2="Sangoma Ring",
back="Taranus's Cape",waist="Luminary sash",legs="Jhakri Slops +1",feet="Merlinic crackows"}


-- Elemental Magic sets

sets.midcast['Elemental Magic'] = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Merlinic jubbah",hands="Amalric gages",ring1="Strendu ring",ring2="Acumen Ring",
back="Taranus's Cape",waist="Yamabuki-no-obi",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast['Elemental Magic'].MagicBurst = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Merlinic hood",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Spaekona's coat +1",hands="Amalric gages",ring1="Mujin band",ring2="Locus Ring",
back="Taranus's Cape",waist="Hachirin-no-obi",legs="Merlinic Shalwar",feet="Jhakri pigaches +1"}

sets.midcast['Elemental Magic'].Resistant = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Merlinic jubbah",hands="Amalric gages",ring1="Strendu ring",ring2="Acumen Ring",
back="Taranus's Cape",waist="Yamabuki-no-obi",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast['Elemental Magic'].HighTierNuke = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Merlinic jubbah",hands="Amalric gages",ring1="Strendu ring",ring2="Acumen Ring",
back="Taranus's Cape",waist="Yamabuki-no-obi",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast['Elemental Magic'].HighTierNuke.Resistant = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Jhakri coronal +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Merlinic jubbah",hands="Amalric gages",ring1="Strendu ring",ring2="Acumen Ring",
back="Taranus's Cape",waist="Yamabuki-no-obi",legs="Jhakri Slops +1",feet="Merlinic crackows"}

sets.midcast['Elemental Magic'].HighTierNuke.MagicBurst = {main="Lathi",sub="Niobid strap",ammo="Pemphredo tathlum",
head="Merlinic hood",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Spaekona's coat +1",hands="Amalric gages",ring1="Mujin band",ring2="Locus Ring",
back="Taranus's Cape",waist="Hachirin-no-obi",legs="Merlinic Shalwar",feet="Jhakri pigaches +1"}


-- Minimal damage gear for procs.
sets.midcast['Elemental Magic'].Proc = {main="Bolelabunga", sub="Genbu's shield",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate's torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}



-- Sets to return to when not performing an action.

-- Resting sets
sets.resting = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate's torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}


-- Idle sets

-- Normal refresh idle set
sets.idle = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

-- Town gear.
sets.idle.Town = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

-- Defense sets

sets.defense.PDT = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

sets.defense.MDT = {main="Lathi", sub="Niobid strap",ammo="Pemphredo tathlum",
head="Befouled crown",neck="Loricate torque +1",ear1="Infused Earring",ear2="Moonshade Earring",
body="Jhakri robe +1",hands="Merlinic dastanas",ring1="Vocane ring",ring2="Defending Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Merlinic crackows"}

sets.Kiting = {feet="Herald's Gaiters"}

sets.latent_refresh = {waist="Fucho-no-obi"}

-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.

sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}

sets.magic_burst = {neck="Mizukage-no-Kubikazari"}

-- Engaged sets

-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion

-- Normal melee group
sets.engaged = {
head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)

end

function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.magic_burst)
end
end

function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
elseif spell.skill == 'Elemental Magic' then
state.MagicBurst:reset()
end
end
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end

-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end


-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
--[[ No real need to differentiate with current gear.
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
--]]
end
end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end

return idleSet
end


-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 8)
end
Offline
Posts: 121
By hamany9 2017-01-21 03:50:36
Link | Citer | R
 
I want to make it so that if i toggle spaekona coat on, all my elemental mid cast gear change to spaekona.
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 04:29:20
Link | Citer | R
 
hamany9 said: »
How to make it so i can toggle spaekona coat on/off with a button?

heres my lua:

Erm... I hate to be that guy, but did you try pressing CTRL+F11? Press it until it says "Casting mode is now MagicBurst". Also make sure you have the +1 because that's what the lua is trying to reference. Either that or remove the +1 from the end of the item name in the lua. In either case the functionality is actually already built into this lua.

Also you might consider learning how to make spoilers and code comments if you're going to copy pasta your entire lua onto a comment.
Offline
Posts: 121
By hamany9 2017-01-21 04:38:02
Link | Citer | R
 
hmm This is not what im saying, i know my magicburst mode has spaekona, but i want to make so that i can put merlinic body instead and make spaekona toggle. Example, make F9 toggle spaekona on off
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 04:40:11
Link | Citer | R
 
hamany9 said: »
I want to make it so that if i toggle spaekona coat on, all my elemental mid cast gear change to spaekona.

As for getting ALL of them to change to Spaekona, you would essentially be forced to make a toggle and run it simultaneously with another toggle, and you would have to make an argument in the bottom of the lua that would tell one toggle to trigger an override on all of your other toggles when the state on that toggle is true. That sound like a needless jumbling of code though, what situation are you running into where your normal toggle for Spaekona doesn't work? Is the idea to have two separate sets of Free Nuke and Bursting gear?

Best as I can tell the question isn't really specific enough.
Offline
Posts: 121
By hamany9 2017-01-21 04:48:14
Link | Citer | R
 
Asura.Byrne said: »
hamany9 said: »
I want to make it so that if i toggle spaekona coat on, all my elemental mid cast gear change to spaekona.

Is the idea to have two separate sets of Free Nuke and Bursting gear?

Best as I can tell the question isn't really specific enough.

THis, i want 2 sets 1 normal 1 mb
Offline
Posts: 121
By hamany9 2017-01-21 04:57:21
Link | Citer | R
 
or should i just make 2 more additional sets for spaekona magic burst and spaekona normal cast?
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 05:25:18
Link | Citer | R
 
One moment I'm working on it, I just about got it worked out, mine's handled differently but you should be able to use this other argument, I just need to dig it out of the ether
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2017-01-21 05:25:35
Link | Citer | R
 
state.CastingMode:options('Normal', 'Mid', 'Resistant', 'CMP')

send_command('bind !` gs c toggle ConsMP')

send_command('unbind !`')

set
sets.ConsMP = {body="Spaekona's Coat"}

add to Post midcast

if spell.skill == 'Elemental Magic' and state.ConsMP.value then
equip(sets.ConsMP)
end

By addin all this I'm able to use Spaekona as a toggle. It will equip over the top of my default ele body while toggeled on.
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 05:34:22
Link | Citer | R
 
Put this near the top under the nukes array under other local functions.
Code
	send_command('bind !` gs c toggle ConsMP')


then under where your gearsets are put in
Code
	sets.ConsMP = {body="Spaekona's Coat +1"}


and finally in function job_postmidcast make a spot for
Code
	if spell.skill == 'Elemental Magic' and state.ConsMP.value then
		equip(sets.ConsMP)
		end
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 05:35:59
Link | Citer | R
 
oh and as Pintseyes pointed out, dont forget the
Code
send_command('unbind !`')


put it with the rest of the unbind functions or you wont be able to toggle back out!
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 05:37:18
Link | Citer | R
 
Alternatively what I would do is set up an player.mp dependent value that autotriggers ConsMP when below a certain MP value, I'm going to work on that next.
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 05:42:13
Link | Citer | R
 
Asura.Byrne said: »
Alternatively what I would do is set up an player.mp dependent value that autotriggers ConsMP when below a certain MP value, I'm going to work on that next.

Hah. Already figured it out. Simply change
Code
 if spell.skill == 'Elemental Magic' and state.ConsMP.value then
    equip(sets.ConsMP)
    end


and replace it with
Code
if spell.skill == 'Elemental Magic' and player.mp < 400 then
    equip(sets.ConsMP)
    end


Do that (change when you want it to kick in) and you don't even need to bother with the keybind.
[+]
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2017-01-21 06:10:33
Link | Citer | R
 
Oh hell ya. Thanks Byrne, I can't code for crap, HTML confuses me =) That is how I wanted it also but I couldn't figure out how to make it work (Thought I tried the same thing) I'm gonna add it this way and check it later one when I logon. +1 for you!
 Asura.Verbannt
Offline
Serveur: Asura
Game: FFXI
user: Akton
Posts: 166
By Asura.Verbannt 2017-01-21 06:33:27
Link | Citer | R
 
Also the blm.lua on the black sacrament now has been updated to handle this though the value is set to 520 on there.
Offline
Posts: 107
By Miang 2017-01-21 07:03:22
Link | Citer | R
 
For my BLM lua I use the value of my MP after the spell has finished casting to determine if I should use AF body or not:
Code
if not buffactive['Manafont'] and not buffactive['Manawell'] and (forceAf == true or (((player.mp-spell.mp_cost)/player.max_mp)*100) < afBodyPercent) then
    equip(sets['lowMpNuke'])
end


I've defined afBodyPercent at 66 at the top of my file too. Also important to put the buff checks for manafont and manawell in there, unless you don't mind nuking in AF body during 1hr or manawell.

I also have forceAf as a toggle in my lua, so I can leave it on fulltime if needed for some reason.. don't think I ever use it anymore though.
 Asura.Verbannt
Offline
Serveur: Asura
Game: FFXI
user: Akton
Posts: 166
By Asura.Verbannt 2017-01-21 08:08:29
Link | Citer | R
 
true i could put in that argument but i can also be aware of it its not really that big of an issue. But i think making a manafont hook to prevent swapping would be nice, and it needs to be in the same arguement. But thats for tomorrow its time to sleep now.
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2017-01-21 14:52:22
Link | Citer | R
 
Thanks again Byrne. This totally works. I'm pretty sure I tried this but knowing me I tried MPP or even better, I likely used a greater than symbol lol
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2017-01-21 14:56:45
Link | Citer | R
 
Asura.Verbannt said: »
true i could put in that argument but i can also be aware of it its not really that big of an issue. But i think making a manafont hook to prevent swapping would be nice, and it needs to be in the same arguement. But thats for tomorrow its time to sleep now.

Why for manafont? Do we lose the extra time if we don't keep it on? Pretty sure I only precast body and midcast into other stuff and you don't lose your extra time. Playing around with items to see what would boost my manafont I used
function job_buff_change(buff, gain) and just locked the body I wanted. What am I missing?

edit. nevermind, just noticed I lock body too. Do we need to? God my memory is getting bad, I thought we only needed to precast that?
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2017-01-21 15:04:35
Link | Citer | R
 
Refresh effect is 2 MP/tick
Augmented with Adds "Enhances 'Manafont' effect"
Increases Manafont duration by 30 seconds. Does not need to remain equipped after usage.

Why are we locking body? I recall in my old lua playing around with that and taking it out. This lua has manafont body locks too.. What am I forgetting? Gonna remove the lock again if the above statement is true.
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2017-01-21 16:51:31
Link | Citer | R
 
I dont think he meant "prevent swapping" as in locking the piece to the AF2 body, what he meant was preventing the criteria for MP return bodies to come into effect, as there's no point in using them during manafont since your spells are free anyway, you'd want to wear your best nuking body during that.

But yes, it is just a precast for the ability, it does not have to remain worn.
 Ragnarok.Fabiano
Offline
Serveur: Ragnarok
Game: FFXI
user: fabiano
Posts: 153
By Ragnarok.Fabiano 2017-02-05 12:13:35
Link | Citer | R
 
Asura.Byrne said: »
Put this near the top under the nukes array under other local functions.
Code
	send_command('bind !` gs c toggle ConsMP')


then under where your gearsets are put in
Code
	sets.ConsMP = {body="Spaekona's Coat +1"}


and finally in function job_postmidcast make a spot for
Code
	if spell.skill == 'Elemental Magic' and state.ConsMP.value then
		equip(sets.ConsMP)
		end

did use yours and it tells me

"mote-libs Toggle:unknown field [consMP]"

hmmm strange.

made it work . but somethin with nil value came up . will give it another try after events
 Bahamut.Neb
Offline
Serveur: Bahamut
Game: FFXI
user: Neb
Posts: 189
By Bahamut.Neb 2017-02-05 12:34:21
Link | Citer | R
 
I just made two macros

/console gs disable body
/equip body "Spaekona's Coat +1"

and one for disableing it lol

/console gs enable body
Offline
Posts: 121
By hamany9 2017-02-10 22:58:47
Link | Citer | R
 
Asura.Pintseyes said: »
state.CastingMode:options('Normal', 'Mid', 'Resistant', 'CMP')

send_command('bind !` gs c toggle ConsMP')

send_command('unbind !`')

set
sets.ConsMP = {body="Spaekona's Coat"}

add to Post midcast

if spell.skill == 'Elemental Magic' and state.ConsMP.value then
equip(sets.ConsMP)
end

By addin all this I'm able to use Spaekona as a toggle. It will equip over the top of my default ele body while toggeled on.

hmm where do you put the "sets.ConsMP = {body="Spaekona's Coat"}"
at? and what is "Mid" casting mode?
Offline
Posts: 121
By hamany9 2017-02-10 23:07:05
Link | Citer | R
 
when i try it ingame i get the message: Mote-libs:Toggle: unknown field(ConsMP)
 Shiva.Spynx
Offline
Serveur: Shiva
Game: FFXI
user: auron86
Posts: 371
By Shiva.Spynx 2017-02-10 23:49:59
Link | Citer | R
 
Make sure that you define the ConsMP state in your user_setup:
Code
state.ConsMP=M(false, 'Conserve MP') 
Log in to post.