Guest User

Untitled

a guest
Sep 5th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.86 KB | None | 0 0
  1. -- *** Credit goes to Flippant & Martel for helping me with this Gearswap *** --
  2. -- ** I Use Some of Motenten's Functions ** --
  3.  
  4. function get_sets()
  5. AccIndex = 1
  6. AccArray = {"LowACC","MidACC","HighACC","MaxACC"} -- 4 Levels Of Accuracy Sets For TP/WS/Hybrid/Jump. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
  7. AttIndex = 1
  8. AttArray = {"LowATT","HighATT","LowContent"} -- LowATT Is The Same As LowACC Set. MidACC, HighACC & MaxACC Take Priority Over These 2 Sets(HighATT & LowContent). --
  9. IdleIndex = 1
  10. IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
  11. Armor = 'None'
  12. Twilight = 'None'
  13. Rancor = 'ON' -- Set Default Rancor ON or OFF Here --
  14. Brais = 'ON' -- Set Default High Jump Enmity Legs ON or OFF Here --
  15. Samurai_Roll = 'ON' -- Set Default SAM Roll ON or OFF Here --
  16. target_distance = 5 -- Set Default Distance Here --
  17. select_default_macro_book() -- Change Default Macro Book At The End --
  18.  
  19. -- Gavialis Helm --
  20. elements = {}
  21. elements.equip = {head="Gavialis Helm"}
  22. elements.Stardiver = S{"Light","Dark","Earth"}
  23.  
  24. Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  25. Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  26.  
  27. Healer_Type_Wyvern = S{"WHM","RDM","BLM","BLU","SCH","GEO","SMN"} -- 50% Healing Breath Trigger SubJob --
  28. Hybrid_Type_Wyvern = S{"PLD","DRK","BRD","NIN","RUN"} -- 33% Healing Breath Trigger SubJob --
  29.  
  30. sc_map = {SC1="Drakesbane", SC2="SpiritJump", SC3="SoulJump"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  31.  
  32. sets.Idle = {
  33. ammo="Brigantia Pebble",
  34. head="Yaoyotl Helm",
  35. neck="Wiglen Gorget",
  36. ear1="Terra's Pearl",
  37. ear2="Colossus's Earring",
  38. body="Vishap Mail +1",
  39. hands="Umuthi Gloves",
  40. ring1="Defending Ring",
  41. ring2="Dark Ring",
  42. back="Shadow Mantle",
  43. waist="Nierenschutz",
  44. legs="Blood Cuisses",
  45. feet="Whirlpool Greaves"}
  46. -- Idle/Town Sets --
  47. sets.Idle.Regen = {
  48. ammo="Brigantia Pebble",
  49. head="Yaoyotl Helm",
  50. neck="Wiglen Gorget",
  51. ear1="Terra's Pearl",
  52. ear2="Colossus's Earring",
  53. body="Vishap Mail +1",
  54. hands="Umuthi Gloves",
  55. ring1="Defending Ring",
  56. ring2="Dark Ring",
  57. back="Shadow Mantle",
  58. waist="Nierenschutz",
  59. legs="Blood Cuisses",
  60. feet="Whirlpool Greaves"}
  61. sets.Idle.Movement = set_combine(sets.Idle.Regen,{
  62. legs="Blood Cuisses"})
  63. sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
  64. head="Wivre Hairpin",
  65. body="Twilight Mail",
  66. hands="Ogier's Gauntlets",
  67. feet="Ogier's Leggings"})
  68.  
  69. -- Twilight Set --
  70. sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
  71.  
  72. -- TP Base Set --
  73. sets.TP = {
  74. ammo="Hagneia Stone",
  75. head="Otomi Helm",
  76. neck="Ganesha's Mala",
  77. ear1="Brutal Earring",
  78. ear2="Tripudio Earring",
  79. body="Wyvern Mail",
  80. hands="Xaddi Gauntlets",
  81. ring1="Rajas Ring",
  82. ring2="K'ayres Ring",
  83. back="Bleating Mantle",
  84. waist="Windbuffet Belt",
  85. legs="Xaddi Cuisses",
  86. feet="Peltast's Schynbalds"}
  87.  
  88. -- Ryunohige(AM3 Down) TP Sets --
  89. sets.TP.Ryunohige = {}
  90. sets.TP.Ryunohige.MidACC = set_combine(sets.TP.Ryunohige,{})
  91. sets.TP.Ryunohige.HighACC = set_combine(sets.TP.Ryunohige.MidACC,{})
  92. sets.TP.Ryunohige.MaxACC = set_combine(sets.TP.Ryunohige.HighACC,{})
  93.  
  94. -- Ryunohige(AM3 Up) TP Sets --
  95. sets.TP.Ryunohige.AM3 = set_combine(sets.TP.Ryunohige,{})
  96. sets.TP.Ryunohige.MidACC.AM3 = set_combine(sets.TP.Ryunohige.AM3,{})
  97. sets.TP.Ryunohige.HighACC.AM3 = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
  98. sets.TP.Ryunohige.MaxACC.AM3 = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
  99.  
  100. -- Ryunohige(AM3 Down: Ionis) TP Sets --
  101. sets.TP.Ryunohige.Ionis = set_combine(sets.TP.Ryunohige,{})
  102. sets.TP.Ryunohige.MidACC.Ionis = set_combine(sets.TP.Ryunohige.MidACC,{})
  103. sets.TP.Ryunohige.HighACC.Ionis = set_combine(sets.TP.Ryunohige.HighACC,{})
  104. sets.TP.Ryunohige.MaxACC.Ionis = set_combine(sets.TP.Ryunohige.MaxACC,{})
  105.  
  106. -- Ryunohige(AM3 Up: Ionis) TP Sets --
  107. sets.TP.Ryunohige.AM3.Ionis = set_combine(sets.TP.Ryunohige.AM3,{})
  108. sets.TP.Ryunohige.MidACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
  109. sets.TP.Ryunohige.HighACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
  110. sets.TP.Ryunohige.MaxACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
  111.  
  112. -- Ryunohige(AM3 Down: SAM Roll) TP Sets --
  113. sets.TP.Ryunohige.STP = set_combine(sets.TP.Ryunohige,{})
  114. sets.TP.Ryunohige.MidACC.STP = set_combine(sets.TP.Ryunohige.MidACC,{})
  115. sets.TP.Ryunohige.HighACC.STP = set_combine(sets.TP.Ryunohige.HighACC,{})
  116. sets.TP.Ryunohige.MaxACC.STP = set_combine(sets.TP.Ryunohige.MaxACC,{})
  117.  
  118. -- Ryunohige(AM3 Up: SAM Roll) TP Sets --
  119. sets.TP.Ryunohige.AM3.STP = set_combine(sets.TP.Ryunohige.AM3,{})
  120. sets.TP.Ryunohige.MidACC.AM3.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
  121. sets.TP.Ryunohige.HighACC.AM3.STP = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
  122. sets.TP.Ryunohige.MaxACC.AM3.STP = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
  123.  
  124. -- Ryunohige(AM3 Down: Ionis + SAM Roll) TP Sets --
  125. sets.TP.Ryunohige.Ionis.STP = set_combine(sets.TP.Ryunohige,{})
  126. sets.TP.Ryunohige.MidACC.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC,{})
  127. sets.TP.Ryunohige.HighACC.Ionis.STP = set_combine(sets.TP.Ryunohige.HighACC,{})
  128. sets.TP.Ryunohige.MaxACC.Ionis.STP = set_combine(sets.TP.Ryunohige.MaxACC,{})
  129.  
  130. -- Ryunohige(AM3 Up: Ionis + SAM Roll) TP Sets --
  131. sets.TP.Ryunohige.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.AM3,{})
  132. sets.TP.Ryunohige.MidACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
  133. sets.TP.Ryunohige.HighACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
  134. sets.TP.Ryunohige.MaxACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
  135.  
  136. -- Gungnir TP Sets --
  137. sets.TP.Gungnir = {
  138. ammo="Hagneia Stone",
  139. head="Otomi Helm",
  140. neck="Ganesha's Mala",
  141. ear1="Brutal Earring",
  142. ear2="Tripudio Earring",
  143. body="Peltast's Plackart",
  144. hands="Xaddi Gauntlets",
  145. ring1="Rajas Ring",
  146. ring2="K'ayres Ring",
  147. back="Bleating Mantle",
  148. waist="Windbuffet Belt",
  149. legs="Xaddi Cuisses",
  150. feet="Peltast's Schynbalds"}
  151. sets.TP.Gungnir.MidACC = set_combine(sets.TP.Gungnir,{})
  152. sets.TP.Gungnir.HighACC = set_combine(sets.TP.Gungnir.MidACC,{})
  153. sets.TP.Gungnir.MaxACC = set_combine(sets.TP.Gungnir.HighACC,{})
  154.  
  155. -- Gungnir(Ionis) TP Sets --
  156. sets.TP.Gungnir.Ionis = set_combine(sets.TP.Gungnir,{})
  157. sets.TP.Gungnir.MidACC.Ionis = set_combine(sets.TP.Gungnir.MidACC,{})
  158. sets.TP.Gungnir.HighACC.Ionis = set_combine(sets.TP.Gungnir.HighACC,{})
  159. sets.TP.Gungnir.MaxACC.Ionis = set_combine(sets.TP.Gungnir.MaxACC,{})
  160.  
  161. -- Gungnir(SAM Roll) TP Sets --
  162. sets.TP.Gungnir.STP = set_combine(sets.TP.Gungnir,{})
  163. sets.TP.Gungnir.MidACC.STP = set_combine(sets.TP.Gungnir.MidACC,{})
  164. sets.TP.Gungnir.HighACC.STP = set_combine(sets.TP.Gungnir.HighACC,{})
  165. sets.TP.Gungnir.MaxACC.STP = set_combine(sets.TP.Gungnir.MaxACC,{})
  166.  
  167. -- Gungnir(Ionis + SAM Roll) TP Sets --
  168. sets.TP.Gungnir.Ionis.STP = set_combine(sets.TP.Gungnir,{})
  169. sets.TP.Gungnir.MidACC.Ionis.STP = set_combine(sets.TP.Gungnir.MidACC,{})
  170. sets.TP.Gungnir.HighACC.Ionis.STP = set_combine(sets.TP.Gungnir.HighACC,{})
  171. sets.TP.Gungnir.MaxACC.Ionis.STP = set_combine(sets.TP.Gungnir.MaxACC,{})
  172.  
  173. -- Rhongomiant TP Sets --
  174. sets.TP.Rhongomiant = {}
  175. sets.TP.Rhongomiant.MidACC = set_combine(sets.TP.Rhongomiant,{})
  176. sets.TP.Rhongomiant.HighACC = set_combine(sets.TP.Rhongomiant.MidACC,{})
  177. sets.TP.Rhongomiant.MaxACC = set_combine(sets.TP.Rhongomiant.HighACC,{})
  178.  
  179. -- Rhongomiant(Ionis) TP Sets --
  180. sets.TP.Rhongomiant.Ionis = set_combine(sets.TP.Rhongomiant,{})
  181. sets.TP.Rhongomiant.MidACC.Ionis = set_combine(sets.TP.Rhongomiant.MidACC,{})
  182. sets.TP.Rhongomiant.HighACC.Ionis = set_combine(sets.TP.Rhongomiant.HighACC,{})
  183. sets.TP.Rhongomiant.MaxACC.Ionis = set_combine(sets.TP.Rhongomiant.MaxACC,{})
  184.  
  185. -- Rhongomiant(SAM Roll) TP Sets --
  186. sets.TP.Rhongomiant.STP = set_combine(sets.TP.Rhongomiant,{})
  187. sets.TP.Rhongomiant.MidACC.STP = set_combine(sets.TP.Rhongomiant.MidACC,{})
  188. sets.TP.Rhongomiant.HighACC.STP = set_combine(sets.TP.Rhongomiant.HighACC,{})
  189. sets.TP.Rhongomiant.MaxACC.STP = set_combine(sets.TP.Rhongomiant.MaxACC,{})
  190.  
  191. -- Rhongomiant(Ionis + SAM Roll) TP Sets --
  192. sets.TP.Rhongomiant.Ionis.STP = set_combine(sets.TP.Rhongomiant,{})
  193. sets.TP.Rhongomiant.MidACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.MidACC,{})
  194. sets.TP.Rhongomiant.HighACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.HighACC,{})
  195. sets.TP.Rhongomiant.MaxACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.MaxACC,{})
  196.  
  197. -- Upukirex TP Sets --
  198. sets.TP.Upukirex = {}
  199. sets.TP.Upukirex.MidACC = set_combine(sets.TP.Upukirex,{})
  200. sets.TP.Upukirex.HighACC = set_combine(sets.TP.Upukirex.MidACC,{})
  201. sets.TP.Upukirex.MaxACC = set_combine(sets.TP.Upukirex.HighACC,{})
  202.  
  203. -- Upukirex(Ionis) TP Sets --
  204. sets.TP.Upukirex.Ionis = set_combine(sets.TP.Upukirex,{})
  205. sets.TP.Upukirex.MidACC.Ionis = set_combine(sets.TP.Upukirex.MidACC,{})
  206. sets.TP.Upukirex.HighACC.Ionis = set_combine(sets.TP.Upukirex.HighACC,{})
  207. sets.TP.Upukirex.MaxACC.Ionis = set_combine(sets.TP.Upukirex.MaxACC,{})
  208.  
  209. -- Upukirex(SAM Roll) TP Sets --
  210. sets.TP.Upukirex.STP = set_combine(sets.TP.Upukirex,{})
  211. sets.TP.Upukirex.MidACC.STP = set_combine(sets.TP.Upukirex.MidACC,{})
  212. sets.TP.Upukirex.HighACC.STP = set_combine(sets.TP.Upukirex.HighACC,{})
  213. sets.TP.Upukirex.MaxACC.STP = set_combine(sets.TP.Upukirex.MaxACC,{})
  214.  
  215. -- Upukirex(Ionis + SAM Roll) TP Sets --
  216. sets.TP.Upukirex.Ionis.STP = set_combine(sets.TP.Upukirex,{})
  217. sets.TP.Upukirex.MidACC.Ionis.STP = set_combine(sets.TP.Upukirex.MidACC,{})
  218. sets.TP.Upukirex.HighACC.Ionis.STP = set_combine(sets.TP.Upukirex.HighACC,{})
  219. sets.TP.Upukirex.MaxACC.Ionis.STP = set_combine(sets.TP.Upukirex.MaxACC,{})
  220.  
  221. -- AM3 Rancor ON Mantle --
  222. sets.TP.Rancor = {back="Rancorous Mantle"}
  223.  
  224. -- PDT/MDT Sets --
  225. sets.PDT = {
  226. ammo="Brigantia Pebble",
  227. head="Yaoyotl Helm",
  228. neck="Wiglen Gorget",
  229. ear1="Terra's Pearl",
  230. ear2="Colossus's Earring",
  231. body="Vishap Mail +1",
  232. hands="Umuthi Gloves",
  233. ring1="Defending Ring",
  234. ring2="Dark Ring",
  235. back="Shadow Mantle",
  236. waist="Nierenschutz",
  237. legs="Xaddi Cuisses",
  238. feet="Whirlpool Greaves"}
  239.  
  240. sets.MDT = set_combine(sets.PDT,{
  241. ammo="Demonry Stone",
  242. ear1="Sanare Earring",
  243. ear2="Merman's Earring",
  244. hands="Pteroslaver Finger Gauntlets",
  245. legs="Vishap Brais +1"})
  246.  
  247. -- Hybrid Sets --
  248. sets.TP.Hybrid = set_combine(sets.PDT,{})
  249. sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  250. sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  251. sets.TP.Hybrid.MaxACC = set_combine(sets.TP.Hybrid.HighACC,{})
  252.  
  253. -- WS Base Set --
  254. sets.WS = {
  255. ammo="Thew Bomblet",
  256. head="Otomi Helm",
  257. neck="Fotia Gorget",
  258. ear1="Brutal Earring",
  259. ear2="Moonshade Earring",
  260. body="Phorcys Korazin",
  261. hands="Peltast's Vambraces",
  262. ring1="Ifrit Ring",
  263. ring2="Candent Ring",
  264. back="Updraft Mantle",
  265. waist="Fotia Belt",
  266. legs="Peltast's Cuissots",
  267. feet="Whirlpool Greaves"}
  268.  
  269. -- Drakesbane Sets --
  270. sets.WS.Drakesbane = {
  271. ammo="Thew Bomblet",
  272. head="Otomi Helm",
  273. neck="Fotia Gorget",
  274. ear1="Brutal Earring",
  275. ear2="Moonshade Earring",
  276. body="Pteroslaver Mail +1",
  277. hands="Mikinaak Gauntlets",
  278. ring1="Ifrit Ring",
  279. ring2="Candent Ring",
  280. back="Rancorous Mantle",
  281. waist="Fotia Belt",
  282. legs="Peltast's Cuissots",
  283. feet="Hrafn Gambieras"}
  284. sets.WS.Drakesbane.MidACC = set_combine(sets.WS.Drakesbane,{})
  285. sets.WS.Drakesbane.HighACC = set_combine(sets.WS.Drakesbane.MidACC,{})
  286. sets.WS.Drakesbane.MaxACC = set_combine(sets.WS.Drakesbane.HighACC,{})
  287.  
  288. -- Drakesbane(Low Level Content) Set --
  289. sets.WS.Drakesbane.LowContent = set_combine(sets.WS.Drakesbane,{
  290. neck="Ganesha's Mala",
  291. body="Phorcys Korazin",
  292. waist="Windbuffet Belt +1"})
  293.  
  294. -- Drakesbane(High Attack) Set --
  295. sets.WS.Drakesbane.HighATT = set_combine(sets.WS.Drakesbane,{})
  296.  
  297. -- Stardiver Sets --
  298. sets.WS.Stardiver = {
  299. ammo="Thew Bomblet",
  300. head="Otomi Helm",
  301. neck="Fotia Gorget",
  302. ear1="Brutal Earring",
  303. ear2="Moonshade Earring",
  304. body="Pteroslaver Mail +1",
  305. hands="Peltast's Vambraces",
  306. ring1="Ifrit Ring",
  307. ring2="Candent Ring",
  308. back="Buquwik Cape",
  309. waist="Fotia Belt",
  310. legs="Peltast's Cuissots",
  311. feet="Whirlpool Greaves"}
  312. sets.WS.Stardiver.MidACC = set_combine(sets.WS.Stardiver,{})
  313. sets.WS.Stardiver.HighACC = set_combine(sets.WS.Stardiver.MidACC,{})
  314. sets.WS.Stardiver.MaxACC = set_combine(sets.WS.Stardiver.HighACC,{})
  315.  
  316. -- Geirskogul Set --
  317. sets.WS.Geirskogul = {
  318. ammo="Thew Bomblet",
  319. head="Otomi Helm",
  320. neck="Fotia Gorget",
  321. ear1="Brutal Earring",
  322. ear2="Moonshade Earring",
  323. body="Phorcys Korazin",
  324. hands="Peltast's Vambraces",
  325. ring1="Thundersoul Ring",
  326. ring2="Ramuh Ring",
  327. back="Updraft Mantle",
  328. waist="Fotia Belt",
  329. legs="Xaddi Cuisses",
  330. feet="Whirlpool Greaves"}
  331.  
  332. -- Camlann's Torment Set --
  333. sets.WS["Camlann's Torment"] = {
  334. ammo="Thew Bomblet",
  335. head="Otomi Helm",
  336. neck="Fotia Gorget",
  337. ear1="Brutal Earring",
  338. ear2="Moonshade Earring",
  339. body="Phorcys Korazin",
  340. hands="Peltast's Vambraces",
  341. ring1="Ifrit Ring",
  342. ring2="Candent Ring",
  343. back="Updraft Mantle",
  344. waist="Fotia Belt",
  345. legs="Xaddi Cuisses",
  346. feet="Whirlpool Greaves"}
  347.  
  348. sets.JA = {}
  349. -- Jump Sets --
  350. sets.JA.Jump = {
  351. ammo="Hagneia Stone",
  352. head="Yaoyotl Helm",
  353. neck="Ganesha's Mala",
  354. ear1="Brutal Earring",
  355. ear2="Tripudio Earring",
  356. body="Vishap Mail +1",
  357. hands="Vishap Finger Gauntlets +1",
  358. ring1="Rajas Ring",
  359. ring2="K'ayres Ring",
  360. back="Bleating Mantle",
  361. waist="Windbuffet Belt",
  362. legs="Xaddi Cuisses",
  363. feet="Vishap Greaves +1"}
  364. sets.JA.Jump.MidACC = set_combine(sets.JA.Jump,{})
  365. sets.JA.Jump.HighACC = set_combine(sets.JA.Jump.MidACC,{})
  366. sets.JA.Jump.MaxACC = set_combine(sets.JA.Jump.HighACC,{})
  367.  
  368. -- High Jump Sets --
  369. sets.JA["High Jump"] = set_combine(sets.JA.Jump,{
  370. legs="Vishap Brais +1"})
  371. sets.JA["High Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
  372. sets.JA["High Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
  373. sets.JA["High Jump"].MaxACC = set_combine(sets.JA.Jump.MaxACC,{})
  374.  
  375. -- Spirit Jump Sets --
  376. sets.JA["Spirit Jump"] = set_combine(sets.JA.Jump,{
  377. body="Peltast's Plackart",
  378. legs="Peltast's Cuissots",
  379. feet="Peltast's Schynbalds"})
  380. sets.JA["Spirit Jump"].MidACC = set_combine(sets.JA["Spirit Jump"],{})
  381. sets.JA["Spirit Jump"].HighACC = set_combine(sets.JA["Spirit Jump"].MidACC,{})
  382. sets.JA["Spirit Jump"].MaxACC = set_combine(sets.JA["Spirit Jump"].HighACC,{})
  383.  
  384. -- Soul Jump Sets --
  385. sets.JA["Soul Jump"] = set_combine(sets.JA.Jump,{
  386. body="Peltast's Plackart",
  387. legs="Peltast's Cuissots",
  388. feet="Hrafn Gambieras"})
  389. sets.JA["Soul Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
  390. sets.JA["Soul Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
  391. sets.JA["Soul Jump"].MaxACC = set_combine(sets.JA.Jump.MaxACC,{})
  392.  
  393. -- Angon Set --
  394. sets.JA.Angon = {ammo="Angon",ear1="Dragoon's Earring",hands="Ptero. Fin. G. +1"}
  395.  
  396. sets.JA["Ancient Circle"] = {legs="Vishap Brais +1"}
  397. sets.JA['Call Wyvern'] = {body="Ptero. Mail +1"}
  398. sets.JA['Deep Breathing'] = {head="Ptero. Armet +1"}
  399.  
  400. sets.Pet = {}
  401. -- Wyvern +HP Set --
  402. sets.Pet.WyvernHP = {
  403. body="Wyvern Mail",
  404. back="Updraft Mantle",
  405. legs="Vishap Brais +1",
  406. feet="Ptero. Greaves +1"}
  407.  
  408. sets.JA["Spirit Link"] = set_combine(sets.Pet.WyvernHP,{head="Vishap Armet +1",hands="Peltast's Vambraces"})
  409.  
  410. sets.Pet["Steady Wing"] = set_combine(sets.Pet.WyvernHP)
  411.  
  412. sets.Pet["Smiting Breath"] = {
  413. head="Vishap Armet +1",
  414. neck="Lancer's Torque",
  415. ear1="Dragoon's Earring",
  416. back="Updraft Mantle",
  417. belt="Glassblower's Belt"}
  418.  
  419. -- Healing Breath Trigger: +HP Gear --
  420. sets.Healing_Breath_Trigger = {
  421. head="Vishap Armet +1"}
  422.  
  423. -- Healing Breath Set --
  424. sets.Healing_Breath = set_combine(sets.Pet.WyvernHP,{
  425. head="Ptero. Armet +1",
  426. neck="Lancer's Torque",
  427. belt="Glassblower's Belt"})
  428.  
  429. -- Elemental Breath Set
  430. sets.Elemental_Breath = {head="Ptero. Armet +1"}
  431.  
  432. -- Waltz Set --
  433. sets.Waltz = {}
  434.  
  435. sets.Precast = {}
  436. -- Fastcast Set --
  437. sets.Precast.FastCast = {}
  438.  
  439. sets.Midcast = {}
  440. -- Magic Haste Set --
  441. sets.Midcast.Haste = set_combine(sets.PDT,{})
  442.  
  443. -- Stoneskin Set --
  444. sets.Midcast.Stoneskin = {}
  445.  
  446. -- Cure Set --
  447. sets.Midcast.Cure = {
  448. neck="Phalaina Locket",
  449. ear1="Oneiros Earring",
  450. ear2="Roundel Earring",
  451. hands="Buremte Gloves",
  452. ring1="Asklepian Ring",
  453. ring2="Kunaji Ring",
  454. belt="Chuq'aba Belt"}
  455. end
  456.  
  457. function pretarget(spell,action)
  458. if midaction() or pet_midaction() then
  459. cancel_spell()
  460. return
  461. elseif spell.action_type == 'Magic' or spell.type == "Ninjutsu" or spell.type == "BardSong" or spell.type == "Geomancy" or spell.type == "SummonerPact" then -- Auto Use Echo Drops If You Are Silenced --
  462. if buffactive.silence then
  463. cancel_spell()
  464. send_command('input /item "Echo Drops" <me>')
  465. return
  466. end
  467. local spell_recasts = windower.ffxi.get_spell_recasts()
  468. if spell_recasts[spell.recast_id] > 1 then
  469. cancel_spell()
  470. return
  471. end
  472. elseif spell.action_type == 'Ability' then
  473. local abil_recasts = windower.ffxi.get_ability_recasts()
  474. if abil_recasts[spell.recast_id] > 1 and not spell.recast_id == 231 then
  475. cancel_spell()
  476. return
  477. end
  478. elseif spell.english == "Spirit Jump" and not pet.isvalid then -- Change Spirit Jump To Jump If Wyvern Is Not Present --
  479. cancel_spell()
  480. send_command('Jump')
  481. elseif spell.english == "Soul Jump" and not pet.isvalid then -- Change Soul Jump To High Jump If Wyvern Is Not Present --
  482. cancel_spell()
  483. send_command('HighJump')
  484. elseif spell.english == "Dismiss" and pet.hpp < 100 then -- Cancel Dismiss If Wyvern's HP Is Under 100% --
  485. cancel_spell()
  486. add_to_chat(123, spell.english .. ' Canceled: [' .. pet.hpp .. ']')
  487. return
  488. elseif spell.english == "Call Wyvern" and pet.isvalid then -- Change Call Wyvern To Dismiss If Wyvern Is Present --
  489. cancel_spell()
  490. send_command('Dismiss')
  491. elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  492. cancel_spell()
  493. send_command('Aggressor')
  494. elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
  495. cancel_spell()
  496. send_command('ThirdEye')
  497. elseif spell.english == "Meditate" and player.tp > 2900 then -- Cancel Meditate If TP Is Above 2900 --
  498. cancel_spell()
  499. add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
  500. elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
  501. if buffactive.amnesia then
  502. cancel_spell()
  503. return
  504. else
  505. if spell.target.distance > target_distance then -- Cancel WS If You Are Out Of Range --
  506. cancel_spell()
  507. add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  508. return
  509. end
  510. end
  511. elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  512. degrade_spell(spell,Cure_Spells)
  513. elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  514. degrade_spell(spell,Curaga_Spells)
  515. end
  516. end
  517.  
  518. function precast(spell,action)
  519. if midaction() or pet_midaction() then
  520. cancel_spell()
  521. return
  522. elseif spell.english == 'Ranged' then
  523. equip({ammo="Pebble"})
  524. elseif spell.type == "WeaponSkill" then
  525. if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  526. cancel_spell()
  527. add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  528. return
  529. else
  530. equipSet = sets.WS
  531. if equipSet[spell.english] then
  532. equipSet = equipSet[spell.english]
  533. end
  534. if equipSet[AccArray[AccIndex]] then
  535. equipSet = equipSet[AccArray[AccIndex]]
  536. end
  537. if equipSet[AttArray[AttIndex]] then
  538. equipSet = equipSet[AttArray[AttIndex]]
  539. end
  540. if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
  541. equipSet = set_combine(equipSet,elements.equip)
  542. end
  543. if player.tp > 2990 or buffactive.Sekkanoki then -- Equip Kokou's Earring When You Have 3000 TP or Sekkanoki --
  544. equipSet = set_combine(equipSet,{ear1="Kokou's Earring"})
  545. end
  546. if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  547. equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  548. end
  549. equip(equipSet)
  550. end
  551. elseif spell.type == "JobAbility" then
  552. equipSet = sets.JA
  553. if equipSet[spell.english] then
  554. equipSet = equipSet[spell.english]
  555. end
  556. if equipSet[AccArray[AccIndex]] then
  557. equipSet = equipSet[AccArray[AccIndex]]
  558. end
  559. if spell.english == "High Jump" and Brais == 'ON' then -- Use High Jump Enmity Toggle To Equip Vishap Brais +1 For High Jump --
  560. equipSet = set_combine(equipSet,{legs="Vishap Brais +1"})
  561. end
  562. equip(equipSet)
  563. elseif spell.action_type == 'Magic' or spell.type == 'Ninjutsu' or spell.type == "BardSong" or spell.type == "Geomancy" or spell.type == "SummonerPact" then
  564. if buffactive.silence or spell.target.distance > 16+target_distance then
  565. cancel_spell()
  566. add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  567. return
  568. else
  569. if spell.english == 'Utsusemi: Ni' then
  570. if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  571. cancel_spell()
  572. add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
  573. return
  574. else
  575. equip(sets.Precast.FastCast)
  576. end
  577. else
  578. equip(sets.Precast.FastCast)
  579. end
  580. end
  581. elseif spell.type == "Waltz" then
  582. refine_waltz(spell,action)
  583. equip(sets.Waltz)
  584. elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  585. cast_delay(0.2)
  586. send_command('cancel Sneak')
  587. elseif spell.type == "PetCommand" then
  588. equip(sets.Pet[spell.english])
  589. end
  590. if Twilight == 'Twilight' then
  591. equip(sets.Twilight)
  592. end
  593. end
  594.  
  595. function midcast(spell,action)
  596. if pet_midaction() then
  597. return
  598. elseif spell.english == 'Ranged' then
  599. equip({ammo="Pebble"})
  600. elseif spell.action_type == 'Magic' or spell.type == "Ninjutsu" or spell.type == "BardSong" or spell.type == "Geomancy" or spell.type == "SummonerPact" then
  601. if (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  602. equip(sets.Midcast.Cure)
  603. elseif spell.english == "Stoneskin" then
  604. if buffactive.Stoneskin then
  605. send_command('@wait 2.8;cancel stoneskin')
  606. end
  607. equip(sets.Midcast.Stoneskin)
  608. elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  609. if spell.target.name == player.name then
  610. equipSet = set_combine(equipSet,{ring2="Sheltered Ring"})
  611. end
  612. elseif spell.english == "Sneak" then
  613. if spell.target.name == player.name and buffactive['Sneak'] then
  614. send_command('cancel sneak')
  615. end
  616. equip(sets.Midcast.Haste)
  617. elseif spell.english:startswith('Utsusemi') then
  618. if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  619. send_command('@wait 1.7;cancel Copy Image*')
  620. end
  621. equip(sets.Midcast.Haste)
  622. elseif spell.english == 'Monomi: Ichi' then
  623. if buffactive['Sneak'] then
  624. send_command('@wait 1.7;cancel sneak')
  625. end
  626. equip(sets.Midcast.Haste)
  627. elseif Healer_Type_Wyvern:contains(player.sub_job) and player.hpp < 51 and pet.isvalid then
  628. equip(sets.Healing_Breath_Trigger)
  629. elseif Hybrid_Type_Wyvern:contains(player.sub_job) and player.hpp < 34 and pet.isvalid then
  630. equip(sets.Healing_Breath_Trigger)
  631. else
  632. equip(sets.Midcast.Haste)
  633. end
  634. end
  635. end
  636.  
  637. function aftercast(spell,action)
  638. if pet_midaction() then
  639. return
  640. elseif not spell.interrupted then
  641. if spell.type == "WeaponSkill" then
  642. send_command('wait 0.2;gs c TP')
  643. elseif spell.english == "Angon" then -- Angon Timer/Countdown --
  644. timer_angon()
  645. send_command('wait 80;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;timers delete "Angon";input /echo '..spell.name..': [OFF]')
  646. elseif spell.english == "Ancient Circle" then -- Ancient Circle Countdown --
  647. send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
  648. end
  649. elseif not spell.type == "PetCommand" then
  650. status_change(player.status)
  651. end
  652. end
  653.  
  654. function status_change(new,old)
  655. check_equip_lock()
  656. if Armor == 'PDT' then
  657. equip(sets.PDT)
  658. elseif Armor == 'MDT' then
  659. equip(sets.MDT)
  660. elseif new == 'Engaged' then
  661. equipSet = sets.TP
  662. if Armor == 'Hybrid' and equipSet["Hybrid"] then
  663. equipSet = equipSet["Hybrid"]
  664. end
  665. if equipSet[player.equipment.main] then
  666. equipSet = equipSet[player.equipment.main]
  667. end
  668. if equipSet[AccArray[AccIndex]] then
  669. equipSet = equipSet[AccArray[AccIndex]]
  670. end
  671. if buffactive["Aftermath: Lv.3"] and equipSet["AM3"] then
  672. if Rancor == 'ON' then -- Default Rancor Toggle Is Rancorous Mantle --
  673. equipSet = set_combine(equipSet["AM3"],sets.TP.Rancor)
  674. else -- Use Rancor Toggle For Atheling Mantle --
  675. equipSet = equipSet["AM3"]
  676. end
  677. end
  678. if buffactive.Ionis and equipSet["Ionis"] then
  679. equipSet = equipSet["Ionis"]
  680. end
  681. if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
  682. equipSet = equipSet["STP"]
  683. end
  684. equip(equipSet)
  685. else
  686. equipSet = sets.Idle
  687. if equipSet[IdleArray[IdleIndex]] then
  688. equipSet = equipSet[IdleArray[IdleIndex]]
  689. end
  690. if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  691. equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  692. end
  693. equip(equipSet)
  694. end
  695. if Twilight == 'Twilight' then
  696. equip(sets.Twilight)
  697. end
  698. end
  699.  
  700. function buff_change(buff,gain)
  701. buff = string.lower(buff)
  702. if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
  703. if gain then
  704. send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
  705. else
  706. send_command('timers delete "Aftermath: Lv.3"')
  707. add_to_chat(123,'AM3: [OFF]')
  708. end
  709. elseif buff == 'weakness' then -- Weakness Timer --
  710. if gain then
  711. send_command('timers create "Weakness" 300 up')
  712. else
  713. send_command('timers delete "Weakness"')
  714. end
  715. end
  716. if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
  717. equip({neck="Berserker's Torque"})
  718. else
  719. if not midaction() and not pet_midaction() then
  720. status_change(player.status)
  721. end
  722. end
  723. end
  724.  
  725. function pet_midcast(spell,action)
  726. if spell.english:startswith('Healing') then
  727. equip(sets.Healing_Breath)
  728. elseif spell.target.type == 'MONSTER' then
  729. equip(sets.Elemental_Breath)
  730. end
  731. end
  732.  
  733. function pet_aftercast(spell,action)
  734. status_change(player.status)
  735. end
  736.  
  737. function pet_change(pet,gain)
  738. status_change(player.status)
  739. end
  740.  
  741. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  742. function self_command(command)
  743. if command == 'C1' then -- Accuracy Level Toggle --
  744. AccIndex = (AccIndex % #AccArray) + 1
  745. add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
  746. status_change(player.status)
  747. elseif command == 'C9' then -- Attack Toggle --
  748. AttIndex = (AttIndex % #AttArray) + 1
  749. add_to_chat(158,'Attack Level: '..AttArray[AttIndex])
  750. status_change(player.status)
  751. elseif command == 'C5' then -- Auto Update Gear Toggle --
  752. status_change(player.status)
  753. add_to_chat(158,'Auto Update Gear')
  754. elseif command == 'C2' then -- Hybrid Toggle --
  755. if Armor == 'Hybrid' then
  756. Armor = 'None'
  757. add_to_chat(123,'Hybrid Set: [Unlocked]')
  758. else
  759. Armor = 'Hybrid'
  760. add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  761. end
  762. status_change(player.status)
  763. elseif command == 'C7' then -- PDT Toggle --
  764. if Armor == 'PDT' then
  765. Armor = 'None'
  766. add_to_chat(123,'PDT Set: [Unlocked]')
  767. else
  768. Armor = 'PDT'
  769. add_to_chat(158,'PDT Set: [Locked]')
  770. end
  771. status_change(player.status)
  772. elseif command == 'C15' then -- MDT Toggle --
  773. if Armor == 'MDT' then
  774. Armor = 'None'
  775. add_to_chat(123,'MDT Set: [Unlocked]')
  776. else
  777. Armor = 'MDT'
  778. add_to_chat(158,'MDT Set: [Locked]')
  779. end
  780. status_change(player.status)
  781. elseif command == 'C16' then -- Rancor Toggle --
  782. if Rancor == 'ON' then
  783. Rancor = 'OFF'
  784. add_to_chat(123,'Rancor: [OFF]')
  785. else
  786. Rancor = 'ON'
  787. add_to_chat(158,'Rancor: [ON]')
  788. end
  789. status_change(player.status)
  790. elseif command == 'C10' then -- High Jump Enmity Toggle --
  791. if Brais == 'ON' then
  792. Brais = 'OFF'
  793. add_to_chat(123,'High Jump Enmity: [OFF]')
  794. else
  795. Brais = 'ON'
  796. add_to_chat(158,'High Jump Enmity: [ON]')
  797. end
  798. status_change(player.status)
  799. elseif command == 'C17' then -- SAM Roll Toggle --
  800. if Samurai_Roll == 'ON' then
  801. Samurai_Roll = 'OFF'
  802. add_to_chat(123,'SAM Roll: [OFF]')
  803. else
  804. Samurai_Roll = 'ON'
  805. add_to_chat(158,'SAM Roll: [ON]')
  806. end
  807. status_change(player.status)
  808. elseif command == 'C3' then -- Twilight Toggle --
  809. if Twilight == 'Twilight' then
  810. Twilight = 'None'
  811. add_to_chat(123,'Twilight Set: [Unlocked]')
  812. else
  813. Twilight = 'Twilight'
  814. add_to_chat(158,'Twilight Set: [locked]')
  815. end
  816. status_change(player.status)
  817. elseif command == 'C8' then -- Distance Toggle --
  818. if player.target.distance then
  819. target_distance = math.floor(player.target.distance*10)/10
  820. add_to_chat(158,'Distance: '..target_distance)
  821. else
  822. add_to_chat(123,'No Target Selected')
  823. end
  824. elseif command == 'C6' then -- Idle Toggle --
  825. IdleIndex = (IdleIndex % #IdleArray) + 1
  826. add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
  827. status_change(player.status)
  828. elseif command == 'TP' then
  829. add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
  830. elseif command:match('^SC%d$') then
  831. send_command('//' .. sc_map[command])
  832. end
  833. end
  834.  
  835. function check_equip_lock() -- Lock Equipment Here --
  836. if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
  837. disable('ring1','ring2')
  838. elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
  839. disable('back')
  840. else
  841. enable('ring1','ring2','back')
  842. end
  843. end
  844.  
  845. function timer_angon()
  846. local duration = 90
  847. send_command('timers create "Angon" '..tostring(duration)..' down')
  848. end
  849.  
  850. function actualCost(originalCost)
  851. if buffactive["Penury"] then
  852. return originalCost*.5
  853. elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
  854. return originalCost*.9
  855. elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
  856. return originalCost*1.1
  857. else
  858. return originalCost
  859. end
  860. end
  861.  
  862. function degrade_spell(spell,degrade_array)
  863. spell_index = table.find(degrade_array,spell.name)
  864. if spell_index > 1 then
  865. new_spell = degrade_array[spell_index - 1]
  866. change_spell(new_spell,spell.target.raw)
  867. add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  868. end
  869. end
  870.  
  871. function change_spell(spell_name,target)
  872. cancel_spell()
  873. send_command('//'..spell_name..' '..target)
  874. end
  875.  
  876. function refine_waltz(spell,action)
  877. if spell.type ~= 'Waltz' then
  878. return
  879. end
  880.  
  881. if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
  882. return
  883. end
  884.  
  885. local newWaltz = spell.english
  886. local waltzID
  887.  
  888. local missingHP
  889.  
  890. if spell.target.type == "SELF" then
  891. missingHP = player.max_hp - player.hp
  892. elseif spell.target.isallymember then
  893. local target = find_player_in_alliance(spell.target.name)
  894. local est_max_hp = target.hp / (target.hpp/100)
  895. missingHP = math.floor(est_max_hp - target.hp)
  896. end
  897.  
  898. if missingHP ~= nil then
  899. if player.sub_job == 'DNC' then
  900. if missingHP < 40 and spell.target.name == player.name then
  901. add_to_chat(123,'Full HP!')
  902. cancel_spell()
  903. return
  904. elseif missingHP < 150 then
  905. newWaltz = 'Curing Waltz'
  906. waltzID = 190
  907. elseif missingHP < 300 then
  908. newWaltz = 'Curing Waltz II'
  909. waltzID = 191
  910. else
  911. newWaltz = 'Curing Waltz III'
  912. waltzID = 192
  913. end
  914. else
  915. return
  916. end
  917. end
  918.  
  919. local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
  920. local tpCost = waltzTPCost[newWaltz]
  921.  
  922. local downgrade
  923.  
  924. if player.tp < tpCost and not buffactive.trance then
  925.  
  926. if player.tp < 20 then
  927. add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
  928. cancel_spell()
  929. return
  930. elseif player.tp < 35 then
  931. newWaltz = 'Curing Waltz'
  932. elseif player.tp < 50 then
  933. newWaltz = 'Curing Waltz II'
  934. elseif player.tp < 65 then
  935. newWaltz = 'Curing Waltz III'
  936. elseif player.tp < 80 then
  937. newWaltz = 'Curing Waltz IV'
  938. end
  939.  
  940. downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
  941. end
  942.  
  943. if newWaltz ~= spell.english then
  944. send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
  945. if downgrade then
  946. add_to_chat(158, downgrade)
  947. end
  948. cancel_spell()
  949. return
  950. end
  951.  
  952. if missingHP > 0 then
  953. add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
  954. end
  955. end
  956.  
  957. function find_player_in_alliance(name)
  958. for i,v in ipairs(alliance) do
  959. for k,p in ipairs(v) do
  960. if p.name == name then
  961. return p
  962. end
  963. end
  964. end
  965. end
  966.  
  967. function sub_job_change(newSubjob, oldSubjob)
  968. select_default_macro_book()
  969. end
  970.  
  971. function set_macro_page(set,book)
  972. if not tonumber(set) then
  973. add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  974. return
  975. end
  976. if set < 1 or set > 10 then
  977. add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  978. return
  979. end
  980.  
  981. if book then
  982. if not tonumber(book) then
  983. add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  984. return
  985. end
  986. if book < 1 or book > 20 then
  987. add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  988. return
  989. end
  990. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  991. else
  992. send_command('@input /macro set '..tostring(set))
  993. end
  994. end
  995.  
  996. function select_default_macro_book()
  997. -- Default macro set/book
  998. if player.sub_job == 'SAM' then
  999. set_macro_page(2, 14)
  1000. elseif player.sub_job == 'DNC' then
  1001. set_macro_page(4, 14)
  1002. elseif player.sub_job == 'WAR' then
  1003. set_macro_page(1, 14)
  1004. elseif player.sub_job == 'WHM' then
  1005. set_macro_page(4, 14)
  1006. elseif player.sub_job == 'NIN' then
  1007. set_macro_page(5, 14)
  1008. else
  1009. set_macro_page(3, 14)
  1010. end
  1011. end
Advertisement
Add Comment
Please, Sign In to add comment