AM3 And Gearswap

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » General » AM3 and Gearswap
AM3 and Gearswap
 Ragnarok.Alexhander
Offline
サーバ: Ragnarok
Game: FFXI
Posts: 92
By Ragnarok.Alexhander 2016-09-25 05:14:40  
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------

-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- If you want add breath equip after ws add this to line 700 "or spell.english == 'Flame Breath' or spell.english == 'Frost Breath' or spell.english == 'Sand Breath'  or spell.english == 'Hydro Breath' or spell.english == 'Gust Breath ' or spell.english == 'Lightning Breath' then"
-- However it kill your acc and haste so i suggest to keep breath equip just for Smiting Breath

-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end


-- Setup vars that are user-independent.
function job_setup()
get_combat_form()
include('Mote-TreasureHunter')
state.TreasureMode:set('None')

state.CapacityMode = M(false, 'Capacity Point Mantle')

-- list of weaponskills that make better use of otomi helm in low acc situations
wsList = S{'Drakesbane'}

state.Buff = {}
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
end


-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc', 'Trishula', 'TrishulaSC', 'THfulltime', 'RyuSC')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc', 'Trishula', 'Trishula SC', 'RyuSC')


war_sj = player.sub_job == 'WAR' or false

select_default_macro_book(1, 16)
send_command('bind != gs c toggle CapacityMode')
send_command('bind ^= gs c cycle treasuremode')
send_command('bind ^[ input /lockstyle on')
send_command('bind ![ input /lockstyle off')
end


-- Called when this job file is unloaded (eg: job change)
function file_unload()
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind ^=')
send_command('unbind !=')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------

-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA.Angon = {ammo="Angon",hands="Pteroslaver Finger Gauntlets +1",ear1="Dragoon's Earring"}
sets.CapacityMantle = {back="mecistopins Mantle"}
sets.WSDayBonus = { head="Gavialis Helm" }

sets.TreasureHunter = {ammo="Amar Cluster",
    head={ name="Valorous Mask", augments={'Pet: AGI+1','Accuracy+25','"Treasure Hunter"+1','Mag. Acc.+6 "Mag.Atk.Bns."+6',}}, --1
    body={ name="Valorous Mail", augments={'Accuracy+22','Crit.hit rate+1','STR+15','Attack+2',}}, 
    hands={ name="Valorous Mitts", augments={'INT+6','DEX+7','"Treasure Hunter"+2','Mag. Acc.+2 "Mag.Atk.Bns."+2',}}, --2
    legs={ name="Valor. Hose", augments={'"Occult Acumen"+4','"Mag.Atk.Bns."+5','"Treasure Hunter"+2',}}, --2
    feet={ name="Valorous Greaves", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','CHR+7','"Treasure Hunter"+2','Mag. Acc.+5 "Mag.Atk.Bns."+5',}}, --2
    neck="Combatant's Torque",
    waist="Chaac Belt", --1
    left_ear="Digni. Earring",
    right_ear="Telos Earring",
    left_ring="Ramuh Ring +1",
    right_ring="Gorney Ring", --1
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},--TH tot 9
}

sets.precast.JA.Provoke = { --51 enmity
    ammo="Staunch Tathlum",
    head="Loess Barbuta +1", --14
    body="Emet Harness +1", --10
    hands="Sulev. Gauntlets +1",
    legs="Sulevi. Cuisses +1",
    feet={ name="Amm Greaves", augments={'HP+20','VIT+10','Damage taken-1%',}},
    neck="Unmoving Collar +1", --10
    waist="Goading Belt", --3
    left_ear="cryptic earring",
    right_ear="Friomisi Earring", --2
    left_ring="Eihwaz Ring", --5
    right_ring="Petrov Ring", --4
    back="Impassive Mantle", --3
}

sets.precast.JA.Jump = { --15% spirit link, 10% /war tot 91% 1104 acc +50 (fuori escha) TP Return 344 DA proc
	ammo="vanir battery",--1
    head={ name="Valorous Mask", augments={'Accuracy+17 Attack+17','"Dbl.Atk."+4','STR+2','Attack+12',}},
    body={ name="Emicho Haubert", augments={'HP+50','DEX+10','Accuracy+15',}},--4
    hands="Sulev. Gauntlets +1", --5
    legs="Sulevi. Cuisses +1",
    feet="Maenadic Gambieras", --5
    neck="Ganesha's Mala",
    waist="Ioskeha Belt", --8
    left_ear="Cessance Earring", --3
    right_ear="Brutal Earring", --5
    left_ring="Petrov Ring", --1
    right_ring="Hetairoi Ring",
	back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
}

