Advertisement
Vamperica

WAR

Mar 4th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.44 KB | None | 0 0
  1. function get_sets()
  2.     mote_include_version = 2
  3.     include('Mote-Include.lua')
  4.     include('sammeh_custom_functions.lua')
  5. end
  6.  
  7. function user_setup()
  8.     state.IdleMode:options('Normal','Reraise','DT','MEVA')
  9.     send_command('bind f10 gs c cycle IdleMode')
  10.     send_command('bind f11 gs c berserkmode')
  11.     send_command('bind f12 gs c wslist')
  12.    
  13.     state.OffenseMode = M{['description']='Engaged Mode', 'Normal','DT'}
  14.     state.BerserkMode = M{['description']='Berserk Mode', 'Normal','Auto'}
  15.     state.WeaponskillMode:options('Normal','ACC')
  16.     select_default_macro_book()
  17.    
  18.     --send_command('@wait 5;input /lockstyleset 15')
  19.  
  20. end
  21.  
  22.    
  23. function init_gear_sets()
  24.    
  25.     sets.dt = {
  26.         ammo="Staunch Tathlum +1",
  27.         head="Ynglinga Sallet",
  28.         body="Tartarus Platemail",
  29.         hands={ name="Emi. Gauntlets +1", augments={'Accuracy+25','"Dual Wield"+6','Pet: Accuracy+25',}},
  30.         legs="Sulev. Cuisses +2",
  31.         feet="Flam. Gambieras +2",
  32.         neck="Warrior's Beads",
  33.         waist="Ioskeha Belt +1",
  34.         left_ear="Brutal Earring",
  35.         right_ear="Suppanomimi",
  36.         left_ring="Defending Ring",
  37.         right_ring="Niqmaddu Ring",
  38.         back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
  39.         }
  40.     sets.engaged = {}
  41.     sets.engaged.Normal = {
  42.         ammo="Ginsen",
  43.         head="Flam. Zucchetto +2",
  44.         body="Dagon Breast.",
  45.         hands="Emi. Gauntlets +1",
  46.         legs="Sulev. Cuisses +2",
  47.         feet="Flam. Gambieras +2",
  48.         neck="Warrior's Beads",
  49.         waist="Ioskeha Belt +1",
  50.         left_ear="Brutal Earring",
  51.         right_ear="Suppanomimi",
  52.         left_ring="Flamma Ring",
  53.         right_ring="Niqmaddu Ring",
  54.         back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
  55.         }
  56.    
  57.     sets.enmity = {}
  58.     sets.engaged.Reraise = set_combine(sets.engaged,{body="Twilight Mail",head="Twilight Helm"})
  59.     sets.engaged.DT = sets.dt
  60.     sets.ws = {
  61.         ammo="Knobkierrie",
  62.         head="Flam. Zucchetto +2",
  63.         body="Dagon Breast.",
  64.         hands="Sulev. Gauntlets +2",
  65.         legs="Sulev. Cuisses +2",
  66.         feet="Flam. Gambieras +2",
  67.         neck="Fotia Gorget",
  68.         waist="Fotia Belt",
  69.         left_ear="Brutal Earring",
  70.         right_ear="Mache Earring +1",
  71.         left_ring="Regal Ring",
  72.         right_ring="Niqmaddu Ring",
  73.         back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
  74.         }
  75.     sets.ws.vitbased = set_combine(sets.ws,{})
  76.     sets.ws.strbased = set_combine(sets.ws,{})
  77.     sets.ws.magic = {}
  78.     sets.ws.wsd = {}
  79.    
  80.     sets.ws["King\'s Justice"] = sets.ws.strbased
  81.     sets.ws["Fell Cleve"] = sets.ws.strbased
  82.     sets.ws["Scourge"] = sets.ws.wsd
  83.     sets.ws["Resolution"] = sets.ws.strbased
  84.     --sets.ws["Resolution"] = sets.ws.wsd
  85.    
  86.     sets.ws["Decimation"] = set_combine(sets.ws,{ammo="Seeth. Bomblet +1",})
  87.     sets.ws["Rampage"] = sets.ws.wsd
  88.     sets.ws["Mistral Axe"] = set_combine(sets.ws.wsd, {})
  89.     sets.ws.savageblade = set_combine(sets.ws.wsd, {})
  90.     sets.ws["Savage Blade"] = set_combine(sets.ws.wsd, {})
  91.     sets.ws["Judgment"] = sets.ws.savageblade
  92.     sets.ws["True Strike"] = sets.ws.wsd
  93.     sets.ws["Black Halo"] = sets.ws.savageblade
  94.     sets.ws["Metatron Torment"] = sets.ws.wsd
  95.     sets.ws["Upheaval"] = sets.ws.vitbased
  96.     sets.ws["Upheaval"].ACC = {}
  97.     sets.ws["Cloudsplitter"] = sets.ws.magic
  98.     sets.ws["Freezebite"] = sets.ws.magic
  99.     sets.ws["Aeolian Edge"] = sets.ws.magic
  100.     sets.ws["Flash Nova"] = sets.ws.magic
  101.     sets.ws["Cataclysm"] = sets.ws.magic
  102.     sets.ws["Earth Crusher"] = sets.ws.magic
  103.  
  104.    
  105.     ---  PRECAST SETS  ---
  106.     sets.precast = {}
  107.     sets.precast.JA = set_combine(sets.enmity, {})
  108.     sets.precast.JA.Berserk = set_combine(sets.precast.JA, {back="Cichol's Mantle",body="Pumm. Lorica +3",feet="Agoge Calligae +3"})
  109.     sets.MaxBerserk = set_combine(sets.precast.JA, {})
  110.     sets.precast.JA.Warcry = set_combine(sets.precast.JA, {head="Agoge mask +3"})
  111.     sets.precast.JA.Aggressor = set_combine(sets.precast.JA, {head="Pummeler's Mask +3",body="Agoge Lorica +3"})
  112.     sets.precast.JA['Mighty Strikes'] = set_combine(sets.precast.JA, {hands="Agoge Mufflers +3"})
  113.     sets.precast.JA['Defender'] = set_combine(sets.precast.JA, {hands="Agoge Mufflers +3"})
  114.     sets.precast.JA['Blood Rage'] = set_combine(sets.precast.JA, {body="Boii Lorica +1"})
  115.     sets.precast.Restraint = set_combine(sets.precast.JA, {hands="Boii Mufflers +1"})
  116.     sets.precast.JA.Tomahawk = set_combine(sets.precast.JA, {ammo="Thr. Tomahawk",feet="Agoge Calligae +3"})
  117.     sets.precast.Ranged = {ammo="Dart"}
  118.  
  119.  
  120.    
  121.     sets.CurePotencyRecv = {}
  122.    
  123.     sets.precast.WS = sets.ws
  124.    
  125.     sets.precast.FastCast = {
  126.         ammo="Impatiens",
  127.         head="Ynglinga Sallet",
  128.         body="Tartarus Platemail",
  129.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  130.         legs="Arjuna Breeches",
  131.         feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
  132.         neck="Baetyl Pendant",
  133.         waist="Ioskeha Belt +1",
  134.         left_ear="Etiolation Earring",
  135.         right_ear="Loquac. Earring",
  136.         left_ring="Prolix Ring",
  137.         right_ring="Lebeche Ring",
  138.         back={ name="Cichol's Mantle", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  139.         }
  140.    
  141.     sets.midcast = set_combine(sets.precast.FastCast,{})
  142.    
  143.  
  144.     ---  AFTERCAST SETS  ---
  145.     sets.Idle = {
  146.         ammo="Staunch Tathlum +1",
  147.         head={ name="Valorous Mask", augments={'Pet: Accuracy+28 Pet: Rng. Acc.+28','Pet: Haste+1','Pet: Attack+14 Pet: Rng.Atk.+14',}},
  148.         body="Tartarus Platemail",
  149.         hands="Sulev. Gauntlets +2",
  150.         legs="Sulev. Cuisses +2",
  151.         feet="Hermes' Sandals",
  152.         neck="Sanctity Necklace",
  153.         waist="Flume Belt",
  154.         left_ear="Dawn Earring",
  155.         right_ear="Infused Earring",
  156.         left_ring="Defending Ring",
  157.         right_ring="Patricius Ring",
  158.         back={ name="Cichol's Mantle", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Phys. dmg. taken-10%',}}
  159.         }
  160.    
  161.     sets.Idle.Current = sets.Idle
  162.     sets.Resting = sets.Idle
  163.    
  164.     sets.WakeSleep = {neck="Vim Torque"}
  165.     sets.ProtectBuff = {}
  166.  
  167. end
  168.  
  169.  
  170.  
  171. function job_pretarget(spell)
  172. checkblocking(spell)
  173. end
  174.  
  175.  
  176. function job_precast(spell)
  177.     handle_equipping_gear(player.status)
  178.     if spell.name == 'Utsusemi: Ichi' and (buffactive['Copy Image (3)'] or buffactive ['Copy Image (4+)']) then
  179.       cancel_spell()
  180.       send_command('@wait 1;')
  181.       equip(sets.Idle.Current)
  182.       return
  183.     end
  184.     if sets.precast.JA[spell.name] then
  185.         equip(sets.precast.JA[spell.name])
  186.     elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then
  187.         equip(sets.precast.Cure)
  188.     elseif spell.skill == 'EnhancingMagic' then
  189.         equip(sets.precast.EnhancingMagic)
  190.     elseif spell.action_type == 'Magic' then
  191.         equip(sets.precast.FastCast)
  192.     end
  193.     if spell.name == 'Ranged' then
  194.         equip(sets.precast.Ranged)
  195.     end
  196. end
  197.  
  198. function job_post_precast(spell)
  199.     if player.tp < 2250 and spell.type == 'WeaponSkill' and player.equipment.main == "Chango" then
  200.         equip({left_ear="Moonshade Earring"})
  201.         windower.add_to_chat(10,"Adding in Moonshade Earring for more TP:"..player.tp)
  202.     elseif player.tp < 2750 and spell.type == 'WeaponSkill' then
  203.         windower.add_to_chat(10,"Adding in Moonshade Earring for more TP:"..player.tp)
  204.         equip({})
  205.     end
  206.     if (world.time >= (17*60) or world.time < (7*60)) and spell.type == 'WeaponSkill' then
  207.         equip({right_ear="Lugra Earring +1"})
  208.     end
  209. end
  210.  
  211. function job_midcast(spell)
  212.     if spell.name == 'Ranged' then
  213.         equip(sets.precast.Ranged)
  214.     end
  215.     if spell.action_type == 'Magic' then
  216.         equip(sets.dtenmity)
  217.     end
  218.     if spell.name:contains('Utsusemi') then
  219.         equip(sets.precast.FastCast)
  220.     end
  221. end
  222.  
  223. function job_post_midcast(spell)
  224.     if spell.name == 'Utsusemi: Ichi' then
  225.       send_command('cancel Copy Image|Copy Image (2)')
  226.     end
  227.     if spell.type == "WeaponSkill" then
  228.       tpspent = spell.tp_cost
  229.     end
  230.    
  231.  
  232. end        
  233.  
  234. function job_aftercast(spell)
  235.     if state.SpellDebug.value == "On" then
  236.       spelldebug(spell)
  237.     end
  238.    
  239.     handle_equipping_gear(player.status)
  240.     equip(sets.Idle.Current)    
  241. end
  242.  
  243. function job_post_aftercast(spell)
  244.     if spell.type == "WeaponSkill" and state.BerserkMode.value == "Auto" and windower.ffxi.get_ability_recasts()[1] == 0 then
  245.        currentMain = player.equipment.main
  246.        currentSub = player.equipment.sub
  247.        windower.add_to_chat("Current Equipment: "..currentMain.." "..currentSub)
  248.        equip(sets.MaxBerserk)
  249.        send_command("@wait 2.5;input /ja Berserk <me>")
  250.     end
  251.     if spell.name == "Berserk" and state.BerserkMode.value == "Auto" and currentMain and currentSub then
  252.         equip({main=currentMain,sub=currentSub})
  253.     end
  254. end
  255.  
  256. function status_change(new,tab)
  257.     handle_equipping_gear(player.status)
  258.     if new == 'Resting' then
  259.         equip(sets.Resting)
  260.     else
  261.         equip(sets.Idle.Current)
  262.     end
  263. end
  264.  
  265.  
  266. function job_buff_change(status,gain_or_loss)
  267.     job_handle_equipping_gear(player.status)
  268.    if (gain_or_loss) then  
  269.      add_to_chat(4,'------- Gained Buff: '..status..'-------')
  270.      if status == "sleep" then
  271.        equip(sets.WakeSleep)
  272.      end
  273.      if status == "KO" then
  274.        send_command('input /party These tears... they sting-wing....')
  275.      end
  276.    else
  277.      add_to_chat(3,'------- Lost Buff: '..status..'-------')
  278.    end
  279.  end
  280.  
  281.  function job_self_command(command)
  282.     if command[1]:lower() == "ws" and command[2] ~= nil then
  283.         local EquipedGear = windower.ffxi.get_items()
  284.         local CurrentSkill
  285.         if EquipedGear.equipment.main == nil or EquipedGear.equipment.main == 0 then
  286.           CurrentSkill = "Hand-to-Hand"
  287.         else
  288.           CurrentSkill = res.skills[res.items[windower.ffxi.get_items(EquipedGear.equipment.main_bag, EquipedGear.equipment.main).id].skill].en
  289.         end
  290.         send_command('input /ws '..WeaponSkill[CurrentSkill][command[2]])
  291.     end
  292.     if command[1]:lower() == "wslist" then
  293.         local EquipedGear = windower.ffxi.get_items()
  294.         local CurrentSkill
  295.         if EquipedGear.equipment.main == nil or EquipedGear.equipment.main == 0 then
  296.           CurrentSkill = "Hand-to-Hand"
  297.         else
  298.           CurrentSkill = res.skills[res.items[windower.ffxi.get_items(EquipedGear.equipment.main_bag, EquipedGear.equipment.main).id].skill].en
  299.         end
  300.         windower.add_to_chat(2,"WS List:")
  301.         for i,v in pairs(WeaponSkill[CurrentSkill]) do
  302.             windower.add_to_chat(2,i..") "..v)
  303.         end
  304.     end
  305.     if command[1]:lower() == "berserkmode" then
  306.        currentMain = player.equipment.main
  307.        currentSub = player.equipment.sub
  308.        send_command('gs c cycle BerserkMode')
  309.     end
  310. end
  311.  
  312. function job_state_change(stateField, newValue, oldValue)
  313.     job_handle_equipping_gear(player.status)
  314.     equip(sets.Idle.Current)
  315. end
  316.  
  317.  
  318. function job_handle_equipping_gear(playerStatus, eventArgs)    
  319.     disable_specialgear()
  320.     if buffactive.sleep then
  321.     equip(sets.WakeSleep)
  322.     end
  323.     if playerStatus == 'Idle' then
  324.         equip(sets.Idle.Current)
  325.     end
  326.     if state.IdleMode.value == "Reraise" then
  327.        sets.Idle.Current = set_combine(sets.Idle,{body="Twilight Mail",head="Twilight Helm"})  
  328.     elseif state.IdleMode.value == "MEVA" or state.OffenseMode.value == "MEVA" then
  329.         sets.Idle.Current = sets.meva
  330.     elseif state.IdleMode.value == "DT" or state.OffenseMode.value == "DT" then
  331.         if buffactive['Aftermath'] then
  332.             sets.Idle.Current = sets.dtaftermath
  333.             sets.engaged.DT = sets.dtaftermath
  334.         else
  335.             sets.Idle.Current = sets.dt
  336.             sets.engaged.DT = sets.dt
  337.         end
  338.     else
  339.        sets.Idle.Current = sets.Idle
  340.     end
  341. end
  342.  
  343.  
  344.  
  345. function select_default_macro_book()
  346.     set_macro_page(9, 1)
  347. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement