Drk Lua 168 Error

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » Jobs » Dark Knight » drk lua 168 error
drk lua 168 error
Offline
Posts: 121
By hamany9 2016-08-21 10:53:37
Link | Quote | Reply
 
Can anyone point out what's wrong with my drk lua?



-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------

-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.

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


-- Setup vars that are user-independent.
function job_setup()
state.Buff['Aftermath'] = buffactive['Aftermath: Lv.1'] or
buffactive['Aftermath: Lv.2'] or
buffactive['Aftermath: Lv.3']
or false
end


-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'Normal', 'Acc', 'Multi'}
options.DefenseModes = {'Normal', 'PDT', 'Reraise'}
options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
options.CastingModes = {'Normal'}
options.IdleModes = {'Normal'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT', 'Reraise'}
options.MagicalDefenseModes = {'MDT'}

state.Defense.PhysicalMode = 'PDT'

adjust_engaged_sets()

-- Additional local binds
send_command('bind ^` input /ja "Hasso" <me>')
send_command('bind !` input /ja "Seigan" <me>')

select_default_macro_book()
end

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

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['Diabolic Eye'] = {hands="Abyss Gauntlets +2"}
sets.precast.JA['Arcane Circle'] = {feet="Ignominy Sollerets"}
sets.precast.JA['Nether Void'] = {legs="Bale Flanchard +2"}


-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Sonia's Plectrum",
head="Yaoyotl Helm",
body="Mikinaak Breastplate",hands="Buremte Gloves",
legs="Cizin Breeches",feet="Karieyh Sollerets +1"}

-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}

-- Fast cast sets for spells

-- Midcast Sets
sets.midcast.FastRecast = {ammo="Impatiens",
head="Valorous mask",neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Etiolation Earring",
body="Odyssean chestplate",hands="Leyline gloves",ring1="Prolix Ring",ring2="Defending ring",
back="Ankou's mantle",waist="Sailfi Belt +1",legs="Odyssean cuisses",feet="Odyssean greaves"}

--Specific spells
sets.midcast.Utsusemi = {ammo="Impatiens",
head="Valorous mask",neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Etiolation Earring",
body="Odyssean chestplate",hands="Leyline gloves",ring1="Prolix Ring",ring2="Defending ring",
back="Ankou's mantle",waist="Sailfi Belt +1",legs="Odyssean cuisses",feet="Odyssean greaves"}

sets.midcast.DarkMagic = {ammo="Impatiens",
neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Etiolation Earring",
body="Lugra cloak +1",hands="Leyline gloves",ring1="Prolix Ring",ring2="Evanscence ring",
back="Ankou's mantle",waist="Sailfi belt+1",legs="Odyssean cuisses",feet="Odyssean greaves"}

sets.midcast.EnfeeblingMagic = sets.midcast.DarkMagic

sets.midcast['Dread Spikes'] = {body="Bale Cuirass +2"}

sets.midcast.Stun = set_combine(sets.midcast.DarkMagic, {
head="Jumalik Helm",ear1="Lifestorm Earring",ear2="Psystorm Earring",
ring2="Evanscence ring"})

sets.midcast.Drain = {ammo="Impatiens",
neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Etiolation Earring",
body="Lugra cloak +1",hands="Leyline gloves",ring1="Prolix Ring",ring2="Evanscence ring",
back="Ankou's mantle",waist="Sailfi belt+1",legs="Odyssean cuisses",feet="Odyssean greaves"}

sets.midcast.Aspir = sets.midcast.Drain

-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Seething bomblet +1",
head="Sulevia's mask +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Ishvara earring",
body="Sulevia's platemail",hands="Valorous mitts",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Ankou's mantle Mantle",waist="Fotia Belt",legs="Sulevia's cuisses +1",feet="Sulevia's leggings +1"}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {back="Ankou's Mantle"})

-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Catastrophe'] = set_combine(sets.precast.WS, {neck="Fotia gorget",ear1="Brutal Earring",ear2="Ishvara earring"})
sets.precast.WS['Catastrophe'].Acc = set_combine(sets.precast.WS.Acc, {neck="Fotia gorget",ear1="Brutal Earring",ear2="Ishvara earring"})
sets.precast.WS['Catastrophe'].Mod = set_combine(sets.precast.WS['Catastrophe'], {waist="Fotia Belt",ear1="Brutal Earring",ear2="Ishvara earring"})

sets.precast.WS['Entropy'] = set_combine(sets.precast.WS, {neck="Fotia gorget",legs="Sulevia's cuisses +1"})
sets.precast.WS['Entropy'].Acc = set_combine(sets.precast.WS.Acc, {neck="Fotia gorget",legs="Sulevia's cuisses +1"})
sets.precast.WS['Entropy'].Mod = set_combine(sets.precast.WS['Entropy'], {waist="Fotia Belt",legs="Sulevia's cuisses +1"})

sets.precast.WS['Resolution'] = set_combine(sets.precast.WS, {neck="Fotia gorget",ring2="Candent Ring"})
sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS.Acc, {neck="Fotia gorget"})
sets.precast.WS['Resolution'].Mod = set_combine(sets.precast.WS['Resolution'], {waist="Fotia Belt"})



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

-- Resting sets
sets.resting = {ammo="Iron gobbet",
head="Jumalik helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Jumalik mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}


-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {ammo="Iron gobbet",
head="Jumalik helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Jumalik mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

sets.idle.Field = {ammo="Iron gobbet",
head="Jumalik helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Jumalik mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

sets.idle.Weak ={ammo="Iron gobbet",
head="Twilight helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Twilight mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

-- Defense sets
sets.defense.PDT = {ammo="Iron gobbet",
head="Jumalik helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Jumalik mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

sets.defense.Reraise = ={ammo="Iron gobbet",
head="Twilight helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Twilight mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

sets.defense.MDT = {ammo="Iron gobbet",
head="Jumalik helm",neck="Loricate torque +1",ear1="Infused Earring",ear2="Etiolation Earring",
body="Jumalik mail",hands="Sulevia's gauntlets +1",ring1="Vocane Ring",ring2="Defending ring",
back="Solemnity cape",waist="Nierenschutz",legs="Carmine cuisses",feet="Sulevia's leggings +1"}

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

sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}

-- Engaged sets
sets.engaged = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Acc = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Clotharius torque",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou'sMantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Multi = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Reraise = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}


-- 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.Apocalypse = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Acc = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Clotharius torque",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.AM = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Multi = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Multi.PDT = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Multi.Reraise = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.PDT = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Acc.PDT = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Reraise ={ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}
sets.engaged.Apocalypse.Acc.Reraise = {ammo="Seething bomblet +1",
head="Valorous mask",neck="Ganesha mala",ear1="Brutal Earring",ear2="Cessance earring",
body="Valorous mail",hands="Sulevia's gauntlets +1",ring1="Rajas Ring",ring2="Petrov Ring",
back="Ankou's Mantle",waist="Ioskeha Belt",legs="Odyssean cuisses",feet="Valorous greaves"}


-- Custom Melee Group
sets.engaged['Senbaak Nagan'] = {ammo="Hagneia Stone",
head="Yaoyotl Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Pak Corselet",hands="Cizin Mufflers",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Letalis Mantle",waist="Goading Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
sets.engaged['Senbaak Nagan'].Acc = {ammo="Hagneia Stone",
head="Yaoyotl Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mikinaak Breastplate",hands="Cizin Mufflers",ring1="Rajas Ring",ring2="Mars's Ring",
back="Letalis Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
sets.engaged['Senbaak Nagan'].Multi = {ammo="Hagneia Stone",
head="Otomi Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mikinaak Breastplate",hands="Cizin Mufflers",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Letalis Mantle",waist="Goading Belt",legs="Cizin Breeches",feet="Ejekamal Boots"}
sets.engaged['Senbaak Nagan'].Multi.PDT = {ammo="Hagneia Stone",
head="Yaoyotl Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Cizin Mail",hands="Cizin Mufflers",ring1="Rajas Ring",ring2="Mars's Ring",
back="Letalis Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Cizin Graves"}
sets.engaged['Senbaak Nagan'].Multi.Reraise = {ammo="Hagneia Stone",
head="Twilight Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Pak Corselet",hands="Cizin Mufflers",ring1="Rajas Ring",ring2="Mars's Ring",
back="Letalis Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Ejekamal Boots"}
sets.engaged['Senbaak Nagan'].PDT = {ammo="Hagneia Stone",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mikinaak Breastplate",hands="Cizin Mufflers",ring1="Dark Ring",ring2="Dark Ring",
back="Mollusca Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
sets.engaged['Senbaak Nagan'].Acc.PDT = {ammo="Hagneia Stone",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mikinaak Breastplate",hands="Cizin Mufflers",ring1="Dark Ring",ring2="Dark Ring",
back="Mollusca Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
sets.engaged['Senbaak Nagan'].Reraise = {ammo="Hagneia Stone",
head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Cizin Mufflers",ring1="Dark Ring",ring2="Dark Ring",
back="Letalis Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
sets.engaged['Senbaak Nagan'].Acc.Reraise = {ammo="Hagneia Stone",
head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Cizin Mufflers",ring1="Dark Ring",ring2="Dark Ring",
back="Letalis Mantle",waist="Dynamic Belt",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------


-- 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 spell.action_type == 'Magic' then
equip(sets.precast.FC)
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)
if spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
end
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 state.DefenseMode == 'Reraise' or
(state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
equip(sets.Reraise)
end
end


-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
return meleeSet
end

-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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)
if buff:startswith('Aftermath') then
state.Buff.Aftermath = gain
adjust_melee_groups()
handle_equipping_gear(player.status)
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)
adjust_engaged_sets()
end

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

function adjust_engaged_sets()
state.CombatWeapon = player.equipment.main
adjust_melee_groups()
end

function adjust_melee_groups()
classes.CustomMeleeGroups:clear()
if state.Buff.Aftermath then
classes.CustomMeleeGroups:append('AM')
end
end

function select_default_macro_book()
-- Default macro set/book
set_macro_page(1, 5)
-- I realize this will be better used with different /subs per book,
-- but I won't worry about that till I get this working properly.
end
Offline
Posts: 103
By Miang 2016-08-21 11:41:18
Link | Quote | Reply
 
Code
sets.defense.Reraise = ={ammo="Iron gobbet",

should be
Code
sets.defense.Reraise = {ammo="Iron gobbet",

on line 168 (that's what the number in the error means, it's the line)
 Asura.Heeroyuy
Offline
Server: Asura
Game: FFXI
Posts: 44
By Asura.Heeroyuy 2016-08-21 12:19:54
Link | Quote | Reply
 
Download notepad++ to edit your lua's in, then you can find the line referenced in the error a whole lot easier
Offline
Posts: 121
By hamany9 2016-08-21 13:14:11
Link | Quote | Reply
 
got it its the sets.defence line with 2 ==, thank you
Log in to post.