sets.precast.JA['High Jump'] = { --15% spirit link, 10% /war tot 91% 1104 acc +50 (fuori escha) TP Return 344
 	ammo="vanir battery",
    head={ name="Valorous Mask", augments={'Accuracy+17 Attack+17','"Dbl.Atk."+4','STR+2','Attack+12',}},
    body={ name="Emicho Haubert", augments={'HP+50','DEX+10','Accuracy+15',}},--4
    hands="Sulev. Gauntlets +1", --5
    legs="Sulevi. Cuisses +1",
    feet="Maenadic Gambieras", --5
    neck="Ganesha's Mala",
    waist="Ioskeha Belt", --8
    left_ear="Cessance Earring", --3
    right_ear="Brutal Earring", --5
    left_ring="Petrov Ring", --1
    right_ring="Hetairoi Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
}
sets.precast.JA['Soul Jump'] = set_combine(sets.precast.JA.Jump, { --DA: 15% Spirit Link, 10% /war Tot 65%  TP return = 1512 DA proc, 756 no proc 1132 acc
	ammo="Ginsen",
    head="Sulevia's Mask +1",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet={ name="Valorous Greaves", augments={'Accuracy+17 Attack+17','"Store TP"+3','DEX+5','Accuracy+15','Attack+15',}},
    neck="lissome necklace", --1
    waist="Kentarch Belt +1", --3
    left_ear="Cessance Earring", --3
    right_ear="telos Earring", --1
    left_ring="Petrov Ring", --1
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
	})
	
sets.precast.JA['Spirit Jump'] = set_combine(sets.precast.JA.Jump, { --1109 acc 50%DA tp retur DA proc= 1030, normal 573 
    ammo="Ginsen",
    head="Sulevia's Mask +1",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet="Pelt. Schyn. +1",
    neck="Ganesha's Mala",
    waist="Windbuffet Belt +1",
    left_ear="Cessance Earring",
    right_ear="Telos Earring",
    left_ring="Petrov Ring",
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
	})
		
sets.precast.SpiritJumpAM3 ={
    ammo="Ginsen",
    head="valorous Mask",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet="Pelt. Schyn. +1",
    neck="Ganesha's Mala",
    waist="Windbuffet Belt +1",
    left_ear="Cessance Earring",
    right_ear="Telos Earring",
    left_ring="Petrov Ring",
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
	}
	
	
sets.precast.JA['Super Jump'] = sets.precast.JA.Jump

-------------------------------------------------------------------------------------------------------------------
-- 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)
if spell.english == "Spirit Jump" then
if not pet.isvalid then
cancel_spell()
send_command('Jump')
end
elseif spell.english == "Soul Jump" then
if not pet.isvalid then
cancel_spell()
send_command("High Jump")
end
end
end

--AM3 For Ryunohige
function buff_change(buff,gain)
    if player.equipment.main == "Ryunohige" and buff == "Aftermath: Lv.3" then
        if gain then
        MythicAM3 = true
        else
        MythicAM3 = false
        end
    end
end

--Jump in AM3
function job_pretarget(spell, action, spellMap, eventArgs)
if spell.english == "Spirit Jump" then
    if MythicAM3 then
        equip(sets.precast.SpiritJumpAM3)
    else
        equip(sets.precast.JA['Spirit Jump'])
		end
	end
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)
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)
if player.hpp < 51 then
classes.CustomClass = "Breath"
end

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 spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
if player.hpp < 51 then
classes.CustomClass = "Breath"
end
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

function job_pet_precast(spell, action, spellMap, eventArgs)
end
-- Runs when a pet initiates an action.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_midcast(spell, action, spellMap, eventArgs)
if spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' then
equip(sets.HB)
end
if spell.english:startswith('Smiting Breath') then
equip(sets.Breath)
end
end


-- Run after the default pet midcast() is done.
-- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
function job_pet_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)
if state.HybridMode.value == 'Reraise' or
(state.HybridMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
equip(sets.Reraise)
end
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

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_aftercast(spell, action, spellMap, eventArgs)

end

-- Run after the default pet aftercast() is done.
-- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
function job_pet_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

-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, action, spellMap)

end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.hpp < 90 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
return meleeSet
end

-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------

-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)

end

-- Called when the player's pet's status changes.
function job_pet_status_change(newStatus, oldStatus, eventArgs)

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)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
else
if not midaction() then
handle_equipping_gear(player.status)
end
end
end

function job_update(cmdParams, eventArgs)
war_sj = player.sub_job == 'WAR' or false
classes.CustomMeleeGroups:clear()
th_update(cmdParams, eventArgs)
get_combat_form()
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)

end

function get_combat_form()
--if areas.Adoulin:contains(world.area) and buffactive.ionis then
-- state.CombatForm:set('Adoulin')
--end

if sam_sj then
state.CombatForm= set_combine(sets.engaged, {

})
else
state.CombatForm:reset()
end
end


-- Job-specific toggles.
function job_toggle(field)

end

-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)

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.
-------------------------------------------------------------------------------------------------------------------
-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
if state.Buff[buff_name] then
equip(sets.buff[buff_name] or {})
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
eventArgs.handled = true
end
end
-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
if category == 2 or -- any ranged attack
--category == 4 or -- any magic action
(category == 3 and param == 30) or -- Aeolian Edge
(category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
then return true
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WAR' then
set_macro_page(1, 10)
elseif player.sub_job == 'SAM' then
set_macro_page(10, 10)
else
set_macro_page(1, 10)
end
end


Hello Guys this is my gearswap for drg (just the Jump set). I've a question: how i can let the gs check the buff AM3 and let him change equip when it is active? i got this but i tested and didn't work=
Code
--AM3 For Ryunohige
function buff_change(buff,gain)
    if player.equipment.main == "Ryunohige" and buff == "Aftermath: Lv.3" then
        if gain then
        MythicAM3 = true
        else
        MythicAM3 = false
        end
    end
end

--Jump in AM3
function job_pretarget(spell, action, spellMap, eventArgs)
if spell.english == "Spirit Jump" then
    if MythicAM3 then
        equip(sets.precast.SpiritJumpAM3)
    else
        equip(sets.precast.JA['Spirit Jump'])
		end
	end
end


something wrong? ho i can implement it?
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-09-25 05:30:55  
You should be placing the code inside your already-established job_buff_change and job_post_precast functions, respectively.
 Ragnarok.Alexhander
Offline
サーバ: Ragnarok
Game: FFXI
Posts: 92
By Ragnarok.Alexhander 2016-09-25 05:41:45  
can you write me an expamle if you don't mind please?
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-09-25 14:13:08  
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
 
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- If you want add breath equip after ws add this to line 700 "or spell.english == 'Flame Breath' or spell.english == 'Frost Breath' or spell.english == 'Sand Breath'  or spell.english == 'Hydro Breath' or spell.english == 'Gust Breath ' or spell.english == 'Lightning Breath' then"
-- However it kill your acc and haste so i suggest to keep breath equip just for Smiting Breath
 
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
 
 
-- Setup vars that are user-independent.
function job_setup()
get_combat_form()
include('Mote-TreasureHunter')
state.TreasureMode:set('None')
 
state.CapacityMode = M(false, 'Capacity Point Mantle')
 
-- list of weaponskills that make better use of otomi helm in low acc situations
wsList = S{'Drakesbane'}
 
state.Buff = {}
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
end
 
 
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc', 'Trishula', 'TrishulaSC', 'THfulltime', 'RyuSC')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc', 'Trishula', 'Trishula SC', 'RyuSC')
 
 
war_sj = player.sub_job == 'WAR' or false
 
select_default_macro_book(1, 16)
send_command('bind != gs c toggle CapacityMode')
send_command('bind ^= gs c cycle treasuremode')
send_command('bind ^[ input /lockstyle on')
send_command('bind ![ input /lockstyle off')
end
 
 
-- Called when this job file is unloaded (eg: job change)
function file_unload()
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind ^=')
send_command('unbind !=')
end
 
 
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
 
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA.Angon = {ammo="Angon",hands="Pteroslaver Finger Gauntlets +1",ear1="Dragoon's Earring"}
sets.CapacityMantle = {back="mecistopins Mantle"}
sets.WSDayBonus = { head="Gavialis Helm" }
 
sets.TreasureHunter = {ammo="Amar Cluster",
    head={ name="Valorous Mask", augments={'Pet: AGI+1','Accuracy+25','"Treasure Hunter"+1','Mag. Acc.+6 "Mag.Atk.Bns."+6',}}, --1
    body={ name="Valorous Mail", augments={'Accuracy+22','Crit.hit rate+1','STR+15','Attack+2',}}, 
    hands={ name="Valorous Mitts", augments={'INT+6','DEX+7','"Treasure Hunter"+2','Mag. Acc.+2 "Mag.Atk.Bns."+2',}}, --2
    legs={ name="Valor. Hose", augments={'"Occult Acumen"+4','"Mag.Atk.Bns."+5','"Treasure Hunter"+2',}}, --2
    feet={ name="Valorous Greaves", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','CHR+7','"Treasure Hunter"+2','Mag. Acc.+5 "Mag.Atk.Bns."+5',}}, --2
    neck="Combatant's Torque",
    waist="Chaac Belt", --1
    left_ear="Digni. Earring",
    right_ear="Telos Earring",
    left_ring="Ramuh Ring +1",
    right_ring="Gorney Ring", --1
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},--TH tot 9
}
 
sets.precast.JA.Provoke = { --51 enmity
    ammo="Staunch Tathlum",
    head="Loess Barbuta +1", --14
    body="Emet Harness +1", --10
    hands="Sulev. Gauntlets +1",
    legs="Sulevi. Cuisses +1",
    feet={ name="Amm Greaves", augments={'HP+20','VIT+10','Damage taken-1%',}},
    neck="Unmoving Collar +1", --10
    waist="Goading Belt", --3
    left_ear="cryptic earring",
    right_ear="Friomisi Earring", --2
    left_ring="Eihwaz Ring", --5
    right_ring="Petrov Ring", --4
    back="Impassive Mantle", --3
}
 
sets.precast.JA.Jump = { --15% spirit link, 10% /war tot 91% 1104 acc +50 (fuori escha) TP Return 344 DA proc
    ammo="vanir battery",--1
    head={ name="Valorous Mask", augments={'Accuracy+17 Attack+17','"Dbl.Atk."+4','STR+2','Attack+12',}},
    body={ name="Emicho Haubert", augments={'HP+50','DEX+10','Accuracy+15',}},--4
    hands="Sulev. Gauntlets +1", --5
    legs="Sulevi. Cuisses +1",
    feet="Maenadic Gambieras", --5
    neck="Ganesha's Mala",
    waist="Ioskeha Belt", --8
    left_ear="Cessance Earring", --3
    right_ear="Brutal Earring", --5
    left_ring="Petrov Ring", --1
    right_ring="Hetairoi Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
}
 
sets.precast.JA['High Jump'] = { --15% spirit link, 10% /war tot 91% 1104 acc +50 (fuori escha) TP Return 344
    ammo="vanir battery",
    head={ name="Valorous Mask", augments={'Accuracy+17 Attack+17','"Dbl.Atk."+4','STR+2','Attack+12',}},
    body={ name="Emicho Haubert", augments={'HP+50','DEX+10','Accuracy+15',}},--4
    hands="Sulev. Gauntlets +1", --5
    legs="Sulevi. Cuisses +1",
    feet="Maenadic Gambieras", --5
    neck="Ganesha's Mala",
    waist="Ioskeha Belt", --8
    left_ear="Cessance Earring", --3
    right_ear="Brutal Earring", --5
    left_ring="Petrov Ring", --1
    right_ring="Hetairoi Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
}
sets.precast.JA['Soul Jump'] = set_combine(sets.precast.JA.Jump, { --DA: 15% Spirit Link, 10% /war Tot 65%  TP return = 1512 DA proc, 756 no proc 1132 acc
    ammo="Ginsen",
    head="Sulevia's Mask +1",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet={ name="Valorous Greaves", augments={'Accuracy+17 Attack+17','"Store TP"+3','DEX+5','Accuracy+15','Attack+15',}},
    neck="lissome necklace", --1
    waist="Kentarch Belt +1", --3
    left_ear="Cessance Earring", --3
    right_ear="telos Earring", --1
    left_ring="Petrov Ring", --1
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}, --30
    })
     
sets.precast.JA['Spirit Jump'] = set_combine(sets.precast.JA.Jump, { --1109 acc 50%DA tp retur DA proc= 1030, normal 573 
    ammo="Ginsen",
    head="Sulevia's Mask +1",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet="Pelt. Schyn. +1",
    neck="Ganesha's Mala",
    waist="Windbuffet Belt +1",
    left_ear="Cessance Earring",
    right_ear="Telos Earring",
    left_ring="Petrov Ring",
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
    })
         
sets.precast.SpiritJumpAM3 ={
    ammo="Ginsen",
    head="valorous Mask",
    body="Pelt. Plackart +1",
    hands={ name="Acro Gauntlets", augments={'Accuracy+25','"Store TP"+6','Crit. hit damage +3%',}},
    legs={ name="Acro Breeches", augments={'Accuracy+18 Attack+18','"Store TP"+6','DEX+9',}},
    feet="Pelt. Schyn. +1",
    neck="Ganesha's Mala",
    waist="Windbuffet Belt +1",
    left_ear="Cessance Earring",
    right_ear="Telos Earring",
    left_ring="Petrov Ring",
    right_ring="Rajas Ring",
    back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
    }
     
     
sets.precast.JA['Super Jump'] = sets.precast.JA.Jump
 
-------------------------------------------------------------------------------------------------------------------
-- 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)
if spell.english == "Spirit Jump" then
if not pet.isvalid then
cancel_spell()
send_command('Jump')
end
elseif spell.english == "Soul Jump" then
if not pet.isvalid then
cancel_spell()
send_command("High Jump")
end
end
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)
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)
    if player.hpp < 51 then
        classes.CustomClass = "Breath"
    end
    if spell.english == "Spirit Jump" then
        if MythicAM3 then
            equip(sets.precast.SpiritJumpAM3)
        end
    end
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 spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
if player.hpp < 51 then
classes.CustomClass = "Breath"
end
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
 
function job_pet_precast(spell, action, spellMap, eventArgs)
end
-- Runs when a pet initiates an action.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_midcast(spell, action, spellMap, eventArgs)
if spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' then
equip(sets.HB)
end
if spell.english:startswith('Smiting Breath') then
equip(sets.Breath)
end
end
 
 
-- Run after the default pet midcast() is done.
-- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
function job_pet_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)
if state.HybridMode.value == 'Reraise' or
(state.HybridMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
equip(sets.Reraise)
end
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
 
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_aftercast(spell, action, spellMap, eventArgs)
 
end
 
-- Run after the default pet aftercast() is done.
-- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
function job_pet_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
 
-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, action, spellMap)
 
end
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.hpp < 90 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
return idleSet
end
 
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
return meleeSet
end
 
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
 
-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)
 
end
 
-- Called when the player's pet's status changes.
function job_pet_status_change(newStatus, oldStatus, eventArgs)
 
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)
    if player.equipment.main == "Ryunohige" and buff == "Aftermath: Lv.3" then
        if gain then
            MythicAM3 = true
        else
            MythicAM3 = false
        end
    end
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
    else
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end
end
 
function job_update(cmdParams, eventArgs)
war_sj = player.sub_job == 'WAR' or false
classes.CustomMeleeGroups:clear()
th_update(cmdParams, eventArgs)
get_combat_form()
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
 
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
 
end
 
function get_combat_form()
--if areas.Adoulin:contains(world.area) and buffactive.ionis then
-- state.CombatForm:set('Adoulin')
--end
 
if sam_sj then
state.CombatForm= set_combine(sets.engaged, {
 
})
else
state.CombatForm:reset()
end
end
 
 
-- Job-specific toggles.
function job_toggle(field)
 
end
 
-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
 
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.
-------------------------------------------------------------------------------------------------------------------
-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
if state.Buff[buff_name] then
equip(sets.buff[buff_name] or {})
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
eventArgs.handled = true
end
end
-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
if category == 2 or -- any ranged attack
--category == 4 or -- any magic action
(category == 3 and param == 30) or -- Aeolian Edge
(category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
then return true
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WAR' then
set_macro_page(1, 10)
elseif player.sub_job == 'SAM' then
set_macro_page(10, 10)
else
set_macro_page(1, 10)
end
end

Shouldn't need the 'else' part of the Spirit Jump code since that's what Mote should be putting you in already.
 Ragnarok.Alexhander
Offline
サーバ: Ragnarok
Game: FFXI
Posts: 92
By Ragnarok.Alexhander 2016-09-25 15:33:14  
Really Thankfull for your help Flippant ^^ it working well now!
Log in to post.