Advertisement
Guest User

WHM

a guest
Jul 27th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.34 KB | None | 0 0
  1. function get_sets()
  2.  
  3.         send_command("exec whm.txt")
  4.  
  5.         sets.precast = {}
  6.             sets.precast["Divine Caress"] = {"Mending Cape"}
  7.             sets.precast.fastcast = {
  8.                 main="Winged Wand",
  9.                 sub="Genbu's Shield",
  10.                 ammo="Incantor Stone",
  11.            
  12.                 head="Nahtirah Hat",
  13.                 neck="Orunmila's Torque",
  14.                 lear="Gifted Earring",
  15.                 rear="Loquac. earring",
  16.                
  17.                 body="Marduk's Jubbah +1",
  18.                 hands="Gende. Gages +1",
  19.                 lring="Prolix Ring",
  20.                 rring="Sheltered Ring",
  21.                
  22.                 back="Swith Cape",
  23.                 waist="Witful Belt",
  24.                 legs="Artsieq Hose",
  25.                 feet="Chelona Boots"}
  26.             --Precast Cures
  27.         sets.precast.healing = set_combine(sets.precast.fastcast, {
  28.             body="Heka's Kalasiris",
  29.            
  30.             back="Pahtli Cape",
  31.             legs="Orsn. Pantaln. +2",
  32.             feet="Cure Clogs"})
  33.        
  34.         --Precast Haste, Refresh, Flurry, Poisona, Paralyna, Blindna, Silena, Stona, Viruna
  35.         sets.precast.quickcast = set_combine(sets.precast.fastcast{
  36.             ammo="Impatiens",
  37.            
  38.             waist="Witful Belt"})
  39.            
  40.            
  41.         --Precast/Midcast Cursna
  42.         sets.precast.na = set_combine(sets.precast.fastcast{
  43.             ammo="Impatiens",
  44.            
  45.             rring="Ephedra Ring",
  46.            
  47.             back="Mending Cape",
  48.             waist="Witful Belt",
  49.             legs="Orsn. Pantaln. +2",
  50.             feet="Gende. Galosh +1"})
  51.            
  52.        
  53.         sets.idle = {
  54.                 main="Owleyes",
  55.                 sub="Genbu's Shield",
  56.                 ammo="Incantor Stone",
  57.                
  58.                 head="Nefer Khat",
  59.                 neck="Wiglen Gorget",
  60.                 lear="Gifted Earring",
  61.                 rear="Loquac. Earring",
  62.  
  63.                 body="Heka's Kalasiris",
  64.                 hands="Serpentes Cuffs",
  65.                 lring="Paguroidea Ring",
  66.                 rring="Sheltered Ring",
  67.  
  68.                 back="Umbra Cape",
  69.                 waist="Fucho-no-obi",
  70.                 legs="Nares Trews",
  71.                 feet="Serpentes Sabots"}
  72.                
  73.                
  74.                
  75.         sets.dt = {
  76.                 main="Terra's Staff",
  77.                 sub="Mephitis Grip",
  78.                
  79.                 head="Gende. Caubeen +1",
  80.                 neck="Twilight Torque",
  81.                 lear="Merman's Earring",
  82.                 rear="Merman's Earring",
  83.  
  84.                 body="Gende. Bilaut +1",
  85.                 hands="Gende. Gages+1",
  86.                 lring="Dark Ring",
  87.                 rring="Dark Ring",
  88.  
  89.                 back="Umbra Mantle",
  90.                 waist="Flume Belt",
  91.                 legs="Gende. Spats +1",
  92.                 feet="Gende. Galoshes +1"}
  93.        
  94.        
  95.  
  96.  
  97.         sets.heal = {
  98.                 main="Tamaxchi",
  99.                 sub="Genbu's Shield",
  100.                 ammo="Mana Ampulla",
  101.            
  102.                 head="Orison Cap +2",
  103.                 neck="Orunmila's Torque",
  104.                 lear="Lifestorm Earring",
  105.                 rear="Novia Earring",
  106.                
  107.                 body="Orison Bliaud +2",
  108.                 hands="Bokwus Gloves",
  109.                 lring="Ephedra Ring",
  110.                 rring="Sirona's Ring",
  111.                                                
  112.                 back="Tempered Cape",
  113.                 waist="Cascade Belt",
  114.                 legs="Orsn. Pantaln. +2",
  115.                 feet="Rubeus Boots"}
  116.                
  117.        
  118.         sets.whmmacc = {
  119.                 main="Twebuliij",
  120.                 sub="Mephitis",
  121.                 ammo="Mana Ampulla",
  122.            
  123.                 head="Nahtirah Hat",
  124.                 neck="Orunmila's Torque",
  125.                 lear="Lifestorm Earring",
  126.                 rear="Psystrom Earring",
  127.                
  128.                 body="Gendewitha Bliaut",
  129.                 hands="Gende. Gages +1",
  130.                 lring="Strendu Ring",
  131.                 rring="Omega Ring",
  132.                                                
  133.                 back="Pahtli Cape",
  134.                 waist="Witful Belt",
  135.                 legs="Gende. Spats +1",
  136.                 feet="Rubeus Boots"}
  137.                
  138.                
  139.         --Midcast Haste, Refresh, Flurry, Poisona, Paralyna, Blindna, Silena, Stona, Viruna
  140.         sets.haste = {
  141.                 main="Winged Wand",
  142.                 sub="Genbu's Shield",
  143.                 ammo="Incantor Stone",
  144.            
  145.                 head="Nahtirah Hat",
  146.                 neck="Orunmila's Torque",
  147.                 lear="Lifestorm Earring",
  148.                 rear="Loquac. Earring",
  149.                
  150.                 body="Goliard Saio",
  151.                 hands="Blessed Mitts +1",
  152.                 lring="Prolix Ring",
  153.                 rring="Sheltered Ring",
  154.                                                
  155.                 back="Swith Cape",
  156.                 waist="Goading Belt",
  157.                 legs="Artsieq Hose",
  158.                 feet="Chelona Boots"}
  159.        
  160.        
  161.         sets.enhancing = {
  162.                 main="Beneficus",
  163.                 sub="Genbu's Shield",
  164.                 ammo="Incantor Stone",
  165.            
  166.                 head="Umuthi Hat",
  167.                 neck="Enhancing Torque",
  168.                 lear="Lifestorm Earring",
  169.                 rear="Loquac. Earring",
  170.                
  171.                 body="Orison Bliaud +2",
  172.                 hands="Ayao's Gages",
  173.                 lring="Prolix Ring",
  174.                 rring="Sheltered Ring",
  175.                                                
  176.                 back="Merciful Cape",
  177.                 waist="Olympus Sash",
  178.                 legs="Piety Pantaloons",
  179.                 feet="Orsn. Duckbills +2"}
  180.            
  181.             sets.enhancing.barspell = set_combine(sets.enhancing, {
  182.                 head="Orison Cap +2"
  183.                 hands="Orison Mitts +2"})
  184.                
  185.             sets.enhancing.protect = set_combine(sets.enhancing, {
  186.                 feet="Piety Duckbills"})
  187.                
  188.             sets.enhancing.stoneskin = set_combine(sets.enhancing, {
  189.                 legs="Haven Hose"})
  190.                    
  191.  
  192.  
  193.        
  194.         maccspells = S{"Head Butt", "Sudden Lunge", "Geist Wall", "Blank Gaze", "Actinic Burst",
  195.                         "Sheep Song", "Yawn", "Dream Flower", "Auroral Drape", "Embalming Earth",
  196.                         "Frightful Roar"}
  197.         noswap = S{"Animating Wail", "Triumphant Roar", "Nat. Meditation", "Winds of Promy.",
  198.                     "Erratic Flutter", "Cocoon", "Battery Charge"}
  199.         skillspells = S{"Occultation"}
  200.  
  201. end
  202.  
  203. function precast(spell)
  204.  
  205.     if spell.name == "Animating Wail" then
  206.         cancel_spell()
  207.         send_command("Erratic Flutter")
  208.     end
  209.    
  210.     if spell.name == "Divine Waltz" then
  211.         cancel_spell()
  212.         send_command('input /item "Capacity Ring" <me>')
  213.     end
  214.  
  215.     if sets.precast[spell.name] then
  216.         equip(sets.precast[spell.name])
  217.  
  218.     elseif spell.type == 'WeaponSkill' then
  219.         if player.tp < 1000  then
  220.             cancel_spell()
  221.             return                    
  222.         elseif sets.ws[spell.name] then
  223.             equip(sets.ws[spell.name])
  224.         else
  225.             equip(sets.ws["Chant du Cygne"])
  226.         end    
  227.        
  228.     elseif spell.type == "BlueMagic" then
  229.         equip(sets.precast.blu)
  230.        
  231.     elseif spell.prefix == "/magic" or spell.prefix == "/ninjutsu" then
  232.         equip(sets.precast.fastcast)
  233.    
  234.     elseif spell.name == "Lunge" or spell.name == "Swipe" then
  235.         equip(sets.magical)
  236.        
  237.     elseif spell.name == "*step" or spell.name == "*flourish" then
  238.         equip({waist="Chaac Belt"})
  239.    
  240.     end
  241.    
  242.     if spell.name == "Spectral Jig" then
  243.         send_command("cancel 71")
  244.     end
  245. end
  246.  
  247.  function midcast(spell)
  248.  
  249.     if spell.type == "BlueMagic" then
  250.         if spell.element == "Physical" then
  251.             if sets.physical[spell.name] then
  252.                 equip(sets.physical, sets.physical[spell.name])
  253.             else
  254.                 equip(sets.physical)
  255.             end
  256.            
  257.         elseif spell.name == "Plenilune Embrace" or "Magic Fruit" then
  258.             equip(sets.cure)
  259.            
  260.         elseif maccspells:contains(spell.name) then
  261.             equip(sets.blumacc, sets.precast.blu)
  262.            
  263.         elseif noswap:contains(spell.name) then
  264.             equip(sets.Engaged)
  265.            
  266.         elseif skillspells:contains(spell.name) then
  267.             equip(sets.bluskill)
  268.            
  269.         else
  270.             equip(sets.magical)
  271.         end
  272.        
  273.     elseif spell.skill == "Healing Magic" then
  274.         equip(sets.cure)
  275.     end
  276.  
  277.  end
  278.  
  279. function aftercast(spell)
  280.     if player.status == "Engaged" then
  281.         equip(sets.Engaged)
  282.        
  283.     else
  284.         equip(sets.Idle)
  285.     end
  286.    
  287.     if spell.name == "Nat. Meditation" then
  288.         send_command("timers c Nat.Med 60 down")
  289.     end
  290.    
  291. end
  292.  
  293. function status_change(new,old)
  294.     if new == "Engaged" then
  295.         equip(sets.Engaged)
  296.    
  297.     elseif new == "Idle" or new == "Resting" then
  298.         equip(sets.Idle)
  299.        
  300.     elseif new == "Dead" or "Engaged Dead" then
  301.         equip(sets.dt)
  302.        
  303.     end
  304. end
  305.  
  306. function self_command(command)
  307.     if command == "normal" then
  308.         sets.Engaged = sets.tp
  309.         add_to_chat(5, "tp")
  310.    
  311.     elseif command == "dt" then
  312.         sets.Engaged = sets.dt
  313.         add_to_chat(5, "dt")
  314.        
  315.     elseif command == "acc" then
  316.         sets.Engaged = sets.acc
  317.         add_to_chat(5, "acc")
  318.        
  319.     elseif command == "bd" then
  320.         sets.Engaged = set_combine(sets.tp, {body="Iuitl Vest +1"})
  321.         add_to_chat(5, "bd")
  322.        
  323.     end
  324.    
  325.     sets.Idle = set_combine(sets.Engaged, sets.refresh)
  326.     equip(sets.Engaged)
  327. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement