Unknown GS Errors

Langues: JP EN DE FR
users online
Forum » Windower » Support » unknown GS errors
unknown GS errors
Offline
Posts: 9
By Gaude1 2019-01-17 17:45:39
Link | Citer | R
 
Hello all,

My internet connection is poor, so this is the second time im trying to post :/

I have been trying to make a DRK script by combining some scripts I found online... but I am getting errors.

The error begins on line 56, ""Unexpected symbol near "=""

This script style works on Byrth_WAR but does not work on mine?

Could someone have a look at the script in progress please (as you can see, I have been troubleshooting hence the -- on many lines), and note that I do not have my actual gear written in.. but again the byrth_war lua was able to load without issue.

Thank you all :)

P.S. sorry for the poor formatting, I haven't seen where how to properly link the script.
 Lakshmi.Reddwarf
Offline
Serveur: Lakshmi
Game: FFXI
user: Reddwarf
Posts: 159
By Lakshmi.Reddwarf 2019-01-17 18:28:35
Link | Citer | R
 
sets.aftercast = {}
TP_mode = 'Acc'
sets.TP.Scythe = {main="Home. Scythe"}
sets.TP.Greatsword = {main={ name="Crobaci +2", augments={'DMG:+24','STR+6','Accuracy+10',}}},

try deleting the extra , at the end
 Asura.Chaostaru
Offline
Serveur: Asura
Game: FFXI
By Asura.Chaostaru 2019-01-17 18:31:37
Link | Citer | R
 
3rd symbol from the right named "Code" copy your lua and paste it between "[ c o d e ] [ / c o d e ] no spaces.

That way we dont have to count down 56 lines
Offline
Posts: 9
By Gaude1 2019-01-17 18:42:30
Link | Citer | R
 
Sorry, all fixed up.
Thanks.

@reddwarf
Its actually below that, where it starts with
sets.TP.Normal = {

Now that Chaostaru helped me fix it up.. its a bit easier to see >.>

Would that be an extra "," above it?
I should be able to try that in a bit.. but, when I "--"(don't know the proper terminology for that) took out that set and the associated (tree?) I was met with an error for line 74


So it seems its probably ALL of the functions that I wrote like that :/
 Asura.Chaostaru
Offline
Serveur: Asura
Game: FFXI
By Asura.Chaostaru 2019-01-17 18:55:32
Link | Citer | R
 
Are you deadset on creating your own? or Do you just want a versatile drk lua?
Offline
Posts: 9
By Gaude1 2019-01-17 19:11:28
Link | Citer | R
 
While I would like to learn it..

I do just want a versatile lua.. I think the one above is relatively simple? As far as i can tell, it just has a few tp methods and a DT, then allows for magic use, and has idle/engaged.

Thats really all I need.. I started wanting gearswap so I could ensure my swaps were happening during lag situations.

I play a variety of jobs, so if its something I could learn, then I could write them for my BST (for example) as allot of the scripts out there are extremely basic, or extremely complicated.

So, again, yes a versatile DRK lua would be nice. (I'm sure I can easily alter a fairly simple drk lua to work for my PLD)

Thank you :)
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2019-01-18 03:50:49
Link | Citer | R
 
So a couple of things worth mentioning here. Basic versus complicated may be a long way off from what you think. Something may LOOK incredibly complex, but have beautiful simplicity in the way it works. For instance take a look at this. (no idea if you play this job, just an example).

https://pastebin.com/uAENJDUh

I'd be willing to bet this looks incredibly complex at first... But as a USER, the only thing you need care about is the bits that look like this

{}

You can even CTRL+F for {} in one that is stripped like this one.

You only need to put gear in areas that have these following some sort of set, and put it between them, this much I'm sure you understand already.

Here's where things are simpler than they look... Anywhere where there is a set_combine(set, {}) you don't have to put anything there. Not putting anything there will simply cause it to use the set that was being combined with.

For instance:
Code
	sets.precast.WS = {}
	sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {})
	sets.precast.WS['Expiacion'] = set_combine(sets.precast.WS, {})
	sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {})
	sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {})
	sets.precast.WS['Vorpal Blade'] = set_combine(sets.precast.WS, {})
	sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {})


Lets say I've only got 1 WS set; I only have to put my gear in that top set. It will equip that gear for all WS. Then later down the line when I get more gear, I just dump it:

sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {here})

Then it will use the WS set for all except for the one that I told it what specific gear to use. This works for all precast midcast, idle, and TP sets too.

So while that lua has dozens of sets to fill out, you technically only need to fill in the very basics, you don't have to touch most of it, and if you don't have the special sets, using those abilities or spells will just use the gear that you DO have in the set you DID specify... does that make sense?
 Asura.Chaostaru
Offline
Serveur: Asura
Game: FFXI
By Asura.Chaostaru 2019-01-18 08:25:55
Link | Citer | R
 
Gaude1 said: »
While I would like to learn it..

I do just want a versatile lua.. I think the one above is relatively simple? As far as i can tell, it just has a few tp methods and a DT, then allows for magic use, and has idle/engaged.

Thats really all I need.. I started wanting gearswap so I could ensure my swaps were happening during lag situations.

I play a variety of jobs, so if its something I could learn, then I could write them for my BST (for example) as allot of the scripts out there are extremely basic, or extremely complicated.

So, again, yes a versatile DRK lua would be nice. (I'm sure I can easily alter a fairly simple drk lua to work for my PLD)

Thank you :)

Can try out the one I use if you want. It has pretty much everything I need/use.
Code
--[[ Info
Commands
	//gs debugmode
	//gs showswaps
	//gs validate - looks for gear in your sets that isnt in inventory.

-- Scythe Light:
	Insurgency > Vorpal Scythe > Entropy > Guillotine > Entropy > Insurgency 
	Vorpal Scythe > Entropy > Guillotine > Entropy > Insurgency 
	Entropy > Guillotine > Entropy > Insurgency 
	Guillotine > Entropy > Insurgency
	
-- Scythe Darkness: 
    Insurgency (M) > Vorpal Scythe > Vorpal Scythe > Insurgency (M) > Entropy (MM) > Cross Reaper
    Entropy (MM) > Guillotine > Entropy (MM) > Cross Reaper > Entropy (MM)
	Cross Reaper > Insurgency (M) > Entropy (MM) > Cross Reaper
    Insurgency (M) > Entropy (MM) > Cross Reaper
	Cross Reaper > Entropy (MM)
    Entropy (MM) > Cross Reaper

-- Apoc Darkness
    Entropy (MM) > Guillotine > Entropy (MM) > Cross Reaper > Entropy (MM) > Catastrophe (R)
    Entropy (MM) > Guillotine > Entropy (MM) > Cross Reaper > Entropy (MM)
    Insurgency (M) > Entropy (MM) > Cross Reaper > Catastrophe (R)
	Insurgency (M) > Catastrophe (R) > Cross Reaper > Catastrophe (R)
	Cross Reaper > Insurgency (M) > Catastrophe (R) > Cross Reaper
	Catastrophe (R) > Cross Reaper > Catastrophe (R)
	Insurgency (M) > Catastrophe (R) > Cross Reaper
	Cross Reaper > Catastrophe (R) > Catastrophe (R)
    Cross Reaper > Entropy (MM) > Catastrophe (R)
	Entropy (MM) > Cross Reaper > Catastrophe (R)
    Catastrophe (R) > Catastrophe (R)
    Catastrophe (R) > Cross Reaper
    Cross Reaper > Catastrophe (R)

-- Other Light
	Catastrophe (R) > Savage Blade (Q) > Insurgency (M)
    Entropy (MM) > Savage Blade (Q) > Insurgency (M)
	Savage Blade (Q) > Insurgency (M)
	Chant du Cygne (E) > Torcleaver (E)

-- Other Dark
	Atonement (M) > Entropy (MM) > Cross Reaper
	Savage Blade (Q) > Cross Reaper > Entropy (MM)
	Chant du Cygne (E) > Catastrophe (R)
	Chant du Cygne (E) > Entropy (MM)
    Requiescat (MM) > Cross Reaper
	Requiescat (MM) > Torcleaver (E)

-- GreatSword
    Resolution (MM) > Torcleaver (E) > Scourge (R) > Resolution (MM) > Torcleaver (E)
	Resolution (MM) > Torcleaver (E) > Scourge (R) > Resolution (MM)
    Resolution (MM) > Scourge (R) > Torcleaver (E)
	Scourge (R) > Resolution (MM) > Torcleaver (E)
	Torcleaver (E) > Torcleaver (E)
	Scourge (R) > Resolution (MM)
--]]

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
	 -- Load and initialize the include file.
    include('Mote-Include.lua')
end

function binds_on_load()
-- F9-F12
	send_command('bind f9 gs c cycle OffenseMode')
	send_command('bind f10 gs c cycle HybridMode')
	send_command('bind f11 gs c cycle WeaponskillMode')
	send_command('bind f12 gs c cycle IdleMode')
-- ALT F9-12
	send_command('bind !f9 gs c update user')
	send_command('bind !f10 gs c cycle RangedMode')
	send_command('bind !f11 gs c cycle WeaponskillMode')
	send_command('bind !f12 gs c cycle Kiting')
	send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')
    send_command('bind !q input /equip ring2 "Dim. Ring (Holla)"; /echo Reisenjima; wait 11; input /item "Dim. Ring (Holla)" <me>;')
	send_command('bind !e input /item "Echo Drops" <me>')
	send_command('bind !h input /item "Holy Water" <me>')
end
 
-- Setup vars that are user-independent.
function job_setup()
    state.Buff.Aftermath = buffactive.Aftermath or false
    state.Buff.Souleater = buffactive.Souleater or false
	state.Buff['Dark Seal'] = buffactive['Dark Seal'] or false
	state.Buff['Last Resort'] = buffactive['Last Resort'] or false
	state.Buff['Doom'] = buffactive['Doom'] or false
	state.Buff['Curse'] = buffactive['Curse'] or false

	Apoc_weapons = S{'Apocalypse'}
	GS_weapons = S{'Ragnarok', 'Montante +1', 'Caladbolg'}
	Anguta_weapons = S{'Anguta'}
	Lib_weapons = S{'Liberator'}

	get_combat_form()
	get_combat_weapon()

	LowTierNuke = 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'}
		
	Absorbs = S{'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI', 'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri', 'Absorb-ACC', 'Absorb-TP'}
		
end

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    -- Options: Override default values
    state.OffenseMode:options('Normal', 'HighAcc', 'DamageTaken')
    state.WeaponskillMode:options('Normal', 'Low_Acc','High_Acc')
    state.HybridMode:options('Normal', 'DamageTaken')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal','DamageTaken')

    select_default_macro_book()
	set_lockstyle()
end

-- Called when this job file is unloaded (eg: job change)
function file_unload()
	if binds_on_unload then
		binds_on_unload()
	end
end

-- Define sets and vars used by this job file.
function init_gear_sets()
-- Precast sets
    sets.precast.JA['Diabolic Eye'] = {hands="Fallen's Finger Gauntlets"}
    sets.precast.JA['Arcane Circle'] = {feet="Ignominy Sollerets +3"}
    sets.precast.JA['Nether Void'] = {legs="Heathen's Flanchard +1"}
    sets.precast.JA['Souleater'] = {head="Ignominy Burgonet +3"}
    sets.precast.JA['Last Resort'] = {feet="Fallen's Sollerets +1", back=Ank_STP}
    sets.precast.JA['Weapon Bash'] = {hands="Ignominy Gauntlets +2"}
    sets.precast.JA['Blood Weapon'] = {body="Fallen's Cuirass +1"}
	sets.precast.JA['Dark Seal']    = {head="Fallen's Burgeonet +1"}

-- Waltz set (chr and vit)
    sets.precast.Waltz = {
        ammo="Seething Bomblet +1",
        head="Loess Barbuta +1", body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Loricate Torque +1",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt +1",
        legs="Sulevia's Cuisses +2", feet="Amm Greaves",
        ring1="Niqmaddu Ring", ring2="Regal Ring",
        ear1="Odnowa Earring +1", ear2="Odnowa Earring"}

-- Fast cast sets for spells
    sets.precast.FC = {
		ammo="Sapience Orb",
		head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}}, body={ name="Odyss. Chestplate", augments={'"Fast Cast"+5','MND+6','"Mag.Atk.Bns."+12',}},
		back=Ank_FC, neck="Orunmila's Torque",
		hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}}, waist="Sailfi Belt +1",
		legs={ name="Odyssean Cuisses", augments={'"Mag.Atk.Bns."+14','"Fast Cast"+6','MND+3','Mag. Acc.+14',}}, feet="Carmine Greaves",
		ring1="Prolix Ring", ring2="Kishar Ring",
		ear1="Etiolation Earring", ear2="Loquacious Earring"}

    sets.precast.FC.Impact = set_combine(sets.precast.FC, {
		head=empty, body="Twilight Cloak"})

-- Midcast Sets
    sets.midcast.FastRecast = {}

-- Specific spells
    sets.midcast['Dark Magic'] = {left_ring="Evanescence Ring",}
	
    sets.midcast['Enfeebling Magic'] = {}

-- Based on HP when casted.
    sets.midcast['Dread Spikes'] = {}

-- Absorbs
    sets.midcast.Absorb = {}

    sets.midcast['Absorb-TP'] = set_combine(sets.midcast.Absorb, {hands="Heathen's Gauntlets +1"})
	sets.midcast['Absorb-TP'].Resistant = set_combine(sets.midcast.Absorb.Resistant, {hands="Heathen's Gauntlets +1"})

	sets.midcast.Stun = {}

		
	sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {left_ring="Evanescence Ring",})
	

	sets.midcast['Drain III'] = sets.midcast.Drain
	sets.midcast['Drain III'].Resistant = sets.midcast.Drain.Resistant
		
	sets.midcast.Aspir = sets.midcast.Drain
	sets.midcast.Aspir.Resistant = sets.midcast.Drain.Resistant

	sets.midcast.Impact = set_combine(sets.midcast['Dark Magic'], {head=empty, body="Twilight Cloak"})
	sets.midcast.Impact.Resistant = set_combine(sets.midcast['Dark Magic'].Resistant, {head=empty, body="Twilight Cloak"})

-- Elemental Magic sets are default for handling low-tier nukes.
	sets.midcast.LowTierNuke = {}

	sets.midcast.LowTierNuke.Resistant = {}

	-- Custom classes for high-tier nukes.
	sets.midcast.HighTierNuke = sets.midcast.LowTierNuke
	sets.midcast.HighTierNuke.Resistant = sets.midcast.LowTierNuke.Resistant

-- Resting sets
	sets.resting = {}

-- Idle sets
    sets.idle = {
		ammo="Staunch Tathlum",
        head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Sanctity Necklace",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt",
        legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
        ring1="Defending Ring", ring2="Woltaris Ring",
        ear1="Etiolation Earring", ear2="Cessance Earring"}

    sets.idle.DamageTaken = {
		ammo="Staunch Tathlum",
        head="Flamma Zucchetto +2", body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Loricate Torque +1",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt",
        legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
        ring1="Defending Ring", ring2="Gelatinous Ring +1",
        ear1="Etiolation Earring", ear2="Hearty Earring"}

    sets.idle.Town = {
		ammo="Staunch Tathlum",
        head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Sanctity Necklace",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt",
        legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
        ring1="Defending Ring", ring2="Woltaris Ring",
        ear1="Etiolation Earring", ear2="Cessance Earring"}

	sets.idle.Weak = {
		ammo="Seething Bomblet +1",
        head="Flamma Zucchetto +2", body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Loricate Torque +1",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt",
        legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
        ring1="Defending Ring", ring2="Gelatinous Ring +1",
        ear1="Etiolation Earring", ear2="Hearty Earring"}

	sets.Kiting = {legs="Carmine Cuisses +1"}

-- Custom buff sets
	sets.Souleater = {head="Ignominy Burgonet +3"}
	sets['Last Resort'] = {}
	sets.Doom = {head="Twilight Helm", body="Twilight Mail", ring2="Purity Ring"}
	sets['Dark Seal'] = {head="Fallen's Burgeonet +1"}
	sets.Aftermath = {}

-- Earring considerations, given Lugra's day/night stats
    sets.BrutalLugra = { ear1="Brutal Earring", ear2="Lugra Earring +1" }
    sets.Lugra = { ear1="Lugra Earring +1" }

-- Engaged Sets
	--1044acc
	sets.engaged = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1103acc
	sets.engaged.LowAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1165acc
	sets.engaged.MidAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1225acc
	sets.engaged.HighAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}

-- Liberator - Need 29stp for 5 hit. 76stp for 4hit.
	--1116acc 31stp 43da 8ta 8qa 22haste
	sets.engaged.Liberator = {
		ammo="Ginsen",
		head="Flamma Zucchetto +1", body=Val_QA_body,
		back=Ank_DA_TP, neck="Ganesha's Mala",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Arg_HQ_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1157acc 32stp 44da 4ta 8qa 24haste
	sets.engaged.Liberator.LowAcc = {
		ammo="Ginsen",
		head=Arg_HQ_head, body=Val_QA_body,
		back=Ank_DA_TP, neck="Ganesha's Mala",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet="Flamma Gambieras +1",
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1212acc 33stp 36da 4ta 5qa 21haste
	sets.engaged.Liberator.MidAcc = {
		ammo="Seething Bomblet +1",
		head=Arg_HQ_head, body=Val_DA_body,
		back=Ank_DA_TP, neck="Combatant's Torque",
		hands="Sulevia's Gauntlets +2", waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1297acc 33stp 12da 22haste
	sets.engaged.Liberator.HighAcc = {
		ammo="Seething Bomblet +1",
		head="Ignominy Burgonet +3", body="Ignominy Cuirass +3",
		back=Ank_STP, neck="Combatant's Torque",
		hands="Ignominy Gauntlets +2", waist="Olseni Belt",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Ramuh ring +1", ring2="Regal ring",
		ear1="Telos Earring", ear2="Mache Earring"}

-- Anguta - Need 26stp for 5 hit. 72stp for 4 hit.
	--1093acc 73stp 23da 8ta 6qa 22haste
	sets.engaged.Anguta = {
		ammo="Ginsen",
		head="Flamma Zucchetto +1", body=Val_QA_body,
		back=Ank_STP, neck="Ainia Collar",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs=Ody_STP_legs, feet=Arg_HQ_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Brutal Earring"}	
	--1155acc 73stp 27da 2ta 6qa 24haste
	sets.engaged.Anguta.LowAcc = {
		ammo="Ginsen",
		head=Arg_HQ_head, body=Val_QA_body,
		back=Ank_STP, neck="Combatant's Torque",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs=Ody_STP_legs, feet="Flamma Gambieras +1",
		ring1="Niqmaddu Ring", ring2="Petrov Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1212acc 43stp 36da 4ta 5qa 21haste
	sets.engaged.Anguta.MidAcc = {
		ammo="Seething Bomblet +1",
		head=Arg_HQ_head, body=Val_DA_body,
		back=Ank_DA_TP, neck="Combatant's Torque",
		hands="Sulevia's Gauntlets +2", waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1297acc 43stp 12da 22haste
	sets.engaged.Anguta.HighAcc = {
		ammo="Seething Bomblet +1",
		head="Ignominy Burgonet +3", body="Ignominy Cuirass +3",
		back=Ank_STP, neck="Combatant's Torque",
		hands="Ignominy Gauntlets +2", waist="Olseni Belt",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Ramuh ring +1", ring2="Regal ring",
		ear1="Telos Earring", ear2="Mache Earring"}

-- Apocalypse - Need 33stp for 5 hit. 82stp for 4hit.
	--1180acc 33stp 41da 8ta 8qa 22haste
	sets.engaged.Apocalypse = {
		ammo="Ginsen",
		head="Flamma Zucchetto +1", body=Val_QA_body,
		back=Ank_DA_TP, neck="Ganesha's Mala",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Arg_HQ_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Brutal Earring"}
	--1217acc 37stp 44da 4ta 8qa 24haste
	sets.engaged.Apocalypse.LowAcc = {
		ammo="Ginsen",
		head=Arg_HQ_head, body=Val_QA_body,
		back=Ank_DA_TP, neck="Ganesha's Mala",
		hands=Arg_HQ_hands, waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Arg_HQ_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1272acc 33stp 36da 4ta 5qa 21haste
	sets.engaged.Apocalypse.MidAcc = {
		ammo="Seething Bomblet +1",
		head=Arg_HQ_head, body=Val_DA_body,
		back=Ank_DA_TP, neck="Combatant's Torque",
		hands="Sulevia's Gauntlets +2", waist="Windbuffet Belt +1",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Niqmaddu Ring", ring2="Hetairoi Ring",
		ear1="Telos Earring", ear2="Cessance Earring"}
	--1357acc 33stp 12da 22haste
	sets.engaged.Apocalypse.HighAcc = {
		ammo="Seething Bomblet +1",
		head="Ignominy Burgonet +3", body="Ignominy Cuirass +3",
		back=Ank_STP, neck="Combatant's Torque",
		hands="Ignominy Gauntlets +2", waist="Olseni Belt",
		legs="Ignominy Flanchard +3", feet=Val_STP_feet,
		ring1="Ramuh ring +1", ring2="Regal ring",
		ear1="Telos Earring", ear2="Mache Earring"}

-- GreatSword - Need 26stp for 6 hit. 62stp for 5 hit.
	--1109acc 31stp 43da 8ta 8qa 22haste
	sets.engaged.GreatSword = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1150acc 32stp 44da 4ta 8qa 24haste	
	sets.engaged.GreatSword.LowAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1206acc 33stp 36da 4ta 5qa 21haste
	sets.engaged.GreatSword.MidAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}
	--1291acc 33stp 12da 22haste
	sets.engaged.GreatSword.HighAcc = {
		ammo="Seething Bomblet +1",
		head="Flamma Zucchetto +2", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}, neck="Lissome Necklace",
		hands="Sulevia's Gauntlets +2", waist="Ioskeha Belt",
		legs="Sulevia's Cuisses +2", feet="Flamma Gambieras +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear1="Brutal Earring", ear2="Cessance Earring"}

-- Engaged DamageTaken
	sets.engaged.DamageTaken = {
	head="Flamma Zucchetto +2", body="Sulevia's Platemail +2",
        back="Moonbeam Cape", neck="Loricate Torque +1",
        hands="Sulevia's Gauntlets +2", waist="Flume Belt",
        legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
        ring1="Defending Ring", ring2="Gelatinous Ring +1",
        ear1="Etiolation Earring", ear2="Hearty Earring"}
	sets.engaged.LowAcc.DamageTaken = set_combine(sets.engaged.DamageTaken, {
		neck="Combatant's Torque", back=Ank_STP, ring2="Patricius Ring"})
	sets.engaged.MidAcc.DamageTaken = set_combine(sets.engaged.DamageTaken, {
		neck="Combatant's Torque", back=Ank_STP, ring2="Patricius Ring"})
	sets.engaged.HighAcc.DamageTaken = set_combine(sets.engaged.DamageTaken, {
		neck="Combatant's Torque", back=Ank_STP, ring2="Patricius Ring"})	
	-- Liberator DamageTaken
	sets.engaged.Liberator.DamageTaken = sets.engaged.DamageTaken
	sets.engaged.Liberator.LowAcc.DamageTaken = sets.engaged.LowAcc.DamageTaken
	sets.engaged.Liberator.MidAcc.DamageTaken = sets.engaged.MidAcc.DamageTaken
	sets.engaged.Liberator.HighAcc.DamageTaken = sets.engaged.HighAcc.DamageTaken
	-- Anguta DamageTaken
	sets.engaged.Anguta.DamageTaken = sets.engaged.DamageTaken
	sets.engaged.Anguta.LowAcc.DamageTaken = sets.engaged.LowAcc.DamageTaken
	sets.engaged.Anguta.MidAcc.DamageTaken = sets.engaged.MidAcc.DamageTaken
	sets.engaged.Anguta.HighAcc.DamageTaken = sets.engaged.HighAcc.DamageTaken
	-- Apocalypse DamageTaken
	sets.engaged.Apocalypse.DamageTaken = sets.engaged.DamageTaken
	sets.engaged.Apocalypse.LowAcc.DamageTaken = sets.engaged.LowAcc.DamageTaken
	sets.engaged.Apocalypse.MidAcc.DamageTaken = sets.engaged.MidAcc.DamageTaken
	sets.engaged.Apocalypse.HighAcc.DamageTaken = sets.engaged.HighAcc.DamageTaken		
	-- GreatSword DamageTaken
	sets.engaged.GreatSword.DamageTaken = sets.engaged.DamageTaken
	sets.engaged.GreatSword.LowAcc.DamageTaken = sets.engaged.LowAcc.DamageTaken
	sets.engaged.GreatSword.MidAcc.DamageTaken = sets.engaged.MidAcc.DamageTaken
	sets.engaged.GreatSword.HighAcc.DamageTaken = sets.engaged.HighAcc.DamageTaken

-- Weaponskill sets
	sets.precast.WS = {
	ammo="Knobkierrie",ear1="Ishvara Earring",
		head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, body="Ratri Plate",
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}, neck="Fotia Gorget",
		hands="Ratri Gadlings", waist="Fotia Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Regal Ring", ring2="Niqmaddu Ring",
	    ear2={ name="Moonshade Earring", augments={'"Mag.Atk.Bns."+4','TP Bonus +250',}},}
		
	sets.precast.WS.Acc = set_combine(sets.precast.WS, {})

-- Insurgency - FTP 0.5, 3.25, 6.0 - STR 20%, INT 20% -- Fusion/Compression
	sets.precast.WS['Insurgency'] = {
		ammo="Knobkierrie",
		head="Ignominy Burgonet +3", body="Ignominy Cuirass +3",
		back=Ank_DA, neck="Fotia Gorget",
		hands="Sulevia's Gauntlets +2", waist="Fotia Belt",
		legs="Ignominy Flanchard +3", feet="Flamma Gambieras +1",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Brutal Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Insurgency'].Acc = set_combine(sets.precast.WS['Insurgency'], { 
		ammo="Seething Bomblet +1", ear1="Mache Earring"})

-- Entropy - FTP 0.75, 1.25, 2.0, - INT 85% -- Gravitation/Reverberation
	sets.precast.WS['Entropy'] = {
		ammo="Knobkierrie",
		head="Ignominy Burgonet +3", body="Ignominy Cuirass +3",
		back=Ank_DA, neck="Fotia Gorget",
		hands="Sulevia's Gauntlets +2", waist="Fotia Belt",
		legs="Ignominy Flanchard +3", feet="Flamma Gambieras +1",
		ring1="Shiva Ring +1", ring2="Shiva Ring +1",
		ear1="Brutal Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Entropy'].Acc = set_combine(sets.precast.WS['Entropy'], { 	
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		ring1="Ramuh ring +1", ring2="Regal ring"})
		
-- Catastrophe - FTP 2.75 - STR 40%, INT 40% - WSdmg% -- Darkness/Gravitation
	sets.precast.WS['Catastrophe'] = {
		ammo="Knobkierrie",
		head=Val_WSdmg_head, body="Ignominy Cuirass +3",
		back=Ank_WSdmg, neck="Caro Necklace",
		hands=Ody_WSdmg_hands, waist="Metalsinger Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Ishvara Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Catastrophe'].Acc = set_combine(sets.precast.WS['Catastrophe'], {
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		head="Ignominy Burgonet +3", legs="Ignominy Flanchard +3"})

-- Cross Reaper - FTP 2.75 - STR 40%, INT 40% - WSdmg% -- Darkness/Gravitation
	sets.precast.WS['Cross Reaper'] = {
		ammo="Knobkierrie",
		head=Val_WSdmg_head, body="Ignominy Cuirass +3",
		back=Ank_WSdmg, neck="Caro Necklace",
		hands=Ody_WSdmg_hands, waist="Metalsinger Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Ishvara Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Cross Reaper'].Acc = set_combine(sets.precast.WS['Cross Reaper'], {
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		head="Ignominy Burgonet +3", legs="Ignominy Flanchard +3"})

-- Quietus - FTP 3.0, - STR 60% MND 60% - Triple Dmg, Ignores Defense -- Darkness/Distortion
	sets.precast.WS['Quietus'] = {
		ammo="Knobkierrie",
		head=Val_WSdmg_head, body="Ignominy Cuirass +3",
		back=Ank_WSdmg, neck="Caro Necklace",
		hands=Ody_WSdmg_hands, waist="Metalsinger Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Ishvara Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Quietus'].Acc = set_combine(sets.precast.WS['Quietus'], {
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		head="Ignominy Burgonet +3", legs="Ignominy Flanchard +3"})

-- Resolution - FTP .71, 1.5, 2.25, - STR 85% Multi Hit -- Fragmentation/Scission
	sets.precast.WS['Resolution'] = {
	     ammo="Knobkierrie",ear1="Ishvara Earring",
		head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, body="Ratri Plate",
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}, neck="Fotia Gorget",
		hands="Ratri Gadlings", waist="Fotia Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Regal Ring", ring2="Niqmaddu Ring",
	    ear2="Cessance Earring"
		}
	sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS['Resolution'], { 
		ammo="Seething Bomblet +1",
		head="Ignominy Burgonet +3", feet="Flamma Gambieras +2",
		hands="Ignominy Gauntlets +2", ear1="Brutal Earring"})

-- Torcleaver - FTP 4.75, 7.5, 10, - VIT 80% -- Light/Distortion
	sets.precast.WS['Torcleaver'] = {
		ammo="Knobkierrie",ear1="Ishvara Earring",
		head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, body="Ratri Plate",
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}, neck="Fotia Gorget",
		hands="Ratri Gadlings", waist="Fotia Belt",
		legs="Ratri Cuisses", feet="Sulevia's Leggings +2",
		ring1="Regal Ring", ring2="Niqmaddu Ring",
	    ear2={ name="Moonshade Earring", augments={'"Mag.Atk.Bns."+4','TP Bonus +250',}},}  
	
	sets.precast.WS['Torcleaver'].Low_Acc = {
		ammo="Knobkierrie",ear1="Ishvara Earring",
		head={ name="Valorous Mask", augments={'Accuracy+14 Attack+14','Weapon skill damage +4%','STR+5','Accuracy+12',}}, 
		body={ name="Valorous Mail", augments={'Attack+18','Weapon skill damage +5%','Accuracy+13',}},
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}, neck="Fotia Gorget",
		hands={ name="Valorous Mitts", augments={'Accuracy+17 Attack+17','Weapon skill damage +4%','DEX+6','Accuracy+7','Attack+7',}}, waist="Fotia Belt",
		legs={ name="Valor. Hose", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','Accuracy+8',}}, 
		feet="Sulevia's Leggings +2",
		ring1="Regal Ring", ring2="Niqmaddu Ring",
	    ear2={ name="Moonshade Earring", augments={'"Mag.Atk.Bns."+4','TP Bonus +250',}},}
		
		sets.precast.WS['Torcleaver'].High_Acc = {
		ammo="Knobkierrie", ear1="Digni. Earring",
		head="Ynglinga Sallet", body="Flamma Korazin +2",
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}, neck="Fotia Gorget",
		hands="Sulevia's Gauntlets +2", waist="Fotia Belt",
		legs="Sulevia's Cuisses +2", feet="Sulevia's Leggings +2",
		ring1="Flamma ring", ring2="Niqmaddu ring",
		ear2={ name="Moonshade Earring", augments={'"Mag.Atk.Bns."+4','TP Bonus +250',}},}
		
-- Scourge - FTP 3.0, - STR 40% VIT 40% -- Light/Fusion
	sets.precast.WS['Scourge'] = sets.precast.WS['Torcleaver']
	sets.precast.WS['Scourge'].Acc = sets.precast.WS['Torcleaver'].Acc
	
-- Savage - FTP 4.0, 10.25, 13.75 - MND 50% STR 50% - Fragmentation/Scission
	sets.precast.WS['Savage Blade'] = {
		ammo="Knobkierrie",
		head=Val_WSdmg_head, body="Ignominy Cuirass +3",
		back=Ank_WSdmg, neck="Caro Necklace",
		hands=Ody_WSdmg_hands, waist="Metalsinger Belt",
		legs=Ody_WSdmg_legs, feet="Sulevia's Leggings +2",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Ishvara Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		head="Ignominy Burgonet +3", legs="Ignominy Flanchard +3"})

-- Judgment
	sets.precast.WS['Judgment'] = {
		ammo="Knobkierrie",
		head=Val_WSdmg_head, body="Ignominy Cuirass +3",
		back=Ank_WSdmg, neck="Caro Necklace",
		hands=Ody_WSdmg_hands, waist="Metalsinger Belt",
		legs=Ody_WSdmg_legs, feet="Sulevia's Leggings +2",
		ring1="Niqmaddu Ring", ring2="Regal Ring",
		ear1="Ishvara Earring", ear2="Moonshade Earring"}
	sets.precast.WS['Judgment'].Acc = set_combine(sets.precast.WS['Cross Reaper'], {
		ammo="Seething Bomblet +1", ear1="Mache Earring",
		head="Ignominy Burgonet +3", legs="Ignominy Flanchard +3"})
end

function job_pretarget(spell, action, spellMap, eventArgs)
    if spell.type:endswith('Magic') and buffactive.silence then
        eventArgs.cancel = true
        send_command('input /item "Echo Drops" <me>')
    end
end

-- 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)

end

function job_post_precast(spell, action, spellMap, eventArgs)
	-- Make sure abilities using head gear don't swap 
    if spell.type:lower() == 'weaponskill' then
        if player.tp > 2999 then
            equip(sets.BrutalLugra)
        else -- use Lugra + moonshade
		if world.time >= (17*60) or world.time <= (7*60) then
			equip(sets.Lugra)
		else
			-- do nothing.
		end
        end
    end
end


-- Job-specific hooks for standard casting events.
function job_midcast(spell, action, spellMap, eventArgs)
 
end

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spellMap == 'Cure' and spell.target.type == 'SELF' then
		equip(sets.midcast.CureSelf)
	end
	if buffactive['Dark Seal'] and S{"Drain III"}:contains(spell.english)then
        equip({head="Fallen's Burgeonet +1"})
    end
end

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

function job_post_aftercast(spell, action, spellMap, eventArgs)

end

---------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
---------------------------------------------------------------------

-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)

end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if state.Buff['Doom'] or state.Buff['Curse'] then
        idleSet = set_combine(idleSet, sets.Doom)
	end
	return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
	if state.Buff.Souleater then
		meleeSet = set_combine(meleeSet, sets.Souleater)
	end
	if state.Buff['Doom'] or state.Buff['Curse'] then
		meleeSet = set_combine(meleeSet, sets.Doom)
	end
	return meleeSet
end


---------------------------------------------------------------------
-- General hooks for other events.
---------------------------------------------------------------------

-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)

end

-- 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)
	if state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    end
	if buff == "Souleater" then
        handle_equipping_gear(player.status)
    end
	if buff == "Doom" or buff == "Curse" then
		if gain then
			equip(sets.doom)
		else
			handle_equipping_gear(player.status)
		end
	end
end

----------------------------------------------------------------------
-- User code that supplements self-commands.
-----------------------------------------------------------------------

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
	get_combat_form()
	get_combat_weapon()
end

----------------------------------------------------------------------
-- Utility functions specific to this job.
-----------------------------------------------------------------------
function get_combat_form()
    -- Check Weapontype
	if  Apoc_weapons:contains(player.equipment.main) then
		state.CombatForm:set('Apocalypse')
	elseif
		Anguta_weapons:contains(player.equipment.main) then
		state.CombatForm:set('Anguta')
	elseif
		GS_weapons:contains(player.equipment.main) then
		state.CombatForm:set('GreatSword')
	elseif
		Lib_weapons:contains(player.equipment.main) then
		state.CombatForm:set('Liberator')
	else
		state.CombatForm:reset()
    end
end

function get_combat_weapon()
	if  Apoc_weapons:contains(player.equipment.main) then
		state.CombatWeapon:set('Apocalypse')
	elseif Anguta_weapons:contains(player.equipment.main) then
		state.CombatWeapon:set('Anguta')
	elseif GS_weapons:contains(player.equipment.main) then
		state.CombatWeapon:set('GreatSword')
	elseif
		Lib_weapons:contains(player.equipment.main) then
		state.CombatForm:set('Liberator')
	else -- Use regular set.
		state.CombatWeapon:reset()
    end
