bongarippa

EvdaBRD

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