FalownPSA

Etsune_GEO

May 1st, 2016
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 37.12 KB | None | 0 0
  1.  
  2. -------------------------------------------------------------------------------------------------------------------
  3. -- Setup functions for this job.  Generally should not be modified.
  4. -------------------------------------------------------------------------------------------------------------------
  5.  
  6. include('organizer-lib')
  7.  
  8. ------ GEO HELPER
  9. Geomancy = {
  10. "Poison","Voidance","Precision","Regen","Attunement","Focus","Barrier","Refresh",
  11. "CHR","MND","Fury","INT","AGI","Fend","VIT","DEX",
  12. "Acumen","STR","Slow","Torpor","Slip","Languor","Paralysis","Vex",
  13. "Frailty","Wilt","Malaise","Gravity","Fade","Haste"
  14. }
  15.  
  16. Geomancy["Poison"]={"-","Poi","Poison"}
  17. Geomancy["Voidance"]={"+","Eva","Evasion"}
  18. Geomancy["Precision"]={"+","Acc","Accuracy"}
  19. Geomancy["Regen"]={"+","Reg","Regen"}
  20. Geomancy["Attunement"]={"+","MEva","Magic Evasion"}
  21. Geomancy["Focus"]={"+","MAcc","Magic Accuracy"}
  22. Geomancy["Barrier"]={"+","Def","Defense"}
  23. Geomancy["Refresh"]={"+","Ref","Refresh"}
  24. Geomancy["CHR"]={"+","CHR","Charisma"}
  25. Geomancy["MND"]={"+","MND","Mind"}
  26. Geomancy["Fury"]={"+","Atk","Attack"}
  27. Geomancy["INT"]={"+","INT","Intelligence"}
  28. Geomancy["AGI"]={"+","AGI","Agility"}
  29. Geomancy["Fend"]={"+","MDB","Magic Defense"}
  30. Geomancy["VIT"]={"+","VIT","Vitality"}
  31. Geomancy["DEX"]={"+","DEX","Dexterity"}
  32. Geomancy["Acumen"]={"+","MAB","Magic Attack"}
  33. Geomancy["STR"]={"+","STR","Strengh"}
  34. Geomancy["Slow"]={"-","Slow","Speed"}
  35. Geomancy["Torpor"]={"-","Eva","Evasion"}
  36. Geomancy["Slip"]={"-","Acc","Accuracy"}
  37. Geomancy["Languor"]={"-","MEva","Magic Evasion"}
  38. Geomancy["Paralysis"]={"-","Para","Paralysis"}
  39. Geomancy["Vex"]={"-","MAcc","Magic Accuracy"}
  40. Geomancy["Frailty"]={"-","Def","Defense"}
  41. Geomancy["Wilt"]={"-","Atk","Attack"}
  42. Geomancy["Malaise"]={"-","MDB","Magic Defense"}
  43. Geomancy["Gravity"]={"-","Grav","Gravity"}
  44. Geomancy["Fade"]={"-","MAB","Magic Attack"}
  45. Geomancy["Haste"]={"+","Haste","Speed"}
  46.  
  47.  
  48.  
  49. GEOSPELL = "Precision"
  50. INDISPELL = "Haste"
  51. ENTRUSTSPELL = "Acumen"
  52. ENTRUSTPLAYER = player.name
  53.  
  54. tb_name = "geohelp"
  55. visible = true
  56. textinbox = ''
  57.  
  58.    
  59.     textinbox = textinbox..' \\cs(125, 125, 125) GEO-'..GEOSPELL..'\\cr \n'
  60.     textinbox = textinbox..' \\cs(125, 125, 125) INDI-'..INDISPELL..'\\cr \n'
  61.     textinbox = textinbox..' \\cs(125, 125, 125) ENTRUST-'..ENTRUSTSPELL..'\\cr \n'
  62.    
  63.    
  64.  
  65.     windower.text.create(tb_name)
  66.     windower.text.set_location(tb_name, 300, 150)
  67.     windower.text.set_bg_color(tb_name, 200, 54, 43, 0)
  68.     windower.text.set_color(tb_name, 255, 147, 161, 161)
  69.     windower.text.set_font(tb_name, "Arial")
  70.     windower.text.set_font_size(tb_name, 10)
  71.     windower.text.set_bold(tb_name, false)
  72.     windower.text.set_italic(tb_name, false)
  73.     windower.text.set_text(tb_name, textinbox)
  74.     windower.text.set_bg_visibility(tb_name, visible)
  75.  
  76.     local player = windower.ffxi.get_player()
  77.  
  78.  
  79. geotr = 0
  80. geotg = 125
  81. geotb = 0
  82.  
  83. inditr = 0
  84. inditg = 125
  85. inditb = 0
  86.  
  87. entrusttr = 0
  88. entrusttg = 125
  89. entrusttb = 0
  90.  
  91. Gr = 125
  92. Gg = 125
  93. Gb = 125
  94.  
  95. GEr = 125
  96. GEg = 125
  97. GEb = 125
  98.  
  99. GEOr = 125
  100. GEOg = 125
  101. GEOb = 125
  102.  
  103.  
  104. function refresh()
  105.     textinbox = ''
  106.    
  107.     -- GEO SPELL
  108.     textinbox = textinbox..' \\cs('..Gr..', '..Gg..', '..Gb..') G\\cr\\cs('..GEr..', '..GEg..', '..GEb..')E\\cr\\cs('..GEOr..', '..GEOg..', '..GEOb..')O\\cr-\\cs('..geotr..', '..geotg..', '..geotb..')'..GEOSPELL..'\\cr \n'
  109.     textinbox = textinbox..' \\cs(125, 125, 125) INDI\\cr-\\cs('..inditr..', '..inditg..', '..inditb..')'..INDISPELL..'\\cr \n'
  110.     textinbox = textinbox..' \\cs(125, 125, 125) ENTRUST\\cr-\\cs('..entrusttr..', '..entrusttg..', '..entrusttb..')'..ENTRUSTSPELL..'\\cr \n'
  111.  
  112.     windower.text.set_text(tb_name, textinbox)
  113. end
  114.  
  115. windower.register_event('unload', function()
  116.     windower.text.delete(tb_name)
  117. end)
  118.  
  119. ---- NOT MY LUA FROM HERE
  120.  
  121.  
  122. function get_sets()
  123.     IdleIndex = 1
  124.     IdleArray = {"Refresh","Pet","Town"} -- Default Idle Set Is Movement --
  125.     Armor = 'None'
  126.     define_geomancy_values()
  127.     Obi = 'ON' -- Turn Default Obi ON or OFF Here --
  128.     target_distance = 5 -- Set Default Distance Here --
  129.  
  130.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  131.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  132.     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. --
  133.  
  134.     Non_Obi_Spells = S{
  135.             'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  136.             'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  137.  
  138.     Cities = S{
  139.             "Ru'lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  140.             "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  141.             "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  142.             "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  143.             "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  144.             "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
  145.  
  146.     -- Idle Sets --
  147.     sets.Idle = {} 
  148.     sets.Idle.Refresh = {
  149.             main="Solstice",
  150.             sub="Sors Shield",
  151.             range="Dunna",
  152.             head="Spurrina Coif",
  153.             neck="Twilight Torque",
  154.             ear1="Ethereal Earring",
  155.             ear2="Sanare Earring",
  156.             body="Geo. Tunic +1",
  157.             hands="Bagua Mitaines",
  158.             ring1="Dark Ring",
  159.             ring2="Dark Ring",
  160.             back="Umbra Cape",
  161.             waist="Fucho-no-obi",
  162.             legs="Assid. Pants +1",
  163.             feet="Geo. Sandals +1",
  164.             ammo=empty}
  165.            
  166.         sets.Idle.Town = {
  167.             main="Solstice",
  168.             sub="Sors Shield",
  169.             range="Dunna",
  170.             head="Spurrina Coif",
  171.             neck="Orunmila's Torque",
  172.             ear1="Ethereal Earring",
  173.             ear2="Enchanter Earring +1",
  174.             body="Geo. Tunic +1",
  175.             hands="Bagua Mitaines",
  176.             ring1="Shiva Ring +1",
  177.             ring2="Shiva Ring +1",
  178.             back="Umbra Cape",
  179.             waist="Austerity Belt +1",
  180.             legs="Geo. Pants +1",
  181.             feet="Geo. Sandals +1",
  182.             ammo=empty}
  183.            
  184.     sets.Resting = set_combine(sets.Idle.Refresh,{})
  185.    
  186.         -- .Pet sets are for when Luopan is present. --
  187.        
  188. sets.Idle.Pet = {main="Earth Staff",sub="Oneiros Grip",range="Dunna",ammo=empty,
  189. head="Hagondes Hat",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Sanare Earring",
  190. body="Hagondes Coat",hands="Geomancy Mitaines",ring1="Dark Ring",ring2="Dark Ring",
  191. back="Lifestream Cape",waist="Slipor Sash",legs="Gyve Trousers",feet="Bagua Sandals"}
  192.  
  193.     -- PDT Set --
  194.     sets.PDT = {
  195.             main="Earth Staff",
  196.             sub="Oneiros Grip",
  197.             head="Hagondes Hat",
  198.             neck="Twilight Torque",
  199.             body="Hagondes Coat",
  200.             hands="Geomancy Mitaines",
  201.             ring1="Dark Ring",
  202.             ring2="Dark Ring",
  203.             back="Lifestream Cape",
  204.             ear1="Ethereal Earring",
  205.             ear2="Sanare Earring",
  206.             waist="Slipor Sash",
  207.             legs="Gyve Trousers",
  208.             feet="Bagua Sandals",
  209.             range="Dunna",
  210.             ammo=empty}
  211.  
  212.     sets.Sublimation = {
  213.             main="Solstice",
  214.             sub="Sors Shield",
  215.             ammo="Oreiad's Tathlum",
  216.             head="Spurrina Coif",
  217.             neck="Dualism Collar",
  218.             ear1="Bloodgem Earring",
  219.             ear2="Loquac. Earring",
  220.             body="Hagondes Coat",
  221.             hands="Serpentes Cuffs",
  222.             ring1="K'ayres Ring",
  223.             ring2="Meridian Ring",
  224.             back="Gigant Mantle",
  225.             waist="Forest Sash",
  226.             legs="Assid. Pants +1",
  227.             feet="Hagondes Sabots +1"}
  228.  
  229.     sets.Precast = {}
  230.     -- FastCast Sets --
  231.     sets.Precast.FastCast = {
  232.             main="Serenity",
  233.             ammo="Impatiens",
  234.             sub="Arbuda Grip",
  235.             head="Nahtirah Hat",
  236.             neck="Orunmila's Torque",
  237.             ear1="Enchanter Earring +1",
  238.             ear2="Loquac. Earring",
  239.             body="Anhur Robe",
  240.             hands="Hagondes Cuffs",
  241.             ring1="Prolix Ring",
  242.             ring2="Veneficium Ring",
  243.             back="Lifestream Cape",
  244.             waist="Witful Belt";
  245.             legs="Geo. Pants +1",
  246.             feet="Chelona Boots +1"}
  247.  
  248.     -- Geomancy Sets --
  249.     sets.Precast.GeoCast = set_combine(sets.Precast.FastCast,{
  250.             main="Serenity",
  251.             sub="Arbuda Grip",
  252.             range="Dunna",
  253.             ammo=empty,
  254.             head="Azimuth Hood",
  255.             waist="Austerity Belt +1",
  256.             body="Bagua Tunic +1",
  257.             hands="Geomancy Mitaines",
  258.             back="Lifestream Cape",
  259.             ear1="Gifted Earring",
  260.             legs="Bagua Pants +1",
  261.             feet="Medium's Sabots"})
  262.    
  263.     -- Elemental Staves --
  264.     sets.Precast.Thunder = {main='Serenity'}
  265.     sets.Precast.Water = {main='Serenity'}
  266.     sets.Precast.Fire = {main='Serenity'}
  267.     sets.Precast.Ice = {main='Serenity'}
  268.     sets.Precast.Wind = {main='Serenity'}
  269.     sets.Precast.Earth = {main='Serenity'}
  270.     sets.Precast.Light = {main='Serenity'}
  271.     sets.Precast.Dark = {main='Serenity'}
  272.  
  273.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash",head="Umuthi Hat"})
  274.  
  275.     -- Precast Cure Set --
  276.     sets.Precast.Cure = {
  277.             main="Tamaxchi",
  278.             sub="Sors Shield",
  279.             head="Nahtirah Hat",
  280.             neck="Orunmila's Torque",
  281.             ear2="Loquac. Earring",
  282.             body="Heka's Kalasiris",
  283.             hands="Hagondes Cuffs",
  284.             ring1="Prolix Ring",
  285.             ring2="Veneficium Ring",
  286.             back="Pahtli Cape",
  287.             waist="Witful Belt";
  288.             legs="Geo. Pants +1",
  289.             feet="Chelona Boots +1"}
  290.  
  291.     -- Midcast Base Set --
  292.     sets.Midcast = {}
  293.  
  294.     -- Cure Set --
  295.     sets.Midcast.Cure = {
  296.             main="Tamaxchi",
  297.             sub="Sors Shield",
  298.             ammo="Oreiad's Tathlum",
  299.             head="Kaabnax Hat",
  300.             neck="Phalaina Locket",
  301.             ear1="Lifestorm Earring",
  302.             ear2="Beatific Earring",
  303.             body="Heka's Kalasiris",
  304.             hands="Bagua Mitaines",
  305.             ring1="Leviathan Ring +1",
  306.             ring2="Haoma's Ring",
  307.             back="Pahtli Cape",
  308.             waist="Bishop's Sash",
  309.             legs="Assid. Pants +1",
  310.             feet="Hagondes Sabots +1"}
  311.  
  312.     -- Curaga Set --
  313.     sets.Midcast.Curaga = {
  314.             main="Tamaxchi",
  315.             sub="Sors Shield",
  316.             ammo="Oreiad's Tathlum",
  317.             head="Kaabnax Hat",
  318.             neck="Phalaina Locket",
  319.             ear1="Lifestorm Earring",
  320.             ear2="Loquac. Earring",
  321.             body="Heka's Kalasiris",
  322.             hands="Bagua Mitaines",
  323.             ring1="Leviathan Ring +1",
  324.             ring2="Karka Ring",
  325.             back="Pahtli Cape",
  326.             waist="Bishop's Sash",
  327.             legs="Assid. Pants +1",
  328.             feet="Hagondes Sabots +1"}
  329.  
  330.     -- Haste Set --
  331.     sets.Midcast.Haste = {
  332.             ammo="Impatiens",
  333.             head="Nahtirah Hat",
  334.             neck="Orunmila's Torque",
  335.             ear2="Loquac. Earring",
  336.             body="Anhur Robe",
  337.             hands="Geomancy Mitaines",
  338.             ring1="Prolix Ring",
  339.             ring2="Veneficium Ring",
  340.             back="Lifestream Cape",
  341.             waist="Ninurta's Sash",
  342.             legs="Geo. Pants +1",
  343.             feet="Umbani Boots"}
  344.  
  345.     sets.Midcast['Enhancing Magic'] = {
  346.             main="Kirin's Pole",
  347.             sub="Fulcio Grip",
  348.             head="Umuthi Hat",
  349.             neck="Colossus's Torque",
  350.             body="Anhur Robe",
  351.             hands="Ayao's Gages",
  352.             ring1="Prolix Ring",
  353.             ring2="Veneficium Ring",
  354.             waist="Cascade Belt",
  355.             legs="Portent Pants",
  356.             feet="Umbani Boots"}
  357.  
  358.     sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{
  359.             head="Umuthi Hat",
  360.             waist="Siegel Sash"})
  361.  
  362.     sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
  363.             head="Nahtirah Hat",
  364.             neck="Colossus's Torque",
  365.             ear2="Beatific Earring",
  366.             body="Anhur Robe",
  367.             hands="Bokwus Gloves",
  368.             ring1="Haoma's Ring",
  369.             ring2="Haoma's Ring",
  370.             back="Altruistic Cape",
  371.             waist="Witful Belt",
  372.             legs="Bokwus Slops",
  373.             feet="Geo. Sandals +1"})
  374.  
  375.     sets.Midcast.Stun = {
  376.             main="Serenity",
  377.             sub="Mephitis Grip",
  378.             range="Aureole",
  379.             head="Nahtirah Hat",
  380.             neck="Orunmila's Torque",
  381.             ear1="Loquac. Earring",
  382.             ear2="Enchanter Earring +1",
  383.             body="Vanir Cotehardie",
  384.             hands="Hagondes Cuffs",
  385.             ring1="Prolix Ring",
  386.             ring2="Sangoma Ring",
  387.             back="Lifestream Cape",
  388.             waist="Ninurta's Sash",
  389.             legs="Geo. Pants +1",
  390.             feet="Hagondes Sabots +1"}
  391.     sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  392.     sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  393.  
  394.     -- Elemental Sets --
  395.     sets.Midcast['Elemental Magic'] = {
  396.             main="Serenity",
  397.             sub="Mephitis grip",
  398.             ammo="Erlene's Notebook",
  399.             head="Buremte Hat",
  400.             neck="Baetyl Pendant",
  401.             ear1="Novio Earring",
  402.             ear2="Friomisi Earring",
  403.             body="Seidr Cotehardie",
  404.             hands="Otomi Gloves",
  405.             ring1="Shiva Ring +1",
  406.             ring2="Shiva Ring +1",
  407.             back="Toro Cape",
  408.             waist="Sekhmet Corset",
  409.             legs="Gyve Trousers",
  410.             feet="Umbani Boots"}
  411.            
  412.     sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{
  413.             head="Hagondes Hat",
  414.             body="Hagondes Coat"})
  415.     sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  416.    
  417.         -- Dark Magic Sets --
  418.     sets.Midcast['Dark Magic'] = set_combine(sets.Midcast['Elemental Magic'],{
  419.             ear1="Psystorm Earring",
  420.             ear2="Lifestorm Earring",
  421.             body="Geo. Tunic +1",
  422.             head="Buremte Hat",
  423.             hands="Hagondes Cuffs",
  424.             legs="Gyve Trousers",
  425.             back="Refraction Cape",
  426.             ring1="Archon Ring",
  427.             ring2="Shiva Ring +1"})
  428.            
  429.     sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  430.     sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  431.    
  432.     sets.Midcast.Aspir = set_combine(sets.Midcast['Dark Magic'],{
  433.             ring2="Excelsis Ring",
  434.             head="Bagua Galero",
  435.             waist="Fucho-no-obi"})
  436.        
  437.     sets.Midcast.Drain = set_combine(sets.Midcast.Aspir)
  438.  
  439.  
  440.     -- Enfeebling Sets --
  441.     sets.Midcast['Enfeebling Magic'] = {
  442.             main="Serenity",
  443.             sub="Mephitis Grip",
  444.             range=empty,
  445.             ammo="Kalboron Stone",
  446.             head="Kaabnax Hat",
  447.             neck="Imbodla Necklace",
  448.             ear1="Lifestorm Earring",
  449.             ear2="Psystorm Earring",
  450.             body="Ischemia Chasuble",
  451.             hands="Hagondes Cuffs",
  452.             waist="Yamabuki-No-Obi",
  453.             back="Refraction Cape",
  454.             legs="Gyve Trousers",
  455.             ring1="Sangoma Ring",
  456.             ring2="Leviathan Ring +1",
  457.             feet="Bagua Sandals"}
  458.     sets.Midcast['Enfeebling Magic'].MidACC =  set_combine(sets.Midcast['Enfeebling Magic'],{})
  459.     sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  460.  
  461.     sets.Midcast.Impact = {
  462.             main="Serenity",
  463.             sub="Mephitis grip",
  464.             neck="Imbodla necklace",
  465.             head=empty,
  466.             ear1="Lifestorm Earring",
  467.             ear2="Psystorm Earring",
  468.             body="Twilight Cloak",
  469.             hands="Hagondes Cuffs",
  470.             ring1="Archon Ring",
  471.             ring2="Sangoma Ring",
  472.             back="Refraction Cape",
  473.             waist="Yamabuki-No-Obi",
  474.             legs="Gyve Trousers",
  475.             feet="Bagua Sandals"}
  476.            
  477.     -- Para/Slow Set --
  478.     sets.Midcast.paralyze = set_combine(sets.Midcast['Enfeebling Magic'],{
  479.             feet="Uk'uxkaj boots"})
  480.            
  481.     sets.Midcast.slow = set_combine(sets.Midcast['Enfeebling Magic'],{
  482.             feet="Uk'uxkaj boots"})
  483.            
  484.     -- Geomancy Midcast --
  485.     sets.Midcast.GeoCast = set_combine(sets.Precast.GeoCast,{
  486.             main="Serenity",
  487.             sub="Arbuda Grip",
  488.             range="Dunna",
  489.             ammo=empty,
  490.             body="Bagua Tunic +1",
  491.             hands="Geomancy Mitaines",
  492.             waist="Austerity Belt +1",
  493.             back="Lifestream Cape",
  494.             ear1="Gifted Earring",
  495.             ear2="Gwati Earring",
  496.             legs="Bagua Pants +1",
  497.             feet="Umbani Boots"})
  498.            
  499.  
  500.     -- Elemental Obi/Twilight Cape --
  501.     sets.Obi = {}
  502.     sets.Obi.Thunder = {back="Twilight Cape",waist='Rairin Obi'}
  503.     sets.Obi.Water = {back="Twilight Cape",waist='Suirin Obi'}
  504.     sets.Obi.Fire = {back="Twilight Cape",waist='Karin Obi'}
  505.     sets.Obi.Ice = {back="Twilight Cape",waist='Hyorin Obi'}
  506.     sets.Obi.Wind = {back="Twilight Cape",waist='Furin Obi'}
  507.     sets.Obi.Earth = {back="Twilight Cape",waist='Dorin Obi'}
  508.     sets.Obi.Light = {back="Twilight Cape",waist='Korin Obi'}
  509.     sets.Obi.Dark = {back="Twilight Cape",waist='Anrin Obi'}
  510.  
  511.     -- JA Sets --
  512.     sets.JA = {}
  513.     sets.JA['Life Cycle'] = {body="Geo. Tunic +1"}
  514.     sets.JA.Bolster = {body="Bagua Tunic +1"}
  515.     sets.JA['Radial Arcana'] = {feet="Bagua Sandals"}
  516.     sets.JA['Mending Halation'] = {legs="Bagua Pants +1"}
  517.    
  518.  
  519.     -- Melee Set --
  520.     sets.Melee = {
  521.             range="Dunna",
  522.             ammo=empty,
  523.             head="Kaabnax Hat",
  524.             neck="Asperity Necklace",
  525.             ear1="Bladeborn Earring",
  526.             ear2="Steelflash Earring",
  527.             body="Onca Suit",
  528.             ring1="Petrov Ring",
  529.             ring2="Rajas Ring",
  530.             back="Kayapa Cape",
  531.             waist="Windbuffet Belt"}
  532.  
  533.     -- WS Base Set --
  534.     sets.WS = set_combine(sets.Melee,{})
  535.     sets.WS["Hexa Strike"] = {
  536.             range="Dunna",
  537.             ammo=empty,
  538.             head="Buremte Hat",
  539.             neck="Nefarious Collar",
  540.             ear1="Vulcan's Pearl",
  541.             ear2="Flame Pearl",
  542.             body="Vanir Cotehardie",
  543.             hands="Otomi Gloves",
  544.             ring1="Rajas Ring",
  545.             ring2="Pyrosoul Ring",
  546.             back="Rancorous Mantle",
  547.             waist="Wanion Belt",
  548.             legs="Perdition Slops",
  549.             feet="Uk'uxkaj Boots"}
  550.     sets.WS.Realmrazer = {}
  551.     sets.WS.Shattersoul = {}
  552.     sets.WS["Flash Nova"] = {
  553.             range="Dunna",
  554.             ammo=empty,
  555.             head="Hagondes Hat",
  556.             neck="Eddy Necklace",
  557.             ear1="Novio Earring",
  558.             ear2="Friomisi Earring",
  559.             body="Hagondes Coat",
  560.             hands="Yaoyotl Gloves",
  561.             ring1="Shiva Ring +1",
  562.             ring2="Shiva Ring +1",
  563.             back="Toro Cape",
  564.             waist="Yamabuki-No-Obi",
  565.             legs="Gyve Trousers",
  566.             feet="Umbani Boots"}
  567.    
  568.     -- Latent Idle Set --
  569.     sets.latent_refresh = {waist="Fucho-no-obi"}
  570.    
  571.         -- Lock Main Weapon --
  572.     sets.MainWeapon = {
  573.             main="Solstice",
  574.             sub="Sors Shield"}
  575. end
  576.  
  577. function pretarget(spell,action)
  578.     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 --
  579.         cancel_spell()
  580.         send_command('input /item "Echo Drops" <me>')
  581.     elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  582.         degrade_spell(spell,Cure_Spells)
  583.     elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  584.         degrade_spell(spell,Curaga_Spells)
  585.     elseif string.find(spell.english,'Geo') and pet.isvalid then -- Change Any Geo Spells To Full Circle If You Have A Luopan Active --
  586.         cancel_spell()
  587.         send_command('input /ja "Full Circle" <me>')
  588.     elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  589.         if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  590.             cancel_spell()
  591.             send_command('input /ja Addendum: White <me>')
  592.         elseif spell.english == "Manifestation" then
  593.             cancel_spell()
  594.             send_command('input /ja Accession <me>')
  595.         elseif spell.english == "Alacrity" then
  596.             cancel_spell()
  597.             send_command('input /ja Celerity <me>')
  598.         elseif spell.english == "Parsimony" then
  599.             cancel_spell()
  600.             send_command('input /ja Penury <me>')
  601.         end
  602.     elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  603.         if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  604.             cancel_spell()
  605.             send_command('input /ja Addendum: Black <me>')
  606.         elseif spell.english == "Accession" then
  607.             cancel_spell()
  608.             send_command('input /ja Manifestation <me>')
  609.         elseif spell.english == "Celerity" then
  610.             cancel_spell()
  611.             send_command('input /ja Alacrity <me>')
  612.         elseif spell.english == "Penury" then
  613.             cancel_spell()
  614.             send_command('input /ja Parsimony <me>')
  615.         end
  616.     end
  617. end
  618.  
  619. function precast(spell,action)
  620.     if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  621.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  622.             cancel_spell()
  623.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  624.             return
  625.         else
  626.             if string.find(spell.english,'Cur') or spell.english == "Cursna" then
  627.                 equip(sets.Precast.Cure)
  628.             elseif spell.type == "Geomancy" then
  629.                 equip(sets.Precast.GeoCast)
  630.             elseif string.find(spell.english,'Fir') or string.find(spell.english,'Bliz') or string.find(spell.english,'Thund') or string.find(spell.english,'Aer') or string.find(spell.english,'Wat') or string.find(spell.english,'Stone') then
  631.                 equip(set_combine(sets.Precast.FastCast,{hands="Bagua Mitaines"}))
  632.             elseif spell.english == "Impact" then
  633.                 equip(set_combine(sets.Precast.FastCast,{head=empty,body="Twilight Cloak"}))
  634.             elseif spell.english == "Dia" then
  635.                 equip(set_combine(sets.Midcast['Enfeebling Magic'],{waist="Chaac Belt"}))
  636.             elseif string.find(spell.english,'Utsusemi') then
  637.                 if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  638.                     cancel_spell()
  639.                     add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
  640.                     return
  641.                 else
  642.                     equip(sets.Precast.FastCast)
  643.                 end
  644.             elseif sets.Precast[spell.skill] then
  645.                 equip(sets.Precast[spell.skill])
  646.             else
  647.                 equip(sets.Precast.FastCast)
  648.             end
  649.         end
  650.     elseif spell.type == "WeaponSkill" then
  651.         if sets.WS[spell.english] then
  652.             equip(sets.WS[spell.english])
  653.         end
  654.     elseif spell.type == "JobAbility" then
  655.         if sets.JA[spell.english] then
  656.             equip(sets.JA[spell.english])
  657.         end
  658.     elseif spell.type == "Geomancy" then
  659.         if Cities:contains(world.area) then
  660.             cancel_spell()
  661.             add_to_chat(123,'Unable To Use Geomancy In Town')
  662.             return
  663.         else
  664.             if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Geomancy If You Are Silenced or Out of Range --
  665.                 cancel_spell()
  666.                 add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  667.                 return
  668.             else
  669.                 display_geomancy_info(spell)
  670.                 equip(sets.Precast.GeoCast)
  671.             end
  672.         end
  673.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  674.         cast_delay(0.2)
  675.         send_command('cancel Sneak')
  676.     end
  677.     if sets.Precast[spell.element] then
  678.         equip(sets.Precast[spell.element])
  679.     end
  680.     if StunIndex == 1 then
  681.         equip(sets.Midcast.Stun)
  682.     end
  683.     if spell.english == 'Paralyze' then
  684.         equip(sets.Midcast.paralyze)
  685.     end
  686.     if spell.english == 'Slow' then
  687.         equip(sets.Midcast.slow)
  688.     end
  689.     if Main == 'ON' then
  690.         equip(sets.MainWeapon)
  691.     end
  692. end
  693.  
  694. function midcast(spell,action)
  695.     equipSet = {}
  696.     if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  697.         equipSet = sets.Midcast
  698.         if string.find(spell.english,'Cure') then
  699.             equipSet = equipSet.Cure
  700.         elseif string.find(spell.english,'Cura') then
  701.             equipSet = equipSet.Curaga
  702.         elseif string.find(spell.english,'Banish') then
  703.             equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
  704.         elseif spell.type == "Geomancy" then
  705.             equipSet = sets.Midcast.GeoCast
  706.         elseif spell.english == "Stoneskin" then
  707.             if buffactive.Stoneskin then
  708.                 send_command('@wait 2.8;cancel stoneskin')
  709.             end
  710.             equipSet = equipSet.Stoneskin
  711.         elseif spell.english == "Sneak" then
  712.             if spell.target.name == player.name and buffactive['Sneak'] then
  713.                 send_command('cancel sneak')
  714.             end
  715.             equipSet = equipSet.Haste
  716.         elseif string.find(spell.english,'Utsusemi') then
  717.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  718.                 send_command('@wait 1.7;cancel Copy Image*')
  719.             end
  720.             equipSet = equipSet.Haste
  721.         elseif spell.english == 'Monomi: Ichi' then
  722.             if buffactive['Sneak'] then
  723.                 send_command('@wait 1.7;cancel sneak')
  724.             end
  725.             equipSet = equipSet.Haste
  726.         else
  727.             if equipSet[spell.english] then
  728.                 equipSet = equipSet[spell.english]
  729.             end
  730.             if equipSet[spell.skill] then
  731.                 equipSet = equipSet[spell.skill]
  732.             end
  733.             if equipSet[spell.type] then
  734.                 equipSet = equipSet[spell.type]
  735.             end
  736.             if (spell.type == '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 --
  737.                 equipSet = set_combine(equipSet,sets.Obi[spell.element])
  738.             end
  739.         end
  740.     elseif equipSet[spell.english] then
  741.         equipSet = equipSet[spell.english]
  742.     end
  743.     equip(equipSet)
  744.     if StunIndex == 1 then
  745.         equip(sets.Midcast.Stun)
  746.     end
  747.     if Main == 'ON' then
  748.         equip(sets.MainWeapon)
  749.     end
  750. end
  751.  
  752. function aftercast(spell,action)
  753.     if player.status == 'Engaged' then
  754.         equip(sets.Melee)
  755.     else
  756.         equip(sets.Idle[IdleArray[IdleIndex]])
  757.     end
  758. end
  759.  
  760. function status_change(new,old)
  761.     if Armor == 'PDT' then
  762.         equip(sets.PDT)
  763.     elseif buffactive["Sublimation: Activated"] then
  764.         equip(sets.Sublimation)
  765.     elseif new == 'Engaged' then
  766.         equip(sets.Melee)
  767.     elseif new == 'Idle' then
  768.         equip(sets.Idle[IdleArray[IdleIndex]])
  769.     elseif new == 'Resting' then
  770.         equip(sets.Resting)
  771.     end
  772.     if StunIndex == 1 then
  773.         equip(sets.Midcast.Stun)
  774.     end
  775.     if Main == 'ON' then
  776.         equip(sets.MainWeapon)
  777.     end
  778. end
  779.  
  780. function buff_change(buff,gain)
  781.     buff = string.lower(buff)
  782.     if buff == 'Weakness' then -- Weakness Timer --
  783.         if gain then
  784.             send_command('timers create "Weakness" 300 up')
  785.         else
  786.             send_command('timers delete "Weakness"')
  787.         end
  788.     end
  789.     if not midaction() then
  790.         status_change(player.status)
  791.     end
  792. end
  793.  
  794.  
  795. function partycounter()
  796. pcount = 1
  797.  
  798.     for i=2,6 do
  799.         if party[i] then
  800.             pcount = pcount+1
  801.         end
  802.     end
  803.  
  804. return pcount
  805.  
  806. end
  807.  
  808. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  809. function self_command(command)
  810.     add_to_chat(123,'self-command = '.. tostring(command))
  811.     if command == "geo" then
  812.         if Geomancy[GEOSPELL][1] == "-" then
  813.             send_command('input /ma Geo-'..GEOSPELL..' <t>')
  814.         else
  815.             send_command('input /ma Geo-'..GEOSPELL..' <me>')
  816.         end
  817.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Casting GEO-'..GEOSPELL..'] *-*-*-*-*-*-*-*-*')
  818.     elseif command == "Indi" then
  819.         send_command('input /ma Indi-'..INDISPELL..' <me>')
  820.     elseif command == "Entrust" then
  821.         send_command('input /ja Entrust <me>; /wait 1; input /ma Indi-'..ENTRUSTSPELL..' <t>')
  822.     elseif command == "pcount" then
  823.         print(windower.ffxi.get_party()[1])
  824.     elseif command == 'C1' then -- Stun Toggle --
  825.         if StunIndex == 1 then
  826.             StunIndex = 0
  827.             add_to_chat(123,'Stun Set: [Unlocked]')
  828.         else
  829.             StunIndex = 1
  830.             add_to_chat(158,'Stun Set: [Locked]')
  831.         end
  832.         status_change(player.status)
  833.     elseif command == 'C5' then -- Auto Update Gear Toggle --
  834.         status_change(player.status)
  835.         add_to_chat(158,'Auto Update Gear')
  836.     elseif command == 'C3' then -- Obi Toggle --
  837.         if Obi == 'ON' then
  838.             Obi = 'OFF'
  839.             add_to_chat(123,'Obi: [OFF]')
  840.         else
  841.             Obi = 'ON'
  842.             add_to_chat(158,'Obi: [ON]')
  843.         end
  844.         status_change(player.status)
  845.     elseif command == 'C7' then -- PDT Toggle --
  846.         if Armor == 'PDT' then
  847.             Armor = 'None'
  848.             add_to_chat(123,'PDT Set: [Unlocked]')
  849.         else
  850.             Armor = 'PDT'
  851.             add_to_chat(158,'PDT Set: [Locked]')
  852.         end
  853.         status_change(player.status)
  854.     elseif command == 'w' then -- Main Weapon Toggle --
  855.         if Main == 'ON' then
  856.             Main = 'OFF'
  857.             add_to_chat(123,'Main Weapon: [Unlocked]')
  858.         else
  859.             Main = 'ON'
  860.             add_to_chat(158,'Main Weapon: [Locked]')
  861.         end
  862.         status_change(player.status)
  863.     elseif command == 'C8' then -- Distance Toggle --
  864.         if player.target.distance then
  865.             target_distance = math.floor(player.target.distance*10)/10
  866.             add_to_chat(158,'Distance: '..target_distance)
  867.         else
  868.             add_to_chat(123,'No Target Selected')
  869.         end
  870.     elseif command == 'C6' then -- Idle Toggle --
  871.         IdleIndex = (IdleIndex % #IdleArray) + 1
  872.         add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  873.         status_change(player.status)
  874.     elseif command:match('^SC%d$') then
  875.         send_command('//' .. sc_map[command])
  876.     end
  877. end
  878.  
  879. function actualCost(originalCost)
  880.     if buffactive["Penury"] then
  881.         return originalCost*.5
  882.     elseif buffactive["Light Arts"] then
  883.         return originalCost*.9
  884.     else
  885.         return originalCost
  886.     end
  887. end
  888.  
  889. function degrade_spell(spell,degrade_array)
  890.     spell_index = table.find(degrade_array,spell.name)
  891.     if spell_index > 1 then
  892.         new_spell = degrade_array[spell_index - 1]
  893.         change_spell(new_spell,spell.target.raw)
  894.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  895.     end
  896. end
  897.  
  898. function change_spell(spell_name,target)
  899.     cancel_spell()
  900.     send_command('//'..spell_name..' '..target)
  901. end
  902.  
  903. function customize_idle_set(idleSet)
  904.     if player.mpp < 51 then
  905.         idleSet = set_combine(idleSet, sets.latent_refresh)
  906.     end
  907. return idleSet
  908. end
  909.  
  910. function define_geomancy_values()
  911.     geomancy = {
  912.         Frailty = {bonus="Defense Down"},
  913.         Torpor = {bonus="Evasion Down"},
  914.         Languor = {bonus="Magic Evasion Down"},
  915.         Focus = {bonus="Magic Accuracy"},
  916.         Malaise = {bonus="Magic Defense Down"},
  917.         Precision = {bonus="Accuracy"},
  918.         Refresh = {bonus="Refresh"},
  919.         Fade = {bonus="Magic Attack Down"},
  920.         Wilt = {bonus="Attack Down"},
  921.         Vex = {bonus="Magic Accuracy Down"},
  922.         Slip = {bonus="Accuracy Down"},
  923.         Acumen = {bonus="Magic Attack"},
  924.         Fend = {bonus="Magic Defense"},
  925.         Fury = {bonus="Attack"},
  926.         Attunement = {bonus="Magic Evasion"},
  927.         Voidance = {bonus="Evasion"},
  928.         Barrier = {bonus="Defense"},
  929.         Haste = {bonus="Haste"}
  930.         }
  931. end
  932.  
  933. function display_geomancy_info(spell)
  934.     geoType=nil
  935.     string.gsub(spell.english.."-","-(.-)-",function(geo) geoType=geo end)
  936.     geoInfo = geomancy[geoType]
  937.     if geoInfo then
  938.         add_to_chat(158, spell.english..' = '..tostring(geoInfo.bonus))
  939.     end
  940. end
  941.  
  942.  
  943.  
  944. --- NOT MY LUA ENDS HERE
  945.  
  946.  
  947.  
  948.  
  949. geoswitch = false
  950. indiswitch = false
  951. entrustswitch = false
  952.  
  953.  
  954. windower.register_event('chat message', function(original, sender, mode, gm)
  955.     local match
  956.                
  957.             ---- Invite checker
  958.                 --match = original:match(') ([%w]+)%')
  959.                
  960.                 if sender == player.name then
  961.                     if original == "GEO" or original == "geo" or original == "Geo" then
  962.                         geoswitch = true
  963.                         indiswitch = false
  964.                         entrustswitch = false
  965.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Choose your GEO spell. ] *-*-*-*-*-*-*-*-*')
  966.                     elseif original == "INDI" or original == "indi" or original == "Indi" then
  967.                         geoswitch = false
  968.                         indiswitch = true
  969.                         entrustswitch = false
  970.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Choose your INDI spell. ] *-*-*-*-*-*-*-*-*')
  971.                     elseif original == "ENTRUST" or original == "entrust" or original == "Entrust" or original == "Ent" then
  972.                         geoswitch = false
  973.                         indiswitch = false
  974.                         entrustswitch = true
  975.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Choose your ENTRUST spell. ] *-*-*-*-*-*-*-*-*')
  976.                     elseif geoswitch and original then
  977.                         command=original
  978.                         target = string.match(command, "(%a+)")
  979.                         targeto = string.match(command, "%p")
  980.  
  981.                         geot = ""
  982.  
  983.                         for i=1,30,1 do
  984.                             if Geomancy[Geomancy[i]][2] == target then
  985.                                 if Geomancy[Geomancy[i]][1] == targeto then
  986.                                     geot = Geomancy[i]
  987.                                 end
  988.                             end
  989.                         end
  990.                        
  991.                         if geot ~= "" then
  992.                             GEOSPELL = geot
  993.                             add_to_chat(204,"Spell is GEO-"..geot.." which does "..Geomancy[geot][3]..""..Geomancy[geot][1])
  994.                             geoswitch = false
  995.                         end
  996.                     elseif indiswitch and original then
  997.                         command=original
  998.                         target = string.match(command, "(%a+)")
  999.                         targeto = string.match(command, "%p")
  1000.  
  1001.                         geot = ""
  1002.  
  1003.                         for i=1,30,1 do
  1004.                             if Geomancy[Geomancy[i]][2] == target then
  1005.                                 if Geomancy[Geomancy[i]][1] == targeto then
  1006.                                     geot = Geomancy[i]
  1007.                                 end
  1008.                             end
  1009.                         end
  1010.                        
  1011.                         if geot ~= "" then
  1012.                             INDISPELL = geot
  1013.                             add_to_chat(204,"Spell is INDI-"..geot.." which does "..Geomancy[geot][3]..""..Geomancy[geot][1])
  1014.                             indiswitch = false
  1015.                         end
  1016.                     elseif entrustswitch and original then
  1017.                         command=original
  1018.                         target = string.match(command, "(%a+)")
  1019.                         targeto = string.match(command, "%p")
  1020.  
  1021.                         geot = ""
  1022.  
  1023.                         for i=1,30,1 do
  1024.                             if Geomancy[Geomancy[i]][2] == target then
  1025.                                 if Geomancy[Geomancy[i]][1] == targeto then
  1026.                                     geot = Geomancy[i]
  1027.                                 end
  1028.                             end
  1029.                         end
  1030.                        
  1031.                         if geot ~= "" then
  1032.                             ENTRUSTSPELL = geot
  1033.                             add_to_chat(204,"Spell is Entrust Indi-"..geot.." which does "..Geomancy[geot][3]..""..Geomancy[geot][1])
  1034.                             entrustswitch = false
  1035.                         end
  1036.                     end
  1037.                 end
  1038.                
  1039.                        
  1040.                        
  1041.  
  1042.            
  1043.  
  1044.     return sender, mode, gm
  1045. end)
  1046.  
  1047. fps = 1
  1048. sec = 0
  1049. geoblink = false
  1050. Gg = 0
  1051.             Gb = 0
  1052.             GEr = 0
  1053.             GEb = 0
  1054.             GEOr = 0
  1055.  
  1056. windower.register_event('prerender', function()
  1057.     GEONr = 0
  1058.     GEONg = 0
  1059.     GEONb = 0
  1060.     if fps < 50 then
  1061.         fps = fps +1
  1062.     else
  1063.         fps = 1
  1064.     end
  1065.    
  1066.     if fps == 1 then
  1067.        
  1068.         --if pet.isvalid and not geoblink then
  1069.         --add_to_chat(204,"START BLINKING")
  1070.            
  1071.         --  geoblink = true
  1072.         --end
  1073.        
  1074.         --if pet.isvalid and geoblink then
  1075.             GEONr = GEOr
  1076.             GEONg = GEOg
  1077.             GEONb = GEOb
  1078.             GEOr = GEr
  1079.             GEOg = GEg
  1080.             GEOb = GEb
  1081.             GEr = Gr
  1082.             GEg = Gg
  1083.             GEb = Gb
  1084.             Gr = GEONr
  1085.             Gg = GEONg
  1086.             Gb = GEONb
  1087.         --end
  1088.        
  1089.         --if not pet.isvalid and geoblink then
  1090.         --add_to_chat(204,"STOP BLINKING")
  1091.         --  Gr = 125
  1092.         --  Gg = 125
  1093.         --  Gb = 125-
  1094.  
  1095.         --  GEr = 125
  1096.         --  GEg = 125
  1097.         --  GEb = 125
  1098.  
  1099.         --  GEOr = 125
  1100.         --  GEOg = 125
  1101.         --  GEOb = 125
  1102.         --  geoblink = false
  1103.         --end
  1104.        
  1105.         refresh()
  1106.     end
  1107.    
  1108. end)
  1109.  
  1110.  
  1111. -- MAKE A MACRO : /tell <me> check
  1112. function open_coffer()
  1113.     CofferType = "Bounty List"
  1114.     if player.inventory[CofferType] then
  1115.     NCoffer = player.inventory[CofferType].count
  1116.     bag = windower.ffxi.get_bag_info(0).count
  1117.     max = windower.ffxi.get_bag_info(0).max
  1118.     spots = max-bag
  1119.     if spots > 0 then
  1120.     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1121.     local nextcommand = ""
  1122.     for i=1, spots do
  1123.         nextcommand = nextcommand .. 'input /item "'..CofferType..'" <me>; wait 2;'
  1124.     end
  1125.     nextcommand = nextcommand .. 'input /tell '..player.name..' check'
  1126.     send_command(nextcommand)
  1127.     else
  1128.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1129.     end
  1130.     else
  1131.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
  1132.     end
  1133. end
  1134.  
  1135. -- MAKE A MACRO : /tell <me> chec
  1136. function go_synth()
  1137.     CofferType = "Bone. Kit 40"
  1138.     if player.inventory[CofferType] then
  1139.     NCoffer = player.inventory[CofferType].count
  1140.     bag = windower.ffxi.get_bag_info(0).count
  1141.     max = windower.ffxi.get_bag_info(0).max
  1142.     spots = max-bag
  1143.     if spots > 0 then
  1144.     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1145.     local nextcommand = ""
  1146.     for i=1, spots do
  1147.         nextcommand = nextcommand .. 'input /lastsynth; wait 20;'
  1148.     end
  1149.     nextcommand = nextcommand .. 'input /tell '..player.name..' chec'
  1150.     send_command(nextcommand)
  1151.     else
  1152.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1153.     end
  1154.     else
  1155.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
  1156.     end
  1157. end
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163. --- Delve Assistant
  1164. windower.register_event('incoming text', function(original, modified, mode)
  1165.     local match
  1166.        
  1167.  
  1168.  
  1169.        
  1170.         if player.target then
  1171.             if player.target.name == "Apex Jagil" or player.target.name == "Apex Crab" or player.target.name == "Apex Craklaw" then
  1172.             match = original:match('Faloun uses Leaden Salute.')
  1173.             if match then
  1174.                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Counting  ] *-*-*-*-*-*-*-*-*')
  1175.                 send_command('input /ma "Stone IV" <t>')
  1176.             end
  1177.            
  1178.             match = original:match('Astan uses Chant du Cygne.')
  1179.             if match then
  1180.                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Counting  ] *-*-*-*-*-*-*-*-*')
  1181.                 send_command('input /ma "Stone III" <t>')
  1182.             end
  1183.            
  1184.             end
  1185.         end
  1186.        
  1187.        
  1188.        
  1189.        
  1190.     return modified, mode
  1191. end)
  1192.  
  1193. fps = 1
  1194. sec = 0
  1195. i=1
  1196. j=1
  1197. sav = 0
  1198. count = 3
  1199.  
  1200. spells = {"Indi-Regen", "Indi-Poison", "Indi-Precision", "Indi-Voidance", "Indi-Malaise"}
  1201. spell = {"Indi-Focus", "Geo-Refresh", "Bio", "Bio", "Poisonga", "Blind", "Stun", "Bio", "Bio", "Bio", "Bio", "Bio", "Blind", "Stun", "Bio", "Bio", "Bio", "Bio", "Bio", "Blind", "Stun", "Bio", "Bio"}
  1202.  
  1203. windower.register_event('prerender', function()
  1204.     if fps < 150 then
  1205.         fps = fps +1
  1206.     else
  1207.         fps = 1
  1208.     end
  1209.    
  1210.    
  1211.     if fps == 1 and buffactive['silence'] then
  1212.             send_command('input /item "echo drops" '..player.name..'')
  1213.     end
  1214.    
  1215.     if fps == 1 then
  1216.        
  1217.         if player.target.name then
  1218.             if player.target.name == "Faloun"  then
  1219.                     if player.mp >=100 then
  1220.                         if buffactive["Refresh"] then
  1221.                             send_command('input /ma '..spells[i]..' <me>')
  1222.                             if i <5 then
  1223.                                 i=i+1
  1224.                             else
  1225.                                 i = 1
  1226.                             end
  1227.                         else
  1228.                             send_command('input /ma Geo-Refresh <me>')
  1229.                         end
  1230.                     end
  1231.             elseif player.target.name == "Apex Jagil" then
  1232.                 --if j < 3  then
  1233.                 --send_command('input /ma '..spell[j]..' <me>')
  1234.                 --else
  1235.                 --send_command('input /ma '..spell[j]..' <t>')
  1236.                 --end
  1237.                 --          if j <23 then
  1238.                 --              j=j+1
  1239.                 --          else
  1240.                 --              j = 1
  1241.                 --          end
  1242.                 if not buffactive["Magic Atk. Boost"] then
  1243.                     send_command('input /ma Indi-Acumen <me>')
  1244.                 end
  1245.                
  1246.                 if player.tp >= 1000 then
  1247.                     send_command('input /ws "Exudation" <t>')
  1248.                     count = count +1
  1249.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Count = '..count..' ] *-*-*-*-*-*-*-*-*')
  1250.                 end
  1251.             end
  1252.         end
  1253.        
  1254.     end
  1255.    
  1256.    
  1257.    
  1258. end)
  1259.  
  1260. windower.register_event('chat message', function(original, sender, mode, gm)
  1261.     local match
  1262.                
  1263.             ---- Invite checker
  1264.  
  1265.                
  1266.                 if sender == "Etsune" then
  1267.                     if original == "check" then
  1268.                         open_coffer()
  1269.                     end
  1270.                 end
  1271.  
  1272.                
  1273.  
  1274.            
  1275.  
  1276.     return sender, mode, gm
  1277. end)
  1278.  
  1279. function open_coffer()
  1280.     CofferType = "Inv. Report"
  1281.     if player.inventory[CofferType] then
  1282.     NCoffer = player.inventory[CofferType].count
  1283.     bag = windower.ffxi.get_bag_info(0).count
  1284.     max = windower.ffxi.get_bag_info(0).max
  1285.     spots = max-bag
  1286.     if spots > 0 then
  1287.     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1288.     local nextcommand = ""
  1289.     for i=1, spots do
  1290.         nextcommand = nextcommand .. 'input /item "'..CofferType..'" <me>; wait 2;'
  1291.     end
  1292.    
  1293.     nextcommand = nextcommand .. 'input /tell Etsune check'
  1294.     send_command(nextcommand)
  1295.    
  1296.     else
  1297.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
  1298.     end
  1299.     else
  1300.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
  1301.     end
  1302. end
Add Comment
Please, Sign In to add comment