Geomancer Lua

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » FFXI » Jobs » Geomancer » geomancer lua
geomancer lua
Offline
Posts: 362
By gargurty 2015-04-22 08:40:07
Link | Citer | R
 
Special thanks too Faloun for helping me on it. Now here is a working geo lua with added features:
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
 
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
 
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end
 
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    indi_timer = ''
    indi_duration = 255
end
 
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
 
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal','Accuracy','Dual')
    state.CastingMode:options('Normal','Accuracy')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
     
    gear.default.obi_waist = "yamabuki-no-obi"
    gear.default.obi_back = "Toro Cape"
    gear.default.obi_ring = "Shiva Ring"
     
    select_default_macro_book()
     
end

lowtier = S{"Fire", "Fire II", "Stone", "Stone II", "Blizzard", "Blizzard II", "Aero", "Aero II", "Water", "Water II", "Thunder", "Thunder II", "Fira", "Blizzara", "Aerora", "Stonera", "Thundara", "Watera"}
hightier = S{"Fire III", "Fire IV", "Stone IV", "Stone III", "Blizzard IV", "Blizzard III", "Aero IV", "Aero III", "Water IV", "Water III", "Thunder IV", "Thunder III", "Fira II", "Blizzara II", "Aerora II", "Stonera II", "Thundara II", "Watera II"}
 
 
-- Define sets and vars used by this job file.
function init_gear_sets()
 
    --------------------------------------
    -- Precast sets
    --------------------------------------
 
    -- Precast sets to enhance JAs
    sets.precast.JA.Bolster = {body="Bagua Tunic +1"}
    sets.precast.JA['Life cycle'] = {body="Geomancy Tunic +1",
    head="Azimuth hood +1"
    }
    sets.precast.JA['Curative Recantation'] = {hands="Bagua Mitaines +1"}
    sets.precast.JA['Mending Halation'] = {legs="Bagua Pants +1"}
    sets.precast.JA['Radial Arcana'] = {feet="Bagua Sandals +1"}
    sets.precast.JA['Primal Zeal'] = {head="Bagua galero +1"}   
    sets.precast.JA['Cardinal Chant'] = {head="geomancy galero +1"}
 
 
    -- Fast cast sets for spells
 
    sets.precast.FC = {
    main="Marin staff +1",
    sub="vivid strap",
    head="Nahtirah Hat",
    body="Vanir Cotehardie",
    hands="Helios Gloves",
    legs="Geo. Pants +1",
    feet="Regal Pumps +1",
    neck="Jeweled Collar",
    waist="Witful Belt",
    left_ear="Enchntr. Earring +1",
    right_ear="Loquac. Earring",
    left_ring="Prolix Ring",
    right_ring="lebeche Ring",
    back="Lifestream Cape",
}
 
    sets.precast.FC.Cure = set_combine(sets.precast.FC, {
    main="Vejovis Wand +1",
    sub="Genbu's Shield",
    body="Heka's Kalasiris",
    waist="Acerbic Sash +1",
    back="Pahtli Cape",
})
 
    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
    head="Umuthi Hat",
    hands="Carapacho Cuffs",
    waist="Siegel Sash",
})  
 
     
    sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {
    main="Ngqoqwanb",
    hands="Bagua Mitaines +1",
    neck="Stoicheion Medal",
})
 
    sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
     
     
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
    ammo="Hasty Pinion +1", 
    head="telchine cap",
    body="helios jacket",
    hands="telchine Gloves",
    legs="telchine braconi",
    feet="telchine pigaches",
    neck="fotia Gorget",
    waist="fotia Belt",
    left_ear="Moonshade Earring",
    right_ear="Brutal Earring",
    left_ring="levia. Ring",
    right_ring="levia. Ring",
    back="Refraction Cape",
}
 
    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
         
        sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS,{   
    ammo="Memoria sachet",
    head="Helios Bandt",
    body="Azimuth Coat +1",
    hands="Hagondes Cuffs +1",
    legs="Hagondes Pants +1",
    feet="helios Boots",
    neck="Eddy Necklace",
    waist="yamabuki-no-obi",
    left_ear="Friomisi Earring",
    right_ear="crematio Earring",
    left_ring="Shiva Ring",
    right_ring=gear.ElementalRing,
    back=gear.ElementalCape,})
         
        sets.precast.WS['Black Halo'] = sets.precast.WS['Flash Nova']
     
             
    sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS['Flash Nova'],{back="Kaikias' cape",})    
 
sets.precast.WS['Gust Slash'] =sets.precast.WS['Flash Nova']
             
    sets.precast.WS['Starlight'] = sets.precast.WS['Flash Nova']
 
    sets.precast.WS['Moonlight'] = sets.precast.WS['Flash Nova']
         
 
    --------------------------------------
    -- Midcast sets
    --------------------------------------
 
    -- Base fast recast for spells
    sets.midcast.FastRecast =set_combine(sets.midcast.fastcast) 
 
sets.midcast.Regen = set_combine(sets.midcast.fastcast, {
    main="bolelabunga",
    body="Telchine Chas."})
     
    sets.midcast['Enhancing Magic']={
    main="Kirin's Pole",
    sub="Fulcio Grip",
    head="Umuthi Hat",
    hands="bagua mitaines +1",
    body={ name="Telchine Chas.", augments={'Mag. Acc.+12 "Mag.Atk.Bns."+12','"Conserve MP"+4','Enh. Mag. eff. dur. +4',}},
    legs="bagua Pants +1",
    feet="helios Boots",
    neck="Colossus's Torque",
    waist="Cascade Belt",
    left_ear="Andoaa Earring",
    right_ear="Magnetic Earring",
    back="Merciful Cape",
}
     
    sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
    back="grapevine cape"})
 
    sets.midcast.Aquaveil = set_combine(sets.midcast['Enhancing Magic'], {
    waist="Emphatikos rope"})
 
    sets.midcast.Geomancy ={
    main="Venabulum",
    sub="Wizzan Grip",
    range="Dunna",
    head="Azimuth hood +1",
    body="Bagua Tunic +1",
    hands="Geo. Mitaines +1",
    legs="azimuth tights  +1",
    feet="azimuth gaiters +1",
    waist="Austerity Belt +1",
    left_ear="magnetic Earring",
    right_ear="Gifted Earring",
    right_ring="Renaye Ring",
    back="Lifestream Cape",
}
     
    sets.midcast.Geomancy.Indi =set_combine(sets.midcast.Geomancy, {legs="bagua pants +1"})
 
 
    sets.midcast.Cure = {
    main="Tamaxchi",
    sub="Genbu's Shield",
    head="Geomancy galero +1",
    body="Heka's Kalasiris",
    hands="telchine Gloves",
    legs="Mes'yohi slacks",
    feet="Regal Pumps +1",
    neck="Colossus's Torque",
    waist="Hachirin-No-Obi",
    left_ear="Gifted Earring",
    right_ear="Magnetic Earring",
    left_ring="Sirona's Ring",
    right_ring=gear.ElementalRing,
    back=gear.ElementalCape,
}
         
        sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
    neck="Stone Gorget",
    waist="siegel sash",
    right_ear="Earthcry Earring",
})  
             
    sets.midcast.Curaga = sets.midcast.Cure
 
    sets.midcast.Protectra = {ring1="Sheltered Ring"}
 
    sets.midcast.Shellra = {ring1="Sheltered Ring"}
 
        -- Custom Spell Classes
    sets.midcast['Enfeebling Magic'] = {
    main="Marin staff +1",
    sub="Mephitis Grip",
    ammo="Memoria sachet",
    head="Artsieq Hat",
    body="Ischemia Chasu.",
    hands="azimuth gloves +1",
    legs="Mes'yohi slacks",
    feet="bagua sandals +1",
    neck="imbodla necklace",
    waist="yamabuki-no-obi",
    left_ear="Gwati Earring",
    right_ear="Enchntr. Earring +1",
    left_ring="Shiva Ring",
    right_ring="Shiva Ring",
    back="lifestream Cape",
}
 
    sets.midcast.IntEnfeebles = set_combine(sets.midcast['Enfeebling Magic'], {
     
})  
 
    sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
 
    sets.midcast['Dark Magic'] = {
    main="Marin staff +1",
    sub="Caecus Grip",
    ammo="Memoria sachet",
    head="Pixie hairpin +1",
    body="Geo. Tunic +1",
    hands="azimuth gloves +1",
    legs="Azimuth Tights +1",
    feet="helios Boots",
    neck="Aesir Torque",
    waist="Yamabuki-no-Obi",
    left_ear="Abyssal Earring",
    right_ear="Gwati Earring",
    left_ring="shiva Ring",
    right_ring="sangoma Ring",
    back="Merciful Cape",
}
         
        sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
    waist="Austerity Belt +1",
    left_ear="Abyssal Earring",
    right_ear="Hirudinea Earring",
    right_ring="Excelsis Ring",
})
     
    sets.midcast.Aspir = sets.midcast.Drain
     
 
 
    sets.midcast.Stun = sets.precast.FC
             
 
            sets.midcast.Bolster = {body="Bagua Tunic +1"}
        sets.midcast['Life Cycle'] = {body="Geo. Tunic +1",
    head="Azimuth hood +1"}
        sets.midcast['Mending Halation'] = {legs="Bagua Pants +1"}
        sets.midcast['Radial Arcana'] = {feet="Bagua Sandals +1"}
        sets.midcast.Bolster.Pet = {body="Bagua Tunic +1"}
        sets.midcast['Life Cycle'].Pet = {body="Geo. Tunic +1",
    head="Azimuth hood +1"}
        sets.midcast['Mending Halation'].Pet = {legs="Bagua Pants +1"}        sets.midcast.Bolster.Pet.Indi = {body="Bagua Tunic +1"}
        sets.midcast['Life Cycle'].Pet.Indi = {body="Geo. Tunic +1",
    head="Azimuth hood +1"}
        sets.midcast['Mending Halation'].Pet.Indi = {legs="Bagua Pants +1"}
 
          -- Elemental Magic sets
     
    sets.midcast['Elemental Magic']= {
    main="Marin Staff +1",
    sub="elder's Grip +1",
    ammo="ghastly tathlum",
    head="Helios Band",
    body="Azimuth Coat +1",
    hands="Hagondes Cuffs +1",
    legs="Hagondes Pants +1",
    feet="Helios Boots",
    neck="Eddy Necklace",
    waist="Sekhmet corset",
    left_ear="Friomisi Earring",
    right_ear="crematio Earring",
    left_ring="shiva Ring",
    right_ring=gear.ElementalRing,
    back=gear.ElementalCape,
}
 
    sets.midcast['Elemental Magic']['Accuracy']=set_combine(sets.midcast['Elemental Magic'], {
	waist=gear.ElementalObi,
})
       sets.midcast.Impact = {
    main="Marin staff +1",
    sub="Elder's Grip +1",
    ammo="Memoria sachet",
    head=empty,
    body="Twilight Cloak",
    hands="azimuth gloves +1",
    legs="Azimuth Tights +1",
    feet="Helios Boots",
    neck="Eddy Necklace",
    waist=gear.ElementalObi,
    left_ear="Gwati Earring",
    right_ear="Crematio Earring",
    left_ring="Shiva Ring",
    right_ring="Shiva Ring",
    back="Toro Cape",
}   
     
    --------------------------------------
    -- Idle/resting/defense/etc sets
    --------------------------------------
 
    -- Resting sets
    sets.resting = {
    main="Bolelabunga",
    sub="Genbu's Shield",
    range="Dunna",
    body="Respite Cloak",
    hands="Bagua Mitaines +1",
    legs="Assid. Pants +1",
    feet="Geo. Sandals +1",
    neck="Twilight Torque",
    waist="Fucho-no-Obi",
    left_ear="Merman's Earring",
    right_ear="Merman's Earring",
    left_ring="Sheltered Ring",
    right_ring="Renaye Ring",
    back="Kumbira Cape",
}
 
 
    -- Idle sets
 
    sets.idle = sets.resting
 
    sets.idle.PDT = {
    main="Mafic cudgel",
    sub="Genbu's Shield",
        head="Hagondes Hat +1",
        neck="Twilight Torque",
        ear1="Merman's Earring",
        ear2="Merman's Earring",
        body="Hagondes Coat +1",
        hands="hagondes cuffs +1",
        ring1="shadow Ring",
        ring2="dark Ring",
        back="shadow mantle",
        waist="Flax Sash",
        legs="hagondes Pants +1",
        feet="hagondes sabots +1"}
         
        sets.idle.MDT = set_combine(sets.idle.PDT, {
    main="marine staff +1",
    sub="vallus grip",})    
 
    -- .Pet sets are for when Luopan is present.
    sets.idle.Pet = set_combine(sets.resting, {main={ name="Nehushtan", augments={'Pet: DEF+13','Pet: "Regen"+3','STR+15 CHR+15',}},
    sub="Genbu's Shield",
    head="Azimuth hood +1",
    body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
    legs="helios spats",
    hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
    feet="Bagua Sandals +1",
    waist="Isa Belt",
    back="Lifestream Cape",
    ear1="Handler's Earring +1",
})
 
    sets.idle.PDT.Pet = set_combine(sets.idle.PDT, {main={ name="Nehushtan", augments={'Pet: DEF+13','Pet: "Regen"+3','STR+15 CHR+15',}},
    sub="Genbu's Shield",
    head="Azimuth hood +1",
    body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
      hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
    legs="helios spats",
    feet="Bagua Sandals +1",
    waist="Isa Belt",
    back="Lifestream Cape",
    ear1="Handler's Earring +1",
})
 
    sets.idle.MDT.Pet = set_combine(sets.idle.MDT, {main={ name="Nehushtan", augments={'Pet: DEF+13','Pet: "Regen"+3','STR+15 CHR+15',}},
    sub="Genbu's Shield",
    head="Azimuth hood +1",
    body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
      hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
    legs="helios spats",
    feet="Bagua Sandals +1",
    waist="Isa Belt",
    back="Lifestream Cape",
    ear1="Handler's Earring +1",
})
 
    -- .Indi sets are for when an Indi-spell is active.
    sets.idle.Indi = sets.resting
     
    sets.idle.PDT.Indi = sets.idle.PDT
     
    sets.idle.MDT.Indi = sets.idle.MDT
      
    sets.idle.PDT.Pet.Indi = sets.idle.PDT.Pet
     
    sets.idle.MDT.Pet.Indi = sets.idle.MDT.Pet
 
    sets.idle.Town = {
    main="Nodal Wand",
    sub="Genbu's Shield",
    range="Dunna",
    head="Azimuth Hood +1",
    body="Azimuth Coat +1",
    hands="Azimuth Gloves +1",
    legs="Azimuth Tights +1",
    feet="Azimuth Gaiters +1",
    neck="Twilight Torque",
    waist="Fucho-no-Obi",
    left_ear="Merman's Earring",
    right_ear="Merman's Earring",
    left_ring="Sheltered Ring",
    right_ring="Renaye Ring",
    back="Lifestream Cape",
}
 
    sets.idle.Weak = sets.resting
 
    -- Defense sets
 
    sets.defense.PDT = sets.idle.PDT
 
    sets.defense.MDT = sets.idle.MDT
 
    sets.Kiting = {feet="Geo. Sandals +1"}
 
    sets.latent_refresh = {waist="Fucho-no-obi"}
     
     
 
 
    --------------------------------------
    -- Engaged sets
    --------------------------------------
 
    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
 
    -- Normal melee group
    sets.engaged = {
    main={ name="Nehushtan", augments={'Accuracy+7 Attack+7','"Dbl.Atk."+3','DMG:+20',}},
    sub="Genbu's Shield",
    ammo="Hasty Pinion +1",
    head="telchine cap",
    body="helios jacket",
    hands="telchine gloves",
    legs="telchine braconi",
    feet="telchine pigaches",
    neck="Asperity Necklace",
    waist="cetl Belt",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="rajas Ring",
    right_ring="k'ayres ring",
    back="Kayapa Cape",
}
 
    sets.engaged.Accuracy = set_combine(sets.engaged,{
    neck="Iqabi Necklace",
    right_ear="Zennaroi Earring",
    waist="Olseni Belt",
    left_ring="supershear EarRing",
    right_ring="beeline ring",
}   )   
 
    sets.engaged.Dual = set_combine(sets.engaged,{
    sub="Tamaxchi",
    left_ear="Heartseeker Earring",
    right_ear="Dudgeon Earring",
    waist="shetal stone",
}   )
    --------------------------------------
    -- Custom buff sets
    --------------------------------------
 
end
 poison = 0
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
        if spell.english:startswith('Indi') then
            if not classes.CustomIdleGroups:contains('Indi') then
                classes.CustomIdleGroups:append('Indi')
            end
            send_command('@timers d "'..indi_timer..'"')
            indi_timer = spell.english
            send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
        elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
        elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
        end
    elseif not player.indi then
        classes.CustomIdleGroups:clear()
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if player.indi and not classes.CustomIdleGroups:contains('Indi')then
        classes.CustomIdleGroups:append('Indi')
        handle_equipping_gear(player.status)
    elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
        classes.CustomIdleGroups:clear()
        handle_equipping_gear(player.status)
    end
	if buff == "poison" then
		if gain then
			poison = 1
			add_to_chat(255, '*-*-*-*-*-*-*-*-* [ Poisoned ] *-*-*-*-*-*-*-*-*')
		else
			poison = 0
			add_to_chat(255, '*-*-*-*-*-*-*-*-* [ Poison OFF ] *-*-*-*-*-*-*-*-*')
		end
	end
end
 
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'Dual' then
            disable('main','sub','range')
        else
            enable('main','sub','range')
        end
    end
end

-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' then
	
		-- this if for low tier
	  if lowtier:contains(spell.name) then
		add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Low TIER ] *-*-*-*-*-*-*-*-*')
        if buffactive.Poison then
			equip(sets.midcast['Elemental Magic'], {main="Mindmelter"})
		elseif spell.element == 'Earth' then
            equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
        elseif spell.element == 'Ice' then
            equip(sets.midcast['Elemental Magic'], {main="Ngqoqwanb"})  
        elseif spell.element == 'Wind' then
            equip(sets.midcast['Elemental Magic'], {Main="Marin Staff +1", Back="Kaikias' Cape"})
        end
         
 
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
	  else
		-- high tier
		add_to_chat(204, '*-*-*-*-*-*-*-*-* [ High TIER ] *-*-*-*-*-*-*-*-*')
		if buffactive.Poison then
			equip(sets.midcast['Elemental Magic']['Accuracy'], {main="Mindmelter"})
		elseif spell.element == 'Earth' then
            equip(sets.midcast['Elemental Magic']['Accuracy'], {neck="Quanpur Necklace"})
        elseif spell.element == 'Ice' then
            equip(sets.midcast['Elemental Magic']['Accuracy'], {main="Ngqoqwanb"})  
        elseif spell.element == 'Wind' then
            equip(sets.midcast['Elemental Magic'], {Main="Marin Staff +1", Back="Kaikias' Cape"})
        end
         
 
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
	
	  end
 
    end
end
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
 
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if spell.skill == 'Enfeebling Magic' then
            if spell.type == 'WhiteMagic' then
                return 'MndEnfeebles'
            else
                return 'IntEnfeebles'
            end
        elseif spell.skill == 'Geomancy' then
            if spell.english:startswith('Indi') then
                return 'Indi'
            end
            elseif spell.skill == 'Elemental Magic' then
        end
    end
end
 
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end
 
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
    classes.CustomIdleGroups:clear()
    if player.indi then
        classes.CustomIdleGroups:append('Indi')
    end
end
 
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end
 
-- MAKE A MACRO : /tell <me> check
function open_coffer()
    CofferType = "Velkk Coffer"
    if player.inventory[CofferType] then
    NCoffer = player.inventory[CofferType].count
    bag = windower.ffxi.get_bag_info(0).count
    max = windower.ffxi.get_bag_info(0).max
    spots = max-bag
    if spots > 0 then
    add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
    local nextcommand = ""
    for i=1, spots do
        nextcommand = nextcommand .. 'input /item "'..CofferType..'" <me>; wait 2;'
    end
    nextcommand = nextcommand .. 'input /tell '..player.name..' check'
    send_command(nextcommand)
    else
        add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
    end
    else
        add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
    end
end
 
 
windower.register_event('chat message', function(original, sender, mode, gm)
    local match
 
                if sender == player.name then
                    if original == "check" then
                        open_coffer()
                    end
                end
 
    return sender, mode, gm
end)
 
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
 
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 1)
 end


Hope you all like it.
[+]
necroskull Necro Bump Detected! [134 days between previous and next post]
 Carbuncle.Msoc
Offline
Serveur: Carbuncle
Game: FFXI
Posts: 16
By Carbuncle.Msoc 2015-09-03 00:01:55
Link | Citer | R
 
This is the one i've been using I've cut and pasted a lot of it together off different lua
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

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

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

-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    indi_timer = ''
    indi_duration = 180
end

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

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

    gear.default.weaponskill_waist = "Windbuffet Belt"

    select_default_macro_book()
end


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

    --------------------------------------
    -- Precast sets
    --------------------------------------

    -- Precast sets to enhance JAs-
    sets.precast.JA.Bolster = {body="Bagua Tunic +1"}
    sets.precast.JA['Life cycle'] = {body="Geomancy Tunic +1"}
    sets.precast.JA['Full Circle'] = {head="Azimuth Hood +1"}
	sets.precast.JA['Curative Recantation'] = {hands="Bagua Mitaines +1"}
	sets.precast.JA['Mending Halation'] = {legs="Bagua Pants +1"}
	sets.precast.JA['Radial Arcana'] = {feet="Bagua Sandals +1"}
	
    -- Fast cast sets for spells

    sets.precast.FC = {main="",sub="",ammo="I",
        head="Nahtirah Hat",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
        body="Anhur Robe",ring1="Prolix Ring",ring2="Weatherspoon Ring",
        back="Swith Cape +1",waist="Witful Belt",legs="Geomancy Pants +1",feet="Regal Pumps +1"}

    sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Tamaxchi",sub="Genbu's Shield",back="Pahtli Cape"})

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

    
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
        back="Refraction Cape",waist=gear.ElementalBelt,legs="Hagondes Pants",feet="Hagondes Sabots"}

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

    sets.precast.WS['Starlight'] = {ear2="Moonshade Earring"}

    sets.precast.WS['Moonlight'] = {ear2="Moonshade Earring"}


    --------------------------------------
    -- Midcast sets
    --------------------------------------

    -- Base fast recast for spells
    sets.midcast.FastRecast = {main="Idris",sub="Genbu Shield",
        head="Nahtirah Hat",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
        body="Hagondes Coat +1",hands="Bokwus Gloves",ring1="Prolix Ring",
        back="Swith Cape +1",waist="Witful Belt",legs="Geomancy Pants +1",feet="Regal Pumps +1"}

    sets.midcast.Geomancy = {main="Idris",range="Dunna",
	head="Azimuth Hood +1",body="Bagua Tunic +1",hands="Geomancy Mitaines +1",
	    back="Lifestream Cape",legs="Bagua Pants +1",feet="Medium's Sabots"}
	
    sets.midcast.Geomancy.Indi = {main="Idris",range="Dunna",
	    head="Azimuth Hood +1",body="Bagua Tunic +1",hands="Geomancy Mitaines +1",
	    back="Lifestream Cape",legs="Bagua Pants +1",feet="Azimuth Gaiters +1"}
	
    sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",
        body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Haoma Ring",ring2="Sirona's Ring",
        back="Swith Cape +1",legs="Nares Trews",feet="Hagondes Sabots"}
    
    sets.midcast.Curaga = sets.midcast.Cure

    sets.midcast.Protectra = {ring1="Sheltered Ring"}

    sets.midcast.Shellra = {ring1="Sheltered Ring"}
	
	    -- Elemental Magic sets
    
    sets.midcast['Elemental Magic'] = {main="Idris",sub="Genbu Shield",ammo="Dosis Tathlum",
        head="Helios Band",neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
        body="Azimuth Coat +1",hands="Psycloth Manillas",ring1="Icesoul Ring",ring2="Acumen Ring",
        back="Seshaw Cape",waist=gear.ElementalObi,legs="Azimuth Tights +1",feet="Helios Boots"}

    sets.midcast['Elemental Magic'].Resistant = {main="Idris",sub="Genbu Shield",ammo="Dosis Tathlum",
        head="Helios Band",neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
        body="Azimuth Coat +1",hands="Psycloth Manillas",ring1="Icesoul Ring",ring2="Acumen Ring",
        back="Seshaw Cape",waist=gear.ElementalObi,legs="Azimuth Tights +1",feet="Helios Boots"}

    sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
    sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
	
	sets.midcast['Dark Magic'] = {main="Apamajas II",sub="mephitis grip",
		head="Artsieq hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
		body="Artsieq Jubbah",hands="Lurid mitts",ring1="sangoma ring",ring2="Perception ring",
		back="Ogapepo cape",waist="ovate robe",legs="Artsieq hose",feet="Artsieq boots"}
	


    --------------------------------------
    -- Idle/resting/defense/etc sets
    --------------------------------------

    -- Resting sets
    sets.resting = {head="Nefer Khat +1",neck="Wiglen Gorget",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}


    -- Idle sets

    sets.idle = {main="Idris",sub="Genbu's Shield",range="Dunna",
        head="Azimuth Hood +1",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Azimuth Coat +1",hands="Bagua Mitaines +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Assiduity Pants +1",feet="Herald's Gaiters"}

    sets.idle.PDT = {main="Idris",sub="Genbu's Shield",range="Dunna",
        head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Azimuth Coat +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Paguroidea Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Nares Trews",feet="Herald's Gaiters"}

    -- .Pet sets are for when Luopan is present.
    sets.idle.Pet = {main="Idris",sub="Genbu's Shield",range="Dunna",
        head="Azimuth Hood +1",neck="Twilight Torque",ear1="Handler's Earring +1",ear2="Ethereal Earring",
        body="Azimuth Coat +1",hands="Geomancy Mitaines +1",ring1="Defending Ring",ring2="Paguroidea Ring",
        back="Lifestream Cape",waist="Goading Belt",legs="Assiduity Pants +1",feet="Bagua Sandals +1"}

    sets.idle.PDT.Pet = {main="Idris",sub="Genbu's Shield",range="Dunna",
        head="Azimuth Hoot +1",neck="Twilight Torque",ear1="Handler's Earring +1",ear2="Ethereal Earring",
        body="Azimuth Coat +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Paguroidea Ring",
        back="Lifestream Cape",waist="Goading Belt",legs="Assiduity Pants +1",feet="Azimuth Gaiters"}

    -- .Indi sets are for when an Indi-spell is active.
    sets.idle.Indi = set_combine(sets.idle, {head="Azimuth ",legs="Bagu",feet="Azimu"})
    sets.idle.Pet.Indi = set_combine(sets.idle.Pet, {head="Azi",back="Lifese",legs="Ba",feet="Azim"})
    sets.idle.PDT.Indi = set_combine(sets.idle.PDT, {head="Azimuth Hood +1",body="Azimuth Coat +1",back="Lifestream Cape",legs="Bagua Pants +1",feet="Azimuth Gaiters"})
    sets.idle.PDT.Pet.Indi = set_combine(sets.idle.PDT.Pet, {head="Azimuth Hood +1",body="Azimuth Coat +1",back="Lifestream Cape",legs="Bagua Pants +1",feet="Azimuth Gaiters +1"})

    sets.idle.Town = {main="Idris",sub="Genbu's Shield",range="Dunna",
        head="",neck="Wiglen Gorget",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
        body="Respite Cloak",hands="Geomancy Mitaines +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}

    sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",range="Nepote Bell",
        head="Nefer Khat +1",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Nares Trews",feet="Geomancy Sandals +1"}

    -- Defense sets

    sets.defense.PDT = {range="Dunna",
        head="Hagondes Hat",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.defense.MDT = {range="Dunna",
        head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}

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

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


    --------------------------------------
    -- Engaged sets
    --------------------------------------

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

    -- Normal melee group
    sets.engaged = {main="Idris",range="Dunna",
        head="Zelus Tiara",neck="Peacock Charm",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="Paguroidea Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    --------------------------------------
    -- Custom buff sets
    --------------------------------------

end

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

function job_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
        if spell.english:startswith('Indi') then
            if not classes.CustomIdleGroups:contains('Indi') then
                classes.CustomIdleGroups:append('Indi')
            end
            send_command('@timers d "'..indi_timer..'"')
            indi_timer = spell.english
            send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
        elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
        elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
        end
    elseif not player.indi then
        classes.CustomIdleGroups:clear()
    end
end


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

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if player.indi and not classes.CustomIdleGroups:contains('Indi')then
        classes.CustomIdleGroups:append('Indi')
        handle_equipping_gear(player.status)
    elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
        classes.CustomIdleGroups:clear()
        handle_equipping_gear(player.status)
    end
end

function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'Normal' then
            disable('main','sub','range')
        else
            enable('main','sub','range')
        end
    end
end

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

function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if spell.skill == 'Enfeebling Magic' then
            if spell.type == 'WhiteMagic' then
                return 'MndEnfeebles'
            else
                return 'IntEnfeebles'
            end
        elseif spell.skill == 'Geomancy' then
            if spell.english:startswith('Indi') then
                return 'Indi'
            end
        end
    end
end

function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end

-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
    classes.CustomIdleGroups:clear()
    if player.indi then
        classes.CustomIdleGroups:append('Indi')
    end
end

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

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

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 6)
end

[+]
necroskull Necro Bump Detected! [36 days between previous and next post]
Offline
Posts: 1427
By fractalvoid 2015-10-09 05:09:00
Link | Citer | R
 
http://pastebin.com/VS6KWXgq

This is what I used as of last December. Likely just need to throw new gear in there.
 Ragnarok.Boq
Offline
Serveur: Ragnarok
Game: FFXI
user: Boq
Posts: 31
By Ragnarok.Boq 2015-10-10 10:19:52
Link | Citer | R
 
I'm not sure if anyone has an issue with it, but when I use Kinematic's default GEO lua and cast a spell (ie: cure) while engaged, my aftercast set doesn't go to what it should be. It stays in my curing gearset. Is there an obvious reason I can't get it to work right?
Offline
Posts: 6
By mhyato 2015-10-21 15:20:06
Link | Citer | R
 
hi, trying to get some help with my geo lua that im trying to Frankenstein together

http://pastebin.com/fw7wSxbH

im trying to add the options to the lua above that have the indi duration timers on them

-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english:startswith('Indi') then
if not classes.CustomIdleGroups:contains('Indi') then
classes.CustomIdleGroups:append('Indi')
end
send_command('@timers d "'..indi_timer..'"')
indi_timer = spell.english
send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
end
elseif not player.indi then
classes.CustomIdleGroups:clear()
end

im not sure if im not copying the right thing or if im placing it in the wrong place, any help would be appreciated