Gearswap Help

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » General » Gearswap help
Gearswap help
 Asura.Tafari
Offline
Server: Asura
Game: FFXI
user: tafari
Posts: 34
By Asura.Tafari 2018-02-05 00:28:30
Link | Quote | Reply
 
how to remove that Cancel WS Rule if Disengaged!!

function precast(spell,action)
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot)
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(8, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
end
end
elseif spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if Attack == 'ON' then
equipSet = equipSet["ATT"]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
equipSet = equipSet["STP"]
end
if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
equipSet = set_combine(equipSet,elements.equip)
end
if buffactive.Sekkanoki then -- Equip Kasuga Kote +1 When Sekkanoki Is On --
equipSet = set_combine(equipSet,{hands="Kasuga Kote +1"})
end
if buffactive.Sengikori then -- Equip Kas. Sune-Ate +1 When Sengikori Is On --
equipSet = set_combine(equipSet,{feet="Kas. Sune-Ate +1"})
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if TypeIndex == 1 and spell.english == "Tachi: Fudo" then
if player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure) then
if world.time <= (7*60) or world.time >= (17*60) then
if buffactive["Aftermath: Lv.3"] then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1",ear2="Lugra Earring"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 & Lugra Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
end
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
elseif buffactive["Aftermath: Lv.3"] then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Equip Lugra Earring +1 Instead of Brutal Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear2="Vulcan's Pearl"}) -- Equip Vulcan's Pearl Instead of Brutal Earring During AM3 --
end
end
end
if TypeIndex == 1 and (spell.english == "Tachi: Shoha" or spell.english == "Tachi: Kasha") and (player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure)) then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
end
if TypeIndex == 1 and spell.english == "Tachi: Rana" and (world.time <= (7*60) or world.time >= (17*60)) then -- Equip Lugra Earring +1 From Dusk To Dawn --
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.action_type == 'Magic' then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
end
end

thanks in advance!
 Valefor.Madranta
Offline
Server: Valefor
Game: FFXI
user: Madranta
Posts: 89
By Valefor.Madranta 2018-02-05 01:43:45
Link | Quote | Reply
 
Code
function precast(spell,action)
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot)
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(8, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
end
end
elseif spell.type == "WeaponSkill" then
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if Attack == 'ON' then
equipSet = equipSet["ATT"]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
equipSet = equipSet["STP"]
end
if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
equipSet = set_combine(equipSet,elements.equip)
end
if buffactive.Sekkanoki then -- Equip Kasuga Kote +1 When Sekkanoki Is On --
equipSet = set_combine(equipSet,{hands="Kasuga Kote +1"})
end
if buffactive.Sengikori then -- Equip Kas. Sune-Ate +1 When Sengikori Is On --
equipSet = set_combine(equipSet,{feet="Kas. Sune-Ate +1"})
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if TypeIndex == 1 and spell.english == "Tachi: Fudo" then
if player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure) then
if world.time <= (7*60) or world.time >= (17*60) then
if buffactive["Aftermath: Lv.3"] then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1",ear2="Lugra Earring"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 & Lugra Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
end
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
elseif buffactive["Aftermath: Lv.3"] then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Equip Lugra Earring +1 Instead of Brutal Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear2="Vulcan's Pearl"}) -- Equip Vulcan's Pearl Instead of Brutal Earring During AM3 --
end
end
end
if TypeIndex == 1 and (spell.english == "Tachi: Shoha" or spell.english == "Tachi: Kasha") and (player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure)) then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
end
if TypeIndex == 1 and spell.english == "Tachi: Rana" and (world.time <= (7*60) or world.time >= (17*60)) then -- Equip Lugra Earring +1 From Dusk To Dawn --
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
end
equip(equipSet)
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.action_type == 'Magic' then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
end
end


I think this should work. In the future try click the Code button with <> symbols before pasting your code. That way it'll look how I pasted here.
[+]
 Asura.Tafari
Offline
Server: Asura
Game: FFXI
user: tafari
Posts: 34
By Asura.Tafari 2018-02-05 01:48:17
Link | Quote | Reply
 
ok i will and thank you it works!!!
 Asura.Tafari
Offline
Server: Asura
Game: FFXI
user: tafari
Posts: 34
By Asura.Tafari 2018-02-05 03:12:09
Link | Quote | Reply
 
i would love to know how to change it myself but i don't know how u did; ;
can u explain or change my cor Lua ?
thank you !!!
Code
<function precast(spell,action)
        if spell.action_type == 'Ranged Attack' or spell.type == "WeaponSkill" then
                if player.equipment.ammo == "Animikii Bullet" then -- Cancel Ranged Attack or WS If You Have Animikii Bullet Equipped --
                        cancel_spell()
                        add_to_chat(123, spell.name .. ' Canceled: [Animikii Bullet Equipped!]')
                        return
                else
                        local check_ammo
                        local check_ammo_count = 1
                        if spell.action_type == 'Ranged Attack' then
                                check_ammo = player.equipment.ammo
                                if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
                                        add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
                                        cancel_spell()
                                        return
                                else
                                        equip(sets.Preshot,(buffactive["Triple Shot"] and {body="Chasseur's Frac +1"} or {}))
                                        if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
                                                add_to_chat(8, '***** [Low Ammo Warning!] *****')
                                                warning = true
                                        elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
                                                warning = false
                                        end
                                end
                        elseif spell.type == "WeaponSkill" then
                                if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
                                        cancel_spell()
                                        add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
                                        return
                                else
                                        equipSet = sets.WS
                                        if equipSet[spell.english] then
                                                equipSet = equipSet[spell.english]
                                        end
                                        if equipSet[AccArray[AccIndex]] then
                                                equipSet = equipSet[AccArray[AccIndex]]
                                        end
                                        if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
                                                equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
                                        end
                                        if spell.english == "Last Stand" and (player.tp > 2990 or buffactive.Sekkanoki) then -- Equip Altdorf's Earring and Wilhelm's Earring When You Have 3000 TP or Sekkanoki For Last Stand --
                                                equipSet = set_combine(equipSet,{ear1="Altdorf's Earring",ear2="Wilhelm's Earring"})
                                        end
                                        equip(equipSet)
                                end
                        end
                end
        elseif spell.type == "JobAbility" then
                if sets.JA[spell.english] then
                        equip(sets.JA[spell.english])
                        if spell.english == "Snake Eye" then -- Auto Double-Up After You Use Snake Eye --
                                send_command('@wait 1;input /ja Double-Up <me>')
                        end
                end
        elseif spell.type == "CorsairRoll" or spell.english == "Double-Up" then
                equip(sets.Rolls)
                if spell.english == "Tactician's Roll" then -- Change Tactician's Roll Equipment Here --
                        equip({body="Chasseur's Frac +1"})
                elseif spell.english == "Caster's Roll" then -- Change Caster's Roll Equipment Here --
                        equip({legs="Chas. Culottes +1"})
                elseif spell.english == "Courser's Roll" then -- Change Courser's Roll Equipment Here --
                        equip({feet="Chass. Bottes +1"})
                elseif spell.english == "Blitzer's Roll" then -- Change Blitzer's Roll Equipment Here --
                        equip({head="Chass. Tricorne +1"})
                elseif spell.english == "Allies' Roll" then -- Change Allies' Roll Equipment Here --
                        equip({hands="Chasseur's Gants +1"})
                end
        elseif spell.type == "CorsairShot" then
                equipSet = sets.QD
                if ACC_Shots:contains(spell.english) then
                        equipSet = sets.QD.HighACC
                else
                        if equipSet[AccArray[AccIndex]] then
                                equipSet = equipSet[AccArray[AccIndex]]
                        end
                        if not ACC_Shots:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Unlock Elemental Obi --
                                equipSet = set_combine(equipSet,sets.Obi[spell.element])
                        end
                end
                equip(equipSet)
        elseif spell.action_type == 'Magic' then
                if spell.english == 'Utsusemi: Ni' then
                        if buffactive['Copy Image (3)'] then
                                cancel_spell()
                                add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
                                return
                        else
                                equip(sets.Precast.FastCast)
                        end
                else
                        equip(sets.Precast.FastCast)
                end
        elseif spell.type == "Waltz" then
                refine_waltz(spell,action)
                equip(sets.Waltz)
        elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
                cast_delay(0.2)
                send_command('cancel Sneak')
        end
end>
 Asura.Tafari
Offline
Server: Asura
Game: FFXI
user: tafari
Posts: 34
By Asura.Tafari 2018-02-05 03:21:39
Link | Quote | Reply
 
Managed to change it w/o problems^^
thanks you
 Valefor.Madranta
Offline
Server: Valefor
Game: FFXI
user: Madranta
Posts: 89
By Valefor.Madranta 2018-02-05 06:21:31
Link | Quote | Reply
 
Glad to hear you were successful in changing your COR lua. Keep at it and don't be afraid to try making changes on your own and you'll learn this stuff in time.
Log in to post.