Advertisement
FalownPSA

Phillie_SMN

Sep 7th, 2015
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.43 KB | None | 0 0
  1.  include('organizer-lib')
  2.  
  3. -- petpdt set with F7, garland of bliss set, myrkr set, auto-echo
  4.  
  5. beforecall = 0
  6. silence = 0
  7. sumskill = 417 + 16 + 99
  8.  
  9. PetName = S{"Garuda", "Carbuncle", "Diabolos", "Fenrir", "Caith Sith", "Leviathan", "Ifrit", "Titan", "Shiva"}
  10. SpiritName = S{'Fire Spirit', 'Earth Spirit', 'Water Spirit', 'Air Spirit', 'Ice Spirit', 'Thunder Spirit', 'Light Spirit', 'Dark Spirit'}
  11. SpecialAvatar = S{"Alexander", "Odin"}
  12.  
  13. -- a finir
  14. Storm = {['Firestorm']='Fire',['Windstorm']='Air', ['Sandstorm']='Earth', ['Voidstorm']='Dark', ['Aurorastorm']='Light', ['Hailstorm']='Ice',['Rainstorm']='Water',['Thunderstorm']='Thunder'}
  15. StormList = {'Firestorm','Windstorm', 'Sandstorm', 'Voidstorm', 'Aurorastorm', 'Hailstorm','Rainstorm','Thunderstorm'}
  16.  
  17. AvatarElement = {["Garuda"] = "Wind", ["Carbuncle"]="Light", ["Diabolos"]="Dark", ["Fenrir"]="Dark", ["Caith Sith"]="Light", ["Leviathan"]="Water", ["Ifrit"]="Fire", ["Titan"]="Earth", ["Shiva"]="Ice", ["Ramuh"]="Thunder"}
  18.  
  19. spirit_element = {['Fire']='Fire Spirit', ['Earth']='Earth Spirit', ['Water']='Water Spirit', ['Wind']='Air Spirit', ['Ice']='Ice Spirit', ['Lightning']='Thunder Spirit', ['Light']='Light Spirit', ['Dark']='Dark Spirit'}
  20. spirit_conflict = {['Fire']='Ice', ['Earth']='Lightning', ['Water']='Fire', ['Wind']='Earth', ['Ice']='Wind', ['Lightning']='Water', ['Light']='Dark', ['Dark']='Light'}
  21.  
  22.  
  23. bp_physical = {['Regal Scratch']=true, ['Punch']=true, ['Rock Throw']=true, ['Barracuda Dive']=true, ['Claw']=true, ['Axe Kick']=true, ['Shock Strike']=true, ['Camisado']=true, ['Poison Nails']=true, ['Moonlit Charge']=true, ['Crescent Fang']=true, ['Rock Buster']=true, ['Tail Whip']=true, ['Double Punch']=true, ['Megalith Throw']=true, ['Double Slap']=true, ['Eclipse Bite']=true, ['Mountain Buster']=true, ['Spinning Dive']=true, ['Predator Claws']=true, ['Rush']=true, ['Chaotic Strike']=true}
  24. bp_hybrid = {['Burning Strike']=true, ['Flaming Crush']=true}
  25. bp_magic = {['Inferno']=true, ['Earthen Fury']=true, ['Tidal Wave']=true, ['Aerial Blast']=true, ['Diamond Dust']=true, ['Judgment Bolt']=true, ['Searing Light']=true, ['Howling Moon']=true, ['Ruinous Omen']=true, ['Zantetsuken']=true, ['Somnolence']=true, ['Nether Blast']=true}
  26. bp_magic_tp = {['Meteor Strike']=true, ['Geocrush']=true, ['Grand Fall']=true, ['Wind Blade']=true, ['Heavenly Strike']=true, ['Thunderstorm']=true, ['Fire II']=true, ['Stone II']=true, ['Water II']=true, ['Aero II']=true, ['Blizzard II']=true, ['Thunder II']=true, ['Fire IV']=true, ['Stone IV']=true, ['Water IV']=true, ['Aero IV']=true, ['Blizzard IV']=true, ['Thunder IV']=true, ['Thunderspark']=true, ['Meteorite']=true, ['Holy Mist']=true, ['Lunar Bay']=true, ['Night Terror']=true, ['Level ? Holy']=true, ['Conflag Strike']=true}
  27. bp_accuracy = {['Mewing Lullaby']=true, ['Eerie Eye']=true, ['Lunar Cry']=true, ['Nightmare']=true, ['Lunar Roar']=true, ['Slowga']=true, ['Ultimate Terror']=true, ['Sleepga']=true, ['Tidal Roar']=true, ['Diamond Storm']=true, ['Shock Squall']=true, ['Pavor Nocturnus']=true}
  28. -- Double table, for duration calculation
  29. bp_duration = {
  30.         ['Glittering Ruby']=90,
  31.         ['Shining Ruby']=180,
  32.         ['Frost Armor']=90,
  33.         ['Rolling Thunder']=60,
  34.         ['Crimson Howl']=30,
  35.         ['Lightning Armor']=90,
  36.         ['Ecliptic Growl']=180,
  37.         ['Hastega']=90,
  38.         ['Noctoshield']=180,
  39.         ['Ecliptic Howl']=180,
  40.         ['Dream Shroud']=180,
  41.         ['Earthen Armor']=60,
  42.         ['Fleet Wind']=120,
  43.         ['Heavenward Howl']=60}
  44.  
  45. icons = {
  46.             ['Earthen Armor']   = 'spells/00299.png', -- 00299 for Titan
  47.             ['Shining Ruby']    = 'spells/00043.png', -- 00043 for Protect
  48.             ['Dream Shroud']    = 'spells/00304.png', -- 00304 for Diabolos
  49.             ['Noctoshield']     = 'spells/00106.png', -- 00106 for Phalanx
  50.             ['Inferno Howl']    = 'spells/00298.png', -- 00298 for Ifrit
  51.             ['Hastega']         = 'spells/00358.png', -- 00358 for Hastega
  52.             ['Rolling Thunder'] = 'spells/00104.png', -- 00358 for Enthunder
  53.             ['Frost Armor']     = 'spells/00250.png', -- 00250 for Ice Spikes
  54.             ['Lightning Armor'] = 'spells/00251.png', -- 00251 for Shock Spikes
  55.             ['Reraise II']      = 'spells/00135.png', -- 00135 for Reraise
  56.             ['Fleet Wind']      = 'abilities/00074.png', --
  57.         }      
  58.        
  59.        
  60. bp_boon = {['Earthen Ward']=true, ['Aerial Armor']=true, ['Raise II']=true, ['Reraise II']=true, ['Healing Ruby']=true, ['Whispering Wind']=true, ['Spring Water']=true, ['Healing Ruby II']=true}
  61. bp_skill = {['Perfect Defense']=true, ['Inferno Howl']=true, ['Soothing Ruby']=true}
  62.  
  63.  
  64. MAB = S{"Stone", "Stone II", "Water", "Water II", "Aero", "Aero II", "Fire", "Fire II", "Thunder", "Thunder II", "Blizzard", "Blizzard II", "Geohelix", "Hydrohelix", "Anemohelix", "Pyrohelix", "Cryohelix", "Ionohelix", "Luminohelix", "Noctohelix"}
  65. ENF = S{"Sleepga", "Drain", "Aspir", "Dispel", "Sleep"}
  66. CUR = S{"Cure", "Cure II", "Cure III"}
  67.  
  68.  
  69. --- Hagondes Body differentiation
  70. HHndPerp = { name="Helios Gloves", augments={'"Avatar perpetuation cost"-4', 'Pet: Haste +6%', 'Pet: Accuracy +30','Pet: Rng.Acc +30'}}
  71. HFeetPerp = { name="Helios Boots", augments={'Pet: Haste +6%', 'Pet: Dbl. Atk +8', 'Pet: Attack +30', 'Pet: Rng. Atk +30'}}
  72. FcHd = { name ="Helios Band", augments={'Blood Pact Dmg. +3', 'Pet: "Dbl. Atk."+2'}}
  73. FcBod = { name="Helios Jacket", augments={'Blood Pact Dmg. +5', 'Pet: Crit. Hit Rate +2%', 'Pet: "Mag. Atk. Bns."+25'}}
  74. FcHnd = { name="Helios Gloves", augments={'Blood Pact Dmg. +5', 'Pet: Crit. Hit Rate +3%', 'Pet: "Mag. Atk. Bns."+28'}}
  75. FcLeg = { name="Helios Spats", augments={'Blood Pact Dmg. +5', 'Pet: "Dbl. Atk"+3', 'Pet: "Mag. Atk. Bns."+26'}}
  76. PhyHd = { name="Helios Band", augments={'Blood Pact Dmg. +4', 'Pet: Crit. Hit Rate +1%', 'Pet: Attack+27 Pet: Rng. Atk.+27'}}
  77. PhyLeg = { name="Helios Spats", augments={'Blood Pact Dmg. +7', 'Pet: Attack+8 Pet: Rng. Atk.+8'}}
  78.  
  79. function get_sets()
  80.        
  81.         -- IDLE
  82.         sets.idle = {
  83.                 head="Con. Horn +1",
  84.                 rear='Moonshade Earring',
  85.                 body='Con. Doublet +1',
  86.                 legs='Nares Trews',
  87.                 neck='Twilight Torque',
  88.                 main='Nirvana',
  89.                 hands='Serpentes cuffs',
  90.                 feet='Serpentes Sabots',
  91.                 waist='Fucho-no-obi',
  92.                 sub="Genbu's shield",
  93.                 ammo="Dosis Tathlum",
  94.                 back="Cheviot Cape"}
  95.  
  96.         --  Perp : -13/tick + refresh +5 from gears
  97.     sets.perpetuation = {
  98.                 main='Nirvana',
  99.                 ammo='Seraphicaller',
  100.                 head="Glyphic Horn +1",
  101.                 neck="Caller's Pendant",
  102.                 lear='Moonshade Earring',
  103.                 rear='Andoaa Earring',
  104.                 body='Glyphic Doublet +1',
  105.                 hands='Regimen Mittens',
  106.                 rring="Evoker's Ring",
  107.                 lring='Fervor Ring',
  108.                 back='Samanisi Cape',
  109.                 waist='Moepapa Stone',
  110.                 legs="Con. Spats +1",
  111.                 feet="Con. Pigaches +1",
  112.                 sub="Vox Grip"}
  113.                
  114.     sets.favor = {
  115.                 main='Nirvana',
  116.                 ammo='Seraphicaller',
  117.                 head="Con. Horn +1",
  118.                 neck="Caller's Pendant",
  119.                 lear='Andoaa Earring',
  120.                 rear='Moonshade Earring',
  121.                 body='Hagondes Coat +1',
  122.                 hands='Glyphic Bracers +1',
  123.                 rring="Evoker's Ring",
  124.                 lring='Fervor Ring',
  125.                 back='Conveyance Cape',
  126.                 waist='Isa Belt',
  127.                 legs='Nares Trews',
  128.                 feet="Convoker's Pigaches"}
  129.        
  130.     sets.spirit = {
  131.                 main="Gridarvor",
  132.                 sub='Vox Grip',
  133.                 ammo='Seraphicaller',
  134.                 head="Con. Horn +1",
  135.                 neck="Caller's Pendant",
  136.                 lear='Andoaa Earring',
  137.                 rear='Moonshade Earring',
  138.                 body="Caller's Doublet +2",
  139.                 hands='Glyphic Bracers +1',
  140.                 lring='Fervor Ring',
  141.                 rring="Evoker's Ring",
  142.                 back='Conveyance Cape',
  143.                 waist='Cimmerian Sash',
  144.                 legs='Glyphic Spats',
  145.                 feet="Convoker's Pigaches +1"
  146.                 }
  147.        
  148.     sets.resting = {
  149.                 head="Con. Horn +1",
  150.                 rear='Moonshade Earring',
  151.                 body='Hagondes Coat +1',
  152.                 legs='Nares Trews',
  153.                 neck='Twilight Torque',
  154.                 main='Bolelabunga',
  155.                 hands='Serpentes cuffs',
  156.                 feet='Serpentes Sabots',
  157.                 waist='Fucho-no-obi'}
  158.    
  159.     sets.speed = {legs='Tatsu. Sitagoromo'}
  160.        
  161.         sets.ssp = {
  162.                 main='Nirvana',
  163.                 ammo='Seraphicaller',
  164.                 head="Con. Horn +1",
  165.                 neck="Caller's Pendant",
  166.                 lear='Andoaa Earring',
  167.                 rear='Moonshade Earring',
  168.                 body='Hagondes Coat +1',
  169.                 hands='Glyphic Bracers +1',
  170.                 rring="Evoker's Ring",
  171.                 lring='Fervor Ring',
  172.                 back='Conveyance Cape',
  173.                 waist='Isa Belt',
  174.                 legs='Nares Trews',
  175.                 feet="Desert Boots",
  176.                 sub="Vox Grip"}
  177.                
  178.     sets.ssi = {
  179.                 head="Con. Horn +1",
  180.                 rear='Moonshade Earring',
  181.                 body='Hagondes Coat +1',
  182.                 legs='Nares Trews',
  183.                 neck='Twilight Torque',
  184.                 main='Bolelabunga',
  185.                 hands='Serpentes cuffs',
  186.                 feet='Desert Boots',
  187.                 waist='Fucho-no-obi',
  188.                 sub="Genbu's shield",
  189.                 ammo="Dosis Tathlum",
  190.                 back="Cheviot Cape"}  
  191.  
  192.     sets.precast = {}
  193.        
  194.     sets.precast.delay = {
  195.                 ammo='Seraphicaller',
  196.                 head='Con. Horn +1',
  197.                 lear="Caller's Earring",
  198.                 body='Gylphic Doublet +1',
  199.                 hands='Con. Bracers +1',
  200.                 back="Tiresias' Cape",
  201.                 feet='Glyph. Pigaches +1',
  202.                 legs='Glyphic Spats +1'}
  203.                
  204.     sets.precast.cede = {hands='Call. Bracers +2'}
  205.        
  206.     sets.precast.siphon = {
  207.                 main="Keraunos",
  208.                 sub="Vox Grip",
  209.                 head="Con. Horn +1",
  210.                 neck="Caller's Pendant",
  211.                 rear="Smn. Earring",
  212.                 lear="Andoaa earring",
  213.                 body="Caller's Doublet +2",
  214.                 hands="Glyptic Bracers +1",
  215.                 lring="Evoker's Ring",
  216.                 rring="Fervor Ring",
  217.                 back="Conveyance Cape",
  218.                 legs="Ngen Seraweels",
  219.                 feet="Caller's Pgch. +2"}
  220.                
  221.     sets.precast.FC = {
  222.                 head="Nahtirah Hat",
  223.                 neck="Orunmila's Torque",
  224.                 ear1="Loquacious Earring",
  225.                 body="Marduk's Jubbah",
  226.                 hands="Repartie Gloves",
  227.                 ring2="Prolix Ring",
  228.                 back="Swith Cape",
  229.                 waist="Witful belt",
  230.                 legs="Artsieq hose",
  231.                 feet="Chelona Boots",
  232.                 sub="Vivid Strap",
  233.                 main="Nirvana"}
  234.                
  235.     sets.precast.WS['Myrkr'] = {
  236.                                 }
  237.    
  238.     sets.precast.WS['Garland of Bliss'] = {
  239.                                 }
  240.    
  241.                
  242.         sets.precast.cure = set_combine(sets.precast.FC, { legs="Nabu's Shalwar" })
  243.    
  244.         sets.midcast = {}
  245.        
  246.     sets.midcast.cure = {
  247.                 body=FcBod,
  248.                 head=PhyHd,
  249.                 hands="Bokwus Gloves",
  250.                 neck="Phalaina Locket",
  251.                 legs="Nabu's Shalwar",
  252.                 back="Pahtli Cape",
  253.                 main="Tamaxchi",
  254.                 sub="Genbu's shield"}
  255.                
  256.     sets.midcast.stoneskin = {
  257.                 neck='Stone Gorget',
  258.                 lear='Magnetic Earring',
  259.                 rear='Loquacious Earring',
  260.                 back='Swith Cape',
  261.                 waist='Siegel Sash',
  262.                 legs='Artsieq Hose',
  263.                 head="Umuthi Hat",
  264.                 hands="Gende. Gloves +1",
  265.                 body="Anhur Robe"}
  266.                
  267.     sets.midcast.regen = {
  268.                 head="Umuthi Hat",
  269.                 main="Bolelabunga",
  270.                 body="Anhur Robe",
  271.                 waist="Siegel Sash",
  272.                 back="Swith cape"}
  273.        
  274.     sets.midcast.Enf = {
  275.                 main="Nirvana",
  276.                 sub="Mephitis Grip",
  277.                 head="Buremte Hat",
  278.                 neck="Eddy Necklace",
  279.                 ear1="Hecate's Earring",
  280.                 ear2="Friomisi Earring",
  281.                 hands="Lurid Mitts",
  282.                 ring1="Perception Ring",
  283.                 ring2="Sangoma Ring",
  284.                 body="Artsieq Jubbah",
  285.                 back="Twilight Cape",
  286.                 waist="Fucho-no-obi",
  287.                 legs="Artsieq Hose",
  288.                 feet="Uk'uxkaj boots"}
  289.                
  290.     sets.midcast.Mab = {
  291.                 main="Eminent Staff",
  292.                 sub="Zuuxowu Grip",
  293.                 head="Buremte Hat",
  294.                 neck="Eddy Necklace",
  295.                 ear1="Hecate's Earring",ear2="Friomisi Earring",
  296.                 hands="Otomi Gloves",
  297.                 ring1="Icesoul Ring",
  298.                 ring2="Acumen Ring",
  299.                 body=HBodMAB,
  300.                 back="Toro Cape",
  301.                 waist="Sekhmet Corset",
  302.                 legs="Hagondes Pants",
  303.                 feet="Umbani Boots",
  304.                 }
  305.                
  306.     sets.pet_midcast = {}
  307.        
  308.     sets.pet_midcast.physical = {
  309.                 main="Nirvana",
  310.                 sub="Vox Grip",
  311.                 ammo="Seraphicaller",
  312.                 head=PhyHd,
  313.                 ear1="Esper Earring",
  314.                 ear2="Domes. Earring",
  315.                 body="Con. Doublet +1",
  316.                 hands="Spurrina Gages",
  317.                 ring1="Evoker's Ring",
  318.                 ring2="Fervor Ring",
  319.                 legs=PhyLeg,
  320.                 feet="Con. Pigaches +1",
  321.                 neck="Caller's Pendant",
  322.                 back="Samanisi Cape",
  323.                 waist="Mujin Obi"}
  324.                
  325.     sets.pet_midcast.magic = {
  326.                 main='Nirvana',
  327.                 sub='Vox Grip',
  328.                 ammo='Seraphicaller',
  329.                 head=FcHd,
  330.                 neck='Eidolon Pendant +1',
  331.                 lear='Esper Earring',
  332.                 rear='Andoaa Earring',
  333.                 body=FcBod,
  334.                 hands=FcHnd,
  335.                 lring="Evoker's Ring",
  336.                 rring="Fervor Ring",
  337.                 back='Samanisi Cape',
  338.                 waist="Caller's Sash",
  339.                 legs=FcLeg,
  340.                 feet='Hagondes Sabots'}
  341.                
  342.     sets.pet_midcast.magic.tp = {
  343.                 main='Nirvana',
  344.                 sub='Vox Grip',
  345.                 ammo='Seraphicaller',
  346.                 head=FcHd,
  347.                 neck='Eidolon Pendant',
  348.                 lear='Esper Earring',
  349.                 rear='Andoaa Earring',
  350.                 body=FcBod,
  351.                 hands=FcHnd,
  352.                 lring="Evoker's Ring",
  353.                 rring="Fervor Ring",
  354.                 back='Samanisi Cape',
  355.                 waist="Caller's Sash",
  356.                 legs=FcLeg,
  357.                 feet='Hagondes Sabots'}
  358.                
  359.     sets.pet_midcast.accuracy = {
  360.                 main='Nirvana',
  361.                 sub='Vox Grip',
  362.                 ammo='Seraphicaller',
  363.                 head='Hagondes Hat',
  364.                 neck='Eidolon Pendant',
  365.                 lear='Esper Earring',
  366.                 rear='Andoaa Earring',
  367.                 body="Con. Doublet +1",
  368.                 hands='Hagondes Cuffs',
  369.                 lring="Evoker's Ring",
  370.                 rring="Fervor Ring",
  371.                 back='Samanisi Cape',
  372.                 waist="Caller's Sash",
  373.                 legs="Caller's Spats +2",
  374.                 feet='Hagondes Sabots'}
  375.                
  376.     sets.pet_midcast.boon = {
  377.                 rear='Gifted Earring',
  378.                 waist="Jaq'ij Sash",
  379.                 legs="Caller's Spats +2"}
  380.    
  381.         sets.pet_midcast.skill = { --- TOTAL = 99
  382.                 main="Kirin's Pole",            --12
  383.                 sub='Vox Grip',                 -- 3
  384.                 ammo='Seraphicaller',           --
  385.                 head="Con. Horn +1",            -- 15
  386.                 neck="Caller's Pendant",        -- 9
  387.                 ear1='Smn. Earring',            -- 3
  388.                 ear2="Andoaa Earring",          -- 5
  389.                 body="Anhur Robe",              --
  390.                 hands='Glyphic Bracers +1',     -- 19
  391.                 lring="Evoker's Ring",          -- 10
  392.                 rring="Fervor Ring",            -- 4
  393.                 back='Conveyance Cape',         --
  394.                 waist='Cimmerian Sash',         -- 5
  395.                 legs="Adapa's Slacks +1",         --14
  396.                 feet='Rubeus Boots'}            --
  397.    
  398.         sets.pet_midcast.duration = {
  399.                 main="Kirin's Pole",
  400.                 sub='Vox Grip',
  401.                 ammo='Seraphicaller',
  402.                 head="Con. Horn +1",
  403.                 neck="Caller's Pendant",
  404.                 lear='Smn. Earring',
  405.                 rear='Andoaa Earring',
  406.                 body="Caller's Doublet +2",
  407.                 hands='Glyphic Bracers +1',
  408.                 lring='Fervor Ring',
  409.                 rring="Evoker's Ring",
  410.                 back='Conveyance Cape',
  411.                 waist='Cimmerian Sash',
  412.                 legs='Ngen Seraweels',
  413.                 feet='Nashira Crackows'}
  414.                
  415.         sets.pet_midcast.hybrid = {
  416.                 main='Nirvana',
  417.                 sub='Vox Grip',
  418.                 ammo=Seraphicaller,
  419.                 head=FcHd,
  420.                 neck='Eidolon Pendant +1',
  421.                 lear='Esper Earring',
  422.                 rear='Andoaa Earring',
  423.                 body=FcBod,
  424.                 hands=FcHnd,
  425.                 lring="Evoker's Ring",
  426.                 rring="Fervor Ring",
  427.                 back='Samanisi Cape',
  428.                 waist="Mujin Obi",
  429.                 legs=FcLeg,
  430.                 feet='Hagondes Sabots'}
  431.  
  432.    
  433.  
  434.         sets.perpetuation['Alexander'] = sets.pet_midcast.skill
  435.     sets.perpetuation['Odin'] = sets.pet_midcast.magic
  436.        
  437.    
  438. end
  439.  
  440.  
  441.  
  442. function buff_change(name, gain)
  443.     if name == "Sandstorm" then
  444.         if gain then
  445.             equip({feet="Desert Boots"})
  446.         else
  447.             idle()
  448.         end
  449.         -- AUTOECHO
  450.     elseif name == "Silence" then
  451.         silence = 1
  452.         else
  453.         silence = 0
  454.     end
  455.    
  456. end
  457.  
  458.        
  459.      
  460.  
  461. function pet_change(pets, gain)
  462.         beforecall = 1
  463.     if pet.isvalid then
  464.                 --add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..pet.name..' - Called ] *-*-*-*-*-*-*-*-*')
  465.                 if pet.name then
  466.                         if pet.name:find('Spirit') then
  467.                                 equip(sets.spirit)
  468.                         elseif pet.name == "Alexander" then
  469.                                 equip(sets.pet_midcast.skill)
  470.                         elseif pet.name == "Odin" then
  471.                                 equip(sets.pet_midcast.magic)
  472.                         else
  473.                                 equip(sets.perpetuation[pet.name] or sets.perpetuation)
  474.                         end
  475.         else
  476.             equip(sets.perpetuation[pet.name] or sets.perpetuation)
  477.         end
  478.     else
  479.         equip(sets.idle)
  480.     end
  481.        
  482.          
  483. end
  484.  
  485.  
  486. function status_change(new, old)
  487.     if pet.isvalid == false then
  488.         elseif new == 'Idle' then
  489.            idle()
  490.         elseif new == 'Resting' then
  491.               idle()
  492.     end
  493. end
  494.  
  495.  
  496. function precast(spell)
  497.     if pet.isvalid then
  498.         if spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard' then
  499.             equip(sets.precast.delay)
  500.             elseif spell.name == 'Elemental Siphon' then
  501.             equip(sets.precast.siphon)
  502.         elseif spell.name == 'Mana Cede' then
  503.             equip(sets.precast.cede)
  504.                 elseif CUR:contains(spell.name) then
  505.                                 equip(sets.precast.cure)      
  506.                 elseif spell.action_type == 'Magic' then
  507.                equip(sets.precast.FC)                  
  508.         end
  509.         elseif spell.action_type == 'Magic' then
  510.                equip(sets.precast.FC)
  511.         end
  512.     if spell.name:find('Spirit') and beforecall == 1 then
  513.                 beforecall = 0
  514.                 b = 0
  515.                 -- A FINIR
  516.                 -- First : check storm, then check weather, then check day
  517.                 for i=1, 8 do
  518.                         elem = StormList[i]
  519.                         if buffactive[elem] then
  520.                                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..elem..' active - '..Storm[elem]..' ] *-*-*-*-*-*-*-*-*')
  521.                                 cancel_spell()
  522.                                 send_command('input /ma "'..Storm[elem]..' Spirit" <me>')
  523.                                 b=1
  524.                         end
  525.                         i=i+1
  526.                 end
  527.                 if b == 0 then
  528.                         if world.weather_element ~= "None" then
  529.                                 cancel_spell()
  530.                                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..world.weather_element..' weather ] *-*-*-*-*-*-*-*-*')
  531.                                 windower.send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
  532.                         else
  533.                                 cancel_spell()
  534.                                 windower.send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
  535.                                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..world.day_element..' day ] *-*-*-*-*-*-*-*-*')
  536.                         end
  537.                 end
  538.     elseif spell.name == 'Sneak' then
  539.         windower.ffxi.cancel_buff(71)
  540.     elseif spell.name == 'Stoneskin' then
  541.         windower.ffxi.cancel_buff(37)
  542.                
  543.          
  544.        
  545.        
  546.     end
  547. end
  548.  
  549. function midcast(spell)
  550.        
  551.         if spell.type == 'BloodPactRage'  or spell.type == 'BloodPactWard' then
  552.                 equip(sets.precast.delay)
  553.         elseif spell.action_type == 'Magic' then
  554.        
  555.                
  556.                 if ENF:contains(spell.name) then
  557.                         equip(sets.midcast.Enf)
  558.                 elseif spell.name  =='Stoneskin' then
  559.                         equip(sets.midcast.stoneskin)
  560.                 elseif CUR:contains(spell.name) then
  561.                         equip(sets.midcast.cure)
  562.                 elseif MAB:contains(spell.name) then
  563.                         equip(sets.midcast.Mab)
  564.        
  565.                 end
  566.        
  567.        
  568.     end
  569.  
  570. end
  571.  
  572.  
  573. function pet_midcast(spell)
  574.         if SpecialAvatar:contains(pet.name) then
  575.                 return
  576.         else
  577.     if spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard' then
  578.         if bp_physical[spell.name] then
  579.             equip(sets.pet_midcast.physical)
  580.         elseif bp_magic_tp[spell.name] then
  581.             if pet.tp < 250 then
  582.                 equip(sets.pet_midcast.magic.tp)
  583.             else
  584.                 equip(sets.pet_midcast.magic)
  585.             end
  586.         elseif bp_magic[spell.name] then
  587.             equip(sets.pet_midcast.magic)
  588.                 elseif bp_hybrid[spell.name] then
  589.                     equip(sets.pet_midcast.hybrid)
  590.         elseif bp_accuracy[spell.name] then
  591.             equip(sets.pet_midcast.accuracy)
  592.         elseif bp_duration[spell.name] then
  593.                         duration = bp_duration[spell.name] + sumskill - 300
  594.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Duration of '..spell.name..' = '..duration..' seconds ] *-*-*-*-*-*-*-*-*')
  595.             equip(sets.pet_midcast.skill)
  596.                         duration_pact_timer(spell.name)
  597.         elseif bp_boon[spell.name] then
  598.             equip(sets.pet_midcast.skill)
  599.         elseif bp_skill[spell.name] then
  600.             equip(sets.pet_midcast.skill)
  601.         end
  602.     end
  603.         end
  604. end
  605.  
  606.  
  607. function aftercast(spell)
  608.     idle()
  609. end
  610.  
  611. function status_change(new,old)
  612.         if new=="resting" then
  613.         idle()
  614.         elseif new=="engaged" then
  615.         return
  616.         else
  617.         idle()
  618.         end
  619. end
  620.  
  621.  
  622.        
  623. function self_command(command)
  624.     if command == 'Idle' then
  625.         idle()
  626.     end
  627. end
  628.  
  629.  
  630. function pet_aftercast(spell)
  631.   idle()
  632. end
  633.  
  634.  
  635.  
  636. function idle()
  637.     if pet.isvalid then
  638.         if string.find(pet.name,'Spirit') then
  639.             equip(sets.spirit)
  640.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..pet.name..' - SpiritPerp Set ] *-*-*-*-*-*-*-*-*')
  641.                        
  642.         elseif buffactive["Avatar's Favor"] then
  643.             equip(sets.favor)
  644.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..pet.name..' - Avatar Favor Set ] *-*-*-*-*-*-*-*-*')
  645.         else
  646.           equip(sets.perpetuation[pet.name] or sets.perpetuation)
  647.                   add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..pet.name..' - Perp Set ] *-*-*-*-*-*-*-*-*')
  648.      
  649.          
  650.            
  651.         end
  652.                 else
  653.          equip(sets.idle)
  654.         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ NO Pet - Idle Set ] *-*-*-*-*-*-*-*-*')
  655.        
  656.          end
  657. end
  658.  
  659. -- Février et Mars DB
  660.  
  661.  
  662. function duration_pact_timer(spell_name)
  663.         -- Create custom timers for ward pacts.
  664.     if bp_duration[spell_name] then
  665.         local duration = bp_duration[spell_name]
  666.         if duration < 181 then
  667.             local skill = player.skills.summoning_magic
  668.             if skill > 300 then
  669.                 skill = skill - 300
  670.                 if skill > 200 then skill = 200 end
  671.                 duration = duration + skill
  672.             end
  673.         end
  674.        
  675.                 local timer_cmd = 'timers c "'..spell_name..'" '..tostring(duration)..' down'
  676.                
  677.                 if icons[spell_name] then
  678.                         timer_cmd = timer_cmd..' '..icons[spell_name]
  679.                 end
  680.  
  681.                 send_command(timer_cmd)
  682.     end
  683. end
  684.  
  685.  
  686. fps = 1
  687. sec = 0
  688.  
  689.  
  690. windower.register_event('prerender', function()
  691.     if fps < 150 then
  692.         fps = fps +1
  693.     else
  694.         fps = 1
  695.     end
  696.    
  697.  
  698.    
  699.    
  700.     if fps == 1 and silence == 1 then
  701.             send_command('input /item "echo drops" '..player.name..')
  702.     end
  703.    
  704. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement