Guest User

RUN

a guest
May 20th, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.65 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Initialization function that defines sets and variables to be used.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
  6.  
  7. -- Initialization function for this job file.
  8. function get_sets()
  9.     -- Load and initialize the include file.
  10.     include('Mote-Include.lua')
  11. end
  12.  
  13.  
  14.  
  15.  
  16.  
  17. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  18. function user_setup()
  19.     -- Options: Override default values
  20.     options.OffenseModes = {'Normal', 'Acc'}
  21.     options.DefenseModes = {'Normal', 'PDT', 'Reraise'}
  22.     options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
  23.     options.CastingModes = {'Normal'}
  24.     options.IdleModes = {'Normal'}
  25.     options.RestingModes = {'Normal'}
  26.     options.PhysicalDefenseModes = {'PDT', 'Reraise'}
  27.     options.MagicalDefenseModes = {'MDT'}
  28.  
  29.     state.Defense.PhysicalMode = 'PDT'
  30.    
  31.     -- Default macro set/book
  32.     set_macro_page(4, 4)
  33.  
  34.    
  35. end
  36.  
  37.  
  38. -- Called when this job file is unloaded (eg: job change)
  39. function file_unload()
  40.     if binds_on_unload then
  41.         binds_on_unload()
  42.     end
  43.  
  44.     send_command('unbind ^`')
  45.     send_command('unbind !-')
  46. end
  47.  
  48.  
  49. -- Define sets and vars used by this job file.
  50. function init_gear_sets()
  51.     --------------------------------------
  52.     -- Start defining the sets
  53.     --------------------------------------
  54.    
  55.     -- Precast Sets
  56.     -- Precast sets to enhance JAs
  57.     sets.precast.JA['Vallation'] = {body="Runeist Coat +1",legs="Futhark Trousers +1"}
  58.     sets.precast.JA['Swordplay'] = {hands="Futhark Mitons"}
  59.     sets.precast.JA['Gambit'] = {hands="Runeist Mitons"}
  60.     sets.precast.JA['Pflug'] = {feet="Runeist Bottes"}
  61.     sets.precast.JA['Battuta'] = {head="Futhark Bandeau +1"}
  62.     sets.precast.JA['Valiance'] = {body="Runeist Coat +1",legs="Futhark Trousers +1"}
  63.     sets.precast.JA['Vivacious Pulse'] = {head="Felistris Mask",body="Futhark Coat +1",hands="Umuthi Gloves",
  64.     legs="Osmium Cuisses",feet="Iuitl Gaiters +1",neck="Tjukurrpa Medal",ring1="Terrasoul Ring",ring2="Terrasoul Ring",ammo="Brigantia Pebble"}
  65.     sets.precast.JA['Liement'] = {body="Futhark Coat +1"}
  66.     sets.precast.JA['Elemental Sforzo'] = {body="Futhark Coat +1"}
  67.     sets.precast.JA['Lunge'] = {head="Felistris Mask",neck="Eddy Necklace",
  68.     body="Futhark Coat +1",hands="Umuthi Gloves",legs="Iuitl Tights",feet="Iuitl Gaiters +1",
  69.     back="Evasionist's Cape",ear1="Friomisi Earring",ear2="Novio Earring",ring1="Strendu Ring"}
  70.    
  71.    
  72.     -- Waltz set (chr and vit)
  73.     sets.precast.Waltz = {ammo="Sonia's Plectrum",
  74.         head="Yaoyotl Helm",
  75.         body="Otronif Harness",hands="Buremte Gloves",ring1="Spiral Ring",
  76.         back="Iximulew Cape",waist="Caudata Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"}
  77.        
  78.     -- Don't need any special gear for Healing Waltz.
  79.     sets.precast.Waltz['Healing Waltz'] = {}
  80.    
  81.     -- Precast Fastcast
  82.     sets.precast.FC = {head="Runeist Bandeau",
  83.     body="Futhark Coat +1",hands="Thaumas Gloves",ring1="Prolix Ring",
  84.     ear1="Loquacious Earring",legs="Orvail Pants +1",feet="Chelona Boots"}
  85.  
  86.        
  87.     -- Weaponskill sets
  88.     -- Default set for any weaponskill that isn't any more specifically defined
  89.     sets.precast.WS = {ammo="Thew Bomblet",
  90.         head="Whirlpool Mask",neck="Justiciar's Torque",ear1="Brutal Earring",ear2="Moonshade Earring",
  91.         body="Manibozho Jerkin",hands="Umuthi Gloves",ring1="Epona's Ring",ring2="Pyrosoul Ring",
  92.         back="Atheling Mantle",waist="Caudata Belt",legs="Ighwa Trousers",feet="Manibozho Boots"}
  93.     sets.precast.WS.Acc = set_combine(sets.precast.WS, {back="Evasionist's Cape"})
  94.  
  95.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  96.     sets.precast.WS['Resolution'] = set_combine(sets.precast.WS, {neck="Soil Gorget"})
  97.     sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS.Acc, {neck="Soil Gorget",
  98.     waist="Anguinus Belt",head="Whirlpool Mask",hands="Umuthi Gloves",body="Manibozho Jerkin",
  99.     ammo="Honed Tathlum",back="Evasionist's Cape"})
  100.    
  101.  
  102.  
  103.     -- Midcast Sets
  104.     sets.midcast.FastRecast = {
  105.         head="Runeist Bandeau",
  106.         body="Futhark Coat +1",hands="Runeist Mitons",
  107.         legs="Igwha Trousers",feet="Chelona Boots",waist="Goading Belt",
  108.         ring1="Prolix Ring",ear1="Loquacious Earring"}
  109.        
  110.  
  111.     sets.midcast['Enhancing Magic'] = {hands="Runeist Mitons",legs="Futhark Trousers +1"}
  112.    
  113.     sets.midcast.Phalanx = {hands="Futhark Mitons",head="Futhark Bandeau +1",legs="Futhark Trousers +1"}
  114.    
  115.     sets.midcast.Regen = {head="Runeist Bandeau",legs="Futhark Trousers +1"}
  116.    
  117.     sets.midcast.Refresh = {legs="Futhark Trousers +1"}
  118.    
  119.  
  120.    
  121.     -- Sets to return to when not performing an action.
  122.    
  123.     -- Resting sets
  124.     sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
  125.    
  126.  
  127.     -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  128.     sets.idle.Town = {main="Aettir", sub="Bloodrain Strap",ammo="Brigantia Pebble",
  129.         head="Felistris Mask",neck="Twilight Torque",ear1="Sanare Earring",ear2="Moonshade Earring",
  130.         body="Futhark Coat +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Dark Ring",
  131.         back="Evasionist's Cape",waist="Chaac Belt",legs="Ighwa Trousers",feet="Iuitl Gaiters +1"}
  132.    
  133.     sets.idle.Field = {ammo="Brigantia Pebble",
  134.         head="Futhark Bandeau +1",neck="Wiglen Gorget",ear1="Sanare Earring",ear2="Mujin Stud",
  135.         body="Runeist Coat +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Sheltered Ring",
  136.         back="Mollusca Mantle",waist="Flume Belt",legs="Ighwa Trousers",feet="Iuitl Gaiters +1"}
  137.     sets.idle.Weak = {
  138.         head="Futhark Bandeau +1",neck="Twilight Torque",ear1="Sanare Earring",ear2="Mujin Stud",
  139.         body="Runeist Coat +1",hands="Buremte Gloves",ring1="Defending Ring",ring2="Paguroidea Ring",
  140.         back="Mollusca Mantle",waist="Flume Belt",legs="Ighwa Trousers",feet="Iuitl Gaiters +1"}
  141.    
  142.     -- Defense sets
  143.     sets.defense.PDT = {ammo="Brigantia Pebble",sub="Tzacab Grip",
  144.         head="Futhark Bandeau +1",neck="Twilight Torque",ear1="Sanare Earring",ear2="Mujin Stud",
  145.         body="Futhark Coat +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Dark Ring",
  146.         back="Mollusca Mantle",waist="Flume Belt",legs="Osmium Cuisses",feet="Iuitl Gaiters +1"}
  147.  
  148.  
  149.     sets.defense.MDT = {ammo="Demonry Stone",sub="Tzacab Grip",
  150.         head="Futhark Bandeau +1",neck="Twilight Torque",ear1="Sanare Earring",ear2="Mujin Stud",
  151.         body="Futhark Coat +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Dark Ring",
  152.         back="Mollusca Mantle",waist="Flume Belt",legs="Ighwa Trousers",feet="Iuitl Gaiters +1"}
  153.  
  154.     sets.Kiting = {feet="Danzo Sune-ate"}
  155.  
  156.     sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
  157.  
  158.     -- Engaged sets
  159.  
  160.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  161.     -- sets if more refined versions aren't defined.
  162.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  163.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  164.    
  165.     -- Normal melee group
  166.     -- Delay 450 GK, 25 Save TP => 65 Store TP for a 5-hit (25 Store TP in gear)
  167.     sets.engaged = {ammo="Hagneia Stone",sub="Bloodrain Strap",
  168.         head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  169.         body="Thaumas Coat",hands="Umuthi Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
  170.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Osmium Cuisses",feet="Manibozho Boots"}
  171.     sets.engaged.Acc = {ammo="Honed Tathlum",
  172.         head="Whirlpool Mask",neck="Iqabi Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  173.         body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Patricius Ring",ring2="Epona's Ring",
  174.         back="Evasionist's Cape",waist="Anguinus Belt",legs="Manibozho Brais",feet="Manibozho Boots"}
  175.     sets.engaged.PDT = {ammo="Brigantia Pebble",
  176.         head="Futhark Bandeu +1",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  177.         body="Futhark Coat +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Dark Ring",
  178.         back="Mollusca Mantle",waist="Flume Belt",legs="Osmium Cuisses",feet="Iuitl Gaiters +1"}
  179.  
  180.        
  181.         end
  182.    
  183.  
  184.  
  185.  
  186. -------------------------------------------------------------------------------------------------------------------
  187. -- Job-specific hooks that are called to process player actions at specific points in time.
  188. -------------------------------------------------------------------------------------------------------------------
  189.  
  190. --
  191. if buffactive['Reive Mark'] and player.hpp <= 50 then
  192.     equip({neck="Adoulin's Refuge"})
  193. end
  194.  
  195.  
  196.  
  197.  
  198. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  199. function job_midcast(spell, action, spellMap, eventArgs)
  200.     if spell.action_type == 'Magic' then
  201.         -- Default base equipment layer of fast recast.
  202.         equip(sets.midcast.FastRecast)
  203.     end
  204. end
  205.  
  206.  
  207. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  208. function job_aftercast(spell, action, spellMap, eventArgs)
  209.     if not spell.interrupted then
  210.         if state.Buff[spell.english] ~= nil then
  211.             state.Buff[spell.english] = true
  212.         end
  213.     end
  214. end
  215.  
  216.  
  217.  
  218. -------------------------------------------------------------------------------------------------------------------
  219. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  220. -------------------------------------------------------------------------------------------------------------------
  221.  
  222. -------------------------------------------------------------------------------------------------------------------
  223. -- General hooks for other events.
  224. -------------------------------------------------------------------------------------------------------------------
  225.  
  226. -- Called when a player gains or loses a buff.
  227. -- buff == buff gained or lost
  228. -- gain == true if the buff was gained, false if it was lost.
  229. function job_buff_change(buff, gain)
  230.     if state.Buff[buff] ~= nil then
  231.         state.Buff[buff] = gain
  232.     end
  233. end
  234.  
  235.  
  236.  
  237. -------------------------------------------------------------------------------------------------------------------
  238. -- User code that supplements self-commands.
  239. -------------------------------------------------------------------------------------------------------------------
  240.  
  241.  
  242. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  243. function display_current_job_state(eventArgs)
  244.  
  245. end
  246.  
  247.  
  248. -------------------------------------------------------------------------------------------------------------------
  249. -- Utility functions specific to this job.
  250. -------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment