Damane

WHM

Apr 11th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.13 KB | None | 0 0
  1. function get_sets()
  2.    
  3.     sets.aftercast = {}
  4.    
  5.     sets.aftercast.Idle = {}
  6.     sets.aftercast.Idle.index = {'normal','walk'}
  7.     Idle_ind = 1
  8.    
  9.    
  10.     sets.aftercast.Idle.normal =
  11.         {main="Owleyes",
  12.         sub="Genbu's Shield",
  13.         ammo="Clarus Stone",
  14.         head="Wivre hairpin",
  15.         neck="Twilight Torque",
  16.         ear1="Roundel Earring",
  17.         ear2="Moonshade Earring",
  18.         body="Artsieq Jubbah",
  19.         hands="Serpentes Cuffs",
  20.         ring1="Dark Ring",
  21.         ring2="Defending Ring",
  22.         back="Cheviot cape",
  23.         waist="Pythia sash",
  24.         legs="Nares Trews",
  25.         feet="Serpentes Sabots"}
  26.        
  27.        
  28.     sets.aftercast.Idle.walk =
  29.         {main="Owleyes",
  30.         sub="Genbu's Shield",
  31.         ammo="Clarus Stone",
  32.         head="Wivre hairpin",
  33.         neck="Twilight Torque",
  34.         ear1="Roundel Earring",
  35.         ear2="Moonshade Earring",
  36.         body="Artsieq Jubbah",
  37.         hands="Serpentes Cuffs",
  38.         ring1="Dark Ring",
  39.         ring2="Defending Ring",
  40.         back="Cheviot cape",
  41.         waist="Pythia sash",
  42.         legs="Nares Trews",
  43.         feet="Iaso boots"}
  44.        
  45.        
  46.     sets.precast = {}
  47.        
  48.     sets.precast.FastCast =
  49.         {ammo="Clarus Stone",
  50.         head="Nahtirah hat",
  51.         neck="Orunmila's Torque",
  52.         ear2="Loquacious Earring",
  53.         ear1="Novia earring",
  54.         body="Anhur Robe",
  55.         hands="Blessed mitts +1",
  56.         ring1="Prolix ring",
  57.         ring2="Defending ring",
  58.         back="Refraction Cape",
  59.         waist="Witful belt",
  60.         legs="Bokwus Slops",
  61.         feet="Bokwus boots"}
  62.    
  63.     sets.Resting = sets.aftercast.Idle.normal
  64.    
  65.    
  66.    
  67.     ------- This part describes sets that are toggled via //gs c toggle Nuke set , the default one is Attack, only for
  68.     ------- tier 1 and tier 2 nukee
  69.    
  70.     sets.midcast = {}
  71.    
  72.     sets.midcast.ElementalMagic = {}
  73.    
  74.     sets.midcast.ElementalMagic.index = {'Attack','Conserve'}
  75.     ElementalMagic_ind = 1
  76.    
  77.    
  78.     sets.midcast.ElementalMagic.Attack =
  79.         {ammo="Dosis Tathlum",
  80.         head="Buremte hat",
  81.         neck="Eddy Necklace",
  82.         ear1="Hecate's Earring",
  83.         ear2="Friomisi Earring",
  84.         body="Artsieq Jubbah",
  85.         hands="Otomi gloves",
  86.         ring1="Strendu Ring",
  87.         ring2="Diamond Ring",
  88.         back="Refraction Cape",
  89.         waist="Maniacus Sash",
  90.         legs="Theurgist's slacks",
  91.         feet="Umbani boots"}
  92.        
  93.        
  94.     sets.midcast.ElementalMagic.Conserve =
  95.         {ammo="Dosis Tathlum",
  96.         head="Buremte hat",
  97.         neck="Eddy Necklace",
  98.         ear1="Hecate's Earring",
  99.         ear2="Friomisi Earring",
  100.         body="Seidr Cotehardie",
  101.         hands="Otomi gloves",
  102.         ring1="Strendu Ring",
  103.         ring2="Diamond Ring",
  104.         back="Refraction Cape",
  105.         waist="Maniacus Sash",
  106.         legs="Theurgist's slacks",
  107.         feet="Umbani boots"}
  108.    
  109.    
  110.     sets.midcast.DarkMagic = set_combine(sets.precast.FastCast,
  111.     {ear1="Lifestorm earring",
  112.         ear2="Psystorm earring",
  113.         ring1="Sangoma ring",
  114.         ring2="Omega ring",
  115.         back="Refraction cape",})
  116.    
  117.    
  118.    
  119.     sets.midcast.ENF = {}
  120.    
  121.     sets.midcast.ENF.INT =
  122.         {ammo="Clarus Stone",
  123.         head="Nahtirah Hat",
  124.         neck="Eddy Necklace",
  125.         ear1="Lifestorm Earring",
  126.         ear2="Psystorm Earring",
  127.         body="Artsieq Jubbah",
  128.         hands="Lurid mitts",
  129.         ring1="Sangoma Ring",
  130.         ring2="Omega Ring",
  131.         back="Refraction Cape",
  132.         waist="Demonry sash",
  133.         legs="Artsieq hose",
  134.         feet="Artsieq boots"}
  135.    
  136.     sets.midcast.ENF.MND =
  137.         {ammo="Clarus Stone",
  138.         head="Nahtirah Hat",
  139.         neck="Eddy Necklace",
  140.         ear1="Lifestorm Earring",
  141.         ear2="Psystorm Earring",
  142.         body="Artsieq Jubbah",
  143.         hands="Lurid mitts",
  144.         ring1="Sangoma Ring",
  145.         ring2="Omega Ring",
  146.         back="Refraction Cape",
  147.         waist="Demonry sash",
  148.         legs="Artsieq hose",
  149.         feet="Artsieq boots"}
  150.    
  151.     sets.midcast.Impact =
  152.         {ammo="Clarus Stone",
  153.         neck="Eddy Necklace",
  154.         ear1="Lifestorm earring",
  155.         ear2="Psystorm earring",
  156.         hands="Lurid mitts",
  157.         ring1="Sangoma ring",
  158.         ring2="Omega Ring",
  159.         back="Refraction Cape",
  160.         waist="Demonry Sash",
  161.         legs="Artsieq hose",
  162.         feet="Artsieq boots"}
  163.    
  164.    
  165.     sets.midcast.EnhancingMagic =
  166.         {main="Beneficus",
  167.         sub="Genbu's Shield",
  168.         ammo="Clarus Stone",
  169.         head="Zenith crown +1",
  170.         neck="Colossus's Torque",
  171.         ear1="Novia Earring",
  172.         ear2="Loquacious Earring",
  173.         body="Anhur Robe",
  174.         hands="Augur's gloves",
  175.         ring1="Prolix ring",
  176.         ring2="Defending ring",
  177.         back="Merciful Cape",
  178.         waist="Olympus sash",
  179.         legs="Clr. Pantaln. +2",
  180.         feet="Orison duckbills +2"}
  181.        
  182.    
  183.     sets.midcast.Cure =
  184.         {main="Tamaxchi",
  185.         sub="Genbu's Shield",
  186.         head="Gende. caubeen",
  187.         body="Orison bliaud +2",
  188.         hands="Bokwus gloves",
  189.         legs="Orison pantaloons +2",
  190.         waist="Pythia sash"}
  191.    
  192.     sets.midcast.CureStorm =
  193.         {main="Chatoyant staff",
  194.         sub="Arbuda grip",
  195.         head="Gendewitha caubeen",
  196.         neck="Phalaina locket",
  197.         ear1="Orison earring",
  198.         ear2="Roundel earring",
  199.         body="Orison bliaud +2",
  200.         hands="Bokwus gloves",
  201.         back="Twilight cape",
  202.         waist="Korin obi",
  203.         legs="Orison pantaloons +2",
  204.         feet="Iaso Boots"}
  205.    
  206.     sets.midcast.CureFast =
  207.         {main="Tamaxchi",
  208.         sub="Genbu's Shield",
  209.         head="Gende. caubeen",
  210.         body="Orison bliaud +2",
  211.         hands="Bokwus gloves",
  212.         legs="Orison pantaloons +2",
  213.         waist="Pythia sash"}
  214.        
  215.     sets.midcast.Helix =
  216.         {ammo="Dosis Tathlum",
  217.         head="Buremte hat",
  218.         neck="Eddy Necklace",
  219.         ear1="Hecate's Earring",
  220.         ear2="Friomisi Earring",
  221.         body="Artsieq Jubbah",
  222.         hands="Otomi gloves",
  223.         ring1="Strendu Ring",
  224.         ring2="Diamond Ring",
  225.         back="Refraction Cape",
  226.         waist="Maniacus Sash",
  227.         legs="Theurgist's slacks",
  228.         feet="Umbani boots"}
  229.    
  230.     sets.Obi = {}
  231.     sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  232.     sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  233.     sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  234.     sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  235.     sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  236.     sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  237.     sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  238.     sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  239.    
  240.     sets.staves = {}
  241.    
  242.     sets.staves.damage = {}
  243.     sets.staves.damage.Thunder = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  244.     sets.staves.damage.Fire = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  245.     sets.staves.damage.Ice = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  246.     sets.staves.damage.Wind = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  247.     sets.staves.damage.Water = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  248.     sets.staves.damage.Earth = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  249.     sets.staves.damage.Dark = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  250.     sets.staves.damage.Light = {main="Lehbrailg +2",sub="Zuuxowu grip"}
  251.    
  252.     sets.staves.accuracy = {}
  253.     sets.staves.accuracy.Thunder = {main="Lehbrailg +2",sub="Mephitis grip"}
  254.     sets.staves.accuracy.Fire = {main="Lehbrailg +2",sub="Mephitis grip"}
  255.     sets.staves.accuracy.Ice = {main="Lehbrailg +2",sub="Mephitis grip"}
  256.     sets.staves.accuracy.Wind = {main="Lehbrailg +2",sub="Mephitis grip"}
  257.     sets.staves.accuracy.Water = {main="Lehbrailg +2",sub="Mephitis grip"}
  258.     sets.staves.accuracy.Earth = {main="Lehbrailg +2",sub="Mephitis grip"}
  259.     sets.staves.accuracy.Dark = {main="Lehbrailg +2",sub="Mephitis grip"}
  260.     sets.staves.accuracy.Light = {main="Lehbrailg +2",sub="Mephitis grip"}
  261.    
  262.     sets.staves.recasting = {}
  263.     sets.staves.recasting.Thunder = {main="Lehbrailg +2",sub="Arbuda Grip"}
  264.     sets.staves.recasting.Fire = {main="Lehbrailg +2",sub="Arbuda Grip"}
  265.     sets.staves.recasting.Ice = {main="Lehbrailg +2",sub="Arbuda Grip"}
  266.     sets.staves.recasting.Wind = {main="Lehbrailg +2",sub="Arbuda Grip"}
  267.     sets.staves.recasting.Water = {main="Lehbrailg +2",sub="Arbuda Grip"}
  268.     sets.staves.recasting.Earth = {main="Lehbrailg +2",sub="Arbuda Grip"}
  269.     sets.staves.recasting.Dark = {main="Lehbrailg +2",sub="Arbuda Grip"}
  270.     sets.staves.recasting.Light = {main="Arka II",sub="Arbuda Grip"}
  271.    
  272. end
  273.  
  274.  
  275. function precast(spell)
  276.     if spell.action_type == 'Magic'
  277.     then equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element]))
  278.     end
  279.  
  280.    
  281.     if spell.english == 'Impact'
  282.     then equip(sets.precast.FastCast,{body="Twilight Cloak",main="Lehbrailg +2",sub="Mephitis grip"})
  283.     end
  284.        
  285.        
  286.     if spell.english == 'Stun'
  287.         then equip (set_combine(sets.midcast.DarkMagic,sets.staves.recasting[spell.element]))
  288.     end
  289. end
  290.        
  291.  
  292.  
  293. function midcast(spell)
  294.    
  295.  
  296.  
  297.     if spell.english == 'Cure' or spell.english == 'Cure II' or spell.english == 'Cure III' or spell.english == 'Cure IV' or spell.english == 'Cure V' or spell.english == 'Cure VI'
  298.     or spell.english == 'Cura' or spell.english == 'Cura II' or spell.english == 'Cura III' or spell.english == 'Curaga'
  299.     or spell.english == 'Curaga II' or spell.english == 'Curaga III' or spell.english == 'Curaga IV'
  300.     or spell.english == 'Curaga V'
  301.         then
  302.         if spell.element == world.weather_element or spell_element == world.day_element or buffactive.Aurorastorm then
  303.             equip(sets.midcast.CureStorm)
  304.         elseif buffactive.accession
  305.         then
  306.             equip(sets.midcast.CureFast)
  307.         else equip(sets.midcast.Cure)
  308.         end
  309.     end
  310.    
  311.    
  312.     if spell.english == 'Impact' then
  313.         local tempset = (set_combine(sets.midcast.Impact,sets.staves.accuracy[spell.element]))
  314.         tempset['body'] = 'Twilight Cloak'
  315.         tempset['head'] = empty
  316.         equip(tempset)
  317.     end
  318.    
  319.    
  320.     if string.find(spell.english,'helix') then
  321.                 equip (set_combine(sets.midcast.Helix,sets.staves.damage[spell.element]))
  322.     end
  323.    
  324.    
  325.     if spell.english == 'Stone' or spell.english == 'Thunder' or spell.english == 'Water' or spell.english == 'Fire' or spell.english == 'Blizzard' or spell.english == 'Aero'
  326.     or spell.english == 'Stone II' or spell.english == 'Thunder II' or spell.english == 'Water II' or spell.english == 'Fire II' or spell.english == 'Blizzard II' or spell.english == 'Aero II'
  327.     or spell.english == 'Stonega' or spell.english == 'Stonega II' or spell.english == 'Thundaga' or spell.english == 'Thundaga II'
  328.     or spell.english == 'Waterga' or spell.english == 'Waterga II' or spell.english == 'Firaga' or spell.english == 'Firaga II'
  329.     or spell.english == 'Blizzaga' or spell.english == 'Blizzaga II' or spell.english == 'Aeroga' or spell.english == 'Aeroga II'
  330.     or spell.english == 'Fira' or spell.english == 'Blizzara' or spell.english == 'Aerora' or spell.english == 'Stonera' or spell.english == 'Thundara' or spell.english == 'Watera'
  331.     or string.find(spell.english,'Banish') or string.find(spell.english,'Holy')
  332.     then
  333.         equip (set_combine(sets.midcast.ElementalMagic[sets.midcast.ElementalMagic.index[ElementalMagic_ind]],sets.staves.damage[spell.element]))
  334.         if spell.element == world.weather_element or spell_element == world.day_element then
  335.                         equip(sets.Obi[spell.element])
  336.         end
  337.      
  338.     end
  339.    
  340.    
  341.     if spell.english == 'Stone III' or spell.english == 'Thunder III' or spell.english == 'Water III' or spell.english == 'Fire III' or spell.english == 'Blizzard III' or spell.english == 'Aero III'  
  342.     or spell.english == 'Stone IV'  or spell.english == 'Thunder IV' or spell.english == 'Water IV' or spell.english == 'Fire IV' or spell.english == 'Blizzard IV' or spell.english == 'Aero IV'
  343.     or spell.english == 'Stone V' or spell.english == 'Thunder V' or spell.english == 'Water V' or spell.english == 'Fire V' or spell.english == 'Blizzard V' or spell.english == 'Aero V'
  344.     or spell.english == 'Stonega III' or spell.english == 'Thundaga III'
  345.     or spell.english == 'Waterga III' or spell.english == 'Firaga III'
  346.     or spell.english == 'Blizzaga III'  or spell.english == 'Aeroga III'
  347.     or spell.english == 'Fira II' or spell.english == 'Blizzara II' or spell.english == 'Aerora II' or spell.english == 'Stonera II' or spell.english == 'Thundara II' or spell.english == 'Watera II'
  348.     then
  349.        equip (set_combine(sets.midcast.ElementalMagic.Attack,sets.staves.damage[spell.element]))
  350.         if spell.element == world.weather_element or spell_element == world.day_element then
  351.                         equip(sets.Obi[spell.element])
  352.         end
  353.      
  354.     end
  355.    
  356.    
  357.    
  358.    
  359.     if spell.english == 'Blind' or spell.english == 'Blind II'
  360.     or spell.english == 'Dispel' or spell.english == 'Break' or spell.english == 'Breakga'
  361.     or spell.english == 'Sleep' or spell.english == 'Sleep II' or spell.english == 'Sleepga' or spell.english == 'Sleepga II'
  362.     or spell.english == 'Bind' or spell.english == 'Burn' or spell.english == 'Frost'
  363.     or spell.english == 'Choke' or spell.english == 'Rasp' or spell.english == 'Rasp'
  364.     or spell.english == 'Shock' or spell.english == 'Drown' or spell.english == 'Poison'
  365.     or spell.english == 'Poison II' or spell.english == 'Poisonga' or spell.english == 'Poisonga II'
  366.     or spell.english == 'Gravity' or spell.english == 'Gravity II'
  367.         then
  368.         equip (set_combine(sets.midcast.ENF.INT,sets.staves.accuracy[spell.element]))
  369.     end
  370.    
  371.    
  372.     if spell.english == 'Slow' or spell.english == 'Slow II'
  373.     or spell.english == 'Paralyze' or spell.english == 'Paralyze II'
  374.     or spell.english == 'Dia' or spell.english == 'Dia II' or spell.english == 'Dia III' or spell.english == 'Diaga'
  375.     or spell.english == 'Silence' or spell.english == 'Repose' or spell.english == 'Addle'
  376.         then
  377.         equip (set_combine(sets.midcast.ENF.MND,sets.staves.accuracy[spell.element]))
  378.     end
  379.    
  380.    
  381.     if spell.english == 'Phalanx' or spell.english == 'Phalanx II'
  382.     or spell.english == 'Enthunder' or spell.english == 'Enthunder II'
  383.     or spell.english == 'Enstone' or spell.english == 'Enstone II'
  384.     or spell.english == 'Enaero' or spell.english == 'Enaero II'
  385.     or spell.english == 'Enblizzard' or spell.english == 'Enblizzard II'
  386.     or spell.english == 'Enfire' or spell.english == 'Enfire II'
  387.     or spell.english == 'Enwater' or spell.english == 'Enwater II'
  388.     or string.find(spell.english,'Bar') or string.find(spell.english,'spikes')
  389.     or spell.english == 'Stoneskin' or spell.english == 'Aquaveil'
  390.     or string.find(spell.english,'Boost') or spell.english == 'Auspice'
  391.         then
  392.         equip (sets.midcast.EnhancingMagic)
  393.     end
  394.    
  395.    
  396.     if spell.skill == 'DarkMagic' and not spell.english == 'Stun'
  397.         then
  398.         equip (set_combine(sets.midcast.DarkMagic,sets.staves.accuracy[spell.element]))
  399.         if spell.element == world.weather_element or spell_element == world.day_element then
  400.                         equip(sets.Obi[spell.element])
  401.         end
  402.      
  403.     end
  404.    
  405.    
  406.     if spell.english == 'Stun'
  407.         then
  408.         equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element]))
  409.     end
  410.    
  411.    
  412.     if spell.english == 'Haste' or spell.english == 'Blink'
  413.     or spell.english == 'Erase' or spell.english == 'Adloqium'
  414.     or spell.english == 'Klimaform' or spell.english == 'Refresh'
  415.     or spell.english == 'Refresh II' or spell.english == 'Arise'
  416.     or string.find(spell.english,'Protect')
  417.     or string.find(spell.english,'Protectra')   or spell.english == 'Sacrifice' or spell.english == 'Flash'
  418.     or string.find(spell.english,'Animus') or string.find(spell.english,'Raise')
  419.     or string.find(spell.english,'Reraise') or spell.english == 'Esuna' or spell.english == 'Arise'
  420.  
  421.         then
  422.         equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element]))
  423.             --if buffactive.manifestation or buffactive.alacrity or buffactive.celerity or buffactive.accession
  424.             --then
  425.             --equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element],{head="Nahtirah hat",feet="Pedagogy Loafers"}))
  426.             --end
  427.     end
  428.    
  429.    
  430.     if string.find(spell.english,'Shell')
  431.         then
  432.         equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element],{legs="Clr. Pantaln. +2"}))
  433.     end
  434.    
  435.     if spell.english == 'Paralyna' or spell.english == 'Stona' or spell.english == 'Blindna'
  436.     or spell.english == 'Poisona' or spell.engish == 'Silena'
  437.     or spell.english == 'Viruna' or spell.english == 'Cursna'
  438.         then
  439.         equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element],{head="Orison cap +2",legs="Orison pantaloons +2"}))
  440.     end
  441.    
  442.    
  443.    
  444.     if string.find(spell.english,'Regen')
  445.         then
  446.         equip (set_combine(sets.precast.FastCast,sets.staves.recasting[spell.element],{hands="Orison mitts +2"}))
  447.     end
  448. end
  449.        
  450.  
  451. function aftercast(spell)
  452.     equip(sets.aftercast.Idle[sets.aftercast.Idle.index[Idle_ind]])
  453.    
  454.     if spell.english == 'Sleep' or spell.english == 'Sleepga' then
  455.         send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  456.     elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  457.         send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  458.     elseif spell.english == 'Break' or spell.english == 'Breakga' then
  459.         send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  460.     end
  461. end
  462.    
  463. function status_change(new,tab)
  464.     if new == 'Resting' then
  465.         equip(sets['Resting'])
  466.     else
  467.         equip(sets.aftercast.Idle[sets.aftercast.Idle.index[Idle_ind]])
  468.     end
  469. end
  470.  
  471. function self_command(command)
  472.     if command == 'toggle Nuke set' then
  473.         ElementalMagic_ind = ElementalMagic_ind +1
  474.         if ElementalMagic_ind > #sets.midcast.ElementalMagic.index then ElementalMagic_ind = 1 end
  475.         send_command('@input /echo ----- Nuke changed to '..sets.midcast.ElementalMagic.index[ElementalMagic_ind]..' -----')
  476.     end
  477.    
  478.     if command == 'toggle Idle set' then
  479.         Idle_ind = Idle_ind +1
  480.         if Idle_ind > #sets.aftercast.Idle.index then Idle_ind = 1 end
  481.         send_command('@input /echo ----- Idle changed to '..sets.aftercast.Idle.index[Idle_ind]..' -----')
  482.         equip(sets.aftercast.Idle[sets.aftercast.Idle.index[Idle_ind]])
  483.     end
  484. end
Advertisement
Add Comment
Please, Sign In to add comment