Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function that defines sets and variables to be used.
- -------------------------------------------------------------------------------------------------------------------
- -- Last Modified: 1/4/2014 6:07:55 PM
- -- IMPORTANT: Make sure to also get the Mote-Include.lua file to go with this.
- function get_sets()
- -- Load and initialize the include file that this depends on.
- include('Mote-Include.lua')
- init_include()
- -- Options: Override default values
- options.OffenseModes = {'Normal', 'Acc'}
- options.DefenseModes = {'Normal', 'Evasion', 'PDT'}
- options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
- options.CastingModes = {'Normal'}
- options.IdleModes = {'Normal'}
- options.RestingModes = {'Normal'}
- options.PhysicalDefenseModes = {'PDT', 'Evasion'}
- options.MagicalDefenseModes = {'MDT'}
- state.Defense.PhysicalMode = 'PDT'
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- U_Shot_Ammo = S{'Aeolus Arrow','Animikii Bullet','Crossbow Bolt'}
- DefaultGun = "Eminent Gun"
- DefaultBow = "Eminent Bow"
- DefaultXBow = "Eminent Crossbow"
- DefaultGunAmmo = {ammo="Titanium Bullet"}
- DefaultBowAmmo = {ammo="Tulfaire Arrow"}
- DefaultXBowAmmo = {ammo="Dark Adaman Bolt"}
- DefaultAmmo = DefaultBowAmmo
- ranged_ws = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Arching Arrow",
- "Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance", "Hot Shot",
- "Split Shot", "Sniper Shot", "Slug Shot", "Heavy Shot", "Detonator", "Last Stand", "Trueflight","Wildfire"}
- SoilBeltWS = S{"Numbing Shot", "Wildfire"}
- LightBeltWS = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Blast Arrow", "Arching Arrow",
- "Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance", "Hot Shot",
- "Split Shot", "Sniper Shot", "Slug Shot", "Blast Shot", "Heavy Shot", "Detonator", "Last Stand", "Trueflight"}
- LightNeckWS = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Blast Arrow", "Arching Arrow",
- "Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance", "Hot Shot",
- "Split Shot", "Sniper Shot", "Slug Shot", "Blast Shot", "Heavy Shot", "Detonator", "Last Stand", "Trueflight"}
- -- Precast Sets
- sets.precast.RangedAttack = {neck="Ocachi Gorget",ring1="K'ayres Ring",ring2="Rajas Ring",back="Libeccio Mantle",
- ear1="Volley Earring",ear2="Moonshade Earring",waist="Scout's Belt"}
- sets.precast.RangedAttack.Acc = set_combine(sets.precast.RangedAttack, {neck="Ej Necklace"})
- -- Precast sets to enhance JAs
- sets.precast.Step = {ear2="Choreia Earring"}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = set_combine(sets.precast.RangedAttack, {back="Vespid Mantle",ear1="Clearview Earring",
- neck="Ocachi Gorget",ring1="K'ayres Ring",ring2="Rajas Ring"})
- sets.precast.WS.Acc = set_combine(sets.precast.WS, {neck="Ej Necklace"})
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- -- Midcast Sets
- sets.midcast.FastRecast = {
- head="Orion Beret",ear2="Moonshade Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- -- Specific spells
- sets.midcast.Utsusemi = {
- head="Orion Beret",ear2="Moonshade Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {}
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle.Town = {main="Hurlbat", sub="Antican Axe",
- head="Orion Beret",neck="Ocachi Gorget",ear1="Volley Earring",ear2="Moonshade Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Dark Ring",
- back="Libeccio Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.idle.Field = {head="Orion Beret",neck="Ocachi Gorget",ear1="Volley Earring",ear2="Moonshade Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Dark Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.idle.Weak = {head="Orion Beret",neck="Ocachi Gorget",ear1="Volley Earring",ear2="Moonshade Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="Dark Ring",ring2="Dark Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- -- Defense sets
- sets.defense.Evasion = {
- head="Orion Beret",body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Dark Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.defense.PDT = {head="Orion Beret",neck="Twilight Torque",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="Dark Ring",ring2="Dark Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.defense.MDT = {head="Orion Beret",neck="Twilight Torque",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="Dark Ring",ring2="Dark Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.Kiting = {}
- -- Engaged sets
- -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
- -- sets if more refined versions aren't defined.
- -- If you create a set with both offense and defense modes, the offense mode should be first.
- -- EG: sets.engaged.Dagger.Accuracy.Evasion
- -- Normal melee group
- sets.engaged = {head="Orion Beret",neck="Ocachi Gorget",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Rajas Ring",
- back="Libeccio Mantle",waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.engaged.Acc = {head="Orion Beret",neck="Ocachi Gorget",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Rajas Ring",
- back="Shadow Mantle",waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.engaged.Evasion = {head="Orion Beret",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Rajas Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.engaged.Acc.Evasion = {head="Orion Beret",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="K'ayres Ring",ring2="Rajas Ring",
- back="Shadow Mantle",waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.engaged.PDT = {head="Orion Beret",neck="Twilight Torque",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="Dark Ring",ring2="Rajas Ring",
- back="Shadow Mantle",waist="Scout's Belt",legs="Nahtirah Trousers",feet="Orion Socks"}
- sets.engaged.Acc.PDT = {head="Orion Beret",neck="Twilight Torque",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Orion Jerkin +1",hands="Buremte Gloves",ring1="Dark Ring",ring2="Rajas Ring",
- back="Shadow Mantle",waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Orion Socks"}
- windower.send_command('input /macro book 20;wait .1;input /macro set 1')
- gearswap_binds_on_load()
- windower.send_command('bind ^- gs c toggle target')
- windower.send_command('bind ^= gs c cycle targetmode')
- end
- -- Called when this job file is unloaded (eg: job change)
- function file_unload()
- --spellcast_binds_on_unload()
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks that are called to process player actions at specific points in time.
- -------------------------------------------------------------------------------------------------------------------
- -- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
- function job_pretarget(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
- function job_precast(spell, action, spellMap, eventArgs)
- if spell.type:lower() == 'weaponskill' then
- if (spell.target.distance >8 and not ranged_ws[spell.name]) or (spell.target.distance >21) then
- add_to_chat(122,"Distance too great for WeaponSkill /Canceling")
- cancel_spell()
- return
- elseif state.Defense.Active then
- -- Don't gearswap for weaponskills when Defense is on.
- eventArgs.handled = true
- end
- end
- if player.equipment.range == DefaultGun then
- DefaultAmmo = DefaultGunAmmo
- elseif player.equipment.range == DefaultBow then
- DefaultAmmo = DefaultBowAmmo
- elseif player.equipment.range == DefaultXBow then
- DefaultAmmo = DefaultXBowAmmo
- end
- if U_Shot_Ammo[player.equipment.ammo] and not buffactive['unlimited shot'] or player.equipment.ammo == 'empty' then
- -- to avoid the ammo being left in, if the default ammo is not present in inventory
- add_to_chat(122,"Unlimited Shot not Active or Ammo Empty, Using Default Ammo")
- equip({ammo=empty})
- equip(DefaultAmmo)
- end
- -- Normal Ranged Attack
- if spell.name == 'Ranged' then
- equip(sets.precast.RangedAttack)
- end
- -- Job Abilities
- if spell.name == 'Spectral Jig' and buffactive.sneak then
- send_command('cancel 71')
- elseif spell.name == 'Bounty Shot' then
- equip({hands="Sylvan Glovelettes +2"})
- elseif spell.name == 'Scavenge' then
- equip({feet="Orion Socks"})
- end
- end
- -- Return a customized weaponskill mode to use for weaponskill sets.
- -- Don't return anything if you're not overriding the default value.
- function get_job_wsmode(spell, action, spellMap)
- end
- -- Run after the default precast() is done.
- -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
- function job_post_precast(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_midcast(spell, action, spellMap, eventArgs)
- if SoilBeltWS[spell.name] then
- equip({waist="Soil Belt"})
- end
- if LightBeltWS[spell.name] then
- equip({waist="Light Belt"})
- end
- if LightNeckWS[spell.name] then
- equip({neck="Light Gorget"})
- end
- end
- -- Run after the default midcast() is done.
- -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
- function job_post_midcast(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_aftercast(spell, action, spellMap, eventArgs)
- end
- -- Run after the default aftercast() is done.
- -- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
- function job_post_aftercast(spell, action, spellMap, eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- Called before the Include starts constructing melee/idle/resting sets.
- -- Can customize state or custom melee class values at this point.
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_handle_equipping_gear(status, eventArgs)
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- return idleSet
- end
- -- Modify the default melee set after it was constructed.
- function customize_melee_set(meleeSet)
- return meleeSet
- end
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when the player's status changes.
- function job_status_change(newStatus, oldStatus, eventArgs)
- --handle_equipping_gear(newStatus)
- end
- -- Called when a player gains or loses a buff.
- -- buff == buff gained or lost
- -- gain == true if the buff was gained, false if it was lost.
- function job_buff_change(buff, gain)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called for custom player commands.
- function job_self_command(cmdParams, eventArgs)
- end
- -- Called by the 'update' self-command, for common needs.
- -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
- function job_update(cmdParams, eventArgs)
- end
- -- Handle notifications of user state values being changed.
- function job_state_change(stateField, newValue)
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- function display_current_job_state(eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement