Advertisement
bongarippa

BRD

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