Advertisement
Guest User

Untitled

a guest
Jan 7th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.72 KB | None | 0 0
  1. function get_sets()
  2.  
  3.         sets.aftercast_Idle_refresh = {main="Owleyes",sub="Genbu's Shield",ammo="Incantor Stone",
  4.                 head="Orvail Corona +1",neck="Twilight Torque",ear1="Novia Earring",ear2="Loquacious Earring",
  5.                 body="Bokwus Robe",hands="Serpentes Cuffs",ring1="Prolix Ring",ring2="Jelly Ring",
  6.                 back="Umbra Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Serpentes Sabots"}
  7.  
  8.         sets.aftercast_Idle = sets.aftercast_Idle_refresh
  9.  
  10.         sets.aftercast_Move = set_combine(sets.aftercast_Idle_refresh,{feet="Desert Boots"})
  11.  
  12.         sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
  13.                 neck="Orison Locket",back="Swith Cape",legs="Orvail Pants +1",feet="Chelona Boots +1"}
  14.  
  15.         sets.Resting = {main="Boonwell Staff",sub="Mephitis Grip",
  16.                 head="Orvail Corona +1",neck="Grandiose Chain",ear1="Antivenom Earring",ear2="Loquacious Earring",
  17.                 body="Bokwus Robe",back="Umbra Cape",legs="Nares Trews",feet="Chelona Boots +1"}
  18.  
  19.         sets.midcast_EnfeeblingMagic = {main="Eminent Wand",sub="Genbu's Shield",ammo="Savant's Treatise",
  20.                 head="Nahtirah Hat",neck="Enfeebling Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
  21.                 body="Bokwus robe",hands="Hagondes Cuffs",ring1="Omega Ring",ring2="Tamas Ring",
  22.                 back="Merciful Cape",waist="Cognition Belt",legs="Orvail Pants +1",feet="Weatherspoon Boots"}
  23.  
  24.         sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
  25.                 head="Nahtirah Hat",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Loquacious Earring",
  26.                 body="Bokwus Robe",hands="Gendewitha Gages",
  27.                 back="Swith Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Chelona Boots +1"}
  28.  
  29.  
  30.         sets.midcast_Cure = {main="Tefnut Wand",sub="Genbu's Shield",head="Orison Cap +1",neck="Orison Locket",
  31.         body="Nefer Kalasiris",hands="Weatherspoon Gloves",back="Tempered Cape"}
  32.  
  33.         sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}
  34.  
  35.         sets.midcast_DebuffRemoval = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear2="Loquacious Earring",
  36.                         body="Orison Bliaurd +2",hands="Orison Mitts +2",ring1="Ephedra Ring", ring2="Sirona's Ring",
  37.                         back="Swith Cape",waist="Cascade Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
  38.  
  39.         sets.Obi = {}
  40.         sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape'}
  41.         sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape'}
  42.         sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape'}
  43.         sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape'}
  44.         sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape'}
  45.         sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape'}
  46.         sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape'}
  47.         sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape'}
  48.  
  49.         sets.staves = {}
  50.  
  51.         sets.staves.damage = {}
  52.  
  53.         sets.staves.accuracy = {}
  54.         sets.staves.damage.Thunder = {main="Apamajas II"}
  55.  
  56.  
  57. end
  58.  
  59. function precast(spell)
  60.         if spell.skill=='ElementalMagic' and spell.casttime < 3 then
  61.                 equip(sets.midcast_ElementalMagic)
  62.                 if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
  63.                         equip(sets.Obi[spell.element])
  64.                 end
  65.         else
  66.                 equip(sets['precast_FastCast'])
  67.         end
  68. end
  69.  
  70. function midcast(spell)
  71.         if spell.skill=='HealingMagic' then
  72.                 if T{"Cure*","Curaga*"}:contains(spell.name) then
  73.                         equip(sets.midcast_Cure)
  74.                 elseif T{"Paralyna","Silena","Viruna","Erase","Cursna","Stona","Blindna","Poisona"}:contains(spell.name) then
  75.                         equip (sets['midcast_DebuffRemoval'])
  76.                 else
  77.                 equip(sets.midcast_DebuffRemoval)
  78.         end
  79.         elseif spell.skill=="ElementalMagic" then
  80.                 equip(sets.midcast_ElementalMagic)
  81.                 if spell.element == world.weather_element or spell_element == world.day_element then
  82.                         equip(sets.Obi[spell.element])
  83.                 end
  84.  
  85.         elseif spell.english == 'Stoneskin' then
  86.                 equip(sets['midcast_Stoneskin'])
  87.         elseif spell.skill == 'EnhancingMagic' then
  88.                 weathercheck(spell.element,sets['midcast_'..spell.skill])
  89.         end
  90.  
  91.         if spell.english == 'Sneak' then
  92.                 send_command('@wait 1.8;cancel 71;')
  93.         end
  94. end
  95.  
  96. function aftercast(spell)
  97.         equip(sets['aftercast_Idle'])
  98.  
  99.         if spell.english == 'Sleep' or spell.english == 'Sleepga' then
  100.                 send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  101.         elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  102.                 send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  103.         elseif spell.english == 'Break' or spell.english == 'Breakga' then
  104.                 send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  105.         end
  106. end
  107.  
  108. function status_change(new,tab)
  109.         if new == 'Resting' then
  110.                 equip(sets['Resting'])
  111.         else
  112.                 equip(sets['aftercast_Idle'])
  113.         end
  114. end
  115.  
  116. function buff_change(status,gain_or_loss)
  117.         if buffactive['Sandstorm'] then
  118.                 sets.aftercast_Idle = sets.aftercast_Move
  119.                 send_command('@wait 1;  input /echo ------- Processed Movement Speed Gear Swap -------')
  120.         end
  121.         equip(sets.aftercast_Idle)
  122. end
  123.  
  124.  
  125.  
  126. function self_command(command)
  127.         if buffactive['Sanstorm'] then
  128.                 sets.aftercast_Idle = sets.aftercast_Idle_Move
  129.         else
  130.                 sets.aftercast_Idle = sets.aftercast_Idle_Refresh
  131.         end
  132.         equip(sets.aftercast_Idle)
  133. end
  134.  
  135. -- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.
  136.  
  137. function weathercheck(spell_element,set)
  138.         if spell_element == world.weather_element or spell_element == world.day_element then
  139.                 equip(set,sets['Obi_'..spell_element])
  140.         else
  141.                 equip(set)
  142.         end
  143. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement