Advertisement
Guest User

Untitled

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