Lua Help!

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » FFXI » Jobs » Rune Fencer » Lua Help!
Lua Help!
 Asura.Yinwizard
Offline
Server: Asura
Game: FFXI
user: Yinwizard
Posts: 6
By Asura.Yinwizard 2018-06-03 21:24:06
Link | Quote | Reply
 
Hello, i've got 2 issues with this RUN.lua i'm trying to use:

1. I want to be able to change IDLE and TP sets using in-game commands fixed onto macros and by pressing F9 (TP sets) and F10 (Idle sets), to do that i'm trying to fix a TP_Ind and Idle_Ind to each set eg: Idle DT = Idle_Ind 1 ; Idle Regen = Idle_Ind 2. But i'm pretty sure i'm doing it wrong because if i use /console gs c "command to equip Idle DT set", in game and then i use any spell, the aftercast idle set won't be the DT set i wanted, but the set i previously selected by pressing F10. (Hopefully someone will understand what i'm trying to say lol)

2. How can i prevent the lua not to change back to the current Idle or TP set if my char gets silenced, stuned, petrified, interrupted... it will get stuck to the midcast.set related to the action i'm trying to do eg: Got interrupted while casting phalanx, will get stuck on EnhancingPhalanx.set.

Beforehand, i'd like to thank anyone who read this!! thank you! :)

Here is my lua:
Code
require("no_interruptions")

function set_macros(sheet,book)
    if book then 
        send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
        return
    end
    send_command('@input /macro set '..tostring(sheet))
end

set_macros(1,10) -- Sheet, Book <<<<<<<<<<<<<<<<<<<<<<<************

Enmity_Spells = S{"Foil","Flash","Blank Gaze","Geist Wall","Jettatura","Stun","Sheep Song","Soporific","Stinking Gas","Sound Blast","Provoke","Last Resort","Souleater","Arcane Circle","Weapon Bash","Poisonga","Awful Eye","Mysterious Light","Grand Slam"}

Enhancing_Spells = S{"Haste","Blaze Spikes","Ice Spikes","Shock Spikes","Crusade","Haste","Cocoon","Refueling","Stoneskin"}

Enhancing_Potency = S{"Phalanx","Barfire","Barblizzard","Baraero","Barstone","Barthunder","Barwater","Barsleep","Barpoison","Barparalyze","Barblind","Barsilence","Barpetrify","Baramnesia","Barvirus","Temper","Shell V","Protect IV","Barstonra","Barwatera","Baraera","Barfira","Barblizzara","Barthundra","Barpetra","Barsilencera","Baramnesra","Barparalyzra","Barsleepra","Barpoisonra","Barblindra","Barvira"}

Enhancing_Regen = S{"Regen","Regen II","Regen III","Regen IV"}

Enhancing_Refresh = S{"Refresh"}

Interupt_Spells = S{"Aquaveil","Protect","Protect II","Protect III","Shell","Shell II","Shell III","Shell IV"}

Healing_Spells = S{"Cure","Cure II","Cure III","Cure IV","Curaga","Curaga II","Pollen","Wild Carrot","Healing Breeze","Cura"}

function get_sets()
 
        send_command('bind f9 gs c toggle TP set')
        send_command('bind f10 gs c toggle Idle set')
        send_command('bind f11 gs c toggle CDC set')
        send_command('bind f12 gs c toggle Req set')
        send_command('bind !f12 gs c toggle Rea set')
	    send_command('bind ^` gs c toggle MB set')
       
        function file_unload()
     
 
        send_command('unbind ^f9')
        send_command('unbind ^f10')
        send_command('unbind ^f11')
        send_command('unbind ^f12')
		send_command('unbind ^`')
       
        send_command('unbind !f9')
        send_command('unbind !f10')
        send_command('unbind !f11')
        send_command('unbind !f12')
 
        send_command('unbind f9')
        send_command('unbind f10')
        send_command('unbind f11')
        send_command('unbind f12')

        end  		
      
		
	--Idle Sets--	
	sets.Idle = {}
	
	sets.Idle.index = {'DT','ParryDT','RefreshDT','RegenDT'}
	Idle_ind = 1	
	
	
	sets.Idle.RegenDT ={
    ammo="Staunch Tathlum +1",
    head="Turms Cap +1",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Regal Gauntlets",
    legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
    feet="Turms Leggings +1",
    neck="Sanctity Necklace",
    waist="Flume Belt +1",
    left_ear="Etiolation Earring",
    right_ear="Odnowa Earring +1",
    left_ring="Sheltered Ring",
    right_ring="Defending Ring",
    back="Moonlight Cape",
}
						  
	sets.Idle.DT ={
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Kurys Gloves",
    legs="Eri. Leg Guards +1",
    feet="Ahosi Leggings",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
    left_ear="Odnowa Earring +1",
    right_ear="Etiolation Earring",
    left_ring="Vocane Ring",
    right_ring="Defending Ring",
    back="Moonlight Cape",
}

	sets.Idle.ParryDT ={
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Turms Mittens +1",
    legs="Eri. Leg Guards +1",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
    left_ear="Odnowa Earring +1",
    right_ear="Etiolation Earring",
    left_ring="Vocane Ring",
    right_ring="Defending Ring",
    back="Moonlight Cape",
}

	sets.Idle.RefreshDT ={
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body="Runeist Coat +1",
    hands="Kurys Gloves",
    legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
    feet="Ahosi Leggings",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
    left_ear="Odnowa Earring +1",
    right_ear="Etiolation Earring",
    left_ring={name="Stikini Ring +1", bag="wardrobe3"},
    right_ring={name="Stikini Ring +1", bag="wardrobe4"},
    back="Moonlight Cape",
}

	--TP Sets--
	sets.TP = {}

	sets.TP.index = {'Standard', 'AccuracyLite', 'AccuracyFull', 'DT', 'DTAccuracy',"MEVD"}
	--1=Standard, 2=AccuracyLite, 3=AccuracyFull, 4=DT, 5=DTAccuracy--
	TP_ind = 1

	sets.TP.Standard ={
    ammo="Yamarang",
    head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
    body={ name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
    hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet={ name="Herculean Boots", augments={'Accuracy+15 Attack+15','"Triple Atk."+4','Accuracy+5',}},
    neck="Anu Torque",
    waist="Ioskeha Belt +1",
    left_ear="Sherida Earring",
    right_ear="Telos Earring",
    left_ring="Epona's Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
					
	sets.TP.AccuracyLite = {
    ammo="Staunch Tathlum +1",
    head="Turms Cap +1",
    body="Erilaz Surcoat +1",
    hands="Turms Mittens +1",
    legs="Eri. Leg Guards +1",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
     left_ear="Etiolation Earring",
    right_ear="Odnowa Earring +1",
    left_ring="Moonlight Ring",
    right_ring="Defending Ring",
    back="Moonlight Cape",
}
	
	sets.TP.AccuracyFull = {
    ammo="Yamarang",
    head="Turms Cap +1",
    body={ name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
    hands="Turms Mittens +1",
    legs="Aya. Cosciales +2",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Ioskeha Belt +1",
    left_ear="Sherida Earring",
    right_ear="Telos Earring",
	left_ring={name="Moonlight Ring", bag="wardrobe3"},
    right_ring={name="Moonlight Ring", bag="wardrobe4"},
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
							
	sets.TP.DT = {
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Turms Mittens +1",
    legs="Eri. Leg Guards +1",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
    left_ear="Etiolation Earring",
    right_ear="Odnowa Earring +1",
    left_ring={name="Moonlight Ring", bag="wardrobe3"},
    right_ring="Defending Ring",
    back="Moonlight Cape",
}
				  
	sets.TP.MEVD = {
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body="Erilaz Surcoat +1",
    hands="Turms Mittens +1",
    legs="Eri. Leg Guards +1",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
     left_ear="Etiolation Earring",
    right_ear="Odnowa Earring +1",
    left_ring={name="Moonlight Ring", bag="wardrobe3"},
    right_ring="Defending Ring",
    back="Moonlight Cape",
}
				  
	sets.TP.DTAccuracy = {
    ammo="Staunch Tathlum +1",
    head="Aya. Zucchetto +2",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Turms Mittens +1",
    legs="Aya. Cosciales +2",
    feet="Turms Leggings +1",
    neck="Loricate Torque +1",
    waist="Flume Belt +1",
     left_ear="Etiolation Earring",
    right_ear="Odnowa Earring +1",
	left_ring={name="Moonlight Ring", bag="wardrobe3"},
    right_ring={name="Moonlight Ring", bag="wardrobe4"},
    back="Moonlight Cape",
}	
	
	
	--Weaponskill Sets--
	sets.WS = {}		
	
	sets.Requiescat ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body="Meg. Cuirie +2",
    hands="Meg. Gloves +2",
    legs="Meg. Chausses +1",
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
								  
	sets.Resolution ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	
	sets.Vorpal ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	
	sets.Savage ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Caro Necklace",
    waist="Prosilio Belt +1",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
				  
	sets.Swift ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	
	sets.Spinning = {
    ammo="Knobkierrie",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}				  
	sets.Ground = {
    ammo="Knobkierrie",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
				  
	sets.FellCleave = {
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	sets.Ruinator = {
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	
	sets.Dimidiation ={
    ammo="Knobkierrie",
    head="Meghanada Visor +2",
    body="Meg. Cuirie +2",
    hands="Meg. Gloves +2",
    legs={ name="Lustr. Subligar +1", augments={'Accuracy+20','DEX+8','Crit. hit rate+3%',}},
    feet={ name="Lustra. Leggings +1", augments={'Accuracy+20','DEX+8','Crit. hit rate+3%',}},
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Ishvara Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
} 
			
	sets.Shockwave ={
    ammo="Seeth. Bomblet +1",
    head={ name="Lustratio Cap +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    body={ name="Lustr. Harness +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}},
    hands="Meg. Gloves +2",
    legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
    feet="Meg. Jam. +1",
    neck="Caro Necklace",
    waist="Prosilio Belt +1",
    left_ear="Sherida Earring",
    right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
    left_ring="Regal Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Dbl.Atk."+10',}},
}
	
	sets.Herculean ={
    ammo="Seeth. Bomblet +1",
    head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +4%','INT+15','"Mag.Atk.Bns."+11',}},
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
    legs="Aya. Cosciales +2",
    feet={ name="Herculean Boots", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','"Store TP"+5','STR+9','Mag. Acc.+7','"Mag.Atk.Bns."+9',}},
    neck="Sanctity Necklace",
    waist="Eschan Stone",
    left_ear="Hermetic Earring",
    right_ear="Friomisi Earring",
    left_ring="Shiva Ring +1",
    right_ring="Shiva Ring +1",
    back={ name="Evasionist's Cape", augments={'Enmity+2','"Embolden"+15','"Dbl.Atk."+1',}},
}
	sets.Sanguine ={
    ammo="Seeth. Bomblet +1",
    head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +4%','INT+15','"Mag.Atk.Bns."+11',}},
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
    legs="Aya. Cosciales +2",
    feet={ name="Herculean Boots", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','"Store TP"+5','STR+9','Mag. Acc.+7','"Mag.Atk.Bns."+9',}},
    neck="Sanctity Necklace",
    waist="Eschan Stone",
    left_ear="Hermetic Earring",
    right_ear="Friomisi Earring",
    left_ring="Shiva Ring +1",
    right_ring="Shiva Ring +1",
    back={ name="Evasionist's Cape", augments={'Enmity+2','"Embolden"+15','"Dbl.Atk."+1',}},
}
	--Job Ability Sets--	
	
	sets.JA = {}	
	
	sets.JA.Lunge ={
    ammo="Seeth. Bomblet +1",
    head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +4%','INT+15','"Mag.Atk.Bns."+11',}},
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
    legs="Aya. Cosciales +2",
    feet={ name="Herculean Boots", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','"Store TP"+5','STR+9','Mag. Acc.+7','"Mag.Atk.Bns."+9',}},
    neck="Sanctity Necklace",
    waist="Eschan Stone",
    left_ear="Hermetic Earring",
    right_ear="Friomisi Earring",
    left_ring="Shiva Ring +1",
    right_ring="Shiva Ring +1",
    back={ name="Evasionist's Cape", augments={'Enmity+2','"Embolden"+15','"Dbl.Atk."+1',}},
}
				  
	sets.JA.VP ={
    ammo="Aqreqaq Bomblet",
    head="Erilaz Galea",
    body={ name="Futhark Coat +1", augments={'Enhances "Elemental Sforzo" effect',}},
    hands="Kurys Gloves",
    legs="Rune. Trousers +1",
    feet="Ahosi Leggings",
    neck="Incanter's Torque",
    waist="Bishop's Sash",
    left_ear="Beatific Earring",
    right_ear="Pluto's Pearl",
    left_ring="Provocare Ring",
    right_ring="Eihwaz Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10',}},
}
	
	sets.holywater = {ring1="Purity Ring",ring2="Blenmot's Ring",waist="Gishdubar Sash"}
	sets.doomed = {ring1="Eshmun's Ring",ring2="Purity ring",waist="Gishdubar Sash"}
	
	--Midcast Enhancing Sets--	
	
		sets.Interupt ={
    ammo="Staunch Tathlum +1",
    head="Erilaz Galea",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Runeist Mitons +1",
    legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Moonlight Necklace",
    waist="Olympus Sash",
    left_ear="Augment. Earring",
    right_ear="Andoaa Earring",
    left_ring="Sheltered Ring",
    right_ring="Stikini Ring +1",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

	sets.enmity ={
    ammo="Aqreqaq Bomblet",
    head="Halitus Helm",
    hands="Kurys Gloves",
    legs="Eri. Leg Guards +1",
    feet="Ahosi Leggings",
    neck="Moonlight Necklace",
    waist="Goading Belt",
    left_ear="Pluto's Pearl",
    right_ear="Pluto's Pearl",
    left_ring="Provocare Ring",
    right_ring="Eihwaz Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10',}},
}
				  
	sets.enhancing ={
    ammo="Staunch Tathlum +1",
    head="Erilaz Galea",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Regal Gauntlets",
    legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Voltsurge Torque",
    waist="Olympus Sash",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Kishar Ring",
    right_ring="Prolix Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

    sets.Phalanx={
    ammo="Staunch Tathlum +1",
    head={ name="Fu. Bandeau +1", augments={'Enhances "Battuta" effect',}},
    body={ name="Taeon Tabard", augments={'Evasion+22','"Fast Cast"+5','Phalanx +3',}},
    hands={ name="Taeon Gloves", augments={'Evasion+25','"Fast Cast"+4','Phalanx +3',}},
    legs={ name="Taeon Tights", augments={'Evasion+17','"Fast Cast"+5','Phalanx +3',}},
    feet={ name="Taeon Boots", augments={'Evasion+19','"Fast Cast"+4','Phalanx +3',}},
    neck="Incanter's Torque",
    waist="Olympus Sash",
    left_ear="Andoaa Earring",
    right_ear="Augment. Earring",
	left_ring={name="Stikini Ring +1", bag="wardrobe3"},
    right_ring={name="Stikini Ring +1", bag="wardrobe4"},
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

    sets.Regen ={
    ammo="Staunch Tathlum +1",
    head="Rune. Bandeau +1",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Regal Gauntlets",
    legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Voltsurge Torque",
    waist="Tempus Fugit",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Kishar Ring",
    right_ring="Prolix Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

    sets.Refresh ={
    ammo="Staunch Tathlum +1",
    head="Erilaz Galea",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Regal Gauntlets",
    legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Voltsurge Torque",
    waist="Gishdubar Sash",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Kishar Ring",
    right_ring="Prolix Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

    sets.Stoneskin ={
    ammo="Staunch Tathlum +1",
    head="Erilaz Galea",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Runeist Mitons +1",
    legs="Haven Hose",
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Incanter's Torque",
    waist="Siegel Sash",
    left_ear="Earthcry Earring",
    right_ear="Andoaa Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

	sets.potency ={
    ammo="Staunch Tathlum +1",
    head="Erilaz Galea",
    body={ name="Carm. Sc. Mail +1", augments={'Attack+20','"Mag.Atk.Bns."+12','"Dbl.Atk."+4',}},
    hands="Runeist Mitons +1",
    legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Incanter's Torque",
    waist="Olympus Sash",
    left_ear="Augment. Earring",
    right_ear="Andoaa Earring",
	left_ring={name="Stikini Ring +1", bag="wardrobe3"},
    right_ring={name="Stikini Ring +1", bag="wardrobe4"},
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}
	
	--Precast Sets--
	sets.precast = {}	
	
	sets.precast.FC ={
    ammo="Impatiens",
    head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
    body={ name="Taeon Tabard", augments={'Evasion+22','"Fast Cast"+5','Phalanx +3',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+14','Mag. Acc.+13','"Mag.Atk.Bns."+13','"Fast Cast"+2',}},
    legs="Aya. Cosciales +2",
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Voltsurge Torque",
    waist="Rumination Sash",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Kishar Ring",
    right_ring="Prolix Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}

    sets.precast.FC.Enhancing ={ 
    ammo="Impatiens",
    head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
    body={ name="Taeon Tabard", augments={'Evasion+22','"Fast Cast"+5','Phalanx +3',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+14','Mag. Acc.+13','"Mag.Atk.Bns."+13','"Fast Cast"+2',}},
    legs="Aya. Cosciales +2",
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Voltsurge Torque",
    waist="Siegel Sash",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Kishar Ring",
    right_ring="Prolix Ring",
    back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10',}},
}
						
						

					
	sets.cure = {ammo="Quartz tathlum +1",head="Carmine mask +1",neck="Phalaina Locket",ear1="Mendicant's Earring",ear2="Roundel Earring",
			 	  body="Vrikodara jupon",hands="Weatherspoon cuffs +1",ring1="Sirona's Ring",ring2="Kunaji ring",back="Solemnity Cape",waist="Gishdubar sash",legs="Carmine cuisses +1",feet="Skaoi boots"}

end	



function precast(spell)
	  if spell.action_type == "Magic" then
      if spell.skill == "Enhancing Magic" then
         equip(sets.precast.FC.Enhancing)
      else equip(sets.precast.FC)
      end
   end
	
	if spell.english == 'Requiescat' then
			equip(sets.Requiescat)
			send_command('@input /echo Requiescat Set')
		elseif spell.english == 'Resolution' then		
			equip(sets.Resolution)
			send_command('@input /echo Resolution Set')
		elseif spell.english == 'Ruinator' then
			equip(sets.Ruinator)
			send_command('@input /echo Ruinator Set')
		elseif spell.english == 'Shockwave' then
			equip(sets.Shockwave)
			send_command('@input /echo Shockwave Set')
		elseif spell.english == 'Vorpal Blade' then
			equip(sets.Vorpal)
			send_command('@input /echo Vorpal Set')
		elseif spell.english == 'Savage Blade' then
			equip(sets.Savage)
			send_command('@input /echo Savage Set')
		elseif spell.english == 'Swift Blade' then
			equip(sets.Swift)
			send_command('@input /echo Swift Set')
		elseif spell.english == 'Sanguine Blade' then		
			equip(sets.Sanguine)
			send_command('@input /echo Sanguine Blade Set')
		elseif spell.english == 'Dimidiation' then
			equip(sets.Dimidiation)
			send_command('@input /echo Dimidiation Set')
		elseif spell.english == 'Spinning Slash' then
			equip(sets.Spinning)
			send_command('@input /echo Spinning Set')	
		elseif spell.english == 'Ground Strike' then
			equip(sets.Ground)
			send_command('@input /echo Ground Set')	
		elseif spell.english == 'Herculean Slash' then
			equip(sets.Herculean)
			send_command('@input /echo Herculean Slash Set')
		elseif spell.english == 'Fell Cleave' then
			equip(sets.FellCleave)
			send_command('@input /echo FellCleave Set')
		elseif spell.english == 'Lunge' then
			equip(sets.JA.Lunge)
			send_command('@input /echo Lunge Set')
		elseif spell.english == 'Swipe' then
			equip(sets.JA.Lunge)
			send_command('@input /echo Lunge Set')
		elseif spell.english == 'Swordplay' then
			equip({hands="Futhark mitons +1"})
		elseif spell.english == 'Battuta' then
			equip({head="Futhark Bandeau +1"})
		elseif spell.english == 'Pflug' then
			equip(sets.enmity)
		elseif spell.english == 'Embolden' then
			equip(sets.enmity)
			equip({back={ name="Evasionist's Cape", augments={'Enmity+2','"Embolden"+15','"Dbl.Atk."+1',}}})
		elseif spell.english == "Vallation" then
			equip(sets.enmity)
			equip({body="Runeist coat +1",legs="Futhark Trousers +1"})
		elseif spell.english == "Valiance" then
			equip(sets.enmity)
			equip({body="Runeist coat +1",legs="Futhark Trousers +1"})
		elseif spell.english == "Gambit" then
			equip({hands="Runeist mitons +1"})
			send_command('timers delete "Gambit"')
			send_command('timers create "Gambit" 90 down;wait 60;input /party Gambit [WEARING OFF IN 30 SEC.];wait 30;input /party Gambit [OFF];timers delete "Gambit"')
		elseif spell.english == "Rayke" then
			equip({feet="Futhark boots +1"})
			send_command('timers delete "Rayke"')
			send_command('timers create "Rayke" 47 down;wait 32;input /party Rayke [WEARING OFF IN 15 SEC.];wait 15;input /party Rayke [OFF];timers delete "Rayke"')
		elseif spell.english == "Liement" then
			equip({body="Futhark coat +1"})
		elseif spell.english == "Provoke" or spell.english == "Warcry" or spell.english == "Last Resort" or spell.english == "Souleater" then
			equip(sets.enmity)
			send_command('@input /echo Enmity Set')
		elseif spell.english == 'Vivacious Pulse' then
			equip(sets.JA.VP)
			send_command('@input /echo VP Set')
	end	
	end

	
function midcast(spell,act)
	if spell.action_type == 'Magic' then
		if Enmity_Spells:contains(spell.name) then
			equip(sets.enmity)	
			send_command('@input /echo Enmity Set')
		elseif Enhancing_Spells:contains(spell.name) then
			equip(sets.enhancing)
			if spell.name == 'Stoneskin' then
				equip(sets.Stoneskin)
		    end
			send_command('@input /echo Enhancing Duration Set')	
        elseif Enhancing_Regen:contains(spell.name) then
			equip(sets.Regen)
			send_command('@input /echo Regen Duration Set')	
        elseif Enhancing_Refresh:contains(spell.name) then
			equip(sets.Refresh)
			send_command('@input /echo Refresh Duration Set')			
		elseif Enhancing_Potency:contains(spell.name) then
			equip(sets.potency)
			if spell.name == 'Phalanx' then
				equip(sets.Phalanx)
				send_command('@input /echo Futhark Bandeau Equiped')
			end
			send_command('@input /echo Enhancing Potency Set')		
		elseif Interupt_Spells:contains(spell.name) then
			equip(sets.Interupt)
			send_command('@input /echo Interupt Set')
		elseif Healing_Spells:contains(spell.name) then
			equip(sets.cure)
			send_command('@input /echo Healing Set')
			weathercheck(spell.element)
		else
			equip(sets.precast.FC)		
		end
	end
end


function aftercast(spell) 
        if player.status == 'Engaged' then
                equip(sets.TP[sets.TP.index[TP_ind]])
				send_command('@input /echo Current Set: [ '..sets.TP.index[TP_ind]..' ], equiped.')
        else
                equip(sets.Idle[sets.Idle.index[Idle_ind]])
				send_command('@input /echo Current Set: [ '..sets.Idle.index[Idle_ind]..' ], equiped.')
        end
		if buffactive['doom'] then
		equip(sets.doomed)
		send_command('@input /echo Doomed Set')
	end
end

function status_change(new,old) 
        if new == 'Engaged' then
                equip(sets.TP[sets.TP.index[TP_ind]])
        else
                equip(sets.Idle[sets.Idle.index[Idle_ind]])
        end
end

function buff_change(name,gain)
	if name == "doom" then
		if gain then		
			equip(sets.doomed)
			send_command('@input /echo Doomed Set')
		end
	if name == "stun" then
		if gain then		
			equip(sets.Idle.DT)
			send_command('@input /echo Stunned Set')
		end
	end
end
end

function self_command(command)
        if command == 'toggle TP set' then -- TP SETS
                TP_ind = TP_ind +1
                if TP_ind > #sets.TP.index then TP_ind = 1 end
                send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
                equip(sets.TP[sets.TP.index[TP_ind]])
        elseif command == 'toggle Idle set' then -- IDLE SETS
                Idle_ind = Idle_ind +1
                if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
                send_command('@input /echo <----- Idle Set changed to '..sets.Idle.index[Idle_ind]..' ----->')
                equip(sets.Idle[sets.Idle.index[Idle_ind]])
        elseif command == 'equip TP set' then
                equip(sets.TP[sets.TP.index[TP_ind]])
        elseif command == 'equip Idle set' then
                equip(sets.Idle[sets.Idle.index[Idle_ind]])
   elseif command == 'equip Regen set' then -- REGEN IDLE SET
	    Idle_ind = 1  	
		equip(sets.Idle.RegenDT)
		send_command('@input /echo Idle REGEN Set')
   elseif command == 'equip DT set' then	-- DT IDLE SET
	    Idle_ind = 2 	
		equip(sets.Idle.DT)
		send_command('@input /echo Idle DT Set')
   elseif command == 'equip DTParry set' then -- PARRY IDLE SET
	    Idle_ind = 3 	
		equip(sets.Idle.ParryDT)
		send_command('@input /echo Idle PARRY Set')
   elseif command == 'equip DTRefresh set' then -- REFRESH IDLE SET
        Idle_ind = 4	
		equip(sets.Idle.RefreshDT)
		send_command('@input /echo Idle REFRESH Set')
              elseif command == 'equip Standard set' then -- STANDARD TP SET 1
			TP_ind = 1	
			equip(sets.TP.Standard)
			send_command('@input /echo TP STANDARD Set')
		      elseif command == 'equip AccuracyLite set' then -- ACCURACY LITE TP SET 2
			TP_ind = 2	
			equip(sets.TP.AccuracyLite)
			send_command('@input /echo TP ACCURACY LITE (DMG -> MP Body: on) Set')
		      elseif command == 'equip AccuracyFull set' then -- ACCURACY FULL TP SET 3
			TP_ind = 3	
			equip(sets.TP.AccuracyFull)
			send_command('@input /echo TP ACCURACY FULL Set')
		      elseif command == 'equip DT TP set' then -- DT TP SET 4
			TP_ind = 4	
			equip(sets.TP.DT)
			send_command('@input /echo TP DT Set')
		      elseif command == 'equip DTAccuracy set' then -- DT ACCURACCY TP SET 5
			TP_ind = 5	
			equip(sets.TP.DTAccuracy)
			send_command('@input /echo TP DTACCURACY Set')
		     elseif command == 'equip MEVD set' then -- MEVD TP SET 6
			TP_ind = 6	
			equip(sets.TP.MEVD)
			send_command('@input /echo TP MEVD Set')
    end
	
end


windower.register_event('zone change', function()
    equip(sets.Idle.RefreshDT)	
end)

function weathercheck(spell_element)
	if spell_element == world.weather_element or spell_element == world.day_element then
		equip({waist="Hachirin-no-Obi"})
		send_command('@input /echo Using Element Obi')
	else		
	end
end
Offline
Posts: 182
By Sammeh 2018-06-04 06:33:01
Link | Quote | Reply
 
In aftercast, spell get's a key/value pair for 'interrupted'. So can do:
Code
if spell.interrupted then 
  -- do stuff here or can send a defult
  send_command('gs c update')
end

[+]