end

-- Set eventArgs.handled to true if we don't want the automatic display to be run.
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)

end

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
	if spell.skill == 'Dark Magic' and Absorbs:contains(spell.english) then
		return 'Absorb'
	end

	if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
		if LowTierNuke:contains(spell.english) then
			return 'LowTierNuke'
		else
			return 'HighTierNuke'
		end
	end
end

function select_earring()
    if world.time >= (17*60) or world.time <= (7*60) then
        return sets.Lugra
    else
        -- do nothing
    end
end

function update_melee_groups()

end

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'WAR' then
        set_macro_page(1, 13)
    elseif player.sub_job == 'RDM' then
        set_macro_page(1, 13)
    elseif player.sub_job == 'NIN' then
        set_macro_page(1, 13)
    elseif player.sub_job == 'THF' then
        set_macro_page(1, 13)
    else
        set_macro_page(1, 13)
    end
end

function set_lockstyle()
	send_command('wait 6;input /lockstyleset 4')
end
Offline
Posts: 9
By Gaude1 2019-01-18 12:15:55
Link | Citer | R
 
As Byrne had mentioned... Your script looks very intimidating.
I'm not sure I would know how to even run that script.

There are many triggers and settings in there that are already WAY above my knowledge.... To be fair, even with my script shown I don't know how to change tp sets lol.

Would you be willing to either show me where I can learn about the controls, or write out the controls? in a pm or on here.

Thank you all for the help thus far :)
 Asura.Chaostaru
Offline
Serveur: Asura
Game: FFXI
By Asura.Chaostaru 2019-01-18 14:46:40
Link | Citer | R
 
Gaude1 said: »
As Byrne had mentioned... Your script looks very intimidating.
I'm not sure I would know how to even run that script.

There are many triggers and settings in there that are already WAY above my knowledge.... To be fair, even with my script shown I don't know how to change tp sets lol.

Would you be willing to either show me where I can learn about the controls, or write out the controls? in a pm or on here.

Thank you all for the help thus far :)


F9-F12 toggles everything and is self explanatory in game

Alt+w will equip your warp ring (if its on you or in wardrobe) and use it automatically.

Alt+q will do the same thing but with teleport-holla ring

Alt+h will use holy water

Alt+e will use echo drops

Dont worry about putting gearsets in the sets.engaged.Apocalypse or any rema weapons unless of course you have them.

also dont worry about the gearsets for the weaponskills you dont use.
make sure to set your macro and lockstyle at the bottom.

Name it drk.lua and //gs load drk in game
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2019-01-21 07:02:01
Link | Citer | R
 
Gaude1 said: »
As Byrne had mentioned... Your script looks very intimidating.
I'm not sure I would know how to even run that script.

There are many triggers and settings in there that are already WAY above my knowledge.... To be fair, even with my script shown I don't know how to change tp sets lol.

Would you be willing to either show me where I can learn about the controls, or write out the controls? in a pm or on here.

Thank you all for the help thus far :)

I have one video on youtube covering the essentials of installing and understanding Gear Swap, this happens to be the topic of my next video. I'll give you a link when it's done.

Ideally it will cover:

-How to read what keys are bound
-How to ensure all keys that are bound are unbound when unloaded
-How to make your own set
-How to add logic to an function
-How to de-conflict erroneous logic in a function
-What set_combines are and how to use them properly (and when they wont solve your problem)

and maybe if there is time

-How to make your own function
-What are useful example for logic in functions most don't use
-How to restructure a file for readability
Offline
Posts: 9
By Gaude1 2019-02-18 15:53:22
Link | Citer | R
 
Asura.Byrne said: »
Gaude1 said: »
As Byrne had mentioned... Your script looks very intimidating.
I'm not sure I would know how to even run that script.

There are many triggers and settings in there that are already WAY above my knowledge.... To be fair, even with my script shown I don't know how to change tp sets lol.

Would you be willing to either show me where I can learn about the controls, or write out the controls? in a pm or on here.

Thank you all for the help thus far :)

I have one video on youtube covering the essentials of installing and understanding Gear Swap, this happens to be the topic of my next video. I'll give you a link when it's done.

Ideally it will cover:

-How to read what keys are bound
-How to ensure all keys that are bound are unbound when unloaded
-How to make your own set
-How to add logic to an function
-How to de-conflict erroneous logic in a function
-What set_combines are and how to use them properly (and when they wont solve your problem)

and maybe if there is time

-How to make your own function
-What are useful example for logic in functions most don't use
-How to restructure a file for readability

Have you done this video yet?
I've altered another script that has lots of functions, and think this would be an excellent video to watch
Offline
Posts: 9
By Gaude1 2019-02-28 22:08:16
Link | Citer | R
 
Hello Chaostaru

This is the script at the moment.. please excuse my laughable gear ><

It very well could be that I am missing an additional file?

Any help would be appreciated :)
[+]
 Asura.Chaostaru
Offline
Serveur: Asura
Game: FFXI
By Asura.Chaostaru 2019-02-28 23:47:41
Link | Citer | R
 
Gaude1 said: »
Hello Chaostaru

This is the script at the moment.. please excuse my laughable gear ><

It very well could be that I am missing an additional file?

Any help would be appreciated :)
Wrong lua entirely lol
Log in to post.