Spicyryan

DRG.lua 12th July, 2020

Mar 21st, 2017
5,030
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Built off of my BLU and RUN GSs.
  2. ---Thanks to various sources such as LS members and BlueGartr for the help building this GearSwap.
  3.  
  4. -------------------------------------
  5. --------- ---------
  6. ------ ------
  7. --- Start of Gear ---
  8. ------ ------
  9. --------- ---------
  10. -------------------------------------
  11.  
  12. ---------------------------------
  13. -- Start of Augmented Gear --
  14. ---------------------------------
  15.  
  16. function get_sets()
  17. maps()
  18.  
  19. CarmineMask = {}
  20. CarmineMask.MND = { name = "Carmine Mask +1", augments = { 'Accuracy+12','DEX+12','MND+20', } }
  21. CarmineMask.FC = { name = "Carmine Mask +1", augments = { 'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4', } }
  22.  
  23. ValorousMask = {}
  24. ValorousMask.SCD = { name="Valorous Mask", augments={'Attack+20','Sklchn.dmg.+4%','STR+15','Accuracy+9',}}
  25. ValorousMask.WSD = { name="Valorous Mask", augments={'Attack+23','Weapon skill damage +4%','STR+10','Accuracy+7',}}
  26. ValorousMask.DA = { name="Valorous Mask", augments={'Mag. Acc.+11','"Dbl.Attack."+4','STR+15','Accuracy+5',}}
  27.  
  28. ValorousMitts = {}
  29. ValorousMitts.SCDAcc = { name="Valorous Mitts", augments={'Accuracy+20','Sklchn.dmg.+4%','STR+13',}}
  30. ValorousMitts.WSD = { name="Valorous Mitts", augments={'Weapon skill damage +3%','STR+8','Attack+14',}}
  31.  
  32. AcroGauntlets = {}
  33. AcroGauntlets.STP = { name="Acro Gauntlets", augments={'Accuracy+20 Attack+20','"Store TP"+6','STR+6 DEX+6',}}
  34. AcroGauntlets.Breath = { name="Acro Gauntlets", augments={'Pet: Breath+7',}}
  35.  
  36. TaeonBody = {}
  37. TaeonBody.FC = { name="Taeon Tabard", augments={'Accuracy+23','"Fast Cast"+5','HP+36',} }
  38. TaeonBody.SIR = { name="Taeon Tabard", augments = {'Spell interruption rate down -8%','STR+7 VIT+7'} }
  39.  
  40. ValorousBody = {}
  41. ValorousBody.STP = { name="Valorous Mail", augments={'"Store TP"+7','DEX+8','Accuracy+15',}}
  42. ValorousBody.WSD = { name="Valorous Mail", augments={'STR+7','Pet: DEX+7','Weapon skill damage +6%','Mag. Acc.+11 "Mag.Atk.Bns."+11',}}
  43. ValorousBody.STRDA = { name="Valorous Mail", augments={'Accuracy+23 Attack+23','"Dbl.Attack."+4','STR+10','Attack+8',}}
  44. ValorousBody.DA = { name="Valorous Mail", augments={'Accuracy+22','"Dbl.Attack."+5','STR+5','Attack+12',}}
  45.  
  46. ValorousHose = {}
  47. ValorousHose.STP = { name="Valor. Hose", augments={'Accuracy+21','"Store TP"+8','VIT+6','Attack+15',}}
  48. ValorousHose.WSD = { name="Valor. Hose", augments={'Weapon skill damage +5%','STR+8','Accuracy+2','Attack+13',}}
  49. ValorousHose.SCD = { name="Valor. Hose", augments={'Attack+22','Sklchn.dmg.+3%','STR+9','Accuracy+12',}}
  50.  
  51. ValorousFeet = {}
  52.  
  53. LustFeet = {}
  54. LustFeet.STRDA = { name="Lustra. Leggings +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}}
  55.  
  56. Brig = {}
  57. Brig.STP = { name="Brigantia's Mantle", augments = { 'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Pet: "Regen"+5', } }
  58. Brig.DATP = { name="Brigantia's Mantle", augments = { 'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%', } }
  59. Brig.STRDA = { name="Brigantia's Mantle", augments = { 'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10', } }
  60. Brig.WSD = { name = "Brigantia's Mantle", augments = { 'STR+20', 'Accuracy+20 Attack+20', 'Weapon skill damage +10%', } }
  61. Brig.FCMeva = { name = "Brigantia's Mantle", augments = { 'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10', } }
  62.  
  63. -------------------------------
  64. -- End of Augmented Gear --
  65. -------------------------------
  66.  
  67. sets.Idle = {}
  68. --Idle Sets--
  69. sets.Idle.index = { 'Standard', 'DT' }
  70. Idle_ind = 1
  71. sets.Idle.Standard = {
  72. ammo = "Staunch Tathlum +1",
  73. head = ValorousMask.SCD,
  74. neck = "Loricate Torque +1",
  75. ear1 = "Etiolation Earring",
  76. ear2 = "Anastasi Earring",
  77. body = "Vishap Mail +3",
  78. hands = "Sulevia's Gauntlets +2",
  79. ring1 = "Sheltered ring",
  80. ring2 = "Karieyh Ring +1",
  81. back = Brig.STP,
  82. waist = "Flume Belt",
  83. legs = "Carmine Cuisses +1",
  84. feet = "Ptero. Greaves +3"
  85. }
  86.  
  87. sets.Idle.DT = {
  88. ammo = "Staunch Tathlum +1",
  89. head = ValorousMask.SCD,
  90. neck = "Loricate Torque +1",
  91. ear1 = "Etiolation Earring",
  92. ear2 = "Anastasi Earring",
  93. body = "Hjarrandi Breastplate",
  94. hands = "Sulevia's Gauntlets +2",
  95. ring1 = "Sheltered ring",
  96. ring2 = "Defending Ring",
  97. back = Brig.DATP,
  98. waist = "Flume Belt",
  99. legs = "Carmine Cuisses +1",
  100. feet = "Ptero. Greaves +3"
  101. }
  102.  
  103. --Dat Waifu--
  104. sets.Idle.Town = set_combine(sets.Idle.Standard, {
  105. ring1 = "Matrimony ring",
  106. })
  107.  
  108. --Idle Refresh--
  109. sets.Idle.Refresh = {
  110. head = "Jumalik Helm",
  111. body = "Chozoron Coselete"
  112. }
  113.  
  114. --Best in slot items depend on Acc and if you have SAMs roll or not.
  115. --Unless the extra accuracy from something like the Shulmanu Collar comes into play.
  116.  
  117. -----------
  118. --TP Sets--
  119. -----------
  120. sets.TP = {}
  121. sets.TP.index = {'CapHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  122. TP_ind = 1
  123.  
  124. sets.TP.CapHaste = {
  125. ammo = "Aurgelmir Orb +1",
  126. head = "Flamma Zucchetto +2",
  127. neck = "Anu Torque",
  128. ear1 = "Telos Earring",
  129. ear2 = "Sherida Earring",
  130. body = "Hjarrandi Breastplate",
  131. --hands = "Flamma Manopolas +2",
  132. hands = AcroGauntlets.STP,
  133. ring1 = "Niqmaddu Ring",
  134. ring2 = "Petrov Ring",
  135. back = Brig.DATP,
  136. waist = "Ioskeha Belt +1",
  137. legs = ValorousHose.STP,
  138. feet = "Flamma Gambieras +2"
  139. }
  140.  
  141. sets.TP.AccuracyLite = {
  142. ammo = "Aurgelmir Orb +1",
  143. head = "Flamma Zucchetto +2",
  144. neck = "Combatant's Torque",
  145. ear1 = "Telos Earring",
  146. ear2 = "Sherida Earring",
  147. body ="Hjarrandi Breastplate",
  148. --hands = "Flamma Manopolas +2",
  149. hands = AcroGauntlets.STP,
  150. ring1 = "Niqmaddu Ring",
  151. ring2 = "Flamma Ring",
  152. back = Brig.DATP,
  153. waist = "Ioskeha Belt +1",
  154. legs = ValorousHose.STP,
  155. feet = "Flamma Gambieras +2"
  156. }
  157.  
  158. sets.TP.AccuracyMid = {
  159. ammo = "Aurgelmir Orb +1",
  160. head = "Flamma Zucchetto +2",
  161. neck = "Combatant's Torque",
  162. ear1 = "Telos Earring",
  163. ear2 = "Sherida Earring",
  164. body ="Hjarrandi Breastplate",
  165. hands = "Flamma Manopolas +2",
  166. ring1 = "Niqmaddu Ring",
  167. ring2 = "Flamma Ring",
  168. back = Brig.DATP,
  169. waist = "Ioskeha Belt +1",
  170. legs = "Pteroslaver Brais +3",
  171. feet = "Flamma Gambieras +2"
  172. }
  173.  
  174. sets.TP.AccuracyFull = {
  175. ammo = "Voluspa Tathlum",
  176. head = "Flamma Zucchetto +2",
  177. neck = "Shulmanu Collar",
  178. ear1 = "Telos Earring",
  179. ear2 = "Sherida Earring",
  180. body = "Vishap Mail +3",
  181. hands = "Emicho Gauntlets +1",
  182. ring1 = "Niqmaddu Ring",
  183. ring2 = "Flamma Ring",
  184. back = Brig.STP,
  185. waist = "Ioskeha Belt +1",
  186. legs = "Pteroslaver Brais +3",
  187. feet = "Flamma Gambieras +2"
  188. }
  189.  
  190. --SAM Roll--
  191. --Changes gearsets while Samurai Roll is on
  192.  
  193. sets.SAMRoll = {}
  194. sets.SAMRoll.index = { 'CapHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  195. SAMRoll_ind = 1 -- In the same rule as the TP Toggle so it toggles it at the same time
  196.  
  197. sets.SAMRoll.CapHaste = set_combine(sets.TP.CapHaste, {
  198. neck = "Ganesha's Mala",
  199. ear1 = "Brutal Earring",
  200. --body = "Dagon Breastplate",
  201. hands = "Sulevia's Gauntlets +2",
  202. back = Brig.DATP,
  203. })
  204.  
  205. sets.SAMRoll.AccuracyLite = set_combine(sets.TP.AccuracyLite, {
  206. --body = "Dagon Breastplate",
  207. hands = "Sulevia's Gauntlets +2",
  208. back = Brig.DATP,
  209. })
  210.  
  211. sets.SAMRoll.AccuracyMid = set_combine(sets.TP.AccuracyMid, {
  212. neck = "Shulmanu Collar",
  213. --body = "Dagon Breastplate",
  214. hands = "Sulevia's Gauntlets +2",
  215. back = Brig.DATP,
  216. })
  217.  
  218. sets.SAMRoll.AccuracyFull = set_combine(sets.TP.AccuracyFull, {
  219. neck = "Shulmanu Collar",
  220. hands = "Sulevia's Gauntlets +2",
  221. back = Brig.DATP,
  222. })
  223.  
  224. --DT Sets--
  225. sets.DT = {}
  226. sets.DT.index = { 'DT', 'DTHybrid', 'MDTV', 'MEVA', 'DTPet', 'DTAcc' }
  227. DT_ind = 1
  228.  
  229. sets.DT.DT = {
  230. ammo = "Aurgelmir Orb +1",
  231. head = "Hjarrandi Helm",
  232. neck = "Anu Torque",
  233. ear1 = "Telos Earring",
  234. ear2 = "Sherida Earring",
  235. body = "Hjarrandi Breastplate",
  236. hands ="Sulevia's Gauntlets +2",
  237. ring1 = "Defending Ring",
  238. ring2 = "Niqmaddu Ring",
  239. back = Brig.DATP,
  240. waist = "Ioskeha Belt +1",
  241. legs = ValorousHose.STP,
  242. feet = "Flamma Gambieras +2"
  243. }
  244.  
  245. sets.DT.DTHybrid = {
  246. ammo = "Aurgelmir Orb +1",
  247. head = "Hjarrandi Helm",
  248. neck = "Anu Torque",
  249. ear1 = "Telos Earring",
  250. ear2 = "Sherida Earring",
  251. body = "Hjarrandi Breastplate",
  252. hands =AcroGauntlets.STP,
  253. ring1 = "Defending Ring",
  254. ring2 = "Niqmaddu Ring",
  255. back = Brig.DATP,
  256. waist = "Ioskeha Belt +1",
  257. legs = ValorousHose.STP,
  258. feet = "Flamma Gambieras +2"
  259. }
  260. --Shell V on. Need 21% MDT, 19% with sheltered.
  261. sets.DT.MDTV = {
  262. ammo = "Staunch Tathlum +1",
  263. head = "Flamma Zucchetto +2",
  264. neck = "Warder's Charm +1",
  265. ear1 = "Eabani Earring",
  266. ear2 = "Sherida Earring",
  267. body = ValorousBody.STP,
  268. hands = "Sulevia's Gauntlets +2",
  269. ring1 = "Defending Ring",
  270. ring2 = "Shadow Ring",
  271. back = Brig.FCMeva,
  272. waist = "Ioskeha Belt +1",
  273. legs = "Sulevia's Cuisses +2",
  274. feet = "Flamma Gambieras +2"
  275. }
  276.  
  277. sets.DT.MEVA = {
  278. ammo = "Staunch Tathlum +1",
  279. head = "Flamma Zucchetto +2",
  280. neck = "Warder's Charm +1",
  281. ear1 = "Eabani Earring",
  282. ear2 = "Odnowa Earring +1",
  283. body = "Chozoron Coselete",
  284. hands = "Leyline Gloves",
  285. ring1 = "Defending Ring",
  286. ring2 = "Purity Ring",
  287. back = Brig.FCMeva,
  288. waist = "Carrier's Sash",
  289. legs = "Vishap Brais +3",
  290. feet = "Flamma Gambieras +2"
  291. }
  292.  
  293. sets.DT.DTPet = {
  294. ammo = "Staunch Tathlum +1",
  295. head = "Peltast's Mezail +1",
  296. neck = "Loricate Torque +1",
  297. ear1 = "Genmei Earring",
  298. ear2 = "Enmerkar Earring",
  299. body = "Hjarrandi Breastplate",
  300. hands = "Sulevia's Gauntlets +2",
  301. ring1 = "Defending Ring",
  302. ring2 = "Gelatinous Ring +1",
  303. back = "Updraft Mantle",
  304. waist = "Ioskeha Belt +1",
  305. legs = "Sulevia's Cuisses +2",
  306. feet = "Flamma Gambieras +2"
  307. }
  308.  
  309. sets.DT.DTAcc = {
  310. ammo = "Staunch Tathlum +1",
  311. head = "Flamma Zucchetto +2",
  312. neck = "Loricate Torque +1",
  313. ear1 = "Telos Earring",
  314. ear2 = "Sherida Earring",
  315. body = "Vishap Mail +3",
  316. hands = "Sulevia's Gauntlets +2",
  317. ring1 = "Defending Ring",
  318. ring2 = "Niqmaddu Ring",
  319. back = Brig.DATP,
  320. waist = "Ioskeha Belt +1",
  321. legs = "Sulevia's Cuisses +2",
  322. feet = "Flamma Gambieras +2"
  323. }
  324.  
  325. sets.WS = {}
  326.  
  327. sets.Stardiver = {}
  328.  
  329. sets.Stardiver.index = { 'AttackUncap', 'AttackCap', 'Accuracy' }
  330. Stardiver_ind = 1
  331.  
  332. --1118 Acc, Lowest TP set is 1161, be careful--
  333. sets.Stardiver.AttackUncap = {
  334. ammo = "Knobkierrie",
  335. head = "Pteroslaver Armet +3",
  336. neck = "Fotia Gorget",
  337. ear1 = "Moonshade Earring",
  338. ear2 = "Sherida Earring",
  339. body = "Dagon Breastplate",
  340. hands = "Sulevia's Gauntlets +2",
  341. ring1 = "Regal Ring",
  342. ring2 = "Niqmaddu Ring",
  343. back = Brig.STRDA,
  344. waist = "Fotia Belt",
  345. legs = "Sulevia's Cuisses +2",
  346. feet = LustFeet.STRDA
  347. }
  348.  
  349. sets.Stardiver.AttackCap = {
  350. ammo = "Aurgelmir Orb +1",
  351. head = "Flamma Zucchetto +2",
  352. neck = "Dragoon's Collar +2",
  353. ear1 = "Moonshade Earring",
  354. ear2 = "Sherida Earring",
  355. body = "Dagon Breastplate",
  356. hands = "Sulevia's Gauntlets +2",
  357. ring1 = "Regal Ring",
  358. ring2 = "Niqmaddu Ring",
  359. back = Brig.STRDA,
  360. waist = "Fotia Belt",
  361. legs = "Sulevia's Cuisses +2",
  362. feet = "Flamma Gambieras +2"
  363. }
  364.  
  365. sets.Stardiver.Accuracy = {
  366. ammo = "Voluspa Tathlum",
  367. head = "Pteroslaver Armet +3",
  368. neck = "Fotia Gorget",
  369. ear1 = "Moonshade Earring",
  370. ear2 = "Sherida Earring",
  371. body = "Dagon Breastplate",
  372. hands = "Sulevia's Gauntlets +2",
  373. ring1 = "Regal Ring",
  374. ring2 = "Niqmaddu Ring",
  375. back = Brig.STRDA,
  376. waist = "Fotia Belt",
  377. legs = "Vishap Brais +3",
  378. feet = "Vishap Greaves +3"
  379. }
  380.  
  381. sets.Drakesbane = {}
  382.  
  383. sets.Drakesbane.index = { 'Attack', 'MidAcc', 'HighAcc' }
  384. Drakesbane_ind = 1
  385.  
  386. sets.Drakesbane.Attack = {
  387. ammo = "Knobkierrie",
  388. head = "Pteroslaver Armet +3",
  389. neck = "Dragoon's Collar +2",
  390. ear1 = "Brutal Earring",
  391. ear2 = "Sherida Earring",
  392. body = "Hjarrandi Breastplate",
  393. hands = "Flamma Manopolas +2",
  394. ring1 = "Niqmaddu Ring",
  395. ring2 = "Begrudging Ring",
  396. back = Brig.STRDA,
  397. waist = "Windbuffet Belt +1",
  398. legs = "Peltast's Cuissots +1",
  399. feet = LustFeet.STRDA
  400. }
  401.  
  402. sets.Drakesbane.MidAcc = {
  403. ammo = "Knobkierrie",
  404. head = "Flamma Zucchetto +2",
  405. neck = "Dragoon's Collar +2",
  406. ear1 = "Brutal Earring",
  407. ear2 = "Sherida Earring",
  408. body = "Hjarrandi Breastplate",
  409. hands = "Flamma Manopolas +2",
  410. ring1 = "Niqmaddu Ring",
  411. ring2 = "Begrudging Ring",
  412. back = Brig.STRDA,
  413. waist = "Ioskeha Belt +1",
  414. legs = "Peltast's Cuissots +1",
  415. feet = "Flamma Gambieras +2"
  416. }
  417.  
  418. sets.Drakesbane.HighAcc = {
  419. ammo = "Knobkierrie",
  420. head = "Flamma Zucchetto +2",
  421. neck = "Dragoon's Collar +2",
  422. ear1 = "Brutal Earring",
  423. ear2 = "Sherida Earring",
  424. body = "Hjarrandi Breastplate",
  425. hands = "Flamma Manopolas +2",
  426. ring1 = "Niqmaddu Ring",
  427. ring2 = "Regal Ring",
  428. back = Brig.STRDA,
  429. waist = "Ioskeha Belt +1",
  430. legs = "Vishap Brais +3",
  431. feet = "Vishap Greaves +3"
  432. }
  433.  
  434. sets.CamlannsTorment = {}
  435.  
  436. sets.CamlannsTorment.index = { 'Attack', 'Accuracy' }
  437. CamlannsTorment_ind = 1
  438.  
  439. sets.CamlannsTorment.Attack = {
  440. ammo = "Knobkierrie",
  441. head = ValorousMask.WSD,
  442. neck = "Fotia Gorget",
  443. ear1 = "Ishvara Earring",
  444. ear2 = "Thrud Earring",
  445. body = ValorousBody.WSD,
  446. hands = "Pteroslaver Finger Gauntlets +3",
  447. ring1 = "Niqmaddu Ring",
  448. ring2 = "Karieyh Ring +1",
  449. back = Brig.WSD,
  450. waist = "Fotia Belt",
  451. legs = "Vishap Brais +3",
  452. feet = "Sulevia's Leggings +2"
  453. }
  454.  
  455. sets.CamlannsTorment.Accuracy = {
  456. ammo = "Knobkierrie",
  457. head = ValorousMask.WSD,
  458. neck = "Fotia Gorget",
  459. ear1 = "Thrud Earring",
  460. ear2 = "Sherida Earring",
  461. body = ValorousBody.WSD,
  462. hands = "Pteroslaver Finger Gauntlets +3",
  463. ring1 = "Niqmaddu Ring",
  464. ring2 = "Karieyh Ring +1",
  465. back = Brig.WSD,
  466. waist = "Fotia Belt",
  467. legs = "Vishap Brais +3",
  468. feet = "Sulevia's Leggings +2"
  469. }
  470.  
  471. sets.SonicThrust = {}
  472.  
  473. sets.SonicThrust.index = { 'Attack', 'Accuracy' }
  474. SonicThrust_ind = 1
  475. sets.SonicThrust.Attack = {
  476. ammo = "Knobkierrie",
  477. head = ValorousMask.WSD,
  478. neck = "Fotia Gorget",
  479. ear1 = "Moonshade Earring",
  480. ear2 = "Thrud Earring",
  481. body = ValorousBody.WSD,
  482. hands = "Pteroslaver Finger Gauntlets +3",
  483. ring1 = "Niqmaddu Ring",
  484. ring2 = "Regal Ring",
  485. back = Brig.WSD,
  486. waist = "Fotia Belt",
  487. legs = "Vishap Brais +3",
  488. feet = "Sulevia's Leggings +2"
  489. }
  490.  
  491. sets.SonicThrust.Accuracy = {
  492. ammo = "Knobkierrie",
  493. head = ValorousMask.WSD,
  494. neck = "Fotia Gorget",
  495. ear1 = "Moonshade Earring",
  496. ear2 = "Thrud Earring",
  497. body = "Sulevia's Platemail +2",
  498. hands = "Pteroslaver Finger Gauntlets +3",
  499. ring1 = "Niqmaddu Ring",
  500. ring2 = "Regal Ring",
  501. back = Brig.WSD,
  502. waist = "Fotia Belt",
  503. legs = "Vishap Brais +3",
  504. feet = "Sulevia's Leggings +2"
  505. }
  506.  
  507. sets.LegSweep = {
  508. ammo = "Pemphredo Tathlum",
  509. head = "Flamma Zucchetto +2",
  510. neck = "Fotia Gorget",
  511. ear1 = "Moonshade Earring",
  512. ear2 = "Dignitary's Earring",
  513. body = "Vishap Mail +3",
  514. hands = "Flamma Manopolas +2",
  515. ring1 = "Regal Ring",
  516. ring2 = "Flamma Ring",
  517. back = Brig.STRDA,
  518. waist = "Fotia Belt",
  519. legs = "Pteroslaver Brais +3",
  520. feet = "Flamma Gambieras +2"
  521. }
  522.  
  523. --SC DMG Sets-- 34%
  524. sets.SCDmg = {
  525. head = ValorousMask.SCD,
  526. body = "Sulevia's Platemail +2",
  527. hands = ValorousMitts.SCDAcc,
  528. ring2 = "Mujin Band",
  529. legs = ValorousHose.SCD,
  530. feet = "Emicho Gambieras +1"
  531. }
  532.  
  533. --When Allies is on, assumes 20% is being given, caps 50%--
  534. sets.SCDmgAllies = {
  535. body = "Sulevia's Platemail +2",
  536. hands = ValorousMitts.SCDAcc,
  537. ring2 = "Mujin Band",
  538. legs = ValorousHose.SCD,
  539. feet = "Emicho Gambieras +1"
  540. }
  541.  
  542. -------------------------
  543. -- Blue Magic Sets --
  544. -------------------------
  545. sets.BlueMagic = {}
  546.  
  547. sets.BlueMagic.STR = {
  548. ammo = "Aurgelmir Orb +1",
  549. head = ValorousMask.SCD,
  550. neck = "Dragoon's Collar +2",
  551. ear1 = "Telos Earring",
  552. ear2 = "Sherida Earring",
  553. body = "Sulevia's Platemail +2",
  554. hands = "Sulevia's Gauntlets +2",
  555. ring1 = "Shukuyu Ring",
  556. ring2 = "Regal Ring",
  557. back = Brig.STRDA,
  558. waist = "Sailfi Belt +1",
  559. legs = "Sulevia's Cuisses +2",
  560. feet = "Sulevia's Leggings +2"
  561. }
  562.  
  563. --------------------------
  564. -- Curing Magic Set --
  565. --------------------------
  566.  
  567. sets.Cures = {
  568. ammo = "",
  569. head = "",
  570. neck = "",
  571. ear1 = "",
  572. ear2 = "",
  573. body = "",
  574. hands = "",
  575. ring1 = "",
  576. ring2 = "",
  577. back = "",
  578. waist = "",
  579. legs = "",
  580. feet = ""
  581. }
  582. ----------------------
  583. -- Utility Sets --
  584. -----------------------
  585. -- Sets for one thing or another.
  586. -- Macro in game with:
  587.  
  588. -- /console gs equip sets.butts.andfronts
  589. -- /console gs c lockgearindex
  590.  
  591. sets.Utility = {}
  592.  
  593. sets.Utility.Steps = set_combine(sets.TP.AccuracyFull, {})
  594.  
  595. sets.Utility.Twilight = {
  596. head = "Twilight Helm",
  597. body = "Twilight Mail"
  598. }
  599.  
  600. sets.Utility.Doom = {
  601. ring1 = "Purity Ring",
  602. ring2 = "Saida Ring",
  603. waist = "Gishdubar Sash"
  604. }
  605.  
  606. sets.WSDayBonus = (set_combine(equipSet,{head="Gavialis Helm"}))
  607.  
  608. sets.Utility.TH = {
  609. waist = "Chaac Belt"
  610. }
  611.  
  612. sets.Utility.DomainInvasionTP = {
  613. body = "Hervor Haubert",
  614. hands = "Hervor Mouffles"
  615. }
  616.  
  617. sets.Utility.DomainInvasionWS = {
  618. body = "Hervor Haubert",
  619. hands = "Hervor Mouffles",
  620. feet = "Hervor Sollerets"
  621. }
  622.  
  623. sets.Utility.DerpDT = {
  624. ammo = "Staunch Tathlum +1",
  625. head = "Hjarrandi Helm",
  626. neck = "Dragoon's Collar +2",
  627. ear1 = "Etiolation Earring",
  628. ear2 = "Odnowa Earring +1",
  629. body = "Hjarrandi Breastplate",
  630. hands = "Pteroslaver Finger Gauntlets +3",
  631. ring1 = "Defending Ring",
  632. ring2 = "Gelatinous Ring +1",
  633. back = Brig.FCMeva,
  634. waist = "Flume Belt",
  635. legs = "Pteroslaver Brais +3",
  636. feet = "Sulevia's Leggings +2"
  637. }
  638.  
  639. --Shell II only--
  640. sets.Utility.MDTII = {
  641. ammo = "",
  642. head = "",
  643. neck = "",
  644. ear1 = "",
  645. ear2 = "",
  646. body = "",
  647. hands = "",
  648. ring1 = "",
  649. ring2 = "",
  650. back = "",
  651. waist = "",
  652. legs = "",
  653. feet = ""
  654. }
  655.  
  656. --No Shell--
  657. sets.Utility.MDTNO = {
  658. ammo = "",
  659. head = "",
  660. neck = "",
  661. ear1 = "",
  662. ear2 = "",
  663. body = "",
  664. hands = "",
  665. ring1 = "",
  666. ring2 = "",
  667. back = "",
  668. waist = "",
  669. legs = "",
  670. feet = ""
  671. }
  672.  
  673. ---------------------
  674. -- Enmity Set --
  675. ---------------------
  676.  
  677. sets.Enmity = {
  678. ammo = "",
  679. head = "",
  680. neck = "",
  681. ear1 = "",
  682. ear2 = "",
  683. body = "",
  684. hands = "",
  685. ring1 = "",
  686. ring2 = "",
  687. back = "",
  688. waist = "",
  689. legs = "",
  690. feet = ""
  691. }
  692.  
  693. ------------------------
  694. -- Enhancing Sets --
  695. ------------------------
  696.  
  697. sets.Enhancing = {}
  698.  
  699. sets.Enhancing.Skill = {
  700. ammo = "",
  701. head = "",
  702. neck = "",
  703. ear1 = "",
  704. ear2 = "",
  705. body = "",
  706. hands = "",
  707. ring1 = "",
  708. ring2 = "",
  709. back = "",
  710. waist = "",
  711. legs = "",
  712. feet = ""
  713. }
  714.  
  715. sets.Enhancing.Phalanx = set_combine(sets.Enhancing.Skill, {
  716. })
  717.  
  718. sets.Enhancing.Refresh = set_combine(sets.Enhancing.Skill, {
  719. waist = "Gishdubar Sash",
  720. })
  721.  
  722. sets.Enhancing.Regen = set_combine(sets.Enhancing.Skill, {
  723. --feet = "Taeon Boots",
  724. })
  725.  
  726. sets.Enhancing.ProShell = set_combine(sets.Enhancing.Skill, {
  727. ring2 = "Sheltered Ring",
  728. })
  729.  
  730. ------------------------
  731. -- Healing Breath --
  732. ------------------------
  733.  
  734. sets.HB = {}
  735. --Midcast Set for HB spell triggers--
  736. sets.HB.Trigger = {
  737. ammo = "Staunch Tathlum +1",
  738. head = "Vishap Armet",
  739. neck = "Sanctity Necklace",
  740. ear1 = "Etiolation Earring",
  741. ear2 = "Eabani Earring",
  742. body = TaeonBody.FC,
  743. hands = "Emicho Gauntlets +1",
  744. ring1 = "Eihwaz Ring",
  745. ring2 = "Gelatinous Ring +1",
  746. waist = "Carrier's Sash",
  747. legs = "Vishap Brais +3",
  748. back = "Moonbeam Cape"
  749. }
  750.  
  751. --The Freshmaker--
  752. sets.HB.Mentos = {
  753. head = "Pteroslaver Armet +3",
  754. ear2 = "Anastasi Earring",
  755. body = "Acro Surcoat",
  756. hands = "Despair Finger Gauntlets",
  757. legs = "Vishap Brais +3",
  758. feet = "Ptero. Greaves +3",
  759. back = "Updraft Mantle"
  760. }
  761.  
  762. --Elemental Breath--
  763. sets.HB.Ricola = {
  764. ammo = "Voluspa Tathlum",
  765. head = "Pteroslaver Armet +3",
  766. ear1 = "Enkmar Earring",
  767. body = "Acro Surcoat",
  768. hands = AcroGauntlets.Breath,
  769. ring1 = "Cath Palug Ring",
  770. legs = "Acro Breeches",
  771. feet = "Acro Leggings",
  772. back = "Updraft Mantle"
  773. }
  774.  
  775. --------------------------
  776. -- Job Ability Sets --
  777. --------------------------
  778. sets.JA = {}
  779.  
  780. sets.JA.SpiritSurge = {
  781. body = "Pteroslaver Mail +3"
  782. }
  783.  
  784. sets.JA.CallWyvern = {
  785. hands = "Pteroslaver Mail +3"
  786. }
  787.  
  788. sets.JA.AncientCircle = {
  789. legs = "Vishap Brais +3"
  790. }
  791.  
  792. sets.JA.SpiritLink = {
  793. head = "Vishap Armet",
  794. ear1 = "Pratik Earring",
  795. hands = "Peltast's Vambraces",
  796. feet = "Ptero. Greaves +3"
  797. }
  798.  
  799. sets.JA.Angon = {
  800. hands = "Pteroslaver Finger Gauntlets +3"
  801. }
  802. --If you actually use DB then you will need to make a buff active rule to make it active--
  803. sets.JA.DeepBreathing = {
  804. head = "Pteroslaver Armet +3"
  805. }
  806.  
  807. ----------------------
  808. -- Precast Sets --
  809. ----------------------
  810. sets.precast = {}
  811.  
  812. sets.precast.FastCast = {}
  813.  
  814. sets.precast.FastCast.Standard = {
  815. ammo = "Sapience Orb",
  816. head = CarmineMask.MND,
  817. neck = "Orunmila's Torque",
  818. ear1 = "Etiolation Earring",
  819. ear2 = "Loquac. Earring",
  820. body = TaeonBody.FC,
  821. hands = "Leyline Gloves",
  822. ring1 = "Prolix Ring",
  823. ring2 = "Rahab Ring",
  824. back = Brig.FCMeva,
  825. feet = "Carmine Greaves +1"
  826. }
  827.  
  828. end
  829.  
  830. ---End of Gear---------------------------------------------------------------------------------------------------------------------------------------------------------
  831.  
  832. -------------------------------------
  833. --------- ---------
  834. ------ ------
  835. --- Start of Maps ---
  836. ------ ------
  837. --------- ---------
  838. -------------------------------------
  839.  
  840. -------------------------
  841. -- BLU Spells List --
  842. -------------------------
  843.  
  844. function maps()
  845. PhysicalSpells = S {
  846. 'Bludgeon', 'Body Slam', 'Feather Storm', 'Mandibular Bite', 'Queasyshroom',
  847. 'Screwdriver', 'Sickle Slash', 'Smite of Rage', 'Power Attack',
  848. 'Terror Touch', 'Battle Dance', 'Claw Cyclone', 'Grand Slam',
  849. 'Jet Stream', 'Pinecone Bomb', 'Wild Oats', 'Uppercut'
  850. }
  851.  
  852. MagicalSpells = S {}
  853.  
  854. BlueMagic_Buffs = S {
  855. 'Refueling'
  856. }
  857.  
  858. BlueMagic_Healing = S {
  859. 'Healing Breeze', 'Pollen', 'Wild Carrot'
  860. }
  861.  
  862. BlueMagic_Enmity = S {
  863. 'Blank Gaze', 'Jettatura', 'Geist Wall', 'Sheep Song', 'Soporific'
  864. }
  865.  
  866. end
  867.  
  868. ------------------------
  869. -- Sub Mage Table --
  870. ------------------------
  871.  
  872. mp_jobs = S {"WHM", "BLM", "RDM", "SMN", "BLU", "SCH", "GEO", "PLD", "DRK", "RUN"}
  873.  
  874. --------------------------------
  875. -- Elemental Breath Table --
  876. --------------------------------
  877.  
  878. ElementalBreath = S { "Flame Breath", "Sand Breath", "Hydro Breath",
  879. "Gust Breath", "Frost Breath", "Lightning Breath", }
  880.  
  881. -------------------------------
  882. -- WS Chart For Gavialis --
  883. -------------------------------
  884.  
  885. check_ws_day = {
  886. Firesday = S {'Liquefaction','Fusion','Light'},
  887. Earthsday= S {'Scission','Gravitation','Darkness'},
  888. Watersday = S {'Reverberation','Distortion','Darkness'},
  889. Windsday = S {'Detonation','Fragmentation','Light'},
  890. Iceday = S {'Induration','Distortion','Darkness'},
  891. Lightningsday = S {'Impaction','Fragmentation','Light'},
  892. Lightsday = S {'Transfixion','Fusion','Light'},
  893. Darksday = S {'Compression','Gravitation','Darkness'},}
  894.  
  895.  
  896. ---------------------
  897. -- HB Triggers --
  898. ---------------------
  899. Trigger = S {
  900. 'Power Attack', 'Foot Kick', 'Sprout Smack', 'Helldive', 'Cocoon', 'Wild Carrot',
  901. 'Dia', 'Diaga', 'Dia II', 'Sneak', 'Invisible', 'Cure', 'Cure II', 'Cure III', 'Cure IV', 'Cura',
  902. 'Raise', 'Reraise', 'Poisona', 'Paralyna', 'Blindna', 'Silena', 'Stona', 'Cursna', 'Haste',
  903. 'Regen', 'Regen II', 'Erase', 'Flash'
  904. }
  905.  
  906. ------------------------
  907. -- Town Gear List --
  908. ------------------------
  909.  
  910. Town = S {
  911. "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno",
  912. "Port Windurst", "Windurst Waters", "Windurst Woods", "Windurst Walls", "Heavens Tower",
  913. "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria", "Chateau d'Oraguille",
  914. "Port Bastok", "Bastok Markets", "Bastok Mines", "Metalworks",
  915. "Aht Urhgan Whitegate", "Nashmau",
  916. "Selbina", "Mhaura", "Norg", "Kazham", "Tavanazian Safehold",
  917. "Eastern Adoulin", "Western Adoulin", "Celennia Memorial Library", "Mog Garden"
  918. }
  919.  
  920. ---End of Maps----------------------------------------------------------------------------------------------------------------------------------------------------------
  921.  
  922.  
  923. --------------------------------------
  924. --------- ---------
  925. ------ ------
  926. --- Start of Rules ---
  927. ------ ------
  928. --------- ---------
  929. --------------------------------------
  930.  
  931. ----------------------------------------------
  932. -- Macro and Style Change on Job Change --
  933. ----------------------------------------------
  934. function set_macros(sheet,book)
  935. if book then
  936. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
  937. return
  938. end
  939. send_command('@input /macro set '..tostring(sheet))
  940. end
  941.  
  942. function set_style(sheet)
  943. send_command('@input ;wait 5.0;input /lockstyleset '..sheet)
  944. add_to_chat (56, 'Your lockstyle looks like shit, and you should feel bad.')
  945. add_to_chat (55, 'You are on '..('DRG '):color(5)..''..('btw. '):color(55)..''..('Macros set!'):color(121))
  946. add_to_chat (23, '"If you are going to LOLDRG, then do it spectacularly"')
  947. send_command('@input ;wait 180;input //gs validate')
  948. end
  949.  
  950. --Page, Book--
  951. set_macros(1,16)
  952. --Use the Lockstyle Number--
  953. set_style(62)
  954. -------------------------------
  955. -- Variables --
  956. -------------------------------
  957. SetLocked = false --Used to Check if set is locked before changing equipment
  958. LockedEquipSet = {} --Placeholder to store desired lock set
  959. LockGearSet = {}
  960. equipSet = {} --Currently Equiped Gearset
  961. LockGearIndex = false
  962. LockGearIndex = false
  963. TargetDistance = 0
  964. TH = false --TH rule default
  965. DomainInvasion = false
  966. DT = false
  967. SkillchainPending = false
  968. AllowSkillchainGear = false --Whether or not hte skillchainPending system should be active upon loading the lua
  969. PetBreathFailover = false
  970. SkillchainTimer = 0
  971.  
  972. ------------------------------------
  973. -- Windower Hooks --
  974. ------------------------------------
  975.  
  976. function buff_change(n, gain, buff_table)
  977. local name
  978. name = string.lower(n)
  979. if S{"terror","petrification","sleep","stun"}:contains(name) then
  980. if gain then
  981. ChangeGear(sets.Utility.DerpDT)
  982. elseif not has_any_buff_of({"terror","petrification","sleep","stun"}) then
  983. if player.status == 'Engaged' then
  984. if LockGearIndex then
  985. ChangeGear(LockGearSet)
  986. elseif not LockGearIndex then
  987. if DT == true then
  988. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  989. elseif SAMRoll == true then
  990. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  991. else
  992. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  993. end
  994. end
  995. elseif player.status == 'Idle' then
  996. if LockGearIndex then
  997. ChangeGear(LockGearSet)
  998. elseif not LockGearIndex then
  999. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1000. end
  1001. end
  1002. end
  1003. elseif name == "doom" then
  1004. if gain then
  1005. ChangeGear(sets.Utility.Doom)
  1006. send_command('@input /p Doomed {~o~:} !')
  1007. disable('ring1','ring2','waist')
  1008. else
  1009. if player.status == 'Engaged' then
  1010. if LockGearIndex then
  1011. send_command('@input /p Doom is off {^_^}')
  1012. enable('ring1','ring2','waist')
  1013. ChangeGear(LockGearSet)
  1014. else
  1015. send_command('@input /p Doom is off {^_^}')
  1016. enable('ring1','ring2','waist')
  1017. if DT == true then
  1018. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1019. elseif SAMRoll == true then
  1020. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1021. else
  1022. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1023. end
  1024. end
  1025. elseif player.status == 'Idle' then
  1026. if LockGearIndex then
  1027. send_command('@input /p Doom is off {^_^}')
  1028. enable('ring1','ring2','waist')
  1029. ChangeGear(LockGearSet)
  1030. else
  1031. send_command('@input /p Doom is off {^_^}')
  1032. enable('ring1','ring2','waist')
  1033. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1034. end
  1035. end
  1036. end
  1037. elseif name == "charm" then
  1038. if gain then
  1039. send_command('@input /p Charmed {<3_<3:} !')
  1040. else
  1041. send_command('@input /p Charm is off {~_^}')
  1042. end
  1043. elseif name == "weakness" then
  1044. if gain then
  1045. enable('ring1','ring2','waist')
  1046. end
  1047. elseif name == "weakness" and player.status == 'Idle' then
  1048. if gain then
  1049. enable('ring1','ring2','waist')
  1050. ChangeGear(sets.Utility.Twilight)
  1051. else
  1052. if player.status == 'Idle' then
  1053. if LockGearIndex then
  1054. ChangeGear(LockGearSet)
  1055. else
  1056. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1057. end
  1058.  
  1059. end
  1060. end
  1061. elseif name == "hasso" then
  1062. if gain then
  1063. else
  1064. send_command('gs c -cd Hasso Lost!')
  1065. end
  1066. end
  1067.  
  1068. if name == "samurai roll" then
  1069. if gain then
  1070. SAMRoll = true
  1071. if LockGearIndex then
  1072. ChangeGear(LockGearSet)
  1073. elseif DT == true then
  1074. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1075. else
  1076. if player.status == 'Engaged' then
  1077. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1078. end
  1079. end
  1080. else
  1081. SAMRoll = false
  1082. end
  1083. end
  1084.  
  1085. if name == "elvorseal" then
  1086. if gain then
  1087. DomainInvasion = true
  1088. else
  1089. DomainInvasion = false
  1090. end
  1091. end
  1092. end
  1093.  
  1094. function has_any_buff_of(buff_set)--returns true if you have any of the buffs given
  1095. for i,v in pairs(buff_set) do
  1096. if buffactive[v] ~= nil then return true end
  1097. end
  1098. end
  1099.  
  1100. ---------------------------
  1101. -- Binds --
  1102. ---------------------------
  1103. send_command('bind f9 gs c toggle TP set') -- Hit f9, toggles the sets
  1104. send_command('bind f10 gs c toggle Stardiver set')
  1105. send_command('bind f11 gs c toggle Camlann set')
  1106. send_command('bind f12 gs c toggle Idle set')
  1107. send_command('bind ^f8 input /ws "Leg Sweep" <t>')
  1108. send_command('bind ^f9 input /ws "Stardiver" <t>') -- ^ means cntrl, so hit cntrl + f9
  1109. send_command('bind ^f10 input /ws "Camlann\'s Torment"] <t>')
  1110. send_command('bind ^f11 input /ws "Sonic Thrust" <t>')
  1111. send_command('bind ^f12 input /ws "Drakesbane" <t>')
  1112. send_command('bind !f7 gs c toggle DT set') -- ! means alt. this exists only for toggling outside of this mode being active, otherwise f9
  1113. send_command('bind !f8 gs c toggle DT') -- ! means alt. DT on or off
  1114. send_command('bind !f9 gs c toggle backwards')
  1115. send_command('bind !f10 gs c AllowSkillchainGear')
  1116. send_command('bind !f11 empty')
  1117. send_command('bind !f12 gs c lockgearindex')
  1118.  
  1119. send_command('bind !e input /item "Echo Drops" <me>')
  1120. send_command('bind !r input /item "Remedy" <me>')
  1121. send_command('bind !p input /item "Panacea" <me>')
  1122. send_command('bind !h input /item "Holy Water" <me>')
  1123. send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')
  1124. send_command('bind !q input /equip ring2 "Dim. Ring (Holla)"; /echo Reisenjima; wait 11; input /item "Dim. Ring (Holla)" <me>;')
  1125. send_command('bind !t gs c toggle TH') -- alt + t toggles TH mode
  1126.  
  1127. --Unload Binds
  1128. function file_unload()
  1129. send_command('unbind ^f8')
  1130. send_command('unbind ^f9')
  1131. send_command('unbind ^f10')
  1132. send_command('unbind ^f11')
  1133. send_command('unbind ^f12')
  1134. send_command('unbind !f7')
  1135. send_command('unbind !f8')
  1136. send_command('unbind !f9')
  1137. send_command('unbind !f10')
  1138. send_command('unbind !f11')
  1139. send_command('unbind !f12')
  1140. send_command('unbind f9')
  1141. send_command('unbind f10')
  1142. send_command('unbind f11')
  1143. send_command('unbind f12')
  1144.  
  1145. send_command('unbind !e')
  1146. send_command('unbind !r')
  1147. send_command('unbind !p')
  1148. send_command('unbind !h')
  1149. send_command('unbind !w')
  1150. send_command('unbind !t')
  1151. end
  1152.  
  1153. --------------------------------------
  1154. -- Console Commands --
  1155. --------------------------------------
  1156. function self_command(command)
  1157. if command == 'togglelock' then
  1158. if SetLocked == false then
  1159. msg("Equipment Set LOCKED !!!")
  1160. else
  1161. SetLocked = false
  1162. msg("Equipment Set UNLOCKED!")
  1163. end
  1164. elseif command == 'lockgearindex' then
  1165. if LockGearIndex == false then
  1166. LockGearIndex = true
  1167. LockGearSet = {
  1168. ammo = player.equipment.ammo,
  1169. head = player.equipment.head,
  1170. neck = player.equipment.neck,
  1171. ear1 = player.equipment.left_ear,
  1172. ear2 = player.equipment.right_ear,
  1173. body = player.equipment.body,
  1174. hands = player.equipment.hands,
  1175. ring1 = player.equipment.left_ring,
  1176. ring2 = player.equipment.right_ring,
  1177. back = player.equipment.back,
  1178. waist = player.equipment.waist,
  1179. legs = player.equipment.legs,
  1180. feet = player.equipment.feet
  1181. }
  1182. msg("Gear Index Locked !!!")
  1183. else
  1184. LockGearIndex = false
  1185. msg("Gear Index Unlocked")
  1186. if player.status == 'Engaged' then
  1187. if DT == true then
  1188. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1189. elseif SAMRoll == true then
  1190. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1191. else
  1192. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1193. end
  1194. else
  1195. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1196. end
  1197. end
  1198. end
  1199. if command == 'toggle TP set' then
  1200. if DT == true then
  1201. DT_ind = DT_ind + 1
  1202. if DT_ind > #sets.DT.index then DT_ind = 1 end
  1203. send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1204. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1205. elseif DT == false then
  1206. TP_ind = TP_ind + 1
  1207. SAMRoll_ind = SAMRoll_ind + 1
  1208. if TP_ind > #sets.TP.index then TP_ind = 1 end
  1209. if SAMRoll_ind > #sets.SAMRoll.index then SAMRoll_ind = 1 end
  1210. send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
  1211. if player.status == 'Engaged' then
  1212. if SAMRoll == true then
  1213. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1214. else
  1215. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1216. end
  1217. end
  1218. end
  1219. elseif command == 'toggle Idle set' then
  1220. Idle_ind = Idle_ind + 1
  1221. if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
  1222. send_command('@input /echo <----- Idle Set changed to ' .. sets.Idle.index[Idle_ind] .. ' ----->')
  1223. if player.status == 'Idle' then
  1224. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1225. end
  1226. elseif command == 'toggle Camlann set' then
  1227. CamlannsTorment_ind = CamlannsTorment_ind + 1
  1228. SonicThrust_ind = SonicThrust_ind + 1
  1229. if CamlannsTorment_ind > #sets.CamlannsTorment.index then CamlannsTorment_ind = 1 end
  1230. send_command('@input /echo <----- Camlanns/Sonic Set changed to ' .. sets.CamlannsTorment.index[CamlannsTorment_ind] .. ' ----->')
  1231. elseif command == 'toggle Stardiver set' then
  1232. Stardiver_ind = Stardiver_ind + 1
  1233. Drakesbane_ind = Drakesbane_ind + 1
  1234. if Stardiver_ind > #sets.Stardiver.index then Stardiver_ind = 1 end
  1235. send_command('@input /echo <----- Stardiver/Drakes Set changed to ' .. sets.Stardiver.index[Stardiver_ind] .. ' ----->')
  1236. elseif command == 'toggle DT set' then
  1237. DT_ind = DT_ind + 1
  1238. if DT_ind > #sets.DT.index then DT_ind = 1 end
  1239. send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1240. if DT == true then
  1241. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1242. end
  1243. elseif command == 'toggle DT' then
  1244. if DT == true then
  1245. DT = false
  1246. send_command('@input /echo <----- DT TP: [Off] ----->')
  1247. else
  1248. DT = true
  1249. send_command('@input /echo <----- DT TP: [On] ----->')
  1250. end
  1251. status_change(player.status)
  1252. elseif command == 'toggle TH' then
  1253. if TH == true then
  1254. TH = false
  1255. send_command('@input /echo <----- Treasure Hunter TP: [Off] ----->')
  1256. else
  1257. TH = true
  1258. send_command('@input /echo <----- Treasure Hunter TP: [On] ----->')
  1259. end
  1260. status_change(player.status)
  1261. elseif command == 'toggle backwards' then
  1262. if DT == true then
  1263. DT_ind = DT_ind -1
  1264. if DT_ind == 0 then
  1265. DT_ind = #sets.DT.index
  1266. end
  1267. send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1268. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1269. elseif DT == false then
  1270. TP_ind = TP_ind -1
  1271. SAMRoll_ind = SAMRoll_ind -1
  1272. if TP_ind == 0 then
  1273. TP_ind = #sets.TP.index
  1274. end
  1275. if SAMRoll_ind == 0 then
  1276. SAMRoll_ind = #sets.SAMRoll.index
  1277. end
  1278. send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
  1279. if player.status == 'Engaged' then
  1280. if SAMRoll == true then
  1281. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1282. else
  1283. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1284. end
  1285. end
  1286. end
  1287. elseif command == 'ZoneChange' then
  1288. IdleState()
  1289. elseif command == 'AllowSkillchainGear' then
  1290. AllowSkillchainGear = not AllowSkillchainGear
  1291. add_to_chat (56, 'Allow use of skillchain damage gear: ' ..tostring(AllowSkillchainGear))
  1292. elseif command == 'PetBreathFailover' then
  1293. if PetBreathFailover == true then --If the PetBreathFailover wasnt reset to false by pet_aftercast then we set it to false here
  1294. PetBreathFailover = false --And call ac_global to reset our gear
  1295. ac_Global()
  1296. end
  1297. elseif string.sub(command, 0, 4) == '-cd ' then --If the first 4 characters of the command are '-cd '
  1298. add_to_chat (30, string.sub(command, 5, string.len(command))) --add everything after '-cd ' to a message in the chat
  1299. end
  1300. end
  1301.  
  1302. --------------------------------------
  1303. -- Character States --
  1304. --------------------------------------
  1305. function IdleState()
  1306. if LockGearIndex then
  1307. ChangeGear(LockGearSet)
  1308. elseif DT == true then
  1309. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1310. else
  1311. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1312. end
  1313.  
  1314. if buffactive['Weakness'] then
  1315. ChangeGear(sets.Utility.Twilight) --Only on during weakened idle, and requires an action after raising to trigger. Use lockgear otherwise.
  1316. elseif mp_jobs:contains(player.sub_job) and player.mpp < 50 then
  1317. ChangeGear(sets.Idle.Refresh)
  1318. else
  1319. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1320. end
  1321.  
  1322. if Town:contains(world.area) and player.mpp < 65 then
  1323. ChangeGear(set_combine(sets.Idle.Town, sets.Idle.Refresh))
  1324. elseif Town:contains(world.area) then
  1325. ChangeGear(sets.Idle.Town) -- Puts on Waifu/Husbando Band
  1326. end
  1327.  
  1328. end
  1329.  
  1330. windower.raw_register_event('zone change',function()
  1331. windower.send_command('@wait 9; input //gs c ZoneChange')
  1332. end)
  1333.  
  1334. function RestingState()
  1335.  
  1336. end
  1337.  
  1338. function EngagedState()
  1339. if LockGearIndex then
  1340. ChangeGear(LockGearSet)
  1341. elseif not LockGearIndex then
  1342. if DT == true then
  1343. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1344. elseif buffactive["Elvorseal"] then
  1345. DomainInvasion = true
  1346. ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]], sets.Utility.DomainInvasionTP))
  1347. elseif buffactive["Samurai Roll"] then
  1348. SAMRoll = true
  1349. ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1350. else
  1351. SAMRoll = false
  1352. DomainInvasion = false
  1353. ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1354. end
  1355. end
  1356. end
  1357.  
  1358. -----------------------------
  1359. -- Spell control --
  1360. -----------------------------
  1361. unusable_buff = {
  1362. spell={'Charm','Mute','Omerta','Petrification','Silence','Sleep','Stun','Terror'},
  1363. ability={'Amnesia','Charm','Impairment','Petrification','Sleep','Stun','Terror'}}
  1364. --check_recast('ability',spell.recast_id) check_recast('spell',spell.recast_id)
  1365. function check_recast(typ,id) --if spell can be cast(not in recast) return true
  1366. local recasts = windower.ffxi['get_'..typ..'_recasts']()
  1367. if id and recasts[id] and recasts[id] == 0 then
  1368. return true
  1369. else
  1370. return false
  1371. end
  1372. end
  1373. --return true if spell/ability is unable to be used at this time
  1374. function spell_control(spell)
  1375. if spell.type == "Item" then
  1376. return false
  1377. --Stops spell if you do not have a target
  1378. elseif spell.target.name == nil and not spell.target.raw:contains("st") then
  1379. return true
  1380. --Stops spell if a blocking buff is active
  1381. elseif spell.action_type == 'Ability' and spell.type ~= 'WeaponSkill' and (has_any_buff_of(unusable_buff.ability) or not check_recast('ability',spell.recast_id)) then
  1382. return true
  1383. elseif spell.type == 'WeaponSkill' and player.tp < 1000 then
  1384. return true
  1385. elseif spell.type == 'WeaponSkill' and (has_any_buff_of(unusable_buff.ability)) then
  1386. msg("Weapon Skill Canceled, Can't")
  1387. return true
  1388. elseif spell.action_type == 'Magic' and (has_any_buff_of(unusable_buff.spell)
  1389. or not check_recast('spell',spell.recast_id)) then
  1390. return true
  1391. --Stops spell if you do not have enuf mp/tp to use
  1392. elseif spell.mp_cost and spell.mp_cost > player.mp and not has_any_buff_of({'Manawell','Manafont'}) then
  1393. msg("Spell Canceled, Not Enough MP")
  1394. return true
  1395. end
  1396. --Calculate how many finishing moves your char has up to 6
  1397. local fm_count = 0
  1398. for i, v in pairs(buffactive) do
  1399. if tostring(i):startswith('finishing move') or tostring(i):startswith('?????????') then
  1400. fm_count = tonumber(string.match(i, '%d+')) or 1
  1401. end
  1402. end
  1403. --Stops flourishes if you do not have enough finishing moves
  1404. local min_fm_for_flourishes = {['Animated Flourish']=1,['Desperate Flourish']=1,['Violent Flourish']=1,['Reverse Flourish']=1,['Building Flourish']=1,
  1405. ['Wild Flourish']=2,['Climactic Flourish']=1,['Striking Flourish']=2,['Ternary Flourish']=3,}
  1406. if min_fm_for_flourishes[spell.en] then
  1407. if min_fm_for_flourishes[spell.en] > fm_count and not buffactive[507] then
  1408. return true
  1409. end
  1410. end
  1411. --Reomves Sneak when casting Spectral Jig
  1412. if spell.en == 'Spectral Jig' then
  1413. send_command('cancel 71')
  1414. end
  1415. if spell.name == 'Utsusemi: Ichi' and overwrite and buffactive['Copy Image (3)'] then
  1416. return true
  1417. end
  1418. if player.tp >= 1000 and player.target and player.target.distance and player.target.distance > 7 and spell.type == 'WeaponSkill' then
  1419. msg("Weapon Skill Canceled Target Out of Range")
  1420. return true
  1421. end
  1422. end
  1423.  
  1424. -----------------------------
  1425. -- Precast --
  1426. -----------------------------
  1427. function pc_JA(spell, act)
  1428. if spell.english == 'Spirit Surge' then
  1429. ChangeGear(sets.JA.SpiritSurge)
  1430. elseif spell.english == 'Call Wyvern' then
  1431. ChangeGear(sets.JA.CallWyvern)
  1432. elseif spell.english == 'Ancient Circle' then
  1433. ChangeGear(sets.JA.AncientCircle)
  1434. elseif spell.english == 'Spirit Link' then
  1435. ChangeGear(sets.JA.SpiritLink)
  1436. elseif spell.english == 'Angon' then
  1437. ChangeGear(sets.JA.Angon)
  1438. elseif spell.english == 'Deep Breathing' then
  1439. ChangeGear(sets.JA.DeepBreathing)
  1440. elseif spell.english == 'Jump' then
  1441. ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1442. ammo = "Aurgelmir Orb +1",
  1443. head = "Hjarrandi Helm",
  1444. ear1 = "Sherida Earring",
  1445. ear2 = "Telos Earring",
  1446. body = "Pteroslaver Mail +3",
  1447. hands = "Vis. Fng. Gaunt. +3",
  1448. back = Brig.STP,
  1449. legs = ValorousHose.STP,
  1450. waist = "Ioskeha Belt +1",
  1451. feet = "Flamma Gambieras +2"})) --Ostro are better, but the DPS gain for a slot of gear is so low (<10 DPS) and with half the acc+, why bother?
  1452. elseif spell.english == 'High Jump' then
  1453. ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1454. ammo = "Aurgelmir Orb +1",
  1455. head = "Hjarrandi Helm",
  1456. ear1 = "Sherida Earring",
  1457. ear2 = "Telos Earring",
  1458. body = "Pteroslaver Mail +3",
  1459. hands = "Vis. Fng. Gaunt. +3",
  1460. back = Brig.STP,
  1461. waist = "Ioskeha Belt +1",
  1462. legs = "Pteroslaver Brais +3",
  1463. feet = "Flamma Gambieras +2"}))
  1464. elseif spell.english == 'Spirit Jump' then
  1465. ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1466. ammo = "Aurgelmir Orb +1",
  1467. head = "Hjarrandi Helm",
  1468. ear1 = "Sherida Earring",
  1469. ear2 = "Telos Earring",
  1470. body = "Pteroslaver Mail +3",
  1471. hands = "Vis. Fng. Gaunt. +3",
  1472. back = Brig.STP,
  1473. waist = "Ioskeha Belt +1",
  1474. legs = ValorousHose.STP,
  1475. feet = "Peltast Schynbalds +1"}))
  1476. elseif spell.english == 'Soul Jump' then
  1477. ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1478. ammo = "Aurgelmir Orb +1",
  1479. head = "Hjarrandi Helm",
  1480. ear1 = "Sherida Earring",
  1481. ear2 = "Telos Earring",
  1482. body = "Vishap Mail +3",
  1483. hands = "Vis. Fng. Gaunt. +3",
  1484. back = Brig.STP,
  1485. waist = "Ioskeha Belt +1",
  1486. legs = ValorousHose.STP,
  1487. feet = "Flamma Gambieras +2"}))
  1488. elseif spell.english == 'Steady Wing' then
  1489. ChangeGear(sets.HB.Mentos)
  1490. elseif spell.english == 'Provoke' then
  1491. ChangeGear(sets.JA.Provoke)
  1492. end
  1493.  
  1494. IgnoreWS = S {"Penta Thrust"} -- Excluded from Moonshade TP override rule.
  1495. BrutalWS = S {"Stardiver", "Drakesbane", "Shattersoul"}
  1496.  
  1497. if spell.type == 'WeaponSkill' then
  1498. if spell.english == 'Stardiver' or spell.english == 'Shattersoul' then
  1499. ChangeGear(sets.Stardiver[sets.Stardiver.index[Stardiver_ind]])
  1500. elseif spell.english == "Camlann's Torment" or spell.english == 'Retribution' then
  1501. ChangeGear(sets.CamlannsTorment[sets.CamlannsTorment.index[CamlannsTorment_ind]])
  1502. elseif spell.english == 'Drakesbane' then
  1503. ChangeGear(sets.Drakesbane[sets.Drakesbane.index[Drakesbane_ind]])
  1504. elseif spell.english == 'Sonic Thrust' then
  1505. ChangeGear(sets.SonicThrust[sets.SonicThrust.index[SonicThrust_ind]])
  1506. elseif spell.english == 'Leg Sweep' then
  1507. ChangeGear(sets.LegSweep)
  1508. end
  1509. if player.tp > 2025 and player.equipment.main == 'Trishula' and buffactive['TP Bonus'] and not buffactive['Sekkanoki'] then
  1510. if IgnoreWS:contains(spell.english) then
  1511. do return end
  1512. elseif BrutalWS:contains(spell.english) then
  1513. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1514. msg("Brutal Earring equiped !!!!")
  1515. else
  1516. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1517. msg("Ishvara Earring equiped !!!!")
  1518. end
  1519. elseif player.tp > 2275 and player.equipment.main == 'Trishula' and not buffactive['Sekkanoki'] then
  1520. if IgnoreWS:contains(spell.english) then
  1521. do return end
  1522. elseif BrutalWS:contains(spell.english) then
  1523. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1524. msg("Brutal Earring equiped !!!!")
  1525. else
  1526. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1527. msg("Ishvara Earring equiped !!!!")
  1528. end
  1529. elseif player.tp > 2550 and buffactive['TP Bonus'] and not buffactive['Sekkanoki'] then
  1530. if IgnoreWS:contains(spell.english) then
  1531. do return end
  1532. elseif BrutalWS:contains(spell.english) then
  1533. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1534. msg("Brutal Earring equiped !!!!")
  1535. else
  1536. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1537. msg("Ishvara Earring equiped !!!!")
  1538. end
  1539. elseif player.tp > 2775 and not buffactive['Sekkanoki'] then
  1540. if IgnoreWS:contains(spell.english) then
  1541. do return end
  1542. elseif BrutalWS:contains(spell.english) then
  1543. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1544. msg("Brutal Earring equiped !!!!")
  1545. else
  1546. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1547. msg("Ishvara Earring equiped !!!!")
  1548. end
  1549. end
  1550. end
  1551.  
  1552. if spell.english == 'Stardiver' and Stardiver_ind ~= 1 and (check_ws_day[world.day]:contains(spell.skillchain_a) -- Remove the and _ind ~=1 (not equal) for Gavialis if you don't have Ptero +2/3.
  1553. or check_ws_day[world.day]:contains(spell.skillchain_b)
  1554. or check_ws_day[world.day]:contains(spell.skillchain_c)) then
  1555. ChangeGear(sets.WSDayBonus)
  1556. end
  1557. --Tested, Aeonic AM Doesn't work with Gavialis, but I will keep the extra rule on ice for now below:
  1558. --or (check_ws_day[world.day]:contains("Darkness") and player.equipment.main == 'Trishula' and (buffactive['Aftermath: Lv.3'] or buffactive['Aftermath: Lv.2'] or buffactive['Aftermath: Lv.1']))) then
  1559.  
  1560. if spell.english == 'Box Step' or spell.english == 'Quick Step' then
  1561. ChangeGear(sets.Utility.Steps)
  1562. elseif spell.english == 'Animated Flourish' then
  1563. ChangeGear(sets.Enmity)
  1564. end
  1565. end
  1566.  
  1567. function pc_Magic(spell, act)
  1568. if spell.action_type == 'Magic' then
  1569. ChangeGear(sets.precast.FastCast.Standard)
  1570. end
  1571. end
  1572.  
  1573. function pretarget(spell,action)
  1574.  
  1575. if spell.english =="Call Wyvern" and pet.isvalid then -- Change Call Wyvern To Spirit Link If Wyvern Is Present --
  1576. cancel_spell()
  1577. send_command('Spirit Link')
  1578. end
  1579.  
  1580. end
  1581.  
  1582.  
  1583. function pc_Item(spell, act)
  1584. end
  1585.  
  1586.  
  1587. -----------------------------
  1588. -- Midcast --
  1589. -----------------------------
  1590. function mc_JA(spell, act)
  1591. end
  1592.  
  1593. function mc_Magic(spell, act)
  1594. if spell.action_type == 'Magic' and player.hpp <= 50 then
  1595. ChangeGear(sets.HB.Trigger)
  1596. elseif Trigger:contains(spell.english) then --Put whatever you want to trigger the helm change in the table above
  1597. ChangeGear(sets.HB.Trigger)
  1598. end
  1599.  
  1600. if spell.skill == 'Enhancing Magic' then
  1601. if spell.english == 'Refresh' then
  1602. ChangeGear(sets.Enhancing.Refresh)
  1603. elseif string.find(spell.english,'Regen')then
  1604. ChangeGear(sets.Enhancing.Regen)
  1605. elseif string.find(spell.english,'Bar') then
  1606. ChangeGear(sets.Enhancing.Skill)
  1607. elseif spell.english=="Phalanx" then
  1608. ChangeGear(sets.Enhancing.Phalanx)
  1609. elseif string.find(spell.english,'Shell') or string.find(spell.english,'Protect') then
  1610. ChangeGear(sets.Enhancing.ProShell)
  1611. end
  1612. end
  1613.  
  1614. if PhysicalSpells:contains(spell.english) then
  1615. ChangeGear(sets.BlueMagic.STR)
  1616. end
  1617.  
  1618. if BlueMagic_Enmity:contains(spell.english) then
  1619. ChangeGear(sets.Enmity)
  1620. elseif BlueMagic_Buffs:contains(spell.english) then
  1621. ChangeGear(sets.TP.Tank)
  1622. elseif BlueMagic_Healing:contains(spell.english) or string.find(spell.english,'Cure')then
  1623. ChangeGear(set_combine(sets.Cures, sets.HB.Trigger))
  1624. end
  1625. end
  1626.  
  1627. function mc_Item(spell, act)
  1628. end
  1629.  
  1630.  
  1631. --------------------------------
  1632. -- After Cast --
  1633. --------------------------------
  1634. function ac_JA(spell)
  1635. end
  1636.  
  1637. function ac_Magic(spell)
  1638. end
  1639.  
  1640. function ac_Item(spell)
  1641. end
  1642.  
  1643. function ac_Global()
  1644. if LockGearIndex == true then
  1645. ChangeGear(LockGearSet)
  1646. msg("Lock Gear is ON -- Swapping Gear")
  1647. else
  1648. if player.status == 'Engaged' then
  1649. EngagedState()
  1650. else
  1651. IdleState()
  1652. end
  1653. end
  1654. end
  1655.  
  1656. ------------------------------------
  1657. -- Framework Core --
  1658. ------------------------------------
  1659. function status_change(new, old)
  1660. if new == 'Idle' then
  1661. IdleState()
  1662. elseif new == 'Resting' then
  1663. RestingState()
  1664. elseif new == 'Engaged' then
  1665. EngagedState()
  1666. end
  1667.  
  1668. if player.status == 'Engaged' and TH == true then
  1669. ChangeGear(set_combine(equipSet, sets.Utility.TH))
  1670. end
  1671.  
  1672. if DT == true then
  1673. ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1674. end
  1675.  
  1676. end
  1677.  
  1678. function pet_midcast(spell, act)
  1679. PetBreathFailover = true
  1680. if string.find(spell.english,'Healing Breath') then
  1681. ChangeGear(sets.HB.Mentos)
  1682. elseif ElementalBreath:contains(spell.english) then
  1683. ChangeGear(sets.HB.Ricola)
  1684. end
  1685. send_command('wait 1.2;gs c PetBreathFailover')
  1686. end
  1687.  
  1688. function pet_aftercast(spell, act, spellMap, eventArgs)
  1689. PetBreathFailover = false
  1690. if spell.action_type == 'Ability' then
  1691. ac_JA(spell)
  1692. elseif spell.action_type == 'Magic' then
  1693. ac_Magic(spell)
  1694. else
  1695. ac_Item(spell)
  1696. end
  1697. ac_Global()
  1698. end
  1699.  
  1700. function precast(spell, act, spellMap, eventArgs)
  1701. if spell_control(spell) then
  1702. cancel_spell()
  1703. return
  1704. end
  1705. if spell.action_type == 'Ability' then
  1706. pc_JA(spell, act)
  1707. elseif spell.action_type == 'Magic' then
  1708. pc_Magic(spell, act)
  1709. else
  1710. pc_Item(spell, act)
  1711. end
  1712.  
  1713. if spell.type:lower() == "weaponskill" and DomainInvasion == true then
  1714. ChangeGear(set_combine(equipSet, sets.Utility.DomainInvasionWS))
  1715. elseif spell.type:lower() == "weaponskill" and SkillchainPending == true then
  1716. if (os.time() - SkillchainTimer) <= 9 and AllowSkillchainGear == true then
  1717. if buffactive["Allies' Roll"] then
  1718. equip(sets.SCDmgAllies)
  1719. else
  1720. equip(sets.SCDmg) -- If the current operating system time (in seconds)
  1721. end -- minus SkillchainTimer variable is less than 9, equip skillchain gear
  1722. else
  1723. SkillchainPending = false
  1724. end
  1725. end
  1726. end
  1727.  
  1728. function midcast(spell, act)
  1729. if spell.action_type == 'Ability' and TH == true then
  1730. ChangeGear(set_combine(equipSet, sets.Utility.TH))
  1731. elseif spell.action_type == 'Ability' then
  1732. mc_JA(spell, act)
  1733. elseif spell.action_type == 'Magic' then
  1734. mc_Magic(spell, act)
  1735. else
  1736. mc_Item(spell, act)
  1737. end
  1738. end
  1739.  
  1740. function aftercast(spell, act, spellMap, eventArgs)
  1741. if spell.action_type == 'Ability' then
  1742. ac_JA(spell)
  1743. elseif spell.action_type == 'Magic' then
  1744. ac_Magic(spell)
  1745. else
  1746. ac_Item(spell)
  1747. end
  1748. ac_Global()
  1749.  
  1750. if player.status == 'Engaged' and DomainInvasion == true then
  1751. ChangeGear(set_combine(equipSet, sets.Utility.DomainInvasionTP))
  1752. end
  1753.  
  1754. --Countdowns--
  1755. if not spell.interrupted then
  1756. if spell.english == "Meditate" then
  1757. send_command('wait 169;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1758. elseif spell.english == "Sekkanoki" then
  1759. send_command('wait 289;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1760. elseif spell.english == "Jump" then
  1761. send_command('wait 49;gs c -cd '..spell.name..': [Ready!]')
  1762. elseif spell.english == "High Jump" then
  1763. send_command('wait 100;gs c -cd '..spell.name..': [Ready!!]')
  1764. elseif spell.english == "Spirit Jump" then
  1765. send_command('wait 49;gs c -cd '..spell.name..': [Ready!]')
  1766. elseif spell.english == "Soul Jump" then
  1767. send_command('wait 100;gs c -cd '..spell.name..': [Ready!!]')
  1768. elseif spell.english == "Angon" then
  1769. send_command('timers create "Angon Defense Down" 90 down')
  1770. elseif spell.type == "WeaponSkill" then
  1771. SkillchainPending = true
  1772. SkillchainTimer = os.time() -- sets SkillchainTimer variable to the current time of the operating system (in seconds)
  1773. end
  1774. end
  1775. end
  1776.  
  1777. function ChangeGear(GearSet)
  1778. equipSet = GearSet
  1779. equip(GearSet)
  1780. end
  1781.  
  1782. function LockGearSet(GearSet)
  1783. LockedEquipSet = GearSet
  1784. equip(GearSet)
  1785. SetLocked = true
  1786. end
  1787.  
  1788. function UnlockGearSet()
  1789. locked = false
  1790. equip(equipSet)
  1791. end
  1792.  
  1793. function msg(str)
  1794. send_command('@input /echo <----- ' .. str .. ' ----->')
  1795. end
  1796.  
  1797. ---End of Rules-------------------------------------------------------------------------------------------------------------------------------------------------------
RAW Paste Data