Advertisement
bongarippa

SalWHM

Nov 16th, 2023
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.68 KB | None | 0 0
  1. -- *** Credit goes to Flippant for helping me with Gearswap *** --
  2. -- Last Updated: 03/01/14 12:30 PM *Added Distance Rule/Toggle* --
  3.  
  4. function get_sets()
  5. include('organizer-lib')
  6. IdleIndex = 1
  7. IdleArray = {"Movement","Refresh"} -- Default Idle Set Is Movement --
  8. Armor = 'None'
  9. Kiting = 'ON' -- Set Default Sublimation Kiting ON or OFF Here --
  10. target_distance = 5 -- Set Default Distance Here --
  11.  
  12. Cure_Spells = {"Cure","Cure II","Cure III","Cure IV","Cure V","Cure VI"} -- Cure Degradation --
  13. Curaga_Spells = {"Curaga","Curaga II","Curaga III","Curaga IV","Curaga V"} -- Curaga Degradation --
  14. Na_Spells = S{"Paralyna","Cursna","Silena","Poisona","Blindna","Viruna","Stona","Erase"}
  15. sc_map = {SC1 = "AfflatusSolace", SC2 = "Sublimation", SC3 = "LightArts"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  16.  
  17. -- Idle Sets --
  18. sets.Idle = {main="Daybreak",
  19. sub="Genmei Shield",
  20. ammo="Homiliary",
  21. head="Inyanga Tiara +2",
  22. body="Theo. Bliaut +3",
  23. hands="Inyan. Dastanas +2",
  24. legs="Assid. Pants +1",
  25. feet="Herald's Gaiters",
  26. neck="Loricate Torque +1",
  27. waist="Fucho-no-Obi",
  28. left_ear="Etiolation Earring",
  29. right_ear="Sanare Earring",
  30. left_ring="Inyanga Ring",
  31. right_ring="Stikini Ring +1",
  32. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10',}},}
  33.  
  34. sets.Idle.Refresh = {
  35. main="Daybreak",
  36. sub="Genmei Shield",
  37. ammo="Homiliary",
  38. head="Inyanga Tiara +2",
  39. body="Theo. Bliaut +3",
  40. hands="Inyan. Dastanas +2",
  41. legs="Assid. Pants +1",
  42. feet="Herald's Gaiters",
  43. neck="Loricate Torque +1",
  44. waist="Fucho-no-Obi",
  45. left_ear="Etiolation Earring",
  46. right_ear="Sanare Earring",
  47. left_ring="Inyanga Ring",
  48. right_ring="Stikini Ring +1",
  49. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10',}},}
  50. sets.Idle.Movement = sets.Idle.Refresh
  51. sets.Resting = set_combine(sets.Idle.Refresh,{
  52. })
  53.  
  54. -- PDT Set --
  55. sets.PDT = {}
  56.  
  57. sets.MDT = set_combine(sets.PDT,{})
  58.  
  59. sets.Sublimation = {}
  60.  
  61. sets.Precast = {}
  62. -- Fastcast Set --
  63. sets.Precast.FastCast = {
  64. main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','MND+1','"Mag.Atk.Bns."+17',}},
  65. sub="Genmei Shield",
  66. ammo="Impatiens",
  67. head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
  68. body="Inyanga Jubbah +2",
  69. hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -4%',}},
  70. legs="Aya. Cosciales +2",
  71. feet="Regal Pumps +1",
  72. neck={ name="Clr. Torque +1", augments={'Path: A',}},
  73. waist="Witful Belt",
  74. left_ear="Etiolation Earring",
  75. right_ear="Loquac. Earring",
  76. left_ring="Weather. Ring",
  77. right_ring="Kishar Ring",
  78. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10',}},
  79. }
  80.  
  81. -- Elemental Staves --
  82. sets.Precast.Light = {}
  83.  
  84. -- Precast EnhancingMagic Set --
  85. sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{})
  86.  
  87. -- Precast HealingMagic Set --
  88. sets.Precast.HealingMagic = set_combine(sets.Precast.FastCast,{
  89. neck="Aceso's Choker +1"})
  90.  
  91. --Precast Afflatus Solace --
  92. sets.Precast['Afflatus Solace'] = {body="Ebers Bliaut +1"}
  93.  
  94. -- Cure Precast Set --
  95. sets.Precast.Cure = set_combine(sets.Precast.FastCast,{
  96. sub={neck="Aceso's Choker +1",
  97. feet="Hygieia Clogs +1",
  98. lear="Mendi. Earring",}})
  99.  
  100. -- Arise Precast Set --
  101. sets.Precast.Arise = set_combine(sets.Precast.FastCast,{})
  102.  
  103. -- Midcast Base Set --
  104. sets.Midcast = set_combine(sets.Precast.FastCast,{})
  105.  
  106. -- Haste Set --
  107. sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{})
  108.  
  109. -- Cure Set --
  110. sets.Midcast.Cure = {
  111. main="Raetic Rod +1",
  112. sub="Ammurapi Shield",
  113. ammo="Pemphredo Tathlum",
  114. head={ name="Kaykaus Mitra +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  115. body="Ebers Bliaut +1",
  116. hands="Theophany Mitts +3",
  117. legs="Ebers Pant. +2",
  118. feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
  119. neck={ name="Clr. Torque +1", augments={'Path: A',}},
  120. waist="Shinjutsu-no-Obi +1",
  121. left_ear="Magnetic Earring",
  122. right_ear="Glorious Earring",
  123. left_ring="Mephitas's Ring +1",
  124. right_ring="Stikini Ring +1",
  125. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}},
  126. }
  127.  
  128. -- Curaga Set --
  129. sets.Midcast.Curaga = set_combine(sets.Midcast.Cure,{body="Theo. Bliaut +3"})
  130.  
  131. -- EnhancingMagic Set --
  132. sets.Midcast['Enhancing Magic'] = set_combine(sets.Precast.Fastcast,{
  133. main={ name="Gada", augments={'"Fast Cast"+5','VIT+1','"Mag.Atk.Bns."+20','DMG:+5',}},
  134. head="Befouled Crown",
  135. hands="Inyan. Dastanas +2",
  136. legs="Piety Pantaln. +3",
  137. feet="Theo. Duckbills +3",
  138. neck="Incanter's Torque",
  139. waist="Olympus Sash",
  140. left_ear="Meili Earring",
  141. right_ear="Andoaa Earring",})
  142.  
  143. -- Shellra V Set --
  144. sets.Midcast.Shellra = sets.Midcast['Enhancing Magic']
  145.  
  146. -- Protectra V Set --
  147. sets.Midcast.Protectra = sets.Midcast['Enhancing Magic']
  148.  
  149. -- Arise Set --
  150. sets.Midcast.Arise = set_combine(sets.Precast.FastCast,{})
  151.  
  152. -- Auspice Set --
  153. sets.Midcast.Auspice = set_combine(sets.Precast.FastCast,{feet="Ebers Duckbills +1"})
  154.  
  155. -- Stoneskin Set --
  156. sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{
  157. neck="Nodens Gorget"})
  158.  
  159. -- Erase --
  160. sets.Midcast.Erase = set_combine(sets.Precast.Fastcast,{neck={ name="Clr. Torque +1", augments={'Path: A',}}})
  161.  
  162. -- Regen Set --
  163. sets.Midcast.Regen = set_combine(sets.Midcast.Haste,{
  164. main="Bolelabunga",
  165. sub="Ammurapi Shield",
  166. head="Inyanga Tiara +2",
  167. body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
  168. hands="Ebers Mitts +1",
  169. legs="Th. Pant. +3",
  170. feet="Theo. Duckbills +3",
  171. right_ring="Stikini Ring +1",})
  172.  
  173. -- Barspells Set --
  174. sets.Midcast.Bar = set_combine(sets.Midcast['Enhancing Magic'],{
  175. main="Beneficus",
  176. head="Ebers Cap +1",
  177. body="Ebers Bliaut +1",
  178. hands="Ebers Mitts +1",
  179. legs="Piety Pantaln. +3",
  180. feet="Theo. Duckbills +3",
  181. right_ring="Stikini Ring +1",
  182. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}},
  183. })
  184.  
  185. -- Na Set --
  186. sets.Midcast.Na = set_combine(sets.Midcast.Haste,{
  187. main="Yagrush",
  188. head="Ebers Cap +1",
  189. neck={ name="Clr. Torque +1", augments={'Path: A',}},
  190. back="Mending Cape"})
  191.  
  192. -- Cursna Set --
  193. sets.Midcast.Cursna = {
  194. main="Yagrush",
  195. ammo="Pemphredo Tathlum",
  196. head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
  197. body="Ebers Bliaut +1",
  198. hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
  199. legs="Th. Pant. +3",
  200. feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
  201. neck="Debilis Medallion",
  202. waist="Olympus Sash",
  203. left_ear="Meili Earring",
  204. right_ear="Regal Earring",
  205. left_ring="Haoma's Ring",
  206. right_ring="Menelaus's Ring",
  207. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}}}
  208.  
  209. -- DivineMagic Set --
  210. sets.Midcast.DivineMagic = set_combine(sets.Midcast.Haste,{
  211. main={ name="Gada", augments={'"Fast Cast"+5','VIT+1','"Mag.Atk.Bns."+20','DMG:+5',}},
  212. sub="Ammurapi Shield",
  213. body={ name="Vanya Robe", augments={'MND+8','Spell interruption rate down +11%','"Conserve MP"+5',}},
  214. hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
  215. legs="Th. Pant. +3",
  216. neck="Incanter's Torque",
  217. right_ear="Regal Earring",
  218. left_ring="Weather. Ring",
  219. right_ring="Stikini Ring +1",
  220. })
  221.  
  222. -- EnfeeblingMagic Set --
  223. sets.Midcast['Enfeebling Magic'] = {
  224. main="Yagrush",
  225. sub="Ammurapi Shield",
  226. ammo="Pemphredo Tathlum",
  227. head="Theophany Cap +3",
  228. body="Theo. Bliaut +3",
  229. hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  230. legs="Th. Pant. +3",
  231. feet="Theo. Duckbills +3",
  232. neck="Erra Pendant",
  233. waist="Rumination Sash",
  234. left_ear="Vor Earring",
  235. right_ear="Regal Earring",
  236. left_ring="Stikini Ring +1",
  237. right_ring="Kishar Ring",
  238. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}}}
  239.  
  240. sets.Midcast.Banish = {main="Daybreak",
  241. sub="Ammurapi Shield",
  242. ammo="Ghastly Tathlum +1",
  243. head="Theophany Cap +3",
  244. body="Theo. Bliaut +3",
  245. hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
  246. legs="Th. Pant. +3",
  247. feet="Theo. Duckbills +3",
  248. neck="Incanter's Torque",
  249. waist="Luminary Sash",
  250. left_ear="Malignance Earring",
  251. right_ear="Regal Earring",
  252. left_ring="Weather. Ring",
  253. right_ring="Stikini Ring +1",
  254. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}}}
  255.  
  256. sets.Midcast['Banish II'] = set_combine(sets.Midcast.Banish, {})
  257.  
  258. sets.Midcast['Banish III'] = set_combine(sets.Midcast.Banish, {})
  259.  
  260. sets.Midcast.Holy = set_combine(sets.Midcast.Banish, {})
  261.  
  262. sets.Midcast['Holy II'] = set_combine(sets.Midcast.Banish, {})
  263.  
  264.  
  265.  
  266. -- DarkMagic Set --
  267. sets.Midcast.DarkMagic = {}
  268.  
  269. -- Impact Set --
  270. sets.Midcast.Impact = {}
  271.  
  272. -- JA Sets --
  273. sets.JA = {}
  274. sets.JA.Benediction = {body="Piety Bliaut +3"}
  275. sets.JA.Devotion = {}
  276. sets.JA["Afflatus Solace"] = {
  277. body="Ebers Bliaut +1",
  278. feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
  279. back={ name="Alaunus's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Spell interruption rate down-10%',}}}
  280. sets.JA["Afflatus Misery"] = {legs="Piety Pantaln. +3"}
  281.  
  282. -- Melee Set --
  283. sets.Melee = {ammo="Jukukik Feather",
  284. head="Aya. Zucchetto +2",
  285. body="Ayanmo Corazza +2",
  286. hands="Aya. Manopolas +2",
  287. legs="Aya. Cosciales +2",
  288. feet="Aya. Gambieras +2",
  289. neck="Lissome Necklace",
  290. waist="Windbuffet Belt +1",
  291. left_ear="Brutal Earring",
  292. right_ear="Telos Earring",
  293. left_ring="Petrov Ring",
  294. right_ring="Hetairoi Ring",
  295. back={ name="Alaunus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}}
  296.  
  297.  
  298. -- WS Base Set --
  299. sets.WS = {ammo="Floestone",
  300. head="Aya. Zucchetto +2",
  301. body="Ayanmo Corazza +2",
  302. hands="Aya. Manopolas +2",
  303. legs="Aya. Cosciales +2",
  304. feet="Aya. Gambieras +2",
  305. neck={ name="Clr. Torque +1", augments={'Path: A',}},
  306. waist="Grunfeld Rope",
  307. left_ear="Regal Earring",
  308. right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  309. left_ring="Petrov Ring",
  310. right_ring="Metamor. Ring +1",
  311. back={ name="Alaunus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}}
  312.  
  313. sets.WS["Hexa Strike"] = sets.WS
  314. sets.WS.Realmrazer = sets.WS
  315. sets.WS.Dagan = sets.WS
  316. sets.WS["Mystic Boon"] = sets.WS
  317. sets.WS.Randgrith = sets.WS
  318. end
  319.  
  320. function pretarget(spell,action)
  321. if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  322. cancel_spell()
  323. send_command('input /echo use echos!')
  324. elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  325. degrade_spell(spell,Cure_Spells)
  326. elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  327. degrade_spell(spell,Curaga_Spells)
  328. elseif spell.english == "Rampart" then
  329. cancel_spell()
  330. send_command('input /ja Sacrosanctity <me>')
  331. elseif spell.english == "Dispel" and spell.target.type=="PLAYER" then
  332. cancel_spell()
  333. send_command('input /ma Sacrifice ' .. spell.target.name)
  334. elseif spell.english == "Dispel" and player.target.type=="PLAYER" then
  335. cancel_spell()
  336. send_command('input /ma Sacrifice ' .. player.target.name)
  337. elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  338. if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  339. cancel_spell()
  340. send_command('input /ja Addendum: White <me>')
  341. elseif spell.english == "Manifestation" then
  342. cancel_spell()
  343. send_command('input /ja Accession <me>')
  344. elseif spell.english == "Alacrity" then
  345. cancel_spell()
  346. send_command('input /ja Celerity <me>')
  347. elseif spell.english == "Parsimony" then
  348. cancel_spell()
  349. send_command('input /ja Penury <me>')
  350. end
  351. elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  352. if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  353. cancel_spell()
  354. send_command('input /ja Addendum: Black <me>')
  355. elseif spell.english == "Accession" then
  356. cancel_spell()
  357. send_command('input /ja Manifestation <me>')
  358. elseif spell.english == "Celerity" then
  359. cancel_spell()
  360. send_command('input /ja Alacrity <me>')
  361. elseif spell.english == "Penury" then
  362. cancel_spell()
  363. send_command('input /ja Parsimony <me>')
  364. end
  365. end
  366. end
  367.  
  368. function precast(spell,action)
  369. if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  370. if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  371. cancel_spell()
  372. add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  373. return
  374. else
  375. if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  376. equip(sets.Precast.Cure)
  377. elseif spell.english == "Impact" then
  378. equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  379. elseif string.find(spell.english,'Utsusemi') then
  380. if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  381. cancel_spell()
  382. add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
  383. return
  384. else
  385. equip(sets.Precast.FastCast)
  386. end
  387. elseif sets.Precast[spell.skill] then
  388. equip(sets.Precast[spell.skill])
  389. else
  390. equip(sets.Precast.FastCast)
  391. end
  392. end
  393. elseif spell.type == "JobAbility" then
  394. if sets.JA[spell.english] then
  395. equip(sets.JA[spell.english])
  396. end
  397. elseif spell.type == "WeaponSkill" then
  398. if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  399. cancel_spell()
  400. add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  401. return
  402. elseif sets.WS[spell.english] then
  403. equip(sets.WS[spell.english])
  404. end
  405. elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  406. cast_delay(0.2)
  407. send_command('cancel Sneak')
  408. end
  409. if sets.Precast[spell.element] and not Na_Spells:contains(spell.english) then
  410. equip(sets.Precast[spell.element])
  411. end
  412. end
  413.  
  414. function midcast(spell,action)
  415. equipSet = {}
  416. if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  417. equipSet = sets.Midcast
  418. if Na_Spells:contains(spell.english) then
  419. equipSet = equipSet.Na
  420. if buffactive['Divine Caress'] then
  421. equipSet = set_combine(equipSet,{hands="Ebers Mitts",back="Mending Cape"})
  422. end
  423. elseif string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  424. if string.find(spell.english,'Cure') then
  425. if buffactive["Afflatus Solace"] then
  426. equipSet = equipSet.Cure
  427. else
  428. equipSet = equipSet.Cure
  429. end
  430. elseif string.find(spell.english,'Cura') then
  431. equipSet = equipSet.Curaga
  432. end
  433. if world.day_element == spell.element or world.weather_element == spell.element then
  434. equipSet = set_combine(sets.Midcast.Cure,{})
  435. end
  436. elseif spell.english == "Stoneskin" then
  437. if buffactive.Stoneskin then
  438. send_command('@wait 2.8;cancel stoneskin')
  439. equipSet = sets.Midcast.Stoneskin
  440. end
  441. elseif spell.english == "Sneak" then
  442. if spell.target.name == player.name and buffactive['Sneak'] then
  443. send_command('cancel sneak')
  444. end
  445. equipSet = equipSet.Haste
  446. elseif string.find(spell.english,'Bar') then
  447. equipSet = equipSet.Bar
  448. elseif string.find(spell.english,'Regen') then
  449. equipSet = equipSet.Regen
  450. elseif string.find(spell.english,'Banish') then
  451. equipSet = set_combine(equipSet,{hands="Clr. Mitts +2"})
  452. elseif string.find(spell.english,'Reraise') then
  453. equipSet = equipSet.Haste
  454. elseif string.find(spell.english,'Arise') then
  455. equipSet = equipSet.Arise
  456. elseif string.find(spell.english,'Raise') then
  457. equipSet = equipSet.Arise
  458. elseif string.find(spell.english,'Shellra') then
  459. equipSet = equipSet.Shellra
  460. elseif string.find(spell.english,'Protectra') then
  461. equipSet = equipSet.Protectra
  462. elseif string.find(spell.english,'Utsusemi') then
  463. if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  464. send_command('@wait 1.7;cancel Copy Image*')
  465. end
  466. equipSet = equipSet.Haste
  467. elseif spell.english == 'Monomi: Ichi' then
  468. if buffactive['Sneak'] then
  469. send_command('@wait 1.7;cancel sneak')
  470. end
  471. equipSet = sets.Midcast.Haste
  472. else
  473. if equipSet[spell.english] then
  474. equipSet = equipSet[spell.english]
  475. end
  476. if equipSet[spell.skill] then
  477. equipSet = equipSet[spell.skill]
  478. end
  479. if equipSet[spell.type] then
  480. equipSet = equipSet[spell.type]
  481. end
  482. end
  483. elseif equipSet[spell.english] then
  484. equipSet = equipSet[spell.english]
  485. end
  486. equip(equipSet)
  487. end
  488.  
  489. function aftercast(spell,action)
  490. if (spell.english == "Repose" or spell.english == "Sleep II") and not spell.interrupted then
  491. 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.]')
  492. elseif (spell.english == "Sleep" or spell.english == "Sleepga") and not spell.interrupted then
  493. 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.]')
  494. elseif spell.english == "Banish III" and not spell.interrupted then
  495. send_command('wait 35;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  496. end
  497. status_change(player.status)
  498. end
  499.  
  500. function status_change(new,old)
  501. if Armor == 'PDT' then
  502. equip(sets.PDT)
  503. elseif Armor == 'MDT' then
  504. equip(sets.MDT)
  505. elseif new == 'Engaged' then
  506. equip(sets.Melee)
  507. elseif new == 'Idle' then
  508. equip(sets.Idle[IdleArray[IdleIndex]])
  509. elseif new == 'Resting' then
  510. equip(sets.Resting)
  511. end
  512. end
  513.  
  514. function buff_change(buff,gain)
  515. buff = string.lower(buff)
  516. if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
  517. if gain then
  518. 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.]')
  519. else
  520. send_command('timers delete "Aftermath: Lv.3"')
  521. add_to_chat(123,'AM3: [OFF]')
  522. end
  523. elseif buff == 'weakness' then -- Weakness Timer --
  524. if gain then
  525. send_command('timers create "Weakness" 300 up')
  526. else
  527. send_command('timers delete "Weakness"')
  528. end
  529. end
  530. if not midaction() then
  531. status_change(player.status)
  532. end
  533. end
  534.  
  535. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  536. function self_command(command)
  537. if command == 'C1' then -- Kiting Toggle --
  538. if Kiting == 'ON' then
  539. Kiting = 'OFF'
  540. add_to_chat(123,'Kiting Set: [Unlocked]')
  541. else
  542. Kiting = 'ON'
  543. add_to_chat(158,'Kiting Set: [Locked]')
  544. end
  545. status_change(player.status)
  546. elseif command == 'C5' then -- Auto Update Gear Toggle --
  547. status_change(player.status)
  548. add_to_chat(158,'Auto Update Gear')
  549. elseif command == 'C7' then
  550. if Armor == 'PDT' then -- PDT Toggle --
  551. Armor = 'None'
  552. add_to_chat(123,'PDT Set: [Unlocked]')
  553. else
  554. Armor = 'PDT'
  555. add_to_chat(158,'PDT Set: [Locked]')
  556. end
  557. status_change(player.status)
  558. elseif command == 'C15' then
  559. if Armor == 'MDT' then -- MDT Toggle --
  560. Armor = 'None'
  561. add_to_chat(123,'MDT Set: [Unlocked]')
  562. else
  563. Armor = 'MDT'
  564. add_to_chat(158,'MDT Set: [Locked]')
  565. end
  566. status_change(player.status)
  567. elseif command == 'C8' then -- Distance Toggle --
  568. if player.target.distance then
  569. target_distance = math.floor(player.target.distance*10)/10
  570. add_to_chat(158,'Distance: '..target_distance)
  571. else
  572. add_to_chat(123,'No Target Selected')
  573. end
  574. elseif command == 'C6' then -- Idle Toggle --
  575. IdleIndex = (IdleIndex % #IdleArray) + 1
  576. add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  577. status_change(player.status)
  578. elseif command:match('^SC%d$') then
  579. send_command('//' .. sc_map[command])
  580. end
  581. end
  582.  
  583. function actualCost(originalCost)
  584. if buffactive["Penury"] then
  585. return originalCost*.5
  586. elseif buffactive["Light Arts"] then
  587. return originalCost*.9
  588. else
  589. return originalCost
  590. end
  591. end
  592.  
  593. function degrade_spell(spell,degrade_array)
  594. spell_index = table.find(degrade_array,spell.name)
  595. if spell_index > 1 then
  596. new_spell = degrade_array[spell_index - 1]
  597. change_spell(new_spell,spell.target.raw)
  598. add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  599. end
  600. end
  601.  
  602. function change_spell(spell_name,target)
  603. cancel_spell()
  604. send_command('//'..spell_name..' '..target)
  605. end
  606.  
  607. function select_default_macro_book()
  608. set_macro_page(1, 11)
  609. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement