Advertisement
Guest User

Cicion's Sch lua

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