Guest User

Untitled

a guest
Jun 23rd, 2014
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.72 KB | None | 0 0
  1. function get_sets()
  2. IdleIndex = 1
  3. IdleArray = {"Movement","Refresh","Geomancy"} -- Default Idle Set Is Movement --
  4. Armor = 'None'
  5. define_geomancy_values()
  6. Obi = 'ON' -- Turn Default Obi ON or OFF Here --
  7. target_distance = 5 -- Set Default Distance Here --
  8. select_default_macro_book() -- Change Default Macro Book At The End --
  9.  
  10. Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  11. Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  12. sc_map = {SC1 = "GeoTorpor", SC2 = "GeoLanguor", SC3 = "IndiFocus"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  13.  
  14. Non_Obi_Spells = S{
  15. 'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  16. 'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  17.  
  18. Cities = S{
  19. "Ru'lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  20. "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  21. "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  22. "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  23. "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  24. "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
  25.  
  26. -- Idle Sets --
  27. sets.Idle = {}
  28. sets.Idle.Refresh = {
  29. main="Bolelabunga",
  30. sub="Genbu's Shield",
  31. range="Dunna",
  32. head="Spurrina Coif",
  33. neck="Wiglen Gorget",
  34. ear1="Colossus's Earring",
  35. ear2="Loquac. Earring",
  36. body="Hagondes Coat +1",
  37. hands="Geo. Mitaines +1",
  38. ring1="Sheltered Ring",
  39. ring2="Paguroidea Ring",
  40. back="Kumbira Cape",
  41. waist="Isa Belt",
  42. legs="Nares Trews",
  43. feet="Bagua Sandals"}
  44. sets.Idle.Movement = set_combine(sets.Idle.Refresh,{
  45. main="Bolelabunga",
  46. sub="Genbu's Shield",
  47. range="Dunna",
  48. head="Spurrina Coif",
  49. neck="Wiglen Gorget",
  50. ear1="Colossus's Earring",
  51. ear2="Loquac. Earring",
  52. body="Hagondes Coat +1",
  53. hands="Serpentes Cuffs",
  54. ring1="Sheltered Ring",
  55. ring2="Paguroidea Ring",
  56. back="Kumbira Cape",
  57. waist="Slipor Sash",
  58. legs="Nares Trews",
  59. feet="Geomancy Sandals"})
  60. sets.Idle.Geomancy = set_combine(sets.Idle.Refresh,{
  61. main="Terra's Staff",
  62. neck="Twilight Torque",
  63. legs="Hagondes Pants",
  64. hands="Geo. Mitaines +1",
  65. feet="Bagua Sandals",
  66. ring1="Defending Ring",
  67. ring2="Dark Ring",
  68. back="Umbra Cape"})
  69.  
  70. sets.Resting = set_combine(sets.Idle.Movement,{})
  71.  
  72. -- PDT Set --
  73. sets.PDT = {
  74. main="Bolelabunga",
  75. sub="Genbu's Shield",
  76. head="Hagondes Hat",
  77. neck="Twilight Torque",
  78. body="Hagondes Coat +1",
  79. hands="Geomancy Mitaines +1",
  80. ring1="Defending Ring",
  81. ring2="Dark Ring",
  82. back="Umbra cape",
  83. waist="Slipor Sash",
  84. legs="Hagondes Pants",
  85. feet="Hagondes sabots +1"}
  86.  
  87. sets.Sublimation = {
  88. main="Bolelabunga",
  89. sub="Genbu's Shield",
  90. range="Dunna",
  91. head="Spurrina Coif",
  92. neck="Wiglen Gorget",
  93. ear1="Colossus's Earring",
  94. ear2="Loquac. Earring",
  95. body="Hagondes Coat +1",
  96. hands="Serpentes Cuffs",
  97. ring1="Sheltered Ring",
  98. ring2="Paguroidea Ring",
  99. back="Kumbira Cape",
  100. waist="Slipor Sash",
  101. legs="Nares Trews",
  102. feet="Serpentes Sabots"}
  103.  
  104. sets.Precast = {}
  105. -- FastCast Sets --
  106. sets.Precast.FastCast = {
  107. head="Nahtirah Hat",
  108. neck="Orunmila's Torque",
  109. ear2="Loquac. Earring",
  110. body="Anhur Robe",
  111. ring1="Prolix Ring",
  112. ring2="Veneficium Ring",
  113. back="Lifestream Cape",
  114. waist="Witful Belt";
  115. legs="Geomancy Pants",
  116. feet="Chelona Boots +1"}
  117.  
  118. -- Geomancy Precast
  119. sets.Precast.GeoCast = set_combine(sets.Precast.FastCast,{range="Dunna",hands="Geo. Mitaines +1",body="Bagua Tunic"})
  120.  
  121. -- Elemental Staves --
  122.  
  123.  
  124. sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  125.  
  126. -- Precast Cure Set --
  127. sets.Precast.Cure = {
  128. sub="Genbu's Shield",
  129. head="Nahtirah Hat",
  130. neck="Orunmila's Torque",
  131. ear2="Loquac. Earring",
  132. body="Heka's Kalasiris",
  133. ring1="Prolix Ring",
  134. ring2="Veneficium Ring",
  135. back="Pahtli Cape",
  136. waist="Witful Belt";
  137. legs="Geomancy Pants",
  138. feet="Chelona Boots +1"}
  139.  
  140. -- Midcast Base Set --
  141. sets.Midcast = {}
  142.  
  143. -- Cure Set --
  144. sets.Midcast.Cure = {
  145. main="Tamaxchi",
  146. sub="Genbu's Shield",
  147. range="Dunna",
  148. head="Nahtirah Hat",
  149. neck="Colossus's Torque",
  150. ear1="Lifestorm Earring",
  151. ear2="Beatific Earring",
  152. body="Heka's Kalasiris",
  153. hands="Ayao's Gages",
  154. ring1="Sirona's Ring",
  155. ring2="Ephedra Ring",
  156. back="Tempered Cape",
  157. waist="Bishop's Sash",
  158. legs="Nares Trews",
  159. feet="Rubeus Boots"}
  160.  
  161. -- Curaga Set --
  162. sets.Midcast.Curaga = {
  163. main="Tamaxchi",
  164. sub="Genbu's Shield",
  165. ammo="Oreiad's Tathlum",
  166. head="Nahtirah Hat",
  167. neck="Nuna Gorget +1",
  168. ear1="Lifestorm Earring",
  169. ear2="Loquac. Earring",
  170. body="Heka's Kalasiris",
  171. hands="Bokwus Gloves",
  172. ring1="Aquasoul Ring",
  173. ring2="Karka Ring",
  174. back="Pahtli Cape",
  175. waist="Pythia Sash +1",
  176. legs="Geomancy Pants",
  177. feet="Geomancy Sandals"}
  178.  
  179. -- Haste Set --
  180. sets.Midcast.Haste = {
  181. head="Nahtirah Hat",
  182. neck="Orunmila's Torque",
  183. ear2="Loquac. Earring",
  184. body="Hedera Cotehardie",
  185. ring1="Prolix Ring",
  186. ring2="Veneficium Ring",
  187. back="Lifestream Cape",
  188. waist="Witful Belt",
  189. legs="Geomancy Pants",
  190. feet="Hagondes Sabots +1"}
  191.  
  192. sets.Midcast['Enhancing Magic'] = {
  193. neck="Colossus's Torque",
  194. body="Manasa Chasuble",
  195. hands="Ayao's Gages",
  196. ring1="Prolix Ring",
  197. ring2="Veneficium Ring",
  198. waist="Olympus Sash",
  199. legs="Portent Pants",
  200. feet="Gende. Galoshes"}
  201.  
  202.  
  203.  
  204. sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{})
  205.  
  206. sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
  207. head="Nahtirah Hat",
  208. neck="Colossus's Torque",
  209. ear2="Beatific Earring",
  210. body="Hedera Cotehardie",
  211. hands="Bokwus Gloves",
  212. ring1="Haoma's Ring",
  213. ring2="Haoma's Ring",
  214. back="Altruistic Cape",
  215. waist="Witful Belt",
  216. legs="Bokwus Slops",
  217. feet="Geo. Sandals +1"})
  218.  
  219. sets.Midcast.Stun = {
  220. main="Venabulum",
  221. sub="Mephitis Grip",
  222. head="Nahtirah Hat",
  223. neck="Orunmila's Torque",
  224. ear1="Lifestorm Earring",
  225. ear2="Psystorm Earring",
  226. body="Hedera Cotehardie",
  227. hands="Otomi Gloves",
  228. ring1="Strendu Ring",
  229. ring2="Sangoma Ring",
  230. back="Swith Cape +1",
  231. waist="Witful Belt",
  232. legs="Geomancy Pants",
  233. feet="Geomancy Sandals"}
  234. sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  235. sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  236.  
  237. -- Dark Magic Sets --
  238. sets.Midcast['Dark Magic'] = { main="Venabulum",
  239. sub="Mephitis Grip",
  240. neck="Imbodla Necklace",
  241. ear1="Lifestorm Earring",
  242. head="Buremte Hat",
  243. ear2="Psystorm Earring",
  244. body="Geomancy Tunic",
  245. hands="Yaoyotl Gloves",
  246. ring1="Sangoma Ring",
  247. ring2="Strendu Ring",
  248. back="Ogapepo Cape",
  249. waist="Aswang Sash",
  250. legs="Bokwus Slops",
  251. feet="Bagua Sandals"}
  252. sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  253. sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  254.  
  255. -- Elemental Sets --
  256. sets.Midcast['Elemental Magic'] = {
  257. main="Venabulum",
  258. sub="Zuuxowu Grip",
  259. neck="Eddy Necklace",
  260. ear1="Crematio Earring",
  261. head="Buremte Hat",
  262. ear2="Friomisi Earring",
  263. body="Hagondes Coat +1",
  264. hands="Otomi Gloves",
  265. ring1="Acumen Ring",
  266. ring2="Strendu Ring",
  267. back="Toro Cape",
  268. waist="Sekhmet Corset",
  269. legs="Hagondes Pants",
  270. feet="Umbani Boots"}
  271. sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{})
  272. sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  273.  
  274. -- Enfeebling Sets --
  275. sets.Midcast['Enfeebling Magic'] = {
  276. main="Venabulum",
  277. sub="Mephitis Grip",
  278. neck="Imbodla Necklace",
  279. ear1="Lifestorm Earring",
  280. head="Buremte Hat",
  281. ear2="Psystorm Earring",
  282. body="Anhur Robe",
  283. hands="Yaoyotl Gloves",
  284. ring1="Sangoma Ring",
  285. ring2="Strendu Ring",
  286. back="Ogapepo Cape",
  287. waist="Aswang Sash",
  288. legs="Bokwus Slops",
  289. feet="Bagua Sandals"}
  290. sets.Midcast['Enfeebling Magic'].MidACC = set_combine(sets.Midcast['Enfeebling Magic'],{})
  291. sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  292.  
  293. sets.Midcast.Impact = {
  294. main="Venabulum",
  295. sub="Zuuxowu Grip",
  296. neck="Eddy Necklace",
  297. ear1="Crematio Earring",
  298. ear2="Friomisi Earring",
  299. body="Hagondes Coat +1",
  300. hands="Otomi Gloves",
  301. ring1="Acumen Ring",
  302. ring2="Strendu Ring",
  303. back="Toro Cape",
  304. waist="Sekhmet Corset",
  305. legs="Hagondes Pants",
  306. feet="Hag. Sabots +1"}
  307.  
  308. -- Elemental Obi/Twilight Cape --
  309. sets.Obi = {}
  310. sets.Obi.Thunder = {back="Twilight Cape",waist='Rairin Obi'}
  311. sets.Obi.Water = {back="Twilight Cape",waist='Suirin Obi'}
  312. sets.Obi.Fire = {back="Twilight Cape",waist='Karin Obi'}
  313. sets.Obi.Ice = {back="Twilight Cape",waist='Hyorin Obi'}
  314. sets.Obi.Wind = {back="Twilight Cape",waist='Furin Obi'}
  315. sets.Obi.Earth = {back="Twilight Cape",waist='Dorin Obi'}
  316. sets.Obi.Light = {back="Twilight Cape",waist='Korin Obi'}
  317. sets.Obi.Dark = {back="Twilight Cape",waist='Anrin Obi'}
  318.  
  319. -- JA Sets --
  320. sets.JA = {}
  321. sets.JA['Life Cycle'] = {body="Geomancy Tunic"}
  322. sets.JA['Bolster'] = {body="Bagua Tunic"}
  323. sets.JA['Radial Arcana'] = {feet="Bagua Sandals"}
  324.  
  325. -- Melee Set --
  326. sets.Melee = set_combine(sets.Midcast.Haste,{
  327. waist="Cetl Belt",
  328. neck="Asperity Necklace",
  329. ring1="Rajas Ring",
  330. ring2="K'ayres Ring",
  331. ear1="Suppanomimi",
  332. ear2="Brutal Earring",
  333. head="Nahtirah Hat",
  334. body="Hagondes Coat +1",
  335. hands="Otomi Gloves",
  336. back="Resilient Mantle",
  337. legs="Theurgist's Slacks",
  338. feet="Hagondes Sabots +1"})
  339.  
  340. -- WS Base Set --
  341. sets.WS = {}
  342. sets.WS["Hexa Strike"] = {
  343. waist="Prosilio Belt",
  344. neck="Flame Gorget",
  345. ring1="Rajas Ring",
  346. ring2="Aquasoul Ring",
  347. ear1="Steelflash Earring",
  348. ear2="Bladeborn Earring",
  349. head="Buremte Hat",
  350. body="Hagondes Coat +1",
  351. hands="Yaoyotl Gloves",
  352. back="Rancorous Mantle",
  353. legs="Theurgist's Slacks",
  354. feet="Umabani Boots"}
  355. sets.WS["Flash Nova"] = {
  356. neck="Eddy Necklace",
  357. ear1="Crematio Earring",
  358. head="Buremte Hat",
  359. ear2="Friomisi Earring",
  360. body="Hagondes Coat +1",
  361. hands="Otomi Gloves",
  362. ring1="Acumen Ring",
  363. ring2="Strendu Ring",
  364. back="Toro Cape",
  365. waist="Sekhmet Corset",
  366. legs="Hagondes Pants",
  367. feet="Hag. Sabots +1"}
  368. sets.WS["Exudation"] = {
  369. waist="Cetl Belt",
  370. neck="Asperity Necklace",
  371. ring1="Galdr Ring",
  372. ring2="Aquasoul Ring",
  373. ear1="Steelflash Earring",
  374. ear2="Bladeborn Earring",
  375. head="Nahtirah Hat",
  376. body="Hagondes Coat +1",
  377. hands="Yaoyotl Gloves",
  378. back="Resilient Mantle",
  379. legs="Theurgist's Slacks",
  380. feet="Umabani Boots"}
  381. sets.WS.Realmrazer = {}
  382. sets.WS.Shattersoul = {}
  383. end
  384.  
  385. function pretarget(spell,action)
  386. if (string.find(spell.type,'Magic') or spell.type == "Ninjutsu" or spell.type == "Geomancy") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  387. cancel_spell()
  388. send_command('input /item "Echo Drops" <me>')
  389. elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  390. degrade_spell(spell,Cure_Spells)
  391. elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  392. degrade_spell(spell,Curaga_Spells)
  393. elseif string.find(spell.english,'Geo') and pet.isvalid then -- Change Any Geo Spells To Full Circle If You Have A Luopan Active --
  394. cancel_spell()
  395. send_command('input /ja "Full Circle" <me>')
  396. elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  397. if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  398. cancel_spell()
  399. send_command('input /ja Addendum: White <me>')
  400. elseif spell.english == "Manifestation" then
  401. cancel_spell()
  402. send_command('input /ja Accession <me>')
  403. elseif spell.english == "Alacrity" then
  404. cancel_spell()
  405. send_command('input /ja Celerity <me>')
  406. elseif spell.english == "Parsimony" then
  407. cancel_spell()
  408. send_command('input /ja Penury <me>')
  409. end
  410. elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  411. if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  412. cancel_spell()
  413. send_command('input /ja Addendum: Black <me>')
  414. elseif spell.english == "Accession" then
  415. cancel_spell()
  416. send_command('input /ja Manifestation <me>')
  417. elseif spell.english == "Celerity" then
  418. cancel_spell()
  419. send_command('input /ja Alacrity <me>')
  420. elseif spell.english == "Penury" then
  421. cancel_spell()
  422. send_command('input /ja Parsimony <me>')
  423. end
  424. end
  425. end
  426.  
  427. function precast(spell,action)
  428. if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  429. if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  430. cancel_spell()
  431. add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  432. return
  433. else
  434. if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  435. equip(sets.Precast.Cure)
  436. elseif spell.english == "Impact" then
  437. equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  438. elseif string.find(spell.english,'Utsusemi') then
  439. if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  440. cancel_spell()
  441. add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
  442. return
  443. else
  444. equip(sets.Precast.FastCast)
  445. end
  446. elseif sets.Precast[spell.skill] then
  447. equip(sets.Precast[spell.skill])
  448. else
  449. equip(sets.Precast.FastCast)
  450. end
  451. end
  452. elseif spell.type == "WeaponSkill" then
  453. if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  454. cancel_spell()
  455. add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  456. return
  457. elseif sets.WS[spell.english] then
  458. equip(sets.WS[spell.english])
  459. end
  460. elseif spell.type == "JobAbility" then
  461. if sets.JA[spell.english] then
  462. equip(sets.JA[spell.english])
  463. end
  464. elseif spell.type == "Geomancy" then
  465. if Cities:contains(world.area) then
  466. cancel_spell()
  467. add_to_chat(123,'Unable To Use Geomancy In Town')
  468. return
  469. else
  470. if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Geomancy If You Are Silenced or Out of Range --
  471. cancel_spell()
  472. add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  473. return
  474. else
  475. display_geomancy_info(spell)
  476. equip(sets.Precast.GeoCast)
  477. end
  478. end
  479. elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  480. cast_delay(0.2)
  481. send_command('cancel Sneak')
  482. end
  483. if sets.Precast[spell.element] then
  484. equip(sets.Precast[spell.element])
  485. end
  486. if StunIndex == 1 then
  487. equip(sets.Midcast.Stun)
  488. end
  489. end
  490.  
  491. function midcast(spell,action)
  492. equipSet = {}
  493. if spell.type:endswith('Magic') or spell.type == "Geomancy" or spell.type == 'Ninjutsu' then
  494. equipSet = sets.Midcast
  495. if string.find(spell.english,'Cure') then
  496. eequipSet = equipSet.Cure
  497. elseif string.find(spell.english,'Cura') then
  498. equipSet = equipSet.Curaga
  499. elseif string.find(spell.english,'Banish') then
  500. equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
  501. elseif spell.english == "Stoneskin" then
  502. if buffactive.Stoneskin then
  503. send_command('@wait 2.8;cancel stoneskin')
  504. end
  505. equipSet = equipSet.Stoneskin
  506. elseif spell.english == "Sneak" then
  507. if spell.target.name == player.name and buffactive['Sneak'] then
  508. send_command('cancel sneak')
  509. end
  510. equipSet = equipSet.Haste
  511. elseif string.find(spell.english,'Utsusemi') then
  512. if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  513. send_command('@wait 1.7;cancel Copy Image*')
  514. end
  515. equipSet = equipSet.Haste
  516. elseif spell.english == 'Monomi: Ichi' then
  517. if buffactive['Sneak'] then
  518. send_command('@wait 1.7;cancel sneak')
  519. end
  520. equipSet = equipSet.Haste
  521. else
  522. if equipSet[spell.english] then
  523. equipSet = equipSet[spell.english]
  524. end
  525. if equipSet[spell.skill] then
  526. equipSet = equipSet[spell.skill]
  527. end
  528.  
  529. if equipSet[spell.type] then
  530. equipSet = equipSet[spell.type]
  531. end
  532. 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 --
  533. equipSet = set_combine(equipSet,sets.Obi[spell.element])
  534. end
  535. end
  536. elseif equipSet[spell.english] then
  537. equipSet = equipSet[spell.english]
  538. end
  539. equip(equipSet)
  540. if StunIndex == 1 then
  541. equip(sets.Midcast.Stun)
  542. end
  543. end
  544.  
  545. function aftercast(spell,action)
  546. if not spell.interrupted then
  547. if spell.english == "Sleep II" then-- Sleep II Countdown --
  548. 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.]')
  549. elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  550. 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.]')
  551. elseif spell.english == "Banish II" then -- Banish II Countdown --
  552. send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  553. end
  554. end
  555. status_change(player.status)
  556. end
  557.  
  558. function status_change(new,old)
  559. if Armor == 'PDT' then
  560. equip(sets.PDT)
  561. elseif buffactive["Sublimation: Activated"] then
  562. equip(sets.Sublimation)
  563. elseif new == 'Engaged' then
  564. equip(sets.Melee)
  565. elseif new == 'Idle' then
  566. equip(sets.Idle[IdleArray[IdleIndex]])
  567. elseif new == 'Resting' then
  568. equip(sets.Resting)
  569. end
  570. if StunIndex == 1 then
  571. equip(sets.Midcast.Stun)
  572. end
  573. end
  574.  
  575. function buff_change(buff,gain)
  576. buff = string.lower(buff)
  577. if buff == 'weakness' then -- Weakness Timer --
  578. if gain then
  579. send_command('timers create "Weakness" 300 up')
  580. else
  581. send_command('timers delete "Weakness"')
  582. end
  583. end
  584. if not midaction() then
  585. status_change(player.status)
  586. end
  587. end
  588.  
  589. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  590. function self_command(command)
  591. if command == 'C1' then -- Stun Toggle --
  592. if StunIndex == 1 then
  593. StunIndex = 0
  594. add_to_chat(123,'Stun Set: [Unlocked]')
  595. else
  596. StunIndex = 1
  597. add_to_chat(158,'Stun Set: [Locked]')
  598. end
  599. status_change(player.status)
  600. elseif command == 'C5' then -- Auto Update Gear Toggle --
  601. status_change(player.status)
  602. add_to_chat(158,'Auto Update Gear')
  603. elseif command == 'C3' then -- Obi Toggle --
  604. if Obi == 'ON' then
  605. Obi = 'OFF'
  606. add_to_chat(123,'Obi: [OFF]')
  607. else
  608. Obi = 'ON'
  609. add_to_chat(158,'Obi: [ON]')
  610. end
  611. status_change(player.status)
  612. elseif command == 'C7' then -- PDT Toggle --
  613. if Armor == 'PDT' then
  614. Armor = 'None'
  615. add_to_chat(123,'PDT Set: [Unlocked]')
  616. else
  617. Armor = 'PDT'
  618. add_to_chat(158,'PDT Set: [Locked]')
  619. end
  620. status_change(player.status)
  621. elseif command == 'C8' then -- Distance Toggle --
  622. if player.target.distance then
  623. target_distance = math.floor(player.target.distance*10)/10
  624. add_to_chat(158,'Distance: '..target_distance)
  625. else
  626. add_to_chat(123,'No Target Selected')
  627. end
  628. elseif command == 'C6' then -- Idle Toggle --
  629. IdleIndex = (IdleIndex % #IdleArray) + 1
  630. add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  631. status_change(player.status)
  632. elseif command:match('^SC%d$') then
  633. send_command('//' .. sc_map[command])
  634. end
  635. end
  636.  
  637. function actualCost(originalCost)
  638. if buffactive["Penury"] then
  639. return originalCost*.5
  640. elseif buffactive["Light Arts"] then
  641. return originalCost*.9
  642. else
  643. return originalCost
  644. end
  645. end
  646.  
  647. function degrade_spell(spell,degrade_array)
  648. spell_index = table.find(degrade_array,spell.name)
  649. if spell_index > 1 then
  650. new_spell = degrade_array[spell_index - 1]
  651. change_spell(new_spell,spell.target.raw)
  652. add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  653. end
  654. end
  655.  
  656. function change_spell(spell_name,target)
  657. cancel_spell()
  658. send_command('//'..spell_name..' '..target)
  659. end
  660.  
  661. function define_geomancy_values()
  662. geomancy = {
  663. Frailty = {bonus="Defense Down"},
  664. Torpor = {bonus="Evasion Down"},
  665. Languor = {bonus="Magic Evasion Down"},
  666. Focus = {bonus="Magic Accuracy"},
  667. Malaise = {bonus="Magic Defense Down"},
  668. Precision = {bonus="Accuracy"},
  669. Refresh = {bonus="Refresh"},
  670. Fade = {bonus="Magic Attack Down"},
  671. Wilt = {bonus="Attack Down"},
  672. Vex = {bonus="Magic Accuracy Down"},
  673. Slip = {bonus="Accuracy Down"},
  674. Acumen = {bonus="Magic Attack"},
  675. Fend = {bonus="Magic Defense"},
  676. Fury = {bonus="Attack"},
  677. Attunement = {bonus="Magic Evasion"},
  678. Voidance = {bonus="Evasion"},
  679. Barrier = {bonus="Defense"}
  680. }
  681. end
  682.  
  683. function display_geomancy_info(spell)
  684. geoType=nil
  685. string.gsub(spell.english.."-","-(.-)-",function(geo) geoType=geo end)
  686. geoInfo = geomancy[geoType]
  687. if geoInfo then
  688. add_to_chat(158, spell.english..' = '..tostring(geoInfo.bonus))
  689. end
  690. end
  691.  
  692. function sub_job_change(newSubjob, oldSubjob)
  693. select_default_macro_book()
  694. end
  695.  
  696. function set_macro_page(set,book)
  697. if not tonumber(set) then
  698. add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  699. return
  700. end
  701. if set < 1 or set > 10 then
  702. add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  703. return
  704. end
  705.  
  706. if book then
  707. if not tonumber(book) then
  708. add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  709. return
  710. end
  711. if book < 1 or book > 20 then
  712. add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  713. return
  714. end
  715. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  716. else
  717. send_command('@input /macro set '..tostring(set))
  718. end
  719. end
  720.  
  721. function select_default_macro_book()
  722. -- Default macro set/book
  723. if player.sub_job == 'RDM' then
  724. set_macro_page(6, 15)
  725. elseif player.sub_job == 'BLM' then
  726. set_macro_page(6, 15)
  727. elseif player.sub_job == 'WHM' then
  728. set_macro_page(6, 15)
  729. else
  730. set_macro_page(6, 15)
  731. end
  732. end
Advertisement
Add Comment
Please, Sign In to add comment