Advertisement
Guest User

BLM lua

a guest
Apr 4th, 2020
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.47 KB | None | 0 0
  1.  
  2.  
  3. function get_sets()
  4.  
  5.     -- Including this gives an easy way of defining cyclic/trigger/etc variables, makes handling self_commands easier.
  6.     -- Motes also uses this, but this is completely independent from Motes
  7.     include('Modes.lua')
  8.    
  9.     --[[ Every set has a comment that says how it's built up.
  10.     Common terms:
  11.     - (pot) means potency of the magic.
  12.     - (macc) means magic accuracy of the magic.
  13.     - OATM - on anything that matters (e.g. evasion is worth it on BLM for anything below your level, but not on anything that matters, like Dyna mobs or HNM)
  14.     -
  15.    
  16.     Incomplete mage sets are filled up with:
  17.     - Fast Caste and Haste gear, to reduce recast time.
  18.     - Conserve MP gear, to conserve MP.
  19.     - MP gear, so that you wouldn't lose max MP when casting this spell at max MP.
  20.    
  21.     ]]--
  22.    
  23.     -- Idle sets
  24.    
  25.     sets.idle={ -- REMAKE AS WELL THIS NEEDS NO MORE EVASION
  26.         main        = "Terra's Staff",
  27.         sub         = "Reign Grip",
  28.         ammo        = "Phtm. Tathlum",
  29.         head        = "Genie Tiara",
  30.         body        = "Dalmatica +1",
  31.         hands       = "River Gauntlets",
  32.         legs        = "Goliard Trews",
  33.         feet        = "Herald's Gaiters",
  34.         neck        = "Evasion Torque",
  35.         waist       = "Hierarch Belt",
  36.         left_ear    = "Triton Earring",
  37.         right_ear   = "Novia Earring",
  38.         left_ring   = "Shadow Ring",
  39.         right_ring  = "Defending Ring",
  40.         back        = "Umbra Cape",
  41.     }
  42.    
  43.     -- Nuking sets
  44.    
  45.     -- Other magic sets
  46.  
  47.     sets.dark_magic = { -- Skill (pot/macc) > INT (macc)
  48.         main        = "Claustrum",
  49.         sub         = "Dark Grip",
  50.         ammo        = "Phtm. Tathlum",
  51.         head        = "Maat's Cap",
  52.         body        = "Nashira Manteel",
  53.         hands       = "Src. Gloves +1",
  54.         legs        = "Wizard's Tonban",
  55.         feet        = "Genie Huaraches",
  56.         neck        = "Dark Torque",
  57.         waist       = "Witch Sash",
  58.         left_ear    = "Incubus Earring +1",
  59.         right_ear   = "Incubus Earring +1",
  60.         left_ring   = "Galdr Ring",
  61.         right_ring  = "Omniscient Ring",
  62.         back        = "Merciful Cape",
  63.     }
  64.    
  65.     sets.dark_magic.stun = set_combine(sets.dark_magic,{ -- Fast Cast = Haste
  66.         sub         ="Vivid Strap +1",
  67.         head        ="Walahra Turban",
  68.         feet        ="Rostrum Pumps",
  69.         waist       ="Headlong Belt",
  70.         right_ear   ="Loquac. Earring",
  71.         back        ="Veela Cape",
  72.     })
  73.  
  74.     sets.healing_magic = { -- Cure Potency > 1MND = 3VIT = 5skill
  75.         main        ="Chatoyant Staff",
  76.         sub         ="Reign Grip",
  77.         ammo        ="Phtm. Tathlum",
  78.         head        ="Maat's Cap",
  79.         body        ="Mahatma Hpl.",
  80.         hands       ="Dvt. Mitts +1",
  81.         legs        ="Mahatma Slops",
  82.         feet        ="Mahatma Pigaches",
  83.         neck        ="Fylgja Torque +1",
  84.         waist       ="Pythia Sash +1",
  85.         left_ear    ="Roundel Earring",
  86.         right_ear   ="Celestial Earring",
  87.         left_ring   ="Celestial Ring",
  88.         right_ring  ="Celestial Ring",
  89.         back        ="Dew Silk Cape +1",
  90.     }
  91.    
  92.     sets.enfeebling_magic = {}
  93.     sets.enfeebling_magic.int = { -- Skill (macc) > INT (pot)
  94.         main        ="Claustrum",
  95.         sub         ="Reign Grip",
  96.         ammo        ="Phtm. Tathlum",
  97.         head        ="Genie Tiara",
  98.         body        ="Wzd. Coat +1",
  99.         hands       ="Bricta's Cuffs",
  100.         legs        ="Genie Lappas",
  101.         feet        ="Goliard Clogs",
  102.         neck        ="Enfeebling Torque",
  103.         waist       ="Witch Sash",
  104.         left_ear    ="Incubus Earring +1",
  105.         right_ear   ="Incubus Earring +1",
  106.         left_ring   ="Galdr Ring",
  107.         right_ring  ="Omniscient Ring",
  108.         back        ="Hecate's Cape",
  109.     }
  110.     sets.enfeebling_magic.mnd = { -- Skill (macc) > MND (pot)
  111.         main        ="Claustrum",
  112.         sub         ="Reign Grip",
  113.         ammo        ="Phtm. Tathlum",
  114.         head        ="Genie Tiara",
  115.         body        ="Wzd. Coat +1",
  116.         hands       ="Bricta's Cuffs",
  117.         legs        ="Genie Lappas",
  118.         feet        ="Goliard Clogs",
  119.         neck        ="Enfeebling Torque",
  120.         waist       ="Pythia Sash +1",
  121.         left_ear    ="Incubus Earring +1",
  122.         right_ear   ="Incubus Earring +1",
  123.         left_ring   ="Celestial Ring",
  124.         right_ring  ="Celestial Ring",
  125.         back        ="Hecate's Cape",
  126.     }
  127.  
  128.     sets.enhancing_magic = { -- Skill (pot)
  129.         main        ="Claustrum",
  130.         sub         ="Vivid Strap +1",
  131.         ammo        ="Phtm. Tathlum",
  132.         head        ="Walahra Turban",
  133.         body        ="Goliard Saio",
  134.         hands       ="Zenith Mitts +1",
  135.         legs        ="Zenith Slacks +1",
  136.         feet        ="Genie Huaraches",
  137.         neck        ="Enhancing Torque",
  138.         waist       ="Pythia Sash +1",
  139.         left_ear    ="Augment. Earring",
  140.         right_ear   ="Loquac. Earring",
  141.         left_ring   ="Serket Ring",
  142.         right_ring  ="Defending Ring",
  143.         back        ="Merciful Cape",
  144.     }
  145.    
  146.     sets.enhancing_magic.stoneskin = { -- MND (pot)
  147.         main        ="Alkalurops",
  148.         sub         ="Reign Grip",
  149.         ammo        ="Phtm. Tathlum",
  150.         head        ="Zenith Crown +1",
  151.         body        ="Mahatma Hpl.",
  152.         hands       ="Dvt. Mitts +1",
  153.         legs        ="Mahatma Slops",
  154.         feet        ="Mahatma Pigaches",
  155.         neck        ="Gnole Torque",
  156.         waist       ="Pythia Sash +1",
  157.         left_ear    ="Celestial Earring",
  158.         right_ear   ="Celestial Earring",
  159.         left_ring   ="Celestial Ring",
  160.         right_ring  ="Celestial Ring",
  161.         back        ="Dew Silk Cape +1",
  162.     }
  163.    
  164.     -- No potency magic set
  165.    
  166.     sets.fastcasthaste = { -- Fast Caste = Haste (recast time)
  167.         main        ="Claustrum",
  168.         sub         ="Vivid Strap +1",
  169.         ammo        ="Phtm. Tathlum",
  170.         head        ="Walahra Turban",
  171.         body        ="Goliard Saio",
  172.         hands       ="Zenith Mitts +1",
  173.         legs        ="Zenith Slacks +1",
  174.         feet        ="Rostrum Pumps",
  175.         neck        ="Bloodbead Gorget",
  176.         waist       ="Headlong Belt",
  177.         left_ear    ="Merman's Earring",
  178.         right_ear   ="Loquac. Earring",
  179.         left_ring   ="Shadow Ring",
  180.         right_ring  ="Defending Ring",
  181.         back        ="Veela Cape",
  182.     }
  183.    
  184.     -- Other
  185.    
  186.     sets.yellowHP = {
  187.         head        = "Zenith Crown +1",
  188.         body        = "Dalmatica +1",
  189.         hands       = "Zenith Mitts +1",
  190.         legs        = "Zenith Slacks +1",
  191.         feet        = "Zenith Pumps +1",
  192.         back        = "Ixion Cape",
  193.         left_ring   = "Serket Ring",
  194.         right_ring  = "Ether Ring"
  195.     }
  196.        
  197.     sets.nukeDmg = {
  198.         main        = "Claustrum",
  199.         sub         = "Wise Strap",
  200.         ammo        = "Phtm. Tathlum",
  201.         head        = "Maat's Cap",
  202.         body        = "Genie Weskit",
  203.         hands       = "Zenith Mitts +1",
  204.         legs        = "Mahatma Slops",
  205.         feet        = "Shrewd Pumps",
  206.         neck        = "Lmg. Medallion +1",
  207.         waist       = "Witch Sash",
  208.         left_ear    = "Novio Earring",
  209.         right_ear   = "Moldavite Earring",
  210.         left_ring   = "Galdr Ring",
  211.         right_ring  = "Omniscient Ring",
  212.         back        = "Ixion Cape",
  213.     }
  214.     sets.nukeSkill = { -- only changes from nukeDmg
  215.         head        = "Src. Petasos +1",
  216.         hands       = "Wizard's Gloves",
  217.     }
  218.  
  219.     sets.matching_day = {
  220.         waist       = "Hachirin-no-Obi",
  221.         legs        = "Src. Tonban +1"
  222.     }
  223.     sets.matching_dayweather = {
  224.         waist       = "Hachirin-no-Obi",
  225.     }
  226.  
  227.     sets.fcast={ -- just fast caste for precast
  228.         sub         = "Vivid Strap +1",
  229.         right_ear   = "Loquac. Earring",
  230.         feet        = "Rostrum Pumps",
  231.         back        = "Veela Cape"
  232.     }
  233.     sets.fcasthaste={ -- fast cast and haste
  234.         sub         = "Vivid Strap +1",
  235.         head        = "Walahra Turban",
  236.         waist       = "Headlong Belt",
  237.         body        = "Goliard Saio",
  238.         right_ear   = "Loquac. Earring",
  239.         feet        = "Rostrum Pumps",
  240.         back        = "Veela Cape"
  241.     }
  242.  
  243.    
  244.     sets.int={
  245.         main        = "Claustrum",
  246.         sub         = "Bugard Strap +1",
  247.         ammo        = "Phtm. Tathlum",
  248.         head        = "Maat's Cap",
  249.         body        = "Mahatma Hpl.",
  250.         hands       = "Mahatma Cuffs",
  251.         legs        = "Mahatma Slops",
  252.         feet        = "River Gaiters",
  253.         neck        = "Lmg. Medallion +1",
  254.         waist       = "Witch Sash",
  255.         left_ear    = "Omn. Earring",
  256.         right_ear   = "Omn. Earring",
  257.         left_ring   = "Galdr Ring",
  258.         right_ring  = "Omniscient Ring",
  259.         back        = "Ixion Cape",
  260.     }
  261.     sets.mnd={
  262.         main        = "Claustrum",
  263.         sub         = "Reign Grip",
  264.         ammo        = "Phtm. Tathlum",
  265.         head        = "Zenith Crown +1",
  266.         body        = "Mahatma Hpl.",
  267.         hands       = "Dvt. Mitts +1",
  268.         legs        = "Mahatma Slops",
  269.         feet        = "Mahatma Pigaches",
  270.         neck        = "Gnole Torque",
  271.         waist       = "Pythia Sash +1",
  272.         left_ear    = "Celestial Earring",
  273.         right_ear   = "Celestial Earring",
  274.         left_ring   = "Celestial Ring",
  275.         right_ring  = "Celestial Ring",
  276.         back        = "Dew Silk Cape +1",
  277.     }
  278.    
  279.     sets.rest={
  280.         main        = "Claustrum",
  281.         sub         = "Reign Grip",
  282.         ammo        = "Phtm. Tathlum",
  283.         head        = "Oracle's Cap",
  284.         body        = "Mahatma Hpl.",
  285.         hands       = "Oracle's Gloves",
  286.         legs        = "Oracle's Braconi",
  287.         feet        = "Goliard Clogs",
  288.         neck        = "Gnole Torque",
  289.         waist       = "Qiqirn Sash +1",
  290.         left_ear    = "Relaxing Earring",
  291.         right_ear   = "Antivenom Earring",
  292.         left_ring   = "Celestial Ring",
  293.         right_ring  = "Celestial Ring",
  294.         back        = "Invigorating Cape"
  295.     }
  296.  
  297.     sets.melee = {
  298.         head        = "Optical Hat",
  299.         body        = "Hydra Doublet",
  300.         hands       = "Hydra Gloves",
  301.         legs        = "Hydra Brais",
  302.         feet        = "Hydra Gaiters",
  303.         neck        = "Ancient Torque",
  304.         waist       = "Virtuoso Belt",
  305.         left_ear    = "Pixie Earring",
  306.         right_ear   = "Brutal Earring",
  307.         left_ring   = "Toreador's Ring",
  308.         right_ring  = "Defending Ring",
  309.         back        = "Umbra Cape",
  310.     }
  311.  
  312.     sets.weapons = {}
  313.     sets.weapons.club = {
  314.         main        = "Kraken Club",
  315.         sub         = "Genbu's Shield",
  316.         ammo        = "White Tathlum",
  317.     }  
  318.        
  319.     sets.weapons.staff = {
  320.         main        = "Claustrum",
  321.         sub         = "Pole Grip",
  322.         ammo        = "White Tathlum",
  323.     }
  324.    
  325.     sets.ws = {}
  326.     sets.ws.gateoftartarus = {} -- full acc here, you only do it for the MP
  327.     sets.ws.blackhalo = {}
  328.  
  329.     -- elemental grips
  330.     sets.darkgrip       = {sub='Dark Grip'}
  331.  
  332.     -- Variables
  333.     clippingPlane = M{'1', '0.75', '0.5', '10', '5'} -- config ClippingPlane value
  334.  
  335. end
  336.  
  337. --[[********************************************************
  338.     functions go here
  339. ********************************************************--]]   
  340. -- equip our idle set
  341. function equip_idle()
  342.     if melee then
  343.         equip(sets.idle,sets.melee_weapons)
  344.     else
  345.         equip(sets.idle)
  346.     end
  347.  end
  348.  
  349. -- equip our engaged set
  350. function equip_engaged()
  351.     equip(sets.melee)
  352. end
  353. -- equip our ws set
  354. function equip_ws(name)
  355.     if name == "Gate of Tartarus" then
  356.         equip(sets.melee)
  357.     end
  358. end
  359. -- equip our resting hMP set
  360. function equip_rest()
  361.     equip(sets.rest)
  362. end
  363.  
  364. function equip_heal(spell)
  365.  
  366.     -- Cures
  367.     if spell.name:contains('Cure')
  368.     or spell.name:contains('Cura') then
  369.         equip(sets.healing_magic)
  370.        
  371.         -- Matching day
  372.         if spell.element == world.day_element then
  373.             addedmagicinfo = "on matching day"
  374.             equip(sets.matching_dayweather) -- obi
  375.            
  376.             -- Matching day and weather
  377.             if spell.element == world.weather_element then
  378.                 addedmagicinfo = "on matching day and weather"
  379.             end
  380.            
  381.         -- Matching weather
  382.         elseif spell.element == world.weather_element then
  383.             addedmagicinfo = "in matching weather"
  384.             equip(sets.matching_dayweather) -- obi
  385.         end
  386.        
  387.     -- Other spells
  388.     else
  389.         equip(sets.fastcasthaste)
  390.     end
  391. end
  392.  
  393. function equip_enfeebling(spell)
  394.  
  395.     -- INT-based enfeebles
  396.     if spell.name:contains('Poison')
  397.     or spell.name:contains('Dia')
  398.     or spell.name:contains('Sleep')
  399.     or spell.name:contains('Blind')
  400.     or spell.name == 'Dispel'
  401.     or spell.name == 'Bind'
  402.     or spell.name == 'Gravity' then
  403.         equip(sets.enfeebling_magic.int)
  404.        
  405.     -- MND-based enfeebles
  406.     else
  407.         equip(sets.enfeebling_magic.mnd)
  408.     end
  409.    
  410.     -- Dark grip for Sleep, Dispel and Blind
  411.     if spell.name:contains('Sleep')
  412.     or spell.name:contains('Blind')
  413.     or spell.name == 'Dispel' then
  414.         equip(sets.darkgrip)
  415.     end
  416.    
  417. end
  418.  
  419. function equip_enhancing(spell)
  420.  
  421.     -- Stoneskin
  422.     if spell.name == 'Stoneskin' then
  423.         equip(sets.enhancing_magic.stoneskin) -- With 216 (200+16) skill and 450 being SN cap, you need 141 MND on BLM to get cap
  424.    
  425.     -- Barspells/enspells/phalanx
  426.     elseif spell.name:contains('Bar')
  427.     or spell.name:startswith('En')
  428.     or spell.name:contains('Phalanx') then
  429.         equip(sets.enhancing_magic)
  430.        
  431.     -- Other spells
  432.     else
  433.         equip(sets.fastcasthaste)
  434.     end
  435. end
  436.  
  437. function equip_nuke(spell)
  438.  
  439.     -- INT only for ele dots
  440.     if spell.name == 'Burn'
  441.     or spell.name == 'Frost'
  442.     or spell.name == 'Choke'
  443.     or spell.name == 'Rasp'
  444.     or spell.name == 'Shock'
  445.     or spell.name == 'Drown' then
  446.         equip(sets.int)
  447.     else
  448.    
  449.         -- informative variables
  450.         local skill, obi, ugg, sorc, mpspent
  451.    
  452.         -- if nuke, potency or skill?
  453.         if nukeDmg then
  454.             equip(sets.nukeDmg)
  455.             skill = "potency"
  456.         else
  457.             equip(sets.nukeDmg,sets.nukeSkill)
  458.             skill = "skill"
  459.         end
  460.        
  461.         -- check obi/tonban for matching day/weather
  462.         if spell.element == world.day_element then
  463.             equip(sets.matching_day)
  464.             if spell.element == world.weather_element then
  465.                 obi = ", day, weather"
  466.             else
  467.                 obi = ", day"
  468.             end
  469.         elseif spell.element == world.weather_element then
  470.             obi = ", weather"
  471.             equip(sets.matching_dayweather)
  472.         else
  473.             obi = ""
  474.         end
  475.        
  476.         -- check MP for ugg. pendant
  477.         if (player.sub_job == 'RDM' and player.mp < 426) or
  478.            (player.sub_job == 'WHM' and player.mp < 435) or
  479.            ((player.sub_job ~= 'RDM' and player.sub_job ~= 'WHM') and player.mp < 395) then
  480.            -- you cannot use percentage of MP gear since it uses idle gear (or precast, idk) as current MP amount
  481.            -- so just use your nuking set's total MP divided by 2
  482.             equip({neck="Uggalepih Pendant"})
  483.             ugg = ", ugg"
  484.         else
  485.             ugg = ""
  486.         end
  487.        
  488.         -- sorc. ring
  489.         if player.hpp < 76 then
  490.             equip({ring2 = "Sorcerer's Ring"})
  491.             yellowHP = false
  492.             sorc = ", sorc"
  493.         else
  494.             sorc = ""
  495.         end
  496.        
  497.         -- informative text
  498.         addedmagicinfo = skill .. obi .. ugg .. sorc
  499.        
  500.     end
  501.    
  502. end
  503.  
  504. function equip_dark(spell)
  505.  
  506.     -- Stun
  507.     if spell.name == 'Stun' then
  508.         equip(sets.dark_magic.stun)
  509.        
  510.     -- Other spells
  511.     else
  512.         equip(sets.dark_magic)
  513.        
  514.         -- Obi/legs/ring for Drain/Aspir
  515.         if spell.name == 'Aspir' or spell.name == 'Drain' then
  516.        
  517.             -- Matching day
  518.             if spell.element == world.day_element then
  519.                 addedmagicinfo = "on matching day"
  520.                 equip(sets.matching_day) -- legs and obi
  521.                 equip({right_ring="Diabolos's Ring"}) -- ring
  522.                
  523.                 -- Matching day and weather
  524.                 if spell.element == world.weather_element then
  525.                     addedmagicinfo = "on matching day and weather"
  526.                 end
  527.                
  528.             -- Matching weather
  529.             elseif spell.element == world.weather_element then
  530.                 addedmagicinfo = "in matching weather"
  531.                 equip(sets.matching_dayweather) -- obi
  532.             end
  533.         end
  534.     end
  535. end
  536.  
  537. -- equip yellow HP set for a split second, then go back to idle set to trigger yellow
  538. function equip_yellow()
  539.     equip(sets.yellowHP)
  540.     send_command('wait .1;gs equip idle')
  541. end
  542.  
  543. -- the choose_set function figures out whether we're engaged with a
  544. -- mob or not, and passes control to the relevant function above.
  545. function choose_set()
  546.     if player.status == "Engaged" then
  547.         equip_engaged()
  548.     else
  549.         equip_idle()
  550.     end
  551.  end   
  552.  
  553. --[[ ******************************************************
  554.  Casting functions - these functions run automatically when
  555.  we cast a spell, use a job ability, rest for MP, and so on
  556. ****************************************************** --]]
  557.  
  558.  -- prior to using our ability
  559.  function precast(spell)
  560.  
  561.     if spell.type == 'WeaponSkill' then
  562.         equip_ws(spell.name)
  563.     elseif spell.action_type == 'Magic' then
  564.         equip(sets.fcast)
  565.     end
  566.    
  567.     -- cancellations for your pleasure
  568.     if spell.name == "Sneak" or spell.name == "Spectral Jig" then send_command("cancel sneak"); end
  569.     if spell.name == "Stoneskin" then send_command("wait 4;cancel stoneskin"); end
  570.     if spell.name == "Reraise" then send_command("cancel reraise"); end
  571.     if spell.name == "Blink" then send_command("wait 4;cancel blink"); end
  572.     if spell.name == "Aquaveil" then send_command("wait 4;cancel aquaveil"); end
  573.     if spell.name == "Ice Spikes" then send_command("cancel Ice spikes"); end
  574.     if spell.name == "Shock Spikes" then send_command("cancel shock spikes"); end
  575.     if spell.name == "Phalanx" then send_command("cancel phalanx"); end
  576. end
  577.  
  578.  -- the midcast function swaps in a new set of gear during
  579.  -- the cast, which will make the spell effect more potent.
  580.  function midcast(spell)
  581.  
  582.     mpcost = tostring(spell.mp_cost)
  583.     addedmagicinfo = ""
  584.     showmagicinfo = true
  585.  
  586.     if spell.skill == 'Healing Magic' then
  587.         equip_heal(spell)
  588.         magicinfocolor = 50
  589.     elseif spell.skill == 'Enfeebling Magic' then
  590.         equip_enfeebling(spell)
  591.         magicinfocolor = 7
  592.     elseif spell.skill == 'Enhancing Magic' then
  593.         equip_enhancing(spell)
  594.         showmagicinfo = false
  595.         magicinfocolor = 0
  596.     elseif spell.skill == 'Elemental Magic' then
  597.         equip_nuke(spell)
  598.         magicinfocolor = 3 -- 166
  599.     elseif spell.skill == 'Dark Magic' then
  600.         equip_dark(spell)
  601.         magicinfocolor = 207
  602.     else
  603.         showmagicinfo = false
  604.     end
  605.    
  606.     if showmagicinfo then
  607.    
  608.         -- align text
  609.         if string.len(mpcost) == 1 then
  610.             mpcost = ' *** ' .. mpcost
  611.         elseif string.len(mpcost) == 2 then
  612.             mpcost = ' ** ' .. mpcost
  613.         elseif string.len(mpcost) == 3 then
  614.             mpcost = ' * ' .. mpcost
  615.         end
  616.        
  617.         -- display text
  618.         if addedmagicinfo == "" then
  619.             windower.add_to_chat(magicinfocolor,mpcost .. " MP \t" .. spell.name)
  620.         else
  621.             windower.add_to_chat(magicinfocolor,mpcost .. " MP \t" .. spell.name .. ": " .. addedmagicinfo)
  622.         end
  623.     end
  624. end
  625.  
  626.  -- after we use an ability, put on either our engaged or
  627.  -- idle sets.
  628. function aftercast(spell)
  629.      choose_set()
  630. end
  631.  
  632. -- when we engage or disengage, sit or stand, put on the
  633. -- correct set of gear.
  634. -- the status_change function runs automatically whenever we
  635. -- engage, disengage, kneel, or stand.  As a RDM we use this
  636. -- to equip our +hMP gear when we /heal, and return to our
  637. -- idle gear when we stand up.
  638. function status_change(new,old)
  639.     if new == 'Resting' then
  640.         equip_rest()
  641.     else
  642.         choose_set()
  643.     end
  644.  end
  645.  
  646. -- this posts into chatlog what buffs are added to and removed from you
  647.  --[[
  648. function buff_change(name,gain)
  649.     if gain == true then
  650.         windower.add_to_chat(050, '['.. name ..' Applied!]')
  651.     elseif gain == false then
  652.         windower.add_to_chat(050, '['.. name ..' Has Fallen!]')
  653.     end
  654. end ]]--
  655.  
  656. function self_command(command)
  657.     if command == "melee" then
  658.         if melee == false then
  659.             melee = true
  660.             choose_set()
  661.             equip(sets.idle,sets.weapons.staff)
  662.             if player.status == "Engaged" then
  663.                 equip(sets.melee)
  664.             end
  665.             disable('main')
  666.             disable('sub')
  667.             disable('range')
  668.             disable('ammo')
  669.             windower.add_to_chat(005,'[>> Melee stance]')
  670.         else
  671.             melee = false
  672.             enable('main')
  673.             enable('sub')
  674.             enable('range')
  675.             enable('ammo')
  676.             choose_set()
  677.             equip(sets.idle)
  678.             windower.add_to_chat(005,'[>> Mage stance]')
  679.         end
  680.     elseif command == "nukeDmg" then
  681.         if nukeDmg == false then
  682.             nukeDmg = true
  683.             windower.add_to_chat(005,'[>> Potency nukes]')
  684.         else
  685.             nukeDmg = false
  686.             windower.add_to_chat(005,'[>> Skill nukes]')
  687.         end
  688.     elseif command == "toyellowHP" then
  689.         equip_yellow()
  690.     elseif command == "clippingPlane" then
  691.         clippingPlane:cycle()
  692.         send_command('input //config ClippingPlane ' .. clippingPlane.value)
  693.         windower.add_to_chat(122,"ClippingPlane: " .. clippingPlane.current)
  694.     end
  695.  end
  696.  
  697.  
  698. --[[ ******************************************************
  699.   Code that runs once, when we first swap to our blm job
  700. ****************************************************** --]]
  701.  melee = false
  702.  nukeDmg = true
  703. -- puts on our fashion set, lockstyle it, then switch to our idle set.
  704. send_command('wait 1;gs equip idle;wait 1;input /macro book 2;wait 2;input /lockstyleset 3;wait 3; input /cm u')
  705. -- !setplayermodel 337 4 Monka -- Chelona Hat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement