Guest User

BST with 3 TP sets

a guest
Oct 11th, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.11 KB | None | 0 0
  1.    
  2.  
  3.     -------------------------------------------------------------------------------------------------------------------
  4.     -- Initialization function that defines sets and variables to be used.
  5.     -------------------------------------------------------------------------------------------------------------------
  6.      
  7.     -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
  8.      
  9.     -- Initialization function for this job file.
  10.     function get_sets()
  11.             -- Load and initialize the include file.
  12.             mote_include_version = 2
  13.             include('Mote-Include.lua')
  14.  
  15.     end
  16.      
  17.      
  18.     -- Called when this job file is unloaded (eg: job change)
  19.     function file_unload()
  20.             if binds_on_unload then
  21.                     binds_on_unload()
  22.             end
  23.            
  24.      
  25.     end
  26.      
  27.     function user_setup()
  28.                     -- Default macro set/book
  29.             set_macro_page(2, 2)
  30.      
  31.     end
  32.      
  33.     -- Define sets and vars used by this job file.
  34.     function init_gear_sets()
  35.                     --------------------------------------
  36.             -- Start defining the sets
  37.             --------------------------------------
  38.            
  39.             -- Precast Sets
  40.            
  41.             -- Precast sets to enhance JAs
  42.             sets.precast.JA['Familiar'] = {}
  43.             sets.precast.JA['Reward'] = {ammo="Pet Food Theta",head="Brave's Warbonnet",
  44.                     ear1="Ferine Earring",body="Tot. Jackcoat +1",
  45.                     legs="Totemic Trousers",feet="Ankusa Gaiters"}
  46.                            
  47.             sets.precast.JA['Call Beast'] = {hands="Ankusa Gloves"}
  48.            
  49.                    
  50.             sets.precast.JA['Charm'] = {head="Monster Helm",
  51.                     body="Ankusa Jackcoat",hands="Ankusa Gloves",
  52.                     waist="Aristo Belt",legs="Totemic Trousers",feet="Ankusa Gaiters"}
  53.      
  54.             -- Waltz set (chr and vit)
  55.             sets.precast.Waltz = {
  56.                     head="Otomi Helm",neck="Ferine Necklace",body="Tot. Jackcoat +1",hands="Tot. Gloves +1",ring2="Askelpian Ring",
  57.                     feet="Ejekamal Boots"}
  58.                    
  59.             -- Don't need any special gear for Healing Waltz.
  60.             sets.precast.Waltz['Healing Waltz'] = {}
  61.            
  62.             sets.precast.JA['Feral Howl'] = {body="Ankusa Jackcoat"}
  63.            
  64.            sets.precast.JA['Spur'] = {feet="Ferine Ocreae +2"}
  65.            
  66.             -- Weaponskill sets
  67.             -- Default set for any weaponskill that isn't any more specifically defined
  68.             sets.precast.WS = {
  69.                     head="Otomi Helm",neck="Aqua Gorget",ear1="Kuwunga Earring",ear2="Dudgeon Earring",ammo="Cheruski Needle",
  70.                     body="Phorcys Korazin",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Vehemence Ring",
  71.                     back="Atheling Mantle",waist="Snow Belt",legs="Outrider Hose",feet="Ejekamal Boots"}
  72.                    
  73.             sets.midcast.Pet.WS = {
  74.                     ammo="Demonry Core",
  75.                     neck="Ferine Necklace",
  76.                     back="Pastoralist's Mantle",
  77.                     ear1="Sabong Earring",
  78.                     ear2="Ferine Earring"}
  79.  
  80.             -- Sets to return to when not performing an action.
  81.            
  82.             -- Resting sets
  83.             sets.resting = set_combine(sets.idle, {head="Twilight Helm"})
  84.            
  85.             -- Idle sets
  86.             sets.idle = {
  87.                     head="Otomi Helm",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",ammo="Paeapua",
  88.                     body="Xaddi Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Epona's Ring",
  89.                     back="Pastoralist's Mantle",waist="Hurch'lan Sash",legs="Xaddi Cuisses",feet="Ejekamal Boots"}
  90.      
  91.                    
  92.             sets.idle.Reraise = set_combine(sets.idle, {head="Twilight Helm",body="Twilight Mail"})
  93.            
  94.  
  95.                    
  96.                    
  97.             -- Defense sets
  98.             sets.defense.PDT = {}
  99.      
  100.             sets.defense.MDT = {}
  101.      
  102.             sets.Kiting = {}
  103.      
  104.             -- Engaged sets
  105.      
  106.             -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  107.             -- sets if more refined versions aren't defined.
  108.             -- If you create a set with both offense and defense modes, the offense mode should be first.
  109.             -- EG: sets.engaged.Dagger.Accuracy.Evasion
  110.            
  111.             -- Normal melee group
  112.            
  113.             sets.engaged.PetPlayerEngaged = {
  114.                     neck="Ferine Necklace",
  115.                     back="Pastoralist's Mantle"}
  116.                    
  117.             sets.engaged.PetEngaged = {
  118.                     ammo="Demonry Core",
  119.                     neck="Ferine Necklace",
  120.                     back="Pastoralist's Mantle",
  121.                     head="Anwig Salade",
  122.                     ear1="Sabong Earring",
  123.                     ear2="Ferine Earring",
  124.                     body="Ankusa Jackcoat",
  125.                     hands="Tot. Gloves +1",
  126.                     legs="Totemic Trousers",
  127.                     feet="Totemic Gaiters"
  128.                     back="Pastoralist's Mantle"}
  129.            
  130.             sets.engaged = {
  131.                     head="Otomi Helm",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",ammo="Paeapua",
  132.                     body="Xaddi Mail",hands="Miki. Gauntlets",ring2="Oneiros Ring",ring1="Epona's Ring",
  133.                     back="Atheling Mantle",waist="Hurch'lan Sash",legs="Xaddi Cuisses",feet="Ejekamal Boots"}
  134.                    
  135.                     if buffactive["Doom"] then
  136.                             equip(sets.idle, {head="Twilight Helm",body="Twilight Mail"})
  137.                     end
  138.      
  139.     end
  140.      
  141.      
  142.     -------------------------------------------------------------------------------------------------------------------
  143.     -- Job-specific hooks that are called to process player actions at specific points in time.
  144.     -------------------------------------------------------------------------------------------------------------------
  145.      
  146.     function job_pet_midcast(spell, action, spellMap, eventArgs)
  147.             classes.CustomClass = "WS"
  148.     end
  149.      
  150.     -- Return true if we handled the aftercast work.  Otherwise it will fall back
  151.     -- to the general aftercast() code in Mote-Include.
  152.     function job_aftercast(spell, action, spellMap, eventArgs)
  153.             if spell.english == 'Fight' and not spell.interrupted then
  154.                     display_pet_status('Engaged')
  155.             end
  156.     end
  157.      
  158.     -- Called when the pet's status changes.
  159.     function job_pet_status_change(newStatus, oldStatus)
  160.             adjust_gear_sets_for_pet()
  161.     end
  162.      
  163.      
  164.     -------------------------------------------------------------------------------------------------------------------
  165.     -- User code that supplements self-commands.
  166.     -------------------------------------------------------------------------------------------------------------------
  167.      
  168.     -- Called by the 'update' self-command, for common needs.
  169.     -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  170.     function job_update(cmdParams, eventArgs)
  171.             adjust_gear_sets_for_pet()
  172.     end
  173.      
  174.     -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  175.     function display_current_job_state(eventArgs)
  176.             local defenseString = ''
  177.             if state.Defense.Active then
  178.                     local defMode = state.Defense.PhysicalMode
  179.                     if state.Defense.Type == 'Magical' then
  180.                             defMode = state.Defense.MagicalMode
  181.                     end
  182.      
  183.      
  184.      
  185.      
  186.                     defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
  187.             end
  188.      
  189.             add_to_chat(122,'Melee: '..state.OffenseMode..'/'..state.DefenseMode..', WS: '..state.WeaponskillMode..', '..defenseString..
  190.                     'Kiting: '..on_off_names[state.Kiting])
  191.      
  192.             display_pet_status()
  193.      
  194.             eventArgs.handled = true
  195.     end
  196.      
  197.     function adjust_gear_sets_for_pet()
  198.             classes.CustomIdleGroups:clear()
  199.             classes.CustomMeleeGroups:clear()
  200.      
  201.             -- If the pet is engaged, adjust potential idle and melee groups.
  202.                 if pet.isvalid and pet.status == 'Engaged' and player.in_combat then
  203.                     classes.CustomIdleGroups:append('PetPlayerEngaged')
  204.                 elseif pet.isvalid and pet.status == 'Engaged' and not player.in_combat then
  205.                     classes.CustomIdleGroups:append('PetEngaged')
  206.                 elseif pet.isvalid and pet.status == 'Idle' and player.in_combat then
  207.                     classes.CustomIdleGroups:append('Engaged')
  208.             end
  209.     end
  210.      
  211.     function display_pet_status(withStatus)
  212.             if pet.isvalid then
  213.                     local petInfoString = pet.name..': '
  214.                    
  215.                     if withStatus then
  216.                             petInfoString = petInfoString..withStatus
  217.                     else
  218.                             petInfoString = petInfoString..tostring(pet.status)
  219.                     end
  220.                    
  221.                     petInfoString = petInfoString..'  TP='..tostring(pet.tp)..'  HP%='..tostring(pet.hpp)
  222.                    
  223.                     add_to_chat(122,petInfoString)
  224.             end
  225.     end
Advertisement
Add Comment
Please, Sign In to add comment