Advertisement
Guest User

2017 SAM GS

a guest
Nov 20th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.05 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Initialization function that defines sets and variables to be used.
  3. -------------------------------------------------------------------------------------------------------------------
  4. --Ionis Zones
  5. --Anahera Blade (4 hit): 52
  6. --Tsurumaru (4 hit): 49
  7. --Kogarasumaru (or generic 450 G.katana) (5 hit): 40
  8. --Amanomurakumo/Masamune 437 (5 hit): 46
  9. --
  10. --Non Ionis Zones:
  11. --Anahera Blade (4 hit): 52
  12. --Tsurumaru (5 hit): 24
  13. --Kogarasumaru (5 hit): 40
  14. --Amanomurakumo/Masamune 437 (5 hit): 46
  15. --
  16. --Aftermath sets
  17. -- Koga AM1/AM2 = sets.engaged.Kogarasumaru.AM
  18. -- Koga AM3 = sets.engaged.Kogarasumaru.AM3
  19. -- Amano AM = sets.engaged.Amanomurakumo.AM
  20. -- Using Namas Arrow while using Amano will cancel STPAM set
  21.  
  22. -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
  23.  
  24. -- Initialization function for this job file.
  25. function get_sets()
  26. -- Load and initialize the include file.
  27. mote_include_version = 2
  28. include('Mote-Include.lua')
  29. include('organizer-lib')
  30. end
  31.  
  32.  
  33. -- Setup vars that are user-independent.
  34. function job_setup()
  35. get_combat_form()
  36. --get_combat_weapon()
  37. update_melee_groups()
  38.  
  39. state.CapacityMode = M(false, 'Capacity Point Mantle')
  40.  
  41. state.YoichiAM = M(false, 'Cancel Yoichi AM Mode')
  42. -- list of weaponskills that make better use of otomi helm in low acc situations
  43. wsList = S{'Tachi: Fudo', 'Tachi: Shoha'}
  44.  
  45. gear.RAarrow = {name="Eminent Arrow"}
  46. LugraWSList = S{'Tachi: Fudo', 'Tachi: Shoha', 'Namas Arrow'}
  47.  
  48. state.Buff.Sekkanoki = buffactive.sekkanoki or false
  49. state.Buff.Sengikori = buffactive.sengikori or false
  50. state.Buff['Third Eye'] = buffactive['Third Eye'] or false
  51. state.Buff['Meikyo Shisui'] = buffactive['Meikyo Shisui'] or false
  52. end
  53.  
  54.  
  55. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  56. function user_setup()
  57. -- Options: Override default values
  58. state.OffenseMode:options('Normal', 'Mid', 'Acc')
  59. state.HybridMode:options('Normal', 'PDT', 'Reraise')
  60. state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
  61. state.IdleMode:options('Normal')
  62. state.RestingMode:options('Normal')
  63. state.PhysicalDefenseMode:options('PDT', 'Reraise')
  64. state.MagicalDefenseMode:options('MDT')
  65.  
  66. -- Additional local binds
  67. send_command('bind ^[ input /lockstyle on')
  68. send_command('bind ![ input /lockstyle off')
  69. send_command('bind != gs c toggle CapacityMode')
  70.  
  71. select_default_macro_book()
  72. end
  73.  
  74.  
  75. -- Called when this job file is unloaded (eg: job change)
  76. function file_unload()
  77. send_command('unbind ^[')
  78. send_command('unbind !=')
  79. send_command('unbind ![')
  80. end
  81.  
  82. --[[
  83. -- SC's
  84. Rana > Shoha > Fudo > Kasha > Shoha > Fudo - light
  85. Rana > Shoha > Fudo > Kasha > Rana > Fudo - dark
  86. Kasha > Shoha > Fudo
  87. Fudo > Kasha > Shoha > fudo
  88. Shoha > Fudo > Kasha > Shoha > Fudo
  89. --]]
  90. function init_gear_sets()
  91. --------------------------------------
  92. -- Start defining the sets
  93. --------------------------------------
  94. Acro = {}
  95. Acro.Hands = {}
  96. Acro.Feet = {}
  97.  
  98. Acro.Hands.Haste = {name="Acro gauntlets", augments={'STR+3 AGI+3','Accuracy+18 Attack+18','Haste+2'}}
  99. Acro.Hands.STP = {name="Acro gauntlets", augments={'Accuracy+19 Attack+19','"Store TP"+5','Weapon skill damage +3%'}}
  100.  
  101. Acro.Feet.STP = {name="Acro Leggings", augments={'STR+7 AGI+7','Accuracy+17 Attack+17','"Store TP"+6'}}
  102. Acro.Feet.WSD = {name="Acro Leggings", augments={'Accuracy+18 Attack+18','"Dbl. Atk."+3','Weapon skill damage +2%'}}
  103.  
  104. -- Precast Sets
  105. -- Precast sets to enhance JAs
  106. sets.precast.JA.Meditate = {
  107. head="Myochin Kabuto",
  108. hands="Saotome Kote",
  109.  
  110. }
  111. sets.precast.JA.Seigan = {head="Unkai Kabuto +1"}
  112. sets.precast.JA['Warding Circle'] = {head="Myochin Kabuto"}
  113. sets.precast.JA['Third Eye'] = {legs="Sakonji Haidate"}
  114. --sets.precast.JA['Blade Bash'] = {hands="Saotome Kote +2"}
  115.  
  116. -- Waltz set (chr and vit)
  117. sets.precast.Waltz = {}
  118.  
  119. sets.Organizer = {
  120. main="Tsurumaru",
  121. sub="Bloodrain Strap",
  122. range="Yoichinoyumi",
  123. ammo="Cibitshavore",
  124. hands="Acro Gauntlets",
  125. feet="Acro Leggings",
  126. back="Takaha Mantle"
  127. }
  128.  
  129. -- Don't need any special gear for Healing Waltz.
  130. sets.precast.Waltz['Healing Waltz'] = {}
  131.  
  132. sets.CapacityMantle = { back="Mecistopins Mantle" }
  133. --sets.Berserker = { neck="Berserker's Torque" }
  134. sets.WSDayBonus = { head="Gavialis Helm" }
  135. sets.LugraMoonshade = { ear1="Lugra Earring +1", ear2="Moonshade Earring" }
  136. sets.BrutalMoonshade = { ear1="Brutal Earring", ear2="Moonshade Earring" }
  137. sets.LugraFlame = { ear1="Lugra Earring +1", ear2="Flame Pearl" }
  138. sets.FlameFlame = { ear1="Flame Pearl", ear2="Flame Pearl" }
  139.  
  140. -- Weaponskill sets
  141. -- Default set for any weaponskill that isn't any more specifically defined
  142. sets.precast.WS = {
  143. --ammo="Paeapua",
  144. ammo="Jukukik Feather",
  145. head="Gorney Morion +1",
  146. body="Gorney Haubert +1",
  147. hands="Gorney Moufles +1",
  148. legs="Gor. Brayettes +1",
  149. feet="Gor. Sollerets +1",
  150. neck="Focus Collar",
  151. waist="Cetl Belt",
  152. left_ear="Mache Earring",
  153. left_ring="Ifrit Ring",
  154. right_ring="Ifrit Ring",
  155. }
  156. sets.precast.WS.Mid = set_combine(sets.precast.WS, {
  157. head="Rao Kabuto",
  158. body="Sakonji Domaru +1",
  159. })
  160. sets.precast.WS.Acc = set_combine(sets.precast.WS.Mid, {
  161. ring2="Mars's Ring",
  162. hands="Mikinaak Gauntlets"
  163. })
  164.  
  165. sets.precast.WS['Namas Arrow'] = {
  166. ammo=gear.RAarrow,
  167. head="Sakonji Kabuto +1",
  168. neck="Aqua Gorget",
  169. ear1="Flame Pearl",
  170. ear2="Flame Pearl",
  171. body="Acro Surcoat",
  172. hands=Acro.Hands.STP,
  173. back="Buquwik Cape",
  174. ring1="Karieyh Ring",
  175. ring2="Ifrit Ring +1",
  176. waist="Metalsinger Belt",
  177. legs="Hizamaru Hizayoroi +1",
  178. feet="Wakido Sune-ate +1"
  179. }
  180. sets.precast.WS['Namas Arrow'].Mid = set_combine(sets.precast.WS['Namas Arrow'], {
  181. body="Kyujutsugi",
  182. })
  183. sets.precast.WS['Namas Arrow'].Acc = set_combine(sets.precast.WS['Namas Arrow'].Mid, {
  184. ring2="Hajduk Ring"
  185. })
  186.  
  187. sets.precast.WS['Apex Arrow'] = set_combine(sets.precast.WS['Namas Arrow'], {
  188. neck="Breeze Gorget",
  189. body="Kyujutsugi",
  190. ring2="Garuda Ring"
  191. })
  192. sets.precast.WS['Apex Arrow'].Mid = sets.precast.WS['Apex Arrow']
  193. sets.precast.WS['Apex Arrow'].Acc = set_combine(sets.precast.WS['Apex Arrow'], {
  194. ring2="Longshot Ring"
  195. })
  196.  
  197. sets.precast.WS['Tachi: Fudo'] = set_combine(sets.precast.WS, {
  198. neck="Aqua Gorget",
  199. hands=Acro.Hands.STP,
  200. body="Acro Surcoat",
  201. waist="Metalsinger Belt",
  202. legs="Hizamaru Hizayoroi +1",
  203. })
  204. sets.precast.WS['Tachi: Fudo'].Mid = set_combine(sets.precast.WS['Tachi: Fudo'], {
  205. body="Acro Surcoat",
  206. --waist="Light Belt"
  207. })
  208. sets.precast.WS['Tachi: Fudo'].Acc = set_combine(sets.precast.WS['Tachi: Fudo'].Mid, {
  209. head="Valorous Mask",
  210. body="Acro Surcoat",
  211. back="Takaha Mantle"
  212. })
  213.  
  214. sets.precast.WS['Tachi: Shoha'] = set_combine(sets.precast.WS, {
  215. neck="Breeze Gorget",
  216. body="Acro Surcoat",
  217. waist="Thunder Belt"
  218. })
  219. sets.precast.WS['Tachi: Shoha'].Mid = set_combine(sets.precast.WS.Acc, {
  220. head="Rao Kabuto",
  221. neck="Breeze Gorget",
  222. waist="Thunder Belt"
  223. })
  224. sets.precast.WS['Tachi: Shoha'].Acc = set_combine(sets.precast.WS['Tachi: Shoha'].Mid, {
  225. body="Sakonji Domaru +1",
  226. feet="Wakido Sune-Ate +1"
  227. })
  228.  
  229. sets.precast.WS['Tachi: Rana'] = set_combine(sets.precast.WS, {
  230. neck="Shadow Gorget",
  231. ear1="Bladeborn Earring",
  232. body="Mes'yohi Haubergeon",
  233. ear2="Steelflash Earring",
  234. hands="Mikinaak Gauntlets",
  235. waist="Soil Belt",
  236. feet="Sakonji Sune-Ate +1"
  237. })
  238. sets.precast.WS['Tachi: Rana'].Mid = set_combine(sets.precast.WS['Tachi: Rana'], {
  239. body="Sakonji Domaru +1"
  240. })
  241. sets.precast.WS['Tachi: Rana'].Acc = set_combine(sets.precast.WS.Acc, {
  242. neck="Shadow Gorget",
  243. ear1="Bladeborn Earring",
  244. ear2="Steelflash Earring",
  245. waist="Soil Belt",
  246. feet="Wakido Sune-Ate +1"
  247. })
  248. -- CHR Mod
  249. sets.precast.WS['Tachi: Ageha'] = {
  250. ammo="Jukukik Feather",
  251. head="Gorney Morion +1",
  252. body="Gorney Haubert +1",
  253. hands="Gorney Moufles +1",
  254. legs="Gor. Brayettes +1",
  255. feet="Gor. Sollerets +1",
  256. neck="Focus Collar",
  257. waist="Cetl Belt",
  258. left_ear="Mache Earring",
  259. left_ring="Ifrit Ring",
  260. right_ring="Ifrit Ring"
  261. }
  262. sets.precast.WS['Tachi: Jinpu'] = sets.precast.WS['Tachi: Ageha']
  263.  
  264. sets.precast.WS['Tachi: Kasha'] = set_combine(sets.precast.WS, {neck="Flame Gorget",waist="Light Belt"})
  265.  
  266. sets.precast.WS['Tachi: Gekko'] = set_combine(sets.precast.WS, {neck="Aqua Gorget",waist="Windbuffet Belt +1"})
  267.  
  268. sets.precast.WS['Tachi: Yukikaze'] = set_combine(sets.precast.WS, {neck="Breeze Gorget",waist="Windbuffet Belt +1"})
  269.  
  270. sets.precast.WS['Tachi: Jinpu'] = set_combine(sets.precast.WS, {neck="Shadow Gorget",waist="Soil Belt"})
  271.  
  272. -- Midcast Sets
  273. sets.midcast.FastRecast = {
  274. head="Otomi Helm",
  275. body="Kyujutsugi",
  276. legs="Wakido Haidate +1",
  277. feet="Ejekamal Boots"
  278. }
  279. -- Sets to return to when not performing an action.
  280.  
  281. -- Resting sets
  282. sets.resting = {
  283. head="Twilight Helm",
  284. body="Twilight Mail",
  285. ring2="Paguroidea Ring"
  286. }
  287.  
  288. sets.idle.Town = {
  289. main="Senkuto",
  290. sub="Nepenthe Grip",
  291. ammo="Jukukik Feather",
  292. head="Gorney Morion +1",
  293. body="Gorney Haubert +1",
  294. hands="Gorney Moufles +1",
  295. legs="Gor. Brayettes +1",
  296. feet="Gor. Sollerets +1",
  297. neck="Focus Collar",
  298. waist="Cetl Belt",
  299. left_ear="Mache Earring",
  300. left_ring="Cho'j Band",
  301. right_ring="Tyrant's Ring",
  302. }
  303. sets.idle.Town.Adoulin = set_combine(sets.idle.Town, {
  304. body="Councilor's Garb"
  305. })
  306.  
  307. sets.idle.Field = set_combine(sets.idle.Town, {
  308. main="Senkuto",
  309. sub="Nepenthe Grip",
  310. ammo="Jukukik Feather",
  311. head="Gorney Morion +1",
  312. body="Gorney Haubert +1",
  313. hands="Gorney Moufles +1",
  314. legs="Gor. Brayettes +1",
  315. feet="Gor. Sollerets +1",
  316. neck="Focus Collar",
  317. waist="Cetl Belt",
  318. left_ear="Mache Earring",
  319. left_ring="Cho'j Band",
  320. right_ring="Tyrant's Ring",
  321. })
  322.  
  323. sets.idle.Regen = set_combine(sets.idle.Town, {
  324. neck="Sanctity Necklace",
  325. ring2="Paguroidea Ring",
  326. head="Valorous Mask",
  327. body="Kumarbi's Akar",
  328. back="Solemnity Cape",
  329. feet="Danzo Sune-ate"
  330. })
  331.  
  332. sets.idle.Weak = set_combine(sets.idle.Field, {
  333. head="Twilight Helm",
  334. body="Twilight Mail"
  335. })
  336. sets.idle.Yoichi = set_combine(sets.idle.Field, {
  337. ammo=gear.RAarrow
  338. })
  339.  
  340. -- Defense sets
  341. sets.defense.PDT = {
  342. main="Senkuto",
  343. sub="Nepenthe Grip",
  344. ammo="Jukukik Feather",
  345. head="Gorney Morion +1",
  346. body="Gorney Haubert +1",
  347. hands="Gorney Moufles +1",
  348. legs="Gor. Brayettes +1",
  349. feet="Gor. Sollerets +1",
  350. neck="Focus Collar",
  351. waist="Cetl Belt",
  352. left_ear="Mache Earring",
  353. left_ring="Cho'j Band",
  354. right_ring="Tyrant's Ring",
  355. }
  356.  
  357. sets.defense.Reraise = set_combine(sets.defense.PDT, {
  358. head="Twilight Helm",
  359. body="Twilight Mail"
  360. })
  361.  
  362. sets.defense.MDT = set_combine(sets.defense.PDT, {
  363. neck="Twilight Torque",
  364. back="Solemnity Cape",
  365. })
  366.  
  367. sets.Kiting = {feet="Danzo Sune-ate"}
  368.  
  369. sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
  370.  
  371. -- Engaged sets
  372.  
  373. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  374. -- sets if more refined versions aren't defined.
  375. -- If you create a set with both offense and defense modes, the offense mode should be first.
  376. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  377.  
  378. -- I generally use Anahera outside of Adoulin areas, so this set aims for 47 STP + 5 from Anahera (52 total)
  379. -- Note, this set assumes use of Cibitshavore (hence the arrow as ammo)
  380. sets.engaged = {
  381. ammo="Jukukik Feather",
  382. head="Gorney Morion +1",
  383. body="Gorney Haubert +1",
  384. hands="Gorney Moufles +1",
  385. legs="Gor. Brayettes +1",
  386. feet="Gor. Sollerets +1",
  387. neck="Focus Collar",
  388. waist="Cetl Belt",
  389. left_ear="Mache Earring",
  390. left_ring="Cho'j Band",
  391. right_ring="Tyrant's Ring",
  392. }
  393.  
  394. sets.engaged.Mid = set_combine(sets.engaged, {
  395. head="Acro Helm",
  396. body="Reiki Osode",
  397. hands="Ryuo Tekko",
  398. feet="Loyalist Sabatons"
  399. })
  400.  
  401. sets.engaged.Acc = set_combine(sets.engaged.Mid, {
  402. head="Valorous Mask",
  403. neck="Lissome Necklace",
  404. body="Reiki Osode",
  405. back="Grounded Mantle +1",
  406. ear1="Zennaroi Earring",
  407. ring1="Mars's Ring",
  408. legs="Acro Breeches",
  409. })
  410.  
  411. sets.engaged.Yoichi = set_combine(sets.engaged, {
  412. sub="Bloodrain Strap",
  413. ammo=gear.RAarrow
  414. })
  415.  
  416. sets.engaged.Yoichi.Mid = set_combine(sets.engaged.Yoichi, {
  417. head="Acro Helm",
  418. back="Takaha Mantle",
  419. neck="Lissome Necklace",
  420. hands=Acro.Hands.Haste
  421. })
  422.  
  423. sets.engaged.Yoichi.Acc = set_combine(sets.engaged.Yoichi.Mid, {
  424. head="Valorous Mask",
  425. neck="Lissome Necklace",
  426. ear1="Zennaroi Earring",
  427. ring1="Patricius Ring",
  428. ring2="Mars's Ring",
  429. legs="Acro Breeches",
  430. back="Grounded Mantle +1",
  431. feet=Acro.Feet.WSD
  432. })
  433.  
  434. sets.engaged.PDT = set_combine(sets.engaged, {
  435. head="Otronif Mask +1",
  436. body="Founder's Breastplate",
  437. neck="Agitator's Collar",
  438. hands="Crusher Gauntlets",
  439. ring1="Patricius Ring",
  440. back="Solemnity Cape",
  441. waist="Flume Belt",
  442. feet="Loyalist Sabatons"
  443. })
  444.  
  445. sets.engaged.Yoichi.PDT = set_combine(sets.engaged.PDT, {
  446. sub="Bloodrain Strap",
  447. ammo=gear.RAarrow
  448. })
  449.  
  450. sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {
  451. head="Lithelimb Cap",
  452. neck="Agitator's Collar",
  453. ring1="Patricius Ring",
  454. ring2="Defending Ring"
  455. })
  456.  
  457. sets.engaged.Reraise = set_combine(sets.engaged.PDT, {
  458. head="Twilight Helm",
  459. body="Twilight Mail",
  460. })
  461.  
  462. sets.engaged.Reraise.Yoichi = set_combine(sets.engaged.Reraise, {
  463. sub="Bloodrain Strap",
  464. ammo=gear.RAarrow
  465. })
  466.  
  467. sets.engaged.Acc.Reraise = set_combine(sets.engaged.Reraise, {
  468. hands="Miki. Gauntlets",
  469. ring1="Patricius Ring",
  470. feet="Wakido Sune-Ate +1",
  471. })
  472.  
  473. sets.engaged.Acc.Reraise.Yoichi = set_combine(sets.engaged.Acc.Reraise, {
  474. sub="Bloodrain Strap",
  475. ammo=gear.RAarrow
  476. })
  477.  
  478. -- Melee sets for in Adoulin, which has an extra 10 Save TP for weaponskills and 1% gear haste.
  479. -- Game flipped upside down. 31 STP needed to 4-hit?
  480.  
  481. -- This set aims for Tsurumaru 4-hit. 21% DA, 4% TA, 1% QA 27% haste
  482. -- Assumes use of Cibitshavore
  483. sets.engaged.Adoulin = {
  484. ammo="Jukukik Feather",
  485. head="Gorney Morion +1",
  486. body="Gorney Haubert +1",
  487. hands="Gorney Moufles +1",
  488. legs="Gor. Brayettes +1",
  489. feet="Gor. Sollerets +1",
  490. neck="Focus Collar",
  491. waist="Cetl Belt",
  492. left_ear="Mache Earring",
  493. left_ring="Cho'j Band",
  494. right_ring="Tyrant's Ring"
  495. }
  496. sets.engaged.Adoulin.Mid = set_combine(sets.engaged.Adoulin, { -- 840.5 accuracy
  497. head="Acro Helm",
  498. hands=Acro.Hands.Haste,
  499. })
  500.  
  501. sets.engaged.Adoulin.Acc = set_combine(sets.engaged.Adoulin.Mid, {
  502. head="Valorous Mask",
  503. neck="Defiant Collar",
  504. ring2="Mars's Ring",
  505. hands=Acro.Hands.Haste,
  506. waist="Olseni Belt",
  507. back="Grounded Mantle +1",
  508. legs="Acro Breeches",
  509. feet=Acro.Feet.STP
  510. })
  511.  
  512. sets.engaged.Adoulin.PDT = set_combine(sets.engaged.Adoulin, {
  513. head="Otronif Mask +1",
  514. neck="Agitator's Collar",
  515. body="Founder's Breastplate",
  516. hands="Otronif Gloves +1",
  517. ring1="Patricius Ring",
  518. ring2="Defending Ring",
  519. back="Solemnity Cape",
  520. legs="Otronif Brais +1",
  521. feet="Loyalist Sabatons"
  522. })
  523.  
  524. sets.engaged.Adoulin.Acc.PDT = set_combine(sets.engaged.Adoulin.Acc, {
  525. head="Lithelimb Cap",
  526. neck="Agitator's Collar",
  527. ring1="Patricius Ring",
  528. legs="Otronif Brais +1",
  529. back="Grounded Mantle +1",
  530. feet="Loyalist Sabatons"
  531. })
  532.  
  533. -- Tsurumaru 4-hit 19% DA, 28% haste
  534. sets.engaged.Adoulin.Yoichi = {
  535. --sub="Bloodrain Strap",
  536. ammo=gear.RAarrow,
  537. head="Otomi Helm",
  538. neck="Asperity Necklace", -- 3
  539. ear1="Cessance Earring", -- 1
  540. ear2="Tripudio Earring", -- 1
  541. body="Acro Surcoat", -- 8
  542. hands="Wakido Kote +1", -- 5
  543. ring1="Rajas Ring", -- 5
  544. ring2="K'ayres Ring", -- 5
  545. back="Takaha Mantle",
  546. waist="Windbuffet Belt +1",
  547. legs="Otronif Brais +1", -- 6
  548. feet="Otronif Boots +1" -- 7
  549. }
  550.  
  551. sets.engaged.Adoulin.Yoichi.Mid = set_combine(sets.engaged.Adoulin.Yoichi,
  552. {
  553. ammo=gear.RAarrow,
  554. body="Mes'yohi Haubergeon",
  555. head="Yaoyotl Helm",
  556. legs="Acro Breeches",
  557. boots="Ejekamal Boots"
  558. })
  559.  
  560. sets.engaged.Adoulin.Yoichi.Acc = set_combine(sets.engaged.Adoulin.Yoichi.Mid, {
  561. ammo=gear.RAarrow,
  562. head="Valorous Mask",
  563. ring1="Patricius Ring",
  564. ring2="Mars's Ring",
  565. back="Takaha Mantle",
  566. feet="Wakido Sune-Ate +1"
  567. })
  568.  
  569. sets.engaged.Adoulin.Yoichi.PDT = set_combine(sets.engaged.Adoulin.PDT, {
  570. sub="Bloodrain Strap",
  571. ammo=gear.RAarrow
  572. })
  573.  
  574. sets.engaged.Adoulin.Yoichi.Acc.PDT = set_combine(sets.engaged.Adoulin.Yoichi.Acc, {
  575. head="Lithelimb Cap",
  576. neck="Agitator's Collar",
  577. ring2="Defending Ring"
  578. })
  579.  
  580. sets.engaged.Adoulin.Reraise = set_combine(sets.engaged.Adoulin, {
  581. head="Twilight Helm",
  582. body="Twilight Mail",
  583. })
  584. sets.engaged.Adoulin.Yoichi.Reraise = set_combine(sets.engaged.Adoulin.Reraise, {
  585. ammo=gear.RAarrow
  586. })
  587. sets.engaged.Adoulin.Acc.Reraise = set_combine(sets.engaged.Adoulin.Acc, {
  588. head="Twilight Helm",
  589. body="Twilight Mail"
  590. })
  591. sets.engaged.Adoulin.Yoichi.Acc.Reraise = set_combine(sets.engaged.Adoulin.Acc.Reraise, {
  592. ammo=gear.RAarrow
  593. })
  594.  
  595. sets.engaged.Amanomurakumo = set_combine(sets.engaged, {
  596. })
  597. sets.engaged.Amanomurakumo.AM = set_combine(sets.engaged, {
  598. })
  599.  
  600. sets.engaged.Adoulin.Amanomurakumo = set_combine(sets.engaged.Adoulin, {
  601. })
  602. sets.engaged.Adoulin.Amanomurakumo.AM = set_combine(sets.engaged.Adoulin, {
  603. })
  604.  
  605. sets.engaged.Kogarasumaru = set_combine(sets.engaged, {
  606. })
  607. sets.engaged.Kogarasumaru.AM = set_combine(sets.engaged, {
  608. })
  609. sets.engaged.Kogarasumaru.AM3 = set_combine(sets.engaged, {
  610. })
  611.  
  612. sets.engaged.Adoulin.Kogarasumaru = set_combine(sets.engaged.Adoulin, {
  613. })
  614. sets.engaged.Adoulin.Kogarasumaru.AM = set_combine(sets.engaged.Adoulin, {
  615. })
  616. sets.engaged.Adoulin.Kogarasumaru.AM3 = set_combine(sets.engaged.Adoulin, {
  617. })
  618.  
  619. sets.buff.Sekkanoki = {hands="Unkai Kote +2"}
  620. sets.buff.Sengikori = {}
  621. sets.buff['Meikyo Shisui'] = {feet="Sakonji Sune-ate +1"}
  622.  
  623. sets.thirdeye = {head="Unkai Kabuto +1", legs="Sakonji Haidate"}
  624. sets.seigan = {hands="Otronif Gloves +1"}
  625. sets.bow = {ammo=gear.RAarrow}
  626. end
  627.  
  628.  
  629. -------------------------------------------------------------------------------------------------------------------
  630. -- Job-specific hooks that are called to process player actions at specific points in time.
  631. -------------------------------------------------------------------------------------------------------------------
  632.  
  633. -- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
  634. function job_pretarget(spell, action, spellMap, eventArgs)
  635. if spell.type:lower() == 'weaponskill' then
  636. -- Change any GK weaponskills to polearm weaponskill if we're using a polearm.
  637. if player.equipment.main =='Nativus Halberd' or player.equipment.main =='Quint Spear' then
  638. if spell.english:startswith("Tachi:") then
  639. send_command('@input /ws "Stardiver" '..spell.target.raw)
  640. eventArgs.cancel = true
  641. end
  642. end
  643. end
  644. if state.Buff[spell.english] ~= nil then
  645. state.Buff[spell.english] = true
  646. end
  647. end
  648.  
  649. function job_precast(spell, action, spellMap, eventArgs)
  650. --if spell.english == 'Third Eye' and not buffactive.Seigan then
  651. -- cancel_spell()
  652. -- send_command('@wait 0.5;input /ja Seigan <me>')
  653. -- send_command('@wait 1;input /ja "Third Eye" <me>')
  654. --end
  655. end
  656. -- Run after the default precast() is done.
  657. -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
  658. function job_post_precast(spell, action, spellMap, eventArgs)
  659. if spell.type:lower() == 'weaponskill' then
  660. if state.Buff.Sekkanoki then
  661. equip(sets.buff.Sekkanoki)
  662. end
  663. if state.CapacityMode.value then
  664. equip(sets.CapacityMantle)
  665. end
  666. if LugraWSList:contains(spell.english) then
  667. if world.time >= (17*60) or world.time <= (7*60) then
  668. if spell.english:lower() == 'namas arrow' then
  669. equip(sets.LugraFlame)
  670. else
  671. equip(sets.LugraMoonshade)
  672. end
  673. else
  674. if spell.english:lower() == 'namas arrow' then
  675. equip(sets.FlameFlame)
  676. else
  677. equip(sets.BrutalMoonshade)
  678. end
  679. end
  680. end
  681. if state.Buff['Meikyo Shisui'] then
  682. equip(sets.buff['Meikyo Shisui'])
  683. end
  684. end
  685. if spell.english == "Seigan" then
  686. -- Third Eye gearset is only called if we're in PDT mode
  687. if state.HybridMode.value == 'PDT' or state.PhysicalDefenseMode.value == 'PDT' then
  688. equip(sets.thirdeye)
  689. else
  690. equip(sets.seigan)
  691. end
  692. end
  693. if spell.name == 'Spectral Jig' and buffactive.sneak then
  694. -- If sneak is active when using, cancel before completion
  695. send_command('cancel 71')
  696. end
  697. update_am_type(spell)
  698. end
  699.  
  700.  
  701. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  702. function job_midcast(spell, action, spellMap, eventArgs)
  703. if spell.action_type == 'Magic' then
  704. equip(sets.midcast.FastRecast)
  705. end
  706. end
  707.  
  708. -- Run after the default midcast() is done.
  709. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  710. function job_post_midcast(spell, action, spellMap, eventArgs)
  711. -- Effectively lock these items in place.
  712. if state.HybridMode.value == 'Reraise' or
  713. (state.HybridMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
  714. equip(sets.Reraise)
  715. end
  716. if state.Buff['Seigan'] then
  717. if state.DefenseMode.value == 'PDT' then
  718. equip(sets.thirdeye)
  719. else
  720. equip(sets.seigan)
  721. end
  722. end
  723. end
  724.  
  725. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  726. function job_aftercast(spell, action, spellMap, eventArgs)
  727. if state.Buff[spell.english] ~= nil then
  728. state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
  729. end
  730. end
  731.  
  732. -- Modify the default idle set after it was constructed.
  733. function customize_idle_set(idleSet)
  734. if player.hpp < 90 then
  735. idleSet = set_combine(idleSet, sets.idle.Regen)
  736. end
  737. return idleSet
  738. end
  739.  
  740. -- Modify the default melee set after it was constructed.
  741. function customize_melee_set(meleeSet)
  742. if state.Buff['Seigan'] then
  743. if state.DefenseMode.value == 'PDT' then
  744. meleeSet = set_combine(meleeSet, sets.thirdeye)
  745. else
  746. meleeSet = set_combine(meleeSet, sets.seigan)
  747. end
  748. end
  749. if state.CapacityMode.value then
  750. meleeSet = set_combine(meleeSet, sets.CapacityMantle)
  751. end
  752. if player.equipment.range == 'Yoichinoyumi' then
  753. meleeSet = set_combine(meleeSet, sets.bow)
  754. end
  755. return meleeSet
  756. end
  757.  
  758. -------------------------------------------------------------------------------------------------------------------
  759. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  760. -------------------------------------------------------------------------------------------------------------------
  761.  
  762. -------------------------------------------------------------------------------------------------------------------
  763. -- General hooks for other events.
  764. -------------------------------------------------------------------------------------------------------------------
  765. function job_status_change(newStatus, oldStatus, eventArgs)
  766. if newStatus == 'Engaged' then
  767. if player.inventory['Eminent Arrow'] then
  768. gear.RAarrow.name = 'Eminent Arrow'
  769. elseif player.inventory['Tulfaire Arrow'] then
  770. gear.RAarrow.name = 'Tulfaire Arrow'
  771. elseif player.equipment.ammo == 'empty' then
  772. add_to_chat(122, 'No more Arrows!')
  773. end
  774. elseif newStatus == 'Idle' then
  775. determine_idle_group()
  776. end
  777. end
  778. -- Called when a player gains or loses a buff.
  779. -- buff == buff gained or lost
  780. -- gain == true if the buff was gained, false if it was lost.
  781. function job_buff_change(buff, gain)
  782. if state.Buff[buff] ~= nil then
  783. state.Buff[buff] = gain
  784. handle_equipping_gear(player.status)
  785. end
  786.  
  787. if S{'aftermath'}:contains(buff:lower()) then
  788. classes.CustomMeleeGroups:clear()
  789.  
  790. if player.equipment.main == 'Amanomurakumo' and state.YoichiAM.value then
  791. classes.CustomMeleeGroups:clear()
  792. elseif player.equipment.main == 'Kogarasumaru' then
  793. if buff == "Aftermath: Lv.3" and gain or buffactive['Aftermath: Lv.3'] then
  794. classes.CustomMeleeGroups:append('AM3')
  795. end
  796. elseif buff == "Aftermath" and gain or buffactive.Aftermath then
  797. classes.CustomMeleeGroups:append('AM')
  798. end
  799. end
  800.  
  801. if not midaction() then
  802. handle_equipping_gear(player.status)
  803. end
  804.  
  805. end
  806.  
  807. -------------------------------------------------------------------------------------------------------------------
  808. -- User code that supplements self-commands.
  809. -------------------------------------------------------------------------------------------------------------------
  810.  
  811. -- Called by the 'update' self-command, for common needs.
  812. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  813. function job_update(cmdParams, eventArgs)
  814. get_combat_form()
  815. update_melee_groups()
  816. --get_combat_weapon()
  817. end
  818.  
  819. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  820. function display_current_job_state(eventArgs)
  821.  
  822. end
  823.  
  824. -------------------------------------------------------------------------------------------------------------------
  825. -- Utility functions specific to this job.
  826. -------------------------------------------------------------------------------------------------------------------
  827. --function get_combat_weapon()
  828. -- if player.equipment.range == 'Yoichinoyumi' then
  829. -- if player.equipment.main == 'Amanomurakumo' then
  830. -- state.CombatWeapon:set('AmanoYoichi')
  831. -- else
  832. -- state.CombatWeapon:set('Yoichi')
  833. -- end
  834. -- else
  835. -- state.CombatWeapon:set(player.equipment.main)
  836. -- end
  837. --end
  838. -- Handle zone specific rules
  839. windower.register_event('Zone change', function(new,old)
  840. determine_idle_group()
  841. end)
  842.  
  843. function determine_idle_group()
  844. classes.CustomIdleGroups:clear()
  845. if areas.Adoulin:contains(world.area) then
  846. classes.CustomIdleGroups:append('Adoulin')
  847. end
  848. end
  849.  
  850. function get_combat_form()
  851. if areas.Adoulin:contains(world.area) and buffactive.ionis then
  852. state.CombatForm:set('Adoulin')
  853. else
  854. state.CombatForm:reset()
  855. end
  856. end
  857.  
  858. function seigan_thirdeye_active()
  859. return state.Buff['Seigan'] or state.Buff['Third Eye']
  860. end
  861.  
  862. function update_melee_groups()
  863. classes.CustomMeleeGroups:clear()
  864.  
  865. if player.equipment.main == 'Amanomurakumo' and state.YoichiAM.value then
  866. -- prevents using Amano AM while overriding it with Yoichi AM
  867. classes.CustomMeleeGroups:clear()
  868. elseif player.equipment.main == 'Kogarasumaru' then
  869. if buffactive['Aftermath: Lv.3'] then
  870. classes.CustomMeleeGroups:append('AM3')
  871. end
  872. else
  873. if buffactive['Aftermath'] then
  874. classes.CustomMeleeGroups:append('AM')
  875. end
  876. end
  877. end
  878. -- call this in job_post_precast()
  879. function update_am_type(spell)
  880. if spell.type == 'WeaponSkill' and spell.skill == 'Archery' and spell.english == 'Namas Arrow' then
  881. if player.equipment.main == 'Amanomurakumo' then
  882. -- Yoichi AM overwrites Amano AM
  883. state.YoichiAM:set(true)
  884. end
  885. else
  886. state.YoichiAM:set(false)
  887. end
  888. end
  889. -- Select default macro book on initial load or subjob change.
  890. function select_default_macro_book()
  891. -- Default macro set/book
  892. if player.sub_job == 'WAR' then
  893. set_macro_page(1, 1)
  894. elseif player.sub_job == 'DNC' then
  895. set_macro_page(1, 2)
  896. else
  897. set_macro_page(1, 1)
  898. end
  899. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement