Gimpers

Gimpers_BRD

Jun 24th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.49 KB | None | 0 0
  1.  
  2.  
  3. -------------------------------------------------------------------------------------------------------------------
  4. -- Initialization function that defines sets and variables to be used.
  5. -------------------------------------------------------------------------------------------------------------------
  6.  
  7. -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
  8.  
  9. -- Initialization function for this job file.
  10. function get_sets()
  11. -- Load and initialize the include file.
  12. include('Mote-Include.lua')
  13. include('Mote-Include.lua')
  14. end
  15.  
  16.  
  17. -- Called when this job file is unloaded (eg: job change)
  18. function file_unload()
  19. if binds_on_unload then
  20. binds_on_unload()
  21. end
  22.  
  23. windower.send_command('unbind ^`')
  24. end
  25.  
  26.  
  27. -- Define sets and vars used by this job file.
  28. function init_gear_sets()
  29. -- Default macro set/book
  30. set_macro_page(1, 4)
  31. timerIcon_Mode = true
  32.  
  33. -- Additional local binds
  34. windower.send_command('bind ^` input /ma "Chocobo Mazurka" <me>')
  35. windower.send_command('bind ^d` gs c song3')
  36. windower.send_command('bind ^q input /ja "Nightingale" <me>')
  37. windower.send_command('bind ^g input /ja "Pianissimo" <me>')
  38. windower.send_command('bind !q input /ja "Magic Finale" <t>')
  39. windower.send_command('bind !g input /ja "Clarion Call" <me>')
  40.  
  41. -- Options: Override default values
  42. options.CastingModes = {'Normal', 'Resistant'}
  43. options.OffenseModes = {'Normal','Melee'}
  44. options.DefenseModes = {'Normal'}
  45. options.WeaponskillModes = {'Normal'}
  46. options.IdleModes = {'Normal', 'PDT'}
  47. options.RestingModes = {'Normal'}
  48. options.PhysicalDefenseModes = {'PDT'}
  49. options.MagicalDefenseModes = {'MDT'}
  50.  
  51. state.Defense.PhysicalMode = 'PDT'
  52. state.OffenseMode = 'None'
  53.  
  54.  
  55. state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
  56.  
  57. -- For tracking current recast timers via the Timers plugin.
  58. timer_reg = {}
  59. player_reg = {}
  60. -- Some vars. Define at the top so that the sets can make use of them.
  61. DaurdSongs = S{'Water Carol','Water Carol II','Ice Carol','Ice Carol II','Herb Pastoral','Goblin Gavotte','Army\'s Paeon'}
  62.  
  63. --------------------------------------
  64. -- Start defining the sets
  65. --------------------------------------
  66.  
  67. -- Precast Sets
  68.  
  69. -- Fast cast sets for spells
  70. sets.precast.FC = {head="Nahtirah Hat",ear2="Loquac. Earring", neck = "Jeweled collar",
  71. hands="Gendewitha Gages",ring1="Prolix Ring", body="Anhur Robe",
  72. back="Swith Cape",waist="Witful Belt",legs="Orvail pants +1",feet="Bokwus Boots"}
  73.  
  74. sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris",back="Pahtli Cape",legs="Nabu's Shalwar"})
  75.  
  76. sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {waist="Siegel Sash"})
  77.  
  78. sets.precast.FC.BardSong = {main="Felibre's Dague", sub="Genbu's Shield",
  79. head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear1="Aoidos' Earring",ear2="Loquac. Earring",
  80. body="Marduk's Jubbah +1",hands="Gendewitha Gages",ring1="Prolix Ring",
  81. back="Swith Cape",waist="Aoidos' Belt",legs="Gendewitha Spats",feet="Bihu Slippers"}
  82.  
  83. sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range="Terpander"})
  84.  
  85.  
  86. -- Precast sets to enhance JAs
  87.  
  88. sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
  89. sets.precast.JA.Troubadour = {body="Bihu Justaucorps"}
  90. sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions +11"}
  91.  
  92. -- Waltz set (chr and vit)
  93. sets.precast.Waltz = {range="Gjallarhorn",
  94. head="Nahtirah Hat",
  95. body="Gendewitha Bliaut",hands="Buremte Gloves",
  96. back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  97.  
  98.  
  99. -- Weaponskill sets
  100. -- Default set for any weaponskill that isn't any more specifically defined
  101. sets.precast.WS = {range="Gjallarhorn",
  102. head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  103. body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  104. back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  105.  
  106. -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
  107. sets.precast.WS['Evisceration'] = {
  108. head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  109. body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  110. back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  111.  
  112. sets.precast.WS['Exenterator'] = {
  113. head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  114. body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  115. back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  116.  
  117. sets.precast.WS['Mordant Rime'] = {range="Gjallarhorn",
  118. head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  119. body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  120. back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  121.  
  122.  
  123. -- Midcast Sets
  124.  
  125. -- General set for recast times.
  126. sets.midcast.FastRecast = {range="Angel Lyre",
  127. head="Gendewitha caubeen",ear2="Loquacious Earring",
  128. body="Anhur Robe",hands="Gendewitha Gages",ring1="Prolix Ring",
  129. back="Swith Cape",waist="Corvax Sash",legs="Aoidos' rhingrave +2",feet="Gendewitha Galoshes"}
  130.  
  131. -- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
  132. sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
  133.  
  134. sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
  135. sets.midcast.Mazurka = {range = "Gjallarhorn"}
  136. sets.midcast.March = {hands="Aoidos' Manchettes +2"}
  137. sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
  138. sets.midcast.Carol = {head="Aoidos' Calot +2",
  139. body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
  140. legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
  141. sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
  142. sets.midcast['Magic Finale'] = {neck="Wind Torque",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
  143.  
  144. sets.midcast.song3 = {main= "Felibre's Dague", range="Terpander",
  145. head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear2="Loquacious Earring",
  146. body="Marduk's Jubbah +1",hands="Gendewitha Gages",ring1="Prolix Ring",
  147. back="Swith Cape",waist="Aoidos' Belt",legs="Gendewitha Spats",feet="Bihu Slippers"}
  148.  
  149. -- For song buffs (duration and AF3 set bonus)
  150. sets.midcast.SongEffect = {main="Legato Dagger",
  151. head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear2="Loquacious Earring",
  152. body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",
  153. back="Harmony Cape",waist="Corvax Sash",legs="Mdk. Shalwar +1",feet="Brioso Slippers +1"}
  154.  
  155. -- For song debuffs
  156. sets.midcast.SongDebuff = {main="Venabulum", sub="Mephitis Grip",
  157. head="Bihu Roundlet +1",neck="Wind Torque",ear1="Gwati Earring",ear2="Musical Earring",
  158. body="Brioso Just. +1",hands="Lurid Mitts",ring1="Omega ring",ring2="Sangoma Ring",
  159. back="Kumbira Cape",waist="Demonry Sash",legs="Bihu Cannions +1",feet="Artsieq Boots"}
  160. sets.midcast.Lullaby =set_combine(sets.midcast.SongDebuff, { range = "Gjallarhorn", hands="Brioso Cuffs"})
  161.  
  162. -- Song-specific recast reduction
  163. sets.midcast.SongRecast = {ear2="Loquacious Earring",
  164. ring1="Prolix Ring",
  165. back="Harmony Cape",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
  166. sets.midcast['Magic Finale'] = sets.midcast.SongDebuff
  167. sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range="Terpander"})
  168.  
  169. -- Other general spells and classes.
  170. sets.midcast.Cure = {main="Arka IV",
  171. head="Gendewitha Caubeen",neck="Colossus's Torque",
  172. body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Haoma's Ring",ring2="Sirona's Ring",
  173. legs="Gendewitha Spats",feet="Brioso Slippers +1"}
  174.  
  175. sets.midcast.Stoneskin = {
  176. head="Nahtirah Hat",
  177. body="Gendewitha Bliaut",hands="Gendewitha Gages",
  178. legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  179.  
  180. sets.midcast.Cursna = {
  181. neck="Malison Medallion",
  182. hands="Hieros Mittens",ring1="Ephedra Ring",ring2="Haoma's Ring"}
  183.  
  184.  
  185. -- Sets to return to when not performing an action.
  186.  
  187. -- Resting sets
  188. sets.resting = {main=gear.Staff.HMP,
  189. body="Gendewitha Bliaut",
  190. legs="Nares Trews",feet="Chelona Boots +1"}
  191.  
  192.  
  193. -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  194. sets.idle = {main="Terra's Staff", range="Gjallarhorn",
  195. head="Wivre Hairpin",neck="Twilight Torque",ear1="Musical Earring",ear2="Moonshade Earring",
  196. body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  197. back="Kumbira Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Aoidos' cothurnes +2"}
  198.  
  199.  
  200. sets.idle.Town = {main="Terra's Staff", range="Gjallarhorn",
  201. head="Wivre Hairpin",neck="Twilight Torque",ear1="Musical Earring",ear2="Moonshade Earring",
  202. body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  203. back="Kumbira Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Aoidos' cothurnes +2"}
  204.  
  205. sets.idle.Weak = {main="Terra's Staff", range="Gjallarhorn",
  206. head="Wivre Hairpin",neck="Twilight Torque",ear1="Musical Earring",ear2="Moonshade Earring",
  207. body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  208. back="Kumbira Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Aoidos' cothurnes +2"}
  209.  
  210.  
  211. -- Defense sets
  212.  
  213. sets.defense.PDT = {main="Terra's Staff",sub="Quire Grip",
  214. head="Gendewitha Caubeen",neck="Twilight Torque",
  215. body="Artsieq Jubbah",hands="Gendewitha Gages",ring1='Dark Ring',
  216. back="Iximulew Cape",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  217.  
  218. sets.defense.MDT = {main=gear.Staff.PDT,sub="Quire Grip", ammo="Sihirik",
  219. head="Nahtirah Hat",neck="Twilight Torque",
  220. body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1='Dark Ring',
  221. back="Mubvum. Mantle",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  222.  
  223. sets.Kiting = {feet="Aoidos' Cothurnes +2"}
  224.  
  225. -- Engaged sets
  226.  
  227. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  228. -- sets if more refined versions aren't defined.
  229. -- If you create a set with both offense and defense modes, the offense mode should be first.
  230. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  231.  
  232. -- Basic set for if no TP weapon is defined.
  233. sets.engaged = {
  234. head="Gendewitha Caubeen",neck="Veisa collar",ear1="Aoidos' earring",ear2="Loquacious Earring",
  235. body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  236. back="Swith Cape",waist="Aoidos' Belt",legs="Orvail Pants",feet="Aoidos' cothurnes +2"}
  237.  
  238. -- Sets with weapons defined.
  239. sets.engaged.Melee = { range = "Gjallarhorn",
  240. head="Espial cap",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
  241. body="Kirin's Osode",hands="Espial Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  242. back="Atheling Mantle",waist="Cetl Belt",legs="Espial hose",feet="Espial socks"}
  243.  
  244. sets.engaged.DWDagger = {
  245. head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  246. body="Kirin's Osode",hands="Espial Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
  247. back="Atheling Mantle",waist="Cetl Belt",legs="Espial hose",feet="Espial socks"}
  248.  
  249.  
  250. end
  251.  
  252.  
  253. -------------------------------------------------------------------------------------------------------------------
  254. -- Job- versions of event handlers, allowing overriding default handling.
  255. -------------------------------------------------------------------------------------------------------------------
  256.  
  257. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  258. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  259. function job_precast(spell, action, spellMap, eventArgs)
  260. if spell.type == 'BardSong' then
  261. -- Auto-Pianissimo
  262. if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then
  263. cancel_spell()
  264. windower.send_command('@input /ja "Pianissimo" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name)
  265. eventArgs.cancel = true
  266. return
  267. end
  268. end
  269. end
  270.  
  271.  
  272. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  273. function job_midcast(spell, action, spellMap, eventArgs)
  274. if spell.action_type == 'Magic' then
  275. -- Default base equipment layer of fast recast.
  276. equip(sets.midcast.FastRecast)
  277.  
  278. if spell.type == 'BardSong' then
  279. -- layer general gear on first, then let default handler add song-specific gear.
  280. local generalClass = get_song_class(spell)
  281. if generalClass and sets.midcast[generalClass] then
  282. equip(sets.midcast[generalClass])
  283. end
  284. end
  285. end
  286. end
  287.  
  288. -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
  289. function job_aftercast(spell, action, spellMap, eventArgs)
  290. if not spell.interrupted then
  291. if state.Buff[spell.name] ~= nil then
  292. state.Buff[spell.name] = true
  293. end
  294.  
  295. if spell.type == 'BardSong' then
  296. if spell.target then
  297. if (spell.target.type and spell.target.type:upper() == 'SELF') or (spell.target.type and spell.target.type:upper() == 'PLAYER') then
  298. adjust_Timers(spell, action, spellMap)
  299. end
  300. end
  301. end
  302. end
  303. end
  304.  
  305. -------------------------------------------------------------------------------------------------------------------
  306. -- Hooks for other events that aren't handled by the include file.
  307. -------------------------------------------------------------------------------------------------------------------
  308.  
  309. function job_buff_change(buff, gain)
  310. if state.Buff[buff] ~= nil then
  311. state.Buff[buff] = gain
  312. end
  313. end
  314.  
  315. -------------------------------------------------------------------------------------------------------------------
  316. -- User code that supplements self-commands.
  317. -------------------------------------------------------------------------------------------------------------------
  318. function job_self_command(cmdParams, eventArgs)
  319. if cmdParams[1]:lower() == 'song3' then
  320. sing_song3()
  321. eventArgs.handled = true
  322. end
  323. end
  324.  
  325.  
  326. -- Called by the 'update' self-command.
  327. function job_update(cmdParams, eventArgs)
  328. pick_tp_weapon()
  329.  
  330. if player.equipment.main == 'Izhiikoh' and state.OffenseMode == 'None' then
  331. send_command('gs c set OffenseMode Normal')
  332. end
  333. end
  334.  
  335.  
  336. -- Handle notifications of general user state change.
  337. function job_state_change(stateField, newValue)
  338. if stateField == 'OffenseMode' then
  339. if newValue == 'Normal' then
  340. disable('main','sub')
  341. else
  342. enable('main','sub')
  343. end
  344. elseif stateField == 'Reset' then
  345. if state.OffenseMode == 'None' then
  346. enable('main','sub')
  347. end
  348. end
  349. end
  350.  
  351. -------------------------------------------------------------------------------------------------------------------
  352. -- Utility functions specific to this job.
  353. -------------------------------------------------------------------------------------------------------------------
  354.  
  355. -- Determine the custom class to use for the given song.
  356. function get_song_class(spell)
  357. if DaurdSongs[spell.english] then
  358. return 'Terpander'
  359. elseif spell.target.type == 'MONSTER' then
  360. return 'SongDebuff'
  361. else
  362. return 'SongEffect'
  363. end
  364. end
  365.  
  366.  
  367. function adjust_Timers(spell, action, spellMap)
  368. local t = os.time()
  369.  
  370. -- Eliminate songs that have already expired from our local list.
  371. local tempreg = {}
  372. for i,v in pairs(timer_reg) do
  373. if v < t then tempreg[i] = true end
  374. end
  375. for i,v in pairs(tempreg) do
  376. timer_reg[i] = nil
  377. end
  378.  
  379. local dur = calculate_duration(spell.name, spellMap)
  380. if timer_reg[spell.name] then
  381. del_cmd = 'timers delete "'..spell.name..' ['..spell.target.name..']"'
  382. -- Can delete timers that have less than 120 seconds remaining, since
  383. -- the new version of the song will overwrite the old one.
  384. -- Otherwise create a new timer counting down til we can overwrite.
  385. --if (timer_reg[spell.name] - t) <= 120 then
  386. send_command(del_cmd)
  387. timer_reg[spell.name] = t + dur
  388. local rep_timer = 'timers c "'..spell.name..' ['..spell.target.name..']" '..dur..' down'
  389.  
  390. if timerIcon_Mode then
  391. rep_timer = rep_timer..' spells/00'..spell.id..'.png'
  392. end
  393. send_command(rep_timer)
  394. --end
  395. else
  396. -- Figure out how many songs we can maintain.
  397. local maxsongs = 2
  398. if player.equipment.range == 'Terpander' then
  399. maxsongs = maxsongs+1 -- +2 for 99 Daur
  400. end
  401. if buffactive['Clarion Call'] then
  402. maxsongs = maxsongs+1
  403. end
  404. -- If we have more songs active than is currently apparent, we can still overwrite
  405. -- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
  406. if maxsongs < table.length(timer_reg) then
  407. maxsongs = table.length(timer_reg)
  408. end
  409.  
  410. -- Create or update new song timers.
  411. if table.length(timer_reg) < maxsongs then
  412. timer_reg[spell.name] = t+dur
  413. --send_command('timers create "'..spell.name..'" '..dur..' down')
  414. local timer_cmd = 'timers c "'..spell.name..' ['..spell.target.name..']" '..dur..' down'
  415. if timerIcon_Mode then
  416. timer_cmd = timer_cmd..' spells/00'..spell.id..'.png'
  417. end
  418. send_command( timer_cmd )
  419. else
  420. local rep,repsong
  421. for i,v in pairs(timer_reg) do
  422. if t+dur > v then
  423. if not rep or rep > v then
  424. rep = v
  425. repsong = i
  426. end
  427. end
  428. end
  429. if repsong then
  430. timer_reg[repsong] = nil
  431. send_command('timers delete "'..repsong..'"')
  432. timer_reg[spell.name] = t+dur
  433. send_command('timers create "'..spell.name..'" '..dur..' down')
  434. end
  435. end
  436. end
  437. end
  438.  
  439. -- Function to calculate the duration of a song based on the equipment used to cast it.
  440. -- Called from adjust_Timers(), which is only called on aftercast().
  441. function calculate_duration(spellName, spellMap)
  442. local mult = 1
  443. if player.equipment.range == 'Daurdabla' then mult = mult + 0.25 end -- change to 0.3 with 95/99 Daur
  444. if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.4 with 99 Gjall
  445.  
  446. if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
  447. if player.equipment.main == "Legato Dagger" then mult = mult + 0.1 end
  448. if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
  449. if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
  450. if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
  451. if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
  452. if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
  453.  
  454. if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
  455. if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
  456. if spellMap == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
  457. if spellMap == 'Minuet' and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
  458. if spellMap == 'March' and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
  459. if spellMap == 'Ballad' and player.equipment.legs == "Aoidos' Rhing. +2" then mult = mult + 0.1 end
  460. if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
  461.  
  462. if buffactive.Troubadour then
  463. mult = mult*2
  464. end
  465. if spellName == "Sentinel's Scherzo" then
  466. if buffactive['Soul Voice'] then
  467. mult = mult*2
  468. elseif buffactive['Marcato'] then
  469. mult = mult*1.5
  470. end
  471. end
  472.  
  473. -- Tweak for inaccuracies in cast vs aftercast timing
  474. mult = mult - 0.05
  475.  
  476. local totalDuration = mult*120
  477.  
  478. return totalDuration
  479. end
  480.  
  481.  
  482. -- Examine equipment to determine what our current TP weapon is.
  483. function pick_tp_weapon()
  484. if player.equipment.main then
  485. if string.find(player.equipment.main, 'Staff') then
  486. TPWeapon = 'Staff'
  487. elseif player.equipment.sub == empty or string.find(player.equipment.sub, 'Shield') then
  488. TPWeapon = 'Dagger'
  489. elseif T{'NIN','DNC'}:contains(player.sub_job) then
  490. TPWeapon = 'DWDagger'
  491. else
  492. TPWeapon = 'Dagger'
  493. end
  494. else
  495. TPWeapon = 'None'
  496. end
  497. end
  498.  
  499. function sing_song3()
  500.  
  501. windower.send_command('input /ma "Army\'s Paeon" <stpc>')
  502. --windower.send_command('input /ma "Goddess\'s Hymnus" <stpc>')
  503.  
  504. end
  505.  
  506. function shallowcopy(orig)
  507. local orig_type = type(orig)
  508. local copy
  509. if orig_type == 'table' then
  510. copy = {}
  511. for orig_key, orig_value in pairs(orig) do
  512. copy[orig_key] = orig_value
  513. end
  514. else -- number, string, boolean, etc
  515. copy = orig
  516. end
  517. return copy
  518. end
Advertisement
Add Comment
Please, Sign In to add comment