Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 134 135 136 ... 182 183 184
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-04-27 07:57:41
Link | Citer | R
 
Squinookle said: »
Hi!
Ever since adding a new augment on my Ogma's Capes gearswap stopped equipping them. Can anyone help me find out why?

New augments are added from the new ambuscade item
Code
{ name="Ogma's cape", augments={'STR+20','Accuracy+20','Attack+20','"Dbl. Atk."+10','STR+10', 'Parrying rate +1%',}},

Give this a shot for the first cape.
if you have 2 sources for a specific stat (in this case you have STR from thread and from dye) you have to put them separately.

Equipping the gear and typing 'gs export' (no quotes) into the windower console is a good way to export an entire set of gear, including augments. The exported set will show up in windower/addons/gearswap/data/export.

This will be a -very- important thing when you get to Oseem augments since he can put 1-30 attack on 'slot 1' and another 1-15 attack on 'slot 5' and there's no way to tell how much attack is from which slot other than using //gs export.

I'm not sure what's wrong with the second cape since I've never used the eva/mag.eva augment (though i have my guesses) BUT just use gs export and it will solve your problem.
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-04-27 08:16:55
Link | Citer | R
 
Narvosa said: »
Yes this would be for a WS. I am looking to equip a specific set for when the Sneak Attack buff is active. If Sneak attack is active equip X, if not use normal Rudra set. Similar to how the Climantic flourish active function is. Just have no idea how to go about plugging a SA in without breaking something x.x

Thank you in advance for your help

Literally exactly like you have climactic flourish

In job_setup() add:
Code
state.Buff['Sneak Attack'] = buffactive['sneak attack'] or false

In job_post_precast() add:
Code
if state.Buff['Sneak Attack'] then
   equip(sets.SneakAttackOrWhateverYouWannaCallThisShit)
end


Never be afraid to make a backup of your working gearswap and experiment. You can always restore back to a working copy. A good programmer shouldn't be afraid of breaking something (as long as they have a backup). There won't always be people around to help you, so learn to experiment and figure this stuff out, you'll be better off in the long run.
Offline
Posts: 11
By Narvosa 2018-04-27 08:59:53
Link | Citer | R
 
Awesome thank you for your help! I will mess with it when I can.
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-04-27 11:43:20
Link | Citer | R
 
Bahamut.Mayoyama said: »
Hey all

So after successfully adjusting a few rules before on other luas I fool-heatedly raced in blind to try make this pup lua work more how I want it to (original kine one treats whm head as a mage.. even with VE body), but now I am way in over my head and 5 hrs of bashing my head against the wall I need help please -.-

https://github.com/Mayoyama/PUP/blob/master/PUPFaulty.lua
https://github.com/Mayoyama/PUP/blob/master/Mayoyamanakata_PUP_GearFaulty.lua

So I'm trying to make it so that GS will alter my idle and engaged sets depending on the state I cycle to, but the more I did the more it broke and now it just doesn't even register my pet being idle or engaged.

PLEASE HELP!

Just took a quick glance and found the following issues. I dont play PUP nor have I made a PUP lua so im not sure on any of the pet specific stuff. That said there are a couple of general errors that are going to be causing some of your problems.

Problem #1:
Code
elseif state.AutomatonMode.current ~= 'PetRanged' then
idleSet = sets.idle.Pet.Engaged.Ranged 


The above is an example of a problem that occurs over and over in your lua. You are using ~= for your comparrisons. ~= means 'Does Not Equal'. So the above little code line is saying "If my automaton is NOT in ranged mode, use my ranged gear" which makes no sense. You want to use == for Is Equal.

So you should change that (and the other lines that do the same) to
Code
 if X == Y then 


Problem 2:

You're using customize_idle_set wrong. The documentation for customize_idle_set states that you should "Only use set_combine() to change the contents of the set." (https://github.com/Kinematics/GearSwap-Jobs/wiki/Rules)
So this is wrong:
Code
idleSet = sets.idle.Pet.Engaged
 Ragnarok.Lockfort
Offline
Serveur: Ragnarok
Game: FFXI
user: Terazuma
Posts: 252
By Ragnarok.Lockfort 2018-04-27 11:59:30
Link | Citer | R
 
hobo said: »
I have an issue with the obi rule on my corsair, probably something dumb as usual. Did I just make a simple mistake somewhere when I stole this?

Thanks in advance for any help
Code
sets.Obi = {waist="Hachirin-no-Obi"}

function job_post_precast(spell, action, spellMap, eventArgs)
    -- Equip obi if weather/day matches for WS/Quick Draw.
    if spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
        if spell.english == 'Leaden Salute' and (world.weather_element == 'Dark' or world.day_element == 'Dark') then
            equip(sets.Obi)
        elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
            equip(sets.Obi)
        elseif spell.type == 'CorsairShot' and (spell.element == world.weather_element or spell.element == world.day_element) then
            equip(sets.Obi)
        end
    end
end

Do you have a precast for your WS? Or is all you're equipping for leaden/wildfire the obi? This is mines:
Code
if (spell.name == "Leaden Salute" or spell.name == "Wildfire") and (spell.element == world.day_element or spell.element == world.weather_element) then
	equip({waist="Hachirin-no-Obi"})
end
Offline
Posts: 7
By Squinookle 2018-04-27 12:02:04
Link | Citer | R
 
Asura.Patriclis said: »
Squinookle said: »
Hi!
Ever since adding a new augment on my Ogma's Capes gearswap stopped equipping them. Can anyone help me find out why?

New augments are added from the new ambuscade item
Code
{ name="Ogma's cape", augments={'STR+20','Accuracy+20','Attack+20','"Dbl. Atk."+10','STR+10', 'Parrying rate +1%',}},

Give this a shot for the first cape.
if you have 2 sources for a specific stat (in this case you have STR from thread and from dye) you have to put them separately.

Equipping the gear and typing 'gs export' (no quotes) into the windower console is a good way to export an entire set of gear, including augments. The exported set will show up in windower/addons/gearswap/data/export.

This will be a -very- important thing when you get to Oseem augments since he can put 1-30 attack on 'slot 1' and another 1-15 attack on 'slot 5' and there's no way to tell how much attack is from which slot other than using //gs export.

I'm not sure what's wrong with the second cape since I've never used the eva/mag.eva augment (though i have my guesses) BUT just use gs export and it will solve your problem.
Thank you for the info! I will give it a try when I get home from work.
Offline
Posts: 251
By hobo 2018-04-27 13:22:10
Link | Citer | R
 
Ragnarok.Lockfort said: »
hobo said: »
I have an issue with the obi rule on my corsair, probably something dumb as usual. Did I just make a simple mistake somewhere when I stole this?

Thanks in advance for any help
Code
sets.Obi = {waist="Hachirin-no-Obi"}

function job_post_precast(spell, action, spellMap, eventArgs)
    -- Equip obi if weather/day matches for WS/Quick Draw.
    if spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
        if spell.english == 'Leaden Salute' and (world.weather_element == 'Dark' or world.day_element == 'Dark') then
            equip(sets.Obi)
        elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
            equip(sets.Obi)
        elseif spell.type == 'CorsairShot' and (spell.element == world.weather_element or spell.element == world.day_element) then
            equip(sets.Obi)
        end
    end
end

Do you have a precast for your WS? Or is all you're equipping for leaden/wildfire the obi? This is mines:
Code
if (spell.name == "Leaden Salute" or spell.name == "Wildfire") and (spell.element == world.day_element or spell.element == world.weather_element) then
	equip({waist="Hachirin-no-Obi"})
end


I have a precast for the ws, just didn't quote it. I might just have to change luas instead of fixing this mess
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2018-04-30 01:31:22
Link | Citer | R
 
This began appearing in my RUN lua after I set a few priorities. How do I fix this?

 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-04-30 08:44:06
Link | Citer | R
 
Bismarck.Speedyjim said: »
This began appearing in my RUN lua after I set a few priorities. How do I fix this?


Nobody will be able to really help you since that error could refer to 1 of a billion places in your code.

Try posting your lua (use code blocks, i.e surround the code with [ code ] [ /code ] (no spaces)) and a better description of -when- that error occurs. (ie. when you try changing into idle? when casting any spell? using a weaponskill?)

Just posting a generic-*** error message gives us nothing to go on.
Offline
Posts: 8
By Prohono 2018-04-30 08:59:51
Link | Citer | R
 
Hello, I was wondering is it possible to have a lua change macro books based on the weapon you currently have equipped?

I see in the lua there's ways to set default macro books based on subjobs, is there a way to swap based on weapon (or weapon type), so when I change from GS to Scythe mid fight, it automatically changes the Macro book? (I have separate books for scythe and GS weapon skills)

Thanks!
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-04-30 10:27:27
Link | Citer | R
 
Prohono said: »
Hello, I was wondering is it possible to have a lua change macro books based on the weapon you currently have equipped?

I see in the lua there's ways to set default macro books based on subjobs, is there a way to swap based on weapon (or weapon type), so when I change from GS to Scythe mid fight, it automatically changes the Macro book? (I have separate books for scythe and GS weapon skills)

Thanks!

So gearswap doesn't have a function (That I can find) to check when you change gear manually, so you'll have to have a button/command to update your macro book based on the equipped weapon. It's an extra step, but it's as close as I can get you.
Code
function get_sets()
	--Binds ALT + ` to send the command 'MACRO' to gearswap
	--You can change this to whatever key combination you want
	send_command('bind !` gs c MACRO')  
end

function user_unload()
	-- Removes the binding so that it doesnt break ***when you change jobs
	send_command('unbind !`')
end

function self_command(command)
	-- If gearswap gets the "MACRO" command then
	if command == "MACRO" then
		--Call the command to change macros
		ChangeMacrosBasedOnWeapon()
	end	
end

function ChangeMacrosBasedOnWeapon() 
	-- Ill explain this a bit. 
	-- Each weapon has an associated skill with it (duh) we find these values in the windower resources.
	-- This skill is not stored as a string value (ie "Greatsword Skill") but rather as a number (ie "4").
	-- To figure out which number is which you need to look in the items resource file in windower (or on their github)
	-- And find the number that corrisponds to an item of that type.
	-- Basically if you want to find out what number corrisponds to scythe skill, 
	-- just open the link i have given you below, Search for a scythe from the list, and look at the number in Skill=""
	-- (I already got the numbers for scythe + greatsword for you... but if you want to expand this, thats what you
	-- need to do)
	-- Windower item resources: https://raw.githubusercontent.com/Windower/Resources/master/lua/items.lua

	if player.equipment.main['Skill'] == 7 then -- Skill 7 = Scythe
		send_command('@input /macro book 1;wait .1;input /macro set 1') --Or whatever macro book you want
	elseif player.equipment.main['Skill'] == 4 then -- Skill 4 = Greatsword
		send_command('@input /macro book 2;wait .2;input /macro set 2') --Or whatever macro book you want
	else --This is your default (i.e if you decided to pull out an earth staff or something)
		send_command('@input /macro book 2;wait .2;input /macro set 2') --Or whatever macro book you want
	end
end


Obviously, if these functions already exist in your Lua, don't overwrite them just add my code in.

I don't have access to the game right now to test this and make sure it works SO if there's a problem with this code and it doesn't work, let me know, but be absolutely sure to include your LUA file with your issue so I can make sure it's a problem with my code and not your implementation.

Cheers and happy missing.
Offline
Posts: 8
By Prohono 2018-04-30 19:59:42
Link | Citer | R
 
Awesome! Thanks so much I'll be giving it a try tonight! Weirdly enough Alt + ` is already the key I binded to GS c C17 to swap weapons! hopefully I can build your code in so they work together in one key!
Offline
Posts: 8
By Prohono 2018-04-30 20:35:17
Link | Citer | R
 
Trying the script the MACRO command doesn't seem to work, I had to delete the existing subjob default macro selection lines as that was clashing with it, and the lua loads with no errors. But whether I bind the MACRO command or type it in directly (//gs c MACRO), it doesn't seem to switch the macro books, even after I manually change the weapons. Any ideas what could be going wrong? (I have already changed the books and sets to my correct numbers)

Thanks in advance!
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2018-04-30 23:38:30
Link | Citer | R
 
Asura.Patriclis said: »
Bismarck.Speedyjim said: »
This began appearing in my RUN lua after I set a few priorities. How do I fix this?


Nobody will be able to really help you since that error could refer to 1 of a billion places in your code.

Try posting your lua (use code blocks, i.e surround the code with [ code ] [ /code ] (no spaces)) and a better description of -when- that error occurs. (ie. when you try changing into idle? when casting any spell? using a weaponskill?)

Just posting a generic-*** error message gives us nothing to go on.
Here's a less generic-*** post.
Message appears when I do a validate check. I've noticed this since I set priority swaps in certain sets. I think it may be related to my aliases. Thank you for your time.
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-01 07:44:17
Link | Citer | R
 
Prohono said: »
Trying the script the MACRO command doesn't seem to work, I had to delete the existing subjob default macro selection lines as that was clashing with it, and the lua loads with no errors. But whether I bind the MACRO command or type it in directly (//gs c MACRO), it doesn't seem to switch the macro books, even after I manually change the weapons. Any ideas what could be going wrong? (I have already changed the books and sets to my correct numbers)

Thanks in advance!

As i said in the post, you need to post your LUA.
It could be a problem with player.equipment.main['Skill']
or it could be your implementation.
But I can't know that unless I see your code. Can't just guess.

(note: My immediate guess is that 'skill' should be lower case, not capitalized.)

Edit: I need to try this when I get home. Im not sure i coded it correctly. I think I left out a step.
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-01 08:14:43
Link | Citer | R
 
Bismarck.Speedyjim said: »
Here's a less generic-*** post.

Message appears when I do a validate check. I've noticed this since I set priority swaps in certain sets. I think it may be related to my aliases. Thank you for your time.


Okay so the problem seems to be with this priority system:
head={name="Halitus Helm", priority=2}

My best guess would be that it doesn't like that priority in there for some reason. Regularly lua would allow that, but gearswap or gearswap validate may not allow you to put extra stuff in there.

Im not at my home computer, so i cant test it myself right now, but my suggestion would be to start a new lua that looks like this and validate it:
Code
function get_sets()
    sets.TP = head={name="Halitus Helm", priority=2}
end


If this validates fine, you know your priority system isn't the issue, if it breaks, you know it is, and you can't use it.
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2018-05-03 00:19:17
Link | Citer | R
 
The priority system works with lines of gear like your example above. It just for some reason bugs when there's an alias present. When I use /debugmode, it says that my "alias_piece_of_gear" didn't equip. There must be a different way to code it.
 Asura.Massacres
Offline
Serveur: Asura
Game: FFXI
user: hamany9
Posts: 28
By Asura.Massacres 2018-05-03 02:40:45
Link | Citer | R
 
Looks like gearswap is only working for Utsusemi:San,When i cast Utsusemi: Ichi or Ni gearswap doesn't work, It won't change Precast and midcast gear. Any idea why is it working fine for San and not ichi/ni?

Here's my file:
Code
-- 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.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Migawari = buffactive.migawari or false
    state.Buff.Doom = buffactive.doom or false
    state.Buff.Yonin = buffactive.Yonin or false
    state.Buff.Innin = buffactive.Innin or false
    state.Buff.Futae = buffactive.Futae or false

    determine_haste_group()
end

-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Normal', 'Acc')
    state.HybridMode:options('Normal', 'Evasion', 'PDT')
    state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
    state.CastingMode:options('Normal', 'Resistant')
    state.PhysicalDefenseMode:options('PDT', 'Evasion')

    gear.MovementFeet = {name="Danzo Sune-ate"}
    gear.DayFeet = "Danzo Sune-ate"
    gear.NightFeet = "Ninja Kyahan"

    send_command('wait 6;input /lockstyleset 98')
    
    select_movement_feet()
    select_default_macro_book(1, 3)
end




-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Precast sets
    --------------------------------------

    -- Precast sets to enhance JAs
    sets.precast.JA['Mijin Gakure'] = {legs="Mochizuki Hakama"}
    sets.precast.JA['Futae'] = {legs="Iga Tekko +2"}
    sets.precast.JA['Sange'] = {legs="Mochizuki Chainmail"}

    -- Waltz set (chr and vit)
    sets.precast.Waltz = {ammo="Sonia's Plectrum",
        head="Mummu bonnet +1",ear1="Genmei earring",ear2="Odnowa earring +1",
        body="Reiki osode",hands="Buremte Gloves",ring1="Spiral Ring",
        back="Iximulew Cape",waist="Caudata Belt",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
        -- Uk'uxkaj Cap, Daihanshi Habaki
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Set for acc on steps, since Yonin drops acc a fair bit
    sets.precast.Step = {
        head="Ryuo somen",neck="Sanctity Necklace",
        body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+24 Attack+24','Crit.hit rate+2','STR+9','Accuracy+8','Attack+15',}},ring1="Patricius Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Kentarch Belt +1",legs="Hizamaru hizayoroi +1",feet="Mummu gamashes +1"}

    sets.precast.Flourish1 = {waist="Chaac Belt"}

    -- Fast cast sets for spells
    
    sets.precast.FC = {ammo="Impatiens",
        head="Herculean helm",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
        body="",hands="Leyline Gloves",ring1="Prolix Ring",ring2="Kishar ring",
        back="Swith Cape",waist="Witful Belt",legs="",feet=""}


    sets.precast.FC.Utsusemi = {ammo="Impatiens",
        head="Herculean helm",neck="Magoraga beads",ear2="Loquacious Earring",ear1="Etiolation Earring",
        body="Mochizuki Chainmail +1",hands="Leyline Gloves",ring1="Prolix Ring",ring2="Kishar ring",
        back="Swith Cape",waist="Witful Belt",legs="",feet=""}

    -- Snapshot for ranged
    sets.precast.RA = {hands="Adhemar wristbands",legs="Adhemar kecks",feet="Adhemar gamashes"}
       
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {ammo="Seething bomblet +1",
        head="Adhemar bonnet",neck="Fotia gorget",ear1="Ishvara Earring",ear2="Brutal Earring",
        body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+24 Attack+24','Crit.hit rate+2','STR+9','Accuracy+8','Attack+15',}},ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Fotia belt",legs="Samnuha tights",
        feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.precast.WS.Acc = set_combine(sets.precast.WS, {ammo="Seething bomblet +1",hands={ name="Herculean Gloves", augments={'Accuracy+24 Attack+24','Crit.hit rate+2','STR+9','Accuracy+8','Attack+15',}},
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}})

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Blade: Jin'] = {ammo="Seething bomblet +1",
        head="Adhemar bonnet",neck="Fotia gorget",ear1="Ishvara Earring",ear2="Brutal Earring",
        body="Abnoba kaftan",hands={ name="Herculean Gloves", augments={'Accuracy+24 Attack+24','Crit.hit rate+2','STR+9','Accuracy+8','Attack+15',}},ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Fotia belt",legs="Samnuha tights",
        feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.precast.WS['Blade: Hi'] = {ammo="Seething bomblet +1",
        head="Adhemar bonnet",neck="Fotia gorget",ear1="Ishvara Earring",ear2="Brutal Earring",
        body="Abnoba kaftan",hands="Kobo kote",ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Fotia belt",legs="Samnuha tights",
        feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.precast.WS['Blade: Shun'] = {ammo="Seething bomblet +1",
        head="Adhemar bonnet",neck="Fotia gorget",ear1="Ishvara Earring",ear2="Brutal Earring",
        body="Adhemar jacket",hands="Adhemar wristbands",ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Fotia belt",legs="Samnuha tights",
        feet={ name="Herculean Boots", augments={'Attack+29','Weapon skill damage +4%','DEX+10',}}}


    sets.precast.WS['Aeolian Edge'] = {ammo="Seething bomblet +1",
        head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +1%','INT+10','Mag. Acc.+1','"Mag.Atk.Bns."+12',}},neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body={ name="Herculean Vest", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst dmg.+3%','Mag. Acc.+14','"Mag.Atk.Bns."+12',}},hands={ name="Herculean Gloves", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Crit. hit damage +2%','"Mag.Atk.Bns."+11',}},
        ring1="Acumen Ring",ring2="Dingir Ring",back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Eschan stone",
        legs={ name="Herculean Trousers", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Phys. dmg. taken -1%','STR+5','Mag. Acc.+10','"Mag.Atk.Bns."+15',}},
        feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+1','STR+9','Mag. Acc.+6','"Mag.Atk.Bns."+14',}}}

    
    --------------------------------------
    -- Midcast sets
    --------------------------------------

    sets.midcast.FastRecast = {ammo="Impatiens",
        head="Herculean helm",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
        body="",hands="Leyline Gloves",ring1="Prolix Ring",
        back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}
        
    sets.midcast.Utsusemi = {ammo="Impatiens",
        head="Herculean helm",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
        body="Mochizuki Chainmail +1",hands="Mochizuki tekko +1",ring1="Prolix Ring",
        back="Andartia's Mantle",waist="Witful Belt",legs="Lengo Pants",feet="Hattori Kyahan +1"}

    sets.midcast.ElementalNinjutsu = {ammo="Seething bomblet +1",
        head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +1%','INT+10','Mag. Acc.+1','"Mag.Atk.Bns."+12',}},neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body={ name="Herculean Vest", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst dmg.+3%','Mag. Acc.+14','"Mag.Atk.Bns."+12',}},hands="Mochizuki tekko +1",
        ring1="Acumen Ring",ring2="Dingir Ring",back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Eschan stone",
        legs={ name="Herculean Trousers", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Phys. dmg. taken -1%','STR+5','Mag. Acc.+10','"Mag.Atk.Bns."+15',}},
        feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+1','STR+9','Mag. Acc.+6','"Mag.Atk.Bns."+14',}}}

    sets.midcast.ElementalNinjutsu.Resistant = {ammo="Seething bomblet +1",
        head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +1%','INT+10','Mag. Acc.+1','"Mag.Atk.Bns."+12',}},neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body={ name="Herculean Vest", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst dmg.+3%','Mag. Acc.+14','"Mag.Atk.Bns."+12',}},hands="Mochizuki tekko +1",
        ring1="Acumen Ring",ring2="Dingir Ring",back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Eschan stone",
        legs={ name="Herculean Trousers", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Phys. dmg. taken -1%','STR+5','Mag. Acc.+10','"Mag.Atk.Bns."+15',}},
        feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+1','STR+9','Mag. Acc.+6','"Mag.Atk.Bns."+14',}}}

    sets.midcast.NinjutsuDebuff = {ammo="Seething bomblet +1",
        head={ name="Herculean Helm", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Crit. hit damage +1%','INT+10','Mag. Acc.+1','"Mag.Atk.Bns."+12',}},neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body={ name="Herculean Vest", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst dmg.+3%','Mag. Acc.+14','"Mag.Atk.Bns."+12',}},hands="Mochizuki tekko +1",
        ring1="Acumen Ring",ring2="Dingir Ring",back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},waist="Eschan stone",
        legs={ name="Herculean Trousers", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Phys. dmg. taken -1%','STR+5','Mag. Acc.+10','"Mag.Atk.Bns."+15',}},
        feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+1','STR+9','Mag. Acc.+6','"Mag.Atk.Bns."+14',}}}

    sets.midcast.NinjutsuBuff = {ammo="Impatiens",
        head="Herculean helm",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
        body="Mochizuki Chainmail +1",hands="Mochizuki tekko +1",ring1="Prolix Ring",
        back="Andartia's Mantle",waist="Witful Belt",legs="Lengo Pants",feet="Hattori Kyahan +1"}
        
    sets.midcast.RA = {
        head="Felistris Mask",neck="Ej Necklace",
        body="Hachiya Chainmail +1",hands="Hachiya Tekko",ring1="Beeline Ring",
        back="Yokaze Mantle",legs="Nahtirah Trousers",feet="Qaaxo Leggings"}
    -- Hachiya Hakama/Thurandaut Tights +1

    --------------------------------------
    -- Idle/resting/defense/etc sets
    --------------------------------------
    
    -- Resting sets
    sets.resting = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet={ name="Herculean Boots", augments={'Accuracy+2','Phys. dmg. taken -5%','Attack+11',}}}
    
    -- Idle sets
    sets.idle = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet=gear.MovementFeet}

    sets.idle.Town = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Councilor's garb",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet=gear.MovementFeet}
    
    sets.idle.Weak = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet=gear.MovementFeet}
    
    -- Defense sets
    sets.defense.Evasion = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet={ name="Herculean Boots", augments={'Accuracy+2','Phys. dmg. taken -5%','Attack+11',}}}

    sets.defense.PDT = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet={ name="Herculean Boots", augments={'Accuracy+2','Phys. dmg. taken -5%','Attack+11',}}}

    sets.defense.MDT = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Genmei Earring",ear2="Infused Earring",
        body="Hizamaru haramaki +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Patricius ring",
        back="Solemnity Cape",waist="Flume Belt",legs="Mummu kecks +1",feet={ name="Herculean Boots", augments={'Accuracy+2','Phys. dmg. taken -5%','Attack+11',}}}


    sets.Kiting = {feet=gear.MovementFeet}


    --------------------------------------
    -- 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 = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Adhemar jacket",hands="Adhemar wristbands",ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.engaged.Acc = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Adhemar jacket",hands="Adhemar wristbands",ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.engaged.Evasion = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Adhemar jacket",hands="Adhemar wristbands",ring1="Ilabrat Ring",ring2="Epona's Ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}


    sets.engaged.PDT = {ammo="Togakushi shuriken",
        head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Emet harness +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Patricius ring",
        back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},waist="Kentarch belt +1",legs="Mummu kecks +1",feet={ name="Herculean Boots", augments={'Accuracy+2','Phys. dmg. taken -5%','Attack+11',}}}




    --------------------------------------
    -- Custom buff sets
    --------------------------------------

    sets.buff.Migawari = {body="Iga Ningi +2"}
    sets.buff.Doom = {ring2="Saida Ring"}
    sets.buff.Yonin = {}
    sets.buff.Innin = {}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------

-- Run after the general 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)
    if state.Buff.Doom then
        equip(sets.buff.Doom)
    end
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 not spell.interrupted and spell.english == "Migawari: Ichi" then
        state.Buff.Migawari = true
    end
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------

-- 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 we gain or lose any haste buffs, adjust which gear set we target.
    if S{'haste','march','embrava','haste samba'}:contains(buff:lower()) then
        determine_haste_group()
        handle_equipping_gear(player.status)
    elseif state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    end
end

function job_status_change(new_status, old_status)
    if new_status == 'Idle' then
        select_movement_feet()
    end
end


-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Get custom spell maps
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == "Ninjutsu" then
        if not default_spell_map then
            if spell.target.type == 'SELF' then
                return 'NinjutsuBuff'
            else
                return 'NinjutsuDebuff'
            end
        end
    end
end


-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if state.Buff.Migawari then
        idleSet = set_combine(idleSet, sets.buff.Migawari)
    end
    if state.Buff.Doom then
        idleSet = set_combine(idleSet, sets.buff.Doom)
    end
    return idleSet
end


-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    if state.Buff.Migawari then
        meleeSet = set_combine(meleeSet, sets.buff.Migawari)
    end
    if state.Buff.Doom then
        meleeSet = set_combine(meleeSet, sets.buff.Doom)
    end
    return meleeSet
end

-- Called by the default 'update' self-command.
function job_update(cmdParams, eventArgs)
    select_movement_feet()
    determine_haste_group()
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function determine_haste_group()
    -- We have three groups of DW in gear: Hachiya body/legs, Iga head + Patentia Sash, and DW earrings
    
    -- Standard gear set reaches near capped delay with just Haste (77%-78%, depending on HQs)

    -- For high haste, we want to be able to drop one of the 10% groups.
    -- Basic gear hits capped delay (roughly) with:
    -- 1 March + Haste
    -- 2 March
    -- Haste + Haste Samba
    -- 1 March + Haste Samba
    -- Embrava
    
    -- High haste buffs:
    -- 2x Marches + Haste Samba == 19% DW in gear
    -- 1x March + Haste + Haste Samba == 22% DW in gear
    -- Embrava + Haste or 1x March == 7% DW in gear
    
    -- For max haste (capped magic haste + 25% gear haste), we can drop all DW gear.
    -- Max haste buffs:
    -- Embrava + Haste+March or 2x March
    -- 2x Marches + Haste
    
    -- So we want four tiers:
    -- Normal DW
    -- 20% DW -- High Haste
    -- 7% DW (earrings) - Embrava Haste (specialized situation with embrava and haste, but no marches)
    -- 0 DW - Max Haste
    
    classes.CustomMeleeGroups:clear()
    
    if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive.haste)) then
        classes.CustomMeleeGroups:append('MaxHaste')
    elseif buffactive.march == 2 and buffactive.haste then
        classes.CustomMeleeGroups:append('MaxHaste')
    elseif buffactive.embrava and (buffactive.haste or buffactive.march) then
        classes.CustomMeleeGroups:append('EmbravaHaste')
    elseif buffactive.march == 1 and buffactive.haste and buffactive['haste samba'] then
        classes.CustomMeleeGroups:append('HighHaste')
    elseif buffactive.march == 2 then
        classes.CustomMeleeGroups:append('HighHaste')
    end
end


function select_movement_feet()
    if world.time >= 17*60 or world.time < 7*60 then
        gear.MovementFeet.name = gear.NightFeet
    else
        gear.MovementFeet.name = gear.DayFeet
    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 == 'DNC' then
        set_macro_page(4, 3)
    elseif player.sub_job == 'THF' then
        set_macro_page(5, 3)
    else
        set_macro_page(1, 3)
    end
end
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-03 07:03:14
Link | Citer | R
 
Asura.Massacres said: »
Looks like gearswap is only working for Utsusemi:San,When i cast Utsusemi: Ichi or Ni gearswap doesn't work, It won't change Precast and midcast gear. Any idea why is it working fine for San and not ichi/ni?

Here's my file:

I imagine it has something to do with job_get_spell_map

In the Mote-libs spell mappings, Ichi and Ni are mapped to the keyword "utsusemi". Meanwhile, San isn't linked to anything.

So your Job_get_spell_map is doing this

"Is utsusemi: san Ninjutsu?" YES
"Is utsusemi: san NOT in the default spell maps?" YES
"Is utsusemi: san targeting 'SELF'?" YES
"Okay then return NinjutsuBuff"

So you are using your NinjutsuBuff set for this (which is identical to your utsusemi set, which is why you think it's working the way you want it to, when it's actually not)

You can test my theory on this by changing your ninjutsuBuff set to something like

sets.midcast.NinjutsuBuff = {head="Glory Crown"}

If you start equipping a glory crown when casting utsusemi: san, you know im right, and you have to add utsusemi:san to the Mote-libs/Mote-Mappings.

As for getting ichi and ni to use Utsusemi set... I don't know why they're not working since you're basically using Kinematic's default NIN lua. I personally don't use Motelibs because it often does things in the background I don't want it doing... so I don't know enough about it to debug it at a glance.
 Bahamut.Autobot
Offline
Serveur: Bahamut
Game: FFXI
user: autobot00
Posts: 21
By Bahamut.Autobot 2018-05-03 11:29:12
Link | Citer | R
 
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Offline
Posts: 346
By Sidiov 2018-05-03 11:50:49
Link | Citer | R
 
Bahamut.Autobot said: »
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Code
windower.register_event('zone change', function()
    --[[Code to trigger idle set activation here]]
	handle_equipping_gear(player.status)
end)
 Bahamut.Autobot
Offline
Serveur: Bahamut
Game: FFXI
user: autobot00
Posts: 21
By Bahamut.Autobot 2018-05-03 14:43:07
Link | Citer | R
 
Sidiov said: »
Bahamut.Autobot said: »
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Code
windower.register_event('zone change', function()
    --[[Code to trigger idle set activation here]]
	handle_equipping_gear(player.status)
end)

Thank you but im getting an user event error. is there anything special i need to do with that code?

i cant read the whole error, it runs off the screen.
Offline
Posts: 346
By Sidiov 2018-05-03 15:00:20
Link | Citer | R
 
Bahamut.Autobot said: »
Sidiov said: »
Bahamut.Autobot said: »
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Code
windower.register_event('zone change', function()
    --[[Code to trigger idle set activation here]]
	handle_equipping_gear(player.status)
end)

Thank you but im getting an user event error. is there anything special i need to do with that code?

i cant read the whole error, it runs off the screen.

I dont believe so, it does need to be outside any function.
Can you do console_log 1 in the console then grab the full error from the console.log in the Windower directory?
 Bahamut.Autobot
Offline
Serveur: Bahamut
Game: FFXI
user: autobot00
Posts: 21
By Bahamut.Autobot 2018-05-03 15:48:56
Link | Citer | R
 
Sidiov said: »
Bahamut.Autobot said: »
Sidiov said: »
Bahamut.Autobot said: »
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Code
windower.register_event('zone change', function()
    --[[Code to trigger idle set activation here]]
	handle_equipping_gear(player.status)
end)

Thank you but im getting an user event error. is there anything special i need to do with that code?

i cant read the whole error, it runs off the screen.

I dont believe so, it does need to be outside any function.
Can you do console_log 1 in the console then grab the full error from the console.log in the Windower directory?

yup. I just pasted the code at the very end of the LUA.

Gearswap:LUA runtime error: GearSwap/flow.lua:102:
User Event Error: ...Windower4\/addons/gearswap/data/Autobotnuggs_BLU.lua:1840: attempt to call global 'handle_equipping_gear' (a nil value)
Offline
Posts: 256
By Brynach 2018-05-04 18:44:49
Link | Citer | R
 
Is it possible to specify the back from which an item is selected in lua? For those times when two of the same item are used (for instance 2 of the same ring), and one will not equip.
Offline
Posts: 346
By Sidiov 2018-05-04 20:35:20
Link | Citer | R
 
Bahamut.Autobot said: »
Sidiov said: »
Bahamut.Autobot said: »
Sidiov said: »
Bahamut.Autobot said: »
anybody have a code for gearswap to equip a specific set when you change zones? i want to be able to equip my refresh set after i zone because it doesn't always switch you to it when u zone from a fight or dynamis, etc.
Code
windower.register_event('zone change', function()
    --[[Code to trigger idle set activation here]]
	handle_equipping_gear(player.status)
end)

Thank you but im getting an user event error. is there anything special i need to do with that code?

i cant read the whole error, it runs off the screen.

I dont believe so, it does need to be outside any function.
Can you do console_log 1 in the console then grab the full error from the console.log in the Windower directory?

yup. I just pasted the code at the very end of the LUA.

Gearswap:LUA runtime error: GearSwap/flow.lua:102:
User Event Error: ...Windower4\/addons/gearswap/data/Autobotnuggs_BLU.lua:1840: attempt to call global 'handle_equipping_gear' (a nil value)
oh just replace handle_equipping_gear with whatever you want to do, equip your idle set or something. That line is part of Mote's libraries.
 Bismarck.Peipei
Offline
Serveur: Bismarck
Game: FFXI
user: Rainmaan
Posts: 6
By Bismarck.Peipei 2018-05-07 09:28:00
Link | Citer | R
 
This might have been asked before, but I'm using original Skillup.lua to level skills and I get this error everytime I cast something

Skillup.lua:665: Attempt to index global 'action' (a nil value)

Also after about 30 minutes or so it stops, typically after casting a summon. I can get it running again shortly after by releasing the summon. What might be wrong?
 Asura.Patriclis
Offline
Serveur: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-07 10:16:09
Link | Citer | R
 
Bismarck.Peipei said: »
This might have been asked before, but I'm using original Skillup.lua to level skills and I get this error everytime I cast something

Skillup.lua:665: Attempt to index global 'action' (a nil value)

Also after about 30 minutes or so it stops, typically after casting a summon. I can get it running again shortly after by releasing the summon. What might be wrong?

Well the only Skillup.lua I know of only has 594 lines, and you're getting an error on line 665. So something about yours is different and thus not the 'original'.

And so to give you any idea of what's wrong with the file, you need to post the lua file so we can see it.
 Bismarck.Peipei
Offline
Serveur: Bismarck
Game: FFXI
user: Rainmaan
Posts: 6
By Bismarck.Peipei 2018-05-07 10:53:55
Link | Citer | R
 
Code
--[[How to use:
        --this tool is set it and forget it you can leave it running for hours as long as se does not log you out it will keep running--
        1.)place "skillup.lua" in your normal gearswap folder(where all your job files are)
        2.)then us "gs l skillup.lua" to load this skill up in to gearswap
        3.) on lines 22 and 25 of this file you can put in you wind and string instruments
        to start Geomancy magic skillup use command "gs c startgeo"
        to start Healing magic skillup use command "gs c starthealing"
        to start Enhancing magic skillup use command "gs c startenhancing"
        to start Ninjutsu magic skillup use command "gs c startninjutsu"
        to start Singing magic skillup use command "gs c startsinging"
        to start Blue magic skillup use command "gs c startblue"
        to start Summoning magic skillup use command "gs c startsmn"
        to stop all skillups use command "gs c skillstop"
        to auto shutdown after skillup use command "gs c aftershutdown"
        to auto logoff after skillup use command "gs c afterlogoff"
        to just stop and stay logged on after skillup use command "gs c afterStop"(only needed if you use one of the above auto shutdown/logoff)
       
        much thanks to Arcon,Byrth,Mote,and anybody else i forgot for the help in making this]]
