Advertisement
Spicyryan

RUN lua 27th July 2020

Jul 18th, 2017 (edited)
5,176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.54 KB | None | 0 0
  1. --Built off of my BLU GS
  2. ---Thanks to various sources such as LS members and BlueGartr for the help building this GearSwap.
  3. --------------------------------------------------------------------------------------------------
  4. --This lua starts off defaulted in tanking TP gear. Press alt + F8 or the following macro to disable tanking TP mode:
  5. ---/console gs c toggle TankingTP
  6.  
  7. --Once that is taken off you will automatically be placed back in the TP set index. If you were previously in a set and put tanking gear back on it will resume the previous set in the index.
  8. ---Sets between 1H and 2H weapons are automatically activated after the tanking TP set is off, based on your equiped weapon. 2H weapons get the 2HTP sets and 1H the 1H set.
  9. ----This occasionally throws an error for the rule somewhere around line 1871 depending on what you edit, when you first load the lua. I have never bothered to address this bug as it doesnt impact anything.
  10.  
  11. --Pressing F9 (or a macro, similar to above for tanking) will toggle the currently active set. If tanking is on F9 will toggle tanking TP and ignore the other sets. If 1H TP is active F9 will toggle that and nothing else.
  12. ---If 2H TP is active then it will toggle that and AM3 for Epeo, and vice versa.
  13.  
  14. --Alt + F9 will cycle backwards, F9 just cycles fowards. Useful for pressing buttons once instead of 3 times to cycle one set backwards.
  15.  
  16. --You may cycle tanking TP with alt + f7 regardless of which TPing mode is active. This is useful for using tanking TP sets like MDT or magic evasion as DT sets while DDing with alt + f8 to equip the tanking set back on.
  17.  
  18.  
  19. --Augmented Gear--
  20.  
  21. function get_sets()
  22. maps()
  23.  
  24. AdhemarJacket = {}
  25. AdhemarJacket.Accuracy = { name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}}
  26. AdhemarJacket.Attack = { name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}}
  27. AdhemarJacket.FC = { name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}}
  28.  
  29. CarmineMask = {}
  30. CarmineMask.MND = { name = "Carmine Mask +1", augments = { 'Accuracy+12','DEX+12','MND+20', } }
  31. CarmineMask.FC = { name = "Carmine Mask +1", augments = { 'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4', } }
  32.  
  33. HerculeanHelm = {}
  34. HerculeanHelm.Nuke = { name = "Herculean Helm", augments = { 'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Fast Cast"+1','INT+9','Mag. Acc.+9','"Mag.Atk.Bns."+12', } }
  35. HerculeanHelm.DT = { name = "Herculean Helm", augments = { 'Attack+12', 'Phys. dmg. taken -4%', 'STR+9', 'Accuracy+8', } }
  36. HerculeanHelm.Refesh = { name = "Herculean Helm", augments = { 'Weapon skill damage +2%','Pet: Accuracy+11 Pet: Rng. Acc.+11','"Refresh"+2', } }
  37. HerculeanHelm.WSD = { name = "Herculean Helm", augments = { 'Attack+18','Weapon skill damage +4%','STR+10','Accuracy+12', } }
  38. HerculeanHelm.WSDAcc = { name = "Herculean Helm", augments = { 'Accuracy+23 Attack+23','Weapon skill damage +3%','STR+3','Accuracy+13','Attack+11', } }
  39. HerculeanHelm.Reso = { name="Herculean Helm", augments = {'Accuracy+27','"Triple Atk."+3','STR+3',} }
  40.  
  41. TaeonHead = {}
  42. TaeonHead.SIR = { name="Taeon Chapeau", augments = {'Spell interruption rate down -9%',} }
  43.  
  44. HerculeanVest = {}
  45. HerculeanVest.Phalanx = { name="Herculean Vest", augments = {'Chance of successful block +3','Pet: Attack+4 Pet: Rng.Atk.+4','Phalanx +5','Mag. Acc.+10 "Mag.Atk.Bns."+10',}}
  46. HerculeanVest.CDC = { name="Herculean Vest", augments={'Accuracy+19 Attack+19','Crit. hit damage +3%','DEX+14','Accuracy+3',}}
  47.  
  48. TaeonBody = {}
  49. TaeonBody.FC = { name="Taeon Tabard", augments={'Accuracy+23','"Fast Cast"+5','HP+36',} }
  50. TaeonBody.SIR = { name="Taeon Tabard", augments = {'Spell interruption rate down -8%','STR+7 VIT+7'} }
  51.  
  52. AdhemarWrists = {}
  53. AdhemarWrists.Attack = { name="Adhemar Wrist. +1", augments = {'STR+12','DEX+12','Attack+20',} }
  54. AdhemarWrists.Accuracy = { name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',} }
  55.  
  56. HerculeanGloves = {}
  57. HerculeanGloves.WSD = { name = "Herculean Gloves", augments = { 'Accuracy+21 Attack+21', 'Weapon skill damage +4%', 'Accuracy+9', 'Attack+10', } }
  58. HerculeanGloves.DT = { name = "Herculean Gloves", augments = { 'Accuracy+13', 'Damage taken-3%', 'AGI+1', 'Attack+5', } }
  59. HerculeanGloves.Refresh = { name = "Herculean Gloves", augments = { 'Spell interruption rate down -1%','"Repair" potency +4%','"Refresh"+2','Accuracy+9 Attack+9','Mag. Acc.+16 "Mag.Atk.Bns."+16', } }
  60. HerculeanGloves.Crit = { name = "Herculean Gloves", augments = { 'Attack+23', 'Crit. hit damage +4%', 'DEX+8', 'Accuracy+11', } }
  61. HerculeanGloves.Phalanx = { name="Herculean Gloves", augments={'INT+5','Pet: "Dbl. Atk."+3','Phalanx +4',}}
  62. HerculeanGloves.PhysicalSpells = { name="Herculean Gloves", augments={'Accuracy+11 Attack+11','"Triple Atk."+2','STR+10','Accuracy+15','Attack+5', } }
  63.  
  64. HerculeanLegs = {}
  65. HerculeanLegs.WSD = { name = "Herculean Trousers", augments = { 'Attack+28', 'Weapon skill damage +3%', 'STR+10', 'Accuracy+9', } }
  66. HerculeanLegs.TH = { name = "Herculean Trousers", augments = { 'INT+5','MND+6','"Treasure Hunter"+1','Mag. Acc.+17 "Mag.Atk.Bns."+17', } }
  67. HerculeanLegs.Reso = { name="Herculean Trousers", augments={'Attack+21','"Triple Atk."+2','STR+6','Accuracy+13', } }
  68.  
  69. LustFeet = {}
  70. LustFeet.STRDEX = { name="Lustra. Leggings +1", augments={'HP+65','STR+15','DEX+15',}}
  71. LustFeet.STRDA = { name="Lustra. Leggings +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}}
  72.  
  73. HerculeanFeet = {}
  74. HerculeanFeet.QA = { name = "Herculean Boots", augments = {'AGI+4','"Dbl.Atk."+2','Quadruple Attack +3','Accuracy+4 Attack+4', } }
  75. HerculeanFeet.TA = { name = "Herculean Boots", augments = { 'Accuracy+14 Attack+14', '"Triple Atk."+4', 'DEX+3', 'Accuracy+2', 'Attack+15' } }
  76. HerculeanFeet.DT = { name = "Herculean Boots", augments = { 'Accuracy+23', 'Damage taken -3%' } }
  77. HerculeanFeet.Idle = { name = "Herculean Boots", augments = { 'Crit. hit damage +1%','STR+10','"Refresh"+2','Accuracy+15 Attack+15','Mag. Acc.+17 "Mag.Atk.Bns."+17', } }
  78. HerculeanFeet.CritDmg = { name = "Herculean Boots", augments = { 'Accuracy+28', 'Crit. hit damage +5%', 'DEX+9' } }
  79. HerculeanFeet.WSD = { name = "Herculean Boots", augments = { 'INT+3','AGI+5','Weapon skill damage +9%','Accuracy+12 Attack+12','Mag. Acc.+13 "Mag.Atk.Bns."+13'} }
  80. HerculeanFeet.DW = { name = "Herculean Boots", augments = { 'Accuracy+3 Attack+3','"Dual Wield"+4','AGI+3','Accuracy+14', } }
  81. HerculeanFeet.Phalanx = { name = "Herculean Boots", augments = { '"Store TP"+1','INT+10','Phalanx +3','Accuracy+16 Attack+16','Mag. Acc.+19 "Mag.Atk.Bns."+19' } }
  82. HerculeanFeet.TH = { name="Herculean Boots", augments = { 'Phys. dmg. taken -2%','Pet: Phys. dmg. taken -2%','"Treasure Hunter"+2','Accuracy+16 Attack+16','Mag. Acc.+18 "Mag.Atk.Bns."+18', } }
  83.  
  84. Ogma = {}
  85. Ogma.TP = { name="Ogma's cape", augments = { 'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%', } }
  86. Ogma.Tank = { name="Ogma's cape", augments={ 'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','System: 1 ID: 1155 Val: 4', } } -- 10% PDT
  87. Ogma.WSD = { name = "Ogma's Cape", augments = { 'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%', } }
  88. Ogma.Reso = { name="Ogma's cape", augments={ 'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10', } }
  89. Ogma.FC = { name = "Ogma's Cape", augments = { 'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10','Spell interruption rate down-10%', } }
  90.  
  91. ------End of Augmented Gear-----------------------------------------------------------------------------------------------------------------------------
  92. --Idle Sets--
  93. sets.Idle = {}
  94. sets.Idle.index = { 'DT', 'Standard', 'BuffDuration', }
  95. Idle_ind = 2
  96. sets.Idle.DT = {
  97. ammo = "Staunch Tathlum +1",
  98. head = "Futhark Bandeau +2",
  99. neck = "Futhark Torque +1",
  100. ear1 = "Etiolation Earring",
  101. ear2 = "Odnowa Earring +1",
  102. body = "Futhark Coat +3",
  103. hands = HerculeanGloves.Refresh,
  104. ring1 = "Defending ring",
  105. ring2 = "Shadow Ring",
  106. back = Ogma.Tank,
  107. waist = "Flume Belt",
  108. legs = "Carmine Cuisses +1",
  109. feet = HerculeanFeet.Idle
  110. }
  111.  
  112. sets.Idle.Standard = {
  113. ammo = "Homiliary",
  114. head = "Turms Cap +1",
  115. neck = "Futhark Torque +1",
  116. ear2 = "Genmei Earring",
  117. ear1 = "Etiolation earring",
  118. body = "Runeist's Coat +3",
  119. hands = HerculeanGloves.Refresh,
  120. ring1 = "Sheltered ring",
  121. ring2 = "Karieyh Ring +1",
  122. back = Ogma.Tank,
  123. waist = "Flume Belt",
  124. legs = "Carmine Cuisses +1",
  125. feet = HerculeanFeet.Idle
  126. }
  127.  
  128. sets.Idle.BuffDuration = set_combine(sets.Idle.Standard, {
  129. head = "Erilaz Galea +1",
  130. ring2 = "Karieyh Ring +1",
  131. legs = "Futhark Trousers +2",
  132. })
  133.  
  134.  
  135.  
  136. --Dat Waifu--
  137. sets.Idle.Town = set_combine(sets.Idle.Standard, {
  138. ring1 = "Matrimony ring",
  139. })
  140.  
  141. -------TP Sets-------------------------------------------
  142.  
  143. ---------------------
  144. --OneHanded TP Sets--
  145. ---------------------
  146.  
  147. sets.OneHandedTP = {}
  148. sets.OneHandedTP.index = { 'DualWield', 'CapHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  149. OneHandedTP_ind = 1
  150. --+31 needed with just Haste II
  151. sets.OneHandedTP.DualWield = {
  152. ammo = "Aurgelmir Orb +1",
  153. head = "Adhemar Bonnet +1",
  154. neck = "Anu Torque",
  155. ear1 = "Suppanomimi",
  156. ear2 = "Sherida Earring",
  157. body = AdhemarJacket.Accuracy,
  158. hands = AdhemarWrists.Attack,
  159. ring1 = "Epona's ring",
  160. ring2 = "Niqmaddu Ring",
  161. back = Ogma.TP,
  162. waist = "Reiki Yotai",
  163. legs = "Carmine Cuisses +1",
  164. feet = HerculeanFeet.DW
  165. }
  166.  
  167. sets.OneHandedTP.CapHaste = {
  168. ammo = "Aurgelmir Orb +1",
  169. head = "Adhemar Bonnet +1",
  170. neck = "Anu Torque",
  171. ear1 = "Suppanomimi",
  172. ear1 = "Suppanomimi",
  173. ear2 = "Sherida Earring",
  174. body = AdhemarJacket.Accuracy,
  175. hands = AdhemarWrists.Attack,
  176. ring1 = "Epona's ring",
  177. ring2 = "Niqmaddu Ring",
  178. back = Ogma.TP,
  179. waist = "Windbuffet Belt +1",
  180. legs = "Samnuha Tights",
  181. feet = HerculeanFeet.QA
  182. }
  183.  
  184. sets.OneHandedTP.AccuracyLite = {
  185. ammo = "Yamarang",
  186. head = "Adhemar Bonnet +1",
  187. neck = "Combatant's Torque",
  188. ear1 = "Suppanomimi",
  189. ear2 = "Sherida Earring",
  190. body = AdhemarJacket.Accuracy,
  191. hands = AdhemarWrists.Attack,
  192. ring1 = "Epona's ring",
  193. ring2 = "Niqmaddu Ring",
  194. back = Ogma.TP,
  195. waist = "Kentarch Belt +1",
  196. legs = "Samnuha Tights",
  197. feet = HerculeanFeet.TA
  198. }
  199.  
  200. sets.OneHandedTP.AccuracyMid = {
  201. ammo = "Yamarang",
  202. head = "Dampening Tam",
  203. neck = "Combatant's Torque",
  204. ear1 = "Suppanomimi",
  205. ear2 = "Telos Earring",
  206. body = AdhemarJacket.Accuracy,
  207. hands = AdhemarWrists.Attack,
  208. ring1 = "Epona's ring",
  209. ring2 = "Niqmaddu Ring",
  210. back = Ogma.TP,
  211. waist = "Kentarch Belt +1",
  212. legs = "Samnuha Tights",
  213. feet = HerculeanFeet.TA
  214. }
  215.  
  216. sets.OneHandedTP.AccuracyFull = {
  217. ammo = "Yamarang",
  218. head = CarmineMask.MND,
  219. neck = "Combatant's Torque",
  220. ear1 = "Mache Earring +1",
  221. ear2 = "Telos Earring",
  222. body = AdhemarJacket.Accuracy,
  223. hands = AdhemarWrists.Accuracy,
  224. ring1 = "Cacoethic Ring +1",
  225. ring2 = "Niqmaddu Ring",
  226. back = Ogma.TP,
  227. waist = "Kentarch Belt +1",
  228. legs = "Carmine Cuisses +1",
  229. feet = HerculeanFeet.CritDmg
  230. }
  231.  
  232. ---------------------
  233. --TwoHanded TP Sets--
  234. ---------------------
  235.  
  236. sets.TwoHandedTP = {}
  237. sets.TwoHandedTP.index = { 'CapHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  238. TwoHandedTP_ind = 1
  239.  
  240. sets.TwoHandedTP.CapHaste = {
  241. ammo = "Aurgelmir Orb +1",
  242. head = "Adhemar Bonnet +1",
  243. neck = "Anu Torque",
  244. ear1 = "Telos Earring",
  245. ear2 = "Sherida Earring",
  246. body = AdhemarJacket.Accuracy,
  247. hands = AdhemarWrists.Attack,
  248. ring1 = "Epona's ring",
  249. ring2 = "Niqmaddu Ring",
  250. back = Ogma.TP,
  251. waist = "Windbuffet Belt +1",
  252. legs = "Samnuha Tights",
  253. feet = HerculeanFeet.QA
  254. }
  255.  
  256. sets.TwoHandedTP.AccuracyLite = {
  257. ammo = "Yamarang",
  258. head = "Adhemar Bonnet +1",
  259. neck = "Combatant's Torque",
  260. ear1 = "Telos Earring",
  261. ear2 = "Sherida Earring",
  262. body = AdhemarJacket.Accuracy,
  263. hands = AdhemarWrists.Attack,
  264. ring1 = "Epona's ring",
  265. ring2 = "Niqmaddu Ring",
  266. back = Ogma.TP,
  267. waist = "Ioskeha Belt +1",
  268. legs = "Samnuha Tights",
  269. feet = HerculeanFeet.TA
  270. }
  271.  
  272. sets.TwoHandedTP.AccuracyMid = {
  273. ammo = "Yamarang",
  274. head = "Dampening Tam",
  275. neck = "Combatant's Torque",
  276. ear1 = "Telos Earring",
  277. ear2 = "Sherida Earring",
  278. body = AdhemarJacket.Accuracy,
  279. hands = AdhemarWrists.Attack,
  280. ring1 = "Epona's ring",
  281. ring2 = "Niqmaddu Ring",
  282. back = Ogma.TP,
  283. waist = "Ioskeha Belt +1",
  284. legs = "Samnuha Tights",
  285. feet = HerculeanFeet.TA
  286. }
  287.  
  288. sets.TwoHandedTP.AccuracyFull = {
  289. ammo = "Yamarang",
  290. head = CarmineMask.MND,
  291. neck = "Combatant's Torque",
  292. ear1 = "Telos Earring",
  293. ear2 = "Mache Earring +1",
  294. body = AdhemarJacket.Accuracy,
  295. hands = AdhemarWrists.Accuracy,
  296. ring1 = "Cacoethic Ring +1",
  297. ring2 = "Niqmaddu Ring",
  298. back = Ogma.TP,
  299. waist = "Ioskeha Belt +1",
  300. legs = "Carmine Cuisses +1",
  301. feet = HerculeanFeet.CritDmg
  302. }
  303.  
  304. -------------------
  305. --EpeoAM3 TP Sets--
  306. -------------------
  307.  
  308. sets.EpeoAM3 = {}
  309. sets.EpeoAM3.index = { 'CapHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  310. EpeoAM3_ind = 1 -- In the same rule as the 2H TP Toggle so it toggles it at the same time
  311.  
  312. sets.EpeoAM3.CapHaste = set_combine(sets.TwoHandedTP.CapHaste, {
  313. body = "Ashera Harness",
  314. ring1 = "Petrov Ring",
  315. waist = "Kentarch Belt +1",
  316. --feet = "Carmine Greaves +1"
  317.  
  318. })
  319.  
  320. sets.EpeoAM3.AccuracyLite = set_combine(sets.TwoHandedTP.AccuracyLite, {
  321. body = "Ashera Harness",
  322. ring1 = "Petrov Ring",
  323. waist = "Kentarch Belt +1",
  324. --feet = "Carmine Greaves +1"
  325. })
  326.  
  327. sets.EpeoAM3.AccuracyMid = set_combine(sets.TwoHandedTP.AccuracyMid, {
  328. body = "Ashera Harness",
  329. ring1 = "Petrov Ring",
  330. waist = "Kentarch Belt +1"
  331. })
  332.  
  333. sets.EpeoAM3.AccuracyFull = set_combine(sets.TwoHandedTP.AccuracyFull, {
  334. body = "Ashera Harness",
  335. ear2 = "Dignitary's Earring",
  336. waist = "Kentarch Belt +1"
  337. })
  338.  
  339. -------------------
  340. --Tanking TP Sets--
  341. -------------------
  342.  
  343. sets.TankingTP = {}
  344. sets.TankingTP.index = { 'Tank', 'TankHyb', 'DDHyb', 'DDHybAcc'}
  345. TankingTP_ind = 1
  346.  
  347. sets.TankingTP.Tank = {
  348. ammo = "Staunch Tathlum +1",
  349. head = "Turms Cap +1",
  350. neck = "Futhark Torque +1",
  351. ear1 = "Eabani Earring",
  352. ear2 = "Odnowa Earring +1",
  353. body = "Ashera Harness",
  354. hands = "Turms Mittens +1",
  355. ring1 = "Defending ring",
  356. ring2 = "Gelatinous Ring +1",
  357. back = Ogma.Tank,
  358. -- back = "Repulse Mantle",
  359. waist = "Engraved Belt",
  360. -- waist = "Flume Belt",
  361. legs = "Erilaz Leg Guards +1",
  362. feet = "Turms Leggings +1"
  363. }
  364. --Capped DT with DD Gear
  365. sets.TankingTP.TankHyb = {
  366. ammo = "Staunch Tathlum +1",
  367. head = "Meghanada Visor +2",
  368. neck = "Futhark Torque +1",
  369. ear1 = "Telos Earring",
  370. ear2 = "Sherida Earring",
  371. body = "Ashera Harness",
  372. hands = AdhemarWrists.Accuracy,
  373. ring1 = "Defending ring",
  374. ring2 = "Gelatinous Ring +1",
  375. back = Ogma.TP,
  376. waist = "Ioskeha Belt +1",
  377. legs = "Meghanada Chausses +2",
  378. feet = HerculeanFeet.DT
  379. }
  380. --Low DT with DD Gear
  381. sets.TankingTP.DDHyb = {
  382. ammo = "Yamarang",
  383. head = "Dampening Tam",
  384. neck = "Futhark Torque +1",
  385. ear1 = "Telos Earring",
  386. ear2 = "Sherida Earring",
  387. body = "Ashera Harness",
  388. hands = AdhemarWrists.Attack,
  389. ring1 = "Defending ring",
  390. ring2 = "Niqmaddu Ring",
  391. back = Ogma.TP,
  392. waist = "Ioskeha Belt +1",
  393. legs = "Meghanada Chausses +2",
  394. feet = HerculeanFeet.TA
  395. }
  396. --Mid DT with Acc
  397. sets.TankingTP.DDHybAcc = {
  398. ammo = "Yamarang",
  399. head = CarmineMask.MND,
  400. neck = "Futhark Torque +1",
  401. ear1 = "Telos Earring",
  402. ear2 = "Mache Earring +1",
  403. body = "Ashera Harness",
  404. hands = AdhemarWrists.Accuracy,
  405. ring1 = "Defending ring",
  406. ring2 = "Niqmaddu Ring",
  407. back = Ogma.TP,
  408. waist = "Ioskeha Belt +1",
  409. legs = "Carmine Cuisses +1",
  410. feet = HerculeanFeet.DT
  411. }
  412. ------End of TP--------------------------------------------------------------------------------------------------------------------
  413. --WS Sets--
  414. sets.WS = {}
  415.  
  416. sets.Requiescat = {}
  417.  
  418. sets.Requiescat.index = { 'Attack', 'Accuracy' }
  419. Requiescat_ind = 1
  420.  
  421. sets.Requiescat.Attack = {
  422. ammo = "Hydrocera",
  423. head = CarmineMask.MND,
  424. neck = "Fotia Gorget",
  425. ear1 = "Moonshade Earring",
  426. ear2 = "Sherida Earring",
  427. body = AdhemarJacket.Accuracy,
  428. hands = AdhemarWrists.Attack,
  429. ring1 = "Epona's ring",
  430. ring2 = "Regal Ring",
  431. back = Ogma.Reso,
  432. waist = "Fotia Belt",
  433. legs = "Meghanada Chausses +2",
  434. feet = "Carmine Greaves +1"
  435. }
  436.  
  437. sets.Requiescat.Accuracy = {
  438. ammo = "Yamarang",
  439. head = CarmineMask.MND,
  440. neck = "Fotia Gorget",
  441. ear1 = "Cessance Earring",
  442. ear2 = "Telos Earring",
  443. body = AdhemarJacket.Accuracy,
  444. hands = AdhemarWrists.Attack,
  445. ring1 = "Epona's ring",
  446. ring2 = "Regal Ring",
  447. back = " ",
  448. waist = "Fotia Belt",
  449. legs = "Telchine Braconi",
  450. feet = "Carmine Greaves +1"
  451. }
  452.  
  453. sets.Resolution = {}
  454.  
  455. sets.Resolution.index = { 'AttackUncap', 'AttackCap', 'Accuracy' }
  456. Resolution_ind = 1
  457.  
  458. sets.Resolution.AttackUncap = {
  459. ammo = "Voluspa Tathlum",
  460. head = "Lustratio Cap +1",
  461. neck = "Fotia Gorget",
  462. ear1 = "Moonshade Earring",
  463. ear2 = "Sherida Earring",
  464. body = AdhemarJacket.Attack,
  465. hands = AdhemarWrists.Attack,
  466. ring1 = "Regal Ring",
  467. ring2 = "Niqmaddu Ring",
  468. back = Ogma.Reso,
  469. waist = "Fotia Belt",
  470. legs = "Meghanada Chausses +2",
  471. feet = LustFeet.STRDA
  472. }
  473.  
  474. sets.Resolution.AttackCap = {
  475. ammo = "Knobkierrie",
  476. head = "Lustratio Cap +1",
  477. neck = "Fotia Gorget",
  478. ear1 = "Moonshade Earring",
  479. ear2 = "Sherida Earring",
  480. body = "Lustratio Harness +1",
  481. hands = AdhemarWrists.Attack,
  482. ring1 = "Epona's Ring",
  483. ring2 = "Niqmaddu Ring",
  484. back = Ogma.Reso,
  485. waist = "Fotia Belt",
  486. legs = "Samnuha Tights",
  487. feet = LustFeet.STRDEX
  488. }
  489.  
  490. sets.Resolution.Accuracy = {
  491. ammo = "Voluspa Tathlum",
  492. head = HerculeanHelm.Reso,
  493. neck = "Fotia Gorget",
  494. ear1 = "Moonshade Earring",
  495. ear2 = "Sherida Earring",
  496. body = AdhemarJacket.Attack,
  497. hands = AdhemarWrists.Attack,
  498. ring1 = "Regal Ring",
  499. ring2 = "Niqmaddu Ring",
  500. back = Ogma.Reso,
  501. waist = "Fotia Belt",
  502. legs = "Meghanada Chausses +2",
  503. feet = HerculeanFeet.TA
  504. }
  505.  
  506. --Ive never once used this WS on RUN, yet upon sharing my .lua with Carrot she called me out on this. There is a a lot of garbage in here I haven't even looked at, but left here just in case. RUN feels the most like that out of any job.
  507. sets.SanguineBlade = {
  508. ammo = "Pemphredo Tathlum",
  509. head = "Pixie Hairpin +1",
  510. neck = "Sanctity Necklace",
  511. ear1 = "Friomisi Earring",
  512. ear2 = "Hecate's Earring",
  513. body = "Samnuha Coat",
  514. hands = "Leyline Gloves",
  515. ring1 = "Archon Ring",
  516. ring2 = "Shiva Ring +1",
  517. back = "Evasionist's Cape",
  518. waist = "Eschan Stone",
  519. legs = "",
  520. feet = HerculeanFeet.DT
  521. }
  522.  
  523. sets.Dimidiation = {}
  524.  
  525. sets.Dimidiation.index = { 'AttackUncap', 'AttackCap', 'Accuracy' }
  526. Dimidiation_ind = 1
  527.  
  528. sets.Dimidiation.AttackUncap = {
  529. ammo="Knobkierrie",
  530. head="Lustratio Cap +1",
  531. neck="Caro Necklace",
  532. ear1="Moonshade earring",
  533. ear2="Sherida Earring",
  534. body=AdhemarJacket.Accuracy,
  535. hands="Meghanada Gloves +2",
  536. ring2="Niqmaddu Ring",
  537. ring1="Ilabrat Ring",
  538. back=Ogma.WSD,
  539. waist="Grunfeld Rope",
  540. legs="Lustratio Subligar +1",
  541. feet=LustFeet.STRDEX
  542. }
  543.  
  544. sets.Dimidiation.AttackCap = {
  545. ammo="Knobkierrie",
  546. head="Lustratio Cap +1",
  547. neck="Fotia Gorget",
  548. ear1="Moonshade earring",
  549. ear2="Sherida Earring",
  550. body=AdhemarJacket.Accuracy,
  551. hands="Meghanada Gloves +2",
  552. ring2="Niqmaddu Ring",
  553. ring1="Epona's Ring",
  554. back=Ogma.WSD,
  555. waist="Fotia Belt",
  556. legs="Lustratio Subligar +1",
  557. feet=LustFeet.STRDEX
  558. }
  559.  
  560. sets.Dimidiation.Accuracy = {
  561. ammo="Voluspa Tathlum",
  562. head=HerculeanHelm.WSDAcc,
  563. neck="Fotia Gorget",
  564. ear1="Moonshade earring",
  565. ear2="Mache Earring +1",
  566. body=AdhemarJacket.Accuracy,
  567. hands="Meghanada Gloves +2",
  568. ring2="Niqmaddu Ring",
  569. ring1="Ilabrat Ring",
  570. back=Ogma.WSD,
  571. waist="Grunfeld Rope",
  572. legs="Meghanada Chausses +2",
  573. feet=HerculeanFeet.TA
  574. }
  575.  
  576. sets.SavageBlade = {}
  577.  
  578. sets.SavageBlade.index = { 'Attack', 'Accuracy' }
  579. SavageBlade_ind = 1
  580. sets.SavageBlade.Attack = {
  581. ammo = "Knobkierrie",
  582. head = HerculeanHelm.WSD,
  583. neck = "Caro Necklace",
  584. ear1 = "Moonshade Earring",
  585. ear2 = "Sherida Earring",
  586. body = HerculeanVest.WSD,
  587. hands = "Meghanada Gloves +2",
  588. ring1 = "Karieyh Ring +1",
  589. ring2 = "Niqmaddu Ring",
  590. back = Ogma.WSD,
  591. waist = "Sailfi Belt +1",
  592. legs = HerculeanLegs.WSD,
  593. feet = HerculeanFeet.WSD
  594. }
  595.  
  596. sets.SavageBlade.Accuracy = {
  597. ammo = "Voluspa Tathlum",
  598. head = HerculeanHelm.WSD,
  599. neck = "Fotia Gorget",
  600. ear1 = "Moonshade Earring",
  601. ear2 = "Telos Earring",
  602. body = AdhemarJacket.Accuracy,
  603. hands = "Meghanada Gloves +2",
  604. ring2 = "Karieyh Ring +1",
  605. ring1 = "Regal Ring",
  606. back = Ogma.WSD,
  607. waist = "Sailfi Belt +1",
  608. legs = HerculeanLegs.WSD,
  609. feet = HerculeanFeet.WSD
  610. }
  611.  
  612. sets.FlashNova = {
  613. ammo = "Pemphredo Tathlum",
  614. head = HerculeanHelm.Nuke,
  615. neck = "Sanctity Necklace",
  616. ear1 = "Friomisi Earring",
  617. ear2 = "Hecate's Earring",
  618. body = "Samnuha Coat",
  619. hands = "Leyline Gloves",
  620. ring1 = "Shiva Ring +1",
  621. ring2 = "Shiva Ring +1",
  622. back = "Evasionist's Cape",
  623. waist = "Eschan Stone",
  624. legs = "",
  625. feet = HerculeanFeet.DT
  626. }
  627.  
  628. sets.BlackHalo = {}
  629.  
  630. sets.BlackHalo.index = { 'Attack', 'Accuracy' }
  631. BlackHalo_ind = 1
  632. sets.BlackHalo.Attack = {
  633. ammo = "Knobkierrie",
  634. head = HerculeanHelm.WSD,
  635. neck = "Caro Necklace",
  636. ear1 = "Moonshade Earring",
  637. ear2 = "Sherida Earring",
  638. body = HerculeanVest.WSD,
  639. hands = "Meghanada Gloves +2",
  640. ring1 = "Regal Ring",
  641. ring2 = "Niqmaddu Ring",
  642. back = Ogma.WSD,
  643. waist = "Sailfi Belt +1",
  644. legs = HerculeanLegs.WSD,
  645. feet = HerculeanFeet.WSD
  646. }
  647.  
  648. sets.BlackHalo.Accuracy = set_combine(sets.BlackHalo.Attack, {})
  649.  
  650. sets.Realmrazer = {}
  651.  
  652. sets.Realmrazer.index = { 'Attack', 'Accuracy' }
  653. Realmrazer_ind = 1
  654. sets.Realmrazer.Attack = {
  655. ammo = "Hydrocera",
  656. head = CarmineMask.MND,
  657. neck = "Fotia Gorget",
  658. ear1 = "Moonshade Earring",
  659. ear2 = "Sherida Earring",
  660. body = AdhemarJacket.Accuracy,
  661. hands = HerculeanGloves.WSD,
  662. ring1 = "Epona's ring",
  663. ring2 = "Rufescent Ring",
  664. back = "Cornflower Cape",
  665. waist = "Fotia Belt",
  666. legs = "Telchine Braconi",
  667. feet = "Carmine Greaves +1"
  668. }
  669.  
  670. sets.Realmrazer.Accuracy = set_combine(sets.Realmrazer.Attack, {})
  671. ------End of WS------------------------------------------------------------------------------------------
  672. ------Magic Sets---
  673. sets.BlueMagic = {}
  674.  
  675. sets.BlueMagic.STR = set_combine(sets.Resolution.Attack, {
  676. })
  677.  
  678. --Curing Sets--
  679. sets.Cures = {
  680. ammo = "Hydrocera",
  681. head = CarmineMask.MND,
  682. neck = "Phalaina Locket",
  683. ear1 = "Mendicant's Earring",
  684. ear2 = "Magnetic Earring",
  685. body = "Vrikodara Jupon",
  686. hands = "Rawhide Gloves",
  687. ring1 = "Stikini Ring +1",
  688. ring2 = "Rufescent Ring",
  689. back = "Solemnity Cape",
  690. waist = "Luminary Sash",
  691. legs = "Carmine Cuisses +1",
  692. feet = "Skaoi Boots"
  693. }
  694.  
  695. sets.Cures.SelfCures = set_combine(sets.Cures, {
  696. ring1 = "Kunaji Ring",
  697. waist = "Gishdubar Sash",
  698. })
  699. --Spell Interruption Rate--
  700. sets.SIR = {
  701. ammo = "Staunch Tathlum +1",
  702. head = "Halitus Helm",
  703. neck = "Moonlight Necklace",
  704. ear1 = "Magnetic Earring",
  705. ear2 = "Cryptic Earring",
  706. body = TaeonBody.SIR,
  707. hands = "Rawhide Gloves",
  708. ring1 = "Defending Ring",
  709. ring2 = "Evanescence Ring",
  710. back = Ogma.FC,
  711. waist = "Rumination Sash",
  712. legs = "Carmine Cuisses +1",
  713. feet = "Taeon Boots"
  714. }
  715. ------End of Magic-------------------------------------------------------------------------------------
  716. --Enmity Set--
  717.  
  718. sets.Enmity = {
  719. ammo = "Sapience Orb",
  720. head = "Halitus Helm",
  721. neck = "Moonlight Necklace",
  722. ear1 = "Friomisi Earring",
  723. ear2 = "Cryptic Earring",
  724. body = "Emet Harness +1",
  725. hands = "Kurys Gloves",
  726. ring1 = "Supershear Ring",
  727. ring2 = "Eihwaz Ring",
  728. back = Ogma.Tank,
  729. waist = "Kasiri Belt",
  730. legs = "Erilaz Leg Guards +1",
  731. feet = "Ahosi Leggings"
  732. }
  733.  
  734. --Utility Sets--
  735.  
  736. sets.Utility = {}
  737.  
  738. sets.Utility.TH = {
  739. head = "Volte Cap",
  740. waist = "Chaac Belt",
  741. legs = HerculeanLegs.TH,
  742. feet = HerculeanFeet.TH
  743. }
  744.  
  745. sets.Utility.Derp = {
  746. ammo = "Staunch Tathlum +1",
  747. head = "Turms Cap +1",
  748. neck = "Warder's Charm +1",
  749. ear1 = "Genmei Earring",
  750. ear2 = "Eabani Earring",
  751. body = "Ashera Harness",
  752. hands = "Turms Mittens +1",
  753. ring1 = "Defending ring",
  754. ring2 = "Gelatinous Ring +1",
  755. back = Ogma.Tank,
  756. waist = "Engraved Belt",
  757. legs = "Erilaz Leg Guards +1",
  758. feet = "Erilaz Greaves +1"
  759. }
  760.  
  761. sets.Utility.MDTTank = {
  762. ammo = "Staunch Tathlum +1",
  763. head = "Erilaz Galea +1",
  764. neck = "Warder's Charm +1",
  765. ear1 = "Etiolation Earring",
  766. ear2 = "Odnowa Earring +1",
  767. body = "Runeist's Coat +3",
  768. hands = HerculeanGloves.DT,
  769. ring1 = "Defending ring",
  770. ring2 = "Shadow Ring",
  771. back = Ogma.Tank,
  772. waist = "Engraved Belt",
  773. legs = "Erilaz Leg Guards +1",
  774. feet = "Erilaz Greaves +1"
  775. }
  776.  
  777. --Shell V on. Need 21% MDT, 19% with sheltered.
  778. sets.Utility.MDTV = {
  779. }
  780.  
  781. --Shell II only--
  782. sets.Utility.MDTII = {
  783. }
  784.  
  785. --No Shell--
  786. sets.Utility.MDTNO = {
  787. }
  788.  
  789. --Telchine with proper ball busting augments is the best for magic evasion--
  790. sets.Utility.MEVA = {
  791. }
  792.  
  793. ---------------------------------------------------------------
  794.  
  795. sets.Utility.Charm = {
  796. ammo = "Staunch Tathlum +1",
  797. head = "Futhark Bandeau +2",
  798. neck = "Unmoving Collar +1",
  799. ear1 = "Genmei Earring",
  800. ear2 = "Hearty Earring",
  801. body = "Ashera Harness", --Just for the Orc Ambuscade
  802. --body = "Runeist's Coat +3",
  803. hands = "Erilaz Gauntlets +1",
  804. ring1 = "Defending Ring",
  805. ring2 = "Wuji Ring",
  806. back = "Solemnity Cape",
  807. waist = "Flume Belt",
  808. legs = "Runeist's Trousers +3",
  809. feet = "Erilaz Greaves +1"
  810. }
  811.  
  812. sets.Utility.Doom = {
  813. ring1 = "Saida Ring",
  814. ring2 = "Purity Ring",
  815. waist = "Gishdubar Sash"
  816. }
  817.  
  818. sets.Utility.Death = {
  819. ammo = "Staunch Tathlum +1",
  820. head = "Futhark Bandeau +2",
  821. neck = "Futhark Torque +1",
  822. ear1 = "Genmei Earring",
  823. ear2 = "Odnowa Earring +1",
  824. body = "Samnuha Coat",
  825. hands = "Turms Mittens +1",
  826. ring1 = "Defending ring",
  827. ring2 = "Shadow Ring",
  828. back = Ogma.Tank,
  829. waist = "Flume Belt",
  830. legs = "Erilaz Leg Guards +1",
  831. feet = "Turms Leggings +1"
  832. }
  833.  
  834. --Enhancing Sets--
  835.  
  836. sets.Enhancing = {}
  837.  
  838. sets.Enhancing.Skill = {
  839. ammo = "Sapience Orb",
  840. head = CarmineMask.MND,
  841. neck = "Incanter's Torque",
  842. ear1 = "Andoaa Earring",
  843. ear2 = "Loquacious Earring",
  844. body = "Manasa Chasuble",
  845. hands = "Runeist's Mitons +3",
  846. ring1 = "Defending Ring",
  847. ring2 = "Stikini Ring +1",
  848. back = "Moonbeam Cape",
  849. waist = "Flume Belt",
  850. legs = "Carmine Cuisses +1",
  851. feet = "Erilaz Greaves +1"
  852. }
  853.  
  854. sets.Enhancing.Duration = {
  855. ammo = "Sapience Orb",
  856. head = "Erilaz Galea +1",
  857. neck = "Incanter's Torque",
  858. ear1 = "Andoaa Earring",
  859. ear2 = "Loquacious Earring",
  860. body = "Futhark Coat +3",
  861. hands = "Runeist's Mitons +3",
  862. ring1 = "Defending Ring",
  863. ring2 = "Stikini Ring +1",
  864. back = "Moonbeam Cape",
  865. waist = "Flume Belt",
  866. legs = "Futhark Trousers +2",
  867. feet = "Erilaz Greaves +1"
  868. }
  869.  
  870. sets.Enhancing.Phalanx = set_combine(sets.Enhancing.Duration, {
  871. head = "Futhark Bandeau +2",
  872. body = HerculeanVest.Phalanx,
  873. hands = HerculeanGloves.Phalanx,
  874. feet = HerculeanFeet.Phalanx
  875. })
  876.  
  877. sets.Enhancing.Refresh = set_combine(sets.Enhancing.Duration, {
  878. waist = "Gishdubar Sash",
  879. })
  880.  
  881. sets.Enhancing.Regen = set_combine(sets.Enhancing.Duration, {
  882. head = "Runeist's Bandeau +3",
  883. })
  884.  
  885. sets.Enhancing.ProShell = set_combine(sets.Enhancing.Duration, {
  886. Ring2 = "Sheltered Ring",
  887. })
  888.  
  889. sets.Enhancing.Foil = set_combine(sets.Enmity, {
  890. head = "Erilaz Galea +1",
  891. legs = "Futhark Trousers +2"
  892. })
  893.  
  894. --Job Ability Sets--
  895.  
  896. sets.JA = {}
  897.  
  898. sets.JA.Lunge = {
  899. ammo = "Pemphredo Tathlum",
  900. head = HerculeanHelm.Nuke,
  901. neck = "Baetyl Pendant",
  902. ear1 = "Friomisi Earring",
  903. ear2 = "Hecate's Earring",
  904. body = "Samnuha Coat",
  905. hands = "Leyline Gloves",
  906. ring1 = "Shiva Ring +1",
  907. ring2 = "Shiva Ring +1",
  908. back = "Evasionist's Cape",
  909. waist = "Eschan Stone",
  910. legs = HerculeanLegs.Magic,
  911. feet = "Adhemar Gamashes +1"
  912. }
  913.  
  914. sets.JA.Sforzo = set_combine(sets.Enmity, {
  915. body = "Futhark Coat +3"
  916. })
  917.  
  918. sets.JA.Swordplay = set_combine(sets.Enmity, {
  919. hands = "Futhark Mitons +1"
  920. })
  921.  
  922. sets.JA.Vallation = set_combine(sets.Enmity, {
  923. body = "Runeist's Coat +3",
  924. legs = "Futhark Trousers +2",
  925. back = "Ogma's Cape"
  926. })
  927.  
  928. sets.JA.Pflug = set_combine(sets.Enmity, {
  929. -- feet = "Runeist's Boots +3" --Unfortunately it was discovered that the feet must be equiped during the status check to add the extra resistance +4% (per rune) . Certainly, it is conceivable that these be great in some random situation. I would assert that it is almost never worth losing more magic evasion and inquartata from Turms +1 feet in favor of Pflug. :(
  930. })
  931.  
  932. sets.JA.Valiance = set_combine(sets.Enmity, {
  933. body = "Runeist's Coat +3",
  934. legs = "Futhark Trousers +2",
  935. back = Ogma.Tank
  936. })
  937.  
  938. sets.JA.Embolden = set_combine(sets.Enmity, {
  939. })
  940.  
  941. sets.JA.Pulse = set_combine(sets.Enmity, {
  942. head = "Erilaz Galea +1",
  943. neck = "Incanter's Torque",
  944. ring2 = "Stikini Ring +1",
  945. legs = "Runeist's Trousers +3"
  946. })
  947.  
  948. sets.JA.Gambit = set_combine(sets.Enmity, {
  949. hands = "Runeist's Mitons +3"
  950. })
  951.  
  952. sets.JA.Battuta = set_combine(sets.Enmity, {
  953. head = "Futhark Bandeau +2"
  954. })
  955.  
  956. sets.JA.Rayke = set_combine(sets.Enmity, {
  957. feet = "Futhark Boots +1"
  958. })
  959.  
  960. sets.JA.Liement = set_combine(sets.Enmity, {
  961. body = "Futhark Coat +3"
  962. })
  963. --One For All is HP * .2 = Magic Damage Reduction--
  964. sets.JA.One = set_combine(sets.Enmity, {
  965. ammo = "Falcon Eye",
  966. head = "Halitus Helm",
  967. neck = "Sanctity Necklace",
  968. ear1 = "Etiolation Earring",
  969. ear2 = "Odnowa Earring +1",
  970. body = "Runeist's Coat +3",
  971. hands = "Runeist's Mitons +3",
  972. ring1 = "Regal Ring",
  973. ring2 = "Ilabrat Ring",
  974. back = "Moonbeam Cape",
  975. waist = "Kasiri Belt",
  976. legs = "Erilaz Leg Guards +1",
  977. Feet = "Carmine Greaves +1"
  978. })
  979.  
  980. sets.JA.Subterfuge = set_combine(sets.Enmity, {})
  981.  
  982. ---SAM---
  983. sets.JA.Meditate = set_combine(sets.Enmity, {})
  984.  
  985. ---WAR---
  986. sets.JA.Provoke = set_combine(sets.Enmity, {})
  987.  
  988. sets.JA.Warcry = set_combine(sets.Enmity, {})
  989.  
  990. --Precast Sets--
  991. sets.precast = {}
  992.  
  993. sets.precast.FastCast = {}
  994.  
  995. sets.precast.FastCast.Standard = {
  996. ammo = "Sapience Orb",
  997. head = "Runeist's Bandeau +3",
  998. neck = "Orunmila's Torque",
  999. ear1 = "Etiolation Earring",
  1000. ear2 = "Loquac. Earring",
  1001. body = AdhemarJacket.FC,
  1002. hands = "Leyline Gloves",
  1003. ring1 = "Kishar Ring",
  1004. ring2 = "Rahab Ring",
  1005. back = Ogma.FC,
  1006. waist = "Kasiri Belt",
  1007. legs = "Ayanmo Cosciales +2",
  1008. feet = "Carmine Greaves +1"
  1009. }
  1010.  
  1011. sets.precast.FastCast.Enhancing = set_combine(sets.precast.FastCast.Standard, {
  1012. legs = "Futhark Trousers +2",
  1013. ring1 = "Defending Ring",
  1014. ring2 = "Gelatinous Ring +1"
  1015. })
  1016. end
  1017.  
  1018. ---End of Gear---------------------------------------------------------------------------------------------------------------------------------------------------------
  1019.  
  1020. -------------------------------------
  1021. --------- ---------
  1022. ------ ------
  1023. --- Start of Maps ---
  1024. ------ ------
  1025. --------- ---------
  1026. -------------------------------------
  1027.  
  1028. -------------------------
  1029. -- BLU Spells List --
  1030. -------------------------
  1031.  
  1032. TwoHandedWeapons = S {
  1033. 'Aettir', 'Epeolatry', 'Lionheart', 'Beheader +1', 'Takoba', 'Zulqifar', 'Bidenhander',
  1034. 'Montante', 'Montante +1', 'Humility', 'Nibiru Faussar', 'Macbain', 'Soulcleaver',
  1035. 'Kaqulijaan', 'Beorc Sword', 'Trial Blade', 'Sword of Trials', 'Irradiance Blade',
  1036. 'Greatsword', 'Parashu'
  1037. }
  1038.  
  1039. -------------------------
  1040. -- BLU Spells List --
  1041. -------------------------
  1042.  
  1043. function maps()
  1044. PhysicalSpells = S {
  1045. 'Bludgeon', 'Body Slam', 'Feather Storm', 'Mandibular Bite', 'Queasyshroom',
  1046. 'Power Attack', 'Screwdriver', 'Sickle Slash', 'Smite of Rage',
  1047. 'Terror Touch', 'Battle Dance', 'Claw Cyclone', 'Foot Kick', 'Grand Slam',
  1048. 'Sprout Smack', 'Helldive', 'Jet Stream', 'Pinecone Bomb', 'Wild Oats', 'Uppercut'
  1049. }
  1050.  
  1051. BlueMagic_Buffs = S {
  1052. 'Refueling',
  1053. }
  1054.  
  1055. BlueMagic_Healing = S {
  1056. 'Healing Breeze', 'Pollen', 'Wild Carrot'
  1057. }
  1058.  
  1059. BlueMagic_Enmity = S {
  1060. 'Blank Gaze', 'Jettatura', 'Geist Wall', 'Sheep Song', 'Soporific', 'Cocoon', 'Stinking Gas'
  1061. }
  1062.  
  1063. RUNMagic_Enmity = S {
  1064. 'Flash', 'Stun'
  1065. }
  1066. end
  1067.  
  1068. ------------------------
  1069. -- Town Gear List --
  1070. ------------------------
  1071.  
  1072. Town = S {
  1073. "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno",
  1074. "Port Windurst", "Windurst Waters", "Windurst Woods", "Windurst Walls", "Heavens Tower",
  1075. "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria", "Chateau d'Oraguille",
  1076. "Port Bastok", "Bastok Markets", "Bastok Mines", "Metalworks",
  1077. "Aht Urhgan Whitegate", "Nashmau",
  1078. "Selbina", "Mhaura", "Norg", "Kazham", "Tavanazian Safehold",
  1079. "Eastern Adoulin", "Western Adoulin", "Celennia Memorial Library", "Mog Garden"
  1080. }
  1081.  
  1082. ---End of Maps----------------------------------------------------------------------------------------------------------------------------------------------------------
  1083.  
  1084. function msg(str)
  1085. send_command('@input /echo <----- ' .. str .. ' ----->')
  1086. end
  1087.  
  1088. ------------------------------------------
  1089. -- Macro and Style Change on Job Change
  1090. ------------------------------------------
  1091. function set_macros(sheet,book)
  1092. if book then
  1093. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
  1094. return
  1095. end
  1096. send_command('@input /macro set '..tostring(sheet))
  1097. end
  1098.  
  1099. function set_style(sheet)
  1100. send_command('@input ;wait 5.0;input /lockstyleset '..sheet)
  1101. add_to_chat (21, 'Your lockstyle looks like shit, and you should feel bad')
  1102. add_to_chat (55, 'You are on '..('RUN '):color(5)..''..('btw. '):color(55)..''..('Macros set!'):color(121))
  1103. -- add_to_chat (60, 'Eat tendies in moderation')
  1104. end
  1105.  
  1106. --Page, Book--
  1107. set_macros(1,10)
  1108. --Use the Lockstyle Number--
  1109. set_style(98)
  1110. ------------------------------------------
  1111. -- Variables
  1112. ------------------------------------------
  1113. SetLocked = false --Used to Check if set is locked before changing equipment
  1114. LockedEquipSet = {} --Placeholder to store desired lock set
  1115. LockGearSet = {}
  1116. equipSet = {} --Currently Equiped Gearset
  1117. LockGearIndex = false
  1118. LockGearIndex = false
  1119. TargetDistance = 0
  1120. TH = false -- Defaults
  1121. SIR = false -- Spell Interruption Rate
  1122. TankingTP = true -- If true, default set is tanking TP array.
  1123. TwoHandedTP = true -- TP set order, looks for Tanking TP set before 2H TP before 1H DW TP.
  1124. ------------------------------------------
  1125. -- Windower Hooks --
  1126. ------------------------------------------
  1127.  
  1128. function buff_change(n, gain, buff_table)
  1129. local name
  1130. name = string.lower(n)
  1131. if S{"terror","petrification","sleep","stun"}:contains(name) then
  1132. if gain then
  1133. ChangeGear(sets.Utility.Derp)
  1134. elseif not has_any_buff_of({"terror","petrification","sleep","stun"}) then
  1135. if player.status == 'Engaged' then
  1136. if LockGearIndex then
  1137. ChangeGear(LockGearSet)
  1138. elseif not LockGearIndex then
  1139. if TankingTP == true then
  1140. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1141. elseif EpeoAM3 == true then
  1142. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1143. elseif TwoHandedTP == true then
  1144. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1145. else
  1146. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1147. end
  1148. end
  1149. elseif player.status == 'Idle' then
  1150. if LockGearIndex then
  1151. ChangeGear(LockGearSet)
  1152. elseif not LockGearIndex then
  1153. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1154. end
  1155. end
  1156. end
  1157. elseif name == "doom" then
  1158. if gain then
  1159. ChangeGear(sets.Utility.Doom)
  1160. send_command('@input /p Doomed {~o~:} !')
  1161. disable('ring1','ring2','waist')
  1162. else
  1163. if player.status == 'Engaged' then
  1164. if LockGearIndex then
  1165. send_command('@input /p Doom is off {^_^}')
  1166. enable('ring1','ring2','waist')
  1167. ChangeGear(LockGearSet)
  1168. else
  1169. send_command('@input /p Doom is off {^_^}')
  1170. enable('ring1','ring2','waist')
  1171. if TankingTP == true then
  1172. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1173. elseif EpeoAM3 == true then
  1174. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1175. elseif TwoHandedTP == true then
  1176. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1177. else
  1178. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1179. end
  1180. end
  1181. elseif player.status == 'Idle' then
  1182. if LockGearIndex then
  1183. send_command('@input /p Doom is off {^_^}')
  1184. enable('ring1','ring2','waist')
  1185. ChangeGear(LockGearSet)
  1186. else
  1187. send_command('@input /p Doom is off {^_^}')
  1188. enable('ring1','ring2','waist')
  1189. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1190. end
  1191. end
  1192. end
  1193. elseif name == "charm" then
  1194. if gain then
  1195. send_command('@input /p Charmed {<3_<3:} !')
  1196. else
  1197. send_command('@input /p Charm is off {~_^}')
  1198. end
  1199. elseif name == "weakness" then
  1200. if gain then
  1201. enable('ring1','ring2','waist')
  1202. end
  1203. elseif name == "embolden" then
  1204. if gain then
  1205. ChangeGear(set_combine(equipSet, {back="Evasionist's Cape"}))
  1206. else
  1207. if player.status == 'Engaged' then
  1208. if LockGearIndex then
  1209. ChangeGear(LockGearSet)
  1210. elseif not LockGearIndex then
  1211. if TankingTP == true then
  1212. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1213. elseif EpeoAM3 == true then
  1214. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1215. elseif TwoHandedTP == true then
  1216. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1217. else
  1218. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1219. end
  1220. end
  1221. elseif player.status == 'Idle' then
  1222. if LockGearIndex then
  1223. ChangeGear(LockGearSet)
  1224. elseif not LockGearIndex then
  1225. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1226. end
  1227. end
  1228. end
  1229. elseif name == "hasso" then
  1230. if gain then
  1231. do return end
  1232. else
  1233. send_command('gs c -cd Hasso Lost!')
  1234. end
  1235. end
  1236.  
  1237. if name == "aftermath: lv.3" and player.equipment.main == 'Epeolatry' then -- Mythic AM3
  1238. if gain then
  1239. EpeoAM3 = true
  1240. send_command('timers create "Mythic AM3" 180 down')
  1241. if LockGearIndex then
  1242. ChangeGear(LockGearSet)
  1243. elseif TankingTP == true then
  1244. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1245. else
  1246. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1247. end
  1248. else
  1249. EpeoAM3 = false
  1250. send_command('timers delete "Mythic AM3";gs c -cd AM3 Lost!!!')
  1251. end
  1252. end
  1253. end
  1254.  
  1255. ------------------------------------------
  1256. -- Binds --
  1257. ------------------------------------------
  1258. send_command('bind f9 gs c toggle TP set') --This means if you hit f9 it toggles the sets
  1259. send_command('bind f10 gs c toggle GS WS set') --Changes Reso and Dimidiation sets
  1260. send_command('bind f11 gs c ') --Empty
  1261. send_command('bind f12 gs c toggle Idle set')
  1262. send_command('bind ^f8 gs c toggle SIR') -- Turns Spell Interruption Rate set on
  1263. send_command('bind ^f9 input /ws "Resolution" <t>') --^ means cntrl
  1264. send_command('bind ^f10 input /ws "Dimidiation" <t>')
  1265. send_command('bind ^f11 input /ws "Ground Strike" <t>')
  1266. send_command('bind ^f12 input /ws "Savage Blade" <t>')
  1267. send_command('bind !f7 gs c toggle TankingTP set') --! means alt, this exists only for toggling outside of this mode being active, otherwise f9
  1268. send_command('bind !f8 gs c toggle TankingTP') --! turns tanking tp off
  1269. send_command('bind !f9 gs c toggle backwards')
  1270. send_command('bind !f10 gs c toggle Other WS set') -- Changes affiliated sword ws sets
  1271. send_command('bind !f11 ') --Empty
  1272. send_command('bind !f12 gs c lockgearindex')
  1273.  
  1274. send_command('bind !e input /item "Echo Drops" <me>')
  1275. send_command('bind !r input /item "Remedy" <me>')
  1276. send_command('bind !p input /item "Panacea" <me>')
  1277. send_command('bind !h input /item "Holy Water" <me>')
  1278. send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')
  1279. send_command('bind !q input /equip ring2 "Dim. Ring (Holla)"; /echo Reisenjima; wait 11; input /item "Dim. Ring (Holla)" <me>;')
  1280. send_command('bind !t gs c toggle TH') -- alt + t toggles TH mode
  1281. send_command('bind !p input /ma "poisonga" <t>') -- alt + t toggles TH mode
  1282.  
  1283. --Unload Binds
  1284. function file_unload()
  1285. send_command('unbind ^f9')
  1286. send_command('unbind ^f10')
  1287. send_command('unbind ^f11')
  1288. send_command('unbind ^f12')
  1289. send_command('unbind !f9')
  1290. send_command('unbind !f10')
  1291. send_command('unbind !f11')
  1292. send_command('unbind !f12')
  1293. send_command('unbind f9')
  1294. send_command('unbind f10')
  1295. send_command('unbind f11')
  1296. send_command('unbind f12')
  1297.  
  1298. send_command('unbind !e')
  1299. send_command('unbind !r')
  1300. send_command('unbind !p')
  1301. send_command('unbind !h')
  1302. send_command('unbind !w')
  1303. send_command('unbind !q')
  1304. send_command('unbind !t')
  1305. end
  1306.  
  1307. ------------------------------------------
  1308. -- Console Commands --
  1309. ------------------------------------------
  1310. function self_command(command)
  1311. if command == 'togglelock' then
  1312. if SetLocked == false then
  1313. msg("Equipment Set LOCKED!")
  1314. else
  1315. SetLocked = false
  1316. msg("Equipment Set UNLOCKED!")
  1317. end
  1318. elseif command == 'lockgearindex' then
  1319. if LockGearIndex == false then
  1320. LockGearIndex = true
  1321. LockGearSet = {
  1322. ammo = player.equipment.ammo,
  1323. head = player.equipment.head,
  1324. neck = player.equipment.neck,
  1325. ear1 = player.equipment.left_ear,
  1326. ear2 = player.equipment.right_ear,
  1327. body = player.equipment.body,
  1328. hands = player.equipment.hands,
  1329. ring1 = player.equipment.left_ring,
  1330. ring2 = player.equipment.right_ring,
  1331. back = player.equipment.back,
  1332. waist = player.equipment.waist,
  1333. legs = player.equipment.legs,
  1334. feet = player.equipment.feet
  1335. }
  1336. msg("Gear Index Locked")
  1337. else
  1338. LockGearIndex = false
  1339. msg("Gear Index Unlocked")
  1340. if player.status == 'Engaged' then
  1341. if TankingTP == true then
  1342. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1343. elseif EpeoAM3 == true then
  1344. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1345. elseif TwoHandedTP == true then
  1346. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1347. else
  1348. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1349. end
  1350. else
  1351. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1352. end
  1353. end
  1354. end
  1355. if command == 'toggle TP set' then
  1356. if TankingTP == true then
  1357. TankingTP_ind = TankingTP_ind + 1
  1358. if TankingTP_ind > #sets.TankingTP.index then TankingTP_ind = 1 end
  1359. send_command('@input /echo <----- TankingTP Set changed to ' .. sets.TankingTP.index[TankingTP_ind] .. ' ----->')
  1360. if player.status == 'Engaged' then
  1361. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1362. end
  1363. elseif TankingTP == false then
  1364. if TwoHandedTP == true then
  1365. TwoHandedTP_ind = TwoHandedTP_ind + 1
  1366. EpeoAM3_ind = EpeoAM3_ind +1
  1367. if TwoHandedTP_ind > #sets.TwoHandedTP.index then TwoHandedTP_ind = 1 end
  1368. if EpeoAM3_ind > #sets.EpeoAM3.index then EpeoAM3_ind = 1 end
  1369. send_command('@input /echo <----- 2H TP Set changed to ' .. sets.TwoHandedTP.index[TwoHandedTP_ind] .. ' ----->')
  1370. if player.status == 'Engaged' then
  1371. if EpeoAM3 == true then
  1372. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1373. else
  1374. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1375. end
  1376. end
  1377. elseif TwoHandedTP == false then
  1378. OneHandedTP_ind = OneHandedTP_ind + 1
  1379. if OneHandedTP_ind > #sets.OneHandedTP.index then OneHandedTP_ind = 1 end
  1380. send_command('@input /echo <----- 1H TP Set changed to ' .. sets.OneHandedTP.index[OneHandedTP_ind] .. ' ----->')
  1381. if player.status == 'Engaged' then
  1382. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1383. end
  1384. end
  1385. end
  1386. elseif command == 'toggle Idle set' then
  1387. Idle_ind = Idle_ind + 1
  1388. if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
  1389. send_command('@input /echo <----- Idle Set changed to ' .. sets.Idle.index[Idle_ind] .. ' ----->')
  1390. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1391. elseif command == 'toggle GS WS set' then
  1392. Resolution_ind = Resolution_ind + 1
  1393. Dimidiation_ind = Dimidiation_ind + 1
  1394. if Resolution_ind > #sets.Resolution.index then Resolution_ind = 1 end
  1395. if Dimidiation_ind > #sets.Dimidiation.index then Dimidiation_ind = 1 end
  1396. send_command('@input /echo <----- Reso/Dimi Sets changed to ' .. sets.Resolution.index[Resolution_ind] .. ' ----->')
  1397. elseif command == 'toggle Other WS set' then
  1398. SavageBlade_ind = SavageBlade_ind + 1
  1399. Requiescat_ind = Requiescat_ind + 1
  1400. BlackHalo_ind = BlackHalo_ind + 1
  1401. Realmrazer_ind = Realmrazer_ind + 1
  1402. if SavageBlade_ind > #sets.SavageBlade.index then SavageBlade_ind = 1 end
  1403. if Requiescat_ind > #sets.Requiescat.index then Requiescat_ind = 1 end
  1404. if BlackHalo_ind > #sets.BlackHalo.index then BlackHalo_ind = 1 end
  1405. if Realmrazer_ind > #sets.Realmrazer.index then Realmrazer_ind = 1 end
  1406. send_command('@input /echo <----- Sword/Club WS Set changed to ' .. sets.SavageBlade.index[SavageBlade_ind] .. ' ----->')
  1407. elseif command == 'toggle TankingTP set' then
  1408. TankingTP_ind = TankingTP_ind + 1
  1409. if TankingTP_ind > #sets.TankingTP.index then TankingTP_ind = 1 end
  1410. send_command('@input /echo <----- TankingTP Set changed to ' .. sets.TankingTP.index[TankingTP_ind] .. ' ----->')
  1411. if player.status == 'Engaged' then
  1412. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1413. end
  1414. elseif command == 'toggle TankingTP' then
  1415. if TankingTP == true then
  1416. TankingTP = false
  1417. send_command('@input /echo <----- Tanking TP: [Off] ----->')
  1418. else
  1419. TankingTP = true
  1420. send_command('@input /echo <----- Tanking TP: [On] ----->')
  1421. end
  1422. status_change(player.status)
  1423. elseif command == 'toggle TwoHandedTP' then
  1424. if TwoHandedTP == true then
  1425. TwoHandedTP = false
  1426. send_command('@input /echo <----- 2H TP: [Off] ----->')
  1427. else
  1428. TwoHandedTP = true
  1429. send_command('@input /echo <----- 2H TP: [On] ----->')
  1430. end
  1431. status_change(player.status)
  1432. elseif command == 'toggle SIR' then
  1433. if SIR == true then
  1434. SIR = false
  1435. send_command('@input /echo <----- Spell Interruption Rate: [Off] ----->')
  1436. else
  1437. SIR = true
  1438. send_command('@input /echo <----- Spell Interruption Rate: [On] ----->')
  1439. end
  1440. status_change(player.status)
  1441. elseif command == 'toggle TH' then
  1442. if TH == true then
  1443. TH = false
  1444. send_command('@input /echo <----- Treasure Hunter TP: [Off] ----->')
  1445. else
  1446. TH = true
  1447. send_command('@input /echo <----- Treasure Hunter TP: [On] ----->')
  1448. end
  1449. status_change(player.status)
  1450. elseif command == 'toggle backwards' then
  1451. if TankingTP == true then
  1452. TankingTP_ind = TankingTP_ind -1
  1453. if TankingTP_ind == 0 then
  1454. TankingTP_ind = #sets.TankingTP.index
  1455. end
  1456. send_command('@input /echo <----- TankingTP Set changed to ' .. sets.TankingTP.index[TankingTP_ind] .. ' ----->')
  1457. if player.status == 'Engaged' then
  1458. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1459. end
  1460. elseif TankingTP == false then
  1461. if TwoHandedTP == true then
  1462. TwoHandedTP_ind = TwoHandedTP_ind -1
  1463. EpeoAM3_ind = EpeoAM3_ind -1
  1464. if TwoHandedTP_ind == 0 then
  1465. TwoHandedTP_ind = #sets.TwoHandedTP.index
  1466. end
  1467. if EpeoAM3_ind == 0 then
  1468. EpeoAM3_ind = #sets.EpeoAM3.index
  1469. end
  1470. send_command('@input /echo <----- 2H TP Set changed to ' .. sets.TwoHandedTP.index[TwoHandedTP_ind] .. ' ----->')
  1471. if player.status == 'Engaged' then
  1472. if EpeoAM3 == true then
  1473. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1474. else
  1475. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1476. end
  1477. end
  1478. elseif TwoHandedTP == false then
  1479. OneHandedTP_ind = OneHandedTP_ind -1
  1480. if OneHandedTP_ind == 0 then
  1481. OneHandedTP_ind = #sets.OneHandedTP.index
  1482. end
  1483. if player.status == 'Engaged' then
  1484. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[TP_ind]])
  1485. end
  1486. send_command('@input /echo <----- 1H TP Set changed to ' .. sets.OneHandedTP.index[OneHandedTP_ind] .. ' ----->')
  1487. end
  1488. end
  1489. elseif command == 'ZoneChange' then
  1490. IdleState()
  1491. elseif string.sub(command, 0, 4) == '-cd ' then --If the first 4 characters of the command are '-cd '
  1492. add_to_chat (30, string.sub(command, 5, string.len(command))) --add everything after '-cd ' to a message in the chat
  1493. end
  1494. end
  1495.  
  1496. ------------------------------------------
  1497. -- Character States --
  1498. ------------------------------------------
  1499. function IdleState()
  1500. if LockGearIndex then
  1501. ChangeGear(LockGearSet)
  1502. elseif not LockGearIndex then
  1503. ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1504. end
  1505.  
  1506. if player.mpp <= 50 and Idle_ind == 2 then --standard idle
  1507. ChangeGear({head = HerculeanHelm.Refesh, waist = "Fucho-no-obi"})
  1508. elseif player.mpp <= 50 and Idle_ind == 3 then -- buff duration
  1509. ChangeGear({waist = "Fucho-no-obi"})
  1510. end
  1511.  
  1512. if Town:contains(world.area) and player.mpp < 75 then
  1513. ChangeGear(set_combine(sets.Idle.Town, sets.Idle.Refresh))
  1514. elseif Town:contains(world.area) then
  1515. ChangeGear(sets.Idle.Town)
  1516. end
  1517.  
  1518. if buffactive['Embolden'] then
  1519. ChangeGear(set_combine(equipSet, {back="Evasionist's Cape"}))
  1520. end
  1521.  
  1522. end
  1523.  
  1524. windower.raw_register_event('zone change',function()
  1525. windower.send_command('@wait 9; input //gs c ZoneChange')
  1526. end)
  1527.  
  1528. function RestingState()
  1529.  
  1530. end
  1531.  
  1532. function EngagedState()
  1533. if LockGearIndex then
  1534. ChangeGear(LockGearSet)
  1535. elseif not LockGearIndex then
  1536. if TankingTP == true then
  1537. ChangeGear(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
  1538. elseif buffactive["Aftermath: Lv.3"] and player.equipment.main == 'Epeolatry' then --am3
  1539. EpeoAM3 = true
  1540. ChangeGear(sets.EpeoAM3[sets.EpeoAM3.index[EpeoAM3_ind]])
  1541. elseif TwoHandedTP == true then
  1542. EpeoAM3 = false
  1543. ChangeGear(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
  1544. else
  1545. EpeoAM3 = false
  1546. ChangeGear(sets.OneHandedTP[sets.OneHandedTP.index[OneHandedTP_ind]])
  1547. end
  1548. end
  1549. end
  1550.  
  1551. -----------------------------
  1552. -- Spell control --
  1553. -----------------------------
  1554. unusable_buff = {
  1555. spell={'Charm','Mute','Omerta','Petrification','Silence','Sleep','Stun','Terror'},
  1556. ability={'Amnesia','Charm','Impairment','Petrification','Sleep','Stun','Terror'}}
  1557. --check_recast('ability',spell.recast_id) check_recast('spell',spell.recast_id)
  1558. function check_recast(typ,id) --if spell can be cast(not in recast) return true
  1559. local recasts = windower.ffxi['get_'..typ..'_recasts']()
  1560. if id and recasts[id] and recasts[id] == 0 then
  1561. return true
  1562. else
  1563. return false
  1564. end
  1565. end
  1566. --return true if spell/ability is unable to be used at this time
  1567. function spell_control(spell)
  1568. if spell.type == "Item" then
  1569. return false
  1570. --Stops spell if you do not have a target
  1571. elseif spell.target.name == nil and not spell.target.raw:contains("st") then
  1572. return true
  1573. --Stops spell if a blocking buff is active
  1574. 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
  1575. return true
  1576. elseif spell.type == 'WeaponSkill' and player.tp < 1000 then
  1577. return true
  1578. elseif spell.type == 'WeaponSkill' and (has_any_buff_of(unusable_buff.ability)) then
  1579. msg("Weapon Skill Canceled, Can't")
  1580. return true
  1581. elseif spell.action_type == 'Magic' and (has_any_buff_of(unusable_buff.spell)
  1582. or not check_recast('spell',spell.recast_id)) then
  1583. return true
  1584. --Stops spell if you do not have enuf mp/tp to use
  1585. elseif spell.mp_cost and spell.mp_cost > player.mp and not has_any_buff_of({'Manawell','Manafont'}) and not spell.action_type == 'Ability' then
  1586. msg("Spell Canceled, Not Enough MP")
  1587. return true
  1588. end
  1589. --Calculate how many finishing moves your char has up to 6
  1590. local fm_count = 0
  1591. for i, v in pairs(buffactive) do
  1592. if tostring(i):startswith('finishing move') or tostring(i):startswith('?????????') then
  1593. fm_count = tonumber(string.match(i, '%d+')) or 1
  1594. end
  1595. end
  1596. --Stops flourishes if you do not have enough finishing moves
  1597. local min_fm_for_flourishes = {['Animated Flourish']=1,['Desperate Flourish']=1,['Violent Flourish']=1,['Reverse Flourish']=1,['Building Flourish']=1,
  1598. ['Wild Flourish']=2,['Climactic Flourish']=1,['Striking Flourish']=2,['Ternary Flourish']=3,}
  1599. if min_fm_for_flourishes[spell.en] then
  1600. if min_fm_for_flourishes[spell.en] > fm_count and not buffactive[507] then
  1601. return true
  1602. end
  1603. end
  1604. --Reomves Sneak when casting Spectral Jig
  1605. if spell.en == 'Spectral Jig' then
  1606. send_command('cancel 71')
  1607. end
  1608. if spell.name == 'Utsusemi: Ichi' and overwrite and buffactive['Copy Image (3)'] then
  1609. return true
  1610. end
  1611. if player.tp >= 1000 and player.target and player.target.distance and player.target.distance > 7 and spell.type == 'WeaponSkill' then
  1612. msg("Weapon Skill Canceled Target Out of Range")
  1613. return true
  1614. end
  1615. end
  1616.  
  1617. ------------------------------------------
  1618. -- Precast --
  1619. ------------------------------------------
  1620. function has_any_buff_of(buff_set)--returns true if you have any of the buffs given
  1621. for i,v in pairs(buff_set) do
  1622. if buffactive[v] ~= nil then return true end
  1623. end
  1624. end
  1625. --JA Sets--
  1626. function pc_JA(spell, act)
  1627. if spell.english == 'Elemental Sforzo' then
  1628. ChangeGear(sets.JA.Sforzo)
  1629. elseif spell.english == 'Swordplay' then
  1630. ChangeGear(sets.JA.Swordplay)
  1631. elseif spell.english == 'Vallation' or spell.english == 'Valiance' then
  1632. ChangeGear(sets.JA.Vallation)
  1633. elseif spell.english == 'Pflug' then
  1634. ChangeGear(sets.JA.Pflug)
  1635. elseif spell.english == 'Embolden' then
  1636. ChangeGear(sets.JA.Embolden)
  1637. elseif spell.english == 'Vivacious Pulse' then
  1638. ChangeGear(sets.JA.Pulse)
  1639. elseif spell.english == 'Gambit' then
  1640. ChangeGear(sets.JA.Gambit)
  1641. elseif spell.english == 'Battuta' then
  1642. ChangeGear(sets.JA.Battuta)
  1643. elseif spell.english == 'Rayke' then
  1644. ChangeGear(sets.JA.Rayke)
  1645. elseif spell.english == 'Liement' then
  1646. ChangeGear(sets.JA.Liement)
  1647. elseif spell.english == 'One For All' then
  1648. ChangeGear(sets.JA.One)
  1649. elseif spell.english == 'Odyllic Subterfuge' then
  1650. ChangeGear(sets.JA.Subterfuge)
  1651. elseif spell.english == 'Lunge' or spell.english == 'Swipe' then
  1652. ChangeGear(sets.JA.Lunge)
  1653. elseif spell.english == 'Meditate' then
  1654. ChangeGear(sets.JA.Meditate)
  1655. elseif spell.english == 'Provoke' then
  1656. ChangeGear(sets.JA.Provoke)
  1657. elseif spell.english == 'Warcry' then
  1658. ChangeGear(sets.JA.Warcry)
  1659. end
  1660.  
  1661. --These spells can't override each other, and must be canceled--
  1662. if spell.name == 'Valiance' or spell.name == 'Vallation' or spell.name == 'Liement' then
  1663. if buffactive['Valiance'] then
  1664. cast_delay(0.2)
  1665. windower.ffxi.cancel_buff(535)
  1666. elseif buffactive['Vallation'] then
  1667. cast_delay(0.2)
  1668. windower.ffxi.cancel_buff(531)
  1669. elseif buffactive['Liement'] then
  1670. cast_delay(0.2)
  1671. windower.ffxi.cancel_buff(537)
  1672. end
  1673. end
  1674.  
  1675. IgnoreWS = S { "Sanguine Blade", "Red Lotus Blade", "Flash Nova", "Realmrazer" } -- Excluded from Moonshade TP override rule.
  1676. BrutalWS = S { "Resolution"}
  1677. STRWS = S {"Vorpal Blade", "Fell Cleave", "Circle Blade", "Swift Blade", "Shockwave" } -- Just uses the Resolution Set
  1678.  
  1679.  
  1680. if spell.type == 'WeaponSkill' then
  1681. if spell.english == 'Requiescat' then
  1682. ChangeGear(sets.Requiescat[sets.Requiescat.index[Requiescat_ind]])
  1683. elseif spell.english == 'Dimidiation' or spell.english == 'Ground Strike' then
  1684. ChangeGear(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_ind]])
  1685. elseif spell.english == 'Resolution' or STRWS:contains(spell.english) then
  1686. ChangeGear(sets.Resolution[sets.Resolution.index[Resolution_ind]])
  1687. elseif spell.english == 'Savage Blade' then
  1688. ChangeGear(sets.SavageBlade[sets.SavageBlade.index[SavageBlade_ind]])
  1689. elseif spell.english == 'Realmrazer' then
  1690. ChangeGear(sets.Realmrazer[sets.Realmrazer.index[Realmrazer_ind]])
  1691. elseif spell.english == 'Black Halo' or 'Judgement' then
  1692. ChangeGear(sets.BlackHalo[sets.BlackHalo.index[BlackHalo_ind]])
  1693. elseif spell.english == 'Flash Nova' or spell.english == 'Red Lotus Blade' then
  1694. ChangeGear(sets.FlashNova)
  1695. elseif spell.english == 'Sanguine Blade' then
  1696. ChangeGear(sets.SanguineBlade)
  1697. end
  1698. if player.tp > 2025 and player.equipment.main == 'Lionheart' and buffactive['TP Bonus'] then
  1699. if IgnoreWS:contains(spell.english) then
  1700. do return end
  1701. elseif BrutalWS:contains(spell.english) then
  1702. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1703. msg("Brutal Earring equiped !!!!")
  1704. else
  1705. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1706. msg("Ishvara Earring equiped !!!!")
  1707. end
  1708. elseif player.tp > 2275 and player.equipment.main == 'Lionheart' then
  1709. if IgnoreWS:contains(spell.english) then
  1710. do return end
  1711. elseif BrutalWS:contains(spell.english) then
  1712. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1713. msg("Brutal Earring equiped !!!!")
  1714. else
  1715. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1716. msg("Ishvara Earring equiped !!!!")
  1717. end
  1718. elseif player.tp > 2550 and buffactive['TP Bonus'] then
  1719. if IgnoreWS:contains(spell.english) then
  1720. do return end
  1721. elseif BrutalWS:contains(spell.english) then
  1722. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1723. msg("Brutal Earring equiped !!!!")
  1724. else
  1725. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1726. msg("Ishvara Earring equiped !!!!")
  1727. end
  1728. elseif player.tp > 2775 then
  1729. if IgnoreWS:contains(spell.english) then
  1730. do return end
  1731. elseif BrutalWS:contains(spell.english) then
  1732. equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1733. msg("Brutal Earring equiped !!!!")
  1734. else
  1735. equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1736. msg("Ishvara Earring equiped !!!!")
  1737. end
  1738. end
  1739. end
  1740.  
  1741. if string.find(spell.english,'Step') then
  1742. ChangeGear(set_combine(sets.TwoHandedTP.AccuracyFull, sets.Utility.TH))
  1743. elseif spell.english == 'Animated Flourish' then
  1744. ChangeGear(sets.Enmity)
  1745. end
  1746. end
  1747.  
  1748. function pc_Magic(spell, act)
  1749. if spell.skill == 'Enhancing Magic' then
  1750. ChangeGear(sets.precast.FastCast.Enhancing)
  1751. else
  1752. ChangeGear(sets.precast.FastCast.Standard)
  1753. end
  1754. end
  1755.  
  1756. function pc_Item(spell, act)
  1757. end
  1758.  
  1759.  
  1760. ------------------------------------------
  1761. -- Midcast --
  1762. ------------------------------------------
  1763. function mc_JA(spell, act)
  1764. end
  1765.  
  1766. function mc_Magic(spell, act)
  1767. if spell.skill == 'Enhancing Magic' then
  1768. if buffactive['Embolden'] then
  1769. if spell.english == 'Phalanx' then
  1770. ChangeGear(set_combine(sets.Enhancing.Phalanx, {back="Evasionist's Cape"}))
  1771. elseif string.find(spell.english,'Shell') or string.find(spell.english,'Protect') then
  1772. ChangeGear(set_combine(sets.Enhancing.ProShell, {back="Evasionist's Cape"}))
  1773. else
  1774. ChangeGear(set_combine(sets.Enhancing.Duration, {back="Evasionist's Cape"}))
  1775. end
  1776. elseif spell.english == 'Aquaveil' then
  1777. ChangeGear(sets.SIR)
  1778. elseif spell.english == 'Refresh' then
  1779. ChangeGear(sets.Enhancing.Refresh)
  1780. elseif string.find(spell.english,'Regen')then
  1781. ChangeGear(sets.Enhancing.Regen)
  1782. elseif string.find(spell.english,'Bar') or spell.english=="Temper" then
  1783. ChangeGear(sets.Enhancing.Skill)
  1784. elseif spell.english == 'Phalanx' then
  1785. ChangeGear(sets.Enhancing.Phalanx)
  1786. elseif spell.english == 'Foil' then
  1787. ChangeGear(sets.Enhancing.Foil)
  1788. elseif string.find(spell.english,'Shell') or string.find(spell.english,'Protect') then
  1789. ChangeGear(sets.Enhancing.ProShell)
  1790. else
  1791. ChangeGear(sets.Enhancing.Duration)
  1792. end
  1793. elseif spell.skill == 'Healing Magic' then
  1794. if spell.target and spell.target.type == 'SELF' then
  1795. ChangeGear(sets.Cures.SelfCures)
  1796. else
  1797. ChangeGear(sets.Cures)
  1798. end
  1799. elseif spell.skill == 'Enfeebling Magic' then
  1800. if spell.english == 'Sleepga' or spell.english == 'Poisonga' and TH == true then --For tanking/pulling Divergence to TH tag everything
  1801. ChangeGear(set_combine(sets.Enmity, sets.Utility.TH))
  1802. end
  1803. end
  1804.  
  1805. if BlueMagic_Enmity:contains(spell.english) then
  1806. ChangeGear(sets.Enmity)
  1807. elseif BlueMagic_Buffs:contains(spell.english) then
  1808. ChangeGear(sets.TankingTP.Tank)
  1809. elseif PhysicalSpells:contains(spell.english) then
  1810. ChangeGear(sets.BlueMagic.STR)
  1811. elseif BlueMagic_Healing:contains(spell.english) then
  1812. if spell.target and spell.target.type == 'SELF' then
  1813. ChangeGear(sets.Cures.SelfCures)
  1814. else
  1815. ChangeGear(sets.Cures)
  1816. end
  1817. elseif RUNMagic_Enmity:contains(spell.english) then
  1818. ChangeGear(sets.Enmity)
  1819. end
  1820.  
  1821. if buffactive['Tenebrae'] and spell.english == 'Lunge' or spell.english == 'Swipe' then
  1822. equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
  1823. end
  1824.  
  1825. end
  1826.  
  1827. function mc_Item(spell, act)
  1828. end
  1829.  
  1830.  
  1831. ------------------------------------------
  1832. -- After Cast --
  1833. ------------------------------------------
  1834. function ac_JA(spell)
  1835. end
  1836.  
  1837. function ac_Magic(spell)
  1838. end
  1839.  
  1840. function ac_Item(spell)
  1841. end
  1842.  
  1843. function ac_Global()
  1844. if LockGearIndex == true then
  1845. ChangeGear(LockGearSet)
  1846. msg("Lock Gear is ON -- Swapping Gear")
  1847. else
  1848. if player.status == 'Engaged' then
  1849. EngagedState()
  1850. else
  1851. IdleState()
  1852. end
  1853. end
  1854. end
  1855.  
  1856. ------------------------------------------
  1857. -- Framework Core --
  1858. ------------------------------------------
  1859. function status_change(new, old)
  1860. if new == 'Idle' then
  1861. IdleState()
  1862. elseif new == 'Resting' then
  1863. RestingState()
  1864. elseif new == 'Engaged' then
  1865. EngagedState()
  1866. end
  1867.  
  1868. if player.status == 'Engaged' and TH == true then
  1869. ChangeGear(set_combine(equipSet, sets.Utility.TH))
  1870. end
  1871.  
  1872. if player.equipment.main ~= 'empty' then -- Changes 1H/2H TP during status change, combat, spell, etc.
  1873. local weapon_skill = gearswap.res.items:with('en', player.equipment.main).skill
  1874. if weapon_skill and S{1,4,6,7,8,10,12}:contains(weapon_skill) or player.equipment.main == 'empty' then --Checks mainhand weapon for TP set choice. See bottom notes.
  1875. TwoHandedTP = true
  1876. else
  1877. TwoHandedTP = false
  1878. end
  1879. else
  1880. msg("!!Main Weapon Not Equiped!!")
  1881. end
  1882.  
  1883. end
  1884.  
  1885. --Numbers in the 1H 2H TP mode rule:
  1886. --1 = Hand-to-Hand
  1887. --2 = Dagger
  1888. --3 = Sword
  1889. --4 = Great Sword
  1890. --5 = Axe
  1891. --6 = Great Axe
  1892. --7 = Scythe
  1893. --8 = Polearm
  1894. --9 = Katana
  1895. --10 = Great Katana
  1896. --11 = Club
  1897. --12 = Staff
  1898.  
  1899.  
  1900. function precast(spell, act)
  1901. if spell_control(spell) then
  1902. cancel_spell()
  1903. return
  1904. end
  1905. if spell.action_type == 'Ability' then
  1906. pc_JA(spell, act)
  1907. elseif spell.action_type == 'Magic' then
  1908. pc_Magic(spell, act)
  1909. else
  1910. pc_Item(spell, act)
  1911. end
  1912. end
  1913.  
  1914. function midcast(spell, act)
  1915. IgnoreSIRSpell = S { "Phalanx", "Temper", "Refresh", "Regen"} -- Excluded from Spell Interruption Rate override rule.
  1916. if spell.action_type == 'Ability' then
  1917. mc_JA(spell, act)
  1918. elseif spell.action_type == 'Magic' then
  1919. if SIR == true then
  1920. if IgnoreSIRSpell:contains(spell.english) and not string.find(spell.english,'Bar') then
  1921. mc_Magic(spell, act)
  1922. else
  1923. ChangeGear(sets.SIR)
  1924. end
  1925. else
  1926. mc_Magic(spell, act)
  1927. end
  1928. else
  1929. mc_Item(spell, act)
  1930. end
  1931. end
  1932.  
  1933. function aftercast(spell, act)
  1934. if spell.action_type == 'Ability' then
  1935. ac_JA(spell)
  1936. elseif spell.action_type == 'Magic' then
  1937. ac_Magic(spell)
  1938. else
  1939. ac_Item(spell)
  1940. end
  1941. ac_Global()
  1942.  
  1943. --Countdowns--
  1944. if not spell.interrupted then
  1945. if spell.english == "Meditate" then
  1946. send_command('wait 170;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1947. elseif spell.english == "Sekkanoki" then
  1948. send_command('wait 290;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1949. elseif spell.english == "Swordplay" then
  1950. send_command('wait 290;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1951. elseif spell.english == "One for All" then
  1952. send_command('wait 290;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1953. elseif spell.english == "Battuta" then
  1954. send_command('wait 290;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1955. elseif spell.english == "Liement" then
  1956. send_command('wait 170;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1957. end
  1958. end
  1959.  
  1960. if player.equipment.main ~= 'empty' then -- Changes action
  1961. local weapon_skill = gearswap.res.items:with('en', player.equipment.main).skill
  1962. if weapon_skill and S{4,6,7,8,10,12}:contains(weapon_skill) then --Checks mainhand weapon for TP set choice. See bottom notes.
  1963. TwoHandedTP = true
  1964. else
  1965. TwoHandedTP = false
  1966. end
  1967. else
  1968. msg("!!Main Weapon Not Equiped!!")
  1969. end
  1970.  
  1971. end
  1972.  
  1973.  
  1974. function ChangeGear(GearSet)
  1975. equipSet = GearSet
  1976. equip(GearSet)
  1977. end
  1978.  
  1979. function LockGearSet(GearSet)
  1980. LockedEquipSet = GearSet
  1981. equip(GearSet)
  1982. SetLocked = true
  1983. end
  1984.  
  1985. function UnlockGearSet()
  1986. locked = false
  1987. equip(equipSet)
  1988. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement