Guest User

Geo.lua

a guest
Jan 14th, 2015
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.96 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job.  Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- Initialization function for this job file.
  6. function get_sets()
  7.     mote_include_version = 2
  8.  
  9.     -- Load and initialize the include file.
  10.     include('Mote-Include.lua')
  11. end
  12.  
  13. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  14. function job_setup()
  15.     indi_timer = ''
  16.     indi_duration = 237
  17. end
  18.  
  19. -------------------------------------------------------------------------------------------------------------------
  20. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  21. -------------------------------------------------------------------------------------------------------------------
  22.  
  23. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  24. function user_setup()
  25.     state.OffenseMode:options('None', 'Normal')
  26.     state.CastingMode:options('Normal', 'Resistant')
  27.     state.IdleMode:options('Normal', 'PDT')
  28.     select_default_macro_book()
  29. end
  30.  
  31.  
  32. -- Define sets and vars used by this job file.
  33. function init_gear_sets()
  34.  
  35.     --------------------------------------
  36.     -- Precast sets
  37.     --------------------------------------
  38.  
  39.     -- Precast sets to enhance JAs
  40.     sets.precast.JA['Life Cycle'] = {body="Geo. Tunic +1"}
  41.     sets.precast.JA['Full Circle'] = {hands="Bagua Mitaines +1"}
  42.     sets.precast.JA['Bolster'] = {body="Bagua Tunic +1"}
  43.     sets.precast.JA['Mending Halation'] = {legs="Bagua Pants +1"}
  44.     sets.precast.JA['Radial Arcana'] = {feet="Bagua Sandals +1"}
  45.  
  46.     -- Fast cast sets for spells
  47.  
  48.     sets.precast.FC = {ammo="Impatiens",
  49.         head="Nahtirah Hat",neck="Orunmila's Torque",left_ear="Enchntr. Earring +1",right_ear="Loquacious Earring",
  50.         body="Anhur Robe",hands="Otomi Gloves",ring1="Weather. Ring",ring2="Lebeche Ring",
  51.         back="Lifestream Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Regal Pumps +1"}
  52.  
  53.     sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
  54.  
  55.     sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
  56.  
  57.     sets.precast.FC.Cure = {ammo="Impatiens",
  58.         head="Nahtirah Hat",neck="Orunmila's Torque",left_ear="Enchntr. Earring +1",right_ear="Loquacious Earring",
  59.         body="Heka's Kalasiris",hands="Otomi Gloves",ring1="Weather. Ring",ring2="Lebeche Ring",
  60.         back="Pahtli Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Regal Pumps +1"}
  61.  
  62.     sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {hands="Bagua Mitaines +1"})
  63.  
  64.     sets.precast.FC.Geomancy = set_combine(sets.precast.FC, {range="Dunna"})
  65.    
  66.     sets.precast.Waltz = {
  67.         head="Nahtirah Hat",neck="Orunmila's Torque",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",
  68.         body="Ischemia Chasu.",hands="Bagua Mitaines +1",ring1="Sangoma Ring",ring2="Prolix Ring",
  69.         back="Refraction Cape",waist="Chaac Belt",legs="Bagua Pants +1",feet="Bagua Sandals +1"}
  70.  
  71.      
  72.     -- Weaponskill sets
  73.     -- Default set for any weaponskill that isn't any more specifically defined
  74.     sets.precast.WS['Realmrazer'] = {ammo="Hasty Pinion +1",
  75.         head="Sukeroku Hachi.",neck="Thunder Gorget",left_ear="Bladeborn Earring",right_ear="Steelflash Earring",
  76.         body="Ischemia Chasu.",hands="Bagua Mitaines +1",ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  77.         back="Refraction Cape",waist="Thunder Belt",legs="Mes'yohi Slacks",feet="Battlecast Gaiters"}
  78.  
  79.     sets.precast.WS['Judgement'] = {ammo="Hasty Pinion +1",
  80.         head="Sukeroku Hachi.",neck="Thunder Gorget",left_ear="Bladeborn Earring",right_ear="Steelflash Earring",
  81.         body="Vanir Cotehardie",hands="Bagua Mitaines +1",ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  82.         back="Refraction Cape",waist="Windbuffet Belt +1",legs="Mes'yohi Slacks",feet="Battlecast Gaiters"}
  83.  
  84.     sets.precast.WS['Black Halo'] = {ammo="Hasty Pinion +1",
  85.         head="Sukeroku Hachi.",neck="Thunder Gorget",left_ear="Bladeborn Earring",right_ear="Steelflash Earring",
  86.         body="Vanir Cotehardie",hands="Bagua Mitaines +1",ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  87.         back="Refraction Cape",waist="Windbuffet Belt +1",legs="Mes'yohi Slacks",feet="Battlecast Gaiters"}
  88.  
  89.     sets.precast.WS['Hexa Strike'] = {ammo="Hasty Pinion +1",
  90.         head="Sukeroku Hachi.",neck="Iqabi Necklace",left_ear="Bladeborn Earring",right_ear="Steelflash Earring",
  91.         body="Ischemia Chasu.",hands="Bagua Mitaines +1",ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  92.         back="Refraction Cape",waist="Windbuffet Belt +1",legs="Mes'yohi Slacks",feet="Bagua Sandals +1"}
  93.  
  94.     sets.precast.WS['Exudation'] = {ammo="Hasty Pinion +1",
  95.         head="Buremte Hat",neck="Asperity Necklace",left_ear="Steelflash Earring",right_ear="Bladeborn Earring",
  96.         body="Ischemia Chasu.",hands="Geo. Gloves +1",ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  97.         back="Refraction Cape",waist="Windbuffet Belt +1",legs="Mes'Yohi Slacks",feet="Bagua Sandals +1"}
  98.  
  99.     sets.precast.WS['Seraph Strike'] = {ammo="Dosis Tathlum",
  100.         head="Hagondes Hat",neck="Eddy Necklace",left_ear="Friomisi Earring",right_ear="Crematio Earring",
  101.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','"Mag.Atk.Bns."+24',}},ring1="Weather. Ring",ring2="Levia. Ring +1",
  102.         back="Toro Cape",waist="Thunder Belt",legs="Hagondes Pants +1",feet="Hag. Sabots +1"}
  103.  
  104.     sets.precast.WS['Starlight'] = {right_ear="Moonshade Earring"}
  105.  
  106.     sets.precast.WS['Moonlight'] = {right_ear="Moonshade Earring"}
  107.  
  108.     sets.precast.WS['Flash Nova'] = {ammo="Dosis Tathlum",
  109.         head="Hagondes Hat",neck="Eddy Necklace",left_ear="Friomisi Earring",right_ear="Crematio Earring",
  110.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','"Mag.Atk.Bns."+24',}},ring1="Weather. Ring",ring2="Levia. Ring +1",
  111.         back="Toro Cape",waist="Snow Belt",legs="Hagondes Pants +1",feet="Hag. Sabots +1"}
  112.  
  113.  
  114.     --------------------------------------
  115.     -- Midcast sets
  116.     --------------------------------------
  117.  
  118.     -- Base fast recast for spells
  119.     sets.midcast.FastRecast = {ammo="Hasty Pinion +1",
  120.     head="Nahtirah Hat",neck="Orunmila's Torque",right_ear="Loquacious Earring",left_ear="Enchntr. Earring +1",
  121.     body="Vanir Cotehardie",hands="Otomi Gloves",ring1="Weather. Ring",ring2="Defending Ring",
  122.     back="Lifestream Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Regal Boots +1"}
  123.  
  124.     sets.midcast.Phalanx = set_combine(sets.midcast.FastRecast, {body="Anhur Robe",legs="Shedir Seraweels",feet="Regal Pumps +1"})
  125.  
  126.     sets.midcast.Stoneskin = set_combine(sets.midcast.FastRecast, {neck="Stone Gorget",left_ear="Earthcry Earring",waist="Siegel Sash",legs="Shedir Seraweels"})
  127.  
  128.     sets.midcast.Aquaveil = set_combine(sets.midcast.FastRecast, {waist="Emphatikos Rope",legs="Shedir Seraweels"})
  129.  
  130.     sets.midcast.BarElement = set_combine(sets.midcast.FastRecast, {body="Anhur Robe",legs="Shedir Seraweels",feet="Regal Pumps +1"})
  131.  
  132.     sets.midcast.Geomancy = {main="Idris",range="Dunna",
  133.         head="Selenian Cap",neck="Orunmila's Torque",left_ear="Magnetic Earring",right_ear="Loquacious Earring",
  134.         body="Bagua Tunic +1",hands="Geo. Mitaines +1",ring1="Weather. Ring",ring2="Patricius Ring",
  135.         back="Lifestream Cape",waist="Austerity Belt +1",legs="Theurgist's Slacks",feet="Umbani Boots"}
  136.  
  137.     sets.midcast.Geomancy = set_combine(sets.midcast.Geomancy, {legs="Bagua Pants +1"})
  138.  
  139.     sets.midcast.Cure = {ammo="Hasty Pinion +1",
  140.         head="Nahtirah Hat",neck="Phalaina Locket",left_ear="Loquacious Earring",right_ear="Beatific Earring",
  141.         body="Heka's Kalasiris",hands="Revealer's Mitts",ring1="Lebeche Ring",ring2="Sirona's Ring",
  142.         back="Tempered Cape",waist="Witful Belt",legs="Nares Trews",feet="Regal Pumps +1"}
  143.  
  144.     sets.midcast.Curaga = sets.midcast.Cure
  145.  
  146.     sets.midcast.Stun = {ammo="Hasty Pinion +1",
  147.         head="Nahtirah Hat",neck="Orunmila's Torque",left_ear="Loquacious Earring",right_ear="Psystorm Earring",
  148.         body="Vanir Cotehardie",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Weather. Ring",ring2="Prolix Ring",
  149.         back="Lifestream Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Artsieq Boots"}
  150.  
  151.     sets.midcast.Drain = {main="Idris",ammo="Plumose Sachet",
  152.         head="Bagua Galero +1",neck="Eddy Necklace",left_ear="Psystorm Earring",right_ear="Lifestorm Earring",
  153.         body="Geo. Tunic +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Weather. Ring",ring2="Archon Ring",
  154.         back="Refraction Cape",waist="Fucho-no-obi",legs="Mes'yohi Slacks",feet="Artsieq Boots"}
  155.  
  156.     sets.midcast.Aspir = sets.midcast.Drain
  157.    
  158.     sets.midcast['Aspir II'] = sets.midcast.Drain
  159.  
  160.     sets.midcast['Elemental Magic'] = {main="Idris",ammo="Dosis Tathlum",
  161.         head="Hagondes Hat",neck="Eddy Necklace",left_ear="Crematio Earring",right_ear="Friomisi Earring",
  162.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','"Mag.Atk.Bns."+24',}},ring1="Shiva Ring +1",ring2="Shiva Ring +1",
  163.         back="Toro Cape",waist="Yamabuki-no-Obi",legs="Hagondes Pants +1",feet="Umbani Boots"}
  164.  
  165.     sets.midcast['Protect III'] = {ring1="Sheltered Ring"}
  166.    
  167.     sets.midcast['Shell II'] = {ring1="Sheltered Ring"}
  168.  
  169. -- Enfeebling Magic Sets
  170.     sets.midcast.MndEnfeebles = {main="Idris",ammo="Plumose Sachet",
  171.         head="Artsieq Hat",neck="Weike Torque",left_ear="Psystorm Earring",right_ear="Lifestorm Earring",
  172.         body="Ischemia Chasu.",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Levia. Ring +1",ring2="Levia. Ring +1",
  173.         back="Lifestream Cape",waist="Bougonia Rope",legs="Mes'yohi Slacks",feet="Artsieq Boots"}
  174.  
  175.     sets.midcast.IntEnfeebles = {main="Idris",ammo="Plumose Sachet",
  176.         head="Artsieq Hat",neck="Weike Torque",left_ear="Psystorm Earring",right_ear="Lifestorm Earring",
  177.         body="Ischemia Chasu.",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Weather. Ring",ring2="Sangoma Ring",
  178.         back="Lifestream Cape",waist="Bougonia Rope",legs="Mes'yohi Slacks",feet="Artsieq Boots"}
  179.  
  180.     sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
  181.  
  182.  
  183.     --------------------------------------
  184.     -- Idle/resting/defense/etc sets
  185.     --------------------------------------
  186.  
  187.     -- Resting sets
  188.     sets.resting = {main="Chatoyant Staff",neck="Wiglen Gorget",
  189.         body="Hagondes Coat +1",hands="Bagua Mitaines",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  190.         waist="Austerity Belt",legs="Assiduity Pants",feet="Chelona Boots"}
  191.  
  192.     -- Idle sets
  193.  
  194.     sets.resting = {range="Dunna",
  195.         neck="Wiglen Gorget",left_ear="Sanare Earring",right_ear="Merman's Earring",
  196.         body="Respite Cloak",hands="Bagua Mitaines +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  197.         back="Umbra Cape",waist="Austerity Belt +1",legs="Assid. Pants +1"}
  198.  
  199.     sets.idle.PDT = {sub="Genbu's Shield",range="Dunna",
  200.         head="Hagondes Hat +1",neck="Twilight Torque",left_ear="Sanare Earring",right_ear="Merman's Earring",
  201.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Patricius Ring",ring2="Defending Ring",
  202.         back="Umbra Cape",waist="Slipor Sash",legs="Hagondes Pants +1",feet="Battlecast Gaiters"}
  203.  
  204.     -- .Pet sets are for when Luopan is present.
  205.     sets.idle.Pet = set_combine(sets.idle.Field, {hands="Geomancy Mitaines +1"})
  206.  
  207.     sets.idle.PDT.Pet = set_combine(sets.idle.PDT, {hands="Geomancy Mitaines +1"})
  208.  
  209.     -- .Indi sets are for when an Indi-spell is active.
  210.  
  211.     sets.idle.Town = {main="Idris",range="Dunna",
  212.         head="Bagua Galero +1",neck="Wiglen Gorget",left_ear="Sanare Earring",right_ear="Merman's Earring",
  213.         body="Councilor's Garb",hands="Bagua Mitaines +1",ring1="Sheltered Ring",ring2="Defending Ring",
  214.         back="Umbra Cape",waist="Slipor Sash",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  215.  
  216.     sets.idle.Field = {main="Idris",range="Dunna",
  217.         neck="Wiglen Gorget",left_ear="Sanare Earring",right_ear="Merman's Earring",
  218.         body="Respite Cloak",hands="Bagua Mitaines +1",ring1="Sheltered Ring",ring2="Defending Ring",
  219.         back="Lifestream Cape",waist="Slipor Sash",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  220.  
  221.     sets.idle.Weak = {range="Dunna",
  222.         head="Hagondes Hat +1",neck="Twilight Torque",left_ear="Sanare EArring",right_ear="Merman's Earring",
  223.         body="Hagondes Coat +1",hands="Geo. Mitaines +1",ring1="Defending Ring",ring2="Paguroidea Ring",
  224.         back="Umbra Cape",waist="Slipor Sash",legs="Hagondes Pants +1",feet="Geo. Sandals +1"}
  225.  
  226.     -- Defense sets
  227.  
  228.     sets.defense.PDT = {sub="Genbu's Shield",range="Dunna",
  229.         head="Hagondes Hat +1",neck="Twilight Torque",left_ear="Sanare Earring",right_ear="Merman's Earring",
  230.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Patricius Ring",ring2="Defending Ring",
  231.         back="Umbra Cape",waist="Slipor Sash",legs="Hagondes Pants +1",feet="Battlecast Gaiters"}
  232.  
  233.     sets.defense.MDT = {sub="Genbu's Shield",range="Dunna",
  234.         head="Hagondes Hat +1",neck="Twilight Torque",left_ear="Sanare Earring",right_ear="Merman's Earring",
  235.         body="Hagondes Coat +1",hands={ name="Hagondes Cuffs +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -3%','Mag. Acc.+23',}},ring1="Patricius Ring",ring2="Defending Ring",
  236.         back="Umbra Cape",waist="Slipor Sash",legs="Hagondes Pants +1",feet="Battlecast Gaiters"}
  237.  
  238.     sets.Kiting = {feet="Geomancy Sandals +1"}
  239.  
  240.     sets.latent_refresh = {waist="Fucho-no-obi"}
  241.  
  242.     --------------------------------------
  243.     -- Engaged sets
  244.     --------------------------------------
  245.  
  246.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  247.     -- sets if more refined versions aren't defined.
  248.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  249.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  250.  
  251.     -- Normal melee group
  252.     sets.engaged = {main="Idris",ammo="Hasty Pinion +1",
  253.         head="Espial Cap",neck="Iqabi Necklace",left_ear="Steelflash Earring",right_ear="Bladeborn Earring",
  254.         body="Ischemia Chasu.",hands="Bokwus Gloves",ring1="Enlivened Ring",ring2="Mars's Ring",
  255.         back="Mecisto. Mantle",waist="Olseni Belt",legs="Bokwus Slops",feet="Battlecast Gaiters"}
  256.  
  257.     --------------------------------------
  258.     -- Custom buff sets
  259.     --------------------------------------
  260.  
  261. end
  262.  
  263.  
  264. -------------------------------------------------------------------------------------------------------------------
  265. -- Job-specific hooks for standard casting events.
  266. -------------------------------------------------------------------------------------------------------------------
  267.  
  268. function job_aftercast(spell, action, spellMap, eventArgs)
  269.     if not spell.interrupted then
  270.         if spell.english:startswith('Indi') then
  271.             if not classes.CustomIdleGroups:contains('Indi') then
  272.                 classes.CustomIdleGroups:append('Indi')
  273.             end
  274.             send_command('@timers d "'..indi_timer..'"')
  275.             indi_timer = spell.english
  276.             send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
  277.         elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
  278.             send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
  279.         elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  280.             send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
  281.         end
  282.     elseif not player.indi then
  283.         classes.CustomIdleGroups:clear()
  284.     end
  285. end
  286.  
  287.  
  288. -------------------------------------------------------------------------------------------------------------------
  289. -- Job-specific hooks for non-casting events.
  290. -------------------------------------------------------------------------------------------------------------------
  291.  
  292. -- Called when a player gains or loses a buff.
  293. -- buff == buff gained or lost
  294. -- gain == true if the buff was gained, false if it was lost.
  295. function job_buff_change(buff, gain)
  296.     if player.indi and not classes.CustomIdleGroups:contains('Indi')then
  297.         classes.CustomIdleGroups:append('Indi')
  298.         handle_equipping_gear(player.status)
  299.     elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
  300.         classes.CustomIdleGroups:clear()
  301.         handle_equipping_gear(player.status)
  302.     end
  303. end
  304.  
  305. function job_state_change(stateField, newValue, oldValue)
  306.     if stateField == 'Offense Mode' then
  307.         if newValue == 'Normal' then
  308.             disable('main','sub','range')
  309.         else
  310.             enable('main','sub','range')
  311.         end
  312.     end
  313. end
  314.  
  315. -------------------------------------------------------------------------------------------------------------------
  316. -- User code that supplements standard library decisions.
  317. -------------------------------------------------------------------------------------------------------------------
  318.  
  319. function job_get_spell_map(spell, default_spell_map)
  320.     if spell.action_type == 'Magic' then
  321.         if spell.skill == 'Enfeebling Magic' then
  322.             if spell.type == 'WhiteMagic' then
  323.                 return 'MndEnfeebles'
  324.             else
  325.                 return 'IntEnfeebles'
  326.             end
  327.         elseif spell.skill == 'Geomancy' then
  328.             if spell.english:startswith('Indi') then
  329.                 return 'Indi'
  330.             elseif spell.english:startswith('Geo') then
  331.                 return 'Geo'
  332.             end
  333.         elseif spell.skill == 'Dark Magic' then
  334.             if spell.english:startswith('Stu') then
  335.                 return 'Stun'
  336.             else
  337.                 return
  338.             end
  339.             return
  340.         end
  341.     end
  342. end
  343.  
  344. function customize_idle_set(idleSet)
  345.     if player.mpp < 51 then
  346.         idleSet = set_combine(idleSet, sets.latent_refresh)
  347.     end
  348.     return idleSet
  349. end
  350.  
  351. sets.reive = {neck="Arciela's Grace +1"}
  352.  
  353. function job_post_midcast(spell, action, spellMap, eventArgs)
  354.     if buffactive['Reive Mark'] and (spell.skill == 'Elemental Magic' or spellMap == 'Cure' or spellMap == 'Curaga') then
  355.         equip(sets.reive)
  356.     end
  357. end
  358.  
  359. function customize_idle_set(idleSet)
  360.     if buffactive['Reive Mark'] then
  361.         idleSet = set_combine(idleSet, sets.reive)
  362.     end
  363.     return idleSet
  364. end
  365.  
  366. function job_customize_melee_set(meleeSet)
  367.     if buffactive['Reive Mark'] then
  368.         meleeSet = set_combine(meleeSet, sets.reive)
  369.     end
  370.     return meleeSet
  371. end
  372.  
  373. -- Called by the 'update' self-command.
  374. function job_update(cmdParams, eventArgs)
  375.     classes.CustomIdleGroups:clear()
  376.     if player.indi then
  377.         classes.CustomIdleGroups:append('Indi')
  378.     end
  379. end
  380.  
  381. -- Function to display the current relevant user state when doing an update.
  382. function display_current_job_state(eventArgs)
  383.     display_current_caster_state()
  384.     eventArgs.handled = true
  385. end
  386.  
  387. -------------------------------------------------------------------------------------------------------------------
  388. -- Utility functions specific to this job.
  389. -------------------------------------------------------------------------------------------------------------------
  390.  
  391. function job_self_command(cmdParams, eventArgs)
  392.     if command == 'coffer' then
  393.         cycle = 0
  394.         invCount = windower.ffxi.get_bag_info(0).count
  395.         if invCount == 80 then
  396.             add_to_chat(140,'Inv. full. Ending cycle')
  397.         elseif player.inventory["Velkk Coffer"] then
  398.             send_command('input /item "Velkk Coffer" <me> ')
  399.             cycle = 1
  400.         else
  401.             add_to_chat(140,'No Coffers found in inv.')
  402.             send_command('findall Velkk Coffer')
  403.         end
  404.         if cycle == 1 then
  405.             send_command('wait 2;gs c coffer')
  406.         end
  407.     end
  408. end
  409.  
  410. -- Select default macro book on initial load or subjob change.
  411. function select_default_macro_book()
  412.     set_macro_page(5, 1)
  413. end
Advertisement
Add Comment
Please, Sign In to add comment