require 'actions'
function get_sets()
        skilluprun = false
        sets.brd = {}
        sets.brd.wind = {
                range="Linos"--put your wind instrument here
        }
        sets.brd.string = {
                range="Terpander"--put your string instrument here
        }
        skilluptype = {"Geomancy","Healing","Enhancing","Ninjutsu","Singing","Blue","Summoning"}
        skillupcount = 1
        geospells = {"Indi-Acumen","Indi-AGI","Indi-Attunement","Indi-Barrier","Indi-CHR","Indi-DEX","Indi-Fade","Indi-Fend","Indi-Focus","Indi-Frailty","Indi-Fury","Indi-Gravity","Indi-Haste","Indi-INT","Indi-Languor","Indi-Malaise","Indi-MND","Indi-Paralysis","Indi-Poison","Indi-Precision","Indi-Refresh","Indi-Regen","Indi-Slip","Indi-Slow","Indi-STR","Indi-Torpor","Indi-Vex","Indi-VIT","Indi-Voidance","Indi-Wilt"}
        geocount = 1
        healingspells = {"Blindna","Cura","Cura II","Cura III","Curaga","Curaga II","Curaga III","Curaga IV","Curaga V","Cure","Cure II","Cure III","Cure IV","Cure V","Cure VI","Cursna","Esuna","Paralyna","Poisona","Reraise","Reraise II","Reraise III","Silena","Stona","Viruna"}
        healingcount = 1
        enhancespells = {"Adloquium","Animus Augeo","Animus Minuo","Aquaveil","Aurorastorm","Auspice","Baraera","Baraero","Baramnesia","Baramnesra","Barblind","Barblindra","Barblizzara","Barblizzard","Barfira","Barfire","Barparalyze","Barparalyzra","Barpetra","Barpetrify","Barpoison","Barpoisonra","Barsilence","Barsilencera","Barsleep","Barsleepra","Barstone","Barstonra","Barthunder","Barthundra","Barvira","Barvirus","Barwater","Barwatera","Blaze Spikes","Blink","Boost-AGI","Boost-CHR","Boost-DEX","Boost-INT","Boost-MND","Boost-STR","Boost-VIT","Crusade","Deodorize","Embrava","Enaero","Enaero II","Enblizzard","Enblizzard II","Enfire","Enfire II","Enstone","Enstone II","Enthunder","Enthunder II","Enwater","Enwater II","Erase","Escape","Firestorm","Foil","Gain-AGI","Gain-CHR","Gain-DEX","Gain-INT","Gain-MND","Gain-STR","Gain-VIT","Hailstorm","Haste","Ice Spikes","Invisible","Phalanx","Phalanx II","Protect","Protect II","Protect III","Protect IV","Protect V","Protectra","Protectra II","Protectra III","Protectra IV","Protectra V","Rainstorm","Refresh","Refresh II","Regen","Regen II","Regen III","Regen IV","Regen V","Reprisal","Sandstorm","Shell","Shell II","Shell III","Shell IV","Shell V","Shellra","Shellra II","Shellra III","Shellra IV","Shellra V","Shock Spikes","Sneak","Stoneskin","Temper","Thunderstorm","Voidstorm","Windstorm"}
        enhancecount = 1
        ninspells = {"Gekka: Ichi","Kakka: Ichi","Migawari: Ichi","Monomi: Ichi","Myoshu: Ichi","Tonko: Ichi","Tonko: Ni","Utsusemi: Ichi","Utsusemi: Ni","Yain: Ichi","Yain: Ichi","Gekka: Ichi"}
        nincount = 1
        nincant = {}
        nincantcount = 0
        if player.main_job == "NIN" or player.sub_job == "NIN" then
                ninspellitem = S{
                        ["Doton: Ichi"] = "Makibishi",
                        ["Doton: Ni"] = "Makibishi",
                        ["Doton: San"] = "Makibishi",
                        ["Huton: Ichi"] = "Kawahori-Ogi",
                        ["Huton: Ni"] = "Kawahori-Ogi",
                        ["Huton: San"] = "Kawahori-Ogi",
                        ["Hyoton: Ichi"] = "Tsurara",
                        ["Hyoton: Ni"] = "Tsurara",
                        ["Hyoton: San"] = "Tsurara",
                        ["Katon: Ichi"] = "Uchitake",
                        ["Katon: Ni"] = "Uchitake",
                        ["Katon: San"] = "Uchitake",
                        ["Raiton: Ichi"] = "Hiraishin",
                        ["Raiton: Ni"] = "Hiraishin",
                        ["Raiton: San"] = "Hiraishin",
                        ["Suiton: Ichi"] = "Mizu-Deppo",
                        ["Suiton: Ni"] = "Mizu-Deppo",
                        ["Suiton: San"] = "Mizu-Deppo",
                        ["Kakka: Ichi"] = "Ryuno",
                        ["Migawari: Ichi"] = "Mokujin",
                        ["Monomi: Ichi"] = "Sanjaku-Tenugui",
                        ["Myoshu: Ichi"] = "Kabenro",
                        ["Tonko: Ichi"] = "Shinobi-Tabi",
                        ["Tonko: Ni"] = "Shinobi-Tabi",
                        ["Tonko: San"] = "Shinobi-Tabi",
                        ["Utsusemi: Ichi"] = "Shihei",
                        ["Utsusemi: Ni"] = "Shihei",
                        ["Utsusemi: San"] = "Shihei",
                        ["Aisha: Ichi"] = "Soshi",
                        ["Dokumori: Ichi"] = "Kodoku",
                        ["Dokumori: Ni"] = "Kodoku",
                        ["Dokumori: San"] = "Kodoku",
                        ["Hojo: Ichi"] = "Kaginawa",
                        ["Hojo: Ni"] = "Kaginawa",
                        ["Hojo: San"] = "Kaginawa",
                        ["Jubaku: Ichi"] = "Jusatsu",
                        ["Jubaku: Ni"] = "Jusatsu",
                        ["Jubaku: San"] = "Jusatsu",
                        ["Kurayami: Ichi"] = "Sairui-Ran",
                        ["Kurayami: Ni"] = "Sairui-Ran",
                        ["Kurayami: San"] = "Sairui-Ran",
                        ["Yurin: Ichi"] = "Jinko",
                        ["Gekka: Ichi"] = "Ranka",
                        ["Yain: Ichi"] = "Furusumi",
                        }
                ninplustool = S{
                        ["Makibishi"] = "Inoshishinofuda",
                        ["Kawahori-Ogi"] = "Inoshishinofuda",
                        ["Tsurara"] = "Inoshishinofuda",
                        ["Uchitake"] = "Inoshishinofuda",
                        ["Hiraishin"] = "Inoshishinofuda",
                        ["Mizu-Deppo"] = "Inoshishinofuda",
                        ["Ryuno"] = "Shikanofuda",
                        ["Mokujin"] = "Shikanofuda",
                        ["Sanjaku-Tenugui"] = "Shikanofuda",
                        ["Kabenro"] = "Shikanofuda",
                        ["Shinobi-Tabi"] = "Shikanofuda",
                        ["Shihei"] = "Shikanofuda",
                        ["Soshi"] = "Chonofuda",
                        ["Kodoku"] = "Chonofuda",
                        ["Kaginawa"] = "Chonofuda",
                        ["Jusatsu"] = "Chonofuda",
                        ["Sairui-Ran"] = "Chonofuda",
                        ["Jinko"] = "Chonofuda",
                        ["Ranka"] = "Ranka",
                        ["Furusumi"] = "Furusumi",
                        }
                nintoolbag = S{
                        ["Makibishi"] = "Toolbag (Maki)",
                        ["Kawahori-Ogi"] = "Toolbag (Kawa)",
                        ["Tsurara"] = "Toolbag (Tsura)",
                        ["Uchitake"] = "Toolbag (Uchi)",
                        ["Hiraishin"] = "Toolbag (Hira)",
                        ["Mizu-Deppo"] = "Toolbag (Mizu)",
                        ["Ryuno"] = "Toolbag (Ryuno)",
                        ["Mokujin"] = "Toolbag (Moku)",
                        ["Sanjaku-Tenugui"] = "Toolbag (Sanja)",
                        ["Kabenro"] = "Toolbag (Kabenro)",
                        ["Shinobi-Tabi"] = "Toolbag (Shino)",
                        ["Shihei"] = "Toolbag (Shihei)",
                        ["Soshi"] = "Toolbag (Soshi)",
                        ["Kodoku"] = "Toolbag (Kodo)",
                        ["Kaginawa"] = "Toolbag (Kagi)",
                        ["Jusatsu"] = "Toolbag (Jusa)",
                        ["Sairui-Ran"] = "Toolbag (Sai)",
                        ["Jinko"] = "Toolbag (Jinko)",
                        ["Inoshishinofuda"] = "Toolbag (Ino)",
                        ["Shikanofuda"] = "Toolbag (Shika)",
                        ["Chonofuda"] = "Toolbag (Cho)",
                        ["Ranka"] = "Toolbag (Ranka)",
                        ["Furusumi"] = "Toolbag (Furu)",
                        }
                toolbagtoid = {
                        ["Toolbag (Uchi)"] = 5308,
                        ["Toolbag (Tsura)"] = 5309,
                        ["Toolbag (Kawa)"] = 5310,
                        ["Toolbag (Maki)"] = 5311,
                        ["Toolbag (Hira)"] = 5312,
                        ["Toolbag (Mizu)"] = 5313,
                        ["Toolbag (Shihe)"] = 5314,
                        ["Toolbag (Jusa)"] = 5315,
                        ["Toolbag (Kagi)"] = 5316,
                        ["Toolbag (Sai)"] = 5317,
                        ["Toolbag (Kodo)"] = 5318,
                        ["Toolbag (Shino)"] = 5319,
                        ["Toolbag (Sanja)"] = 5417,
                        ["Toolbag (Soshi)"] = 5734,
                        ["Toolbg. (Kaben)"] = 5863,
                        ["Toolbag (Jinko)"] = 5864,
                        ["Toolbag (Ryuno)"] = 5865,
                        ["Toolbag (Moku)"] = 5866,
                        ["Toolbag (Ino)"] = 5867,
                        ["Toolbag (Shika)"] = 5868,
                        ["Toolbag (Cho)"] = 5869,
                        ["Toolbag (Ranka)"] = 6265,
                        ["Toolbag (Furu)"] = 6266,
                        }
                tbid = 0
        end
        songspells = {"Knight's Minne","Advancing March","Adventurer's Dirge","Archer's Prelude","Army's Paeon","Army's Paeon II","Army's Paeon III","Army's Paeon IV","Army's Paeon V","Army's Paeon VI","Bewitching Etude","Blade Madrigal","Chocobo Mazurka","Dark Carol","Dark Carol II","Dextrous Etude","Dragonfoe Mambo","Earth Carol","Earth Carol II","Enchanting Etude","Fire Carol","Fire Carol II","Foe Sirvente","Fowl Aubade","Goblin Gavotte","Goddess's Hymnus","Gold Capriccio","Herb Pastoral","Herculean Etude","Hunter's Prelude","Ice Carol","Ice Carol II","Knight's Minne II","Knight's Minne III","Knight's Minne IV","Knight's Minne V","Learned Etude","Light Carol","Light Carol II","Lightning Carol","Lightning Carol II","Logical Etude","Mage's Ballad","Mage's Ballad II","Mage's Ballad III","Puppet's Operetta","Quick Etude","Raptor Mazurka","Sage Etude","Scop's Operetta","Sentinel's Scherzo","Sheepfoe Mambo","Shining Fantasia","Sinewy Etude","Spirited Etude","Swift Etude","Sword Madrigal","Uncanny Etude","Valor Minuet","Valor Minuet II","Valor Minuet III","Valor Minuet IV","Valor Minuet V","Victory March","Vital Etude","Vivacious Etude","Warding Round","Water Carol","Water Carol II","Wind Carol","Wind Carol II"}
        songcount = 1
        bluspells = {"Pollen","Wild Carrot","Refueling","Feather Barrier","Magic Fruit","Diamondhide","Warm-Up","Amplification","Triumphant Roar","Saline Coat","Reactor Cool","Plasma Charge","Plenilune Embrace","Regeneration","Animating Wail","Battery Charge","Magic Barrier","Fantod","Winds of Promy.","Barrier Tusk","White Wind","Harden Shell","O. Counterstance","Pyric Bulwark","Nat. Meditation","Carcharian Verve","Healing Breeze"}
        bluspellul = S{"Harden Shell","Thunderbolt","Absolute Terror","Gates of Hades","Tourbillion","Pyric Bulwark","Bilgestorm","Bloodrake","Droning Whirlwind","Carcharian Verve","Blistering Roar"}
        ulid = S{
                ["Harden Shell"] = 737,
                ["Thunderbolt"] = 736,
                ["Absolute Terror"] = 738,
                ["Gates of Hades"] = 739,
                ["Tourbillion"] = 740,
                ["Pyric Bulwark"] = 741,
                ["Bilgestorm"] = 742,
                ["Bloodrake"] = 743,
                ["Droning Whirlwind"] = 744,
                ["Carcharian Verve"] = 745,
                ["Blistering Roar"] = 746,
                }
        blucount = 1
        smnspells = {"Carbuncle","Cait Sith","Diabolos","Fenrir","Garuda","Ifrit","Leviathan","Ramuh","Shiva","Titan","Air Spirit","Dark Spirit","Earth Spirit","Fire Spirit","Ice Spirit","Light Spirit","Thunder Spirit","Water Spirit"}
        smncount = 1
        sets.Idle = {
                main="Dark Staff",
                left_ear="Relaxing Earring",
                right_ear="Liminus Earring",
        }
        shutdown = false
        logoff = false
        healingcap = false
        enhancingcap = false
        summoningcap = false
        ninjutsucap = false
        singingcap = false
        stringcap = false
        windcap = false
        bluecap = false
        geomancycap = false
        handbellcap = false
        add_to_chat(123,"Skill Up Loaded")
end
function status_change(new,old)
        if new=='Idle' then
                equip(sets.Idle)
                if skilluptype[skillupcount] == "Geomancy" and skilluprun then
                        send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
                elseif skilluptype[skillupcount] == "Healing" and skilluprun then
                        send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
                elseif skilluptype[skillupcount] == "Enhancing" and skilluprun then
                        send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
                elseif skilluptype[skillupcount] == "Ninjutsu" and skilluprun then
                        send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
                elseif skilluptype[skillupcount] == "Singing" and skilluprun then
                        send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
                elseif skilluptype[skillupcount] == "Blue" and skilluprun then
                        send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
                elseif skilluptype[skillupcount] == "Summoning" and skilluprun then
                        send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
                end
        end
end
function filtered_action(spell)
        if spell.type == "Geomancy" and skilluprun then
                cancel_spell()
                if geocount < 30 then
                        geocount = geocount +1
                else
                        geocount = 1
                end
                send_command('input /ma "'..geospells[geocount]..'" <me>')
                return
        elseif spell.skill == "Healing Magic" and skilluprun then
                cancel_spell()
                if healingcount < 25 then
                        healingcount = healingcount +1
                else
                        healingcount = 1
                end
                send_command('input /ma "'..healingspells[healingcount]..'" <me>')
                return
        elseif spell.skill == "Enhancing Magic" and skilluprun then
                cancel_spell()
                if enhancecount < 112 then
                        enhancecount = enhancecount +1
                else
                        enhancecount = 1
                end
                send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
                return
        elseif spell.skill == "Ninjutsu" and skilluprun then
                cancel_spell()
                nin_tool_check(spell)
        elseif spell.skill == "Singing" and skilluprun then
                cancel_spell()
                if songcount < 71 then
                        songcount = songcount +1
                else
                        songcount = 1
                end
                send_command('input /ma "'..songspells[songcount]..'" <me>')
                return
        elseif spell.skill == "Blue Magic" and skilluprun then
                cancel_spell()
                if blucount < 27 then
                        blucount = blucount +1
                else
                        blucount = 1
                end
                send_command('input /ma "'..bluspells[blucount]..'" <me>')
                return
        elseif spell.type == "SummonerPact" and skilluprun then
                cancel_spell()
                if smncount < 18 then
                        smncount = smncount +1
                else
                        smncount = 1
                end
                send_command('input /ma "'..smnspells[smncount]..'" <me>')
                return
        elseif spell.name == "Unbridled Learning" then
                cancel_spell()
                if blucount < 27 then
                        blucount = blucount +1
                else
                        blucount = 1
                end
                send_command('input /ma "'..bluspells[blucount]..'" <me>')
                return
        elseif spell.name == "Avatar's Favor" then
                        cancel_spell()
                        send_command('input /ja "Release" <me>')
                        return
        end
end
function precast(spell)
        if spell then
                if spell.mp_cost > player.mp then
                        cancel_spell()
                        send_command('input /heal on')
                        return
                end
        end
        if spell.type == "Geomancy" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if geocount < 30 then
                                geocount = geocount +1
                        else
                                geocount = 1
                        end
                        send_command('input /ma "'..geospells[geocount]..'" <me>')
                        return
                elseif geocount < 30 then
                        geocount = geocount +1
                else
                        geocount = 1
                end
        elseif spell.skill == "Healing Magic" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if healingcount < 25 then
                                healingcount = healingcount +1
                        else
                                healingcount = 1
                        end
                        send_command('input /ma "'..healingspells[healingcount]..'" <me>')
                        return
                elseif healingcount < 25 then
                        healingcount = healingcount +1
                else
                        healingcount = 1
                end
        elseif spell.skill == "Enhancing Magic" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if enhancecount < 112 then
                                enhancecount = enhancecount +1
                        else
                                enhancecount = 1
                        end
                        send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
                        return
                elseif enhancecount < 112 then
                        enhancecount = enhancecount +1
                else
                        enhancecount = 1
                end
        elseif spell.skill == "Ninjutsu" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if nincount < 12 then
                                nincount = nincount +1
                        else
                                nincount = 1
                        end
                        send_command('input /ma "'..ninspells[nincount]..'" <me>')
                        return
                elseif nincount < 12 then
                        nincount = nincount +1
                else
                        nincount = 1
                end
        elseif spell.skill == "Singing" and skilluprun then
                if not stringcap then
                        equip(sets.brd.string)
                elseif not windcap then
                        equip(sets.brd.wind)
                end
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if songcount < 71 then
                                songcount = songcount +1
                        else
                                songcount = 1
                        end
                        send_command('input /ma "'..songspells[songcount]..'" <me>')
                        return
                elseif songcount < 71 then
                        songcount = songcount +1
                else
                        songcount = 1
                end
        elseif spell.skill == "Blue Magic" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if blucount < 27 then
                                blucount = blucount +1
                        else
                                blucount = 1
                        end
                        send_command('input /ma "'..bluspells[blucount]..'" <me>')
                        return
                elseif blucount < 27 then
                        blucount = blucount +1
                else
                        blucount = 1
                end
        elseif spell.type == "SummonerPact" and skilluprun then
                if not windower.ffxi.get_spells()[spell.id] then
                        cancel_spell()
                        if smncount < 18 then
                                smncount = smncount +1
                        else
                                smncount = 1
                        end
                        send_command('input /ma "'..smnspells[smncount]..'" <me>')
                        return
                elseif smncount < 18 then
                        smncount = smncount +1
                else
                        smncount = 1
                end
        end
        if spell.name == "Avatar's Favor" then
                if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) or buffactive["Avatar's Favor"] then
                        cancel_spell()
                        send_command('input /ja "Release" <me>')
                        return
                end
        elseif spell.name == "Elemental Siphon" then
                if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) or player.mpp > 75 then
                        cancel_spell()
                        send_command('input /ja "Release" <me>')
                        return
                end
        elseif spell.name == "Unbridled Learning" then
                if bluspellul:contains(bluspells[blucount]) and not windower.ffxi.get_spells()[ulid[bluspells[blucount]]] then
                        if not buffactive["Unbridled Learning"] then
                                if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) then
                                        cancel_spell()
                                        if blucount < 27 then
                                                blucount = blucount +1
                                        else
                                                blucount = 1
                                        end
                                        send_command('input /ma "'..bluspells[blucount]..'" <me>')
                                        return
                                end
                        end
                else
                        cancel_spell()
                        if blucount < 27 then
                                blucount = blucount +1
                        else
                                blucount = 1
                        end
                        send_command('input /ma "'..bluspells[blucount]..'" <me>')
                        return
                end
        end
        if spell.name == "Release" then
                if not pet.isvalid then
                        cancel_spell()
                        send_command('input /heal on')
                        return
                end
                if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) then
                        cancel_spell()
                        send_command('wait 2.0;input /ja "Release" <me>')
                        return
                end
        end
end
function aftercast(spell)
        if skilluprun then
                if spell.type == "Geomancy" then
                        if geomancycap and handbellcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
                elseif spell.skill == "Healing Magic" then
                        if healingcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
                elseif spell.skill == "Enhancing Magic" then
                        if enhancingcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
                elseif spell.skill == "Ninjutsu" then
                        if ninjutsucap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..ninspells[nincount]..'" <me>')
                elseif spell.skill == "Singing" then
                        if singingcap and stringcap and windcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..songspells[songcount]..'" <me>')
                elseif spell.skill == "Blue Magic" then
                        if bluecap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.5;input /ja "Unbridled Learning" <me>')
                elseif spell.type == "SummonerPact" then
                        if summoningcap then
                                skilluprun = false
                                send_command('wait 6.0;input /ja "Release" <me>')
                                return
                        end
                        if spell.name:contains('Spirit') then
                                send_command('wait 6.0;input /ja "Elemental Siphon" <me>')
                        else
                                send_command('wait 6.0;input /ja "Avatar\'s Favor" <me>')
                        end
                elseif spell.name == "Release" then
                        send_command('wait 3.0;input /ma "'..smnspells[smncount]..'" <me>')
                elseif spell.name == "Avatar's Favor" then
                        send_command('wait 3.0;input /ja "Release" <me>')
                elseif spell.name == "Elemental Siphon" then
                        send_command('wait 3.0;input /ja "Release" <me>')
                elseif spell.name == "Unbridled Learning" then
                        send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
                end
        elseif spell.type == "SummonerPact" then
                if summoningcap then
                        skilluprun = false
                        send_command('wait 3.0;input /ja "Release" <me>')
                        return
                end
                if spell.name:contains('Spirit') then
                        send_command('wait 6.0;input /ja "Elemental Siphon" <me>')
                else
                        send_command('wait 6.0;input /ja "Avatar\'s Favor" <me>')
                end
        elseif spell.name == "Release" then
                if summoningcap then
                        shutdown_logoff()
                        return
                end
                if pet and pet.isvalid then
                        send_command('wait 4.0;input /ja "Release" <me>')
                end
        elseif spell.name == "Avatar's Favor" then
                send_command('wait 3.0;input /ja "Release" <me>')
        end
end
function self_command(command)
        if command == "startgeo" then
                skilluprun = true
                skillupcount = 1
                send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
                add_to_chat(123,"Starting Geomancy Skill up")
        end
        if command == "starthealing" then
                skilluprun = true
                skillupcount = 2
                send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
                add_to_chat(123,"Starting Healing Skill up")
        end
        if command == "startenhancing" then
                skilluprun = true
                skillupcount = 3
                send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
                add_to_chat(123,"Starting Enhancing Skill up")
        end
        if command == "startninjutsu" then
                skilluprun = true
                skillupcount = 4
                send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
                add_to_chat(123,"Starting Ninjutsu Skill up")
        end
        if command == "startsinging" then
                skilluprun = true
                skillupcount = 5
                send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
                add_to_chat(123,"Starting Singing Skill up")
        end
        if command == "startblue" then
                skilluprun = true
                skillupcount = 6
                send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
                add_to_chat(123,"Starting Blue Magic Skill up")
        end
        if command == "startsmn" then
                skilluprun = true
                skillupcount = 7
                send_command('wait 2.0;input /ma "'..smnspells[smncount]..'" <me>')
                add_to_chat(123,"Starting Summoning Skill up")
        end
        if command == "skillstop" then
                skilluprun = false
                add_to_chat(123,"Stopping Skill up")
        end
        if command == 'aftershutdown' then
                shutdown = true
                logoff = false
                add_to_chat(123, '----- Will Shutdown When Skillup Done -----')
        end
        if command == 'afterlogoff' then
                shutdown = false
                logoff = true
                add_to_chat(123, '----- Will Logoff When Skillup Done -----')
        end
        if command == 'afterStop' then
                shutdown = false
                logoff = false
                add_to_chat(123, '----- Will Stop When Skillup Done -----')
        end
end
function shutdown_logoff()
                add_to_chat(123,"Auto stop skillup")
        if logoff then
                send_command('wait 3.0;input /logoff')
        elseif shutdown then
                send_command('wait 3.0;input /shutdown')
        end
end
function nin_tool_check(spell)
        if spell.type == "Ninjutsu" then
                local tool = ninspellitem[spell.name]
                local stool = ninplustool[tool]
                local toolbag = nintoolbag[tool]
                local stoolbag = nintoolbag[stool]
                if not nincant:contains(spell.name)then
                        if not (player.inventory == tool or player.inventory == stool) then
                                cancel_spell()
                                if player.inventory == toolbag then
                                        tbid = toolbagtoid[toolbag]
                                        send_command('input /item "'..toolbag..'" <me>')
                                elseif player.inventory == stoolbag then
                                        tbid = toolbagtoid[stoolbag]
                                        send_command('input /item "'..stoolbag..'" <me>')
                                else
                                        nincant:append(spell.name)
                                        nincantcount = nincantcount +1
                                end
                                if nincount < 12 then
                                        nincount = nincount +1
                                else
                                        nincount = 1
                                end
                                send_command('input /ma "'..ninspells[nincount]..'" <me>')
                                return
                        end
                elseif nincantcount < 12 then
                        if nincount < 12 then
                                nincount = nincount +1
                        else
                                nincount = 1
                        end
                                send_command('input /ma "'..ninspells[nincount]..'" <me>')
                        return
                else
                        skilluprun = false
                        add_to_chat(123,"You Have No More Of The Tools Needed For Castin of NIN Spells\nStoping NIN Skillup")
                        return
                end
        end
end
function event_action(act)
        action = Action(act)
    if action:get_category_string() == 'item_finish' then
        if action.raw.param == tbid and player.id == action.raw.actor_id then
                        send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
                        tbid = 0
                end
    end
end
windower.raw_register_event('action', event_action)
function skill_capped(id, data, modified, injected, blocked)
        if id == 0x062 then
                healingcap = data:unpack('q', 0xC4, 8)
                enhancingcap = data:unpack('q', 0xC6, 8)
                summoningcap = data:unpack('q', 0xCE, 8)
                ninjutsucap = data:unpack('q', 0xD0, 8)
                singingcap = data:unpack('q', 0xD2, 8)
                stringcap = data:unpack('q', 0xD4, 8)
                windcap = data:unpack('q', 0xD6, 8)
                bluecap = data:unpack('q', 0xD8, 8)
                geomancycap = data:unpack('q', 0xDA, 8)
                handbellcap = data:unpack('q', 0xDC, 8)
        end
        if id == 0x0DF then
                if data:unpack('I', 0x0D) == player.max_mp and skilluprun then
                        windower.send_command('input /heal off')
                end
        end
end
windower.raw_register_event('incoming chunk', skill_capped)
 Bismarck.Peipei
Offline
Serveur: Bismarck
Game: FFXI
user: Rainmaan
Posts: 6
By Bismarck.Peipei 2018-05-07 10:58:25
Link | Citer | R
 
Line 665 is actually this part, it is not formatted correctly in the post.

function event_action(act)
action = Action(act)
if action:get_category_string() == 'item_finish' then
if action.raw.param == tbid and player.id == action.raw.actor_id then
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
tbid = 0
end
end
end
First Page 2 3 ... 134 135 136 ... 182 183 184
Log in to post.