bongarippa

BRD

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