Advertisement
Guest User

Untitled

a guest
Oct 16th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.60 KB | None | 0 0
  1. -- *** Credit goes to Flippant for helping me with Gearswap *** --
  2. -- ** I Use Motenten's Macro Book Function ** --
  3. -- Last Updated: 05/05/14 12:00 AM *Fixed Magic Sets* --
  4.  
  5. function get_sets()
  6. AccIndex = 1
  7. AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Magic. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
  8. IdleIndex = 1
  9. IdleArray = {"Movement","Refresh"} -- Default Idle Set Is Movement --
  10. Armor = 'None'
  11. StunIndex = 0
  12. Obi = 'ON' -- Turn Default Obi ON or OFF Here --
  13. target_distance = 5 -- Set Default Distance Here --
  14. select_default_macro_book() -- Change Default Macro Book At The End --
  15.  
  16. Non_Obi_Spells = S{
  17. 'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  18. 'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  19.  
  20. Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  21. Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  22. sc_map = {SC1 = "LightArts", SC2 = "Perpetuance", SC3 = "Accession"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  23.  
  24. -- Idle Sets --
  25. sets.Idle = {}
  26. sets.Idle.Refresh = {
  27. main="Bolelabunga",
  28. sub="Genbu's Shield",
  29. ammo="Savant's Treatise",
  30. head="Spurrina coif",
  31. neck="Twilight Torque",
  32. ear1="Novio earring",
  33. ear2="Loquac. Earring",
  34. body="Hagondes coat",
  35. hands="Serpentes Cuffs",
  36. ring1="Sheltered Ring",
  37. ring2="Paguroidea Ring",
  38. back="bookworm's cape",
  39. waist="Fucho-no-obi",
  40. legs="Nares Trews",
  41. feet="Serpentes Sabots"}
  42. sets.Idle.Movement = set_combine(sets.Idle.Refresh,{
  43. main="Bolelabunga",
  44. sub="Genbu's Shield",
  45. ammo="Savant's Treatise",
  46. head="Spurrina coif",
  47. neck="Twilight Torque",
  48. ear1="Novio earring",
  49. ear2="Loquac. Earring",
  50. body="Hagondes coat",
  51. hands="Serpentes Cuffs",
  52. ring1="Sheltered Ring",
  53. ring2="Paguroidea Ring",
  54. back="Mecisto. mantle",
  55. waist="Fucho-no-obi",
  56. legs="Nares Trews",
  57. feet="Serpentes Sabots"})
  58. sets.Resting = set_combine(sets.Idle.Movement,{})
  59.  
  60. -- PDT Set --
  61. sets.PDT = {
  62. main="Bolelabunga",
  63. sub="Genbu's Shield",
  64. head="Hagondes hat +1",
  65. neck="Twilight Torque",
  66. body="Hagondes coat",
  67. hands="Hagondes cuffs +1",
  68. ring1="defending Ring",
  69. ring2="Dark Ring",
  70. back="Repulse Mantle",
  71. waist="Slipor Sash",
  72. legs="Hagondes pants +1",
  73. feet="Umbani boots"}
  74.  
  75. sets.Sublimation = {
  76. main="Siriti",
  77. sub="Genbu's Shield",
  78. ammo="Impatiens",
  79. head="Acad. mortar. +1",
  80. neck="Eddy necklace",
  81. ear1="Savant's earring",
  82. ear2="Loquac. Earring",
  83. body="Hagondes coat",
  84. hands="Serpentes Cuffs",
  85. ring1="K'ayres Ring",
  86. ring2="Meridian Ring",
  87. back="bookworm's cape",
  88. waist="Fucho-no-obi",
  89. legs="Nares Trews",
  90. feet="Serpentes sabots"}
  91.  
  92. sets.Precast = {}
  93. -- Fastcast Sets --
  94. sets.Precast.FastCast = {
  95. ammo="Impatiens",
  96. head="Nahtirah Hat",
  97. neck="Orunmila's Torque",
  98. ear2="Loquac. Earring",
  99. body="Anhur robe",
  100. hands="Acad. Bracers +1",
  101. ring1="Prolix Ring",
  102. ring2="Veneficium Ring",
  103. back="Swith Cape",
  104. waist="Witful Belt";
  105. legs="Orvail Pants +1",
  106. feet="Acad. Loafers +1"}
  107.  
  108. -- Elemental Staves --
  109. sets.Precast.Thunder = {main='Apamajas I'}
  110. sets.Precast.Water = {main='Haoma I'}
  111. sets.Precast.Fire = {main='Atar I'}
  112. sets.Precast.Ice = {main='Vourukasha I'}
  113. sets.Precast.Wind = {main='Vayuvata I'}
  114. sets.Precast.Earth = {main='Vishrava I'}
  115. sets.Precast.Light = {main='Arka I'}
  116. sets.Precast.Dark = {main='Xsaeta I'}
  117.  
  118. -- Precast Enhancing Magic --
  119. sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  120.  
  121. -- Precast Cure Set --
  122. sets.Precast.Cure = {
  123. ammo="Impatiens",
  124. head="Nahtirah Hat",
  125. neck="Orunmila's Torque",
  126. ear2="Loquac. Earring",
  127. body="Heka's Kalasiris",
  128. hands="Acad. Bracers +1",
  129. ring1="Prolix Ring",
  130. ring2="Veneficium Ring",
  131. back="Swith Cape",
  132. waist="Witful Belt";
  133. legs="Orvail Pants +1",
  134. feet="Acad. Loafers +1"}
  135.  
  136. -- Midcast Base Set --
  137. sets.Midcast = {}
  138.  
  139. -- Haste Set --
  140. sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{
  141. ammo="Impatiens",
  142. head="Nahtirah Hat",
  143. neck="Orunmila's Torque",
  144. ear2="Loquac. Earring",
  145. body="Vanir Cotehardie",
  146. hands="Otomi gloves",
  147. ring1="Prolix Ring",
  148. ring2="Veneficium Ring",
  149. back="Swith Cape",
  150. waist="Witful Belt",
  151. legs="Hagondes pants",
  152. feet="Acad. Loafers +1"})
  153.  
  154. -- Cure Set --
  155. sets.Midcast.Cure = {
  156. main="Chatoyant Staff",
  157. sub="Zuuxowu grip",
  158. ammo="Impatiens",
  159. head="Paean mitra",
  160. neck="Phalaina Locket",
  161. ear1="Lifestorm Earring",
  162. ear2="Loquacious earring",
  163. body="Heka's kalasiris",
  164. hands="weath. cuffs +1",
  165. ring1="Sirona's Ring",
  166. ring2="Haoma's ring",
  167. back="Tempered Cape",
  168. waist="Witful belt",
  169. legs="Academic's Pants +1",
  170. feet="Peda. loafers +1"}
  171.  
  172. -- Curaga Set --
  173. sets.Midcast.Curaga = {
  174. main="Chatoyant Staff",
  175. sub="Zuuxowu grip",
  176. ammo="Impatiens",
  177. head="Paean mitra",
  178. neck="Phalaina Locket",
  179. ear1="Lifestorm Earring",
  180. ear2="Loquacious earring",
  181. body="Heka's kalasiris",
  182. hands="weath. cuffs +1",
  183. ring1="Sirona's Ring",
  184. ring2="Haoma's ring",
  185. back="Tempered Cape",
  186. waist="Witful belt",
  187. legs="Academic's Pants +1",
  188. feet="Peda. loafers +1"}
  189.  
  190. -- Enhancing Magic --
  191. sets.Midcast['Enhancing Magic'] = {
  192. main="Kirin's pole",
  193. sub="Fulcio Grip",
  194. ammo="Savant's Treatise",
  195. head="Umuthi Hat",
  196. neck="enhancing torque",
  197. ear1="Andoaa Earring",
  198. body="Anhur robe",
  199. hands="Savant's bracers +2",
  200. ring1="Prolix Ring",
  201. ring2="Veneficium Ring",
  202. back="Merciful cape",
  203. waist="Olympus Sash",
  204. legs="Academic's Pants +1",
  205. feet="Rubeus Boots"}
  206.  
  207. -- Stoneskin --
  208. sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{waist="Siegel Sash",head="Umuthi Hat"})
  209.  
  210. -- Cursna --
  211. sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
  212. head="Nahtirah Hat",
  213. body="Vanir Cotehardie",
  214. hands="Otomi gloves",
  215. ring1="Haoma's Ring",
  216. ring2="Haoma's ring",
  217. back="Altruistic Cape",
  218. waist="Witful Belt",
  219. legs="Hagondes pants",
  220. feet="Rubeus Boots"})
  221.  
  222. -- Stun Sets --
  223. sets.Midcast.Stun = {
  224. main="Apamajas II",
  225. sub="Mephitis Grip",
  226. range="Aureole",
  227. head="Nahtirah Hat",
  228. neck="Orunmila's Torque",
  229. ear1="Lifestorm Earring",
  230. ear2="Psystorm Earring",
  231. body="Vanir Cotehardie",
  232. hands="Acad. Bracers +1",
  233. ring1="Shiva ring +1",
  234. ring2="Sangoma Ring",
  235. back="Swith Cape",
  236. waist="Witful Belt",
  237. legs="Peda. pants +1",
  238. feet="Peda. loafers +1"}
  239. sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{
  240. main="Twebuliij",
  241. sub="Mephitis Grip",
  242. range="Aureole",
  243. head="Nahtirah Hat",
  244. neck="Orunmila's Torque",
  245. ear1="Lifestorm Earring",
  246. ear2="Psystorm Earring",
  247. body="Vanir Cotehardie",
  248. hands="Hagondes cuffs",
  249. ring1="Shiva ring +1",
  250. ring2="Sangoma Ring",
  251. back="Swith Cape",
  252. waist="Witful Belt",
  253. legs="Hagondes pants",
  254. feet="Peda. loafers +1"})
  255. sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{
  256. main="Twebuliij",
  257. sub="Mephitis Grip",
  258. range="Aureole",
  259. head="Artsieq hat",
  260. neck="Imbodla Necklace",
  261. ear1="Lifestorm Earring",
  262. ear2="Psystorm Earring",
  263. body="Vanir Cotehardie",
  264. hands="Hagondes cuffs",
  265. ring1="Shiva ring +1",
  266. ring2="Sangoma Ring",
  267. back="Bookworm Cape",
  268. waist="Ovate rope",
  269. legs="Hagondes pants",
  270. feet="Peda. loafers +1"})
  271.  
  272. -- Dark Magic Sets --
  273. sets.Midcast['Dark Magic'] = {
  274. main="Twebuliij",
  275. sub="Mephitis Grip",
  276. range="Aureole",
  277. head="Pixie hairpin +1",
  278. neck="Imbodla Necklace",
  279. ear1="Lifestorm Earring",
  280. ear2="Psystorm Earring",
  281. body="Hagondes coat",
  282. hands="Hagondes cuffs",
  283. ring1="Archon ring",
  284. ring2="Sangoma Ring",
  285. back="bookworm's cape",
  286. waist="Fucho-no-obi",
  287. legs="Hagondes pants",
  288. feet="Artsieq Boots"}
  289. sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  290. sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  291.  
  292. -- Elemental Sets --
  293. sets.Midcast['Elemental Magic'] = {
  294. main="Keraunos",
  295. sub="Zuuxowu grip",
  296. ammo="Dosis tathlum",
  297. head="Hagondes hat +1",
  298. neck="Eddy necklace",
  299. ear1="Novio earring",
  300. ear2="Friomisi earring",
  301. body="Hagondes coat",
  302. hands="Hagondes cuffs +1",
  303. ring1="Shiva ring +1",
  304. ring2="Shiva ring +1",
  305. back="Toro cape",
  306. waist="Yamabuki-no-Obi",
  307. legs="Hagondes pants +1",
  308. feet="Umbani boots"}
  309. sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{
  310. main="Keraunos",
  311. sub="Zuuxowu grip",
  312. ammo="Dosis tathlum",
  313. head="Hagondes hat +1",
  314. neck="Eddy necklace",
  315. ear1="Novio earring",
  316. ear2="Friomisi earring",
  317. body="Hagondes coat",
  318. hands="Hagondes cuffs +1",
  319. ring1="Shiva ring +1",
  320. ring2="Shiva ring +1",
  321. back="bookworm's cape",
  322. waist="Yamabuki-no-Obi",
  323. legs="Hagondes pants",
  324. feet="Umbani boots"})
  325. sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  326.  
  327. sets.Midcast.Thunder = set_combine(sets.Midcast['Elemental Magic'],{ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  328. sets.Midcast['Thunder II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  329. sets.Midcast.Ionohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  330. sets.Midcast.Blizzard = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  331. sets.Midcast['Blizzard II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  332. sets.Midcast.Cryohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  333. sets.Midcast.Fire = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  334. sets.Midcast['Fire II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  335. sets.Midcast.Pyrohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  336. sets.Midcast.Aero = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  337. sets.Midcast['Aero II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  338. sets.Midcast.Anemohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  339. sets.Midcast.Stone = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  340. sets.Midcast['Stone II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  341. sets.Midcast.Geohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  342. sets.Midcast.Water = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  343. sets.Midcast['Water II'] = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  344. sets.Midcast.Hydrohelix = set_combine(sets.Midcast['Elemental Magic'], {ring1="Fenrir ring +1",ring2="Fenrir ring +1",hands="Otomi Gloves",back="bookworm's cape"})
  345.  
  346. sets.Midcast.helix = {
  347. main="Keraunos",
  348. sub="Zuuxowu grip",
  349. ammo="Dosis tathlum",
  350. head="Hagondes hat +1",
  351. neck="Eddy necklace",
  352. ear1="Novio earring",
  353. ear2="Friomisi earring",
  354. body="Hagondes coat",
  355. hands="Otomi gloves",
  356. ring1="Fenrir ring +1",
  357. ring2="Fenrir ring +1",
  358. back="bookworm's cape",
  359. waist="Yamabuki-no-Obi",
  360. legs="Hagondes pants +1",
  361. feet="Umbani boots"}
  362.  
  363. -- Enfeebling Sets --
  364. sets.Midcast['Enfeebling Magic'] = {
  365. main="Twebuliij",
  366. sub="Mephitis grip",
  367. range="Aureole",
  368. head="Artsieq hat",
  369. neck="Imbodla necklace",
  370. ear1="Lifestorm Earring",
  371. ear2="Psystorm Earring",
  372. body="Ischemia chasu.",
  373. hands="Hagondes cuffs",
  374. ring1="Levia. Ring +1",
  375. ring2="Sangoma Ring",
  376. back="refraction cape",
  377. waist="Ovate rope",
  378. legs="Hagondes pants",
  379. feet="Uk'uxkaj boots"}
  380. sets.Midcast['Enfeebling Magic'].MidACC = set_combine(sets.Midcast['Enfeebling Magic'],{
  381. main="Twebuliij",
  382. sub="Mephitis grip",
  383. range="Aureole",
  384. head="Artsieq hat",
  385. neck="Imbodla necklace",
  386. ear1="Lifestorm Earring",
  387. ear2="Psystorm Earring",
  388. body="Ischemia chasu.",
  389. hands="Hagondes cuffs",
  390. ring1="Levia. Ring +1",
  391. ring2="Sangoma Ring",
  392. back="refraction cape",
  393. waist="Ovate rope",
  394. legs="Hagondes pants",
  395. feet="Artsieq Boots"})
  396. sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  397.  
  398. -- Impact --
  399. sets.Midcast.Impact = {
  400. main="Twebuliij",
  401. sub="Mephitis Grip",
  402. ammo="Savant's Treatise",
  403. neck="Eddy Necklace",
  404. ear1="Lifestorm Earring",
  405. ear2="Psystorm Earring",
  406. body="Twilight Cloak",
  407. hands="Otomi gloves",
  408. ring1="Shiva ring +1",
  409. ring2="Sangoma Ring",
  410. back="bookworm's cape",
  411. waist="Yamabuki-no-Obi",
  412. legs="Hagondes pants +1",
  413. feet="Umbani boots"}
  414.  
  415. -- Elemental Obi/Twilight Cape --
  416. sets.Obi = {}
  417. sets.Obi.Thunder = {back="Twilight Cape",waist='Rairin Obi'}
  418. sets.Obi.Water = {back="Twilight Cape",waist='Suirin Obi'}
  419. sets.Obi.Fire = {back="Twilight Cape",waist='Karin Obi'}
  420. sets.Obi.Ice = {back="Twilight Cape",waist='Hyorin Obi'}
  421. sets.Obi.Wind = {back="Twilight Cape",waist='Furin Obi'}
  422. sets.Obi.Earth = {back="Twilight Cape",waist='Dorin Obi'}
  423. sets.Obi.Light = {back="Twilight Cape",waist='Korin Obi'}
  424. sets.Obi.Dark = {back="Twilight Cape",waist='Anrin Obi'}
  425.  
  426. -- JA Sets --
  427. sets.JA = {}
  428. sets.JA['Tabula Rasa'] = {legs="Peda. pants +1"}
  429.  
  430. -- Melee Set --
  431. sets.Melee = set_combine(sets.Midcast.Haste,{})
  432.  
  433. -- WS Base Set --
  434. sets.WS = {}
  435. sets.WS.Shattersoul = {}
  436. sets.WS.Myrkr = {}
  437. sets.WS.Omniscience = {}
  438. end
  439.  
  440. function pretarget(spell,action)
  441. if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  442. cancel_spell()
  443. send_command('input /item "Echo Drops" <me>')
  444. elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  445. degrade_spell(spell,Cure_Spells)
  446. elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  447. degrade_spell(spell,Curaga_Spells)
  448. elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  449. if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  450. cancel_spell()
  451. send_command('input /ja Addendum: White <me>')
  452. elseif spell.english == "Manifestation" then
  453. cancel_spell()
  454. send_command('input /ja Accession <me>')
  455. elseif spell.english == "Alacrity" then
  456. cancel_spell()
  457. send_command('input /ja Celerity <me>')
  458. elseif spell.english == "Parsimony" then
  459. cancel_spell()
  460. send_command('input /ja Penury <me>')
  461. end
  462. elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  463. if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  464. cancel_spell()
  465. send_command('input /ja Addendum: Black <me>')
  466. elseif spell.english == "Accession" then
  467. cancel_spell()
  468. send_command('input /ja Manifestation <me>')
  469. elseif spell.english == "Celerity" then
  470. cancel_spell()
  471. send_command('input /ja Alacrity <me>')
  472. elseif spell.english == "Penury" then
  473. cancel_spell()
  474. send_command('input /ja Parsimony <me>')
  475. end
  476. end
  477. end
  478.  
  479. function precast(spell,action)
  480. if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  481. if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  482. cancel_spell()
  483. add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  484. return
  485. else
  486. if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  487. equip(sets.Precast.Cure)
  488. elseif spell.english == "Impact" then
  489. equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  490. elseif string.find(spell.english,'Utsusemi') then
  491. if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  492. cancel_spell()
  493. add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
  494. return
  495. else
  496. equip(sets.Precast.FastCast)
  497. end
  498. elseif sets.Precast[spell.skill] then
  499. equip(sets.Precast[spell.skill])
  500. else
  501. equip(sets.Precast.FastCast)
  502. end
  503. end
  504. elseif spell.type == "WeaponSkill" then
  505. if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  506. cancel_spell()
  507. add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  508. return
  509. else
  510. if sets.WS[spell.english] then
  511. equip(sets.WS[spell.english])
  512. end
  513. end
  514. elseif spell.type == "JobAbility" then
  515. if sets.JA[spell.english] then
  516. equip(sets.JA[spell.english])
  517. end
  518. elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  519. cast_delay(0.2)
  520. send_command('cancel Sneak')
  521. end
  522. if sets.Precast[spell.element] then
  523. equip(sets.Precast[spell.element])
  524. end
  525. if StunIndex == 1 then
  526. equip(sets.Midcast.Stun)
  527. end
  528. end
  529.  
  530. function midcast(spell,action)
  531. equipSet = {}
  532. if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  533. equipSet = sets.Midcast
  534. if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  535. if string.find(spell.english,'Cure') then
  536. equipSet = equipSet.Cure
  537. elseif string.find(spell.english,'Cura') then
  538. equipSet = equipSet.Curaga
  539. end
  540. if buffactive.Rapture then -- Equip Svnt. Bonnet +2 When Rapture Is Up For Curaga Spells --
  541. equipSet = set_combine(equipSet,{head="Svnt. Bonnet +2"})
  542. end
  543. elseif spell.english == "Stoneskin" then
  544. if buffactive.Stoneskin then
  545. send_command('@wait 2.8;cancel stoneskin')
  546. end
  547. equipSet = equipSet.Stoneskin
  548. elseif spell.english == "Sneak" then
  549. if spell.target.name == player.name and buffactive['Sneak'] then
  550. send_command('cancel sneak')
  551. end
  552. equipSet = equipSet.Haste
  553. elseif string.find(spell.english,'Regen') then -- Equip Svnt. Bonnet +2 For Regen Spells --
  554. equipSet = set_combine(equipSet,{main="Bolelabunga",head="Svnt. Bonnet +2",back="bookworm's cape"})
  555. elseif string.find(spell.english,'Banish') then
  556. equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
  557. elseif string.find(spell.english,'storm') then
  558. equipSet = set_combine(equipSet.Haste,{feet="Peda. loafers +1"})
  559. elseif spell.english == "Stun" and buffactive.Alacrity and world.weather_element == 'Thunder' then -- Equip Argute loafers +2 When Alacrity Is Up And Thunder Weather --
  560. equipSet = set_combine(equipSet,{feet="Peda. loafers +1"})
  561. elseif string.find(spell.english,'helix') then
  562. equipSet = set_combine(equipSet,sets.Midcast.helix)
  563. elseif string.find(spell.english,'Utsusemi') then
  564. if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  565. send_command('@wait 1.7;cancel Copy Image*')
  566. end
  567. equipSet = equipSet.Haste
  568. elseif spell.english == 'Monomi: Ichi' then
  569. if buffactive['Sneak'] then
  570. send_command('@wait 1.7;cancel sneak')
  571. end
  572. equipSet = equipSet.Haste
  573. else
  574. if equipSet[spell.english] then
  575. equipSet = equipSet[spell.english]
  576. end
  577. if equipSet[spell.skill] then
  578. equipSet = equipSet[spell.skill]
  579. end
  580. if equipSet[AccArray[AccIndex]] then
  581. equipSet = equipSet[AccArray[AccIndex]]
  582. end
  583. if equipSet[spell.type] then
  584. equipSet = equipSet[spell.type]
  585. end
  586. if (spell.skill == 'Elemental Magic' or string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) and not Non_Obi_Spells:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Equip Normal Waist Gear --
  587. equipSet = set_combine(equipSet,sets.Obi[spell.element])
  588. end
  589. end
  590. end
  591. if buffactive.Perpetuance and spell.skill == "Enhancing Magic" then
  592. equipSet = set_combine(equipSet,{hands="Svnt. Bracers +2"})
  593. elseif equipSet[spell.english] then
  594. equipSet = equipSet[spell.english]
  595. end
  596. equip(equipSet)
  597. if StunIndex == 1 then
  598. equip(sets.Midcast.Stun)
  599. end
  600. end
  601.  
  602. function aftercast(spell,action)
  603. if not spell.interrupted then
  604. if spell.english == "Sleep II" then -- Sleep II Countdown --
  605. send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  606. elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  607. send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  608. elseif spell.english == "Banish II" then -- Banish II Countdown --
  609. send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  610. end
  611. end
  612. status_change(player.status)
  613. end
  614.  
  615. function status_change(new,old)
  616. if Armor == 'PDT' then
  617. equip(sets.PDT)
  618. elseif buffactive["Sublimation: Activated"] then
  619. equip(sets.Sublimation)
  620. elseif new == 'Engaged' then
  621. equip(sets.Melee)
  622. elseif new == 'Idle' then
  623. equip(sets.Idle[IdleArray[IdleIndex]])
  624. elseif new == 'Resting' then
  625. equip(sets.Resting)
  626. end
  627. if StunIndex == 1 then
  628. equip(sets.Midcast.Stun)
  629. end
  630. end
  631.  
  632. function buff_change(buff,gain)
  633. buff = string.lower(buff)
  634. if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
  635. if gain then
  636. send_command('timers create "Aftermath: Lv.3" 180 down;wait 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
  637. else
  638. send_command('timers delete "Aftermath: Lv.3"')
  639. add_to_chat(123,'AM3: [OFF]')
  640. end
  641. elseif buff == 'weakness' then -- Weakness Timer --
  642. if gain then
  643. send_command('timers create "Weakness" 300 up')
  644. else
  645. send_command('timers delete "Weakness"')
  646. end
  647. end
  648. if not midaction() then
  649. status_change(player.status)
  650. end
  651. end
  652.  
  653. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  654. function self_command(command)
  655. if command == 'C1' then -- Magic Accuracy Toggle --
  656. AccIndex = (AccIndex % #AccArray) + 1
  657. add_to_chat(158,'Magic Accuracy Level: ' .. AccArray[AccIndex])
  658. status_change(player.status)
  659. elseif command == 'C5' then -- Auto Update Gear Toggle --
  660. status_change(player.status)
  661. add_to_chat(158,'Auto Update Gear')
  662. elseif command == 'C2' then -- Stun Toggle --
  663. if StunIndex == 1 then
  664. StunIndex = 0
  665. add_to_chat(123,'Stun Set: [Unlocked]')
  666. else
  667. StunIndex = 1
  668. add_to_chat(158,'Stun Set: [Locked]')
  669. end
  670. status_change(player.status)
  671. elseif command == 'C3' then -- Obi Toggle --
  672. if Obi == 'ON' then
  673. Obi = 'OFF'
  674. add_to_chat(123,'Obi: [OFF]')
  675. else
  676. Obi = 'ON'
  677. add_to_chat(158,'Obi: [ON]')
  678. end
  679. status_change(player.status)
  680. elseif command == 'C7' then -- PDT Toggle --
  681. if Armor == 'PDT' then
  682. Armor = 'None'
  683. add_to_chat(123,'PDT Set: [Unlocked]')
  684. else
  685. Armor = 'PDT'
  686. add_to_chat(158,'PDT Set: [Locked]')
  687. end
  688. status_change(player.status)
  689. elseif command == 'C8' then -- Distance Toggle --
  690. if player.target.distance then
  691. target_distance = math.floor(player.target.distance*10)/10
  692. add_to_chat(158,'Distance: '..target_distance)
  693. else
  694. add_to_chat(123,'No Target Selected')
  695. end
  696. elseif command == 'C6' then -- Idle Toggle --
  697. IdleIndex = (IdleIndex % #IdleArray) + 1
  698. add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  699. status_change(player.status)
  700. elseif command:match('^SC%d$') then
  701. send_command('//' .. sc_map[command])
  702. end
  703. end
  704.  
  705. function actualCost(originalCost)
  706. if buffactive["Penury"] then
  707. return originalCost*.5
  708. elseif buffactive["Light Arts"] then
  709. return originalCost*.9
  710. else
  711. return originalCost
  712. end
  713. end
  714.  
  715. function degrade_spell(spell,degrade_array)
  716. spell_index = table.find(degrade_array,spell.name)
  717. if spell_index > 1 then
  718. new_spell = degrade_array[spell_index - 1]
  719. change_spell(new_spell,spell.target.raw)
  720. add_to_chat(8,spell.name..' Canceled: [Current MP = ' .. player.mp .. ' | ' .. player.mpp .. '%] Using '..new_spell..' instead.')
  721. end
  722. end
  723.  
  724. function change_spell(spell_name,target)
  725. cancel_spell()
  726. send_command('//'..spell_name..' '..target)
  727. end
  728.  
  729. function sub_job_change(newSubjob, oldSubjob)
  730. select_default_macro_book()
  731. end
  732.  
  733. function set_macro_page(set,book)
  734. if not tonumber(set) then
  735. add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  736. return
  737. end
  738. if set < 1 or set > 10 then
  739. add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  740. return
  741. end
  742.  
  743. if book then
  744. if not tonumber(book) then
  745. add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  746. return
  747. end
  748. if book < 1 or book > 20 then
  749. add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  750. return
  751. end
  752. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  753. else
  754. send_command('@input /macro set '..tostring(set))
  755. end
  756. end
  757.  
  758. function select_default_macro_book()
  759. -- Default macro set/book
  760. if player.sub_job == 'RDM' then
  761. set_macro_page(5, 2)
  762. elseif player.sub_job == 'BLM' then
  763. set_macro_page(5, 2)
  764. elseif player.sub_job == 'WHM' then
  765. set_macro_page(5, 2)
  766. else
  767. set_macro_page(5, 2)
  768. end
  769. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement