Advertisement
Vamperica

Drg

Jun 26th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.45 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.     mote_include_version = 2
  10.      
  11.     -- Load and initialize the include file.
  12.     include('Mote-Include.lua')
  13. end
  14.  
  15.  
  16. -- Setup vars that are user-independent.
  17. function job_setup()
  18. --  state.CombatForm = get_combat_form()
  19.      
  20.     state.Buff = {}
  21.   end
  22.  
  23.  
  24. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  25. function user_setup()
  26.     -- Options: Override default values
  27.     options.OffenseModes = {'Normal', 'Acc', 'Multi'}
  28.     options.DefenseModes = {'Normal', 'PDT', 'Reraise'}
  29.     options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
  30.     options.CastingModes = {'Normal'}
  31.     options.IdleModes = {'Normal'}
  32.     options.RestingModes = {'Normal'}
  33.     options.PhysicalDefenseModes = {'PDT', 'Reraise'}
  34.     options.MagicalDefenseModes = {'MDT'}
  35.  
  36.  
  37.     -- Additional local binds
  38.  
  39.     select_default_macro_book(2, 4)
  40. end
  41.  
  42.  
  43. -- Called when this job file is unloaded (eg: job change)
  44. function file_unload()
  45.     if binds_on_unload then
  46.         binds_on_unload()
  47.     end
  48. end
  49.  
  50.  
  51. -- Define sets and vars used by this job file.
  52. function init_gear_sets()
  53.     --------------------------------------
  54.     -- Start defining the sets
  55.     --------------------------------------
  56.      
  57.     -- Precast Sets
  58.     -- Precast sets to enhance JAs
  59.     sets.precast.JA.Angon =
  60.         {
  61.         ammo="Angon",
  62.         }
  63.     sets.precast.JA.Jump =
  64.         {}
  65.     sets.precast.JA['Ancient Circle'] = {}
  66.     sets.precast.JA['High Jump'] =
  67.         {}
  68.     sets.precast.JA['Soul Jump'] =
  69.         {}
  70.     sets.precast.JA['Spirit Jump'] =
  71.         {}
  72.     sets.precast.JA['Super Jump'] =
  73.         {}
  74.     sets.precast.JA['Spirit Link'] =
  75.         {}
  76.     sets.precast.JA['Call Wyvern'] = {}
  77.     sets.precast.JA['Deep Breathing'] = {}
  78.     sets.precast.JA['Spirit Surge'] = {}
  79.  
  80.      
  81.     -- Healing Breath sets
  82.     sets.HB = {}
  83.     sets.HB.Pre = {}
  84.     sets.HB.Mid = {}
  85.          
  86.     -- Waltz set (chr and vit)
  87.     sets.precast.Waltz = {}
  88.          
  89.     -- Don't need any special gear for Healing Waltz.
  90.     sets.precast.Waltz['Healing Waltz'] = {}
  91.  
  92.     sets.midcast.Breath =
  93.     set_combine(
  94.         sets.midcast.FastRecast,
  95.         {})
  96.      
  97.     -- Fast cast sets for spells
  98.      
  99.     sets.precast.FC = {}
  100.      
  101.     -- Midcast Sets
  102.     sets.midcast.FastRecast =
  103.         {}  
  104.          
  105.     -- Weaponskill sets
  106.     -- Default set for any weaponskill that isn't any more specifically defined
  107.     sets.precast.WS = {
  108.         ammo="Knobkierrie",
  109.         head="Flam. Zucchetto +2",
  110.         body="Dagon Breast.",
  111.         hands="Sulev. Gauntlets +2",
  112.         legs="Sulev. Cuisses +2",
  113.         feet="Flam. Gambieras +2",
  114.         neck="Fotia Gorget",
  115.         waist="Fotia Belt",
  116.         left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  117.         right_ear="Sherida Earring",
  118.         left_ring="Flamma Ring",
  119.         right_ring="Niqmaddu Ring",
  120.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
  121.         }
  122.      
  123.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  124.     sets.precast.WS['Stardiver'] = set_combine(sets.precast.WS, {})
  125.     sets.precast.WS['Stardiver'].Acc = set_combine(sets.precast.WS.Acc, {})
  126.     sets.precast.WS['Stardiver'].Mod = set_combine(sets.precast.WS['Stardiver'], {})
  127.  
  128.     sets.precast.WS['Drakesbane'] = set_combine(sets.precast.WS, {})
  129.     sets.precast.WS['Drakesbane'].Acc = set_combine(sets.precast.WS.Acc, {})
  130.     sets.precast.WS['Drakesbane'].Mod = set_combine(sets.precast.WS['Drakesbane'], {})
  131.  
  132.  
  133.      
  134.     -- Sets to return to when not performing an action.
  135.      
  136.     -- Resting sets
  137.     sets.resting = {}
  138.      
  139.  
  140.     -- Idle sets
  141.     sets.idle =
  142.         {
  143.         ammo="Staunch Tathlum",
  144.         head="Ynglinga Sallet",
  145.         body="Tartarus Platemail",
  146.         hands="Sulev. Gauntlets +2",
  147.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  148.         feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
  149.         neck="Loricate Torque +1",
  150.         waist="Flume Belt",
  151.         left_ear="Infused Earring",
  152.         right_ear="Sherida Earring",
  153.         left_ring="Defending Ring",
  154.         right_ring="Patricius Ring",
  155.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
  156.         }
  157.  
  158.     -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  159.     sets.idle.Town = set_combine(sets.idle, {})
  160.  
  161.     sets.idle.Field = set_combine(sets.idle, {})
  162.  
  163.     sets.idle.Weak = set_combine(sets.idle, {})
  164.      
  165.     -- Defense sets
  166.     sets.defense.PDT =
  167.         {}
  168.  
  169.     sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
  170.  
  171.     sets.defense.Reraise = set_combine(sets.defense.PDT, sets.Reraise)
  172.  
  173.     sets.defense.MDT = set_combine(sets.defense.PDT, {})
  174.  
  175.     sets.Kiting = {legs="Carmine Cuisses +1"}
  176.  
  177.     -- Engaged sets
  178.  
  179.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  180.     -- sets if more refined versions aren't defined.
  181.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  182.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  183.      
  184.     -- Normal melee group
  185.     sets.engaged =
  186.         {
  187.         ammo="Ginsen",
  188.         head="Flam. Zucchetto +2",
  189.         body="Dagon Breast.",
  190.         hands="Sulev. Gauntlets +2",
  191.         legs="Sulev. Cuisses +2",
  192.         feet="Flam. Gambieras +2",
  193.         neck="Shulmanu Collar",
  194.         waist="Ioskeha Belt +1",
  195.         left_ear="Brutal Earring",
  196.         right_ear="Sherida Earring",
  197.         left_ring="Flamma Ring",
  198.         right_ring="Niqmaddu Ring",
  199.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
  200.         }
  201.  
  202.     sets.engaged.Acc = set_combine(sets.engaged, {})
  203.     sets.engaged.Multi = set_combine(sets.engaged, {})
  204.     sets.engaged.Multi.PDT = set_combine(sets.engaged.Multi, {})
  205.     sets.engaged.Multi.Reraise = set_combine(sets.engaged.Multi, {})
  206.     sets.engaged.PDT = set_combine(sets.engaged, {})
  207.     sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {})
  208.     sets.engaged.Reraise = set_combine(sets.engaged, {})
  209.     sets.engaged.Acc.Reraise = set_combine(sets.engaged.Acc, {})
  210.          
  211.     -- Melee sets for in Adoulin, which has an extra 2% Haste from Ionis.
  212.     sets.engaged.Adoulin = set_combine(sets.engaged, {})
  213.     sets.engaged.Adoulin.Acc = set_combine(sets.engaged.Adoulin, {})
  214.     sets.engaged.Adoulin.Multi = set_combine(sets.engaged.Adoulin, {})
  215.     sets.engaged.Adoulin.Multi.PDT = set_combine(sets.engaged.Adoulin.Multi, {})
  216.     sets.engaged.Adoulin.Multi.Reraise = set_combine(sets.engaged.Adoulin.Multi, {})
  217.     sets.engaged.Adoulin.PDT = set_combine(sets.engaged.Adoulin, {})
  218.     sets.engaged.Adoulin.Acc.PDT = set_combine(sets.engaged.Adoulin.Acc, {})
  219.     sets.engaged.Adoulin.Reraise = set_combine(sets.engaged.Adoulin, {})
  220.     sets.engaged.Adoulin.Acc.Reraise = set_combine(sets.engaged.Adoulin.Acc, {})
  221.  
  222. end
  223.  
  224. -------------------------------------------------------------------------------------------------------------------
  225. -- Job-specific hooks that are called to process player actions at specific points in time.
  226. -------------------------------------------------------------------------------------------------------------------
  227.  
  228. -- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
  229. function job_pretarget(spell, action, spellMap, eventArgs)
  230.  
  231. end
  232.  
  233. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  234. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  235. function job_precast(spell, action, spellMap, eventArgs)
  236.     if spell.action_type == 'Magic' then
  237.     equip(sets.precast.FC)
  238.     end
  239. end
  240.  
  241. -- Run after the default precast() is done.
  242. -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
  243. function job_post_precast(spell, action, spellMap, eventArgs)
  244.  
  245. end
  246.  
  247.  
  248. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  249. function job_midcast(spell, action, spellMap, eventArgs)
  250.         if spell.action_type == 'Magic' then
  251.         equip(sets.midcast.FastRecast)
  252.         if player.hpp < 51 then
  253.             classes.CustomClass = "Breath" -- This would cause it to look for sets.midcast.Breath
  254.         end
  255.     end
  256. end
  257.  
  258. -- Run after the default midcast() is done.
  259. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  260. function job_post_midcast(spell, action, spellMap, eventArgs)
  261.      
  262. --  if state.DefenseMode == 'Reraise' or
  263. --      (state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
  264. --      equip(sets.Reraise)
  265. --  end
  266. end
  267.  
  268. -- Runs when a pet initiates an action.
  269. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  270. function job_pet_midcast(spell, action, spellMap, eventArgs)
  271. if spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' then
  272.         equip(sets.HB.Mid)
  273.     end
  274. end
  275.  
  276. -- Run after the default pet midcast() is done.
  277. -- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
  278. function job_pet_post_midcast(spell, action, spellMap, eventArgs)
  279.      
  280. end
  281.  
  282. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  283. --function job_aftercast(spell, action, spellMap, eventArgs)
  284. --if state.DefenseMode == 'Reraise' or
  285.         --(state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
  286.     --end
  287. --end
  288.  
  289. -- Run after the default aftercast() is done.
  290. -- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
  291. function job_post_aftercast(spell, action, spellMap, eventArgs)
  292.  
  293. end
  294.  
  295. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  296. function job_pet_aftercast(spell, action, spellMap, eventArgs)
  297.  
  298. end
  299.  
  300. -- Run after the default pet aftercast() is done.
  301. -- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
  302. function job_pet_post_aftercast(spell, action, spellMap, eventArgs)
  303.  
  304. end
  305.  
  306.  
  307. -------------------------------------------------------------------------------------------------------------------
  308. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  309. -------------------------------------------------------------------------------------------------------------------
  310.  
  311. -- Called before the Include starts constructing melee/idle/resting sets.
  312. -- Can customize state or custom melee class values at this point.
  313. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  314. function job_handle_equipping_gear(status, eventArgs)
  315.  
  316. end
  317.  
  318. -- Return a customized weaponskill mode to use for weaponskill sets.
  319. -- Don't return anything if you're not overriding the default value.
  320. function get_custom_wsmode(spell, action, spellMap)
  321.  
  322. end
  323.  
  324. -- Modify the default idle set after it was constructed.
  325. function customize_idle_set(idleSet)
  326.     return idleSet
  327. end
  328.  
  329. -- Modify the default melee set after it was constructed.
  330. function customize_melee_set(meleeSet)
  331.     return meleeSet
  332. end
  333.  
  334. -------------------------------------------------------------------------------------------------------------------
  335. -- General hooks for other events.
  336. -------------------------------------------------------------------------------------------------------------------
  337.  
  338. -- Called when the player's status changes.
  339. function job_status_change(newStatus, oldStatus, eventArgs)
  340.  
  341. end
  342.  
  343. -- Called when the player's pet's status changes.
  344. function job_pet_status_change(newStatus, oldStatus, eventArgs)
  345.  
  346. end
  347.  
  348. -- Called when a player gains or loses a buff.
  349. -- buff == buff gained or lost
  350. -- gain == true if the buff was gained, false if it was lost.
  351. function job_buff_change(buff, gain)
  352.  
  353. end
  354.  
  355. function job_update(cmdParams, eventArgs)
  356.     --state.CombatForm = get_combat_form()
  357. end
  358. -------------------------------------------------------------------------------------------------------------------
  359. -- User code that supplements self-commands.
  360. -------------------------------------------------------------------------------------------------------------------
  361.  
  362. -- Called for custom player commands.
  363. function job_self_command(cmdParams, eventArgs)
  364.  
  365. end
  366.  
  367. --function get_combat_form()
  368. --  if areas.Adoulin:contains(world.area) and buffactive.ionis then
  369. --      return 'Adoulin'
  370. --  end
  371. --end
  372.  
  373. -- Called by the 'update' self-command, for common needs.
  374. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  375. function job_update(cmdParams, eventArgs)
  376.     classes.CustomMeleeGroups:clear()
  377.     if areas.Adoulin:contains(world.area) and buffactive.ionis then
  378.         classes.CustomMeleeGroups:append('Adoulin')
  379.     end
  380. end
  381.  
  382. -- Job-specific toggles.
  383. function job_toggle(field)
  384.  
  385. end
  386.  
  387. -- Request job-specific mode lists.
  388. -- Return the list, and the current value for the requested field.
  389. function job_get_mode_list(field)
  390.  
  391. end
  392.  
  393. -- Set job-specific mode values.
  394. -- Return true if we recognize and set the requested field.
  395. function job_set_mode(field, val)
  396.  
  397. end
  398.  
  399. -- Handle auto-targetting based on local setup.
  400. function job_auto_change_target(spell, action, spellMap, eventArgs)
  401.  
  402. end
  403.  
  404. -- Handle notifications of user state values being changed.
  405. function job_state_change(stateField, newValue)
  406.  
  407. end
  408.  
  409. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  410. function display_current_job_state(eventArgs)
  411.  
  412. end
  413.  
  414. -------------------------------------------------------------------------------------------------------------------
  415. -- Utility functions specific to this job.
  416. -------------------------------------------------------------------------------------------------------------------
  417. function select_default_macro_book()
  418.     set_macro_page(2, 4)
  419. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement