Guest User

Geo GS

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