Advertisement
bongarippa

EvdaBRD

Nov 16th, 2023
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.29 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job. Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. --[[
  6. Custom commands:
  7.  
  8. ExtraSongsMode may take one of three values: None, Dummy, FullLength
  9.  
  10. You can set these via the standard 'set' and 'cycle' self-commands. EG:
  11. gs c cycle ExtraSongsMode
  12. gs c set ExtraSongsMode Dummy
  13.  
  14. The Dummy state will equip the bonus song instrument and ensure non-duration gear is equipped.
  15. The FullLength state will simply equip the bonus song instrument on top of standard gear.
  16.  
  17.  
  18. Simple macro to cast a dummy Daurdabla song:
  19. /console gs c set ExtraSongsMode Dummy
  20. /ma "Shining Fantasia" <me>
  21.  
  22. To use a Terpander rather than Daurdabla, set the info.ExtraSongInstrument variable to
  23. 'Terpander', and info.ExtraSongs to 1.
  24. --]]
  25.  
  26. -- Initialization function for this job file.
  27. function get_sets()
  28. mote_include_version = 2
  29.  
  30. -- Load and initialize the include file.
  31. include('Mote-Include.lua')
  32. include('organizer-lib')
  33. end
  34.  
  35.  
  36. -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
  37. function job_setup()
  38. state.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'Dummy', 'FullLength'}
  39.  
  40. state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
  41.  
  42. -- For tracking current recast timers via the Timers plugin.
  43. custom_timers = {}
  44. end
  45.  
  46. -------------------------------------------------------------------------------------------------------------------
  47. -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
  48. -------------------------------------------------------------------------------------------------------------------
  49.  
  50. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  51. function user_setup()
  52. state.OffenseMode:options('Dagger', 'DaggerAcc', 'DW', 'DWAcc', 'Carnwenhan', 'CarnwenhanAcc' )
  53. state.CastingMode:options('Normal', 'Resistant')
  54. state.HybridMode:options('Normal', 'PDT')
  55. state.IdleMode:options('Normal', 'PDT', 'MDT')
  56.  
  57. brd_daggers = S{'Kali', 'Carnwenhan', 'Aeneas', 'Twashtar', }
  58. pick_tp_weapon()
  59.  
  60. -- Adjust this if using the Terpander (new +song instrument)
  61. info.ExtraSongInstrument = 'Daurdabla'
  62. -- How many extra songs we can keep from Daurdabla/Terpander
  63. info.ExtraSongs = 2
  64.  
  65. -- Set this to false if you don't want to use custom timers.
  66. state.UseCustomTimers = M(true, 'Use Custom Timers')
  67.  
  68. send_command('lua l gearinfo')
  69.  
  70. -- Additional local binds
  71. send_command('bind ^` gs c cycle ExtraSongsMode')
  72. send_command('bind ^a gs c set ExtraSongsMode Dummy; input /ma "Goblin Gavotte" <t>')
  73. send_command('bind ^s gs c set ExtraSongsMode Dummy; input /ma "Fowl Aubade" <t>')
  74. send_command('bind ^d gs c set ExtraSongsMode Dummy; input /ma "Herb Pastoral" <t>')
  75. send_command('bind ^f gs c set ExtraSongsMode Dummy; input /ma "Scop\'s Operetta" <t>')
  76.  
  77. select_default_macro_book()
  78. set_lockstyle()
  79. end
  80.  
  81. function user_unload()
  82. send_command('lua u gearinfo')
  83. end
  84.  
  85.  
  86.  
  87. -- Define sets and vars used by this job file.
  88. function init_gear_sets()
  89. --------------------------------------
  90. -- Start defining the sets
  91. --------------------------------------
  92.  
  93. ---- Augment Gear ----
  94.  
  95. BRD_Staff = {name="Grioavolr", augments={'Magic burst dmg.+9%','MND+2','Mag. Acc.+25','"Mag.Atk.Bns."+25','Magic Damage +3',}}
  96. Refresh_Head={ name="Chironic Hat", augments={'VIT+4','Pet: VIT+12','"Refresh"+2','Accuracy+12 Attack+12','Mag. Acc.+3 "Mag.Atk.Bns."+3',}}
  97. TP_Back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
  98. Macc_Back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Phys. dmg. taken-10%',}}
  99.  
  100. -- Fast cast sets for spells
  101. sets.precast.FC ={head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
  102. body="Inyanga Jubbah +2",
  103. hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  104. legs="Aya. Cosciales +2",
  105. feet="Fili Cothurnes +2",
  106. neck="Voltsurge Torque",
  107. waist="Shinjutsu-no-Obi +1",
  108. left_ear="Loquac. Earring",
  109. right_ear="Novia Earring",
  110. left_ring="Kishar Ring",
  111. right_ring="Medada's Ring",
  112. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},}
  113.  
  114. sets.precast.FC.Cure = set_combine(sets.precast.FC, {feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
  115. })
  116.  
  117. sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {
  118. neck="Nodens Gorget",
  119. waist="Siegel Sash",
  120. lear="Earthcry Earring"})
  121.  
  122. sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"
  123. })
  124.  
  125. sets.precast.FC.BardSong = set_combine(sets.precast.FC, {head="Fili Calot +2",
  126. feet={ name="Bihu Slippers +3", augments={'Enhances "Nightingale" effect',}},
  127. })
  128.  
  129. sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range=info.ExtraSongInstrument})
  130.  
  131. sets.precast.FC["Honor March"] = set_combine(sets.precast.FC.BardSong,{range="Marsyas"})
  132.  
  133. -- Precast sets to enhance JAs
  134.  
  135. sets.precast.JA.Nightingale = {feet="Bihu Slippers +3"}
  136. sets.precast.JA.Troubadour = {body="Bihu Jstcorps. +3"}
  137. sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions +3"}
  138.  
  139. -- Waltz set (chr and vit)
  140. sets.precast.Waltz = {}
  141.  
  142. -- Weaponskill sets
  143. -- Default set for any weaponskill that isn't any more specifically defined
  144. sets.precast.WS = {range={ name="Linos", augments={'Attack+20','Weapon skill damage +2%','STR+8',}},
  145. head={ name="Nyame Helm", augments={'Path: B',}},
  146. body={ name="Bihu Jstcorps. +3", augments={'Enhances "Troubadour" effect',}},
  147. hands={ name="Bihu Cuffs +3", augments={'Enhances "Con Brio" effect',}},
  148. legs={ name="Bihu Cannions +3", augments={'Enhances "Soul Voice" effect',}},
  149. feet={ name="Chironic Slippers", augments={'STR+2','Attack+19','Weapon skill damage +9%','Accuracy+16 Attack+16',}},
  150. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  151. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  152. left_ear="Ishvara Earring",
  153. right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  154. left_ring="Epaminondas's Ring",
  155. right_ring="Ilabrat Ring",
  156. back={ name="Intarabus's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}}
  157.  
  158.  
  159. -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
  160. sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {waist="Windbuffet Belt +1"})
  161.  
  162. sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {})
  163.  
  164. sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {})
  165.  
  166. sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS, {
  167. right_ear="Regal Earring",
  168. right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  169. back={ name="Intarabus's Cape", augments={'CHR+20','Accuracy+20 Attack+20','CHR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}}})
  170.  
  171. sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {})
  172.  
  173. sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {right_ring="Sroda Ring",
  174. })
  175.  
  176. -- Midcast Sets
  177.  
  178. -- General set for recast times.
  179. sets.midcast.FastRecast = {}
  180.  
  181. sets.midcast.SongEffect = {
  182. main="Carnwenhan",
  183. sub="Genmei Shield",
  184. range="Gjallarhorn",
  185. head="Fili Calot +2 +2",
  186. body="Fili Hongreline +3",
  187. hands="Fili Manchettes +2",
  188. legs="Inyanga Shalwar +2",
  189. feet="Brioso Slippers +3",
  190. neck="Mnbw. Whistle +1",
  191. left_ring="Metamor. Ring +1",
  192. right_ring="Kishar Ring",
  193. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Damage taken-5%',}},
  194. }
  195.  
  196. -- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
  197. sets.midcast.Ballad = set_combine(sets.midcast.SongEffect, {legs="Fili Rhingrave +2"})
  198. sets.midcast["Ballad II"] = sets.midcast.Ballad
  199. sets.midcast["Ballad III"] = sets.midcast.Ballad
  200. sets.midcast["Foe Lullaby"] = {main="Carnwenhan",
  201. sub="Ammurapi Shield",
  202. range="Blurred Harp +1",
  203. head="Brioso Roundlet +3",
  204. body="Fili Hongreline +3",
  205. hands="Brioso Cuffs +3",
  206. legs="Inyanga Shalwar +2",
  207. feet="Brioso Slippers +3",
  208. neck="Mnbw. Whistle +1",
  209. waist="Luminary Sash",
  210. left_ear="Gersemi Earring",
  211. right_ear="Regal Earring",
  212. left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  213. right_ring="Stikini Ring +1",
  214. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Damage taken-5%',}}
  215. }
  216.  
  217. sets.midcast["Foe Lullaby II"] = sets.midcast["Foe Lullaby"]
  218.  
  219. sets.midcast["Horde Lullaby"] = sets.midcast["Foe Lullaby"]
  220.  
  221. sets.midcast["Horde Lullaby II"] = sets.midcast["Foe Lullaby"]
  222.  
  223. sets.midcast.Madrigal = set_combine(sets.midcast.SongEffect, {head="Fili Calot +2 +2",back=Macc_Back})
  224. sets.midcast.Etude = set_combine(sets.midcast.SongEffect, {head="Mousai turban +1"})
  225. sets.midcast.Prelude = set_combine(sets.midcast.SongEffect, {back=Macc_Back})
  226. sets.midcast.March = set_combine(sets.midcast.SongEffect, {hands="Fili Manchettes +2"})
  227. sets.midcast.Minuet = set_combine(sets.midcast.SongEffect, {body="Fili Hongreline +3"})
  228. sets.midcast["Honor March"] = set_combine(sets.midcast.SongEffect, {range="Marsyas"})
  229. sets.midcast.Minne = set_combine(sets.midcast.SongEffect, {legs="Mousai Seraweels +1"})
  230. sets.midcast.Paeon = set_combine(sets.midcast.SongEffect, {head="Brioso Roundlet +3"})
  231. sets.midcast.Carol = set_combine(sets.midcast.SongEffect, {hands="Mousai Gages +1"})
  232. sets.midcast["Sentinel's Scherzo"] = set_combine(sets.midcast.SongEffect, {feet="Fili Cothurnes +2"})
  233. sets.midcast.Threnody = set_combine(sets.midcast.SongEffect, {body="Mou. Manteel +1"})
  234. sets.midcast["Magic Finale"] = {
  235. range="Gjallarhorn",
  236. head="Brioso Roundlet +3",
  237. body="Fili Hongreline +3",
  238. hands="Fili Manchettes +2",
  239. legs="Fili Rhingrave +2",
  240. feet="Brioso Slippers +3",
  241. neck="Mnbw. Whistle +1",
  242. waist="Luminary Sash",
  243. left_ear="Crep. Earring",
  244. right_ear="Dellingr Earring",
  245. left_ring="Stikini Ring",
  246. right_ring="Stikini Ring",
  247. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Phys. dmg. taken-10%',}}
  248. }
  249. sets.midcast.Mazurka = {range=info.ExtraSongInstrument}
  250.  
  251. -- For song buffs (duration and AF3 set bonus)
  252. --moved
  253.  
  254. -- For song defbuffs (duration primary, accuracy secondary)
  255. sets.midcast.SongDebuff = {
  256. range="Gjallarhorn",
  257. head="Brioso Roundlet +3",
  258. body="Fili Hongreline +3",
  259. hands="Fili Manchettes +2",
  260. legs="Fili Rhingrave +2",
  261. feet="Brioso Slippers +3",
  262. neck="Mnbw. Whistle +1",
  263. waist="Luminary Sash",
  264. left_ear="Crep. Earring",
  265. right_ear="Dellingr Earring",
  266. left_ring="Stikini Ring +1",
  267. right_ring="Medada's Ring",
  268. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Phys. dmg. taken-10%',}}
  269. }
  270.  
  271. -- For song defbuffs (accuracy primary, duration secondary)
  272. sets.midcast.ResistantSongDebuff = {body="Emet Harness +1",
  273. neck="Unmoving Collar +1",
  274. left_ring="Petrov Ring",
  275. }
  276. -- Song-specific recast reduction
  277. sets.midcast.SongRecast = {ear2="Loquacious earring",ring1="Kishar Ring",legs="Fili Rhingrave +2"}
  278.  
  279. --sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.ExtraSongInstrument})
  280.  
  281. -- Cast spell with normal gear, except using Daurdabla instead
  282. sets.midcast.Daurdabla = {range=info.ExtraSongInstrument}
  283.  
  284. -- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
  285. sets.midcast.DaurdablaDummy = {main="Carnwenhan",sub="Ammurapi Shield",range=info.ExtraSongInstrument,
  286. head="Vanya Hood",neck="Orunmila's Torque",ear1="Loquacious earring",
  287. body="Brioso Justaucorps +3",hands="Leyline gloves",ring1="Kishar Ring",ring2="Rahab ring",
  288. back="Intarabus's Cape",waist="Witful Belt",legs="Ayanmo Cosciales +2",feet="Bihu Slippers +3"}
  289.  
  290. -- Other general spells and classes.
  291. sets.midcast.Cure = {main="Serenity",sub="Clerisy Strap +1",
  292. head="Vanya Hood",neck="Incanter's Torque",ear1="Enchanter Earring +1",ear2="Mendicant's Earring",
  293. body="Heka's Kalasiris",hands="Telchine Gloves",ring1="Sirona's Ring",ring2="Weatherspoon Ring +1",
  294. back="Pahtli Cape",waist="Embla Sash",legs="Gyve Trousers",feet="Vanya Clogs"}
  295.  
  296. sets.midcast.Curaga = sets.midcast.Cure
  297. sets.midcast['Enhancing Magic'] = sets.precast.FC
  298. sets.midcast['Enfeebling Magic'] = {head="Brioso Roundlet +3",
  299. body="Brioso Justau. +3",
  300. hands="Inyan. Dastanas +2",
  301. legs={ name="Chironic Hose", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','"Cure" potency +9%','CHR+7','Mag. Acc.+5','"Mag.Atk.Bns."+7',}},
  302. feet="Brioso Slippers +3",
  303. neck="Mnbw. Whistle +1",
  304. waist="Luminary Sash",
  305. left_ear="Gwati Earring",
  306. right_ear="Digni. Earring",
  307. left_ring="Kishar Ring",
  308. right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  309. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Damage taken-5%',}},}
  310. sets.midcast.Stoneskin = {head="Umuthi Hat",neck="Nodens Gorget",Waist="Siegel Sash",legs="Shedir Seraweels",body="Dalmatica +1"}
  311. sets.midcast.Cursna = {ring1="Haoma's Ring",ring2="Haoma's Ring",feet="Gendewitha Galoshes +1",neck="Debilis Medallion"}
  312.  
  313. sets.midcast.Dispelga = {head="Brioso Roundlet +3",main="Daybreak",sub="Ammurapi Shield",neck="Moonbow Whistle +1",ear1="Gwati Earring",
  314. ear2="Dignitary's Earring",body="Brioso Justaucorps +3",hands="Inyanga Dastanas +2",ring1="Stikini Ring",ring2="Weatherspoon Ring +1",
  315. back=Macc_Back,waist="Luminary Sash",legs="Chironic Hose",feet="Medium's Sabots"}
  316. sets.midcast.Stoneskin = {head="Umuthi Hat",neck="Nodens Gorget",Waist="Siegel Sash",legs="Shedir Seraweels",body="Dalmatica +1"}
  317. sets.midcast.Cursna = {ring1="Haoma's Ring",ring2="Haoma's Ring",feet="Gendewitha Galoshes +1",neck="Debilis Medallion"}
  318. -- Sets to return to when not performing an action.
  319.  
  320. -- Resting sets
  321. sets.resting = {}
  322.  
  323.  
  324. -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  325. sets.idle = {
  326. head={ name="Bihu Roundlet +3", augments={'Enhances "Con Anima" effect',}},
  327. body="Fili Hongreline +3",
  328. hands={ name="Bihu Cuffs +3", augments={'Enhances "Con Brio" effect',}},
  329. legs="Brioso Cannions +3",
  330. feet="Fili Cothurnes +2",
  331. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  332. waist="Flume Belt +1",
  333. left_ear="Genmei Earring",
  334. right_ear="Hearty Earring",
  335. left_ring="Defending Ring",
  336. right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  337. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Damage taken-5%',}},
  338. }
  339.  
  340. sets.idle.PDT = set_combine(sets.idle, {head="Nyame Helm",
  341. body="Nyame Mail",
  342. hands="Nyame Gauntlets",
  343. legs="Nyame Flanchard",
  344. feet="Nyame Sollerets"})
  345.  
  346. sets.idle.MDT = sets.idle
  347.  
  348. sets.idle.Town = {
  349. head="Volte Cap",
  350. body="Fili Hongreline +3",
  351. hands="Volte Mittens",
  352. legs="Volte Tights",
  353. feet="Fili Cothurnes +2",
  354. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  355. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  356. left_ear="Regal Earring",
  357. right_ear="Telos Earring",
  358. left_ring="Moonlight Ring",
  359. right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  360. back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Damage taken-5%',}},
  361. }
  362.  
  363. sets.idle.Weak = sets.idle.PDT
  364.  
  365.  
  366. -- Defense sets
  367.  
  368. sets.defense.PDT = {}
  369.  
  370. sets.defense.MDT = {}
  371.  
  372. sets.Kiting = {feet="Fili Cothurnes +2"}
  373. sets.latent_refresh = {waist="Fucho-no-obi"}
  374.  
  375. -- Engaged sets
  376.  
  377. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  378. -- sets if more refined versions aren't defined.
  379. -- If you create a set with both offense and defense modes, the offense mode should be first.
  380. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  381.  
  382. -- Basic set for if no TP weapon is defined.
  383. sets.engaged = {range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3'}},
  384. head="Aya. Zucchetto +2",
  385. body="Ayanmo Corazza +2",
  386. hands="Bunzi's Gloves",
  387. legs={ name="Chironic Hose", augments={'MND+9','Rng.Acc.+2','Quadruple Attack +3','Accuracy+11 Attack+11'}},
  388. feet="Aya. Gambieras +2",
  389. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  390. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  391. left_ear="Cessance Earring",
  392. right_ear="Telos Earring",
  393. left_ring="Chirich Ring +1",
  394. right_ring="Chirich Ring +1",
  395. back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}}
  396.  
  397. --Sets with weapons defined.
  398. sets.engaged.Dagger = {range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3'}},
  399. head="Aya. Zucchetto +2",
  400. body="Ayanmo Corazza +2",
  401. hands="Bunzi's Gloves",
  402. legs={ name="Chironic Hose", augments={'MND+9','Rng.Acc.+2','Quadruple Attack +3','Accuracy+11 Attack+11'}},
  403. feet="Aya. Gambieras +2",
  404. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  405. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  406. left_ear="Cessance Earring",
  407. right_ear="Telos Earring",
  408. left_ring="Chirich Ring +1",
  409. right_ring="Chirich Ring +1",
  410. back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
  411. }
  412.  
  413. sets.engaged.DaggerAcc = set_combine(sets.engaged.Dagger, {hands={ name="Gazu Bracelet +1", augments={'Path: A',}},
  414. waist={ name="Sailfi Belt +1", augments={'Path: A',}}})
  415.  
  416. -- Set if dual-wielding
  417. sets.engaged.DW = {
  418. range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3'}},
  419. head="Aya. Zucchetto +2",
  420. body="Ayanmo Corazza +2",
  421. hands="Bunzi's Gloves",
  422. legs={ name="Chironic Hose", augments={'MND+9','Rng.Acc.+2','Quadruple Attack +3','Accuracy+11 Attack+11'}},
  423. feet="Aya. Gambieras +2",
  424. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  425. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  426. left_ear="Cessance Earring",
  427. right_ear="Telos Earring",
  428. left_ring="Chirich Ring +1",
  429. right_ring="Chirich Ring +1",
  430. back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}}
  431. }
  432.  
  433. sets.engaged.DWAcc = set_combine(sets.engaged.DW, {hands={ name="Gazu Bracelet +1", augments={'Path: A',}},
  434. waist={ name="Sailfi Belt +1", augments={'Path: A',}}})
  435.  
  436. sets.engaged.Carnwenhan = sets.engaged.DW
  437. sets.engaged.Carnwenhan.AM3 = set_combine(sets.engaged.DW, {
  438. head="Aya. Zucchetto +2",
  439. body="Nyame Mail",
  440. hands="Nyame Gauntlets",
  441. legs="Volte Tights",
  442. feet="Volte Spats",
  443. neck={ name="Bard's Charm +2", augments={'Path: A',}},
  444. waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  445. left_ear="Crep. Earring",
  446. right_ear="Telos Earring",
  447. left_ring="Chirich Ring +1",
  448. right_ring="Chirich Ring +1",
  449. back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}}
  450. })
  451. sets.engaged.CarnwenhanAcc = set_combine(sets.engaged.DW, {})
  452. sets.engaged.CarnwenhanAcc.AM3 = set_combine(sets.engaged.CarnwenhanAcc, {})
  453.  
  454. end
  455.  
  456. -------------------------------------------------------------------------------------------------------------------
  457. -- Job-specific hooks for standard casting events.
  458. -------------------------------------------------------------------------------------------------------------------
  459.  
  460. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  461. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  462. function job_precast(spell, action, spellMap, eventArgs)
  463. if spell.type == 'BardSong' then
  464. -- Auto-Pianissimo
  465. if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
  466. not state.Buff['Pianissimo'] then
  467.  
  468. local spell_recasts = windower.ffxi.get_spell_recasts()
  469. if spell_recasts[spell.recast_id] < 2 then
  470. send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  471. eventArgs.cancel = true
  472. return
  473. end
  474. end
  475. end
  476.  
  477. if (spell.type:endswith('Magic') or spell.type == "Ninjutsu" or spell.type == 'BardSong') then
  478. if buffactive.Silence then
  479. cancel_spell()
  480. send_command('input /item "Echo Drops" <me>')
  481. end
  482. end
  483. end
  484.  
  485. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  486. function job_midcast(spell, action, spellMap, eventArgs)
  487. if spell.action_type == 'Magic' then
  488. if spell.type == 'BardSong' then
  489. -- layer general gear on first, then let default handler add song-specific gear.
  490. local generalClass = get_song_class(spell)
  491. if generalClass and sets.midcast[generalClass] then
  492. equip(sets.midcast[generalClass])
  493. end
  494. end
  495. end
  496. end
  497.  
  498. function job_post_midcast(spell, action, spellMap, eventArgs)
  499. if spell.type == 'BardSong' then
  500. if state.ExtraSongsMode.value == 'FullLength' then
  501. equip(sets.midcast.Daurdabla)
  502. end
  503.  
  504. state.ExtraSongsMode:reset()
  505. end
  506. end
  507.  
  508. -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
  509. function job_aftercast(spell, action, spellMap, eventArgs)
  510. if spell.type == 'BardSong' and not spell.interrupted then
  511. if spell.target and spell.target.type == 'SELF' then
  512. adjust_timers(spell, spellMap)
  513. end
  514. end
  515. end
  516.  
  517. -------------------------------------------------------------------------------------------------------------------
  518. -- Job-specific hooks for standard casting events.
  519. -------------------------------------------------------------------------------------------------------------------
  520.  
  521. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  522. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  523. function job_precast(spell, action, spellMap, eventArgs)
  524. if spell.type == 'BardSong' then
  525. -- Auto-Pianissimo
  526. if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
  527. not state.Buff['Pianissimo'] then
  528.  
  529. local spell_recasts = windower.ffxi.get_spell_recasts()
  530. if spell_recasts[spell.recast_id] < 2 then
  531. send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  532. eventArgs.cancel = true
  533. return
  534. end
  535. end
  536. end
  537.  
  538. if (spell.type:endswith('Magic') or spell.type == "Ninjutsu" or spell.type == 'BardSong') then
  539. if buffactive.Silence then
  540. cancel_spell()
  541. send_command('input /item "Echo Drops" <me>')
  542. end
  543. end
  544. end
  545.  
  546. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  547. function job_midcast(spell, action, spellMap, eventArgs)
  548. if spell.action_type == 'Magic' then
  549. if spell.type == 'BardSong' then
  550. -- layer general gear on first, then let default handler add song-specific gear.
  551. local generalClass = get_song_class(spell)
  552. if generalClass and sets.midcast[generalClass] then
  553. equip(sets.midcast[generalClass])
  554. end
  555. end
  556. end
  557. end
  558.  
  559. function job_post_midcast(spell, action, spellMap, eventArgs)
  560. if spell.type == 'BardSong' then
  561. if state.ExtraSongsMode.value == 'FullLength' then
  562. equip(sets.midcast.Daurdabla)
  563. end
  564.  
  565. state.ExtraSongsMode:reset()
  566. end
  567. end
  568.  
  569. -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
  570. function job_aftercast(spell, action, spellMap, eventArgs)
  571. if spell.type == 'BardSong' and not spell.interrupted then
  572. if spell.target and spell.target.type == 'SELF' then
  573. adjust_timers(spell, spellMap)
  574. end
  575. end
  576. end
  577.  
  578. -------------------------------------------------------------------------------------------------------------------
  579. -- Job-specific hooks for non-casting events.
  580. -------------------------------------------------------------------------------------------------------------------
  581.  
  582. -- Handle notifications of general user state change.
  583. --function job_state_change(stateField, newValue, oldValue)
  584. -- if stateField == 'Offense Mode' then
  585. -- if newValue == 'Normal' then
  586. -- disable('main','sub','ammo')
  587. -- else
  588. -- enable('main','sub','ammo')
  589. -- end
  590. -- end
  591. --end
  592.  
  593. -------------------------------------------------------------------------------------------------------------------
  594. -- User code that supplements standard library decisions.
  595. -------------------------------------------------------------------------------------------------------------------
  596.  
  597. -- Called by the 'update' self-command.
  598. function job_update(cmdParams, eventArgs)
  599. pick_tp_weapon()
  600. end
  601.  
  602.  
  603. -- Modify the default idle set after it was constructed.
  604. function customize_idle_set(idleSet)
  605. if player.mpp < 51 then
  606. idleSet = set_combine(idleSet, sets.latent_refresh)
  607. end
  608.  
  609. if world.area:contains('Adoulin') then
  610. idleSet = set_combine(sets.idle.Town, {body="Councilor's Garb"})
  611. end
  612.  
  613. return idleSet
  614. end
  615.  
  616.  
  617. -- Function to display the current relevant user state when doing an update.
  618. function display_current_job_state(eventArgs)
  619. display_current_caster_state()
  620. eventArgs.handled = true
  621. end
  622.  
  623. -------------------------------------------------------------------------------------------------------------------
  624. -- Utility functions specific to this job.
  625. -------------------------------------------------------------------------------------------------------------------
  626.  
  627. -- Determine the custom class to use for the given song.
  628. function get_song_class(spell)
  629. -- Can't use spell.targets:contains() because this is being pulled from resources
  630. if set.contains(spell.targets, 'Enemy') then
  631. if state.CastingMode.value == 'Resistant' then
  632. return 'ResistantSongDebuff'
  633. else
  634. return 'SongDebuff'
  635. end
  636. elseif state.ExtraSongsMode.value == 'Dummy' then
  637. return 'DaurdablaDummy'
  638. else
  639. return 'SongEffect'
  640. end
  641. end
  642.  
  643. function job_post_precast(spell, action, spellMap, eventArgs)
  644. if spell.name == 'Dispelga' then
  645. equip(sets.precast.FC.Dispelga)
  646. end
  647. end
  648.  
  649. -- Function to create custom buff-remaining timers with the Timers plugin,
  650. -- keeping only the actual valid songs rather than spamming the default
  651. -- buff remaining timers.
  652. function adjust_timers(spell, spellMap)
  653. if state.UseCustomTimers.value == false then
  654. return
  655. end
  656.  
  657. local current_time = os.time()
  658.  
  659. -- custom_timers contains a table of song names, with the os time when they
  660. -- will expire.
  661.  
  662. -- Eliminate songs that have already expired from our local list.
  663. local temp_timer_list = {}
  664. for song_name,expires in pairs(custom_timers) do
  665. if expires < current_time then
  666. temp_timer_list[song_name] = true
  667. end
  668. end
  669. for song_name,expires in pairs(temp_timer_list) do
  670. custom_timers[song_name] = nil
  671. end
  672.  
  673. local dur = calculate_duration(spell.name, spellMap)
  674. if custom_timers[spell.name] then
  675. -- Songs always overwrite themselves now, unless the new song has
  676. -- less duration than the old one (ie: old one was NT version, new
  677. -- one has less duration than what's remaining).
  678.  
  679. -- If new song will outlast the one in our list, replace it.
  680. if custom_timers[spell.name] < (current_time + dur) then
  681. send_command('timers delete "'..spell.name..'"')
  682. custom_timers[spell.name] = current_time + dur
  683. send_command('timers create "'..spell.name..'" '..dur..' down')
  684. end
  685. else
  686. -- Figure out how many songs we can maintain.
  687. local maxsongs = 2
  688. if player.equipment.range == info.ExtraSongInstrument then
  689. maxsongs = maxsongs + info.ExtraSongs
  690. end
  691. if buffactive['Clarion Call'] then
  692. maxsongs = maxsongs + 1
  693. end
  694. -- If we have more songs active than is currently apparent, we can still overwrite
  695. -- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
  696. if maxsongs < table.length(custom_timers) then
  697. maxsongs = table.length(custom_timers)
  698. end
  699.  
  700. -- Create or update new song timers.
  701. if table.length(custom_timers) < maxsongs then
  702. custom_timers[spell.name] = current_time + dur
  703. send_command('timers create "'..spell.name..'" '..dur..' down')
  704. else
  705. local rep,repsong
  706. for song_name,expires in pairs(custom_timers) do
  707. if current_time + dur > expires then
  708. if not rep or rep > expires then
  709. rep = expires
  710. repsong = song_name
  711. end
  712. end
  713. end
  714. if repsong then
  715. custom_timers[repsong] = nil
  716. send_command('timers delete "'..repsong..'"')
  717. custom_timers[spell.name] = current_time + dur
  718. send_command('timers create "'..spell.name..'" '..dur..' down')
  719. end
  720. end
  721. end
  722. end
  723.  
  724. -- Function to calculate the duration of a song based on the equipment used to cast it.
  725. -- Called from adjust_timers(), which is only called on aftercast().
  726. function calculate_duration(spellName, spellMap)
  727. local mult = 1
  728. if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
  729. if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
  730.  
  731. if player.equipment.main == "Carnwenhan" then mult = mult + 0.5 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
  732. if player.equipment.main == "Kali" then mult = mult + 0.05 end
  733. if player.equipment.sub == "Kali" then mult = mult + 0.05 end
  734. if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
  735. if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.12 end
  736. if player.equipment.legs == "Inyanga Shalwar +2" then mult = mult + 0.17 end
  737. if player.equipment.feet == "Brioso Slippers +3" then mult = mult + 0.15 end
  738.  
  739. if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +3" then mult = mult + 0.2 end
  740. if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +2 +1" and player.equipment.back == "Intarabus's Cape" then mult = mult + 0.2 end
  741. if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
  742. if spellMap == 'March' and player.equipment.hands == "Fili Manchettes +1" then mult = mult + 0.1 end
  743. if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
  744. if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
  745. if spellMap == 'Prelude' and player.equipment.back == "Intarabus's Cape" then mult = mult + 0.1 end
  746.  
  747. if buffactive.Troubadour then
  748. mult = mult*2
  749. end
  750. if spellName == "Sentinel's Scherzo" then
  751. if buffactive['Soul Voice'] then
  752. mult = mult*2
  753. elseif buffactive['Marcato'] then
  754. mult = mult*1.5
  755. end
  756. end
  757.  
  758. local totalDuration = math.floor(mult*120)
  759.  
  760. return totalDuration
  761. end
  762.  
  763.  
  764. -- Examine equipment to determine what our current TP weapon is.
  765. function pick_tp_weapon()
  766. -- if brd_daggers:contains(player.equipment.main) then
  767. -- state.CombatWeapon:set('Dagger')
  768.  
  769. if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
  770. state.CombatForm:set('DW')
  771. else
  772. state.CombatForm:reset()
  773. end
  774. -- else
  775. state.CombatWeapon:reset()
  776. state.CombatForm:reset()
  777. end
  778. --end
  779. function job_buff_change(buff, gain)
  780. if state.Buff[buff] ~= nil then
  781. handle_equipping_gear(player.status)
  782. end
  783. if buff:startswith('Aftermath') then
  784. if player.equipment.main == 'Carnwenhan' and S{'NIN','DNC'}:contains(player.sub_job) then
  785. classes.CustomMeleeGroups:clear()
  786. if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
  787. classes.CustomMeleeGroups:append('AM3')
  788. add_to_chat(8, '-------------Mythic AM3 UP-------------')
  789. end
  790. if not midaction() then
  791. handle_equipping_gear(player.status)
  792. end
  793. else
  794. classes.CustomMeleeGroups:clear()
  795. if buff == "Aftermath" and gain or buffactive.Aftermath then
  796. classes.CustomMeleeGroups:append('AM')
  797. end
  798. if not midaction() then
  799. handle_equipping_gear(player.status)
  800. end
  801. end
  802. end
  803. end
  804.  
  805. function update_melee_groups()
  806. classes.CustomMeleeGroups:clear()
  807. if player.equipment.main == 'Carnwenhan' then
  808. if buffactive['Aftermath: Lv.3'] then
  809. classes.CustomMeleeGroups:append('AM3')
  810. end
  811. else
  812. if buffactive['Aftermath'] then
  813. classes.CustomMeleeGroups:append('AM')
  814. end
  815. end
  816. end
  817.  
  818. -- Function to reset timers.
  819. function reset_timers()
  820. for i,v in pairs(custom_timers) do
  821. send_command('timers delete "'..i..'"')
  822. end
  823. custom_timers = {}
  824. end
  825.  
  826.  
  827. -- Select default macro book on initial load or subjob change.
  828. function select_default_macro_book()
  829. set_macro_page(1,7)
  830. end
  831.  
  832. function set_lockstyle()
  833. send_command('wait 6;input /lockstyleset 11')
  834. end
  835.  
  836. function job_self_command(cmdParams, eventArgs)
  837. gearinfo(cmdParams, eventArgs)
  838. end
  839.  
  840. function gearinfo(cmdParams, eventArgs)
  841. if cmdParams[1] == 'gearinfo' then
  842. if type(cmdParams[4]) == 'string' then
  843. if cmdParams[4] == 'true' then
  844. moving = true
  845. elseif cmdParams[4] == 'false' then
  846. moving = false
  847. end
  848. end
  849. if not midaction() then
  850. job_update()
  851. end
  852. end
  853. end
  854.  
  855. function check_moving()
  856. if state.DefenseMode.value == 'None' and state.Kiting.value == false then
  857. if state.Auto_Kite.value == false and moving then
  858. state.Auto_Kite:set(true)
  859. elseif state.Auto_Kite.value == true and moving == false then
  860. state.Auto_Kite:set(false)
  861. end
  862. end
  863. end
  864.  
  865. function check_gear()
  866. if no_swap_gear:contains(player.equipment.left_ring) then
  867. disable("ring1")
  868. else
  869. enable("ring1")
  870. end
  871. if no_swap_gear:contains(player.equipment.right_ring) then
  872. disable("ring2")
  873. else
  874. enable("ring2")
  875. end
  876. end
  877.  
  878.  
  879.  
  880.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement